summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Tools
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Tools')
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/committer_auth.py2
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/config.json180
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser.py (renamed from Tools/Scripts/webkitpy/common/net/htdigestparser.py)0
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser_unittest.py (renamed from Tools/Scripts/webkitpy/common/net/htdigestparser_unittest.py)13
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg214
-rwxr-xr-xTools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py31
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/favicon.icobin0 -> 766 bytes
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html8
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Utilities.js2
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ViewController.js2
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js2
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js5
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js8
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js48
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js60
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js2
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js20
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js4
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js4
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/public_html/default.css10
-rwxr-xr-xTools/BuildSlaveSupport/build.webkit.org-config/templates/root.html16
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild.py (renamed from Tools/Scripts/webkitpy/common/config/build.py)20
-rw-r--r--Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py (renamed from Tools/Scripts/webkitpy/common/config/build_unittest.py)22
-rw-r--r--Tools/BuildSlaveSupport/built-product-archive35
-rwxr-xr-xTools/BuildSlaveSupport/chromium/output-android-device-status81
-rwxr-xr-xTools/BuildSlaveSupport/delete-stale-build-files87
-rwxr-xr-xTools/BuildSlaveSupport/kill-old-processes238
-rwxr-xr-xTools/BuildSlaveSupport/run-performance-tests80
-rw-r--r--Tools/BuildSlaveSupport/test-result-archive30
-rw-r--r--Tools/CMakeLists.txt43
-rw-r--r--Tools/ChangeLog12911
-rw-r--r--Tools/ChangeLog-2013-04-2439024
-rw-r--r--Tools/CodeCoverage/README22
-rw-r--r--Tools/CodeCoverage/amber.pngbin127 -> 0 bytes
-rw-r--r--Tools/CodeCoverage/cov.py201
-rw-r--r--Tools/CodeCoverage/emerald.pngbin127 -> 0 bytes
-rw-r--r--Tools/CodeCoverage/gcov.css116
-rw-r--r--Tools/CodeCoverage/glass.pngbin127 -> 0 bytes
-rwxr-xr-xTools/CodeCoverage/regenerate-coverage-display382
-rw-r--r--Tools/CodeCoverage/results-template.html358
-rw-r--r--Tools/CodeCoverage/ruby.pngbin127 -> 0 bytes
-rwxr-xr-xTools/CodeCoverage/run-generate-coverage-data240
-rw-r--r--Tools/CodeCoverage/snow.pngbin127 -> 0 bytes
-rw-r--r--Tools/DumpRenderTree/AccessibilityController.cpp4
-rw-r--r--Tools/DumpRenderTree/AccessibilityController.h7
-rw-r--r--Tools/DumpRenderTree/AccessibilityUIElement.cpp228
-rw-r--r--Tools/DumpRenderTree/AccessibilityUIElement.h41
-rw-r--r--Tools/DumpRenderTree/DefaultPolicyDelegate.h13
-rw-r--r--Tools/DumpRenderTree/DefaultPolicyDelegate.m34
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp544
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.gypi128
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.h5
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln56
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj282
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters197
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props11
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props16
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props10
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props17
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj230
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props17
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props12
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd (renamed from Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd)0
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd (renamed from Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd)8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props14
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props10
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props17
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj191
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props14
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props14
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props9
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj172
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props17
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props12
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPostBuild.cmd (renamed from Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd)0
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd (renamed from Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd)0
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props12
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props9
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def (renamed from Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def)10
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc (renamed from Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc)204
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj225
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters139
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props16
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPostBuild.cmd (renamed from Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd)0
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd (renamed from Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd)0
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props12
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props8
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/resource.h (renamed from Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h)0
-rw-r--r--Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj145
-rw-r--r--Tools/DumpRenderTree/DumpRenderTreeCommon.cpp23
-rw-r--r--Tools/DumpRenderTree/JavaScriptThreading.cpp151
-rw-r--r--Tools/DumpRenderTree/Makefile7
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt17
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp2
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp81
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp2
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win/CallJSThatDestroysPlugin.cpp (renamed from Tools/DumpRenderTree/TestNetscapePlugIn/win/CallJSThatDestroysPlugin.cpp)0
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp1
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj568
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops19
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops8
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops8
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops8
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops8
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin_debug.def6
-rw-r--r--Tools/DumpRenderTree/TestRunner.cpp265
-rw-r--r--Tools/DumpRenderTree/TestRunner.h33
-rw-r--r--Tools/DumpRenderTree/atk/AccessibilityCallbacks.h (renamed from Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h)0
-rw-r--r--Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp (renamed from Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp)55
-rw-r--r--Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp121
-rw-r--r--Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp1070
-rw-r--r--Tools/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp5
-rw-r--r--Tools/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp31
-rw-r--r--Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp150
-rw-r--r--Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h12
-rw-r--r--Tools/DumpRenderTree/blackberry/EventSender.cpp114
-rw-r--r--Tools/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp30
-rw-r--r--Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp201
-rw-r--r--Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp6
-rw-r--r--Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp61
-rw-r--r--Tools/DumpRenderTree/cg/ImageDiffCG.cpp18
-rw-r--r--Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp6
-rw-r--r--Tools/DumpRenderTree/cg/PixelDumpSupportCG.h2
-rw-r--r--Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp124
-rw-r--r--Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h94
-rw-r--r--Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp104
-rw-r--r--Tools/DumpRenderTree/chromium/DRTDevToolsClient.h87
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.cpp1405
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.h554
-rw-r--r--Tools/DumpRenderTree/chromium/DumpRenderTree.cpp286
-rw-r--r--Tools/DumpRenderTree/chromium/ImageDiff.cpp515
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestHelper.mm213
-rw-r--r--Tools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp84
-rw-r--r--Tools/DumpRenderTree/chromium/MockConstraints.cpp79
-rw-r--r--Tools/DumpRenderTree/chromium/MockConstraints.h49
-rw-r--r--Tools/DumpRenderTree/chromium/MockGrammarCheck.cpp78
-rw-r--r--Tools/DumpRenderTree/chromium/MockGrammarCheck.h54
-rw-r--r--Tools/DumpRenderTree/chromium/MockSpellCheck.cpp168
-rw-r--r--Tools/DumpRenderTree/chromium/MockSpellCheck.h82
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp72
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h58
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp110
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h59
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp58
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h47
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp372
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h88
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp204
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebSpeechInputController.h93
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp220
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.h98
-rw-r--r--Tools/DumpRenderTree/chromium/NotificationPresenter.cpp154
-rw-r--r--Tools/DumpRenderTree/chromium/NotificationPresenter.h75
-rw-r--r--Tools/DumpRenderTree/chromium/Task.cpp79
-rw-r--r--Tools/DumpRenderTree/chromium/Task.h41
-rw-r--r--Tools/DumpRenderTree/chromium/TestEventPrinter.cpp115
-rw-r--r--Tools/DumpRenderTree/chromium/TestEventPrinter.h58
-rw-r--r--Tools/DumpRenderTree/chromium/TestNavigationController.cpp277
-rw-r--r--Tools/DumpRenderTree/chromium/TestNavigationController.h211
-rw-r--r--Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h9
-rw-r--r--Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h8
-rw-r--r--Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h1
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h58
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/public/WebEventSender.h59
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/public/WebTask.h102
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h68
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h65
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h143
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp205
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h96
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp982
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h173
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp360
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h249
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp325
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h144
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp1301
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h191
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp199
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.h72
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp248
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h65
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h64
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp109
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h71
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp755
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h188
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp237
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h74
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp60
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp51
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/WebTask.cpp83
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp202
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp223
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp818
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.h266
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellAndroid.cpp56
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellMac.mm149
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellPosix.cpp71
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellWin.cpp217
-rw-r--r--Tools/DumpRenderTree/chromium/TestShellX11.cpp190
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.cpp514
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.h140
-rw-r--r--Tools/DumpRenderTree/chromium/WebPermissions.cpp132
-rw-r--r--Tools/DumpRenderTree/chromium/WebPermissions.h79
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.cpp262
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.h127
-rwxr-xr-xTools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp528
-rw-r--r--Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h203
-rw-r--r--Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm191
-rwxr-xr-xTools/DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp793
-rw-r--r--Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h100
-rw-r--r--Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp128
-rw-r--r--Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h63
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp1874
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.h464
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp88
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h63
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp58
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h54
-rw-r--r--Tools/DumpRenderTree/chromium/android_fallback_fonts.xml38
-rw-r--r--Tools/DumpRenderTree/chromium/android_main_fonts.xml120
-rw-r--r--Tools/DumpRenderTree/chromium/config.h42
-rw-r--r--Tools/DumpRenderTree/chromium/fonts.conf252
-rw-r--r--Tools/DumpRenderTree/config.h13
-rw-r--r--Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp77
-rw-r--r--Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp54
-rw-r--r--Tools/DumpRenderTree/efl/CMakeLists.txt62
-rw-r--r--Tools/DumpRenderTree/efl/DumpRenderTree.cpp26
-rw-r--r--Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp111
-rw-r--r--Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h16
-rw-r--r--Tools/DumpRenderTree/efl/DumpRenderTreeEfl.h2
-rw-r--r--Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp7
-rw-r--r--Tools/DumpRenderTree/efl/FontManagement.cpp8
-rw-r--r--Tools/DumpRenderTree/efl/TestRunnerEfl.cpp106
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp61
-rw-r--r--Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp958
-rw-r--r--Tools/DumpRenderTree/gtk/DumpRenderTree.cpp184
-rw-r--r--Tools/DumpRenderTree/gtk/EditingCallbacks.cpp16
-rw-r--r--Tools/DumpRenderTree/gtk/EventSender.cpp12
-rw-r--r--Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am28
-rw-r--r--Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp183
-rw-r--r--Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm128
-rw-r--r--Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm811
-rw-r--r--Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm164
-rw-r--r--Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig2
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTree.mm111
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTreeMac.h6
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h6
-rw-r--r--Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm5
-rw-r--r--Tools/DumpRenderTree/mac/EventSendingController.mm22
-rw-r--r--Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm2
-rw-r--r--Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm6
-rw-r--r--Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm2
-rw-r--r--Tools/DumpRenderTree/mac/TestRunnerMac.mm214
-rw-r--r--Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm4
-rw-r--r--Tools/DumpRenderTree/mac/WorkQueueItemMac.mm12
-rw-r--r--Tools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp148
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTree.pro5
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp6
-rwxr-xr-xTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp127
-rw-r--r--Tools/DumpRenderTree/qt/DumpRenderTreeQt.h18
-rw-r--r--Tools/DumpRenderTree/qt/EventSenderQt.cpp8
-rw-r--r--Tools/DumpRenderTree/qt/EventSenderQt.h2
-rw-r--r--Tools/DumpRenderTree/qt/GCControllerQt.cpp12
-rw-r--r--Tools/DumpRenderTree/qt/GCControllerQt.h50
-rw-r--r--Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro5
-rw-r--r--Tools/DumpRenderTree/qt/TestRunnerQt.cpp878
-rw-r--r--Tools/DumpRenderTree/qt/TestRunnerQt.h119
-rw-r--r--Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp46
-rw-r--r--Tools/DumpRenderTree/qt/WorkQueueItemQt.h135
-rw-r--r--Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp73
-rw-r--r--Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp127
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTree.cpp268
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTree.vcproj760
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeApple.vsprops15
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeCFLite.vsprops11
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeCairo.vsprops15
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops21
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncher.vcproj402
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherCommon.vsprops18
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebug.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugAll.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherProduction.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherRelease.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeLauncherReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd62
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiff.vcproj452
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffCairo.cpp4
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffCommon.vsprops19
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffDebug.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncher.vcproj396
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherCommon.vsprops18
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherDebug.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherDebugAll.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherDebugCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherProduction.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherRelease.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffLauncherReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffProduction.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffRelease.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/DumpRenderTree/win/ImageDiffWinCairoCommon.vsprops18
-rw-r--r--Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp2
-rw-r--r--Tools/DumpRenderTree/win/TestRunnerWin.cpp245
-rw-r--r--Tools/DumpRenderTree/wscript67
-rw-r--r--Tools/DumpRenderTree/wx/DumpRenderTreeWx.cpp337
-rw-r--r--Tools/DumpRenderTree/wx/TestRunnerWx.cpp619
-rwxr-xr-xTools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh29
-rwxr-xr-xTools/EWSTools/GoogleComputeEngine/build-commit-queue.sh32
-rwxr-xr-xTools/EWSTools/GoogleComputeEngine/build-cr-linux-debug-ews.sh (renamed from Tools/RebaselineQueueServer/main.py)57
-rwxr-xr-xTools/EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh68
-rwxr-xr-xTools/EWSTools/GoogleComputeEngine/findzone.sh5
-rwxr-xr-xTools/EWSTools/boot.sh7
-rwxr-xr-x[-rw-r--r--]Tools/EWSTools/build-boot-cmd.sh (renamed from Tools/gdb/webcore.py)13
-rwxr-xr-xTools/EWSTools/build-repo.sh61
-rwxr-xr-xTools/EWSTools/build-vm.sh (renamed from Tools/EWSTools/cold-boot.sh)43
-rwxr-xr-xTools/EWSTools/configure-clang-linux.sh34
-rwxr-xr-xTools/EWSTools/configure-git-svn.sh42
-rwxr-xr-xTools/EWSTools/configure-git-user.sh45
-rwxr-xr-xTools/EWSTools/configure-svn-config.sh27
-rw-r--r--Tools/EWSTools/screen-config8
-rwxr-xr-x[-rw-r--r--]Tools/EWSTools/setup-commit-queue.sh (renamed from Tools/Scripts/webkitpy/common/watchlist/watchlistloader.py)43
-rwxr-xr-xTools/EWSTools/start-queue-mac.sh74
-rwxr-xr-xTools/EWSTools/start-queue-win.sh52
-rwxr-xr-xTools/EWSTools/start-queue.sh79
-rw-r--r--Tools/EWebLauncher/CMakeLists.txt28
-rw-r--r--Tools/EWebLauncher/ControlTheme/CMakeLists.txt6
-rw-r--r--Tools/EWebLauncher/main.c82
-rw-r--r--Tools/EWebLauncher/url_bar.c2
-rw-r--r--Tools/GNUmakefile.am112
-rw-r--r--Tools/GtkLauncher/main.c31
-rw-r--r--Tools/ImageDiff/CMakeLists.txt17
-rw-r--r--Tools/ImageDiff/ImageDiff.pro (renamed from Tools/DumpRenderTree/qt/ImageDiff.pro)2
-rw-r--r--Tools/ImageDiff/PlatformEfl.cmake19
-rw-r--r--Tools/ImageDiff/efl/ImageDiff.cpp (renamed from Tools/DumpRenderTree/efl/ImageDiff.cpp)0
-rw-r--r--Tools/ImageDiff/gtk/ImageDiff.cpp (renamed from Tools/DumpRenderTree/gtk/ImageDiff.cpp)7
-rw-r--r--Tools/ImageDiff/qt/ImageDiff.cpp (renamed from Tools/DumpRenderTree/qt/ImageDiff.cpp)33
-rw-r--r--Tools/Makefile6
-rw-r--r--Tools/MiniBrowser/MiniBrowser.vcproj508
-rw-r--r--Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj18
-rw-r--r--Tools/MiniBrowser/MiniBrowserLauncher.vcproj396
-rw-r--r--Tools/MiniBrowser/MiniBrowserPostBuild.cmd29
-rw-r--r--Tools/MiniBrowser/MiniBrowserPreBuild.cmd5
-rw-r--r--Tools/MiniBrowser/efl/CMakeLists.txt47
-rw-r--r--Tools/MiniBrowser/efl/main.c900
-rw-r--r--Tools/MiniBrowser/gtk/BrowserWindow.c143
-rw-r--r--Tools/MiniBrowser/gtk/CMakeLists.txt51
-rw-r--r--Tools/MiniBrowser/gtk/GNUmakefile.am6
-rw-r--r--Tools/MiniBrowser/gtk/main.c42
-rw-r--r--Tools/MiniBrowser/mac/BrowserWindowController.h2
-rw-r--r--Tools/MiniBrowser/mac/MainMenu.xib93
-rw-r--r--Tools/MiniBrowser/mac/WK1BrowserWindowController.m51
-rw-r--r--Tools/MiniBrowser/mac/WK2BrowserWindowController.m26
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.cpp19
-rw-r--r--Tools/MiniBrowser/qt/BrowserWindow.h2
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowser.qrc1
-rw-r--r--Tools/MiniBrowser/qt/MiniBrowserApplication.cpp19
-rw-r--r--Tools/MiniBrowser/qt/UrlLoader.cpp24
-rw-r--r--Tools/MiniBrowser/qt/UrlLoader.h5
-rw-r--r--Tools/MiniBrowser/qt/icons/find.pngbin0 -> 930 bytes
-rw-r--r--Tools/MiniBrowser/qt/qml/BrowserWindow.qml180
-rw-r--r--Tools/MiniBrowser/win/BrowserView.cpp164
-rw-r--r--Tools/MiniBrowser/win/BrowserWindow.cpp261
-rw-r--r--Tools/MiniBrowser/win/MiniBrowser.cpp84
-rw-r--r--Tools/MiniBrowser/win/MiniBrowser.rc79
-rw-r--r--Tools/MiniBrowser/win/main.cpp74
-rw-r--r--Tools/MiniBrowser/win/resource.h23
-rw-r--r--Tools/QtTestBrowser/launcherwindow.cpp51
-rw-r--r--Tools/QtTestBrowser/launcherwindow.h8
-rw-r--r--Tools/QtTestBrowser/qttestbrowser.cpp3
-rw-r--r--Tools/QueueStatusServer/app.yaml4
-rw-r--r--Tools/QueueStatusServer/config/__init__.py (renamed from Tools/RebaselineQueueServer/handlers/__init__.py)0
-rw-r--r--Tools/QueueStatusServer/config/charts.py (renamed from Tools/RebaselineQueueServer/model/queueentry.py)58
-rw-r--r--Tools/QueueStatusServer/config/logging.py30
-rw-r--r--Tools/QueueStatusServer/config/messages.py33
-rw-r--r--Tools/QueueStatusServer/config/queues.py (renamed from Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectorywithlocalcommits.py)28
-rw-r--r--Tools/QueueStatusServer/cron.yaml4
-rw-r--r--Tools/QueueStatusServer/filters/webkit_extras.py16
-rw-r--r--Tools/QueueStatusServer/handlers/nextpatch.py6
-rw-r--r--Tools/QueueStatusServer/handlers/queuecharts.py151
-rw-r--r--Tools/QueueStatusServer/handlers/queuestatus.py1
-rw-r--r--Tools/QueueStatusServer/handlers/releasepatch.py6
-rw-r--r--Tools/QueueStatusServer/handlers/submittoews.py2
-rw-r--r--Tools/QueueStatusServer/handlers/syncqueuelogs.py (renamed from Tools/RebaselineQueueServer/handlers/pages.py)25
-rw-r--r--Tools/QueueStatusServer/handlers/updatestatus.py8
-rw-r--r--Tools/QueueStatusServer/handlers/updateworkitems.py45
-rw-r--r--Tools/QueueStatusServer/index.yaml5
-rw-r--r--Tools/QueueStatusServer/loggers/__init__.py (renamed from Tools/RebaselineQueueServer/model/__init__.py)0
-rw-r--r--Tools/QueueStatusServer/loggers/recordbotevent.py39
-rw-r--r--Tools/QueueStatusServer/loggers/recordpatchevent.py114
-rw-r--r--Tools/QueueStatusServer/main.py4
-rw-r--r--Tools/QueueStatusServer/model/attachment.py10
-rw-r--r--Tools/QueueStatusServer/model/patchlog.py70
-rw-r--r--Tools/QueueStatusServer/model/queuelog.py88
-rw-r--r--Tools/QueueStatusServer/model/queues.py33
-rw-r--r--Tools/QueueStatusServer/model/queues_unittest.py3
-rw-r--r--Tools/QueueStatusServer/model/queuestatus.py5
-rw-r--r--[-rwxr-xr-x]Tools/QueueStatusServer/model/warninglog.py (renamed from Tools/EWSTools/create-webkit-git)31
-rw-r--r--Tools/QueueStatusServer/stylesheets/charts.css8
-rw-r--r--Tools/QueueStatusServer/templates/activebots.html4
-rw-r--r--Tools/QueueStatusServer/templates/queuecharts.html284
-rw-r--r--Tools/QueueStatusServer/templates/queuestatus.html1
-rw-r--r--Tools/QueueStatusServer/templates/statusbubble.html2
-rwxr-xr-xTools/RebaselineQueueServer/app.yaml11
-rw-r--r--Tools/RebaselineQueueServer/handlers/builderqueue.py95
-rwxr-xr-xTools/RebaselineQueueServer/index.yaml11
-rw-r--r--Tools/RebaselineQueueServer/static/builder-frame-empty.html10
-rw-r--r--Tools/RebaselineQueueServer/static/styles.css71
-rw-r--r--Tools/RebaselineQueueServer/templates/builder-picker.html74
-rw-r--r--Tools/RebaselineQueueServer/templates/builder-queue-edit.html190
-rw-r--r--Tools/RebaselineQueueServer/templates/builder-queue-list.html23
-rw-r--r--Tools/RebaselineQueueServer/templates/home.html28
-rw-r--r--Tools/Scripts/VCSUtils.pm109
-rwxr-xr-xTools/Scripts/bisect-builds10
-rwxr-xr-xTools/Scripts/build-api-tests6
-rwxr-xr-xTools/Scripts/build-dumprendertree9
-rwxr-xr-xTools/Scripts/build-jsc7
-rwxr-xr-xTools/Scripts/build-webkit110
-rwxr-xr-xTools/Scripts/check-for-inappropriate-macros-in-external-headers77
-rwxr-xr-xTools/Scripts/check-for-webkit-framework-include-consistency7
-rwxr-xr-xTools/Scripts/check-inspector-strings3
-rwxr-xr-xTools/Scripts/detect-mismatched-virtual-const167
-rwxr-xr-xTools/Scripts/display-profiler-output938
-rwxr-xr-xTools/Scripts/do-webcore-rename8
-rwxr-xr-xTools/Scripts/dump-webkit-tests-run52
-rwxr-xr-xTools/Scripts/export-w3c-performance-wg-tests4
-rwxr-xr-xTools/Scripts/extract-localizable-js-strings158
-rwxr-xr-xTools/Scripts/extract-localizable-strings1
-rwxr-xr-xTools/Scripts/filter-build-webkit61
-rwxr-xr-xTools/Scripts/generate-coverage-data163
-rwxr-xr-xTools/Scripts/import-w3c-performance-wg-tests2
-rwxr-xr-xTools/Scripts/import-w3c-tests35
-rwxr-xr-xTools/Scripts/lint-test-expectations (renamed from Tools/BuildSlaveSupport/chromium/remove-crash-logs)18
-rwxr-xr-xTools/Scripts/new-run-webkit-httpd2
-rwxr-xr-xTools/Scripts/new-run-webkit-websocketserver9
-rwxr-xr-xTools/Scripts/old-run-webkit-tests57
-rwxr-xr-xTools/Scripts/pdevenv45
-rwxr-xr-xTools/Scripts/prepare-ChangeLog24
-rwxr-xr-xTools/Scripts/print-msvc-project-dependencies143
-rwxr-xr-xTools/Scripts/print-vse-failure-logs113
-rwxr-xr-xTools/Scripts/run-api-tests24
-rwxr-xr-xTools/Scripts/run-bindings-tests1
-rwxr-xr-xTools/Scripts/run-chromium-webkit-unit-tests52
-rwxr-xr-xTools/Scripts/run-efl-tests3
-rwxr-xr-xTools/Scripts/run-gtk-tests38
-rwxr-xr-xTools/Scripts/run-javascriptcore-tests15
-rwxr-xr-xTools/Scripts/run-jsc1
-rwxr-xr-xTools/Scripts/run-launcher17
-rwxr-xr-xTools/Scripts/run-qtwebkit-tests34
-rwxr-xr-xTools/Scripts/run-sunspider12
-rwxr-xr-xTools/Scripts/run-webkit-httpd2
-rwxr-xr-xTools/Scripts/run-webkit-tests26
-rwxr-xr-xTools/Scripts/sampstat98
-rwxr-xr-xTools/Scripts/svn-create-patch12
-rwxr-xr-xTools/Scripts/test-webkit-scripts5
-rwxr-xr-xTools/Scripts/test-webkitruby34
-rwxr-xr-xTools/Scripts/update-sources-list.py93
-rwxr-xr-xTools/Scripts/update-webkit30
-rwxr-xr-xTools/Scripts/update-webkit-chromium96
-rwxr-xr-xTools/Scripts/update-webkit-dependency2
-rwxr-xr-xTools/Scripts/update-webkit-libs-jhbuild10
-rwxr-xr-xTools/Scripts/update-webkit-localizable-strings12
-rwxr-xr-xTools/Scripts/update-webkit-support-libs2
-rwxr-xr-xTools/Scripts/update-webkit-wincairo-libs2
-rwxr-xr-xTools/Scripts/validate-committer-lists28
-rwxr-xr-xTools/Scripts/webkit-build-directory2
-rwxr-xr-xTools/Scripts/webkit-tools-completion.sh2
-rwxr-xr-xTools/Scripts/webkitdirs.pm695
-rw-r--r--Tools/Scripts/webkitperl/FeatureList.pm189
-rw-r--r--Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl36
-rw-r--r--Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl181
-rw-r--r--Tools/Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl228
-rw-r--r--Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl120
-rw-r--r--Tools/Scripts/webkitperl/httpd.pm18
-rw-r--r--Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt135
-rw-r--r--Tools/Scripts/webkitpy/bindings/main.py22
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py56
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/changelog.py238
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py160
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/checkout.py12
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/checkout_mock.py4
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py23
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/commitinfo.py2
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/deps.py61
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/diff_parser.py29
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py87
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm/detection_unittest.py9
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm/git.py86
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm/scm.py64
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py24
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py472
-rw-r--r--Tools/Scripts/webkitpy/common/checkout/scm/svn.py49
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers.py560
-rw-r--r--Tools/Scripts/webkitpy/common/config/committers_unittest.py35
-rw-r--r--Tools/Scripts/webkitpy/common/config/committervalidator.py10
-rw-r--r--Tools/Scripts/webkitpy/common/config/committervalidator_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/common/config/contributionareas.py2
-rw-r--r--Tools/Scripts/webkitpy/common/config/contributionareas_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/config/contributors.json4184
-rw-r--r--Tools/Scripts/webkitpy/common/config/ews.json56
-rw-r--r--Tools/Scripts/webkitpy/common/config/irc.py2
-rw-r--r--Tools/Scripts/webkitpy/common/config/ports.py117
-rw-r--r--Tools/Scripts/webkitpy/common/config/ports_mock.py11
-rw-r--r--Tools/Scripts/webkitpy/common/config/ports_unittest.py45
-rw-r--r--Tools/Scripts/webkitpy/common/config/urls.py7
-rw-r--r--Tools/Scripts/webkitpy/common/config/urls_unittest.py14
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/common/config/watchlist219
-rw-r--r--Tools/Scripts/webkitpy/common/editdistance_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/find_files.py1
-rw-r--r--Tools/Scripts/webkitpy/common/find_files_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/common/host.py70
-rw-r--r--Tools/Scripts/webkitpy/common/host_mock.py12
-rw-r--r--Tools/Scripts/webkitpy/common/lru_cache.py1
-rw-r--r--Tools/Scripts/webkitpy/common/lru_cache_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/common/memoized_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/message_pool.py2
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/common/multiprocessing_bootstrap.py4
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bug.py11
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bug_unittest.py38
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py18
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py7
-rw-r--r--Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py22
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py6
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py28
-rw-r--r--Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py47
-rw-r--r--Tools/Scripts/webkitpy/common/net/credentials_unittest.py10
-rw-r--r--Tools/Scripts/webkitpy/common/net/failuremap_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/file_uploader.py1
-rw-r--r--Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/layouttestresults.py91
-rw-r--r--Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py109
-rw-r--r--Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/omahaproxy.py81
-rw-r--r--Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py139
-rw-r--r--Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/statusserver.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/statusserver_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/net/unittestresults_unittest.py10
-rw-r--r--Tools/Scripts/webkitpy/common/net/web_mock.py5
-rw-r--r--Tools/Scripts/webkitpy/common/newstringio.py1
-rw-r--r--Tools/Scripts/webkitpy/common/newstringio_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/common/prettypatch_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/common/read_checksum_from_png.py1
-rw-r--r--Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py9
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/common/system/autoinstall.py55
-rw-r--r--Tools/Scripts/webkitpy/common/system/crashlogs.py41
-rw-r--r--Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py222
-rw-r--r--Tools/Scripts/webkitpy/common/system/environment_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/executive.py109
-rw-r--r--Tools/Scripts/webkitpy/common/system/executive_mock.py11
-rw-r--r--Tools/Scripts/webkitpy/common/system/executive_unittest.py41
-rw-r--r--Tools/Scripts/webkitpy/common/system/file_lock.py1
-rw-r--r--Tools/Scripts/webkitpy/common/system/file_lock_integrationtest.py3
-rw-r--r--Tools/Scripts/webkitpy/common/system/file_lock_mock.py5
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem_mock.py4
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/common/system/filesystem_unittest.py14
-rw-r--r--Tools/Scripts/webkitpy/common/system/logtesting.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/logutils_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/outputcapture.py15
-rw-r--r--Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/common/system/outputtee_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/path_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/platforminfo.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py16
-rw-r--r--Tools/Scripts/webkitpy/common/system/profiler.py143
-rw-r--r--Tools/Scripts/webkitpy/common/system/profiler_unittest.py28
-rw-r--r--Tools/Scripts/webkitpy/common/system/stack_utils_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/common/system/user_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/workspace.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/workspace_mock.py2
-rw-r--r--Tools/Scripts/webkitpy/common/system/workspace_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/version_check.py1
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/filenamepattern_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py45
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py2
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py17
-rw-r--r--Tools/Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/common/webkit_finder.py2
-rw-r--r--Tools/Scripts/webkitpy/common/webkitunittest.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py149
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py57
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/manager.py482
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py156
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py31
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py9
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py13
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py44
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py25
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py22
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py111
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py157
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/result_summary.py82
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py12
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py49
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py27
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_failures.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_input.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_results.py15
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_results_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py260
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py135
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium.py455
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py721
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py296
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py171
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py118
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py129
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py107
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py223
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py68
-rwxr-xr-xTools/Scripts/webkitpy/layout_tests/port/chromium_win.py157
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py125
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/port/win.py99
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py15
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py317
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py711
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py10
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/layout_tests/servers/http_server.py12
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py65
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py (renamed from Tools/Scripts/make-gypi)62
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py2
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py41
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/buildbot_results.py167
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py99
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py1
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/printing.py237
-rw-r--r--Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py168
-rw-r--r--Tools/Scripts/webkitpy/performance_tests/perftest.py395
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py349
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py271
-rw-r--r--Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py562
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py621
-rw-r--r--Tools/Scripts/webkitpy/port/__init__.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/__init__.py)1
-rw-r--r--Tools/Scripts/webkitpy/port/apple.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/apple.py)28
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/port/base.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/base.py)161
-rw-r--r--Tools/Scripts/webkitpy/port/base_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py)70
-rw-r--r--Tools/Scripts/webkitpy/port/builders.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/builders.py)74
-rw-r--r--Tools/Scripts/webkitpy/port/builders_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/builders_unittest.py)5
-rw-r--r--Tools/Scripts/webkitpy/port/config.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/config.py)1
-rw-r--r--Tools/Scripts/webkitpy/port/config_standalone.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/config_standalone.py)1
-rw-r--r--Tools/Scripts/webkitpy/port/config_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py)8
-rw-r--r--Tools/Scripts/webkitpy/port/driver.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/driver.py)72
-rw-r--r--Tools/Scripts/webkitpy/port/driver_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py)14
-rw-r--r--Tools/Scripts/webkitpy/port/efl.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/efl.py)33
-rw-r--r--Tools/Scripts/webkitpy/port/efl_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py)15
-rw-r--r--Tools/Scripts/webkitpy/port/factory.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/factory.py)21
-rw-r--r--Tools/Scripts/webkitpy/port/factory_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py)51
-rw-r--r--Tools/Scripts/webkitpy/port/gtk.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/gtk.py)53
-rw-r--r--Tools/Scripts/webkitpy/port/gtk_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py)50
-rw-r--r--Tools/Scripts/webkitpy/port/http_lock.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/http_lock.py)11
-rw-r--r--Tools/Scripts/webkitpy/port/http_lock_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py)3
-rw-r--r--Tools/Scripts/webkitpy/port/image_diff.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/image_diff.py)3
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/port/image_diff_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/image_diff_unittest.py)6
-rw-r--r--Tools/Scripts/webkitpy/port/leakdetector.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/leakdetector.py)0
-rw-r--r--Tools/Scripts/webkitpy/port/leakdetector_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py)4
-rw-r--r--Tools/Scripts/webkitpy/port/mac.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/mac.py)91
-rw-r--r--Tools/Scripts/webkitpy/port/mac_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py)34
-rw-r--r--Tools/Scripts/webkitpy/port/mock_drt.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py)8
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/port/mock_drt_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py)11
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/port/port_testcase.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py)79
-rw-r--r--Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/pulseaudio_sanitizer.py)4
-rw-r--r--Tools/Scripts/webkitpy/port/pulseaudio_sanitizer_mock.py (renamed from Tools/Scripts/webkitpy/common/checkout/deps_mock.py)22
-rw-r--r--Tools/Scripts/webkitpy/port/qt.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/qt.py)52
-rw-r--r--Tools/Scripts/webkitpy/port/qt_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py)40
-rw-r--r--Tools/Scripts/webkitpy/port/server_process.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/server_process.py)2
-rw-r--r--Tools/Scripts/webkitpy/port/server_process_mock.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/server_process_mock.py)0
-rw-r--r--Tools/Scripts/webkitpy/port/server_process_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py)12
-rw-r--r--Tools/Scripts/webkitpy/port/test.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/test.py)50
-rw-r--r--Tools/Scripts/webkitpy/port/win.py284
-rw-r--r--Tools/Scripts/webkitpy/port/win_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py)19
-rw-r--r--Tools/Scripts/webkitpy/port/xvfbdriver.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver.py)15
-rw-r--r--Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py (renamed from Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py)16
-rw-r--r--Tools/Scripts/webkitpy/style/checker.py35
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/style/checker_unittest.py11
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/changelog.py2
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/cmake.py150
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py90
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/common_unittest.py5
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/cpp.py73
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py116
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py9
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/png_unittest.py5
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/python.py1
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/python_unittest.py19
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py16
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/test_expectations.py1
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py18
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/text_unittest.py9
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/xcodeproj.py2
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/style/checkers/xml_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/style/error_handlers_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/style/filereader_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/style/filter_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/style/main_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/style/optparser_unittest.py18
-rw-r--r--Tools/Scripts/webkitpy/style/patchreader_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/test/finder_unittest.py9
-rw-r--r--Tools/Scripts/webkitpy/test/main.py2
-rw-r--r--Tools/Scripts/webkitpy/test/main_unittest.py8
-rw-r--r--Tools/Scripts/webkitpy/test/printer.py27
-rw-r--r--Tools/Scripts/webkitpy/test/runner_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/test/skip_unittest.py5
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/__init__.py9
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/__init___unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py46
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py56
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py2
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py10
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py635
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py72
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py75
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py63
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py28
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py473
-rwxr-xr-xTools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py255
-rw-r--r--Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py168
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py6
-rw-r--r--Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py7
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/botinfo.py5
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/botinfo_unittest.py5
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py3
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py33
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py9
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/irc_command.py235
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py50
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py15
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py49
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py81
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/queueengine.py15
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py10
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/sheriff.py15
-rw-r--r--Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/__init__.py7
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py8
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py6
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py8
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/bugfortest.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/bugsearch.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/chromechannels.py104
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/chromechannels_unittest.py99
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/commandtest.py1
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/download.py60
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/download_unittest.py17
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py111
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py47
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/findusers.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/gardenomatic.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/newcommitbot.py172
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/newcommitbot_unittest.py129
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/openbugs.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/perfalizer_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queries.py94
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queries_unittest.py23
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues.py95
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues_unittest.py111
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queuestest.py6
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline.py28
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py96
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/roll.py74
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/roll_unittest.py63
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/sheriffbot.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py18
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/suggestnominations.py272
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/suggestnominations_unittest.py42
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/upload.py34
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/tool/comments.py0
-rwxr-xr-xTools/Scripts/webkitpy/tool/gcovr1029
-rw-r--r--Tools/Scripts/webkitpy/tool/grammar_unittest.py5
-rw-r--r--[-rwxr-xr-x]Tools/Scripts/webkitpy/tool/main.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/mocktool.py5
-rw-r--r--Tools/Scripts/webkitpy/tool/mocktool_unittest.py6
-rw-r--r--Tools/Scripts/webkitpy/tool/multicommandtool.py24
-rw-r--r--Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py23
-rw-r--r--Tools/Scripts/webkitpy/tool/servers/gardeningserver.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py4
-rw-r--r--Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py23
-rw-r--r--Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py8
-rw-r--r--Tools/Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/__init__.py5
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/build.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/checkstyle.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py12
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py30
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/commit.py16
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/commit_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/discardlocalchanges.py (renamed from Tools/Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py)28
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/discardlocalchanges_unittest.py97
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/haslanded.py120
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/haslanded_unittest.py299
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/options.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/preparechangelog.py60
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py94
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py24
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/runtests.py48
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py23
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/steps_unittest.py9
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py7
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/update.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/update_unittest.py26
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py2
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py77
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py15
-rw-r--r--Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py15
-rw-r--r--Tools/Scripts/webkitpy/w3c/__init__.py1
-rw-r--r--Tools/Scripts/webkitpy/w3c/test_converter.py193
-rw-r--r--Tools/Scripts/webkitpy/w3c/test_converter_unittest.py319
-rw-r--r--Tools/Scripts/webkitpy/w3c/test_importer.py450
-rw-r--r--Tools/Scripts/webkitpy/w3c/test_importer_unittest.py79
-rw-r--r--Tools/Scripts/webkitpy/w3c/test_parser.py162
-rw-r--r--Tools/Scripts/webkitpy/w3c/test_parser_unittest.py217
-rw-r--r--Tools/Scripts/webkitpy/webkitpy.pyproj538
-rw-r--r--Tools/Scripts/webkitpy/webkitpy.sln18
-rw-r--r--Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/fake-data-failing-expected.txt11
-rw-r--r--Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/pass-expected.txt0
-rw-r--r--Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Fail.h29
-rw-r--r--Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Pass.h6
-rwxr-xr-xTools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb74
-rw-r--r--Tools/TestResultServer/app.yaml2
-rw-r--r--Tools/TestResultServer/generate_builders_json.py22
-rw-r--r--Tools/TestResultServer/generate_builders_json_unittest.py54
-rw-r--r--Tools/TestResultServer/static-dashboards/aggregate_results.html245
-rw-r--r--Tools/TestResultServer/static-dashboards/aggregate_results.js273
-rw-r--r--Tools/TestResultServer/static-dashboards/builders.js147
-rw-r--r--Tools/TestResultServer/static-dashboards/builders.jsonp1489
-rw-r--r--Tools/TestResultServer/static-dashboards/dashboard_base.js783
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard.html3
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard.js504
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard_embedded_unittests.js2
-rw-r--r--Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js439
-rw-r--r--Tools/TestResultServer/static-dashboards/history.js307
-rw-r--r--Tools/TestResultServer/static-dashboards/history_unittests.js65
-rw-r--r--Tools/TestResultServer/static-dashboards/loader.js85
-rw-r--r--Tools/TestResultServer/static-dashboards/loader_unittests.js98
-rw-r--r--Tools/TestResultServer/static-dashboards/run-embedded-unittests.html8
-rw-r--r--Tools/TestResultServer/static-dashboards/run-unittests.html8
-rw-r--r--Tools/TestResultServer/static-dashboards/string.js69
-rw-r--r--Tools/TestResultServer/static-dashboards/timeline_explorer.html352
-rw-r--r--Tools/TestResultServer/static-dashboards/timeline_explorer.js480
-rw-r--r--Tools/TestResultServer/static-dashboards/treemap.html253
-rw-r--r--Tools/TestResultServer/static-dashboards/treemap.js287
-rw-r--r--Tools/TestResultServer/static-dashboards/ui.js225
-rw-r--r--Tools/TestWebKitAPI/CMakeLists.txt99
-rw-r--r--Tools/TestWebKitAPI/Configurations/Base.xcconfig15
-rw-r--r--Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig9
-rw-r--r--Tools/TestWebKitAPI/DerivedSources.pri12
-rw-r--r--Tools/TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h4
-rw-r--r--Tools/TestWebKitAPI/GNUmakefile.am170
-rw-r--r--Tools/TestWebKitAPI/InjectedBundle.pri56
-rw-r--r--Tools/TestWebKitAPI/PlatformEfl.cmake73
-rw-r--r--Tools/TestWebKitAPI/PlatformWebView.h13
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp165
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.gypi54
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.pri22
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.pro11
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln29
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj314
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters98
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props17
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props17
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebug.props13
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props15
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPostBuild.cmd (renamed from Tools/WinLauncher/WinLauncherPostBuild.cmd)0
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd (renamed from Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd)0
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props13
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props13
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props15
-rw-r--r--Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj360
-rw-r--r--Tools/TestWebKitAPI/Tests.pri3
-rw-r--r--Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm69
-rw-r--r--Tools/TestWebKitAPI/Tests/JavaScriptCore/JavaScriptCore.pro8
-rw-r--r--Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/InstanceMethodSwizzler.mm2
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/CString.cpp87
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp35
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/Deque.cpp106
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp173
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/MD5.cpp47
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp124
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp850
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/SHA1.cpp (renamed from Tools/DumpRenderTree/chromium/TestShellStub.cpp)24
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp62
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp444
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp3
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp62
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/WTF.pro32
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtrHashing.cpp12
-rw-r--r--Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp17
-rw-r--r--Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp254
-rw-r--r--Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp4
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/CloseThenTerminate.cpp (renamed from Tools/TestWebKitAPI/win/WindowMessageObserver.h)42
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp145
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls.cpp83
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp78
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/FindMatches.mm168
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp102
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp12
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm76
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp85
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp85
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp89
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp96
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp87
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp441
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/TerminateTwice.cpp (renamed from Tools/MiniBrowser/win/BrowserWindow.h)63
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/WebArchive.cpp6
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/WebKit2.pro63
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/WillLoad.cpp240
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp84
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/associate-form-controls.html31
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/custom-protocol-sync-xhr.html6
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp125
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp (renamed from Tools/wx/browser/browser.cpp)62
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/execCopy.html15
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/findRanges.html11
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/lots-of-text-vertical-lr.html3
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp72
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp2
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm58
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp (renamed from Tools/MiniBrowser/win/MiniBrowser.h)50
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm56
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm57
-rw-r--r--Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp64
-rw-r--r--Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp23
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm2
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/AttributedString.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm6
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm84
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm6
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm77
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellElementCellAbove.html30
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm61
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm6
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm6
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm2
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm2
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm73
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache1.html10
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache2.html10
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm96
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm8
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/OpenNewWindow.html7
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm2
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/PublicSuffix.mm79
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm6
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm16
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm6
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.html1
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm73
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm4
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm287
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm83
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm74
-rw-r--r--Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm4
-rw-r--r--Tools/TestWebKitAPI/config.h14
-rw-r--r--Tools/TestWebKitAPI/efl/PlatformWebView.cpp34
-rw-r--r--Tools/TestWebKitAPI/ios/mainIOS.mm (renamed from Tools/MiniBrowser/win/stdafx.cpp)19
-rw-r--r--Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm2
-rw-r--r--Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm5
-rw-r--r--Tools/TestWebKitAPI/mac/TestProtocol.h (renamed from Tools/MiniBrowser/win/stdafx.h)15
-rw-r--r--Tools/TestWebKitAPI/mac/TestProtocol.mm (renamed from Tools/MiniBrowser/win/BrowserView.h)54
-rw-r--r--Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm6
-rw-r--r--Tools/TestWebKitAPI/mac/mainMac.mm (renamed from Tools/TestWebKitAPI/mac/main.mm)0
-rw-r--r--Tools/TestWebKitAPI/qt/InjectedBundleControllerQt.cpp (renamed from Tools/TestWebKitAPI/win/InjectedBundleControllerWin.cpp)2
-rw-r--r--Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp73
-rw-r--r--Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp151
-rw-r--r--Tools/TestWebKitAPI/qt/main.cpp70
-rw-r--r--Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp123
-rw-r--r--Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp147
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPI.sln66
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj751
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj82
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops14
-rw-r--r--Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj471
-rwxr-xr-xTools/TestWebKitAPI/win/copy-resources.cmd31
-rw-r--r--Tools/TestWebKitAPI/win/main.cpp16
-rw-r--r--Tools/Tools.pro10
-rw-r--r--Tools/WebKitLauncher/Configurations/Base.xcconfig10
-rw-r--r--Tools/WebKitLauncher/Configurations/WebKitLauncher.xcconfig1
-rw-r--r--Tools/WebKitLauncher/Info.plist8
-rw-r--r--Tools/WebKitLauncher/Makefile3
-rw-r--r--Tools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj11
-rw-r--r--Tools/WebKitLauncher/WebKitLauncherURLProtocol.m34
-rw-r--r--Tools/WebKitLauncher/WebKitNightlyEnablerSparkle.m17
-rw-r--r--Tools/WebKitLauncher/main.m34
-rw-r--r--Tools/WebKitLauncher/start.html30
-rw-r--r--Tools/WebKitLauncherWin/Resource.h19
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWin.cpp99
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWin.rc70
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj426
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinCommon.vsprops13
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops8
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops8
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops8
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops8
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops8
-rw-r--r--Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/WebKitLauncherWin/webkit.icobin82726 -> 0 bytes
-rw-r--r--Tools/WebKitTestRunner/CMakeLists.txt53
-rw-r--r--Tools/WebKitTestRunner/EventSenderProxy.h4
-rw-r--r--Tools/WebKitTestRunner/GNUmakefile.am12
-rw-r--r--Tools/WebKitTestRunner/GeolocationProviderMock.cpp5
-rw-r--r--Tools/WebKitTestRunner/GeolocationProviderMock.h1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp7
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp11
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h22
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl6
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl99
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm11
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl29
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/GCController.idl2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl156
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl4
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp31
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp42
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h17
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp764
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h18
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp178
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/TestRunner.h43
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp68
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp422
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp23
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp (renamed from Tools/DumpRenderTree/wx/WorkQueueItemWx.cpp)39
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h (renamed from Tools/DumpRenderTree/wx/DumpRenderTreeWx.h)16
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp14
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm15
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm7
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm167
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm23
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm10
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm8
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm2
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp1
-rw-r--r--Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp7
-rw-r--r--Tools/WebKitTestRunner/PlatformEfl.cmake53
-rw-r--r--Tools/WebKitTestRunner/PlatformWebView.h12
-rw-r--r--Tools/WebKitTestRunner/TestController.cpp196
-rw-r--r--Tools/WebKitTestRunner/TestController.h35
-rw-r--r--Tools/WebKitTestRunner/TestInvocation.cpp147
-rw-r--r--Tools/WebKitTestRunner/TestInvocation.h12
-rw-r--r--Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj120
-rw-r--r--Tools/WebKitTestRunner/WebNotificationProvider.cpp5
-rw-r--r--Tools/WebKitTestRunner/WebNotificationProvider.h1
-rw-r--r--Tools/WebKitTestRunner/WorkQueueManager.cpp1
-rw-r--r--Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.cpp212
-rw-r--r--Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.h (renamed from Tools/DumpRenderTree/wx/GCControllerWx.cpp)34
-rw-r--r--Tools/WebKitTestRunner/cg/TestInvocationCG.cpp14
-rw-r--r--Tools/WebKitTestRunner/config.h2
-rw-r--r--Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp18
-rw-r--r--Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp39
-rw-r--r--Tools/WebKitTestRunner/efl/TestControllerEfl.cpp5
-rw-r--r--Tools/WebKitTestRunner/efl/main.cpp8
-rw-r--r--Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp11
-rw-r--r--Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp9
-rw-r--r--Tools/WebKitTestRunner/mac/EventSenderProxy.mm67
-rw-r--r--Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm47
-rw-r--r--Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm77
-rw-r--r--Tools/WebKitTestRunner/mac/main.mm4
-rw-r--r--Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp18
-rw-r--r--Tools/WebKitTestRunner/qt/TestInvocationQt.cpp1
-rw-r--r--Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp6
-rw-r--r--Tools/WebKitTestRunner/win/TestControllerWin.cpp10
-rw-r--r--Tools/WinCELauncher/CMakeLists.txt20
-rw-r--r--Tools/WinLauncher/AccessibilityDelegate.cpp73
-rw-r--r--Tools/WinLauncher/AccessibilityDelegate.h (renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h)43
-rw-r--r--Tools/WinLauncher/WinLauncher.cpp49
-rw-r--r--Tools/WinLauncher/WinLauncher.vcproj502
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.exe.manifest45
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.ico (renamed from Tools/WinLauncher/WinLauncher.ico)bin23558 -> 23558 bytes
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.rc (renamed from Tools/WinLauncher/WinLauncherLauncher.rc)152
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj183
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters33
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCF.props12
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props12
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props12
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props8
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc (renamed from Tools/WinLauncher/WinLauncher.rc)4
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj217
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters66
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props16
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props8
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd1
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd (renamed from Tools/WinLauncher/WinLauncherPreBuild.cmd)0
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props12
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props8
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h28
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd1
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd6
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props12
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props8
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherResource.h (renamed from Tools/WinLauncher/WinLauncherLauncherResource.h)40
-rw-r--r--Tools/WinLauncher/WinLauncher.vcxproj/small.ico (renamed from Tools/WinLauncher/small.ico)bin23558 -> 23558 bytes
-rw-r--r--Tools/WinLauncher/WinLauncherCommon.vsprops17
-rw-r--r--Tools/WinLauncher/WinLauncherDebug.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherDebugAll.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherLauncher.vcproj420
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherCommon.vsprops13
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherDebug.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherDebugAll.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherDebugCairoCFLite.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherProduction.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherRelease.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherLauncherReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherProduction.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherRelease.vsprops8
-rw-r--r--Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/WinLauncher/stdafx.h8
-rw-r--r--Tools/clang/ReportMemoryUsagePlugin/CMakeLists.txt2
-rw-r--r--Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp214
-rwxr-xr-xTools/efl/install-dependencies75
-rw-r--r--Tools/efl/jhbuild.modules239
-rw-r--r--Tools/efl/jhbuildrc15
-rw-r--r--Tools/efl/patches/harfbuzz-icu-detection-fix.patch36
-rwxr-xr-xTools/efl/run-with-jhbuild25
-rw-r--r--Tools/gdb/webkit.py6
-rw-r--r--Tools/gtk/common.py23
-rwxr-xr-xTools/gtk/generate-feature-defines-files58
-rwxr-xr-xTools/gtk/generate-gtkdoc42
-rw-r--r--Tools/gtk/gtkdoc.py14
-rwxr-xr-xTools/gtk/install-dependencies188
-rw-r--r--Tools/gtk/jhbuild-optional.modules19
-rw-r--r--Tools/gtk/jhbuild.modules187
-rw-r--r--Tools/gtk/jhbuildrc31
-rw-r--r--Tools/gtk/patches/at-spi2-atk-2.8.0-null-check-after-cleanup.patch22
-rw-r--r--Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch39
-rw-r--r--Tools/gtk/patches/libxml2-2.9.0-dtd.patch27
-rw-r--r--Tools/gtk/patches/xserver-fix-glx-init.patch14
-rw-r--r--Tools/gtk/patches/xserver-remove-bogus-dependencies.patch43
-rwxr-xr-xTools/gtk/run-with-jhbuild33
-rwxr-xr-xTools/jhbuild/jhbuild-wrapper2
-rw-r--r--Tools/jhbuild/jhbuildutils.py4
-rw-r--r--Tools/lldb/lldb_webkit.py127
-rw-r--r--Tools/qmake/mkspecs/features/configure.prf2
-rw-r--r--Tools/qmake/mkspecs/features/default_post.prf82
-rw-r--r--Tools/qmake/mkspecs/features/default_pre.prf6
-rw-r--r--Tools/qmake/mkspecs/features/features.prf27
-rw-r--r--Tools/qmake/mkspecs/features/features.pri24
-rw-r--r--Tools/qmake/mkspecs/features/functions.prf8
-rw-r--r--Tools/qmake/mkspecs/features/unix/default_post.prf4
-rw-r--r--Tools/qmake/mkspecs/features/unix/default_pre.prf5
-rw-r--r--Tools/qmake/mkspecs/features/webkit_modules.prf2
-rw-r--r--Tools/qmake/mkspecs/modules/webkit2qml.prf9
-rw-r--r--Tools/record-memory-win/record-memory-win-common.vsprops11
-rw-r--r--Tools/record-memory-win/record-memory-win.vcproj414
-rw-r--r--Tools/record-memory-win/record-memory-winDebug.vsprops8
-rw-r--r--Tools/record-memory-win/record-memory-winDebugAll.vsprops8
-rw-r--r--Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops8
-rw-r--r--Tools/record-memory-win/record-memory-winProduction.vsprops8
-rw-r--r--Tools/record-memory-win/record-memory-winRelease.vsprops8
-rw-r--r--Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops8
-rw-r--r--Tools/svn-config11
-rw-r--r--Tools/waf/build/build_utils.py249
-rw-r--r--Tools/waf/build/settings.py514
-rw-r--r--Tools/waf/build/waf_extensions.py102
-rw-r--r--Tools/waf/build/wxpresets.py128
-rw-r--r--Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj131
-rw-r--r--Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters7
-rwxr-xr-xTools/win/AssembleBuildLogs/AssembleLogs.cmd174
-rw-r--r--Tools/win/AssembleBuildLogs/README10
-rw-r--r--Tools/win/DLLLauncher/DLLLauncherMain.cpp3
-rw-r--r--Tools/win/record-memory/main.cpp (renamed from Tools/record-memory-win/main.cpp)426
-rw-r--r--Tools/win/record-memory/record-memory.vcxproj275
-rw-r--r--Tools/win/record-memory/record-memory.vcxproj.filters6
-rw-r--r--Tools/win/record-memory/record-memoryCommon.props13
-rw-r--r--Tools/win/record-memory/record-memoryDebug.props13
-rw-r--r--Tools/win/record-memory/record-memoryDebugWinCairo.props13
-rw-r--r--Tools/win/record-memory/record-memoryProduction.props13
-rw-r--r--Tools/win/record-memory/record-memoryRelease.props13
-rw-r--r--Tools/win/record-memory/record-memoryReleaseWinCairo.props13
-rw-r--r--Tools/wx/browser/wscript55
-rwxr-xr-xTools/wx/install-unix-extras234
-rw-r--r--Tools/wx/packaging/build-debian-installer.py36
-rw-r--r--Tools/wx/packaging/build-mac-installer.py188
-rw-r--r--Tools/wx/packaging/build-win-installer.py110
-rw-r--r--Tools/wx/packaging/debian/changelog1
-rw-r--r--Tools/wx/packaging/debian/compat1
-rw-r--r--Tools/wx/packaging/debian/control29
-rw-r--r--Tools/wx/packaging/debian/copyright18
-rw-r--r--Tools/wx/packaging/debian/python-webkitwx.install1
-rw-r--r--Tools/wx/packaging/debian/rules75
-rw-r--r--Tools/wx/packaging/wxWebKitInstaller.iss.in79
1243 files changed, 84013 insertions, 73498 deletions
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/committer_auth.py b/Tools/BuildSlaveSupport/build.webkit.org-config/committer_auth.py
index 6f4d3600d..cf123a283 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/committer_auth.py
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/committer_auth.py
@@ -27,7 +27,7 @@ import buildbot.status.web.auth
import json
import zope.interface
-from webkitpy.common.net.htdigestparser import HTDigestParser
+from htdigestparser import HTDigestParser
class Error(Exception):
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/config.json b/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
index 012813a7c..841feeead 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/config.json
@@ -1,12 +1,10 @@
{
"slaves": [ { "name": "test-slave", "platform": "*" },
-
- { "name": "apple-macpro-3", "platform": "mac-lion" },
{ "name": "apple-macpro-4", "platform": "mac-lion" },
- { "name": "apple-macpro-5", "platform": "mac-lion" },
+ { "name": "apple-macpro-5", "platform": "mac-lion" },
{ "name": "apple-macpro-6", "platform": "mac-lion" },
- { "name": "apple-macpro-8", "platform": "mac-lion" },
+ { "name": "apple-macpro-8", "platform": "mac-lion" },
{ "name": "apple-xserve-2", "platform": "mac-lion" },
{ "name": "apple-xserve-3", "platform": "mac-lion" },
{ "name": "apple-xserve-10", "platform": "mac-lion" },
@@ -22,24 +20,22 @@
{ "name": "apple-mini-208", "platform": "mac-mountainlion"},
{ "name": "apple-mini-209", "platform": "mac-mountainlion"},
{ "name": "apple-mini-210", "platform": "mac-mountainlion"},
-
+ { "name": "apple-mini-218", "platform": "mac-mountainlion"},
+
{ "name": "apple-windows-1", "platform": "win"},
{ "name": "apple-windows-2", "platform": "win"},
{ "name": "apple-windows-3", "platform": "win"},
{ "name": "apple-windows-4", "platform": "win"},
{ "name": "apple-windows-5", "platform": "win"},
{ "name": "apple-windows-6", "platform": "win"},
- { "name": "apple-windows-13", "platform": "win"},
- { "name": "apple-windows-14", "platform": "win"},
- { "name": "apple-windows-15", "platform": "win"},
{ "name": "gtk-linux-slave-1", "platform": "gtk"},
{ "name": "gtk-linux-slave-2", "platform": "gtk"},
{ "name": "gtk-linux-slave-3", "platform": "gtk"},
{ "name": "gtk-linux-slave-4", "platform": "gtk"},
- { "name": "szeged-linux-1", "platform": "qt-4.8"},
- { "name": "szeged-linux-2", "platform": "qt-4.8"},
+ { "name": "szeged-linux-1", "platform": "qt-5.0-wk1"},
+ { "name": "szeged-linux-2", "platform": "qt-5.0-wk1"},
{ "name": "szeged-linux-3", "platform": "qt-5.0-wk1"},
{ "name": "szeged-linux-4", "platform": "qt-arm"},
{ "name": "szeged-linux-5", "platform": "qt-5.0-wk2"},
@@ -47,39 +43,22 @@
{ "name": "szeged-windows-1", "platform": "qt-win"},
{ "name": "szeged-windows-2", "platform": "qt-win"},
- { "name": "indt-mountainlion", "platform": "qt-mac"},
-
- { "name": "google-windows-1", "platform": "chromium-win" },
- { "name": "google-windows-2", "platform": "chromium-win" },
- { "name": "google-windows-perf", "platform": "chromium-win" },
- { "name": "google-mac-1", "platform": "chromium-mac" },
- { "name": "google-mac-2", "platform": "chromium-mac" },
- { "name": "google-mac-3", "platform": "chromium-mac" },
- { "name": "google-mac-4", "platform": "chromium-mac" },
- { "name": "google-mac-perf", "platform": "chromium-mac" },
- { "name": "google-linux-1", "platform": "chromium-linux" },
- { "name": "google-linux-2", "platform": "chromium-linux" },
- { "name": "google-linux-perf", "platform": "chromium-linux" },
- { "name": "google-linux-android", "platform": "chromium-android" },
- { "name": "google-android-tests", "platform": "chromium-android" },
+ { "name": "oslo-mountainlion", "platform": "qt-5.0-mac-wk2"},
{ "name": "wincairo-1", "platform": "wincairo" },
{ "name": "wince-1", "platform": "wince" },
-
+
{ "name": "efl-linux-slave-1", "platform": "efl" },
{ "name": "efl-linux-slave-2", "platform": "efl" },
{ "name": "efl-linux-slave-3", "platform": "efl" },
- { "name": "efl-linux-slave-4", "platform": "efl" },
- { "name": "mips-1", "platform": "qt-mipsel"}
+ { "name": "mips-1", "platform": "qt-mipsel"},
+
+ { "name": "sh4-linux-1", "platform": "qt-sh4"}
],
- "builders": [ { "name": "Apple Lion (Leaks)", "type": "BuildAndTestLeaks", "builddir": "lion-leaks",
- "platform": "mac-lion", "configuration": "debug", "architectures": ["x86_64"],
- "slavenames": ["apple-macpro-3"]
- },
- { "name": "Apple Lion Debug (Build)", "type": "Build", "builddir": "lion-debug",
+ "builders": [ { "name": "Apple Lion Debug (Build)", "type": "Build", "builddir": "lion-debug",
"platform": "mac-lion", "configuration": "debug", "architectures": ["x86_64"],
"triggers": ["lion-debug-tests-wk1", "lion-debug-tests-wk2"],
"slavenames": ["apple-xserve-2", "apple-xserve-10"]
@@ -110,13 +89,13 @@
"platform": "mac-lion", "configuration": "release", "architectures": ["x86_64"],
"slavenames": ["apple-xserve-11"]
},
- { "name": "Apple MountainLion (Leaks)", "type": "BuildAndTestLeaks", "builddir": "mountainlion-leaks",
+ { "name": "Apple MountainLion (Leaks)", "type": "TestLeaks", "builddir": "mountainlion-leaks",
"platform": "mac-mountainlion", "configuration": "debug", "architectures": ["x86_64"],
"slavenames": ["apple-mini-201"]
},
{ "name": "Apple MountainLion Debug (Build)", "type": "Build", "builddir": "mountainlion-debug",
"platform": "mac-mountainlion", "configuration": "debug", "architectures": ["x86_64"],
- "triggers": ["mountainlion-debug-tests-wk1", "mountainlion-debug-tests-wk2"],
+ "triggers": ["mountainlion-debug-tests-wk1", "mountainlion-debug-tests-wk2", "mountainlion-leaks"],
"slavenames": ["apple-mini-202", "apple-mini-203"]
},
{ "name": "Apple MountainLion Release (Build)", "type": "Build", "builddir": "mountainlion-release",
@@ -124,6 +103,10 @@
"triggers": ["mountainlion-release-tests-wk1", "mountainlion-release-tests-wk2", "mountainlion-release-perf"],
"slavenames": ["apple-mini-204"]
},
+ { "name": "Apple MountainLion Release (32-bit Build)", "type": "Build", "builddir": "mountainlion-32bit-release",
+ "platform": "mac-mountainlion", "configuration": "release", "architectures": ["i386"],
+ "slavenames": ["apple-mini-218"]
+ },
{ "name": "Apple MountainLion Debug WK1 (Tests)", "type": "Test", "builddir": "mountainlion-debug-tests-wk1",
"platform": "mac-mountainlion", "configuration": "debug", "architectures": ["x86_64"],
"slavenames": ["apple-mini-205"]
@@ -163,12 +146,12 @@
"slavenames": ["apple-windows-1"]
},
{
- "name": "Apple Win XP Debug (Tests)", "type": "Test", "builddir": "win-debug-tests",
+ "name": "Apple Win 7 Debug (Tests)", "type": "Test", "builddir": "win-debug-tests",
"platform": "win", "configuration": "debug", "architectures": ["i386"],
- "slavenames": ["apple-windows-3", "apple-windows-4", "apple-windows-13", "apple-windows-14", "apple-windows-15"]
+ "slavenames": ["apple-windows-3", "apple-windows-4"]
},
{
- "name": "GTK Linux 32-bit Release", "type": "BuildAndTest", "builddir": "gtk-linux-32-release",
+ "name": "GTK Linux 32-bit Release", "type": "BuildAndAPITest", "builddir": "gtk-linux-32-release",
"platform": "gtk", "configuration": "release", "architectures": ["i386"],
"slavenames": ["gtk-linux-slave-1"]
},
@@ -179,7 +162,7 @@
"slavenames": ["gtk-linux-slave-2"]
},
{
- "name": "GTK Linux 64-bit Debug", "type": "BuildAndTest", "builddir": "gtk-linux-64-debug",
+ "name": "GTK Linux 64-bit Debug WK1", "type": "BuildAndTestWebKit1Only", "builddir": "gtk-linux-64-debug-wk1",
"platform": "gtk", "configuration": "debug", "architectures": ["x86_64"],
"slavenames": ["gtk-linux-slave-3"]
},
@@ -190,14 +173,14 @@
},
{
"name": "Qt Linux Release", "type": "BuildAndTest", "builddir": "qt-linux-release",
- "platform": "qt-4.8", "configuration": "release", "architectures": ["i386"],
+ "platform": "qt-5.0-wk1", "configuration": "release", "architectures": ["i386"],
"SVNMirror": "svn://webkit.inf.u-szeged.hu/webkit/",
"slavenames": ["szeged-linux-1"]
},
{
"name": "Qt Linux Release minimal", "type": "Build", "builddir": "qt-linux-release-minimal",
"SVNMirror": "svn://webkit.inf.u-szeged.hu/webkit/",
- "platform": "qt-4.8", "configuration": "release", "architectures": ["i386"],
+ "platform": "qt-5.0-wk1", "configuration": "release", "architectures": ["i386"],
"slavenames": ["szeged-linux-2"]
},
{
@@ -224,6 +207,11 @@
"slavenames": ["mips-1"]
},
{
+ "name": "Qt Linux SH4 Release", "type": "Build", "builddir": "qt-linux-sh4-release",
+ "platform": "qt-sh4", "configuration": "release", "architectures": ["sh4"],
+ "slavenames": ["sh4-linux-1"]
+ },
+ {
"name": "Qt Windows 32-bit Release", "type": "Build", "builddir": "qt-windows-32bit-release",
"SVNMirror": "svn://webkit.inf.u-szeged.hu/webkit/",
"platform": "qt-win", "configuration": "release", "architectures": ["i386"],
@@ -236,67 +224,9 @@
"slavenames": ["szeged-windows-2"]
},
{
- "name": "Qt Mountain Lion Release", "type": "Build", "builddir": "qt-mountainlion-release",
- "platform": "qt-mac", "configuration": "release", "architectures": ["x86_64"],
- "slavenames": ["indt-mountainlion"]
- },
- {
- "name": "Chromium Win Release", "type": "Build", "builddir": "chromium-win-release",
- "platform": "chromium-win", "configuration": "release", "architectures": ["i386"],
- "triggers": ["chromium-win-release-tests", "chromium-win-perf-tests"],
- "slavenames": ["google-windows-1"]
- },
- {
- "name": "Chromium Win Release (Tests)", "type": "Test", "builddir": "chromium-win-release-tests",
- "platform": "chromium-win", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-windows-2"]
- },
- {
- "name": "Chromium Win Release (Perf)", "type": "DownloadAndPerfTest", "builddir": "chromium-win-perf-tests",
- "platform": "chromium-win", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-windows-perf"]
- },
- {
- "name": "Chromium Mac Release", "type": "Build", "builddir": "chromium-mac-release",
- "platform": "chromium-mac", "configuration": "release", "architectures": ["i386"],
- "triggers": ["chromium-mac-release-tests", "chromium-mac-perf-tests"],
- "slavenames": ["google-mac-1", "google-mac-3"]
- },
- {
- "name": "Chromium Mac Release (Tests)", "type": "Test", "builddir": "chromium-mac-release-tests",
- "platform": "chromium-mac", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-mac-2", "google-mac-4"]
- },
- {
- "name": "Chromium Mac Release (Perf)", "type": "DownloadAndPerfTest", "builddir": "chromium-mac-perf-tests",
- "platform": "chromium-mac", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-mac-perf"]
- },
- {
- "name": "Chromium Linux Release", "type": "Build", "builddir": "chromium-linux-release",
- "platform": "chromium-linux", "configuration": "release", "architectures": ["i386"],
- "triggers": ["chromium-linux-release-tests", "chromium-linux-perf-tests"],
- "slavenames": ["google-linux-1"]
- },
- {
- "name": "Chromium Linux Release (Tests)", "type": "Test", "builddir": "chromium-linux-release-tests",
- "platform": "chromium-linux", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-linux-2"]
- },
- {
- "name": "Chromium Linux Release (Perf)", "type": "DownloadAndPerfTest", "builddir": "chromium-linux-perf-tests",
- "platform": "chromium-linux", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-linux-perf"]
- },
- {
- "name": "Chromium Android Release", "type": "Build", "builddir": "chromium-linux-android",
- "platform": "chromium-android", "configuration": "release", "architectures": ["i386"],
- "triggers": ["chromium-android-release-tests"], "slavenames": ["google-linux-android"]
- },
- {
- "name": "Chromium Android Release (Tests)", "type": "Test", "builddir": "chromium-android-release-tests",
- "platform": "chromium-android", "configuration": "release", "architectures": ["i386"],
- "slavenames": ["google-android-tests"]
+ "name": "Qt Mountain Lion Release", "type": "BuildAndTestWebKit2", "builddir": "qt-mountainlion-release",
+ "platform": "qt-5.0-mac-wk2", "configuration": "release", "architectures": ["x86_64"],
+ "slavenames": ["oslo-mountainlion"]
},
{
"name": "WinCairo Release", "type": "BuildAndTest", "builddir": "win-cairo-release",
@@ -309,21 +239,16 @@
"slavenames": ["wince-1"]
},
{
- "name": "EFL Linux 64-bit Release", "type": "BuildAndTest", "builddir": "efl-linux-64-release",
+ "name": "EFL Linux 64-bit Release WK1", "type": "BuildAndTestWebKit1Only", "builddir": "efl-linux-64-release-wk1",
"platform": "efl", "configuration": "release", "architectures": ["x86_64"],
"slavenames": ["efl-linux-slave-1"]
},
{
- "name": "EFL Linux 64-bit Release WK2", "type": "BuildAndTestWebKit2", "builddir": "efl-linux-64-release-wk2",
+ "name": "EFL Linux 64-bit Release WK2", "type": "BuildAndTestWebKit2Only", "builddir": "efl-linux-64-release-wk2",
"platform": "efl", "configuration": "release", "architectures": ["x86_64"],
"slavenames": ["efl-linux-slave-2"]
},
{
- "name": "EFL Linux 64-bit Debug WK2", "type": "BuildAndTestWebKit2", "builddir": "efl-linux-64-debug-wk2",
- "platform": "efl", "configuration": "debug", "architectures": ["x86_64"],
- "slavenames": ["efl-linux-slave-4"]
- },
- {
"name": "EFL Linux 32-bit Release (Build)", "type": "Build", "builddir": "efl-linux-32-release",
"platform": "efl", "configuration": "release", "architectures": ["i386"],
"slavenames": ["efl-linux-slave-3"]
@@ -331,20 +256,19 @@
],
"schedulers": [ { "type": "AnyBranchScheduler", "name": "trunk", "change_filter": "trunk_filter", "treeStableTimer": 45.0,
- "builderNames": ["GTK Linux 32-bit Release", "GTK Linux 64-bit Release", "GTK Linux 64-bit Debug",
+ "builderNames": ["GTK Linux 32-bit Release", "GTK Linux 64-bit Release", "GTK Linux 64-bit Debug WK1",
"Qt Linux Release", "Qt Linux Release minimal", "Qt Linux 64-bit Release (Perf)",
"Qt Linux 64-bit Release (WebKit2 Perf)", "Qt Linux ARMv7 Release", "Qt Linux MIPS32R2 LE Release",
+ "Qt Linux SH4 Release",
"Qt Windows 32-bit Release", "Qt Windows 32-bit Debug", "Qt Mountain Lion Release",
- "Chromium Win Release", "Chromium Mac Release", "Chromium Linux Release",
- "Chromium Android Release",
- "EFL Linux 64-bit Release", "EFL Linux 64-bit Release WK2", "EFL Linux 32-bit Release (Build)", "EFL Linux 64-bit Debug WK2",
+ "EFL Linux 64-bit Release WK1", "EFL Linux 64-bit Release WK2", "EFL Linux 32-bit Release (Build)",
"WinCairo Release", "WinCE Release (Build)"]
},
{ "type": "PlatformSpecificScheduler", "platform": "mac-lion", "branch": "trunk", "treeStableTimer": 45.0,
- "builderNames": ["Apple Lion Release (Build)", "Apple Lion Debug (Build)", "Apple Lion (Leaks)"]
+ "builderNames": ["Apple Lion Release (Build)", "Apple Lion Debug (Build)"]
},
{ "type": "PlatformSpecificScheduler", "platform": "mac-mountainlion", "branch": "trunk", "treeStableTimer": 45.0,
- "builderNames": ["Apple MountainLion Release (Build)", "Apple MountainLion Debug (Build)", "Apple MountainLion (Leaks)"]
+ "builderNames": ["Apple MountainLion Release (Build)", "Apple MountainLion Debug (Build)", "Apple MountainLion Release (32-bit Build)"]
},
{ "type": "PlatformSpecificScheduler", "platform": "win", "branch": "trunk", "treeStableTimer": 45.0,
"builderNames": ["Apple Win Release (Build)", "Apple Win Debug (Build)"]
@@ -379,32 +303,14 @@
{ "type": "Triggerable", "name": "mountainlion-debug-tests-wk2",
"builderNames": ["Apple MountainLion Debug WK2 (Tests)"]
},
+ { "type": "Triggerable", "name": "mountainlion-leaks",
+ "builderNames": ["Apple MountainLion (Leaks)"]
+ },
{ "type": "Triggerable", "name": "win-release-tests",
"builderNames": ["Apple Win 7 Release (Tests)"]
},
{ "type": "Triggerable", "name": "win-debug-tests",
- "builderNames": ["Apple Win XP Debug (Tests)"]
- },
- { "type": "Triggerable", "name": "chromium-win-release-tests",
- "builderNames": ["Chromium Win Release (Tests)"]
- },
- { "type": "Triggerable", "name": "chromium-win-perf-tests",
- "builderNames": ["Chromium Win Release (Perf)"]
- },
- { "type": "Triggerable", "name": "chromium-mac-release-tests",
- "builderNames": ["Chromium Mac Release (Tests)"]
- },
- { "type": "Triggerable", "name": "chromium-mac-perf-tests",
- "builderNames": ["Chromium Mac Release (Perf)"]
- },
- { "type": "Triggerable", "name": "chromium-linux-release-tests",
- "builderNames": ["Chromium Linux Release (Tests)"]
- },
- { "type": "Triggerable", "name": "chromium-linux-perf-tests",
- "builderNames": ["Chromium Linux Release (Perf)"]
- },
- { "type": "Triggerable", "name": "chromium-android-release-tests",
- "builderNames": ["Chromium Android Release (Tests)"]
+ "builderNames": ["Apple Win 7 Debug (Tests)"]
},
{ "type": "Triggerable", "name": "gtk-linux-64-release-tests-wk2",
"builderNames": ["GTK Linux 64-bit Release WK2 (Tests)"]
diff --git a/Tools/Scripts/webkitpy/common/net/htdigestparser.py b/Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser.py
index ee7d5405d..ee7d5405d 100644
--- a/Tools/Scripts/webkitpy/common/net/htdigestparser.py
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser.py
diff --git a/Tools/Scripts/webkitpy/common/net/htdigestparser_unittest.py b/Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser_unittest.py
index a2a4ac938..c689273cb 100644
--- a/Tools/Scripts/webkitpy/common/net/htdigestparser_unittest.py
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser_unittest.py
@@ -22,9 +22,9 @@
import StringIO
import os
-import unittest
+import unittest2 as unittest
-from webkitpy.common.net.htdigestparser import HTDigestParser
+from htdigestparser import HTDigestParser
class HTDigestParserTest(unittest.TestCase):
@@ -80,3 +80,12 @@ user2:realm 2:14f827686fa97778f02fe1314a3337c8
user3:realm 1:1817fc8a24119cc57fbafc8a630ea5a5
user3:realm 3:a05f5a2335e9d87bbe75bbe5e53248f0
""")
+
+
+# FIXME: We should run this file as part of test-rm .
+# Unfortunately test-rm currently requires that unittests
+# be located in a directory with a valid module name.
+# 'build.webkit.org-config' is not a valid module name (due to '.' and '-')
+# so for now this is a stand-alone test harness.
+if __name__ == '__main__':
+ unittest.main()
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
index ae4df92f1..a3ebf2a2e 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg
@@ -21,7 +21,7 @@ import operator
import urllib
from committer_auth import CommitterAuth
-from webkitpy.common.config import build as wkbuild
+import wkbuild
c = BuildmasterConfig = {}
@@ -42,8 +42,9 @@ authz = Authz(
cleanShutdown=False)
c['status'] = []
-c['status'].append(html.WebStatus(http_port=8710,
+c['status'].append(html.WebStatus(http_port=8710,
revlink="http://trac.webkit.org/changeset/%s",
+ changecommentlink=(r"(https://bugs\.webkit\.org/show_bug\.cgi\?id=|webkit\.org/b/)(\d+)", r"https://bugs.webkit.org/show_bug.cgi?id=\2"),
authz=authz))
c['slavePortnum'] = 17000
@@ -141,6 +142,12 @@ class KillOldProcesses(shell.Compile):
descriptionDone = ["killed old processes"]
command = ["python", "./Tools/BuildSlaveSupport/kill-old-processes"]
+class DeleteStaleBuildFiles(shell.Compile):
+ name = "delete stale build files"
+ description = ["deleting stale build files"]
+ descriptionDone = ["delete stale build files"]
+ command = ["python", "./Tools/BuildSlaveSupport/delete-stale-build-files", WithProperties("--platform=%(fullPlatform)s"), WithProperties("--%(configuration)s")]
+
class InstallEflDependencies(shell.ShellCommand):
name = "jhbuild"
description = ["updating efl dependencies"]
@@ -155,39 +162,10 @@ class InstallGtkDependencies(shell.ShellCommand):
command = ["perl", "./Tools/Scripts/update-webkitgtk-libs"]
haltOnFailure = True
-class InstallChromiumDependencies(shell.ShellCommand):
- name = "gclient"
- description = ["updating chromium dependencies"]
- descriptionDone = ["updated chromium dependencies"]
- command = ["perl", "./Tools/Scripts/update-webkit-chromium", "--force"]
- haltOnFailure = True
- def start(self):
- if self.getProperty('fullPlatform') == "chromium-android":
- self.setCommand(self.command + ['--chromium-android'])
-
- return shell.ShellCommand.start(self)
-
-class CleanupChromiumCrashLogs(shell.ShellCommand):
- name = "cleanup crash logs"
- description = ["removing crash logs"]
- descriptionDone = ["removed crash logs"]
- command = ["python", "./Tools/BuildSlaveSupport/chromium/remove-crash-logs"]
- haltOnFailure = False
-
-class OutputAndroidDeviceStatus(shell.ShellCommand):
- name = "android device status"
- description = ["outputting android device status"]
- descriptionDone = ["outputted android device status"]
- command = ["python", "./Tools/BuildSlaveSupport/chromium/output-android-device-status"]
- haltOnFailure = False
-
-def appendCustomBuildFlags(step, platform, fullPlatform=""):
- if fullPlatform == "chromium-android":
- step.setCommand(step.command + ['--chromium-android'])
- elif platform in ('chromium', 'efl', 'gtk', 'qt', 'wincairo', 'wince', 'wx'):
+def appendCustomBuildFlags(step, platform, fullPlatform=""):
+ if platform in ('efl', 'gtk', 'qt', 'wincairo', 'wince', 'wx'):
step.setCommand(step.command + ['--' + platform])
-
class CompileWebKit(shell.Compile):
command = ["perl", "./Tools/Scripts/build-webkit", WithProperties("--%(configuration)s")]
env = {'MFLAGS':''}
@@ -199,6 +177,9 @@ class CompileWebKit(shell.Compile):
def start(self):
platform = self.getProperty('platform')
buildOnly = self.getProperty('buildOnly')
+ architecture = self.getProperty('architecture')
+ if platform == 'mac' and architecture == 'i386':
+ self.setCommand(self.command + ['--32-bit'])
if platform == 'mac' and buildOnly:
self.setCommand(self.command + ['DEBUG_INFORMATION_FORMAT=dwarf-with-dsym'])
@@ -207,6 +188,14 @@ class CompileWebKit(shell.Compile):
return shell.Compile.start(self)
+class CompileWebKit1Only(CompileWebKit):
+ command = ["perl", "./Tools/Scripts/build-webkit", "--no-webkit2", WithProperties("--%(configuration)s")]
+
+
+class CompileWebKit2Only(CompileWebKit):
+ command = ["perl", "./Tools/Scripts/build-webkit", "--no-webkit1", WithProperties("--%(configuration)s")]
+
+
class ArchiveBuiltProduct(shell.ShellCommand):
command = ["python", "./Tools/BuildSlaveSupport/built-product-archive",
WithProperties("--platform=%(fullPlatform)s"), WithProperties("--%(configuration)s"), "archive"]
@@ -303,15 +292,14 @@ class RunWebKitTests(shell.Test):
description = ["layout-tests running"]
descriptionDone = ["layout-tests"]
command = ["perl", "./Tools/Scripts/run-webkit-tests",
- "--no-launch-safari",
+ "--no-show-results",
"--no-new-test-results",
"--no-sample-on-timeout",
"--results-directory", "layout-test-results",
- "--use-remote-links-to-tests",
"--builder-name", WithProperties("%(buildername)s"),
"--build-number", WithProperties("%(buildnumber)s"),
"--master-name", "webkit.org",
- "--test-results-server", "test-results.appspot.com",
+ "--test-results-server", "webkit-test-results.appspot.com",
WithProperties("--%(configuration)s")]
def __init__(self, buildJSCTool=True, *args, **kwargs):
@@ -326,10 +314,9 @@ class RunWebKitTests(shell.Test):
if platform.startswith('mac'):
self.setCommand(self.command + ['--no-build'])
if shouldAbortEarly:
- self.setCommand(self.command + ["--exit-after-n-crashes-or-timeouts", "20", "--exit-after-n-failures", "500"])
-
+ self.setCommand(self.command + ["--exit-after-n-crashes-or-timeouts", "50", "--exit-after-n-failures", "500"])
if platform == "win":
- rootArgument = ['--root=' + os.path.join("WebKitBuild", self.getProperty('configuration'), "bin")]
+ rootArgument = ['--root=' + os.path.join("WebKitBuild", self.getProperty('configuration'), "bin32")]
self.setCommand(self.command + ['--no-build'])
else:
rootArgument = ['--root=WebKitBuild/bin']
@@ -354,7 +341,7 @@ class RunWebKitTests(shell.Test):
self.incorrectLayoutLines = incorrectLayoutLines
# FIXME: This will break if new-run-webkit-tests changes its default log formatter.
- nrwt_log_message_regexp = re.compile(r'(?P<log_prefix>.*) (?P<log_level>DEBUG|INFO) (?P<message>.*)')
+ nrwt_log_message_regexp = re.compile(r'\d{2}:\d{2}:\d{2}(\.\d+)?\s+\d+\s+(?P<message>.*)')
def _strip_python_logging_prefix(self, line):
match_object = self.nrwt_log_message_regexp.match(line)
@@ -365,10 +352,10 @@ class RunWebKitTests(shell.Test):
def _parseNewRunWebKitTestsOutput(self, logText):
incorrectLayoutLines = []
expressions = [
- ('flakes', re.compile(r'[Uu]nexpected flakiness.+:?\s*\((\d+)\)')),
+ ('flakes', re.compile(r'Unexpected flakiness.+\((\d+)\)')),
('new passes', re.compile(r'Expected to .+, but passed:\s+\((\d+)\)')),
- ('missing results', re.compile(r'(?:no expected results found|missing results)\s*:\s+\((\d+)\)')),
- ('failures', re.compile(r'Regressions: [Uu]nexpected.+:?\s*\((\d+)\)')),
+ ('missing results', re.compile(r'Regressions: Unexpected missing results\s+\((\d+)\)')),
+ ('failures', re.compile(r'Regressions: Unexpected.+\((\d+)\)')),
]
testFailures = {}
@@ -442,10 +429,6 @@ class RunUnitTests(TestWithFailureCount):
self.setCommand(self.command + ['--no-build'])
if platform.startswith('mac'):
self.setCommand(self.command + ['--no-build'])
- if platform.startswith('chromium'):
- self.setCommand(self.command + ['--chromium'])
- if platform == 'chromium-android':
- self.setCommand(self.command + ['--chromium-android'])
return shell.Test.start(self)
def countFailures(self, cmd):
@@ -537,15 +520,34 @@ class RunGtkAPITests(shell.Test):
shell.Test.commandComplete(self, cmd)
logText = cmd.logs['stdio'].getText()
- incorrectLines = []
- for line in logText.splitlines():
- if line.startswith('ERROR'):
- incorrectLines.append(line)
- self.incorrectLines = incorrectLines
+ self.incorrectTests = 0
+ self.timedOutTests = 0
+ self.skippedTests = 0
+ self.statusLine = []
+
+ foundItems = re.findall("Tests failed \((\d+)\):", logText)
+ if (foundItems):
+ self.incorrectTests = int(foundItems[0])
+
+ foundItems = re.findall("Tests that timed out \((\d+)\):", logText)
+ if (foundItems):
+ self.timedOutTests = int(foundItems[0])
+
+ foundItems = re.findall("Tests skipped \((\d+)\):", logText)
+ if (foundItems):
+ self.skippedTests = int(foundItems[0])
+
+ self.totalFailedTests = self.incorrectTests + self.timedOutTests
+
+ if self.totalFailedTests > 0:
+ self.statusLine = [
+ "%d API tests failed, %d timed out, %d skipped" %
+ (self.incorrectTests, self.timedOutTests, self.skippedTests)
+ ]
def evaluateCommand(self, cmd):
- if self.incorrectLines:
+ if self.totalFailedTests > 0:
return FAILURE
if cmd.rc != 0:
@@ -557,8 +559,8 @@ class RunGtkAPITests(shell.Test):
return self.getText2(cmd, results)
def getText2(self, cmd, results):
- if results != SUCCESS and self.incorrectLines:
- return ["%d API tests failed" % len(self.incorrectLines)]
+ if results != SUCCESS and self.totalFailedTests > 0:
+ return self.statusLine
return [self.name]
@@ -566,10 +568,12 @@ class RunQtAPITests(shell.Test):
name = "API tests"
description = ["API tests running"]
descriptionDone = ["API tests"]
- command = ["python", "./Tools/Scripts/run-qtwebkit-tests",
- "--output-file=qt-unit-tests.html", "--do-not-open-results", "--timeout=120",
- WithProperties("WebKitBuild/%(configuration_pretty)s/Source/WebKit/qt/tests/", configuration_pretty=lambda build: build.getProperty("configuration").title())
- ]
+
+ def start(self):
+ self.setCommand( ["python", "./Tools/Scripts/run-qtwebkit-tests", "--output-file=qt-unit-tests.html", "--do-not-open-results", "--timeout=120", "--%s" % self.getProperty('configuration')] )
+ if self.getProperty('fullPlatform').endswith("-wk2"):
+ self.setCommand(self.command + ['--webkit2'])
+ return shell.Test.start(self)
def commandComplete(self, cmd):
shell.Test.commandComplete(self, cmd)
@@ -626,15 +630,10 @@ class RunWebKit2Tests(RunWebKitTests):
def start(self):
self.setProperty("shouldAbortEarly", False)
self.setCommand(self.command + ["--webkit-test-runner"])
- return RunWebKitTests.start(self)
-
+ if self.getProperty('buildername') == "Qt Mountain Lion Release":
+ self.setCommand(self.command + ["-p"])
-class RunChromiumWebKitUnitTests(shell.Test):
- name = "webkit-unit-tests"
- description = ["webkit-unit-tests running"]
- descriptionDone = ["webkit-unit-tests"]
- command = ["perl", "./Tools/Scripts/run-chromium-webkit-unit-tests",
- WithProperties("--%(configuration)s"), WithProperties("--platform=%(fullPlatform)s")]
+ return RunWebKitTests.start(self)
class RunAndUploadPerfTests(shell.Test):
@@ -646,7 +645,7 @@ class RunAndUploadPerfTests(shell.Test):
"--slave-config-json-path", "../../perf-test-config.json",
"--no-show-results",
"--reset-results",
- "--test-results-server", "webkit-perf.appspot.com",
+ "--test-results-server", "perf.webkit.org",
"--builder-name", WithProperties("%(buildername)s"),
"--build-number", WithProperties("%(buildnumber)s"),
"--platform", WithProperties("%(fullPlatform)s"),
@@ -725,10 +724,9 @@ class Factory(factory.BuildFactory):
# There are multiple Qt slaves running on same machines, so buildslaves shouldn't kill the processes of other slaves.
if not platform.startswith("qt"):
self.addStep(KillOldProcesses())
+ self.addStep(DeleteStaleBuildFiles())
if platform == "win":
self.addStep(InstallWin32Dependencies())
- if platform.startswith("chromium"):
- self.addStep(InstallChromiumDependencies())
if platform == "gtk":
self.addStep(InstallGtkDependencies())
if platform == "efl":
@@ -744,10 +742,25 @@ class BuildFactory(Factory):
self.addStep(UploadBuiltProduct())
self.addStep(trigger.Trigger(schedulerNames=triggers))
+class BuildAndAPITestFactory(Factory):
+ def __init__(self, platform, configuration, architectures, triggers=None, SVNMirror=None):
+ Factory.__init__(self, platform, configuration, architectures, True, SVNMirror)
+ self.addStep(CompileWebKit())
+ if triggers:
+ self.addStep(ArchiveBuiltProduct())
+ self.addStep(UploadBuiltProduct())
+ self.addStep(trigger.Trigger(schedulerNames=triggers))
+ if platform == "efl":
+ self.addStep(RunEflAPITests)
+ if platform == "gtk":
+ self.addStep(RunGtkAPITests())
+ if platform.startswith("qt"):
+ self.addStep(RunQtAPITests)
+
def unitTestsSupported(configuration, platform):
if platform.startswith('mac') and configuration == "release":
return False; # https://bugs.webkit.org/show_bug.cgi?id=82652
- return (platform == 'win' or platform.startswith('mac') or platform.startswith('chromium'))
+ return platform == 'win' or platform.startswith('mac')
def pickLatestBuild(builder, requests):
return max(requests, key=operator.attrgetter("submittedAt"))
@@ -757,26 +770,16 @@ class TestFactory(Factory):
ExtractTestResultsClass = ExtractTestResults
def __init__(self, platform, configuration, architectures, SVNMirror=None):
Factory.__init__(self, platform, configuration, architectures, False, SVNMirror)
- if platform.startswith("chromium"):
- self.addStep(CleanupChromiumCrashLogs())
- if platform == "chromium-android":
- self.addStep(OutputAndroidDeviceStatus())
self.addStep(DownloadBuiltProduct())
self.addStep(ExtractBuiltProduct())
- if not platform.startswith("chromium"):
- self.addStep(RunJavaScriptCoreTests(buildJSCTool=False))
- if platform.startswith("chromium"):
- self.addStep(RunChromiumWebKitUnitTests())
+ self.addStep(RunJavaScriptCoreTests(buildJSCTool=False))
self.addStep(self.TestClass(buildJSCTool=(platform != 'win')))
if unitTestsSupported(configuration, platform):
self.addStep(RunUnitTests())
self.addStep(RunPythonTests())
- # Chromium Win runs in non-Cygwin environment, which is not yet fit
- # for running tests. This can be removed once bug 48166 is fixed.
- if platform != "chromium-win":
- self.addStep(RunPerlTests())
- self.addStep(RunBindingsTests())
+ self.addStep(RunPerlTests())
+ self.addStep(RunBindingsTests())
self.addStep(ArchiveTestResults())
self.addStep(UploadTestResults())
self.addStep(self.ExtractTestResultsClass())
@@ -788,31 +791,24 @@ class TestFactory(Factory):
self.addStep(RunQtAPITests)
class BuildAndTestFactory(Factory):
+ CompileClass = CompileWebKit
TestClass = RunWebKitTests
ExtractTestResultsClass = ExtractTestResults
def __init__(self, platform, configuration, architectures, triggers=None, SVNMirror=None, **kwargs):
Factory.__init__(self, platform, configuration, architectures, False, SVNMirror, **kwargs)
- if platform.startswith("chromium"):
- self.addStep(CleanupChromiumCrashLogs)
- self.addStep(CompileWebKit())
- if not platform.startswith("chromium"):
- self.addStep(RunJavaScriptCoreTests())
- if platform.startswith("chromium"):
- self.addStep(RunChromiumWebKitUnitTests)
+ self.addStep(self.CompileClass())
+ self.addStep(RunJavaScriptCoreTests())
self.addStep(self.TestClass())
if unitTestsSupported(configuration, platform):
self.addStep(RunUnitTests())
self.addStep(RunPythonTests())
- # Chromium Win runs in non-Cygwin environment, which is not yet fit
- # for running tests. This can be removed once bug 48166 is fixed.
- if platform != "chromium-win":
- self.addStep(RunPerlTests())
- self.addStep(RunBindingsTests())
+ self.addStep(RunPerlTests())
+ self.addStep(RunBindingsTests())
self.addStep(ArchiveTestResults())
self.addStep(UploadTestResults())
self.addStep(self.ExtractTestResultsClass())
if platform == "efl":
- self.addStep(RunEflAPITests)
+ self.addStep(RunEflAPITests())
if platform == "gtk":
self.addStep(RunGtkAPITests())
if platform.startswith("qt"):
@@ -823,9 +819,17 @@ class BuildAndTestFactory(Factory):
self.addStep(trigger.Trigger(schedulerNames=triggers))
class BuildAndTestWebKit2Factory(BuildAndTestFactory):
+ CompileClass = CompileWebKit
TestClass = RunWebKit2Tests
-class BuildAndTestLeaksFactory(BuildAndTestFactory):
+class BuildAndTestWebKit1OnlyFactory(BuildAndTestFactory):
+ CompileClass = CompileWebKit1Only
+
+class BuildAndTestWebKit2OnlyFactory(BuildAndTestFactory):
+ CompileClass = CompileWebKit2Only
+ TestClass = RunWebKit2Tests
+
+class TestLeaksFactory(TestFactory):
TestClass = RunWebKitLeakTests
ExtractTestResultsClass = ExtractTestResultsAndLeaks
@@ -836,16 +840,12 @@ class TestWebKit2Factory(TestFactory):
class BuildAndPerfTestFactory(Factory):
def __init__(self, platform, configuration, architectures, SVNMirror=None, **kwargs):
Factory.__init__(self, platform, configuration, architectures, False, SVNMirror, **kwargs)
- if platform.startswith("chromium"):
- self.addStep(CleanupChromiumCrashLogs)
self.addStep(CompileWebKit())
self.addStep(RunAndUploadPerfTests())
class BuildAndPerfTestWebKit2Factory(Factory):
def __init__(self, platform, configuration, architectures, SVNMirror=None, **kwargs):
Factory.__init__(self, platform, configuration, architectures, False, SVNMirror, **kwargs)
- if platform.startswith("chromium"):
- self.addStep(CleanupChromiumCrashLogs)
self.addStep(CompileWebKit())
self.addStep(RunAndUploadPerfTestsWebKit2())
@@ -859,9 +859,9 @@ class DownloadAndPerfTestFactory(Factory):
class DownloadAndPerfTestWebKit2Factory(Factory):
def __init__(self, platform, configuration, architectures, SVNMirror=None, **kwargs):
Factory.__init__(self, platform, configuration, architectures, False, SVNMirror, **kwargs)
- self.addStep(DownloadBuiltProduct)
- self.addStep(ExtractBuiltProduct)
- self.addStep(RunAndUploadPerfTestsWebKit2)
+ self.addStep(DownloadBuiltProduct())
+ self.addStep(ExtractBuiltProduct())
+ self.addStep(RunAndUploadPerfTestsWebKit2())
class PlatformSpecificScheduler(AnyBranchScheduler):
def __init__(self, platform, branch, **kwargs):
@@ -933,9 +933,7 @@ def loadBuilderConfig(c):
builder["factory"] = factory(**factorykwargs)
- if platform.startswith('chromium'):
- builder["category"] = 'Chromium'
- elif platform.startswith('mac'):
+ if platform.startswith('mac'):
builder["category"] = 'AppleMac'
elif platform == 'win':
builder["category"] = 'AppleWin'
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py b/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py
index ae21e237e..3f86e751c 100755
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py
@@ -51,18 +51,41 @@ class BuildBotConfigLoader(object):
class MasterCfgTest(unittest.TestCase):
def test_nrwt_leaks_parsing(self):
- run_webkit_tests = RunWebKitTests()
+ run_webkit_tests = RunWebKitTests() # pylint is confused by the way we import the module ... pylint: disable-msg=E0602
log_text = """
-2011-08-09 10:05:18,580 29486 mac.py:275 INFO leaks found for a total of 197,936 bytes!
-2011-08-09 10:05:18,580 29486 mac.py:276 INFO 1 unique leaks found!
+12:44:24.295 77706 13981 total leaks found for a total of 197,936 bytes!
+12:44:24.295 77706 1 unique leaks found!
"""
expected_incorrect_lines = [
- 'leaks found for a total of 197,936 bytes!',
+ '13981 total leaks found for a total of 197,936 bytes!',
'1 unique leaks found!',
]
run_webkit_tests._parseNewRunWebKitTestsOutput(log_text)
self.assertEqual(run_webkit_tests.incorrectLayoutLines, expected_incorrect_lines)
+ def test_nrwt_missing_results(self):
+ run_webkit_tests = RunWebKitTests() # pylint is confused by the way we import the module ... pylint: disable-msg=E0602
+ log_text = """
+Expected to fail, but passed: (2)
+ animations/additive-transform-animations.html
+ animations/cross-fade-webkit-mask-box-image.html
+
+Unexpected flakiness: text-only failures (2)
+ fast/events/touch/touch-inside-iframe.html [ Failure Pass ]
+ http/tests/inspector-enabled/console-clear-arguments-on-frame-navigation.html [ Failure Pass ]
+
+Unexpected flakiness: timeouts (1)
+ svg/text/foreignObject-repaint.xml [ Timeout Pass ]
+
+Regressions: Unexpected missing results (1)
+ svg/custom/zero-path-square-cap-rendering2.svg [ Missing ]
+
+Regressions: Unexpected text-only failures (1)
+ svg/custom/zero-path-square-cap-rendering2.svg [ Failure ]
+"""
+ run_webkit_tests._parseNewRunWebKitTestsOutput(log_text)
+ self.assertEqual(set(run_webkit_tests.incorrectLayoutLines),
+ set(['2 new passes', '3 flakes', '1 missing results', '1 failures']))
class StubStdio(object):
def __init__(self, stdio):
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/favicon.ico b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/favicon.ico
new file mode 100644
index 000000000..d988dfc51
--- /dev/null
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/favicon.ico
Binary files differ
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html
index 24b06073c..26151fff7 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html
@@ -32,10 +32,10 @@ James, a web developer from Birmingham, UK.
script-src 'self' file: https://ajax.googleapis.com;
style-src 'self' 'unsafe-inline' file: https://ajax.googleapis.com http://fonts.googleapis.com;
font-src http://themes.googleusercontent.com;
- img-src 'self' https://ajax.googleapis.com http://build.chromium.org http://build.webkit.org;
- media-src 'self' http://build.chromium.org http://build.webkit.org;
- frame-src 'self' http://build.chromium.org http://build.webkit.org http://test-results.appspot.com;
- connect-src 'self' http://trac.webkit.org http://build.chromium.org http://build.webkit.org">
+ img-src 'self' https://ajax.googleapis.com http://build.webkit.org;
+ media-src 'self' http://build.webkit.org;
+ frame-src 'self' http://build.webkit.org http://webkit-test-results.appspot.com;
+ connect-src 'self' http://trac.webkit.org http://build.webkit.org">
<title>Garden-O-Matic</title>
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700">
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/themes/base/jquery-ui.css">
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Utilities.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Utilities.js
index 36dc7b992..f800b3932 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Utilities.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Utilities.js
@@ -23,7 +23,7 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-function createDefinitionList(items) {
+function createDescriptionList(items) {
var list = document.createElement('dl');
items.forEach(function(pair) {
var dt = document.createElement('dt');
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ViewController.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ViewController.js
index bc8013c11..c7740fbaf 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ViewController.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ViewController.js
@@ -176,7 +176,7 @@ ViewController.prototype = {
];
if (passingBuildName)
dlItems.push([document.createTextNode('Passed'), this._domForBuildName(builder, passingBuildName)]);
- result.appendChild(createDefinitionList(dlItems));
+ result.appendChild(createDescriptionList(dlItems));
if (!passingBuildName)
return result;
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js
index a83f7d3c4..d77e8991f 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js
@@ -178,6 +178,8 @@ base.parseJSONP = function(jsonp)
{
var startIndex = jsonp.indexOf('(') + 1;
var endIndex = jsonp.lastIndexOf(')');
+ if (startIndex == 0 || endIndex == -1)
+ return {};
return JSON.parse(jsonp.substr(startIndex, endIndex - startIndex));
};
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js
index 4639e827e..2106e68c6 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js
@@ -466,4 +466,9 @@ test("getURLParameter", 1, function() {
ok(!base.getURLParameter('non-existant'));
});
+test("parseJSONP", 2, function() {
+ deepEqual(base.parseJSONP(""), {});
+ deepEqual(base.parseJSONP('p({"key": "value"})'), {"key": "value"});
+});
+
})();
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js
index 3b13899f3..fd92ddd05 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js
@@ -284,7 +284,7 @@ var kExampleBuildInfoJSON = {
"results": [2, ["webkit_tests"]],
"statistics": {},
"step_number": 5,
- "text": ["webkit_tests", "2014 fixable", "(370 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=fast/box-shadow/box-shadow-clipped-slices.html\">", "<abbr title=\"fast/box-shadow/box-shadow-clipped-slices.html\">box-shadow-clipped-slices.html</abbr>", "</a>", "</div>"],
+ "text": ["webkit_tests", "2014 fixable", "(370 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=fast/box-shadow/box-shadow-clipped-slices.html\">", "<abbr title=\"fast/box-shadow/box-shadow-clipped-slices.html\">box-shadow-clipped-slices.html</abbr>", "</a>", "</div>"],
"times": [1312444452.306695, 1312444768.888266],
"urls": {}
}, {
@@ -320,7 +320,7 @@ var kExampleBuildInfoJSON = {
"results": [2, ["webkit_gpu_tests"]],
"statistics": {},
"step_number": 7,
- "text": ["webkit_gpu_tests", "148 fixable", "(24 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=compositing/scaling/tiled-layer-recursion.html\">", "<abbr title=\"compositing/scaling/tiled-layer-recursion.html\">tiled-layer-recursion.html</abbr>", "</a>", "</div>"],
+ "text": ["webkit_gpu_tests", "148 fixable", "(24 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=compositing/scaling/tiled-layer-recursion.html\">", "<abbr title=\"compositing/scaling/tiled-layer-recursion.html\">tiled-layer-recursion.html</abbr>", "</a>", "</div>"],
"times": [1312444781.444903, 1312444966.856074],
"urls": {}
}, {
@@ -910,7 +910,7 @@ var kExamplePerfBuildInfoJSON = {
"results": [2, ["webkit_tests"]],
"statistics": {},
"step_number": 5,
- "text": ["webkit_tests", "2014 fixable", "(370 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=fast/box-shadow/box-shadow-clipped-slices.html\">", "<abbr title=\"fast/box-shadow/box-shadow-clipped-slices.html\">box-shadow-clipped-slices.html</abbr>", "</a>", "</div>"],
+ "text": ["webkit_tests", "2014 fixable", "(370 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=fast/box-shadow/box-shadow-clipped-slices.html\">", "<abbr title=\"fast/box-shadow/box-shadow-clipped-slices.html\">box-shadow-clipped-slices.html</abbr>", "</a>", "</div>"],
"times": [1312444452.306695, 1312444768.888266],
"urls": {}
}, {
@@ -946,7 +946,7 @@ var kExamplePerfBuildInfoJSON = {
"results": [2, ["webkit_gpu_tests"]],
"statistics": {},
"step_number": 7,
- "text": ["webkit_gpu_tests", "148 fixable", "(24 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=compositing/scaling/tiled-layer-recursion.html\">", "<abbr title=\"compositing/scaling/tiled-layer-recursion.html\">tiled-layer-recursion.html</abbr>", "</a>", "</div>"],
+ "text": ["webkit_gpu_tests", "148 fixable", "(24 skipped)", "failed 1", "<div class=\"BuildResultInfo\">", "<a href=\"http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#master=ChromiumWebkit&tests=compositing/scaling/tiled-layer-recursion.html\">", "<abbr title=\"compositing/scaling/tiled-layer-recursion.html\">tiled-layer-recursion.html</abbr>", "</a>", "</div>"],
"times": [1312444781.444903, 1312444966.856074],
"urls": {}
}, {
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
index 8fdc92372..14cf7c377 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js
@@ -40,6 +40,10 @@ config.kPlatforms = {
'Apple Lion Debug WK1 (Tests)' : {version: 'lion', debug: true},
'Apple Lion Release WK2 (Tests)' : {version: 'lion' },
'Apple Lion Debug WK2 (Tests)' : {version: 'lion', debug: true},
+ 'Apple MountainLion Release WK1 (Tests)' : {version: 'mountainlion' },
+ 'Apple MountainLion Debug WK1 (Tests)' : {version: 'mountainlion', debug: true},
+ 'Apple MountainLion Release WK2 (Tests)' : {version: 'mountainlion' },
+ 'Apple MountainLion Debug WK2 (Tests)' : {version: 'mountainlion', debug: true},
// 'Apple Win XP Debug (Tests)' : {version: 'xp',debug: true},
// 'Apple Win 7 Release (Tests)' : {version: 'win7'},
},
@@ -56,48 +60,6 @@ config.kPlatforms = {
return builderName.indexOf('Apple') != -1;
},
},
- 'chromium' : {
- label : 'Chromium',
- buildConsoleURL: 'http://build.chromium.org/p/chromium.webkit',
- layoutTestResultsURL: 'http://build.chromium.org/f/chromium/layout_test_results',
- waterfallURL: 'http://build.chromium.org/p/chromium.webkit/waterfall',
- builders: {
- 'WebKit XP': {version: 'xp'},
- 'WebKit Win7': {version: 'win7'},
- 'WebKit Win7 (dbg)(1)': {version: 'win7', debug: true},
- 'WebKit Win7 (dbg)(2)': {version: 'win7', debug: true},
- 'WebKit Linux': {version: 'lucid', is64bit: true},
- 'WebKit Linux 32': {version: 'lucid'},
- 'WebKit Linux (dbg)': {version: 'lucid', is64bit: true, debug: true},
- 'WebKit Mac10.6': {version: 'snowleopard'},
- 'WebKit Mac10.6 (dbg)': {version: 'snowleopard', debug: true},
- 'WebKit Mac10.7': {version: 'lion'},
- 'WebKit Mac10.7 (dbg)': {version: 'lion', debug: true},
- 'WebKit Mac10.8': {version: 'mountainlion'},
- },
- haveBuilderAccumulatedResults : true,
- useDirectoryListingForOldBuilds: true,
- useFlakinessDashboard: true,
- resultsDirectoryNameFromBuilderName: function(builderName) {
- return base.underscoredBuilderName(builderName);
- },
- resultsDirectoryForBuildNumber: function(buildNumber, revision) {
- return buildNumber;
- },
- _builderApplies: function(builderName) {
- // FIXME: Should garden-o-matic show these? I can imagine showing the deps bots being useful at least so
- // that the gardener only need to look at garden-o-matic and never at the waterfall. Not really sure who
- // watches the GPU bots.
- // The 10.8 Tests bot is really an FYI bot at this point
- // WebKit Android doesn't upload its results yet.
- return builderName.indexOf('GPU') == -1 &&
- builderName.indexOf('deps') == -1 &&
- builderName.indexOf('ASAN') == -1 &&
- builderName.indexOf('Content Shell') == -1 &&
- builderName.indexOf('Mac10.8 Tests') == -1 &&
- builderName.indexOf('WebKit Android') == -1;
- },
- },
'gtk' : {
label : 'GTK',
buildConsoleURL: 'http://build.webkit.org',
@@ -183,7 +145,7 @@ config.kRelativeTimeUpdateFrequency = 1000 * 60;
config.kExperimentalFeatures = window.location.search.search('enableExperiments=1') != -1;
-config.currentPlatform = base.getURLParameter('platform') || 'chromium';
+config.currentPlatform = base.getURLParameter('platform') || 'apple';
// FIXME: We should add a way to restrict the results to a subset of the builders
// (or maybe just a single builder) in the UI as well as via an URL parameter.
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js
index f2d0a2fb1..94e16d7b9 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js
@@ -30,23 +30,48 @@ var controllers = controllers || {};
var kCheckoutUnavailableMessage = 'Failed! Garden-o-matic needs a local server to modify your working copy. Please run "webkit-patch garden-o-matic" start the local server.';
// FIXME: Where should this function go?
-function rebaselineWithStatusUpdates(failureInfoList)
+function rebaselineWithStatusUpdates(failureInfoList, resultsByTest)
{
- // FIXME: If a test is a reftest, webkit-patch rebaseline-test should error out
- // and we should alert (modal dialog?) the user.
var statusView = new ui.StatusArea('Rebaseline');
var id = statusView.newId();
- var testNames = base.uniquifyArray(failureInfoList.map(function(failureInfo) { return failureInfo.testName; }));
- var testName = testNames.length == 1 ? testNames[0] : testNames.length + ' tests';
- statusView.addMessage(id, 'Performing rebaseline of ' + testName + '...');
+ var failuresToRebaseline = [];
+ var testNamesLogged = [];
+ failureInfoList.forEach(function(failureInfo) {
+ if (isAnyReftest(failureInfo.testName, resultsByTest)) {
+ if (testNamesLogged.indexOf(failureInfo.testName) == -1) {
+ statusView.addMessage(id, failureInfo.testName + ' is a ref test, skipping');
+ testNamesLogged.push(failureInfo.testName);
+ }
+ } else {
+ failuresToRebaseline.push(failureInfo);
+ if (testNamesLogged.indexOf(failureInfo.testName) == -1) {
+ statusView.addMessage(id, 'Rebaselining ' + failureInfo.testName + '...');
+ testNamesLogged.push(failureInfo.testName);
+ }
+ }
+ });
+
+ if (failuresToRebaseline.length) {
+ checkout.rebaseline(failuresToRebaseline, function() {
+ statusView.addFinalMessage(id, 'Rebaseline done! Please land with "webkit-patch land-cowhand".');
+ }, function(failureInfo) {
+ statusView.addMessage(id, failureInfo.testName + ' on ' + ui.displayNameForBuilder(failureInfo.builderName));
+ }, function() {
+ statusView.addFinalMessage(id, kCheckoutUnavailableMessage);
+ });
+ } else {
+ statusView.addFinalMessage(id, 'No non-reftests left to rebaseline!')
+ }
+}
- checkout.rebaseline(failureInfoList, function() {
- statusView.addFinalMessage(id, 'Rebaseline done! Please land with "webkit-patch land-cowhand".');
- }, function(failureInfo) {
- statusView.addMessage(id, failureInfo.testName + ' on ' + ui.displayNameForBuilder(failureInfo.builderName));
- }, function() {
- statusView.addFinalMessage(id, kCheckoutUnavailableMessage);
+// FIXME: This is duplicated from ui/results.js :(.
+function isAnyReftest(testName, resultsByTest)
+{
+ return Object.keys(resultsByTest[testName]).map(function(builder) {
+ return resultsByTest[testName][builder];
+ }).some(function(resultNode) {
+ return resultNode.reftest_type && resultNode.reftest_type.length;
});
}
@@ -98,7 +123,7 @@ controllers.ResultsDetails = base.extends(Object, {
},
onRebaseline: function()
{
- rebaselineWithStatusUpdates(this._failureInfoList());
+ rebaselineWithStatusUpdates(this._failureInfoList(), this._resultsByTest);
this._view.nextTest();
},
onUpdateExpectations: function()
@@ -206,7 +231,14 @@ var FailureStreamController = base.extends(Object, {
},
onRebaseline: function(failures)
{
- rebaselineWithStatusUpdates(this._toFailureInfoList(failures));
+ var testNameList = failures.testNameList();
+ var failuresByTest = base.filterDictionary(
+ this._resultsFilter(this._model.resultsByBuilder),
+ function(key) {
+ return testNameList.indexOf(key) != -1;
+ });
+
+ rebaselineWithStatusUpdates(this._toFailureInfoList(failures), failuresByTest);
},
onUpdateExpectations: function(failures)
{
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js
index 9c3d47e5f..c74b82c3c 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js
@@ -47,7 +47,7 @@ ui.urlForTest = function(testName)
ui.urlForFlakinessDashboard = function(opt_testNameList)
{
var testsParameter = opt_testNameList ? opt_testNameList.join(',') : '';
- return 'http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=' + encodeURIComponent(testsParameter);
+ return 'http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=' + encodeURIComponent(testsParameter);
}
ui.urlForEmbeddedFlakinessDashboard = function(opt_testNameList)
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
index f86930568..43f5e295a 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js
@@ -79,7 +79,7 @@ test('Info', 2, function() {
test('FailingTestGroup', 2, function() {
var failingTest = new ui.notifications.FailingTestGroup('test', ['test.html']);
equal(failingTest.tagName, 'LI');
- equal(failingTest.innerHTML, '<a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test.html" target="_blank">test</a>');
+ equal(failingTest.innerHTML, '<a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test.html" target="_blank">test</a>');
});
test('SuspiciousCommit', 2, function() {
@@ -130,7 +130,7 @@ test('FailingTestsSummary', 12, function() {
'<div class="what">' +
'<div class="problem">' +
'<ul class="effects">' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
'</ul>' +
'<ul class="actions">' +
'<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -153,7 +153,7 @@ test('FailingTestsSummary', 12, function() {
'<div class="what">' +
'<div class="problem">' +
'<ul class="effects">' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
'</ul>' +
'<ul class="actions">' +
'<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -178,7 +178,7 @@ test('FailingTestsSummary', 12, function() {
'<div class="what">' +
'<div class="problem">' +
'<ul class="effects">' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
'</ul>' +
'<ul class="actions">' +
'<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -218,8 +218,8 @@ test('FailingTestsSummary', 12, function() {
'<div class="what">' +
'<div class="problem">' +
'<ul class="effects">' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo" target="_blank">foo</a></li>' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo" target="_blank">foo</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
'</ul>' +
'<ul class="actions">' +
'<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -263,8 +263,8 @@ test('FailingTestsSummary', 12, function() {
'<div class="what">' +
'<div class="problem">' +
'<ul class="effects">' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo" target="_blank">foo</a></li>' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=foo" target="_blank">foo</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=test" target="_blank">test</a></li>' +
'</ul>' +
'<ul class="actions">' +
'<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
@@ -304,8 +304,8 @@ test('FailingTestsSummary (grouping)', 1, function() {
'<div class="what">' +
'<div class="problem">' +
'<ul class="effects">' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fto%2Ftest1.html%2Cpath%2Fto%2Ftest2.html%2Cpath%2Fto%2Ftest3.html%2Cpath%2Fto%2Ftest4.html" target="_blank">path/to (4 tests)</a></li>' +
- '<li><a href="http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fanother%2Ftest.html" target="_blank">path/another/test.html</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fto%2Ftest1.html%2Cpath%2Fto%2Ftest2.html%2Cpath%2Fto%2Ftest3.html%2Cpath%2Fto%2Ftest4.html" target="_blank">path/to (4 tests)</a></li>' +
+ '<li><a href="http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=path%2Fanother%2Ftest.html" target="_blank">path/another/test.html</a></li>' +
'</ul>' +
'<ul class="actions">' +
'<li><button class="action default" title="Examine these failures in detail.">Examine</button></li>' +
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js
index d624a2129..67ef8d094 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js
@@ -187,7 +187,7 @@ function isAnyReftest(testName, resultsByTest)
return Object.keys(resultsByTest[testName]).map(function(builder) {
return resultsByTest[testName][builder];
}).some(function(resultNode) {
- return resultNode.is_reftest || resultNode.is_mismatch_reftest
+ return resultNode.reftest_type && resultNode.reftest_type.length;
});
}
@@ -207,7 +207,7 @@ ui.results.FlakinessData = base.extends('iframe', {
// Check for null event.origin so that the unittests can get past this point.
// FIXME: Is this safe? In practice, there's no meaningful harm that can come from
// a malicious page sending us heightChanged commands, so it doesn't really matter.
- if (event.origin !== 'null' && event.origin != 'http://test-results.appspot.com') {
+ if (event.origin !== 'null' && event.origin != 'http://webkit-test-results.appspot.com') {
console.log('Invalid origin: ' + event.origin);
return;
}
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js
index 1a4d55080..2457ac4bd 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js
@@ -68,14 +68,14 @@ var kExampleReftestResults = {
"Mock Builder": {
"expected": "PASS",
"actual": "IMAGE",
- "is_reftest": true
+ "reftest_type": ["=="]
}
},
"mismatch-reftest.html": {
"Mock Builder": {
"expected": "PASS",
"actual": "IMAGE",
- "is_mismatch_reftest": true
+ "reftest_type": ["!="]
}
}
};
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/default.css b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/default.css
index 419807e55..f493a8e07 100644
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/default.css
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/default.css
@@ -11,6 +11,10 @@ body.interface {
color: #333;
}
+small {
+ font-size: 9px;
+}
+
.auth {
position: absolute;
top: 5px;
@@ -18,7 +22,11 @@ body.interface {
}
a:link,a:visited,a:active {
- color: #444;
+ color: #333;
+}
+
+a:visited {
+ color: #557;
}
table {
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html b/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
index e783b93d9..6dc51f2f4 100755
--- a/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/templates/root.html
@@ -1,7 +1,7 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!DOCTYPE html>
<html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Welcome to the Buildbot</title>
</head>
@@ -10,21 +10,21 @@
<ul>
<li><a href="console">Console</a> - <a href="console?category=AppleMac">Apple Mac</a>, <a href="console?category=AppleWin">Apple Windows</a>,
- <a href="console?category=GTK">GTK+</a>, <a href="console?category=Qt">Qt</a>, <a href="console?category=Chromium">Chromium</a>, <a href="console?category=EFL">EFL</a>
+ <a href="console?category=GTK">GTK+</a>, <a href="console?category=Qt">Qt</a>, <a href="console?category=EFL">EFL</a>
and <a href="console?category=misc">miscellaneous</a></li>
<li><a href="waterfall">Waterfall Display</a>, a time-oriented summary of recent buildbot activity
- <a href="waterfall?category=AppleMac">Apple Mac</a>, <a href="waterfall?category=AppleWin">Apple Windows</a>,
- <a href="waterfall?category=GTK">GTK+</a>, <a href="waterfall?category=Qt">Qt</a>, <a href="waterfall?category=Chromium">Chromium</a>, <a href="waterfall?category=EFL">EFL</a>
+ <a href="waterfall?category=GTK">GTK+</a>, <a href="waterfall?category=Qt">Qt</a>, <a href="waterfall?category=EFL">EFL</a>
and <a href="waterfall?category=misc">miscellaneous</a></li>
<li><a href="one_box_per_builder">Latest Build</a> for each builder is here.</li>
<li><a href="one_line_per_build">Recent Builds</a> are summarized here, one per line.</li>
<li><a href="buildslaves">Buildslave</a> information</li>
- <li><a href="http://webkit-commit-queue.appspot.com/">Commit Queue Status</a> information.</li>
+ <li><a href="http://webkit-queues.appspot.com/">Early Warning System and Commit Queue Status</a> (External site)</li>
<li><a href="changes">ChangeSource</a> information.</li>
<li><a href="results">Test Results</a></li>
<li><a href="LeaksViewer">Leaks Viewer</a></li>
<li><a href="TestFailures">Test Failures</a></li>
- <li><a href="http://webkit-perf.appspot.com/">Perf-o-matic</a> (external website) results submitted by <a href="http://build.webkit.org/waterfall?show=Apple%20Lion%20Release%20%28Perf%29&show=Apple%20MountainLion%20Release%20%28Perf%29&show=Chromium%20Linux%20Release%20%28Perf%29&show=Chromium%20Mac%20Release%20%28Perf%29&show=Chromium%20Win%20Release%20%28Perf%29&show=Qt%20Linux%2064-bit%20Release%20%28Perf%29&show=Qt%20Linux%2064-bit%20Release%20%28WebKit2%20Perf%29">performance bots</a></li>
+ <li><a href="http://perf.webkit.org/">WebKit Perf Monitor</a> results submitted by <a href="http://build.webkit.org/waterfall?show=Apple%20Lion%20Release%20%28Perf%29&show=Apple%20MountainLion%20Release%20%28Perf%29&show=Qt%20Linux%2064-bit%20Release%20%28Perf%29&show=Qt%20Linux%2064-bit%20Release%20%28WebKit2%20Perf%29&show=EFL%20Linux%2064-bit%20Release%20WK2%20%28Perf%29">performance bots</a></li>
</ul>
-</body> </html>
-
+</body>
+</html>
diff --git a/Tools/Scripts/webkitpy/common/config/build.py b/Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild.py
index 2ecacc7ad..de94d0029 100644
--- a/Tools/Scripts/webkitpy/common/config/build.py
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild.py
@@ -55,28 +55,24 @@ def _should_file_trigger_build(target_platform, file):
("wx", []),
# Directories that should trigger builds on only some bots.
- ("Source/WebCore/image-decoders", ["chromium"]),
("LayoutTests/platform/mac", ["mac", "win"]),
("cairo", ["gtk", "wincairo"]),
- ("cf", ["chromium-mac", "mac", "qt", "win"]),
- ("chromium", ["chromium"]),
- ("cocoa", ["chromium-mac", "mac"]),
+ ("cf", ["mac", "qt", "win"]),
+ ("cocoa", ["mac"]),
("curl", ["gtk", "wincairo"]),
("gobject", ["gtk"]),
- ("gpu", ["chromium", "mac"]),
+ ("gpu", ["mac"]),
("gstreamer", ["gtk"]),
("gtk", ["gtk"]),
- ("mac", ["chromium-mac", "mac"]),
+ ("mac", ["mac"]),
("mac-leopard", ["mac-leopard"]),
("mac-lion", ["mac-leopard", "mac-lion", "mac-snowleopard", "win"]),
("mac-snowleopard", ["mac-leopard", "mac-snowleopard"]),
("mac-wk2", ["mac-lion", "mac-snowleopard", "mac-mountainlion", "win"]),
("objc", ["mac"]),
("qt", ["qt"]),
- ("skia", ["chromium"]),
("soup", ["gtk"]),
- ("v8", ["chromium"]),
- ("win", ["chromium-win", "win"]),
+ ("win", ["win"]),
]
patterns = [
# Patterns that shouldn't trigger builds on any bots.
@@ -92,14 +88,12 @@ def _should_file_trigger_build(target_platform, file):
# Patterns that should trigger builds on only some bots.
(r"(?:^|/)GNUmakefile\.am$", ["gtk"]),
- (r"/\w+Chromium\w*\.(?:cpp|h|mm)$", ["chromium"]),
(r"Mac\.(?:cpp|h|mm)$", ["mac"]),
- (r"\.(?:vcproj|vsprops|sln)$", ["win"]),
+ (r"\.(?:vcproj|vsprops|sln|vcxproj|props|filters)$", ["win"]),
(r"\.exp(?:\.in)?$", ["mac"]),
- (r"\.gypi?", ["chromium"]),
(r"\.order$", ["mac"]),
(r"\.pr[io]$", ["qt"]),
- (r"\.vcproj/", ["win"]),
+ (r"\.(?:vcproj|vcxproj)/", ["win"]),
(r"\.xcconfig$", ["mac"]),
(r"\.xcodeproj/", ["mac"]),
]
diff --git a/Tools/Scripts/webkitpy/common/config/build_unittest.py b/Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py
index c496179e4..220b59052 100644
--- a/Tools/Scripts/webkitpy/common/config/build_unittest.py
+++ b/Tools/BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py
@@ -21,8 +21,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
-
-from webkitpy.common.config import build
+import wkbuild
class ShouldBuildTest(unittest.TestCase):
@@ -36,8 +35,6 @@ class ShouldBuildTest(unittest.TestCase):
(["LayoutTests/platform/mac/foo", "Source/WebCore/bar"], ["*"]),
(["LayoutTests/foo"], ["*"]),
(["LayoutTests/canvas/philip/tests/size.attributes.parse.exp-expected.txt", "LayoutTests/canvas/philip/tests/size.attributes.parse.exp.html"], ["*"]),
- (["LayoutTests/platform/chromium-linux/foo"], ["chromium-linux"]),
- (["LayoutTests/platform/chromium-win/fast/compact/001-expected.txt"], ["chromium-win"]),
(["LayoutTests/platform/mac-leopard/foo"], ["mac-leopard"]),
(["LayoutTests/platform/mac-lion/foo"], ["mac-leopard", "mac-lion", "mac-snowleopard", "win"]),
(["LayoutTests/platform/mac-snowleopard/foo"], ["mac-leopard", "mac-snowleopard"]),
@@ -47,12 +44,11 @@ class ShouldBuildTest(unittest.TestCase):
(["LayoutTests/platform/win-wk2/foo"], ["win"]),
(["LayoutTests/platform/win/foo"], ["win"]),
(["Source/WebCore.exp.in", "Source/WebKit/mac/WebKit.exp"], ["mac-leopard", "mac-lion", "mac-mountainlion", "mac-snowleopard"]),
- (["Source/WebCore/mac/foo"], ["chromium-mac", "mac-leopard", "mac-lion", "mac-mountainlion", "mac-snowleopard"]),
- (["Source/WebCore/win/foo"], ["chromium-win", "win"]),
+ (["Source/WebCore/mac/foo"], ["mac-leopard", "mac-lion", "mac-mountainlion", "mac-snowleopard"]),
+ (["Source/WebCore/win/foo"], ["win"]),
(["Source/WebCore/platform/graphics/gpu/foo"], ["mac-leopard", "mac-lion", "mac-mountainlion", "mac-snowleopard"]),
(["Source/WebCore/platform/wx/wxcode/win/foo"], []),
(["Source/WebCore/rendering/RenderThemeMac.mm", "Source/WebCore/rendering/RenderThemeMac.h"], ["mac-leopard", "mac-lion", "mac-mountainlion", "mac-snowleopard"]),
- (["Source/WebCore/rendering/RenderThemeChromiumLinux.h"], ["chromium-linux"]),
(["Source/WebCore/rendering/RenderThemeWinCE.h"], []),
(["Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/LeaksViewer.js"], []),
]
@@ -60,11 +56,15 @@ class ShouldBuildTest(unittest.TestCase):
def test_should_build(self):
for files, platforms in self._should_build_tests:
# FIXME: We should test more platforms here once
- # build._should_file_trigger_build is implemented for them.
+ # wkbuild._should_file_trigger_build is implemented for them.
for platform in ["mac-leopard", "mac-lion", "mac-mountainlion", "mac-snowleopard", "win"]:
should_build = platform in platforms or "*" in platforms
- self.assertEqual(build.should_build(platform, files), should_build, "%s should%s have built but did%s (files: %s)" % (platform, "" if should_build else "n't", "n't" if should_build else "", str(files)))
-
+ self.assertEqual(wkbuild.should_build(platform, files), should_build, "%s should%s have built but did%s (files: %s)" % (platform, "" if should_build else "n't", "n't" if should_build else "", str(files)))
-if __name__ == "__main__":
+# FIXME: We should run this file as part of test-rm .
+# Unfortunately test-rm currently requires that unittests
+# be located in a directory with a valid module name.
+# 'build.webkit.org-config' is not a valid module name (due to '.' and '-')
+# so for now this is a stand-alone test harness.
+if __name__ == '__main__':
unittest.main()
diff --git a/Tools/BuildSlaveSupport/built-product-archive b/Tools/BuildSlaveSupport/built-product-archive
index 7ef88f7aa..57f235638 100644
--- a/Tools/BuildSlaveSupport/built-product-archive
+++ b/Tools/BuildSlaveSupport/built-product-archive
@@ -91,11 +91,6 @@ def createZipManually(directoryToZip, archiveFile):
def createZip(directoryToZip, configuration, archiveConfigurationOnMac=False):
archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
-
- # Chromium bots may not have this directory
- if not os.path.isdir(archiveDir):
- os.mkdir(archiveDir)
-
archiveFile = os.path.join(archiveDir, configuration + ".zip")
try:
@@ -109,7 +104,7 @@ def createZip(directoryToZip, configuration, archiveConfigurationOnMac=False):
return subprocess.call(["ditto", "-c", "-k", "--keepParent", "--sequesterRsrc", directoryToZip, archiveFile])
return subprocess.call(["ditto", "-c", "-k", "--sequesterRsrc", directoryToZip, archiveFile])
elif sys.platform == 'cygwin':
- return subprocess.call(["zip", "-r", archiveFile, "bin"], cwd=directoryToZip)
+ return subprocess.call(["zip", "-r", archiveFile, "bin32"], cwd=directoryToZip)
elif sys.platform == 'win32':
createZipManually(directoryToZip, archiveFile)
return 0
@@ -118,16 +113,16 @@ def createZip(directoryToZip, configuration, archiveConfigurationOnMac=False):
def archiveBuiltProduct(configuration, platform, fullPlatform):
- assert platform in ('mac', 'win', 'qt', 'gtk', 'efl', 'chromium')
+ assert platform in ('mac', 'win', 'qt', 'gtk', 'efl')
configurationBuildDirectory = os.path.join(_buildDirectory, configuration.title())
if platform == 'mac':
return createZip(configurationBuildDirectory, configuration, archiveConfigurationOnMac=True)
elif platform == 'win':
- binDirectory = os.path.join(configurationBuildDirectory, "bin")
+ binDirectory = os.path.join(configurationBuildDirectory, "bin32")
thinDirectory = os.path.join(configurationBuildDirectory, "thin")
- thinBinDirectory = os.path.join(thinDirectory, "bin")
+ thinBinDirectory = os.path.join(thinDirectory, "bin32")
removeDirectoryIfExists(thinDirectory)
copyBuildFiles(binDirectory, thinBinDirectory, ['*.ilk'])
@@ -162,21 +157,6 @@ def archiveBuiltProduct(configuration, platform, fullPlatform):
if createZip(thinDirectory, configuration):
return 1
- elif platform == 'chromium':
- thinDirectory = os.path.join(configurationBuildDirectory, "thin")
-
- ignorePatterns = ['.svn', '*.a', '*.d', '*.dSYM', '*.o', '*.ilk', '*.lib', '*.idb',
- 'BuildLog.htm', '*.obj', '*.pdb', '*.pch', '*.tlog', '*.lastbuildstate']
-
- if fullPlatform and fullPlatform == 'chromium-android':
- ignorePatterns.extend(['*.so', '*-unaligned.apk', '*-unsigned.apk'])
-
- removeDirectoryIfExists(thinDirectory)
- copyBuildFiles(configurationBuildDirectory, thinDirectory, ignorePatterns)
- if createZip(thinDirectory, configuration):
- return 1
-
-
def unzipArchive(directoryToExtractTo, configuration):
archiveDir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "WebKitBuild"))
assert os.path.isdir(archiveDir)
@@ -197,7 +177,7 @@ def unzipArchive(directoryToExtractTo, configuration):
def extractBuiltProduct(configuration, platform):
- assert platform in ('mac', 'win', 'qt', 'gtk', 'efl', 'chromium')
+ assert platform in ('mac', 'win', 'qt', 'gtk', 'efl')
archiveFile = os.path.join(_buildDirectory, configuration + ".zip")
configurationBuildDirectory = os.path.join(_buildDirectory, configuration.title())
@@ -208,7 +188,7 @@ def extractBuiltProduct(configuration, platform):
if platform == 'mac':
return unzipArchive(_buildDirectory, configuration)
elif platform == 'win':
- binDirectory = os.path.join(configurationBuildDirectory, "bin")
+ binDirectory = os.path.join(configurationBuildDirectory, "bin32")
os.makedirs(binDirectory)
safariPath = subprocess.Popen('cygpath -w "$PROGRAMFILES"/Safari',
@@ -218,7 +198,8 @@ def extractBuiltProduct(configuration, platform):
return 1
return unzipArchive(configurationBuildDirectory, configuration)
- elif platform == 'qt' or platform == 'gtk' or platform == 'efl' or platform == 'chromium':
+ elif platform == 'qt' or platform == 'gtk' or platform == 'efl':
+ print "Extracting", configurationBuildDirectory
return unzipArchive(configurationBuildDirectory, configuration)
diff --git a/Tools/BuildSlaveSupport/chromium/output-android-device-status b/Tools/BuildSlaveSupport/chromium/output-android-device-status
deleted file mode 100755
index d716c026b..000000000
--- a/Tools/BuildSlaveSupport/chromium/output-android-device-status
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2012 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.
-
-import re
-import subprocess
-import sys
-
-def GetAttachedDevices():
- re_device = re.compile('^([a-zA-Z0-9_:.-]+)\tdevice$', re.MULTILINE)
- process = subprocess.Popen(['adb', 'devices'], stdout=subprocess.PIPE)
- return re_device.findall(process.communicate()[0])
-
-
-class AndroidDeviceStatus(object):
- def __init__(self, device_serial):
- self._device_serial = device_serial
-
- def _run_adb_command(self, command):
- full_command = ['adb', '-s', self._device_serial] + command
- stdout, _ = subprocess.Popen(full_command, stdout=subprocess.PIPE).communicate()
- return stdout.strip()
-
- def device_type(self):
- return self._run_adb_command(['shell', 'getprop', 'ro.build.product'])
-
- def device_build(self):
- return self._run_adb_command(['shell', 'getprop', 'ro.build.id'])
-
- def device_fingerprint(self):
- return self._run_adb_command(['shell', 'getprop', 'ro.build.fingerprint'])
-
- def battery_level(self):
- return self._run_adb_command(['shell', 'cat', '/sys/class/power_supply/battery/capacity'])
-
- def battery_temperature(self):
- temperature = self._run_adb_command(['shell', 'dumpsys', 'battery'])
- re_temperature = re.compile('temperature:\s+(\d+)')
- return re_temperature.findall(temperature)[0]
-
- def username(self):
- username = self._run_adb_command(['shell', 'id'])
- re_username = re.compile('uid=\d+\((.+?)\)')
- return re_username.findall(username)[0]
-
-
-def main():
- devices = GetAttachedDevices()
- for device_serial in devices:
- device_status = AndroidDeviceStatus(device_serial)
-
- print 'Device %s (%s)' % (device_serial, device_status.device_type())
- print ' Build: %s (%s)' % (device_status.device_build(), device_status.device_fingerprint())
- print ' Battery: %s%%' % device_status.battery_level()
- print ' Battery temp: %s' % device_status.battery_temperature()
- print ' Username: %s' % device_status.username()
- print ''
-
-
-if __name__ == '__main__':
- sys.exit(main())
diff --git a/Tools/BuildSlaveSupport/delete-stale-build-files b/Tools/BuildSlaveSupport/delete-stale-build-files
new file mode 100755
index 000000000..d4c50d727
--- /dev/null
+++ b/Tools/BuildSlaveSupport/delete-stale-build-files
@@ -0,0 +1,87 @@
+#!/usr/bin/python
+# Copyright (C) 2013 Apple Inc. All rights reserved.
+# Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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 optparse
+import os
+import subprocess
+import sys
+
+
+def main():
+ parser = optparse.OptionParser("usage: %prog [options]")
+ parser.add_option("--platform")
+ parser.add_option("--build-directory")
+ parser.add_option("--debug", action="store_const", const="debug", dest="configuration")
+ parser.add_option("--release", action="store_const", const="release", dest="configuration")
+
+ options, parameters = parser.parse_args()
+ if not options.platform:
+ parser.error("Platform is required")
+ return -1
+ if not options.configuration:
+ parser.error("Configuration is required")
+ return -2
+
+ genericPlatform = options.platform.split('-', 1)[0]
+ if genericPlatform != 'mac':
+ print 'Exited without removing any files.'
+ return 0
+
+ if options.build_directory:
+ buildDirectory = options.build_directory
+ else:
+ buildDirectory = webkitBuildDirectory(genericPlatform, options.configuration)
+
+ exit_code = 0
+
+ for root, _, files in os.walk(buildDirectory):
+ for name in files:
+ full_path = os.path.join(root, name)
+ ext = os.path.splitext(full_path)[1]
+
+ try:
+ if ext not in ('.o', '.d') or os.path.getsize(full_path):
+ continue
+ except OSError as exception:
+ print exception
+ continue
+
+ try:
+ os.remove(full_path)
+ print 'Removed', full_path
+ except OSError as exception:
+ print exception
+ exit_code += 1
+
+ return exit_code
+
+
+def webkitBuildDirectory(platform, configuration):
+ return subprocess.Popen(['perl', os.path.join(os.path.dirname(__file__), "..", "Scripts", "webkit-build-directory"),
+ "--" + platform, "--" + configuration, '--top-level'], stdout=subprocess.PIPE).communicate()[0].strip()
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/Tools/BuildSlaveSupport/kill-old-processes b/Tools/BuildSlaveSupport/kill-old-processes
index 682a5e533..359967fe9 100755
--- a/Tools/BuildSlaveSupport/kill-old-processes
+++ b/Tools/BuildSlaveSupport/kill-old-processes
@@ -1,119 +1,119 @@
-#!/usr/bin/python
-# Copyright (C) 2010 Apple Inc. All rights reserved.
-# Copyright (C) 2011 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 AND ITS 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 APPLE OR ITS 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, sys
-
-
-def main():
- tasksToKillWin = [
- "cl.exe",
- "devenv.com",
- "devenv.exe",
- "DumpRenderTree.exe",
- "DumpRenderTree_debug.exe",
- "httpd.exe",
- "imagediff.exe",
- "imagediff_debug.exe",
- "jsc.exe",
- "jsc_debug.exe",
- "LightTPD.exe",
- "link.exe",
- "midl.exe",
- "perl.exe",
- "Safari.exe",
- "svn.exe",
- "testapi.exe",
- "testapi_debug.exe",
- "VcBuildHelper.exe",
- "wdiff.exe",
- "WebKit2WebProcess.exe",
- "WebKit2WebProcess_debug.exe",
- "WebKitTestRunner.exe",
- "WebKitTestRunner_debug.exe",
- ]
-
- tasksToKillMac = [
- "apache2",
- "cc1plus",
- "cc1objplus",
- "clang",
- "clang\+\+",
- "gcc-4.2",
- "httpd",
- "i686-apple-darwin10-gcc-4.2.1",
- "jsc",
- "make",
- "pboard", # FIXME: https://bugs.webkit.org/show_bug.cgi?id=81012
- "per5.12",
- "perl",
- "Problem Reporter",
- "ruby",
- "Safari Web Content",
- "Safari",
- "svn",
- "DumpRenderTree",
- "TestWebKitAPI Web Content",
- "TestWebKitAPI",
- "WebKitPluginAgen", # FIXME: Why no 't'?
- "WebKitTestRunner Web Content",
- "WebKitTestRunner",
- "WebProcess",
- "xcodebuild",
- ]
-
- taskToKillUnix = [
- "apache2",
- "cc1plus",
- "DumpRenderTree",
- "gold",
- "httpd",
- "ld",
- "make",
- "ruby",
- "svn",
- "webkit_unit_tests",
- "WebKitTestRunner",
- "Xvfb",
- ]
-
- if sys.platform == 'darwin':
- for task in tasksToKillMac:
- os.system("killall -9 -v -m " + task)
- # Kill all instances of python executing run-webkit-tests
- os.system("ps aux | grep -P '.+/Python .+(run_webkit_tests|run-webkit-tests)' | grep -v grep | awk '{print $2}' | xargs kill")
- elif sys.platform == 'cygwin' or sys.platform == 'win32':
- for task in tasksToKillWin:
- os.system("taskkill /t /f /im " + task)
- elif sys.platform.startswith('linux'):
- for task in taskToKillUnix:
- os.system("killall -9 -v " + task)
- os.system("ps aux | grep -P '.+/python .+(run_webkit_tests|run-webkit-tests)' | grep -v grep | awk '{print $2}' | xargs kill")
- else:
- sys.exit()
- # FIXME: Should we return an exit code based on how the kills went?
-
-
-if __name__ == '__main__':
- sys.exit(main())
+#!/usr/bin/python
+# Copyright (C) 2010 Apple Inc. All rights reserved.
+# Copyright (C) 2011 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 AND ITS 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 APPLE OR ITS 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, sys
+
+
+def main():
+ tasksToKillWin = [
+ "cl.exe",
+ "devenv.com",
+ "devenv.exe",
+ "DumpRenderTree.exe",
+ "DumpRenderTree_debug.exe",
+ "httpd.exe",
+ "imagediff.exe",
+ "imagediff_debug.exe",
+ "jsc.exe",
+ "jsc_debug.exe",
+ "LightTPD.exe",
+ "link.exe",
+ "midl.exe",
+ "perl.exe",
+ "Safari.exe",
+ "svn.exe",
+ "testapi.exe",
+ "testapi_debug.exe",
+ "VcBuildHelper.exe",
+ "wdiff.exe",
+ "WebKit2WebProcess.exe",
+ "WebKit2WebProcess_debug.exe",
+ "WebKitTestRunner.exe",
+ "WebKitTestRunner_debug.exe",
+ ]
+
+ tasksToKillMac = [
+ "apache2",
+ "cc1plus",
+ "cc1objplus",
+ "clang",
+ r"clang\\+\\+",
+ "gcc-4.2",
+ "httpd",
+ "i686-apple-darwin10-gcc-4.2.1",
+ "jsc",
+ "make",
+ "pboard", # FIXME: https://bugs.webkit.org/show_bug.cgi?id=81012
+ "per5.12",
+ "perl",
+ "Problem Reporter",
+ "ruby",
+ "Safari Web Content",
+ "Safari",
+ "svn",
+ "DumpRenderTree",
+ "TestWebKitAPI Web Content",
+ "TestWebKitAPI",
+ "WebKitPluginAgen", # FIXME: Why no 't'?
+ "WebKitTestRunner Web Content",
+ "WebKitTestRunner",
+ "WebProcess",
+ "xcodebuild",
+ ]
+
+ taskToKillUnix = [
+ "apache2",
+ "cc1plus",
+ "DumpRenderTree",
+ "gold",
+ "httpd",
+ "ld",
+ "make",
+ "ruby",
+ "svn",
+ "webkit_unit_tests",
+ "WebKitTestRunner",
+ "Xvfb",
+ ]
+
+ if sys.platform == 'darwin':
+ for task in tasksToKillMac:
+ os.system("killall -9 -v -m " + task)
+ # Kill all instances of python executing run-webkit-tests
+ os.system("ps aux | grep -E '.+/Python .+(run_webkit_tests|run-webkit-tests)' | grep -v grep | awk '{print $2}' | xargs kill")
+ elif sys.platform == 'cygwin' or sys.platform == 'win32':
+ for task in tasksToKillWin:
+ os.system("taskkill /t /f /im " + task)
+ elif sys.platform.startswith('linux'):
+ for task in taskToKillUnix:
+ os.system("killall -9 -v " + task)
+ os.system("ps aux | grep -P '.+/python .+(run_webkit_tests|run-webkit-tests)' | grep -v grep | awk '{print $2}' | xargs kill")
+ else:
+ sys.exit()
+ # FIXME: Should we return an exit code based on how the kills went?
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/Tools/BuildSlaveSupport/run-performance-tests b/Tools/BuildSlaveSupport/run-performance-tests
deleted file mode 100755
index 5d6ea44e5..000000000
--- a/Tools/BuildSlaveSupport/run-performance-tests
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2006 Apple Computer, 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
-
-# Script used by WebKit build slave to kick off performance tests.
-
-use strict;
-
-use FindBin;
-use lib "$FindBin::Bin/../Scripts";
-use webkitdirs;
-
-use Getopt::Long;
-use IO::Socket;
-my $shouldPrebuild = 1;
-
-my $perfMaster = "webkit-build-1.local";
-my $perfSlave = "webkit-build-2.local";
-my $slaveUser = "buildbot";
-my $reportPort = 54481; # Something that looks sorta like SAFARI
-my $slaveDirectory = "/ToTest";
-
-my $buildDirectory = determineConfigurationProductDir();
-
-my $userAndHost = $slaveUser . "@" . $perfSlave;
-my $resultsUploadDestination;
-
-GetOptions('upload-results=s' => \$resultsUploadDestination);
-
-print "Copying built frameworks to PLT slave...\n";
-my @frameworks = ("$buildDirectory/JavaScriptCore.framework", "$buildDirectory/WebCore.framework", "$buildDirectory/WebKit.framework");
-die "Failed to copy to slave\n" unless (system("rsync", "-avz", @frameworks, "$userAndHost:$slaveDirectory") == 0);
-
-print "Opening reponse port for PLT slave...\n";
-my $sock = new IO::Socket::INET(LocalHost => $perfMaster,
- LocalPort => $reportPort,
- Proto => 'tcp',
- Listen => 1,
- Reuse => 1);
-die "Could not create socket for port $reportPort: $!\n" unless $sock;
-
-print "Starting performance tests on PLT slave...\n";
-die "Failed to start slave!\n" unless (system("ssh", $userAndHost, "autovicki", $slaveDirectory, "--safari", "$slaveDirectory/Safari.app", "--count", 5, "--clean-exit", "--webkit-revision", currentSVNRevision(), "--show-results", "send-completed-results.command") == 0);
-
-print "Waiting for PLT slave to respond...\n";
-my $new_sock = $sock->accept();
-while(<$new_sock>) {
- print $_;
-}
-close($sock);
-
-if ($resultsUploadDestination) {
- print "Uploading results to $resultsUploadDestination\n";
- die "Failed to upload xml results file." unless (system("scp", "$userAndHost:/Results/PerformanceReportSummary.xml", $resultsUploadDestination) == 0);
- die "Failed to upload svg results file." unless (system("scp", "$userAndHost:/Results/PerformanceGraph.svg", $resultsUploadDestination) == 0);
-}
diff --git a/Tools/BuildSlaveSupport/test-result-archive b/Tools/BuildSlaveSupport/test-result-archive
index 4f1f75eaf..402df6574 100644
--- a/Tools/BuildSlaveSupport/test-result-archive
+++ b/Tools/BuildSlaveSupport/test-result-archive
@@ -23,7 +23,7 @@
# (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 optparse, os, shutil, subprocess, sys, zipfile
+import optparse, os, shutil, subprocess, sys
sourceRootDirectory = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
archiveFile = os.path.join(sourceRootDirectory, "layout-test-results.zip")
@@ -46,7 +46,7 @@ def main():
return archiveTestResults(options.configuration, options.platform, layoutTestResultsDir)
def archiveTestResults(configuration, platform, layoutTestResultsDir):
- assert platform in ('mac', 'win', 'wincairo', 'gtk', 'qt', 'chromium', 'efl')
+ assert platform in ('mac', 'win', 'wincairo', 'gtk', 'qt', 'efl')
try:
os.unlink(archiveFile)
@@ -69,11 +69,6 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir):
elif platform in ('win', 'wincairo', 'gtk', 'qt', 'efl'):
if subprocess.call(["zip", "-r", archiveFile, "."], cwd=layoutTestResultsDir):
return 1
- elif platform == 'chromium':
- cwd = os.getcwd()
- os.chdir(layoutTestResultsDir)
- zipFilesRecursively(archiveFile, ["."])
- os.chdir(cwd)
try:
shutil.rmtree(layoutTestResultsDir)
@@ -91,26 +86,5 @@ def archiveTestResults(configuration, platform, layoutTestResultsDir):
if e.errno != 90 and e.errno != 2:
raise
-def zipFilesRecursively(archiveFile, files):
- """Make a zip archive.
-
- Args:
- archiveFile: The resultant zip archive file name.
- files: A list of files to be archived. If a list item is a directory,
- files in the directory are archived recursively."""
- zipper = zipfile.ZipFile(archiveFile, 'w', zipfile.ZIP_DEFLATED)
- for file in files:
- if os.path.isdir(file):
- for dirPath, dirNames, fileNames in os.walk(file):
- for fileName in fileNames:
- relativePath = os.path.join(dirPath, fileName)
- print "Adding", relativePath
- zipper.write(relativePath)
- else:
- print "Adding", file
- zipper.write(file)
- zipper.close()
- print "Created zip archive: ", archiveFile
-
if __name__ == '__main__':
sys.exit(main())
diff --git a/Tools/CMakeLists.txt b/Tools/CMakeLists.txt
index 1aa39bf82..5ce79a9fc 100644
--- a/Tools/CMakeLists.txt
+++ b/Tools/CMakeLists.txt
@@ -1,23 +1,28 @@
-IF (ENABLE_WEBKIT2)
- ADD_SUBDIRECTORY(WebKitTestRunner)
-ENDIF ()
+if (ENABLE_WEBKIT2 AND NOT("${PORT}" STREQUAL "GTK"))
+ add_subdirectory(WebKitTestRunner)
+endif ()
-IF ("${PORT}" STREQUAL "Efl")
- ADD_SUBDIRECTORY(EWebLauncher/ControlTheme)
+if ("${PORT}" STREQUAL "Efl")
+ add_subdirectory(ImageDiff)
+ add_subdirectory(EWebLauncher/ControlTheme)
- IF (ENABLE_WEBKIT)
- ADD_SUBDIRECTORY(DumpRenderTree/efl)
- ADD_SUBDIRECTORY(EWebLauncher)
- ENDIF ()
+ if (ENABLE_WEBKIT)
+ add_subdirectory(DumpRenderTree/efl)
+ add_subdirectory(EWebLauncher)
+ endif ()
- IF (ENABLE_WEBKIT2 AND ELEMENTARY_FOUND)
- ADD_SUBDIRECTORY(MiniBrowser/efl)
- ENDIF ()
- ADD_SUBDIRECTORY(DumpRenderTree/TestNetscapePlugIn)
-ELSEIF ("${PORT}" STREQUAL "WinCE")
- ADD_SUBDIRECTORY(WinCELauncher)
-ENDIF()
+ if (ENABLE_WEBKIT2)
+ add_subdirectory(MiniBrowser/efl)
+ endif ()
+ add_subdirectory(DumpRenderTree/TestNetscapePlugIn)
+elseif ("${PORT}" STREQUAL "GTK")
+ if (ENABLE_WEBKIT2)
+ add_subdirectory(MiniBrowser/gtk)
+ endif ()
+elseif ("${PORT}" STREQUAL "WinCE")
+ add_subdirectory(WinCELauncher)
+endif ()
-IF (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)
- ADD_SUBDIRECTORY(TestWebKitAPI)
-ENDIF()
+if (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)
+ add_subdirectory(TestWebKitAPI)
+endif ()
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
deleted file mode 100644
index 818230587..000000000
--- a/Tools/ChangeLog
+++ /dev/null
@@ -1,12911 +0,0 @@
-2013-04-03 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Disable media support using QuickTime if deployment target != SDK
-
- We link to a single libWebKitSystemInterface static lib, so unless the
- deployment target matches the SDK let's not pretend like we'll be able
- to run on anything lower than the SDK version.
-
- Reviewed by Simon Hausmann.
-
- * qmake/mkspecs/features/features.prf:
-
-2013-02-19 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Skip the build with a warning if certain tools cannot be found in the PATH
- https://bugs.webkit.org/show_bug.cgi?id=110215
-
- Reviewed by Tor Arne Vestbø.
-
- Check that gperf, python, ruby, perl, bison and flex are in the PATH before
- continuing the build. Otherwise skip with an error message explaining which
- programs are missing from the build.
-
- * qmake/mkspecs/features/configure.prf:
- * qmake/mkspecs/features/functions.prf:
-
-2013-02-18 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Disable the build if certain configure checks fail
- https://bugs.webkit.org/show_bug.cgi?id=110094
-
- Reviewed by Tor Arne Vestbø.
-
- Allow for the build to be skipped (clear out SUBDIRS) if certain
- configure conditions aren't met.
-
- * qmake/mkspecs/features/configure.prf:
-
-2013-01-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-
- [Qt] The Qt's configuration isn't honoured regarding the use of the system libpng and libjpeg
- https://bugs.webkit.org/show_bug.cgi?id=104909
-
- Reviewed by Simon Hausmann.
-
- To be able to build redistribuable binary packages, Qt's configure switches
- -qt-libpng and -qt-libjpeg are used to avoid having the binaries trying to
- dynamically link to optional system libraries.
- QtWebKit is doing its own configure checks for those libraries, thus adding a
- runtime dependency that might not be fulfilled if the packager's machine had
- those libraries while the user's machine won't.
-
- Since in most cases where WebKit will want to use those system libraries, Qt will
- also be using them, remove these configure tests from WebKit.
-
- * qmake/config.tests/libjpeg/libjpeg.cpp: Removed.
- * qmake/config.tests/libjpeg/libjpeg.pro: Removed.
- * qmake/config.tests/libpng/libpng.cpp: Removed.
- * qmake/config.tests/libpng/libpng.pro: Removed.
- * qmake/mkspecs/features/features.prf:
-
-2013-01-13 Jonathan Liu <net147@gmail.com>
-
- Fix CONFIG missing link_pkgconfig on Windows
- https://bugs.webkit.org/show_bug.cgi?id=106647
-
- Some libraries (e.g. libxslt, libxml2 and sqlite3) fail to link
- properly on Windows because they are added to PKGCONFIG but
- CONFIG does not contain link_pkgconfig.
-
- This is because link_pkgconfig is added in unix/default_pre.prf
- which is only used for UNIX platforms. To fix this, move it to
- the general default_pre.prf.
-
- Reviewed by Simon Hausmann.
-
- * qmake/mkspecs/features/default_pre.prf:
- * qmake/mkspecs/features/unix/default_pre.prf:
-
-2012-12-06 Andras Becsi <andras.becsi@digia.com>
-
- [Qt][Mac] Fix libxslt and libxml2 config tests
- https://bugs.webkit.org/show_bug.cgi?id=104164
-
- Reviewed by Simon Hausmann.
-
- We should not use pkg-config on Mac instead use direct include
- paths and add needed libraries to the linker options to detect
- libxslt and libxml2 provided by the system.
- Previously we would always fall back to qtxmlpatterns.
-
- * qmake/config.tests/libxml2/libxml2.pro:
- * qmake/config.tests/libxslt/libxslt.pro:
-
-2013-01-08 Heikki Paajanen <heikki.paajanen@palm.com>
-
- [Qt] Fix libxml2 config test
- https://bugs.webkit.org/show_bug.cgi?id=106317
-
- Reviewed by Simon Hausmann.
-
- Don't assume standard include/libxml2, libxml-2.0.pc should know
- where it's headers are.
-
- * qmake/config.tests/libxml2/libxml2.cpp: Fix include
-
-2013-01-03 Jonathan Liu <net147@gmail.com>
-
- [Qt] Fix library linking order
- https://bugs.webkit.org/show_bug.cgi?id=105818
-
- Some Qt libraries are linked before the private static libraries
- that depend on them which results in QtWebKit failing to link.
-
- Copy Qt module dependencies from QT to QT_PRIVATE when creating
- module to ensure the Qt libraries are linked after the private
- static libraries that depend on them.
-
- Reviewed by Tor Arne Vestbø.
-
- * qmake/mkspecs/features/default_post.prf:
-
-2012-12-17 Jonathan Liu <net147@gmail.com>
-
- Fix linking of libraries with -Wl,-whole-archive
- https://bugs.webkit.org/show_bug.cgi?id=104436
-
- Reviewed by Simon Hausmann.
-
- If there is more than one library in LIBS linked with
- -Wl,-whole-archive -l... -Wl,-no-whole-archive, qmake tries to
- merge the duplicate flags in LIBS which causes linking to fail.
-
- Add no_smart_library_merge to CONFIG to prevent the duplicate
- flags from being removed when using -Wl,-whole-archive.
-
- * qmake/mkspecs/features/functions.prf:
-
-2012-12-13 Andras Becsi <andras.becsi@digia.com>
-
- [Qt][WK2] Fix painting on Mac with retina display
- https://bugs.webkit.org/show_bug.cgi?id=104574
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Remove setting the devicePixelRatio experimental property
- since the value is now automatically picked up from Qt.
-
- * MiniBrowser/qt/qml/BrowserWindow.qml:
-
-2012-12-12 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix build on Mac
-
- Reviewed by Csaba Osztrogonác.
-
- On Mac OS X we have sqlite as a system library available.
-
- * qmake/mkspecs/features/features.prf:
-
-2012-12-12 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix linkage against SQLite
- https://bugs.webkit.org/show_bug.cgi?id=104781
-
- Reviewed by Csaba Osztrogonác.
-
- Detect SQLite either through pkg-config, from the SQLITE3SRCDIR
- environment variable or from qtbase via a qt5.git build. Bail out early
- with an error message if neither option applies.
-
- This removes the usage of $$QT.core.sources and the dependency on Qt's
- system-sqlite configure setting. We should always favour a system
- library over a copy in Qt.
-
- * qmake/mkspecs/features/features.prf:
-
-2012-12-10 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Use QLibraryInfo::LibraryExecutablesPath unconditionally
- https://bugs.webkit.org/show_bug.cgi?id=104541
-
- Reviewed by Jocelyn Turcotte.
-
- We now depend on a Qt 5 version that is guaranteed to have this API, so we
- can remove the configure checks for it.
-
- * qmake/config.tests/libexecdir/libexecdir.cpp: Removed.
- * qmake/config.tests/libexecdir/libexecdir.pro: Removed.
- * qmake/mkspecs/features/features.prf:
-
-2012-11-29 Tommy Widenflycht <tommyw@google.com>
-
- Speech Recognition API: Update SpeechRecognitionEvent to match the specification
- https://bugs.webkit.org/show_bug.cgi?id=103407
-
- Reviewed by Adam Barth.
-
- Changing the mock to use the new results delivery API.
-
- * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
-
-2012-11-30 Simon Hausmann <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
-
- [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
- https://bugs.webkit.org/show_bug.cgi?id=99314
-
- Reviewed by Tor Arne Vestbø.
-
- This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
- shared libraries.
-
- It's a big refactoring that mostly involves moving WebCore dependent
- code into QtWebKit and accessing it through exported QWebFrameAdapter
- and QWebPageAdapter classes.
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::dump): Adapt to internal API changes.
- * MiniBrowser/qt/MiniBrowser.pro:
- * Scripts/webkitpy/style/checker.py: Adapt Qt exceptions to new paths.
- * Scripts/webkitpy/style/checker_unittest.py:
- (GlobalVariablesTest.test_path_rules_specifier):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * qmake/mkspecs/features/default_post.prf:
- * qmake/mkspecs/features/webkit_modules.prf:
- * qmake/mkspecs/modules/webkitwidgets.prf: Removed.
-
-2012-11-30 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] Unreviewed trivial fix.
-
- Add empty.cpp back, it was removed accidentally by r129092.
-
- * qmake/config.tests/gccdepends/empty.cpp: Added.
-
-2012-11-30 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Add support for prepare_docs and generate_docs
-
- Follow-up to changes in Qt in how documentation is built.
-
- Reviewed by Simon Hausmann.
-
- * qmake/mkspecs/features/default_post.prf:
-
-2012-11-30 Zan Dobersek <zandobersek@gmail.com>
-
- Finally remove webkitpy.common.system.deprecated_logging
- https://bugs.webkit.org/show_bug.cgi?id=103624
-
- Reviewed by Adam Barth.
-
- Remove the deprecated logging module and its unit tests now that such logging is not
- used anymore in webkitpy.
-
- The tee and OutputTee classes are moved into a new module, webkitpy.common.system.outputtee.
- The tee class is renamed to Tee to conform with the usual guidelines.
-
- Only unit test for the Tee class is currently provided as the OutputTee is not currently
- using the webkitpy Filesystem abstraction that would make its functionality testable.
-
- * Scripts/webkitpy/common/system/executive.py: tee (now Tee) is now in a new module.
- (Executive.run_and_throw_if_fail):
- * Scripts/webkitpy/common/system/outputtee.py: Renamed from Tools/Scripts/webkitpy/common/system/deprecated_logging.py.
- (Tee):
- (Tee.__init__):
- (Tee.write):
- (OutputTee):
- (OutputTee.__init__):
- (OutputTee.add_log):
- (OutputTee.remove_log):
- (OutputTee._open_log_file):
- (OutputTee._tee_outputs_to_files):
- * Scripts/webkitpy/common/system/outputtee_unittest.py: Renamed from Tools/Scripts/webkitpy/common/system/deprecated_logging_unittest.py.
- (SimpleTeeTest):
- (SimpleTeeTest.test_simple_tee):
- * Scripts/webkitpy/tool/bot/queueengine.py: OutputTee is now in a new module.
- * Scripts/webkitpy/webkitpy.pyproj: Remove the deprecated_logging module and related unit test file.
-
-2012-11-30 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] Add support for PlatformWebView::simulateRightClick() in TestWebKitAPI
- https://bugs.webkit.org/show_bug.cgi?id=103634
-
- Reviewed by Gyuyoung Kim.
-
- Add support for PlatformWebView::simulateRightClick() and enable
- WebKit2 API test HitTestResultNodeHandle.
-
- * TestWebKitAPI/PlatformEfl.cmake:
- * TestWebKitAPI/efl/PlatformWebView.cpp:
- (TestWebKitAPI::PlatformWebView::simulateRightClick):
- (TestWebKitAPI):
-
-2012-11-30 Mihai Maerean <mmaerean@adobe.com>
-
- [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
- https://bugs.webkit.org/show_bug.cgi?id=101192
-
- Reviewed by Hajime Morita.
-
- Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
-
- Tests: No new tests because there is no functional change.
-
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::applyTo):
-
-2012-11-29 Rafael Weinstein <rafaelw@chromium.org>
-
- [HTMLTemplateElement] Add feature flag
- https://bugs.webkit.org/show_bug.cgi?id=103694
-
- Reviewed by Adam Barth.
-
- This flag will guard the implementation of the HTMLTemplateElement.
- http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-29 Dirk Pranke <dpranke@chromium.org>
-
- Ignore errors when removing directories on win32 during autoinstall
- https://bugs.webkit.org/show_bug.cgi?id=103699
-
- Unreviewed, build fix.
-
- I think this will work on win32; if not, I'll have to actually
- reproduce this :). The problem is that the logilab files
- appear to contain a write-protected file, and deleting those
- is problematic on windows.
-
- * Scripts/webkitpy/common/system/autoinstall.py:
- (AutoInstaller._install):
- (AutoInstaller.install):
-
-2012-11-29 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: autoinstaller is failing on windows
- https://bugs.webkit.org/show_bug.cgi?id=103699
-
- Unreviewed, build fix.
-
- We're attempting to create directories with forward slashes in them;
- this is a no-no on windows.
-
- * Scripts/webkitpy/common/system/autoinstall.py:
- (AutoInstaller._create_scratch_directory_inner):
-
-2012-11-29 Dirk Pranke <dpranke@chromium.org>
-
- Fix python unit tests after r136158 (android port tests failing)
- https://bugs.webkit.org/show_bug.cgi?id=103581
-
- Unreviewed, build fix.
-
- The unit tests apparently weren't ran for this patch; we failed
- to update the mock executive calls out to adb to determine various
- aspects of the environment, and were failing to create drivers.
-
- * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
- (MockRunCommand.mock_run_command_fn):
-
-2012-11-29 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r136175 and r136177.
- http://trac.webkit.org/changeset/136175
- http://trac.webkit.org/changeset/136177
- https://bugs.webkit.org/show_bug.cgi?id=103683
-
- Changes did not correct Windows build. (Requested by bfulgham
- on #webkit).
-
- * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
-
-2012-11-29 Brent Fulgham <bfulgham@webkit.org>
-
- [Windows, WinCairo] Unreviewed build correction. Correct debug
- build case on build machine.
-
- * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
-
-2012-11-29 Brent Fulgham <bfulgham@webkit.org>
-
- [Windows, WinCairo] Unreviewed build correction. Hide the
- unexported 'notSolidColor' symbol when testing against
- the BitmapImage class to avoid having to deal with a
- debug-only symbol in the Windows export definition file.
-
- * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
-
-2012-11-29 Peter Beverloo <peter@chromium.org>
-
- run-perf-tests --chromium-android should not require adb in my path
- https://bugs.webkit.org/show_bug.cgi?id=103581
-
- Reviewed by Eric Seidel.
-
- Remove the need to have "adb" available in the path for Layout and Performance
- tests. We'll determine the versions of the "adb" version in path (if any) and
- the one provided in the Chromium Android checkout. Unless the "adb" available
- in the path is newer, the provided version will be used.
-
- Some other minor nits addressed:
- - The path_to_forwarder/path_to_md5sum should not be in the "private overrides"
- section, as they're not overriding anything and are used by the driver.
- - Make _restart_adb_as_root slightly more robust by waiting for the device
- to come back online regardless of the output.
-
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidPort.__init__):
- (ChromiumAndroidPort.check_build):
- (ChromiumAndroidPort.path_to_adb):
- (ChromiumAndroidPort):
- (ChromiumAndroidPort.path_to_forwarder):
- (ChromiumAndroidPort.path_to_md5sum):
- (ChromiumAndroidPort._path_to_helper):
- (ChromiumAndroidPort._determine_adb_version):
- (ChromiumAndroidPort._get_devices):
- (ChromiumAndroidDriver.__init__):
- (ChromiumAndroidDriver._setup_md5sum_and_push_data_if_needed):
- (ChromiumAndroidDriver._push_executable):
- (ChromiumAndroidDriver._restart_adb_as_root):
-
-2012-11-29 Martin Robinson <mrobinson@igalia.com>
-
- [GTK] [WebKit2] Embed the HTTP authentication dialog into the WebView
- https://bugs.webkit.org/show_bug.cgi?id=103277
-
- Reviewed by Carlos Garcia Campos.
-
- Skip the new WebKit2GtkAuthenticationDialog files so that they are not processed
- during gtkdoc generation.
-
- * gtk/generate-gtkdoc:
- (get_webkit2_options):
-
-2012-11-29 Eric Seidel <eric@webkit.org>
-
- run-perf-tests --chromium-android fails due to Skia INFO logging
- https://bugs.webkit.org/show_bug.cgi?id=103585
-
- Reviewed by Adam Barth.
-
- Ignore all INFO logging from Chromium code.
- Also added some basic testing of the ignored-stderr lines code.
-
- * Scripts/webkitpy/performance_tests/perftest.py:
- (PerfTest):
- * Scripts/webkitpy/performance_tests/perftest_unittest.py:
- (MainTest.test_ignored_stderr_lines):
-
-2012-11-29 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] Add support for PlatformWebView::simulateMouseMove() in TestWebKitAPI
- https://bugs.webkit.org/show_bug.cgi?id=103252
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add support for PlatformWebView::simulateMouseMove() and enable
- WebKit2 API test MouseMoveAfterCrash.
-
- * TestWebKitAPI/PlatformEfl.cmake: Enable MouseMoveAfterCrash API
- test.
- * TestWebKitAPI/efl/PlatformWebView.cpp:
- (TestWebKitAPI::onWebProcessCrashed): Handle 'webprocess,crashed' signal
- to prevent loading an error page since the test case is reloading actual
- page after web process has terminated and recovered.
- (TestWebKitAPI):
- (TestWebKitAPI::PlatformWebView::PlatformWebView):
- (TestWebKitAPI::PlatformWebView::simulateMouseMove): Implemented.
-
-2012-11-29 Andras Becsi <andras.becsi@digia.com>
-
- [Qt] Fix installation of QtWebProcess binary
- https://bugs.webkit.org/show_bug.cgi?id=101735
-
- Reviewed by Simon Hausmann.
-
- Add config test to detect the availability of support
- for "program executables" in Qt (libexec).
-
- This test can be removed after the Qt5 release.
-
- * Tools.pro:
- * qmake/mkspecs/features/features.prf:
- * qmake/config.tests/libexecdir/libexecdir.cpp:
- * qmake/config.tests/libexecdir/libexecdir.pro:
-
-2012-11-29 Eric Seidel <eric@webkit.org>
-
- run-perf-tests does not work when the layout test directory does not exist
- https://bugs.webkit.org/show_bug.cgi?id=103572
-
- Reviewed by Ryosuke Niwa.
-
- Make sure that Profiler() calls maybe_make_directory for the output_dir
- before ever using it. It's a little awkward to create the directory
- from the constructor, but its simplest that way as the various subclasses
- all use the directory at different times.
-
- Since this required having a filesystem in Profiler (and I didn't want
- to grab inside Workspace to get one), I just made Profiler expect a
- SystemHost instead of a separate filesystem, executive and workspace.
-
- * Scripts/webkitpy/common/system/profiler.py:
- (ProfilerFactory.create_profiler):
- (Profiler.__init__):
- (SingleFileOutputProfiler.__init__):
- (GooglePProf.__init__):
- (GooglePProf.profile_after_exit):
- (Instruments.__init__):
- (Instruments.attach_to_pid):
- * Scripts/webkitpy/common/system/profiler_unittest.py:
- (ProfilerFactoryTest.test_basic):
-
-2012-11-28 Vivek Galatage <vivek.vg@samsung.com>
-
- Adding secondary email id
- https://bugs.webkit.org/show_bug.cgi?id=103594
-
- Unreviewed. Adding secondary email.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-28 Kent Tamura <tkent@chromium.org>
-
- garden-o-matic: Use indeterminate <progress> in the status area
- https://bugs.webkit.org/show_bug.cgi?id=103494
-
- Reviewed by Adam Barth.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
- Wrap the "Processing..." message with an indeterminate progress bar.
- We keep the message as a fallback content.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js:
- Follow the above change.
-
-2012-11-28 Nima Ghanavatian <nghanavatian@rim.com>
-
- Adding Nima Ghanavatian to committers.py
- https://bugs.webkit.org/show_bug.cgi?id=103533
-
- Reviewed by Rob Buis.
-
- Adding myself to committers.py as a Committer.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-28 peavo@outlook.com <peavo@outlook.com>
-
- [WinCairo] Crash when requesting favicon.
- https://bugs.webkit.org/show_bug.cgi?id=102689
-
- Reviewed by Brent Fulgham.
-
- * TestWebKitAPI/Tests/WebCore/win: Added.
- * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp: Added.
- (TestWebKitAPI::BitmapImageTest::BitmapImageTest): Allocate frame in constructor.
- (TestWebKitAPI::BitmapImageTest::frameCount): Override frameCount() method.
- (TestWebKitAPI::TEST): Added new test.
- * TestWebKitAPI/config.h: Make sure defines are correct for WinCairo.
- * TestWebKitAPI/win/TestWebKitAPI.vcproj: Added new test.
-
-2012-11-28 Eric Seidel <eric@webkit.org>
-
- run-perf-tests should have a --profile option for easy profiling
- https://bugs.webkit.org/show_bug.cgi?id=99517
-
- Reviewed by Adam Barth.
-
- This is a very basic implementation which works on Mac and Linux
- and makes it trivial for anyone to profile a PerformanceTest.
-
- Currently it's not "hard" to profile a PerformanceTest
- but lowering the barriers to entry here allows all of us to focus
- less on the tools and more on the code.
-
- This also paves the way for adding easy mobile-profiling (e.g. chromium-android)
- which is actually "hard", and this option will make much easier.
-
- * Scripts/webkitpy/common/system/profiler.py: Added.
- (ProfilerFactory):
- (ProfilerFactory.create_profiler):
- (Profiler):
- (Profiler.__init__):
- (Profiler.adjusted_environment):
- (Profiler.attach_to_pid):
- (Profiler.did_stop):
- (SingleFileOutputProfiler):
- (SingleFileOutputProfiler.__init__):
- (GooglePProf):
- (GooglePProf.__init__):
- (GooglePProf.adjusted_environment):
- (GooglePProf.did_stop):
- (Instruments):
- (Instruments.__init__):
- (Instruments.attach_to_pid):
- * Scripts/webkitpy/common/system/profiler_unittest.py: Added.
- (ProfilerFactoryTest):
- (ProfilerFactoryTest.test_basic):
- * Scripts/webkitpy/layout_tests/port/driver.py:
- (Driver.__init__):
- (Driver._start):
- (Driver.stop):
- (Driver.cmd_line):
- * Scripts/webkitpy/performance_tests/perftest.py:
- (PerfTest.parse_output):
- * Scripts/webkitpy/performance_tests/perftest_unittest.py:
- (MainTest.test_parse_output):
- (MainTest.test_parse_output_with_failing_line):
- * Scripts/webkitpy/performance_tests/perftestsrunner.py:
- (PerfTestsRunner._parse_args):
- (PerfTestsRunner.run):
-
-2012-11-28 Zan Dobersek <zandobersek@gmail.com>
-
- Remove deprecated logging usage from QueueEngine
- https://bugs.webkit.org/show_bug.cgi?id=103532
-
- Reviewed by Dirk Pranke.
-
- Replace usage of deprecated logging in webkitpy.tool.bot.queueengine with
- logging through the Logger object. The unit test is modified to reflect
- these changes.
-
- After these changes the deprecated logging (i.e. logging to stderr) is not
- used anymore through webkitpy and can be removed.
-
- * Scripts/webkitpy/tool/bot/queueengine.py:
- (QueueEngine.exit_after_handled_error):
- (QueueEngine.run):
- (QueueEngine._stopping):
- (QueueEngine._sleep):
- * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
- (QueueEngineTest._run_engine):
-
-2012-11-28 Nate Chapin <japhet@chromium.org>
-
- Move empty loading to DocumentLoader, simplify FrameLoader::init()
- https://bugs.webkit.org/show_bug.cgi?id=101512
-
- Reviewed by Adam Barth.
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::updateForCommittedLoad): This function doesn't play nicely with empty urls and incorrectly
- interprets them as a non-empty load. This change is required for
- http/tests/navigation/new-window-redirect-history.html to continue to pass in chromium.
- * TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp: This test relies on a callback that no longer
- is sent for about:blank loads. Hook into didFinishLoadForFrame() instead.
- (TestWebKitAPI::didFinishLoadForFrame):
- (TestWebKitAPI::TEST):
-
-2012-11-28 Sadrul Habib Chowdhury <sadrul@chromium.org>
-
- [chromium] Allow plugins to opt-in to receive synthetic mouse events out of touch events.
- https://bugs.webkit.org/show_bug.cgi?id=103092
-
- Reviewed by Tony Chang.
-
- Update the test web-plugin to be able to opt-in to receive synthesized mouse events created
- from touch events.
-
- * DumpRenderTree/chromium/TestWebPlugin.cpp:
- (parseTouchEventRequestType):
- (TestWebPlugin::TestWebPlugin):
- (TestWebPlugin::initialize):
- * DumpRenderTree/chromium/TestWebPlugin.h:
- (TestWebPlugin):
-
-2012-11-28 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] Add support for PlatformWebView::simulateSpacebarKeyPress() in TestWebKitAPI
- https://bugs.webkit.org/show_bug.cgi?id=103123
-
- Reviewed by Laszlo Gombos.
-
- Add support for PlatformWebView::simulateSpacebarKeyPress().
- This functionality is needed by WebKit2 API test MouseMoveAfterCrash
- which is going to be unskipped in bug #103252.
-
- * TestWebKitAPI/efl/PlatformUtilities.cpp:
- (TestWebKitAPI::Util::sleep):
- * TestWebKitAPI/efl/PlatformWebView.cpp: Use usleep() instead of
- sleep().
- (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
- (TestWebKitAPI):
-
-2012-11-28 Yael Aharon <yael.aharon@intel.com>
-
- Minor cleanup in TestInvocation
- https://bugs.webkit.org/show_bug.cgi?id=103512
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Remove a function declaration that is not defined and not used.
- Fix spelling error in m_webProcessIsUnresponsive.
-
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::TestInvocation):
- (WTR::TestInvocation::invoke):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-11-28 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- Unreviewed. Use my personal email as bugzilla email.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-28 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- Unreviewed. Adding myself to committers.py.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-26 Andrey Adaikin <aandrey@chromium.org>
-
- Unreviewed. Adding myself to committers.py.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-28 Tommy Widenflycht <tommyw@google.com>
-
- Add basic implementation for MediaStreamAudioDestinationNode
- https://bugs.webkit.org/show_bug.cgi?id=101815
-
- Reviewed by Chris Rogers.
-
- Adds a bit of code that exercises the WebKit API.
-
- * DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
- (MockWebMediaStreamSourceConsumer):
- (MockWebMediaStreamSourceConsumer::~MockWebMediaStreamSourceConsumer):
- (MockWebMediaStreamCenter::didCreateMediaStream):
-
-2012-11-28 Matt Falkenhagen <falken@chromium.org>
-
- Unreviewed. Adding myself to committers list.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-27 Li Yin <li.yin@intel.com>
-
- Unreviewed. Adding myself to committers list.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-27 Christophe Dumez <christophe.dumez@intel.com>
-
- Unreviewed. Adding myself to committers.py.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-27 Vivek Galatage <vivek.vg@samsung.com>
-
- Unreviewd. Adding myself to committers list.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-27 Tony Chang <tony@chromium.org>
-
- Bring back partytime!
- https://bugs.webkit.org/show_bug.cgi?id=103466
-
- Reviewed by Adam Barth.
-
- "code 404, message Unknown function images/partytime_gif" since we didn't
- allow .gif or .png files to be served.
-
- * Scripts/webkitpy/tool/servers/gardeningserver.py:
- (GardeningHTTPRequestHandler):
-
-2012-11-27 Adam Barth <abarth@webkit.org>
-
- run-perf-tests fails on Android because of stderr output
- https://bugs.webkit.org/show_bug.cgi?id=103462
-
- Reviewed by Ryosuke Niwa.
-
- The chromium-android port produces some stderr output that causes
- run-perf-tests to get sad and not record the results of the performance
- test. This patch teaches run-perf-test to ignore this output much in
- the same way that it currently ignores some stdout messages.
-
- * Scripts/webkitpy/performance_tests/perftest.py:
- (PerfTest.run):
- (PerfTest._should_ignore_line):
- (PerfTest):
- (PerfTest._should_ignore_line_in_stderr):
- (PerfTest._filter_stderr):
- (PerfTest._should_ignore_line_in_parser_test_result):
-
-2012-11-27 Tony Chang <tony@chromium.org>
-
- Fix garden-o-matic for non-chromium ports
- https://bugs.webkit.org/show_bug.cgi?id=103458
-
- Reviewed by Adam Barth.
-
- I was getting a 403 error when trying to select any non-chromium port.
-
- * Scripts/webkitpy/tool/servers/reflectionhandler.py:
- (ReflectionHandler._handle_request): Use the path without query params.
-
-2012-11-27 Yael Aharon <yael.aharon@intel.com>
-
- [EFL][WK2] 3D pixel tests are failing
- https://bugs.webkit.org/show_bug.cgi?id=102833
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Generate a snapshot of the view in the UI process instead of the web process.
- We have to use Texture Mapper in order to correctly paint 3D transforms etc.
-
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
- (WTR::writeFunction):
- (WTR::paintRepaintRectOverlay):
- (WTR):
- (WTR::TestInvocation::forceRepaintDoneCallback):
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::windowSnapshotImage):
-
-2012-11-27 Adam Barth <abarth@webkit.org>
-
- Make it possible to run performance tests on Chromium Android
- https://bugs.webkit.org/show_bug.cgi?id=103268
-
- Reviewed by Ryosuke Niwa.
-
- Based on a patch by Peter Beverloo.
-
- This patch (almost) makes it possible to run WebKit performance tests
- on the Chromium port for Android. There are a few things I had to do
- in order to make this happen:
-
- 1) The worker number when creating a driver for a port is zero-based
- for layout tests and elsewhere. Android uses this to determine
- which device it has to run on, so make it zero based for performance
- tests as well.
-
- 2) Tests aren't available on the Android device, so we start an HTTP
- server that serves the tests to the device or emulator.
-
- The one shortcoming of this patch is that chromium-android produces
- some stderr output that confuses run-perf-tests. I'll address that
- issue in a subsequent CL. This patch also depends on
- https://codereview.chromium.org/11416182 in order to work.
-
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidPort.start_http_server):
- (ChromiumAndroidDriver._command_from_driver_input):
- * Scripts/webkitpy/performance_tests/perftest.py:
- (ReplayPerfTest.prepare):
- * Scripts/webkitpy/performance_tests/perftestsrunner.py:
- (PerfTestsRunner.__init__):
- (PerfTestsRunner._parse_args):
- (PerfTestsRunner._start_servers):
- (PerfTestsRunner):
- (PerfTestsRunner._stop_servers):
- (PerfTestsRunner.run):
- (PerfTestsRunner._run_tests_set):
-
-2012-11-27 Zan Dobersek <zandobersek@gmail.com>
-
- Remove use of deprecated logging from webkitpy.common and webkitpy.layout_tests
- https://bugs.webkit.org/show_bug.cgi?id=103408
-
- Reviewed by Dirk Pranke.
-
- Remove the use of the deprecated log and error methods by replacing them with
- logging through Python's logging.Logger objects.
-
- This patch covers such changes in webkitpy.common and webkitpy.layout_tests and also
- updates any affected unit test.
-
- * Scripts/webkitpy/common/checkout/changelog.py:
- (ChangeLogEntry._parse_entry):
- * Scripts/webkitpy/common/checkout/checkout.py:
- * Scripts/webkitpy/common/checkout/checkout_unittest.py:
- (CheckoutTest.test_apply_patch):
- * Scripts/webkitpy/common/checkout/deps_mock.py:
- (MockDEPS.write_variable):
- * Scripts/webkitpy/common/checkout/scm/detection.py:
- (SCMDetector.default_scm):
- * Scripts/webkitpy/common/checkout/scm/detection_unittest.py:
- (SCMDetectorTest.test_detect_scm_system):
- * Scripts/webkitpy/common/checkout/scm/git.py:
- (Git._check_git_architecture):
- (Git._commit_on_branch):
- * Scripts/webkitpy/common/checkout/scm/scm.py:
- (SCM.ensure_clean_working_directory):
- (SCM.ensure_no_local_commits):
- (SCM.will.commit_locally_with_message):
- * Scripts/webkitpy/common/checkout/scm/svn.py:
- (SVN.apply_reverse_diff):
- * Scripts/webkitpy/common/net/bugzilla/attachment.py:
- (Attachment._validate_flag_value):
- * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
- (Bugzilla._fetch_bug_page):
- (Bugzilla.bug_id_for_attachment_id):
- (Bugzilla.authenticate):
- (Bugzilla._commit_queue_flag):
- (Bugzilla.add_attachment_to_bug):
- (Bugzilla.add_patch_to_bug):
- (Bugzilla.create_bug):
- (Bugzilla.clear_attachment_flags):
- (Bugzilla.set_flag_on_attachment):
- (Bugzilla.obsolete_attachment):
- (Bugzilla.add_cc_to_bug):
- (Bugzilla.post_comment_to_bug):
- (Bugzilla.close_bug_as_fixed):
- (Bugzilla.reassign_bug):
- (reopen_bug):
- * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
- (MockBugzilla.create_bug):
- (MockBugzilla.reassign_bug):
- (MockBugzilla.set_flag_on_attachment):
- (MockBugzilla.post_comment_to_bug):
- (MockBugzilla.add_attachment_to_bug):
- (MockBugzilla.add_patch_to_bug):
- (MockBugzilla.reopen_bug):
- * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
- (test_add_cc_to_bug):
- (_assert_reopen):
- (test_reopen_bug):
- * Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
- (MockBuilder.force_build):
- * Scripts/webkitpy/common/net/credentials.py:
- (Credentials._run_security_tool):
- * Scripts/webkitpy/common/net/credentials_unittest.py:
- (_assert_security_call):
- * Scripts/webkitpy/common/net/irc/irc_mock.py:
- (MockIRC.post):
- (MockIRC.disconnect):
- * Scripts/webkitpy/common/net/irc/ircproxy.py:
- (IRCProxy.__init__):
- (IRCProxy.disconnect):
- * Scripts/webkitpy/common/net/irc/ircproxy_unittest.py:
- (IRCProxyTest.test_trivial):
- * Scripts/webkitpy/common/net/layouttestresults.py:
- (ORWTResultsHTMLParser._failures_from_fail_row):
- * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
- (test_failures_from_fail_row):
- * Scripts/webkitpy/common/net/networktransaction.py:
- * Scripts/webkitpy/common/net/resultsjsonparser.py:
- (JSONTestResult._tokenize):
- (JSONTestResult._failure_types_from_actual_result):
- * Scripts/webkitpy/common/net/statusserver.py:
- (StatusServer.update_status):
- (StatusServer.update_svn_revision):
- * Scripts/webkitpy/common/net/statusserver_mock.py:
- (MockStatusServer.release_work_item):
- (MockStatusServer.update_work_items):
- (MockStatusServer.submit_to_ews):
- (MockStatusServer.update_status):
- * Scripts/webkitpy/common/net/unittestresults.py:
- (UnitTestResults.results_from_string):
- * Scripts/webkitpy/common/system/executive_mock.py:
- (MockExecutive.running_pids):
- (MockExecutive.run_and_throw_if_fail):
- (MockExecutive.run_command):
- (MockExecutive.popen):
- * Scripts/webkitpy/common/system/user_mock.py:
- (MockUser.confirm):
- (MockUser.open_url):
- * Scripts/webkitpy/common/system/workspace_unittest.py:
- (WorkspaceTest.test_create_zip):
- (WorkspaceTest.test_create_zip_exception):
- * Scripts/webkitpy/common/watchlist/watchlist_mock.py:
- (MockWatchList.determine_cc_and_messages):
- * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
- (ChromiumWinTest.test_setup_environ_for_server_register_cygwin):
- * Scripts/webkitpy/layout_tests/port/efl_unittest.py:
- (EflPortTest.test_show_results_html_file):
- * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
- (GtkPortTest.test_show_results_html_file):
- * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
- (test_show_results_html_file):
- * Scripts/webkitpy/layout_tests/port/port_testcase.py:
- (test_build_driver):
- * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
- (QtPortTest.test_show_results_html_file):
- * Scripts/webkitpy/layout_tests/port/win_unittest.py:
- (WinPortTest.test_show_results_html_file):
- * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
- (XvfbDriverTest.assertDriverStartSuccessful):
- (XvfbDriverTest.test_start_no_pixel_tests):
- (XvfbDriverTest.test_start_pixel_tests):
- (XvfbDriverTest.test_start_arbitrary_worker_number):
- (XvfbDriverTest.test_start_next_worker):
- (XvfbDriverTest.test_stop):
- * Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
- (TestLayoutTestApacheHttpd.test_start_cmd):
- * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
- (test_run_test_pause_before_testing):
- (test_run_memory_test):
- (_test_run_with_json_output):
- (test_run_respects_no_results):
- (test_run_generates_and_show_results_page):
- (test_run_respects_no_show_results):
- * Scripts/webkitpy/tool/bot/feeders_unittest.py:
- (FeedersTest.test_commit_queue_feeder):
- * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
- (FlakyTestReporterTest.test_create_bug_for_flaky_test):
- (test_report_flaky_tests_creating_bug):
- * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
- (IRCCommandTest.test_rollout_updates_working_copy):
- * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
- (IRCBotTest.test_exception_during_command):
- (IRCBotTest.test_hi):
- (IRCBotTest.test_help):
- (IRCBotTest.test_restart):
- (IRCBotTest.test_rollout):
- (IRCBotTest.test_revert):
- (IRCBotTest.test_roll_chromium_deps):
- (IRCBotTest.test_roll_chromium_deps_to_lkgr):
- (IRCBotTest.test_multi_rollout):
- (IRCBotTest.test_rollout_with_r_in_svn_revision):
- (IRCBotTest.test_multi_rollout_with_r_in_svn_revision):
- (IRCBotTest.test_rollout_bananas):
- (IRCBotTest.test_rollout_invalidate_revision):
- (IRCBotTest.test_rollout_invalidate_reason):
- (test_multi_rollout_invalidate_reason):
- (test_rollout_no_reason):
- (test_multi_rollout_no_reason):
- * Scripts/webkitpy/tool/bot/sheriff_unittest.py:
- (SheriffTest.test_post_blame_comment_on_bug):
- * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
- (ApplyWatchListLocalTest.test_args_parsing):
- (test_args_parsing_with_bug):
- * Scripts/webkitpy/tool/commands/download_unittest.py:
- (test_land_cowboy):
- (test_check_style):
- (test_create_rollout):
- (test_create_rollout_resolved):
- (test_rollout):
- * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
- (AbstractEarlyWarningSystemTest.test_failing_tests_message):
- (EarlyWarningSytemTest._default_expected_logs):
- (EarlyWarningSytemTest._test_builder_ews):
- (EarlyWarningSytemTest._test_testing_ews):
- * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
- (OpenBugsTest.test_args_parsing):
- * Scripts/webkitpy/tool/commands/queries_unittest.py:
- (QueryCommandsTest.test_bugs_to_commit):
- (QueryCommandsTest.test_patches_in_commit_queue):
- * Scripts/webkitpy/tool/commands/queues_unittest.py:
- (FeederQueueTest.test_feeder_queue):
- (AbstractPatchQueueTest.test_next_patch):
- (AbstractPatchQueueTest.test_upload_results_archive_for_patch):
- (CommitQueueTest.test_commit_queue):
- (test_commit_queue_failure):
- (test_commit_queue_failure_with_failing_tests):
- (test_rollout):
- (test_rollout_lands):
- (test_auto_retry):
- (test_manual_reject_during_processing):
- (test_report_flaky_tests):
- (StyleQueueTest.test_style_queue_with_style_exception):
- (test_style_queue_with_watch_list_exception):
- * Scripts/webkitpy/tool/commands/queuestest.py:
- (QueuesTest._default_begin_work_queue_logs):
- * Scripts/webkitpy/tool/commands/roll_unittest.py:
- (RollCommandsTest.test_update_chromium_deps):
- * Scripts/webkitpy/tool/commands/upload_unittest.py:
- (UploadCommandsTest.test_assign_to_committer):
- (test_post):
- (test_attach_to_bug):
- (test_attach_to_bug_no_description_or_comment):
- (test_land_safely):
- (test_prepare):
- (test_upload):
- (test_mark_bug_fixed):
- * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
- (ApplyWatchListTest.test_apply_watch_list_local):
- * Scripts/webkitpy/tool/steps/commit_unittest.py:
- (CommitTest._test_check_test_expectations):
- * Scripts/webkitpy/tool/steps/runtests_unittest.py:
- (RunTestsTest.test_webkit_run_unit_tests):
- * Scripts/webkitpy/tool/steps/steps_unittest.py:
- (StepsTest._assert_step_output_with_bug):
- (StepsTest._assert_post_diff_output_for_bug):
- (StepsTest.test_post_diff):
- (StepsTest.test_post_diff_for_commit):
- (StepsTest.test_ensure_bug_is_open_and_assigned):
- (StepsTest.test_runtests_args):
- * Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py:
- (SuggestReviewersTest.test_basic):
- * Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py:
- (ValidateChangeLogsTest._assert_start_line_produces_output):
-
-2012-11-27 Pratik Solanki <psolanki@apple.com>
-
- objc/objc-runtime.h does not exist on all PLATFORM(MAC)
- https://bugs.webkit.org/show_bug.cgi?id=101780
-
- Reviewed by Brent Fulgham.
-
- Clean up header includes so we don't include objc/objc-runtime.h.
-
- * DumpRenderTree/mac/DumpRenderTree.mm:
- * DumpRenderTree/mac/ObjCPlugin.m:
- * TestWebKitAPI/mac/InstanceMethodSwizzler.h:
- * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
-
-2012-11-27 Marja Hölttä <marja@chromium.org>
-
- Add callbacks to the FrameLoaderClient when a resource is requested
- https://bugs.webkit.org/show_bug.cgi?id=92761
-
- Reviewed by Adam Barth.
-
- In Chromium, when an extension script cancels a network
- request (which happens out of process), we'd like to
- notify content scripts running on the current page about
- which elements failed to load because the requests were
- cancelled (as opposed to e.g. the network request just
- didn't work). Since the resource request itself does not
- carry any information what DOM element is was made for,
- currently a content script has to search the DOM tree and
- guess which requests will be cancelled by its counter
- part. By adding these callbacks, the embedder can make
- this connection explictly.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::DRTTestRunner):
- (DRTTestRunner::dumpResourceRequestCallbacks):
- (DRTTestRunner::reset):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- (DRTTestRunner::setShouldDumpResourceRequestCallbacks):
- (DRTTestRunner::shouldDumpResourceRequestCallbacks):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::shouldDumpResourceRequestCallbacks):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::willRequestResource):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-11-27 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
-
- [GStreamer] Verify if GStreamer was previously initialized
- https://bugs.webkit.org/show_bug.cgi?id=103151
-
- Reviewed by Philippe Normand.
-
- This patch adds the gst_init() in GtkLauncher, so we can add the
- GStreamer options in the command line through
- gst_init_get_option_group().
-
- This approach is not valid for MiniBrowser because it uses WebKit2,
- where the GStreamer backend lives in the web process, which is
- different from the UI process.
-
- * GNUmakefile.am:
- * GtkLauncher/main.c:
- (main):
-
-2012-11-27 Andras Becsi <andras.becsi@digia.com>
-
- [Qt] Fix the build with new Qt5 hash
- https://bugs.webkit.org/show_bug.cgi?id=103406
-
- Reviewed by Csaba Osztrogonác.
-
- Remove references to deprecated QApplication::GuiServer which
- has been removed, and use QStyleFactory::create instead of
- instantiating a QWindowsStyle directly since it is about to
- become an internal class.
-
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::LauncherApplication):
- * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
- (WTR::InjectedBundle::platformInitialize):
-
-2012-11-27 Sadrul Habib Chowdhury <sadrul@chromium.org>
-
- [style] Add a style-check for enum-member names
- https://bugs.webkit.org/show_bug.cgi?id=103157
-
- Reviewed by Daniel Bates.
-
- * Scripts/webkitpy/style/checkers/cpp.py:
- (_EnumState):
- (_EnumState.__init__):
- (_EnumState.process_clean_line):
- (check_enum_casing):
- (check_style):
- (process_line):
- (_process_lines):
- (CppChecker):
- * Scripts/webkitpy/style/checkers/cpp_unittest.py:
- (NoNonVirtualDestructorsTest.test_enum_casing):
- (NoNonVirtualDestructorsTest.test_internal_braces.Foo):
-
-2012-11-26 Ryuan Choi <ryuan.choi@gmail.com>
-
- [EFL][jhbuild] Disable unnecessary options of elementary module
- https://bugs.webkit.org/show_bug.cgi?id=103360
-
- Reviewed by Gyuyoung Kim.
-
- When jhbuild configures elementary, unnecessary options may be enabled by
- user installed modules and it causes build break.
-
- * efl/jhbuild.modules:
- Added --disable-emap --disable-ethumb --disable-eweather to elementary.
-
-2012-11-26 Varun Jain <varunjain@chromium.org>
-
- LongPress and LongTap gestures should start drag/drop and open context menu respectively.
- https://bugs.webkit.org/show_bug.cgi?id=101545
-
- Reviewed by Antonio Gomes.
-
- For LongPress, we simulate drag by sending a mouse down and mouse drag
- events. If a drag is not started (because maybe there is no draggable
- element), then we show context menu instead (which is the current
- behavior for LongPress). For LongTap, we use the existing functions that
- LongPress uses to summon the context menu. LongPress initiated drag and
- drop can be enabled/disabled by the platform using the Setting
- touchDragDropEnabled which is disabled by default.
-
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::EventSender):
- (WebTestRunner::EventSender::gestureLongTap):
- (WebTestRunner::EventSender::gestureEvent):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
- (EventSender):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- (WebTestRunner::TestRunner::TestRunner):
- (WebTestRunner::TestRunner::setTouchDragDropEnabled):
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- (TestRunner):
-
-2012-11-26 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add setting to enable / disable HTML5 local storage functionality
- https://bugs.webkit.org/show_bug.cgi?id=103224
-
- Reviewed by Laszlo Gombos.
-
- Add --local-storage command line argument to MiniBrowser to
- explicitely disable HTML5 local storage functionality. This
- is useful for testing purposes.
-
- * MiniBrowser/efl/main.c:
- (window_create):
- (elm_main):
-
-2012-11-26 Zan Dobersek <zandobersek@gmail.com>
-
- Remove use of deprecated logging from most of webkitpy.tool
- https://bugs.webkit.org/show_bug.cgi?id=103180
-
- Reviewed by Dirk Pranke.
-
- Remove calls to log and error methods of the deprecated_logging module, replacing them
- by using Python's Logger objects. This patch covers the switch in all of webkitpy.tool
- except the QueueEngine.
-
- Unit tests are adjusted for these changes, moving output from expected stderr to expected logs.
-
- * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
- (MockCommitQueue.run_command):
- (MockCommitQueue.command_passed):
- (MockCommitQueue.command_failed):
- (MockCommitQueue.report_flaky_tests):
- (MockCommitQueue.archive_last_test_results):
- (CommitQueueTaskTest._run_through_task):
- (CommitQueueTaskTest.test_success_case):
- (test_fast_success_case):
- (test_clean_failure):
- (test_update_failure):
- (test_apply_failure):
- (test_validate_changelog_failure):
- (test_build_failure):
- (test_red_build_failure):
- (test_flaky_test_failure):
- (test_failed_archive):
- (test_double_flaky_test_failure):
- (test_test_failure):
- (test_red_test_failure):
- (test_very_red_tree_retry):
- (test_red_tree_patch_rejection):
- (test_land_failure):
- * Scripts/webkitpy/tool/bot/feeders.py:
- (CommitQueueFeeder._update_work_items):
- (EWSFeeder.feed):
- * Scripts/webkitpy/tool/bot/feeders_unittest.py:
- * Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
- (LayoutTestResultsReader.archive):
- * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
- (test_archive_last_layout_test_results):
- * Scripts/webkitpy/tool/bot/sheriff.py:
- * Scripts/webkitpy/tool/commands/abstractsequencedcommand.py:
- (AbstractSequencedCommand.execute):
- * Scripts/webkitpy/tool/commands/commandtest.py:
- (CommandsTest.assert_execute_outputs):
- * Scripts/webkitpy/tool/commands/download.py:
- (AbstractPatchProcessingCommand._process_patch.execute):
- (ProcessBugsMixin._fetch_list_of_patches_to_process):
- (ProcessURLsMixin._fetch_list_of_patches_to_process):
- (AbstractRolloutPrepCommand._commit_info):
- * Scripts/webkitpy/tool/commands/download_unittest.py:
- (AbstractRolloutPrepCommandTest.test_commit_info):
- (DownloadCommandsTest.test_build):
- (DownloadCommandsTest.test_build_and_test):
- (test_apply_attachment):
- (test_apply_from_bug):
- (test_apply_watch_list):
- (test_land):
- (test_land_red_builders):
- (test_check_style):
- (test_build_attachment):
- (test_land_attachment):
- (test_land_from_bug):
- (test_land_from_url):
- (test_prepare_rollout):
- (test_create_rollout):
- (test_create_rollout_resolved):
- (test_rollout):
- * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
- (AbstractEarlyWarningSystem.handle_script_error.does):
- * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
- (EarlyWarningSytemTest._default_expected_stderr):
- (EarlyWarningSytemTest._default_expected_logs):
- (EarlyWarningSytemTest._test_testing_ews):
- * Scripts/webkitpy/tool/commands/openbugs.py:
- (OpenBugs.execute):
- * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
- (OpenBugsTest.test_args_parsing):
- * Scripts/webkitpy/tool/commands/perfalizer.py:
- (Perfalizer.handle_unexpected_error):
- * Scripts/webkitpy/tool/commands/queries.py:
- (PatchesInCommitQueue.execute):
- (PatchesToCommitQueue._needs_commit_queue):
- * Scripts/webkitpy/tool/commands/queries_unittest.py:
- (QueryCommandsTest.test_bugs_to_commit):
- (QueryCommandsTest.test_patches_in_commit_queue):
- (QueryCommandsTest.test_patches_to_commit_queue):
- * Scripts/webkitpy/tool/commands/queues.py:
- (AbstractQueue._cc_watchers):
- (AbstractQueue.begin_work_queue):
- (FeederQueue.handle_unexpected_error):
- (CommitQueue.handle_script_error):
- (AbstractReviewQueue.handle_unexpected_error):
- (AbstractReviewQueue.handle_script_error):
- * Scripts/webkitpy/tool/commands/queues_unittest.py:
- (test_auto_retry):
- * Scripts/webkitpy/tool/commands/queuestest.py:
- (QueuesTest.assert_outputs):
- (QueuesTest._default_begin_work_queue_stderr):
- (QueuesTest):
- (QueuesTest._default_begin_work_queue_logs):
- (QueuesTest.assert_queue_outputs):
- * Scripts/webkitpy/tool/commands/roll_unittest.py:
- (RollCommandsTest.test_update_chromium_deps):
- (test_update_chromium_deps_older_revision):
- * Scripts/webkitpy/tool/commands/sheriffbot.py:
- (SheriffBot.handle_unexpected_error):
- * Scripts/webkitpy/tool/commands/stepsequence.py:
- (StepSequence.run_and_handle_errors):
- * Scripts/webkitpy/tool/commands/upload.py:
- (AssignToCommitter._assign_bug_to_last_patch_attacher):
- (AbstractPatchUploadingCommand._prepare_state):
- (PostCommits.execute):
- (MarkBugFixed._determine_bug_id_and_svn_revision):
- (MarkBugFixed.execute):
- (CreateBug.create_bug_from_commit):
- (CreateBug.execute):
- * Scripts/webkitpy/tool/commands/upload_unittest.py:
- (test_obsolete_attachments):
- (test_land_safely):
- (test_mark_bug_fixed):
- * Scripts/webkitpy/tool/multicommandtool.py:
- (Command.check_arguments_and_execute):
- (MultiCommandTool.main):
- * Scripts/webkitpy/tool/multicommandtool_unittest.py:
- (CommandTest.test_required_arguments):
- * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py:
- (AddSvnMimetypeForPng.run):
- * Scripts/webkitpy/tool/steps/applypatch.py:
- (ApplyPatch.run):
- * Scripts/webkitpy/tool/steps/build.py:
- (Build.run):
- * Scripts/webkitpy/tool/steps/checkstyle.py:
- * Scripts/webkitpy/tool/steps/closebug.py:
- (CloseBug.run):
- * Scripts/webkitpy/tool/steps/closebugforlanddiff.py:
- (CloseBugForLandDiff.run):
- * Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
- (CloseBugForLandDiffTest.test_empty_state):
- * Scripts/webkitpy/tool/steps/commit.py:
- (Commit.run):
- * Scripts/webkitpy/tool/steps/commit_unittest.py:
- (CommitTest._test_check_test_expectations):
- * Scripts/webkitpy/tool/steps/ensurelocalcommitifneeded.py:
- (EnsureLocalCommitIfNeeded.run):
- * Scripts/webkitpy/tool/steps/obsoletepatches.py:
- (ObsoletePatches.run):
- * Scripts/webkitpy/tool/steps/preparechangelog.py:
- (PrepareChangeLog.run):
- * Scripts/webkitpy/tool/steps/reopenbugafterrollout.py:
- (ReopenBugAfterRollout.run):
- * Scripts/webkitpy/tool/steps/runtests.py:
- (RunTests.run):
- * Scripts/webkitpy/tool/steps/runtests_unittest.py:
- (RunTestsTest.test_webkit_run_unit_tests):
- * Scripts/webkitpy/tool/steps/steps_unittest.py:
- (StepsTest.test_update_step):
- (StepsTest.test_runtests_args):
- * Scripts/webkitpy/tool/steps/update.py:
- (Update.run):
- * Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py:
- (UpdateChangeLogsWithReviewerTest.test_guess_reviewer_from_bug):
- (UpdateChangeLogsWithReviewerTest.test_guess_reviewer_from_multipatch_bug):
- * Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py:
- (UpdateChangeLogsWithReviewer._guess_reviewer_from_bug):
- (UpdateChangeLogsWithReviewer.run):
- * Scripts/webkitpy/tool/steps/updatechromiumdeps.py:
- (UpdateChromiumDEPS._validate_revisions):
- (UpdateChromiumDEPS.run):
- * Scripts/webkitpy/tool/steps/validatechangelogs.py:
- (ValidateChangeLogs._check_changelog_diff):
- (ValidateChangeLogs.run):
- * Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py:
- (ValidateChangeLogsTest._assert_start_line_produces_output):
- * Scripts/webkitpy/tool/steps/validatereviewer.py:
- (ValidateReviewer.run):
-
-2012-11-26 Zan Dobersek <zandobersek@gmail.com>
-
- Coverage testing in webkitpy should omit some paths
- https://bugs.webkit.org/show_bug.cgi?id=103267
-
- Reviewed by Dirk Pranke.
-
- Omit testing coverage of any file under /usr directory and any file
- that is of third party origin and was autoinstalled.
-
- * Scripts/webkitpy/test/main.py:
- (Tester._run_tests):
-
-2012-11-26 Jaehun Lim <ljaehun.lim@samsung.com>
-
- Text Autosizing: Add Text Autosizing APIs for WK2
- https://bugs.webkit.org/show_bug.cgi?id=100633
-
- Reviewed by Sam Weinig.
-
- Add test cases for Text Autosizing in WKPreferences.
-
- * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
- (TestWebKitAPI::TEST):
-
-2012-11-26 Pierre Rossi <pierre.rossi@gmail.com>
-
- [Qt] REGRESSION(r135575): It made all tests assert
- https://bugs.webkit.org/show_bug.cgi?id=103169
-
- Reviewed by Simon Hausmann.
-
- This fixes another regression introduced in r135515:
- initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
- since it can be called from WebKit2 to initialize QStyle for testing.
- This would then lead to things such as PlatformStrategies being
- initialized twice.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp: Also propagate the change to DRT this time.
- (WebCore::DumpRenderTree::DumpRenderTree):
-
-2012-11-24 Zan Dobersek <zandobersek@gmail.com>
-
- Add the --order option to NRWT
- https://bugs.webkit.org/show_bug.cgi?id=102229
-
- Reviewed by Dirk Pranke.
-
- The --order option controls in what order the gathered tests will be run.
- There are 3 options:
- - natural, the tests are sorted in natural order,
- - random, the tests are sorted in random order,
- - none, the tests are kept in the order in which they were specified through
- arguments or the test list.
-
- The natural option is the default one and maintains the current behavior.
-
- The none option is primarily intended to be used with the --test-list option,
- with the test list file expected to list specific test names.
- When a directory is specified as one of the paths from under which tests should
- be gathered and the none option is used, that path will expand to all the tests
- under it, with these tests sorted in the natural order.
-
- Using --order=random duplicated the behavior of the --randomize-order option, so
- the latter is removed.
-
- This patch also incorporates the change with which makes it is possible to specify
- a test via arguments or the test list multiple tests and then have the test run
- that many times.
-
- * Scripts/webkitpy/common/find_files.py:
- (find): Accept an optional sorting key that is used to sort files found in the directories
- that the given paths specify.
- (_normalized_find): Both paths that are then searched for the tests and the tests that
- were found are now kept in lists. This makes it possible to run a test multiple times
- by specifying it multiple times through arguments or the test list file.
- (_normalized_find.sort_by_directory_key):
- * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
- (LayoutTestFinder.find_tests): Keep the paths where we should search for tests in a list.
- (LayoutTestFinder.skip_tests): Subtracting from a set of paths is necessary.
- * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
- (LayoutTestRunner.__init__): The Sharder class no longer needs a test path separator.
- (Sharder.__init__): Ditto.
- (Sharder._resize_shards):
- * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
- (SharderTests.get_shards): Modify the Shader initializing as required.
- (SharderTests.test_multiple_locked_shards): The natural sorting and test name key unit tests
- are now moved to the base Port unit tests.
- * Scripts/webkitpy/layout_tests/controllers/manager.py:
- (Manager._prepare_lists): Keep the test names in a list. Order that list as specified by
- the new --order option.
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.tests): This method should now return a list of all the tests found in the specified
- paths.
- (Port._real_tests): A list is required, so no conversion to a set is made.
- (Port):
- (Port.test_key): Place this method here for now, but it should really move into a separate
- module.
- (Port._natural_sort_key): Ditto.
- (Port._natural_sort_key.tryint):
- (Port._virtual_tests): A list is required, so the function now operates on that rather than
- on a set.
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_find_with_skipped_directories_2): Adjust the test case to check for an empty
- list rather than an empty set.
- (PortTest.test_dont_require_http_server):
- (NaturalCompareTest): The natural sorting unit tests are placed here for now.
- (NaturalCompareTest.assert_cmp):
- (NaturalCompareTest.test_natural_compare):
- (KeyCompareTest): The test name key unit tests are placed here for now.
- (KeyCompareTest.assert_cmp):
- (KeyCompareTest.test_test_key):
- * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
- (parse_args): Remove the --randomize-order option, it's now possible to replicate its behavior
- by using --order=random.
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: Add unit tests covering
- various aspects of this change.
- (MainTest.test_natural_order):
- (MainTest):
- (MainTest.test_natural_order_test_specified_multiple_times):
- (MainTest.test_random_order):
- (MainTest.test_random_order_test_specified_multiple_times):
- (MainTest.test_no_order):
- (MainTest.test_no_order_test_specified_multiple_times):
- (MainTest.test_no_order_with_directory_entries_in_natural_order):
- * Scripts/webkitpy/tool/commands/queries.py:
- (PrintExpectations.execute): Operate on a set of tests when printing out expectations.
-
-2012-11-24 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r135600.
- http://trac.webkit.org/changeset/135600
- https://bugs.webkit.org/show_bug.cgi?id=103173
-
- It made EFL API test is failed (Requested by gyuyoung_mbp on
- #webkit).
-
- * TestWebKitAPI/PlatformEfl.cmake:
- * TestWebKitAPI/efl/PlatformUtilities.cpp:
- (TestWebKitAPI::Util::sleep):
- * TestWebKitAPI/efl/PlatformWebView.cpp:
-
-2012-11-23 Alexis Menard <alexis@webkit.org>
-
- [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing.
- https://bugs.webkit.org/show_bug.cgi?id=102104
-
- Reviewed by Julien Chaffraix.
-
- Protect the new feature behind a feature flag.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
-
-2012-11-23 Mario Sanchez Prada <mario@webkit.org>
-
- Unreviewed. Update my e-mail address.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-23 Mateusz Leszko <m.leszko@samsung.com>
-
- [EFL][GTK] Adapt accessibility feature to WebKitTestRunner.
- https://bugs.webkit.org/show_bug.cgi?id=100757
-
- Reviewed by Laszlo Gombos.
-
- Allow to build accessibility feature in WebkitTestRunner for EFL Platform.
- Updating CMake files due to changes from Bug 99011.
-
- * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
- (WTR::AccessibilityController::AccessibilityController):
- (WTR):
- * WebKitTestRunner/InjectedBundle/AccessibilityController.h:
- (AccessibilityController):
- * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
- (WTR):
- * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
- (AccessibilityUIElement):
- * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: - Removed gtk/gtk.h dependency.
- * WebKitTestRunner/PlatformEfl.cmake: - Adding atk includes.
-
-2012-11-16 Yury Semikhatsky <yurys@chromium.org>
-
- Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
- https://bugs.webkit.org/show_bug.cgi?id=102510
-
- Reviewed by Pavel Feldman.
-
- Added missing includes.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-11-23 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] Add support for PlatformWebView::simulateSpacebarKeyPress() in TestWebKitAPI
- https://bugs.webkit.org/show_bug.cgi?id=103123
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add support for PlatformWebView::simulateSpacebarKeyPress() and enable
- WebKit2 API test ResponsivenessTimerDoesntFireEarly.
-
- * TestWebKitAPI/PlatformEfl.cmake: Enable ResponsivenessTimerDoesntFireEarly
- test.
- * TestWebKitAPI/efl/PlatformUtilities.cpp:
- (TestWebKitAPI::Util::sleep): Use usleep() instead of sleep since the
- test case is passing 0.5 seconds to sleep.
- * TestWebKitAPI/efl/PlatformWebView.cpp:
- (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress): Implemented.
- (TestWebKitAPI):
-
-2012-11-23 Wojciech Bielawski <w.bielawski@samsung.com>
-
- [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick()
- https://bugs.webkit.org/show_bug.cgi?id=86881
-
- Reviewed by Kenneth Rohde Christiansen.
-
- eventSender object extended with contextClick() method in WebKitTestRunner.
- contextClick() method returns an array of menu items objects with field 'title' containing title of single
- context menu entry. According to some tests menu items objects shall also support 'click()' method, but it's not
- delivered in this patch.
-
- * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
- * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
- (WTR::EventSendingController::contextClick):
- (WTR):
- * WebKitTestRunner/InjectedBundle/EventSendingController.h:
- (EventSendingController):
-
-2012-11-23 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Compiling against QtWebkit API requires QT_DLL to be defined
- https://bugs.webkit.org/show_bug.cgi?id=102942
-
- Reviewed by Tor Arne Vestbø.
-
- Remove the requirement of having QT_DLL defined in order for the QWEBKIT_EXPORT
- macro to be defined as Q_DECL_IMPORT. Instead unify the export macro definition
- to follow the same rules as other Qt 5 modules, with the exception that instead of
- QT_BUILD_WEBKIT_LIB we continue to use BUILDING_WEBKIT, because that's used also
- in other cross-platform header files to determine the correct meaning of export
- macros.
-
- * qmake/mkspecs/features/default_post.prf:
- * qmake/mkspecs/features/win32/default_post.prf:
-
-2012-11-23 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] QWebPage::shouldInterruptJavaScript should be virtual in Qt 5
- https://bugs.webkit.org/show_bug.cgi?id=103111
-
- Reviewed by Kenneth Rohde Christiansen.
-
- This function was added as a slot during Qt 4.x times because adding
- virtual functions breaks binary compatibility. This constraint is gone
- with the initial release of WebKit with Qt 5, and therefore we can
- make it virtual now.
-
- The change is fully source compatible as existing "re-implementations"
- as slots will now be called through it being a virtual function. They
- become unused slots.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.h:
- (WebCore::WebPage::shouldInterruptJavaScript):
- (WebPage):
- * QtTestBrowser/webpage.h:
- (WebPage):
-
-2012-11-22 Peter Beverloo <peter@chromium.org>
-
- [Chromium] Return an accurate exit code when running Android suites, and wait after restarting adb as root
- https://bugs.webkit.org/show_bug.cgi?id=103065
-
- Reviewed by Dirk Pranke.
-
- This addresses two further reliability issues in the Android test running
- scripts. Firstly, the run_tests.py script needs to have the --exit_code
- argument passed in order to return non-zero codes, which we need for the
- build master to distinguish failures from successful runs.
-
- Secondly, it modifies the layout test runner to briefly wait (through
- the wait-for-device command) after requesting a device to switch to root
- mode. Without this waiting period, commands might get lost and thereby
- unexpectedly fail.
-
- * Scripts/run-api-tests:
- * Scripts/run-chromium-webkit-unit-tests:
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidDriver._setup_test):
- (ChromiumAndroidDriver._restart_adb_as_root):
-
-2012-11-22 Simon Hausmann <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
-
- [Qt] Separate QWidget dependant code into separate WebKitWidgets static library
- https://bugs.webkit.org/show_bug.cgi?id=102800
-
- Reviewed by Tor Arne Vestbø.
-
- This patch separates code that needs to use QWidget related APIs in
- WebKit/qt/WebCoreSupport and Api from code that doesn't. This means for
- example FrameLoaderClientQt.cpp remains in the WebKit1 static library,
- while qwebpage.cpp and qwebframe.cpp become part of the WebKitWidgets
- static library. WebKit1 is compiled without QT += widgets and therefore
- any widget related dependency has been moved "up" and out of WebKit1 into
- the WebKitWidgets library.
-
- Between the code in WebKit.a and WebKitWidgets.a new adapters and
- interfaces have been introduced, such as QWebPageAdapter and
- QWebFrameAdapter. QWebPageAdapter, when used from WebKit1, is a way to
- call out into the API layer, implemented by QWebPage (QWebPagePrivate).
- The other way around if QWebPage wants to access WebCore or
- WebCoreSupport related functionality, it will go through
- QWebPageAdapater (as base class). The separation in the direction up
- into the API layer is complete with this patch, no code in WebKit1
- depends on QtWidgets. The separation the other way around, code in the
- API layer not using any WebCore types, is not complete yet.
-
- Some classes such as QWebSettings, QWebElement or
- DumpRenderTreeSupportQt remain in WebKit1. While they are API layer,
- they do not depend on widget related Qt APIs and they make much more
- use of WebCore internal APIs and therefore are easier to keep in
- WebKit1.
-
- In the future we plan to place a real shared library boundary between
- WebKit1 and WebKitWidgets, by keeping the WebKit1 static library as
- part of the QtWebKit shared library and by turning the WebKitWidgets
- static library into a shared one.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::WebPage::resetSettings):
- (WebCore::WebPage::createWindow):
- (WebCore::DumpRenderTree::DumpRenderTree):
- (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
- (WebCore::DumpRenderTree::initJSObjects):
- (WebCore::DumpRenderTree::dumpFrameScrollPosition):
- (WebCore::DumpRenderTree::dumpFramesAsText):
- (WebCore::DumpRenderTree::dump):
- (WebCore::DumpRenderTree::createWindow):
- (WebCore::DumpRenderTree::pageAdapter):
- (WebCore):
- (WebCore::DumpRenderTree::mainFrameAdapter):
- * DumpRenderTree/qt/DumpRenderTreeQt.h:
- (DumpRenderTree):
- * DumpRenderTree/qt/EventSenderQt.cpp:
- (EventSender::contextClick):
- (EventSender::scalePageBy):
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- (TestRunner::reset):
- (TestRunner::display):
- (TestRunner::closeWebInspector):
- (TestRunner::showWebInspector):
- (TestRunner::evaluateInWebInspector):
- (TestRunner::setFrameFlatteningEnabled):
- (TestRunner::goBack):
- (TestRunner::setDefersLoading):
- (TestRunner::pauseAnimationAtTimeOnElementWithId):
- (TestRunner::pauseTransitionAtTimeOnElementWithId):
- (TestRunner::numberOfActiveAnimations):
- (TestRunner::setCaretBrowsingEnabled):
- (TestRunner::setAuthorAndUserStylesEnabled):
- (TestRunner::callShouldCloseOnWebView):
- (TestRunner::setSmartInsertDeleteEnabled):
- (TestRunner::setSelectTrailingWhitespaceEnabled):
- (TestRunner::execCommand):
- (TestRunner::isCommandEnabled):
- (TestRunner::findString):
- (TestRunner::elementDoesAutoCompleteForElementWithId):
- (TestRunner::setMockDeviceOrientation):
- (TestRunner::setGeolocationPermission):
- (TestRunner::numberOfPendingGeolocationPermissionRequests):
- (TestRunner::setMockGeolocationPositionUnavailableError):
- (TestRunner::setMockGeolocationPosition):
- (TestRunner::evaluateScriptInIsolatedWorld):
- (TestRunner::addUserStyleSheet):
- (TestRunner::setMinimumTimerInterval):
- * DumpRenderTree/qt/TextInputControllerQt.cpp:
- (TextInputController::selectedRange):
- (TextInputController::firstRectForCharacterRange):
- (TextInputController::unmarkText):
- * DumpRenderTree/qt/WorkQueueItemQt.cpp:
- (LoadAlternateHTMLStringItem::invoke):
- * qmake/mkspecs/features/default_post.prf:
- * qmake/mkspecs/features/production_build.prf:
- * qmake/mkspecs/features/webkit_modules.prf:
- * qmake/mkspecs/modules/webkitwidgets.prf: Added.
-
-2012-11-22 Christophe Dumez <christophe.dumez@intel.com>
-
- WebKitTestRunner needs layoutTestController.setCacheModel
- https://bugs.webkit.org/show_bug.cgi?id=42684
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add support for testRunner.setCacheModel to WebKitTestRunner.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::beginTesting):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::setCacheModel):
- (WTR):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
-
-2012-11-22 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WTR] TestController::platformRunUntil should not do busy waiting
- https://bugs.webkit.org/show_bug.cgi?id=101327
-
- Reviewed by Simon Hausmann.
-
- Avoid busy waiting for events in platformRunUntil while making
- sure we don't change the behavior of modal event loops.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::~TestController):
- * WebKitTestRunner/TestController.h:
- (TestController):
- * WebKitTestRunner/efl/TestControllerEfl.cpp:
- (WTR::TestController::platformDestroy):
- (WTR):
- * WebKitTestRunner/gtk/TestControllerGtk.cpp:
- (WTR::TestController::platformDestroy):
- (WTR):
- * WebKitTestRunner/mac/TestControllerMac.mm:
- (WTR::TestController::platformDestroy):
- (WTR):
- * WebKitTestRunner/qt/TestControllerQt.cpp:
- (TestController::RunLoop): Helper class to handle
- the event loop logic
- (WTR):
- (WTR::TestController::RunLoop::RunLoop):
- (WTR::TestController::RunLoop::runUntil): Use QEventLoop to implement
- the run loop. This is the appropriate API to push the WaitForMoreEvents
- flag to QCoreApplication::processEvents and also being able to exit the
- loop if we have timed out.
- (WTR::TestController::RunLoop::notifyDone):
- (WTR::TestController::RunLoop::timerFired):
- (WTR::TestController::RunLoop::runModal):
- (WTR::TestController::notifyDone):
- (WTR::TestController::platformInitialize):
- (WTR::TestController::platformDestroy):
- (WTR::TestController::platformRunUntil):
- (WTR::TestController::runModal):
- * WebKitTestRunner/win/TestControllerWin.cpp:
- (WTR::TestController::platformDestroy):
- (WTR):
-
-2012-11-22 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] Enable WKPreferences and AboutBlankLoad API tests
- https://bugs.webkit.org/show_bug.cgi?id=102926
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add missing bits needed by WKPreferences and AboutBlankLoad API
- tests in the test harness and enable these tests on EFL port.
-
- * TestWebKitAPI/PlatformEfl.cmake:
- * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
- (TestWebKitAPI::TEST):
- * TestWebKitAPI/efl/PlatformUtilities.cpp:
- (TestWebKitAPI::Util::MIMETypeForWKURLResponse):
- (Util):
-
-2012-11-21 Zan Dobersek <zandobersek@gmail.com>
-
- [GTK][WTR] Implement AccessibilityUIElement::stringValue
- https://bugs.webkit.org/show_bug.cgi?id=102951
-
- Reviewed by Martin Robinson.
-
- Implement AccessibilityUIElement::stringValue in the ATK backend
- in the same manner it is implemented in DumpRenderTree.
-
- * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
- (WTR::replaceCharactersForResults):
- (WTR):
- (WTR::AccessibilityUIElement::stringValue):
-
-2012-11-21 Vineet Chaudhary <rgf748@motorola.com>
-
- Unreviewed. Adding myself to committers.py.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-21 Tien-Ren Chen <trchen@chromium.org>
-
- [chromium] Device scale factor should be no-op when applyDeviceScaleFactorInCompositor == 0
- https://bugs.webkit.org/show_bug.cgi?id=100061
-
- Reviewed by Adam Barth.
-
- On Android we're using a different pixel scaling implementation
- (WebCore::Settings::applyDefaultDeviceScaleFactorInCompositor() == 0) than other
- platforms. In this mode, we don't make use of device-independent pixels. Device
- scale factor is provided to WebKit and get merged into page scale factor. Other
- than that device scale factor should have no effects on rendering.
-
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::applyTo):
-
-2012-11-21 Fady Samuel <fsamuel@chromium.org>
-
- Clear MousePressed state on context menu to avoid initiating a drag
- https://bugs.webkit.org/show_bug.cgi?id=101786
-
- Reviewed by Ojan Vafai.
-
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::EventSender):
- (WebTestRunner::EventSender::contextClick):
- Only send a MouseUp on Windows. Keep the current mouse pressed state when
- calling up a context menu.
-
-2012-11-21 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [EFL] KURL unit test crashing when tiled backing store is enabled on Release Bots
- https://bugs.webkit.org/show_bug.cgi?id=102895
-
- Reviewed by Gyuyoung Kim.
-
- Change the link order so it wont override the new operator on gtest.
- Looks like it was crashing because an allocator mismatch (using libc's
- new and later fastMalloc delete. Thanks to Kangil Han for hinting on
- the fastMalloc issue.
-
- * TestWebKitAPI/CMakeLists.txt:
-
-2012-11-21 Kentaro Hara <haraken@chromium.org>
-
- Unreviewed, rolling out r135340.
- http://trac.webkit.org/changeset/135340
- https://bugs.webkit.org/show_bug.cgi?id=102492
-
- It broke Safari's internal build
-
- * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
- (new):
- (GenerateModule):
- (GenerateInterface):
- (finish):
-
-2012-11-21 Yael Aharon <yael.aharon@intel.com>, Gyuyoung Kim <gyuyoung.kim@samsung.com>
-
- [EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
- https://bugs.webkit.org/show_bug.cgi?id=101526
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Turn on WTF_USE_TILED_BACKING_STORE for EFL port.
-
- * Scripts/webkitperl/FeatureList.pm:
- * TestWebKitAPI/CMakeLists.txt: No include KURL.cpp because of API test crash.
-
-2012-11-21 Jongseok Yang <js45.yang@samsung.com>
-
- [EFL][WK2] Rename ewk_view_setting_encoding_custom_XXX to ewk_view_custom_encoding_XXX
- https://bugs.webkit.org/show_bug.cgi?id=102867
-
- Reviewed by Gyuyoung Kim.
-
- Rename ewk_view_setting_encoding_custom_XXX to ewk_view_custom_encoding_XXX.
-
- ewk_view_setting_encoding_custom_XXX APIs might be misunderstanded as the "setting" word
- because ewk_view_setting_encoding_custom_set triggers the "reload" operation.
- And ewk_view_setting_XXX is not correct because there is ewk_settings object for settings.
-
- * MiniBrowser/efl/main.c:
- (on_key_down):
-
-2012-11-20 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r133859.
- http://trac.webkit.org/changeset/133859
- https://bugs.webkit.org/show_bug.cgi?id=102875
-
- This patch makes API test broken (Requested by gyuyoung on
- #webkit).
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-20 Jinwoo Song <jinwoo7.song@samsung.com>
-
- [EFL][WK2] Add Ewk_Window_Features API and related UI callbacks
- https://bugs.webkit.org/show_bug.cgi?id=99114
-
- Reviewed by Gyuyoung Kim.
-
- Implemented window_create and window_close smartcallback functions.
-
- * MiniBrowser/efl/main.c:
- (on_window_create):
- (on_window_close):
- (window_create):
-
-2012-11-20 Ojan Vafai <ojan@chromium.org>
-
- Simplify builder filters now that we have lists of which builders run which tests
- https://bugs.webkit.org/show_bug.cgi?id=102849
-
- Reviewed by Dirk Pranke.
-
- We only need filters when we load the same master for multiple groups in the
- same test type, i.e. when we need to only include some of the builders that run
- a given test suite on a given master.
-
- Also, get rid of the DEFAULT_BUILDER enum. We were always using the first builder anyways.
- Now just make it a method on BuilderGroup.
-
- * TestResultServer/static-dashboards/builders.js:
- (BuilderGroup.prototype.append):
- (BuilderGroup.prototype.setup):
- (BuilderGroup.prototype._defaultBuilder):
- (BuilderGroup.prototype.master):
- (requestBuilderList):
- (isChromiumWebkitTipOfTreeTestRunner):
- (isChromiumWebkitDepsTestRunner):
- (loadBuildersList):
- * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
- (test):
-
-2012-11-20 Ojan Vafai <ojan@chromium.org>
-
- Remove perfav master for webkit_unit_tests and test_shell_tests.
- There are no bots on this master that run these tests.
- * TestResultServer/static-dashboards/builders.js:
-
-2012-11-20 Ojan Vafai <ojan@chromium.org>
-
- Remove special case for layout tests when builders fail to load
- https://bugs.webkit.org/show_bug.cgi?id=102842
-
- Reviewed by Tony Chang.
-
- Now that we load only builders that actually run the given test
- type, we can reliably show errors to the users because it
- represents a broken bot.
- * TestResultServer/static-dashboards/loader.js:
-
-2012-11-15 Ojan Vafai <ojan@chromium.org>
-
- Generate a list of builders/test suites from the buildbot json
- https://bugs.webkit.org/show_bug.cgi?id=102443
-
- Reviewed by Dirk Pranke.
-
- Instead of the cludgy things we do now to track which bots run which tests,
- we generate all that data from the buildbots' json files.
- This is the minimal amount to keep everything working. Once this lands,
- we can also do a bunch of followup cleanup.
-
- For now we commit the generated data. In theory, in the future, we could
- have the test results server generate the data on the fly.
-
- For the sake of easily understanding what changes when we run the generate script,
- also checkin a pretty printed version of the output. The pretty printed version
- is too large to serve as part of the flakiness dashboard though.
-
- This also has the benefit of making the dashboard load much faster since
- we no longer ever need to block on requests to buildbot.
-
- * TestResultServer/generate_builders_json.py: Added.
- (master_json_url):
- (builder_json_url):
- (cached_build_json_url):
- (fetch_json):
- (insert_builder_and_test_data):
- (main):
- * TestResultServer/generate_builders_json_unittest.py: Added.
- (GenerateBuildersJsonTest):
- (GenerateBuildersJsonTest.test_master_json_url):
- (GenerateBuildersJsonTest.test_builder_json_url):
- (GenerateBuildersJsonTest.test_cached_build_json_url):
- (GenerateBuildersJsonTest.test_generate_json_data):
- (GenerateBuildersJsonTest.test_generate_json_data.dummy_fetch_json):
- * TestResultServer/static-dashboards/builders-pretty.jsonp: Added.
- * TestResultServer/static-dashboards/builders.js:
- (LOAD_BUILDBOT_DATA):
- (BuilderGroup):
- (BuilderGroup.prototype.append):
- (BuilderGroup.prototype.master):
- (requestBuilderList):
- * TestResultServer/static-dashboards/builders.jsonp: Added.
- * TestResultServer/static-dashboards/builders_unittests.js: Added.
- * TestResultServer/static-dashboards/dashboard_base.js:
- * TestResultServer/static-dashboards/flakiness_dashboard.js:
- (showPopupForBuild):
- (htmlForTestResults):
- (htmlForIndividualTestOnAllBuildersWithResultsLinks):
- (loadExpectationsLayoutTests):
- * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
- (resetGlobals):
- (test):
- * TestResultServer/static-dashboards/loader.js:
- * TestResultServer/static-dashboards/loader_unittests.js:
- * TestResultServer/static-dashboards/run-embedded-unittests.html:
- * TestResultServer/static-dashboards/run-unittests.html:
- * TestResultServer/static-dashboards/timeline_explorer.html:
-
-2012-11-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [WTR][Qt] Enable fixedLayout when needed by the test
- https://bugs.webkit.org/show_bug.cgi?id=102811
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Create a flickable view for CSS Device Adaptation tests. This is
- crucial for testing them since they will change the size of the
- viewport.
-
- * WebKitTestRunner/PlatformWebView.h:
- (PlatformWebView):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::PlatformWebView):
- (WTR::PlatformWebView::viewSupportsOptions):
- (WTR):
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [WTR] WebKitTestRunner should be able to run tests using fixed layout
- https://bugs.webkit.org/show_bug.cgi?id=102517
-
- Reviewed by Kenneth Rohde Christiansen.
-
- WTR will now request the creation of a view that has a page using
- fixed layout for CSS Device Adaptation tests, but this feature might
- be used in the future by any other test that requires a mobile-like type
- of viewport (i.e. Viewport META tests should be ported).
-
- The viewport type of the other tests remains unchanged and is restored
- when the runner leaves the device-adapt/ folder.
-
- * WebKitTestRunner/PlatformWebView.h:
- (PlatformWebView):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR):
- (WTR::shouldUseFixedLayout):
- (WTR::updateLayoutType):
- (WTR::TestInvocation::invoke):
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::PlatformWebView):
- (WTR::PlatformWebView::viewSupportsOptions):
- (WTR):
-
-2012-11-20 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] REGRESSION(r128174): Fast build path doesn't work now
- https://bugs.webkit.org/show_bug.cgi?id=100360
-
- Reviewed by Tor Arne Vestbø.
-
- Use a separated .builtRevisions.cache file instead of .qmake.cache to cache built SVN revisions.
-
- * Scripts/webkitdirs.pm:
- (buildQMakeProjects):
-
-2012-11-20 Mateusz Leszko <m.leszko@samsung.com>
-
- [EFL][GTK]Sharing accessibility support in WebKitTestRunner.
- https://bugs.webkit.org/show_bug.cgi?id=99011
-
- Reviewed by Martin Robinson.
-
- Accessibility files from gtk folder are moved to atk folder due to common implementation. Event Type naming changed to default, from Gtk to ATK.
-
- * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/gtk/AccessibilityControllerGtk.cpp.
- (WTR::AccessibilityController::logAccessibilityEvents):
- * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/gtk/AccessibilityUIElementGtk.cpp.
-
-2012-11-20 Zan Dobersek <zandobersek@gmail.com>
-
- webkitpy unit tests should run serially when checking code coverage
- https://bugs.webkit.org/show_bug.cgi?id=102693
-
- Reviewed by Dirk Pranke.
-
- When checking code coverage, the unit tests should not be run in parallel
- as this causes the tracing functions (set via sys.settrace in the coverage
- module) being overriden, resulting in incorrect coverage reports.
-
- * Scripts/webkitpy/test/main.py:
- (Tester._run_tests):
-
-2012-11-19 Viatcheslav Ostapenko <v.ostapenko@samsung.com>
-
- [EFL] Add fallback for WebkitTestRunner if opengl is not available.
- https://bugs.webkit.org/show_bug.cgi?id=102704
-
- Reviewed by Laszlo Gombos.
-
- Add fallback to non-opengl evas engine in WebkitTestRunner if opengl is not available.
-
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::initEcoreEvas):
-
-2012-11-19 Dimitri Glazkov <dglazkov@chromium.org>
-
- [garden-o-matic] Switch frontend to use the gardeningserver.
- https://bugs.webkit.org/show_bug.cgi?id=102712
-
- Reviewed by Dirk Pranke.
-
- Instead of serving garden-o-matic frontend as file, we now serve it from the gardening server. This enables
- using garden-o-matic in a Chrome OS device, with a separate machine as a headless server.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html: Changed CSP policy to use 'self'.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js: Removed now-unnecessary references to kLocalServerURL.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js: Tweaked the test expectation.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js: Removed kLocalServerURL.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js: Spuriously updated the name of the webkit-patch command.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js: Removed kLocalServerURL.
- * Scripts/webkitpy/tool/servers/gardeningserver.py: Changed to use the new launch URL.
-
-2012-11-19 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r135172.
- http://trac.webkit.org/changeset/135172
- https://bugs.webkit.org/show_bug.cgi?id=102710
-
- Broke some WebKit2 api tests :( (Requested by japhet on
- #webkit).
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::updateForCommittedLoad):
-
-2012-11-19 Dimitri Glazkov <dglazkov@chromium.org>
-
- [garden-o-matic] Enable serving garden-o-matic with gardeningserver.
- https://bugs.webkit.org/show_bug.cgi?id=102703
-
- Reviewed by Ojan Vafai.
-
- To enable gardening from a Chrome OS device, we need the ability to serve garden-o-matic
- from the same origin as the gardening server. This change gently massages the current
- logic to adapt an extension-sniffing-based approach of identifying static files,
- rather than requiring an explicit list.
-
- * Scripts/webkitpy/tool/servers/reflectionhandler.py:
- (ReflectionHandler): Replaced STATIC_FILE_NAMES with STATIC_FILE_EXTENSIONS.
- (ReflectionHandler._handle_request): Changed the logic to smell for extensions, rather than specific files.
- * Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py: Added.
-
-2012-11-19 Ojan Vafai <ojan@chromium.org>
-
- Add DOM and HTML watchlists and add myself to a bunch of lists
- https://bugs.webkit.org/show_bug.cgi?id=102707
-
- Reviewed by Eric Seidel.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-11-19 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] move methods that only use the WebKit API from DRTTestRunner to TestRunner
- https://bugs.webkit.org/show_bug.cgi?id=102676
-
- Reviewed by Tony Chang.
-
- In addition, I've replaced parsePageNumber with the more commonly used
- cppVariantToInt32, moved abortModal to the list of stubbed out methods,
- and removed setAutomaticLinkDetectionEnabled which wasn't used
- anywhere.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::DRTTestRunner):
- (DRTTestRunner::reset):
- (DRTTestRunner::overridePreference):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- (WebTestRunner::TestRunner::TestRunner):
- (WebTestRunner::TestRunner::reset):
- (WebTestRunner):
- (WebTestRunner::TestRunner::setTabKeyCyclesThroughElements):
- (WebTestRunner::TestRunner::setAsynchronousSpellCheckingEnabled):
- (WebTestRunner::TestRunner::execCommand):
- (WebTestRunner::TestRunner::isCommandEnabled):
- (WebTestRunner::TestRunner::pauseAnimationAtTimeOnElementWithId):
- (WebTestRunner::TestRunner::pauseTransitionAtTimeOnElementWithId):
- (WebTestRunner::TestRunner::elementDoesAutoCompleteForElementWithId):
- (WebTestRunner::TestRunner::numberOfActiveAnimations):
- (WebTestRunner::TestRunner::callShouldCloseOnWebView):
- (WebTestRunner::TestRunner::setDomainRelaxationForbiddenForURLScheme):
- (WebTestRunner::TestRunner::evaluateScriptInIsolatedWorldAndReturnValue):
- (WebTestRunner::TestRunner::evaluateScriptInIsolatedWorld):
- (WebTestRunner::TestRunner::setIsolatedWorldSecurityOrigin):
- (WebTestRunner::TestRunner::setIsolatedWorldContentSecurityPolicy):
- (WebTestRunner::TestRunner::addOriginAccessWhitelistEntry):
- (WebTestRunner::TestRunner::removeOriginAccessWhitelistEntry):
- (WebTestRunner::TestRunner::hasCustomPageSizeStyle):
- (WebTestRunner::TestRunner::forceRedSelectionColors):
- (WebTestRunner::TestRunner::addUserScript):
- (WebTestRunner::TestRunner::addUserStyleSheet):
- (WebTestRunner::TestRunner::startSpeechInput):
- (WebTestRunner::TestRunner::loseCompositorContext):
- (WebTestRunner::TestRunner::markerTextForListItem):
- (WebTestRunner::TestRunner::findString):
- (WebTestRunner::TestRunner::setMinimumTimerInterval):
- (WebTestRunner::TestRunner::setAutofilled):
- (WebTestRunner::TestRunner::setValueForUser):
- (WebTestRunner::TestRunner::enableFixedLayoutMode):
- (WebTestRunner::TestRunner::setFixedLayoutSize):
- (WebTestRunner::TestRunner::selectionAsMarkup):
- (WebTestRunner::TestRunner::setTextSubpixelPositioning):
- (WebTestRunner::TestRunner::resetPageVisibility):
- (WebTestRunner::TestRunner::setPageVisibility):
- (WebTestRunner::TestRunner::setTextDirection):
- (WebTestRunner::TestRunner::textSurroundingNode):
- (WebTestRunner::TestRunner::workerThreadCount):
- (WebTestRunner::TestRunner::cppVariantToBool):
- (WebTestRunner::TestRunner::cppVariantToInt32):
- (WebTestRunner::TestRunner::cppVariantToWebString):
- (WebTestRunner::TestRunner::cppVariantToWebStringArray):
- (WebTestRunner::TestRunner::printErrorMessage): formerly logErrorToConsole
- (WebTestRunner::TestRunner::fallbackMethod):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- (WebKit):
- (WebTestRunner::TestRunner::setWebView):
- (TestRunner):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::createMainWindow):
- (TestShell::~TestShell):
-
-2012-11-19 Yusuke Sato <yusukes@chromium.org>
-
- [Chromium] Flash cannot receive scroll events when threaded compositing is in use
- https://bugs.webkit.org/show_bug.cgi?id=101423
-
- Reviewed by James Robinson.
-
- Call setWantsWheelEvents(true) in initialize() so that gesture-events and transformed-events tests in
- LayoutTests/platform/chromium/plugins/ will not fail even if a buildbot introduces threaded compositing
- in the future.
-
- * DumpRenderTree/chromium/TestWebPlugin.cpp:
- (TestWebPlugin::initialize):
-
-2012-11-19 Nate Chapin <japhet@chromium.org>
-
- Move empty loading to DocumentLoader, simplify FrameLoader::init()
- https://bugs.webkit.org/show_bug.cgi?id=101512
-
- Reviewed by Adam Barth.
-
- Chromium DRT has some code that doesn't play nicely with empty urls and incorrectly
- interprets them as a non-empty load. This ensures
- http/tests/navigation/new-window-redirect-history.html continues to pass
- in chromium.
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::updateForCommittedLoad):
-
-2012-11-19 Vincent Scheib <scheib@chromium.org>
-
- [Chromium] Remove WebKit::WebRuntimeFeatures::enablePointerLock.
- https://bugs.webkit.org/show_bug.cgi?id=96946
-
- Reviewed by Adam Barth.
-
- The runtime flag functionality has already been removed.
- Now that Chromium no longer has a compile dependency on this
- API, it can be removed as well.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
-
-2012-11-19 Kihong Kwon <kihong.kwon@samsung.com>
-
- Add PROXIMITY_EVENTS feature
- https://bugs.webkit.org/show_bug.cgi?id=102658
-
- Reviewed by Kentaro Hara.
-
- Add PROXIMITY_EVENTS feature to FeatureList and qmake.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
-
-2012-11-19 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][WTR] Memory leak in TestController::initialize()
- https://bugs.webkit.org/show_bug.cgi?id=102616
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Remove call to WKStringCreateWithUTF8CString() to construct
- the icon database path which was leaking memory since the
- returned WKStringRef was not adopted. The code now uses
- WTF::String instead of std::string and converts it to a
- WKStringRef using toWK().
-
- * WebKitTestRunner/StringFunctions.h:
- (WTR::toWK): Overload toWK() to take a WTF::String in
- argument.
- (WTR):
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize):
-
-2012-11-19 Kentaro Hara <haraken@chromium.org>
-
- Remove IDLStructure.pm
- https://bugs.webkit.org/show_bug.cgi?id=102642
-
- Reviewed by Adam Barth.
-
- Previously IDLStructure.pm was full of regular expressions to
- parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
- just contains several data structures for the IDL parser. We can
- move them to IDLParser.pm and thus remove IDLStructure.pm.
-
- No tests. No change in generated code.
-
- * WebKitTestRunner/DerivedSources.make:
- * WebKitTestRunner/GNUmakefile.am:
- * WebKitTestRunner/InjectedBundle/DerivedSources.pri:
-
-2012-11-18 KyungTae Kim <ktf.kim@samsung.com>
-
- [EFL] Not to include "ewk_view_private.h" in Tools
- https://bugs.webkit.org/show_bug.cgi?id=102644
-
- Reviewed by Gyuyoung Kim.
-
- Include ewk_view.h instead of ewk_view_private.h in Tools
-
- * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
-
-2012-11-18 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r135104.
- http://trac.webkit.org/changeset/135104
- https://bugs.webkit.org/show_bug.cgi?id=102638
-
- Should not use commit queue to add people to committer list.
- (Requested by ap_ on #webkit).
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-18 Vivek Galatage <vivek.vg@samsung.com>
-
- Add myself to committers.py
- https://bugs.webkit.org/show_bug.cgi?id=102636
-
- Reviewed by Laszlo Gombos.
-
- Add myself to committers.py
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-18 Genevieve Mak <gmak@rim.com>
-
- [BlackBerry] Enable Touch Sliders
- https://bugs.webkit.org/show_bug.cgi?id=102516
-
- Reviewed by Rob Buis.
-
- Enabled for BlackBerry only
- PR #242781
- PR #176014
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-17 Dimitri Glazkov <dglazkov@chromium.org>
-
- Remove unused code I wrote a long time ago from gardeningserver.py
- https://bugs.webkit.org/show_bug.cgi?id=102605
-
- Reviewed by Adam Barth.
-
- * Scripts/webkitpy/tool/servers/gardeningserver.py: Removed.
- * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: Removed.
-
-2012-11-16 Tony Chang <tony@chromium.org>
-
- Remove ENABLE_CSS_HIERARCHIES since it's no longer in use
- https://bugs.webkit.org/show_bug.cgi?id=102554
-
- Reviewed by Andreas Kling.
-
- As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 ,
- we're going to revist this feature once additional vendor support is
- achieved.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-16 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] move stubs from DRTTestRunner to TestRunner
- https://bugs.webkit.org/show_bug.cgi?id=102489
-
- Reviewed by Adam Barth.
-
- This is part of moving all methods from DRTTestRunner to TestRunner.
- Instead of keeping one stub per method, I'm using a shared stub to
- clean up the code.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::DRTTestRunner):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- (WebTestRunner::TestRunner::TestRunner):
- (WebTestRunner):
- (WebTestRunner::TestRunner::fallbackMethod):
- (WebTestRunner::TestRunner::notImplemented):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- (WebTestRunner):
- (TestRunner):
- (WebTestRunner::TestRunner::setDelegate):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::createMainWindow):
- (TestShell::~TestShell):
-
-2012-11-16 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] fake drag drop operations in the WebTestProxyBase instead of the WebViewHost
- https://bugs.webkit.org/show_bug.cgi?id=102495
-
- Reviewed by Adam Barth.
-
- When a drag operation is initiated in a layout test, we need to
- simulate a corresponding drop event, otherwise the WebViewImpl will sit
- there waiting for it. Instead of having the embedder taking care of
- this, move this into the TestRunner library.
-
- * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
- (WebKit):
- (WebTestProxyBase):
- (WebTestRunner::WebTestProxy::startDragging):
- * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
- (WebTestRunner::WebTestProxyBase::startDragging):
- (WebTestRunner):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-11-16 Tien-Ren Chen <trchen@chromium.org>
-
- Rename applyDefaultDeviceScaleFactorInCompositor to setApplyDeviceScaleFactorInCompositor
- https://bugs.webkit.org/show_bug.cgi?id=102462
-
- Reviewed by James Robinson.
-
- As we no longer have this "default" device scale factor.
-
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::applyTo):
-
-2012-11-15 Takashi Sakamoto <tasak@google.com>
-
- [Win] key event's location does not work on Windows platform.
- https://bugs.webkit.org/show_bug.cgi?id=89742
-
- Reviewed by Brent Fulgham.
-
- Modified keyDownCallback to use lparam to specify left-hand keys or
- right-hand keys.
-
- * DumpRenderTree/win/EventSender.cpp:
- (makeKeyDataForScanCode):
- Given a virtual keycode, generate scancode and extended key bit of
- lparam.
- (keyDownCallback):
- Use lparam for left-hand and right-hand keys, because Windows doesn't
- directly provide a virtual keycode which distinguishes between
- left-hand and right-hand. For example, when control key is pressed,
- wparam has VK_CONTROL, neither VK_RCONTROL nor VK_LCONTROL.
-
-2012-11-16 Tommy Widenflycht <tommyw@google.com>
-
- [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
- https://bugs.webkit.org/show_bug.cgi?id=102386
-
- Reviewed by Adam Barth.
-
- Adding mock data channel functionality.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::openDataChannel):
-
-2012-11-16 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] delete unused testRunner methods
- https://bugs.webkit.org/show_bug.cgi?id=102479
-
- Reviewed by Adam Barth.
-
- These methods aren't used by any layout test. Remove them to avoid bit rot
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::DRTTestRunner):
- (DRTTestRunner::reset):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::shouldBeginEditing):
- (WebViewHost::shouldEndEditing):
- (WebViewHost::shouldInsertNode):
- (WebViewHost::shouldInsertText):
- (WebViewHost::shouldChangeSelectedRange):
- (WebViewHost::shouldDeleteRange):
- (WebViewHost::shouldApplyStyle):
- (WebViewHost::startDragging):
- (WebViewHost::enterFullScreenNow):
- (WebViewHost::exitFullScreenNow):
-
-2012-11-15 Alexey Proskuryakov <ap@apple.com>
-
- Private Browsing is a per-page setting that sets a global value
- https://bugs.webkit.org/show_bug.cgi?id=67870
-
- Reviewed by Sam Weinig.
-
- * DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
- Call _switchNetworkLoaderToNewTestingSession before making other settings, so that
- they would actually apply to the testing session.
-
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::initialize):
- (WTR::InjectedBundle::beginTesting):
- Only call WKBundleSwitchNetworkLoaderToNewTestingSession once per process, matching
- WebKit1. I'm not fully sure what is going wrong, but apparently creating mutiple
- sessions with the same identifier doesn't quite work.
-
-2012-11-16 Yael Aharon <yael.aharon@intel.com>
-
- Unreviewed. Help bugzilla find me.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-16 Peter Beverloo <peter@chromium.org>
-
- Running TestWebKitAPI and webkit_unit_tests for Chromium Android should defer to the Chromium-sided test runner
- https://bugs.webkit.org/show_bug.cgi?id=102245
-
- Reviewed by Tony Chang.
-
- When running TestWebKitAPI and webkit_unit_test for Chromium Android, defer
- the actual running part to the test runner which lives on the Chromium side.
- Re-implementing or even generalizing the device-interaction part in WebKit
- is error prone and not worth the effort.
-
- * Scripts/run-api-tests:
- * Scripts/run-chromium-webkit-unit-tests:
-
-2012-11-15 Yury Semikhatsky <yurys@chromium.org>
-
- Memory instrumentation: add code for reporting stack traces of unknown instrumented objects
- https://bugs.webkit.org/show_bug.cgi?id=102384
-
- Reviewed by Pavel Feldman.
-
- Updated return type in accord with the changes in MemoryInstrumentationClient.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-11-15 Gustavo Noronha Silva <gns@gnome.org>
-
- [GTK] Split WebCore/platform into a separate library
- https://bugs.webkit.org/show_bug.cgi?id=94435
-
- Reviewed by Martin Robinson.
-
- More people have been reporting problems when linking WebCore because
- the command line limit is being exceeded. Splitting WebCore a bit more
- is in order.
-
- * GNUmakefile.am: link libWebCorePlatform into DRT
-
-2012-11-15 Dana Jansens <danakj@chromium.org>
-
- [chromium] Stop using the WebCompositorSupport methods for changing settings
- https://bugs.webkit.org/show_bug.cgi?id=101968
-
- Reviewed by James Robinson.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::setPerTilePaintingEnabled):
- (TestShell::setAcceleratedAnimationEnabled):
-
-2012-11-15 Tony Chang <tony@chromium.org>
-
- Generate Settings from a .in file
- https://bugs.webkit.org/show_bug.cgi?id=100393
-
- Reviewed by Adam Barth.
-
- Add the generated WebCore files to the include dir.
-
- * TestWebKitAPI/CMakeLists.txt:
- * WebKitTestRunner/CMakeLists.txt:
-
-2012-11-15 Roger Fong <roger_fong@apple.com>
-
- Make old-run-webkit-tests handle setting the results directory properly.
- https://bugs.webkit.org/show_bug.cgi?id=102273
- <rdar://problem/11571607>
-
- Reviewed by Timothy Horton.
-
- A call to chdirWebkit in old-run-webkit-tests set the current working directory to the OpenSource folder.
- Thus setting --results-directory to OpenSource/layout-test-results would create OpenSource/layout-test-results inside the main OpenSource folder.
- This caused many other problems including failure to upload test results and failed future test runs.
- The solution is to save the current working directory before calling chdirWebKit and then reconstructing the full path to the results directory
- using the saved directory when setting $testResultsDirectory.
-
- * Scripts/old-run-webkit-tests:
-
-2012-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r134800 and r134805.
- http://trac.webkit.org/changeset/134800
- http://trac.webkit.org/changeset/134805
- https://bugs.webkit.org/show_bug.cgi?id=102417
-
- This patch broke chromium port (Requested by jianli on
- #webkit).
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::openDataChannel):
-
-2012-11-15 Tommy Widenflycht <tommyw@google.com>
-
- [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
- https://bugs.webkit.org/show_bug.cgi?id=102386
-
- Reviewed by Adam Barth.
-
- Adding mock data channel functionality.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::openDataChannel):
-
-2012-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r134649 and r134665.
- http://trac.webkit.org/changeset/134649
- http://trac.webkit.org/changeset/134665
- https://bugs.webkit.org/show_bug.cgi?id=102413
-
- Broke a ton of downstream chromium tests (Requested by japhet
- on #webkit).
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::updateForCommittedLoad):
-
-2012-11-15 Andreas Kling <akling@apple.com>
-
- Update my e-mail address.
-
- Rubber-stamped by Anders Koivisto.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-15 Dominik Röttsches <dominik.rottsches@intel.com>
-
- [EFL] Bump Harfbuzz to allow fixing bug 101009 on EFL
- https://bugs.webkit.org/show_bug.cgi?id=101323
-
- Reviewed by Martin Robinson.
-
- Bumping Harfbuzz to newer version so that we can remove the
- ifdef round the fix for bug 101009 for EFL, too.
- We're using the zip snapshot since jhbuild can fallback to the previously
- downloaded blob in case of network failures which leads to better
- buildbot robustness. This zip snapshot currently needs to be locally
- patched to fix ICU detection on systems that don't have icu pkg-config files.
- The patch is suggested for merging into HarfBuzz. We can remove it locally
- once it's accepted into HarfBuzz upstream.
-
- * efl/patches/harfbuzz-icu-detection-fix.patch: Applied after retrieving source to fix harfbuzz detection on systems that don't have pkg-config files for it.
- * efl/jhbuild.modules: Bumping harfbuzz version.
-
-2012-11-15 Alexey Proskuryakov <ap@apple.com>
-
- [Mac] Implement WTR --no-timeout-at-all option
- https://bugs.webkit.org/show_bug.cgi?id=102251
-
- Reviewed by Eric Carlson.
-
- * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformRunUntil):
- Just do it, and convert to Objective C on the way for simplicity.
-
-2012-11-14 Ryuan Choi <ryuan.choi@gmail.com>
-
- [EFL] Port tiled backing store
- https://bugs.webkit.org/show_bug.cgi?id=71352
-
- Reviewed by Gyuyoung Kim.
-
- * EWebLauncher/main.c: Added option to test the WebCore's tiled backing store.
- (_User_Arguments):
- (windowCreate):
- (parseUserArguments):
-
-2012-11-14 Andy Estes <aestes@apple.com>
-
- Fix the build.
-
- * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h:
-
-2012-11-14 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: consolidate webkit-base-finding code
- https://bugs.webkit.org/show_bug.cgi?id=102007
-
- Reviewed by Eric Seidel.
-
- This patch creates a new "WebKitFinder" class that other
- modules can use to find the top of the WebKit tree and
- commonly used subdirectories. This logic was in the
- webkitpy.layout_test.port classes but wasn't specific to those
- classes and now can be used by other modules without needing a port
- (e.g., by the check-webkit-style python linter).
-
- This code is somewhat redundant with the code for find_checkout_root()
- in the scm modules, but it does not rely on the presence of a version
- control system to work. This is a requirement for some uses of the
- tree (e.g., Chromium tester checkouts).
-
- This patch removes most of the logic from the layout_tests.port.config
- module and makes that as private as possible. Now we just need to move
- the default_configuration and flag_from_configuration logic into
- DeprecatedPort (or someplace else appropriate) and we can finish
- getting rid of the Config class (but that is a separate patch).
-
- * Scripts/webkitpy/common/webkit_finder.py: Added.
- (WebKitFinder):
- (WebKitFinder.__init__):
- (WebKitFinder.webkit_base):
- (WebKitFinder.path_from_webkit_base):
- (WebKitFinder.path_to_script):
- (WebKitFinder.layout_tests_dir):
- (WebKitFinder.perf_tests_dir):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.__init__):
- (Port):
- (Port.webkit_base):
- (Port.path_from_webkit_base):
- (Port.path_to_script):
- (Port.layout_tests_dir):
- (Port.perf_tests_dir):
- (Port.set_option_default):
- (Port._run_script):
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_diff_text):
- * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
- (ChromiumLinuxPort._determine_driver_path_statically):
- * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
- * Scripts/webkitpy/layout_tests/port/config.py:
- (Config.__init__):
- (Config.build_directory):
- (Config.default_configuration):
- (Config._read_configuration):
- * Scripts/webkitpy/layout_tests/port/config_mock.py: Removed.
- * Scripts/webkitpy/layout_tests/port/config_unittest.py:
- (ConfigTest.test_default_configuration__standalone):
- (ConfigTest.test_default_configuration__scripterror):
- * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
- (DriverTest.make_port):
- (DriverTest.test_no_timeout):
- * Scripts/webkitpy/layout_tests/port/gtk.py:
- (GtkPort.setup_environ_for_server):
- * Scripts/webkitpy/layout_tests/port/mac.py:
- (MacPort.show_results_html_file):
- * Scripts/webkitpy/layout_tests/port/port_testcase.py:
- (TestWebKitPort.__init__):
- (PortTestCase.make_port):
- * Scripts/webkitpy/layout_tests/port/win_unittest.py:
- (WinPortTest.test_expectations_files):
- * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
- (XvfbDriverTest.make_driver):
- (XvfbDriverTest.test_stop):
- * Scripts/webkitpy/style/checkers/python.py:
- (Pylinter.__init__):
-
-2012-11-14 Dana Jansens <danakj@chromium.org>
-
- [chromium] WebPreferences reset() should set perTilePainting and acceleratedAnimation settings to false.
- https://bugs.webkit.org/show_bug.cgi?id=102296
-
- Reviewed by James Robinson.
-
- These settings are always set by TestShell anyhow, but we should be
- setting them to false here along with everything else.
-
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset):
-
-2012-11-08 Andy Estes <aestes@apple.com>
-
- [WebKit2] Need API in UIProcess to enable loading of custom protocols
- https://bugs.webkit.org/show_bug.cgi?id=101674
-
- Reviewed by Brady Eidson.
-
- Add an API test that implements a custom protocol and attempts to load
- a resource requiring that protocol in a WKView. The test passes only if
- didFinishLoadForFrame: fires.
-
- * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: Added.
- (+[TestProtocol canInitWithRequest:]):
- (+[TestProtocol canonicalRequestForRequest:]):
- (+[TestProtocol requestIsCacheEquivalent:toRequest:]):
- (-[TestProtocol startLoading]):
- (-[TestProtocol stopLoading]):
- * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
- * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h: Copied from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h.
- * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h.
- (-[TestBrowsingContextLoadDelegate initWithBlockToRunOnLoad:]):
- (-[TestBrowsingContextLoadDelegate browsingContextControllerDidFinishLoad:]):
-
-2012-11-14 Ojan Vafai <ojan@chromium.org>
-
- Fix some defuct flakiness dashboard unittests.
- * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
-
-2012-11-14 Glenn Adams <glenn@skynav.com>
-
- webkitpy: print-expectations - add --paths option to print only paths of test expectation files
- https://bugs.webkit.org/show_bug.cgi?id=102269
-
- Reviewed by Dirk Pranke.
-
- Add --paths option to print-expectations command in order to obtain list of applicable
- test expectation file paths.
-
- * Scripts/webkitpy/tool/commands/queries.py:
- (PrintExpectations.__init__):
- (PrintExpectations.execute):
- * Scripts/webkitpy/tool/commands/queries_unittest.py:
- (PrintExpectationsTest.run_test):
- (PrintExpectationsTest.test_paths):
-
-2012-11-14 James Robinson <jamesr@chromium.org>
-
- webgl-background-color.html started failing
- https://bugs.webkit.org/show_bug.cgi?id=102247
-
- Reviewed by Adrienne Walker.
-
- The compositor thread should outlive the WebView.
-
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell):
-
-2012-11-14 Nate Chapin <japhet@chromium.org>
-
- Move empty loading to DocumentLoader, simplify FrameLoader::init()
- https://bugs.webkit.org/show_bug.cgi?id=101512
-
- Reviewed by Adam Barth.
-
- Chromium DRT has some code that doesn't play nicely with empty urls and incorrectly
- interprets them as a non-empty load. This ensures
- http/tests/navigation/new-window-redirect-history.html continues to pass
- in chromium.
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::updateForCommittedLoad):
-
-2012-11-14 Zan Dobersek <zandobersek@gmail.com>
-
- Remove uses of deprecated unittest.TestCase aliases
- https://bugs.webkit.org/show_bug.cgi?id=102253
-
- Reviewed by Dirk Pranke.
-
- Replace the deprecated unittest.TestCase methods with the corresponding methods
- everywhere inside the Tools directory. The following replacements are done:
- - assertEquals -> assertEqual
- - assert_ -> assertTrue
- - failUnlessRaises -> assertRaises
-
- * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
- (SVNMirrorTest.test_CheckOutSource):
- * QueueStatusServer/model/queuepropertymixin_unittest.py:
- (QueuePropertyMixinTest.test_queue_property):
- * QueueStatusServer/model/queues_unittest.py:
- (QueueTest._assert_short_name):
- (QueueTest._assert_display_name):
- (QueueTest._assert_name_with_underscores):
- * QueueStatusServer/model/workitems_unittest.py:
- (WorkItemsTest.test_display_position_for_attachment):
- * Scripts/webkitpy/common/checkout/changelog_unittest.py:
- (test_parse_log_entries_from_changelog):
- (test_parse_log_entries_from_annotated_file):
- (_assert_parse_reviewer_text_and_list):
- (_assert_parse_reviewer_text_list):
- (_assert_fuzzy_reviewer_match):
- (_assert_parse_authors):
- (test_latest_entry_parse):
- (test_latest_entry_parse_single_entry):
- (test_set_reviewer):
- (test_set_short_description_and_bug_url):
- * Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
- (DiffParserTest.test_diff_parser):
- * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
- (GitSVNTest.test_revisions_changing_files_with_local_commit):
- (GitSVNTest.test_upstream_branch):
- (GitSVNTest.test_create_patch_with_rm_and_changed_files):
- (GitTestWithMock.test_push_local_commits_to_server_with_username_and_password):
- * Scripts/webkitpy/common/config/ports_unittest.py:
- (DeprecatedPortTest.test_mac_port):
- (DeprecatedPortTest.test_gtk_port):
- (DeprecatedPortTest.test_efl_port):
- (DeprecatedPortTest.test_qt_port):
- (DeprecatedPortTest.test_chromium_port):
- (DeprecatedPortTest.test_chromium_android_port):
- (DeprecatedPortTest.test_chromium_xvfb_port):
- * Scripts/webkitpy/common/config/urls_unittest.py:
- (URLsTest.test_parse_bug_id):
- (URLsTest.test_parse_attachment_id):
- * Scripts/webkitpy/common/find_files_unittest.py:
- (TestWinNormalize.assert_filesystem_normalizes):
- * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
- (test_url_creation):
- (test_parse_bug_id):
- (_assert_dictionaries_equal):
- (test_parse_bugs_from_xml):
- (test_attachment_detail_bug_parsing):
- (_assert_result_count):
- (test_request_page_parsing):
- (test_quip_page_parsing):
- (EditUsersParserTest._assert_login_userid_pairs):
- * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
- (test_status_parsing):
- (test_latest_cached_build):
- (test_results_zip_url):
- * Scripts/webkitpy/common/net/credentials_unittest.py:
- (test_credentials_from_environment):
- * Scripts/webkitpy/common/net/failuremap_unittest.py:
- (FailureMapTest.test_failing_revisions):
- (FailureMapTest.test_new_failures):
- (FailureMapTest.test_new_failures_with_old_revisions):
- (FailureMapTest.test_new_failures_with_more_old_revisions):
- (FailureMapTest.test_tests_failing_for):
- (FailureMapTest.test_failing_tests):
- * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
- (LayoutTestResultsTest.test_set_failure_limit_count):
- * Scripts/webkitpy/common/net/unittestresults_unittest.py:
- (UnitTestResultsTest.test_nostring):
- (UnitTestResultsTest.test_emptystring):
- * Scripts/webkitpy/common/read_checksum_from_png_unittest.py:
- (ReadChecksumFromPngTest.test_read_checksum):
- * Scripts/webkitpy/common/system/deprecated_logging_unittest.py:
- (LoggingTest.assert_log_equals):
- * Scripts/webkitpy/common/system/executive_unittest.py:
- (ScriptErrorTest.test_string_from_args):
- (ScriptErrorTest.test_message_with_output):
- (ExecutiveTest.test_run_command_with_bad_command):
- (ExecutiveTest.test_run_command_with_unicode):
- (ExecutiveTest.serial_test_run_in_parallel):
- * Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
- (MockFileSystemTest.quick_check):
- * Scripts/webkitpy/common/system/filesystem_unittest.py:
- (GenericFileSystemTests.test_glob__trailing_asterisk):
- (GenericFileSystemTests.test_glob__leading_asterisk):
- (GenericFileSystemTests.test_glob__middle_asterisk):
- (GenericFileSystemTests.test_glob__period_is_escaped):
- (RealFileSystemTest.test_chdir):
- (RealFileSystemTest.test_remove_file_with_retry):
- (RealFileSystemTest.test_sep):
- * Scripts/webkitpy/common/system/logtesting.py:
- (TestLogStream.assertMessages):
- * Scripts/webkitpy/common/system/logutils_unittest.py:
- (GetLoggerTest.test_get_logger_in_webkitpy):
- (GetLoggerTest.test_get_logger_not_in_webkitpy):
- * Scripts/webkitpy/common/system/outputcapture.py:
- (OutputCaptureTestCaseBase.assertStdout):
- (OutputCaptureTestCaseBase.assertStderr):
- * Scripts/webkitpy/common/system/path_unittest.py:
- (AbspathTest.test_abspath_to_uri_cygwin):
- (AbspathTest.test_abspath_to_uri_unixy):
- (AbspathTest.test_abspath_to_uri_win):
- (AbspathTest.test_abspath_to_uri_escaping_unixy):
- (AbspathTest.test_abspath_to_uri_escaping_cygwin):
- * Scripts/webkitpy/common/system/platforminfo_unittest.py:
- (TestPlatformInfo.test_real_code):
- (TestPlatformInfo.test_os_name_and_wrappers):
- (TestPlatformInfo.test_os_version):
- (TestPlatformInfo.test_total_bytes_memory):
- * Scripts/webkitpy/common/system/user_unittest.py:
- (UserTest.test_confirm.mock_raw_input):
- (UserTest.test_confirm):
- * Scripts/webkitpy/common/system/zipfileset_unittest.py:
- (ZipFileSetTest.test_open):
- (ZipFileSetTest.test_read):
- * Scripts/webkitpy/common/watchlist/watchlist_unittest.py:
- (WatchListTest.test_filename_definition_no_matches):
- (WatchListTest.test_filename_definition):
- (WatchListTest.test_cc_rules_simple):
- (WatchListTest.test_cc_rules_complex):
- (WatchListTest.test_cc_and_message_rules_complex):
- (WatchListTest.test_cc_and_message_rules_no_matches):
- (WatchListTest.test_added_match):
- (WatchListTest.test_deleted_match):
- (WatchListTest.test_more_and_less_match):
- (WatchListTest.test_complex_match):
- * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
- (LockCheckingRunner.handle_finished_list):
- (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
- (LayoutTestRunnerTests.test_update_summary_with_result):
- (LayoutTestRunnerTests.test_servers_started):
- (SharderTests.assert_shards):
- (SharderTests.test_shard_in_two_has_no_locked_shards):
- (SharderTests.test_shard_in_two_has_no_unlocked_shards):
- (NaturalCompareTest.assert_cmp):
- (KeyCompareTest.assert_cmp):
- * Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py:
- (TestConfigurationTest.test_items):
- (TestConfigurationTest.test_keys):
- (TestConfigurationTest.test_str):
- (TestConfigurationTest.test_repr):
- (TestConfigurationTest.test_hash):
- (TestConfigurationTest.test_eq):
- (TestConfigurationTest.test_values):
- (SpecifierSorterTest.test_init):
- (SpecifierSorterTest.test_add_specifier):
- (SpecifierSorterTest.test_add_macros):
- (SpecifierSorterTest.test_category_priority):
- (SpecifierSorterTest.test_specifier_priority):
- (SpecifierSorterTest.test_sort_specifiers):
- (TestConfigurationConverterTest.test_symmetric_difference):
- (TestConfigurationConverterTest.test_to_config_set):
- (TestConfigurationConverterTest.test_macro_expansion):
- (TestConfigurationConverterTest.test_to_specifier_lists):
- (TestConfigurationConverterTest.test_macro_collapsing):
- (TestConfigurationConverterTest.test_converter_macro_collapsing):
- (TestConfigurationConverterTest.test_specifier_converter_access):
- * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
- (assert_exp):
- (MiscTests.test_result_was_expected):
- (MiscTests.test_remove_pixel_failures):
- (MiscTests.test_suffixes_for_expectations):
- (MiscTests.test_get_expectations_string):
- (SkippedTests.check):
- (ExpectationSyntaxTests.assert_tokenize_exp):
- (SemanticTests.test_bad_bugid):
- (SemanticTests.test_missing_bugid):
- (TestExpectationSerializationTests.test_reconstitute_only_these):
- * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
- (TestFailuresTest.test_crashes):
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_nonexistant_expectations):
- (PortTest.test_additional_expectations):
- * Scripts/webkitpy/layout_tests/port/builders_unittest.py:
- (BuildersTest.test_path_from_name):
- * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
- (ChromiumAndroidPortTest.test_attributes):
- (ChromiumAndroidPortTest.test_default_timeout_ms):
- (ChromiumAndroidPortTest.test_get_devices_one_device):
- (ChromiumAndroidPortTest.test_get_devices_two_devices):
- (ChromiumAndroidPortTest.test_get_device_serial_one_device):
- (ChromiumAndroidPortTest.test_get_device_serial_two_devices):
- (ChromiumAndroidPortTest.test_must_require_http_server):
- (ChromiumAndroidDriverTest.test_get_last_stacktrace):
- (ChromiumAndroidDriverTest.test_get_crash_log):
- (ChromiumAndroidDriverTest.test_cmd_line):
- (ChromiumAndroidDriverTest.test_read_prompt):
- (ChromiumAndroidDriverTest.test_command_from_driver_input):
- (ChromiumAndroidDriverTwoDriversTest.test_two_drivers):
- (ChromiumAndroidTwoPortsTest.test_options_with_two_ports):
- * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py:
- (ChromiumLinuxPortTest.assert_architecture):
- (ChromiumLinuxPortTest.test_determine_architecture_fails):
- (ChromiumLinuxPortTest.test_path_to_image_diff):
- * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
- (ChromiumMacPortTest.assert_name):
- (ChromiumMacPortTest.test_baseline_path):
- (ChromiumMacPortTest.test_path_to_image_diff):
- * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
- (ChromiumPortTestCase.test_default_max_locked_shards):
- (ChromiumPortTestCase.test_default_timeout_ms):
- (ChromiumPortTestCase.test_default_pixel_tests):
- (ChromiumPortTestCase.test_all_test_configurations):
- (ChromiumPortTestCase.test_default_configuration):
- (ChromiumPortTestCase.test_diff_image):
- (ChromiumPortTestCase.test_diff_image_crashed):
- (ChromiumPortTestCase.test_expectations_files):
- * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
- (ChromiumWinTest.test_setup_environ_for_server_cygpath):
- (ChromiumWinTest.assert_name):
- (ChromiumWinTest.test_baseline_path):
- (ChromiumWinTest.test_path_to_image_diff):
- * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
- (DriverTest.test_read_block):
- (DriverTest.test_read_binary_block):
- (DriverTest.test_read_base64_block):
- (DriverTest.test_no_timeout):
- (DriverTest.test_check_for_driver_crash.assert_crash):
- (DriverTest.test_creating_a_port_does_not_write_to_the_filesystem):
- * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
- (FactoryTest.test_get_from_builder_name):
- * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
- (GtkPortTest.test_default_timeout_ms):
- * Scripts/webkitpy/layout_tests/port/http_lock_unittest.py:
- (HttpLockTest.test_current_lock_pid):
- * Scripts/webkitpy/layout_tests/port/image_diff_unittest.py:
- (TestImageDiffer.test_diff_image_failed):
- (TestImageDiffer.test_diff_image_passed):
- * Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py:
- (LeakDetectorTest.test_leaks_args):
- (test_parse_leaks_output):
- (test_leaks_files_in_directory):
- (test_count_total_leaks):
- * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
- (MacTest.test_default_timeout_ms):
- (assert_name):
- (test_setup_environ_for_server):
- (_assert_search_path):
- (test_32bit):
- (test_64bit):
- * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
- (MockTestShellTest.test_pixeltest__fails):
- (MockTestShellTest.test_test_shell_parse_options):
- * Scripts/webkitpy/layout_tests/port/port_testcase.py:
- (PortTestCase.test_default_max_locked_shards):
- (PortTestCase.test_default_timeout_ms):
- (PortTestCase.test_default_pixel_tests):
- (PortTestCase.test_diff_image):
- (PortTestCase.test_diff_image_crashed):
- (PortTestCase.test_get_crash_log):
- (PortTestCase.assert_build_path):
- (PortTestCase.test_expectations_ordering):
- (_assert_config_file_for_platform):
- (test_path_to_apache_config_file):
- (test_additional_platform_directory):
- * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
- (QtPortTest._assert_search_path):
- (QtPortTest._assert_expectations_files):
- (QtPortTest.test_setup_environ_for_server):
- * Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
- (TestServerProcess.test_basic):
- (TestServerProcess.test_broken_pipe):
- * Scripts/webkitpy/layout_tests/port/win_unittest.py:
- (WinPortTest._assert_search_path):
- (WinPortTest._assert_version):
- (WinPortTest.test_runtime_feature_list):
- (WinPortTest.test_expectations_files):
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (LintTest.test_all_configurations):
- (MainTest.test_all):
- (MainTest.test_repeat_each):
- (MainTest.test_skipped_flag):
- (MainTest.test_iterations):
- (MainTest.test_run_chunk):
- (MainTest.test_run_part):
- (MainTest.test_run_singly):
- (MainTest.test_run_singly_actually_runs_tests):
- (MainTest.test_single_file):
- (MainTest.test_single_file_with_prefix):
- (MainTest.test_single_skipped_file):
- (MainTest.test_stderr_is_saved):
- (MainTest.test_test_list):
- (MainTest.test_test_list_with_prefix):
- (MainTest.test_missing_and_unexpected_results):
- (MainTest.test_pixel_test_directories):
- (MainTest.test_missing_and_unexpected_results_with_custom_exit_code):
- (MainTest.test_crash_log):
- (MainTest.test_web_process_crash_log):
- (MainTest.test_exit_after_n_failures_upload):
- (MainTest.test_exit_after_n_failures):
- (MainTest.test_exit_after_n_crashes):
- (MainTest.test_retrying_and_flaky_tests):
- (MainTest.test_run_order__inline):
- (MainTest.test_reftest_run):
- (MainTest.test_reftest_run_reftests_if_pixel_tests_are_disabled):
- (MainTest.test_reftest_skip_reftests_if_no_ref_tests):
- (MainTest.test_reftest_expected_html_should_be_ignored):
- (MainTest.test_reftest_driver_should_run_expected_html):
- (MainTest.test_reftest_driver_should_run_expected_mismatch_html):
- (MainTest.test_output_diffs):
- (MainTest.test_unsupported_platform):
- (EndToEndTest.test_end_to_end):
- (RebaselineTest.test_reset_results):
- (RebaselineTest.test_missing_results):
- (RebaselineTest.test_new_baseline):
- * Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py:
- (BaseTest.integration_test_server__normal):
- (BaseTest.integration_test_server__fails):
- (BaseTest.integration_test_port_and_root):
- * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
- (TestHttpServer.test_start_cmd):
- * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
- (RegularTest.test_logging_not_included):
- (RegularTest._basic):
- (RegularTest.test_basic):
- (RegularTest.test_log_after_update):
- (RegularTest.test_log_args):
- (TtyTest.test_basic):
- (TtyTest.test_log_after_update):
- (VerboseTest.test_basic):
- (VerboseTest.test_log_after_update):
- (VerboseTest.test_log_args):
- * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
- (Testprinter.assertWritten):
- (test_test_status_line):
- * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
- (MainTest.assertWritten):
- * Scripts/webkitpy/style/checker_unittest.py:
- (GlobalVariablesTest.test_webkit_base_filter_rules):
- (CheckerDispatcherSkipTest._assert_should_skip_without_warning):
- (CheckerDispatcherCarriageReturnTest.test_should_check_and_strip_carriage_returns):
- (CheckerDispatcherDispatchTest.assert_checker):
- (CheckerDispatcherDispatchTest.test_changelog_paths):
- (CheckerDispatcherDispatchTest.test_cpp_paths):
- (CheckerDispatcherDispatchTest.test_json_paths):
- (CheckerDispatcherDispatchTest.test_python_paths):
- (CheckerDispatcherDispatchTest.test_text_paths):
- (CheckerDispatcherDispatchTest.test_xml_paths):
- (StyleProcessorConfigurationTest.test_init):
- (StyleProcessorConfigurationTest.test_write_style_error_emacs):
- (StyleProcessorConfigurationTest.test_write_style_error_vs7):
- (StyleProcessor_EndToEndTest.test_init):
- (StyleProcessor_EndToEndTest.test_process):
- (StyleProcessor_CodeCoverageTest.test_process__checker_dispatched):
- * Scripts/webkitpy/style/checkers/changelog_unittest.py:
- (ChangeLogCheckerTest.assert_error.handle_style_error):
- (ChangeLogCheckerTest.test_init):
- * Scripts/webkitpy/style/checkers/common_unittest.py:
- (CarriageReturnCheckerTest.assert_carriage_return):
- (TabCheckerTest.assert_tab):
- * Scripts/webkitpy/style/checkers/cpp_unittest.py:
- (CppFunctionsTest.test_convert_to_lower_with_underscores):
- (CppFunctionsTest.test_create_acronym):
- (CppFunctionsTest.test_parameter):
- (CppFunctionsTest.test_single_line_view):
- (CppFunctionsTest.test_create_skeleton_parameters):
- (CppFunctionsTest.test_find_parameter_name_index):
- (CppFunctionsTest.test_parameter_list):
- (CppFunctionsTest.test_check_parameter_against_text):
- (CppStyleTestBase.perform_lint):
- (CppStyleTestBase.assert_lint):
- (CppStyleTestBase.assert_lint_one_of_many_errors_re):
- (CppStyleTestBase.assert_multi_line_lint):
- (CppStyleTestBase.assert_language_rules_check):
- (CppStyleTestBase.assert_include_what_you_use):
- (CppStyleTestBase.assert_blank_lines_check):
- (CppStyleTestBase.assert_positions_equal):
- (FunctionDetectionTest.perform_function_detection):
- (CppStyleTest.test_get_line_width):
- (CppStyleTest.test_find_next_multi_line_comment_start):
- (CppStyleTest.test_find_next_multi_line_comment_end):
- (CppStyleTest.test_remove_multi_line_comments_from_range):
- (CppStyleTest.test_position):
- (CppStyleTest.test_rfind_in_lines):
- (CppStyleTest.test_close_expression):
- (CppStyleTest.test_include_what_you_use_no_implementation_files):
- (CppStyleTest.test_include_what_you_use):
- (CppStyleTest.test_files_belong_to_same_module):
- (CppStyleTest.test_cleanse_line):
- (CppStyleTest.test_multiline_strings):
- (CppStyleTest.test_newline_at_eof.do_test):
- (CppStyleTest.test_invalid_utf8.do_test):
- (CppStyleTest.test_is_blank_line):
- (CppStyleTest.test_allow_blank_line_before_closing_namespace):
- (CppStyleTest.test_allow_blank_line_before_if_else_chain):
- (CppStyleTest.test_else_on_same_line_as_closing_braces):
- (CppStyleTest.test_build_header_guard):
- (CppStyleTest.test_legal_copyright):
- (CleansedLinesTest.test_init):
- (CleansedLinesTest.test_init_empty):
- (CleansedLinesTest.test_collapse_strings):
- (CheckForFunctionLengthsTest.assert_function_lengths_check):
- (PassPtrTest.assert_pass_ptr_check):
- (LeakyPatternTest.assert_leaky_pattern_check):
- (WebKitStyleTest.test_parameter_names):
- (WebKitStyleTest.test_webkit_export_check):
- (CppCheckerTest.test_init):
- * Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:
- (JSONCheckerTest.assert_error.handle_style_error):
- (JSONCheckerTest.test_init):
- * Scripts/webkitpy/style/checkers/png_unittest.py:
- (PNGCheckerTest.test_init):
- (PNGCheckerTest.test_check):
- * Scripts/webkitpy/style/checkers/python_unittest.py:
- (PythonCheckerTest.test_init):
- (PythonCheckerTest.test_check):
- * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
- (TestExpectationsTestCase._expect_port_for_expectations_path):
- (TestExpectationsTestCase.assert_lines_lint):
- * Scripts/webkitpy/style/checkers/text_unittest.py:
- (TextStyleTestCase.assertNoError):
- (TextStyleTestCase.assertError.error_for_test):
- (TextStyleTestCase.assertError):
- (TextCheckerTest.test_init):
- * Scripts/webkitpy/style/checkers/watchlist_unittest.py:
- (WatchListTest.test_basic_error_message.handle_style_error):
- (WatchListTest):
- * Scripts/webkitpy/style/checkers/xcodeproj_unittest.py:
- (XcodeProjectFileCheckerTest.assert_error):
- * Scripts/webkitpy/style/checkers/xml_unittest.py:
- (XMLCheckerTest.assert_error.handle_style_error):
- (XMLCheckerTest.test_init):
- * Scripts/webkitpy/style/error_handlers_unittest.py:
- (DefaultStyleErrorHandlerTest._check_initialized):
- (DefaultStyleErrorHandlerTest.test_non_reportable_error):
- (DefaultStyleErrorHandlerTest.test_max_reports_per_category):
- (DefaultStyleErrorHandlerTest.test_line_numbers):
- * Scripts/webkitpy/style/filereader_unittest.py:
- (TextFileReaderTest._assert_file_reader):
- (TextFileReaderTest.test_process_file__does_not_exist):
- (TextFileReaderTest.test_count_delete_only_file):
- * Scripts/webkitpy/style/filter_unittest.py:
- (CategoryFilterTest.test_init):
- (CategoryFilterTest.test_init_default_arguments):
- (CategoryFilterTest.test_str):
- (FilterConfigurationTest.test_init):
- (FilterConfigurationTest.test_default_arguments):
- * Scripts/webkitpy/style/main_unittest.py:
- (ChangeDirectoryTest._assert_result):
- * Scripts/webkitpy/style/optparser_unittest.py:
- (ArgumentPrinterTest.test_to_flag_string):
- (ArgumentParserTest.test_parse_default_arguments):
- (ArgumentParserTest.test_parse_explicit_arguments):
- (ArgumentParserTest.test_parse_files):
- (CommandOptionValuesTest.test_init):
- * Scripts/webkitpy/style/patchreader_unittest.py:
- (PatchReaderTest._assert_checked):
- * Scripts/webkitpy/test/finder_unittest.py:
- (FinderTest.test_additional_system_paths):
- (FinderTest.test_to_module):
- (FinderTest.check_names):
- * Scripts/webkitpy/test/main_unittest.py:
- (TesterTest.test_individual_names_are_not_run_twice):
- (TesterTest.test_integration_tests_are_not_found_by_default):
- (TesterTest.test_integration_tests_are_found):
- (TesterTest.integration_test_coverage_works):
- * Scripts/webkitpy/test/runner_unittest.py:
- (RunnerTest.test_run):
- * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
- (_expect_validate):
- * Scripts/webkitpy/tool/bot/expectedfailures_unittest.py:
- (ExpectedFailuresTest._assert_can_trust):
- (ExpectedFailuresTest.test_unexpected_failures_observed):
- (ExpectedFailuresTest.test_unexpected_failures_observed_when_tree_is_hosed):
- * Scripts/webkitpy/tool/bot/feeders_unittest.py:
- (test_patches_with_acceptable_review_flag):
- * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
- (IRCCommandTest.test_whois):
- (IRCCommandTest.test_create_bug):
- (IRCCommandTest.test_roll_chromium_deps):
- (IRCCommandTest.test_rollout):
- * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
- (LayoutTestResultsReaderTest.test_missing_layout_test_results):
- (test_missing_unit_test_results_path):
- (test_layout_test_results):
- * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
- (LoggingDelegate.process_work_item):
- (LoggingDelegate.handle_unexpected_error):
- (QueueEngineTest.test_trivial):
- (QueueEngineTest.test_unexpected_error):
- (QueueEngineTest.test_handled_error):
- (QueueEngineTest._test_terminating_queue):
- * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
- (OpenBugsTest.test_find_bugs_in_string):
- * Scripts/webkitpy/tool/commands/queries_unittest.py:
- (FailureReasonTest.test_blame_line_for_revision):
- (PrintExpectationsTest.run_test):
- (PrintBaselinesTest.test_basic):
- (PrintBaselinesTest.test_multiple):
- (PrintBaselinesTest.test_csv):
- * Scripts/webkitpy/tool/commands/queues_unittest.py:
- (AbstractQueueTest.test_log_directory):
- (AbstractPatchQueueTest.test_next_patch):
- (test_auto_retry):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (test_rebaseline_updates_expectations_file):
- (test_rebaseline_does_not_include_overrides):
- (test_rebaseline_test):
- (test_rebaseline_test_with_results_directory):
- (test_rebaseline_test_and_print_scm_changes):
- (test_rebaseline_and_copy_test):
- (test_rebaseline_and_copy_test_no_existing_result):
- (test_rebaseline_and_copy_test_with_lion_result):
- (test_rebaseline_and_copy_no_overwrite_test):
- (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
- (TestRebaselineJson.test_rebaseline_all):
- (TestRebaselineJson.test_rebaseline_debug):
- (TestRebaselineJson.test_move_overwritten):
- (TestRebaselineJson.test_no_optimize):
- (TestRebaselineJson.test_results_directory):
- (TestRebaseline.test_rebaseline):
- (TestRebaselineExpectations.test_rebaseline_expectations_noop):
- (TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):
- (TestAnalyzeBaselines.test_default):
- (TestAnalyzeBaselines.test_missing_baselines):
- * Scripts/webkitpy/tool/commands/roll_unittest.py:
- (PostRollCommandsTest.test_prepare_state):
- * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
- (BuildCoverageExtrapolatorTest.test_extrapolate):
- * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py:
- (AddSvnMimetypeForPngTest.test_run):
- * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
- (PrepareChangeLogTest.test_ensure_bug_url):
- * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
- (_assert_message_for_revert_output):
- * TestResultServer/model/jsonresults_unittest.py:
- (JsonResultsTest._test_merge):
- (JsonResultsTest._test_get_test_list):
-
-2012-11-14 János Badics <jbadics@inf.u-szeged.hu>
-
- [Qt][ARM] Fix 'nullptr' is a keyword in C++11 [-Wc++0x-compat] warning
- https://bugs.webkit.org/show_bug.cgi?id=102083
-
- Reviewed by Csaba Osztrogonác.
-
- Modified compiler name regex in condition that tests if -std=c++0x, c++11,
- gnu++0x or gnu++11 are enabled in order to match linux-arm-gnueabi-g++ too,
- thus enabling -Wno-c++0x-compat also on ARM compiler.
-
- * qmake/mkspecs/features/unix/default_post.prf:
-
-2012-11-14 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- REGRESSION(r133757): Causing webkitpy unit tests to fail
- https://bugs.webkit.org/show_bug.cgi?id=101444
-
- Reviewed by Csaba Osztrogonác.
-
- Updated the bot name on the unit tests.
-
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaselineTest.test_baseline_directory):
-
-2012-11-14 Byungwoo Lee <bw80.lee@samsung.com>
-
- [EFL][WK2] Rename variables, structures and functions of the MiniBrowser.
- https://bugs.webkit.org/show_bug.cgi?id=101517
-
- Reviewed by Gyuyoung Kim.
-
- Rename variables, structures and functions of the MiniBrowser
- for the naming consistency.
-
- 1) Browser_Window* {app_data|browser_window|window} -> window
-
- 2) Browser_Window::webview -> Browser_Window::ewk_view
- The webkit API functions are ewk_view_xxx not webview_xxx.
- So using ewk_view will be better than webview.
-
- 3) Browser_Window::window -> Browser_Window::elm_window
- The name is changed to be distinguished with 'Browser_Window *window'
-
- 4) browser_{window|view}_find() -> window_find_with_{elm_window|ewk_view}()
- This is changed because the name of the function can be confused.
- Currently, browser_window_find() returns Browser_Window*. And
- browser_view_find() also returns Browser_Window*.
-
- 5) FileSelectorData -> File_Selector_Data / AuthData -> Auth_Data
- The type definition is moved to the top of the source file
- and the name is changed to follow EFL style.
-
- * MiniBrowser/efl/main.c:
- (miniBrowserViewSmartClass):
- (_Browser_Window):
- (_File_Selector_Data):
- (_Auth_Data):
- (window_find_with_ewk_view):
- (window_free):
- (on_key_down):
- (view_focus_set):
- (on_mouse_down):
- (title_set):
- (on_title_changed):
- (on_url_changed):
- (on_back_forward_list_changed):
- (on_new_window):
- (on_close_window):
- (on_progress):
- (on_error):
- (on_download_request):
- (close_file_picker):
- (on_filepicker_parent_deletion):
- (on_filepicker_deletion):
- (on_fileselector_done):
- (on_file_chooser_request):
- (on_download_finished):
- (on_download_failed):
- (on_favicon_received):
- (on_view_icon_changed):
- (on_url_bar_activated):
- (on_url_bar_clicked):
- (on_back_button_clicked):
- (on_forward_button_clicked):
- (on_refresh_button_clicked):
- (on_javascript_alert):
- (on_javascript_confirm):
- (on_javascript_prompt):
- (on_window_geometry_get):
- (on_window_geometry_set):
- (on_fullscreen_deny):
- (on_fullscreen_enter):
- (on_fullscreen_exit):
- (auth_popup_close):
- (on_auth_cancel):
- (on_auth_ok):
- (on_authentication_request):
- (on_tooltip_text_set):
- (on_tooltip_text_unset):
- (on_home_button_clicked):
- (on_window_deletion):
- (window_create):
-
-2012-11-14 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- webkitpy: Update the EFL list of bots
- https://bugs.webkit.org/show_bug.cgi?id=102121
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Update the EFL bots so we can use garden-o-matic.
-
- * Scripts/webkitpy/layout_tests/port/builders.py:
-
-2012-11-13 Yael Aharon <yael.aharon@intel.com>
-
- [EFL][WK2] New window size should consult the window attributes
- https://bugs.webkit.org/show_bug.cgi?id=102122
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Take into account the size that was specified in window.open
- when creating a new window. This avoids ugly flashing on the screen.
-
- * MiniBrowser/efl/main.c:
- (on_key_down):
- (on_new_window):
- (window_create):
- (elm_main):
-
-2012-11-13 Dana Jansens <danakj@chromium.org>
-
- [chromium] Plumb WebCompositorSupport settings through WebLayerTreeSettings as well, in preparation for removing the settings from WebCompositorSupport
- https://bugs.webkit.org/show_bug.cgi?id=102146
-
- Reviewed by James Robinson.
-
- Pass settings that go through WebCompositorSupport also through
- WebLayerTreeSettings. When the compositor starts using those instead,
- we can remove the callers to the WebCompositorSupport setters.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- (TestShell::setPerTilePaintingEnabled):
- (TestShell::setAcceleratedAnimationEnabled):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
-
-2012-11-13 Kentaro Hara <haraken@chromium.org>
-
- Unreviewed, rolling out r134503.
- http://trac.webkit.org/changeset/134503
-
- Roll out a patch that was landed just to investigate svn
- trouble
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-13 Kentaro Hara <haraken@chromium.org>
-
- Unreviewed. Investigating svn trouble. Test commit.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, rolling out r134446.
- http://trac.webkit.org/changeset/134446
- https://bugs.webkit.org/show_bug.cgi?id=101968
-
- Need to try a different strategy for landing a two-sided patch
- (3/3).
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- (TestShell::setPerTilePaintingEnabled):
- (TestShell::setAcceleratedAnimationEnabled):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
-
-2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, rolling out r134449.
- http://trac.webkit.org/changeset/134449
- https://bugs.webkit.org/show_bug.cgi?id=102076
-
- Re-rolling in the patch, it was innocent.
-
- * TestWebKitAPI/PlatformEfl.cmake:
-
-2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
-
- Unreviewed, rolling out r134424.
- http://trac.webkit.org/changeset/134424
- https://bugs.webkit.org/show_bug.cgi?id=102076
-
- Made fast/dom/Window/open-window-min-size.html crash.
-
- * TestWebKitAPI/PlatformEfl.cmake:
-
-2012-11-12 Dana Jansens <danakj@chromium.org>
-
- [chromium] Remove the WebCompositorSupport methods for changing settings, plumb everything through WebLayerTreeSettings
- https://bugs.webkit.org/show_bug.cgi?id=101968
-
- Reviewed by James Robinson.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::setPerTilePaintingEnabled):
- (TestShell::setAcceleratedAnimationEnabled):
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
-
-2012-11-13 Dirk Pranke <dpranke@chromium.org>
-
- Fix webkitpy issues arising from a partially-installed pylint.
- Unreviewed, build fix.
-
- This patch ensures that we will re-install the pylint and logilab
- packages if any of them are missing, not just the pylint package.
-
- * Scripts/webkitpy/thirdparty/__init__.py:
- (AutoinstallImportHook._install_pylint):
-
-2012-11-13 No'am Rosenthal <noam.rosenthal@nokia.com>
-
- Unreviewed, adding my new email address to committers.py and watchlist.
-
- * Scripts/webkitpy/common/config/committers.py:
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-11-13 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [CMake] Incorrect dependency calculation when generating forwarding headers
- https://bugs.webkit.org/show_bug.cgi?id=102076
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Explicitly call generate-forwarding-headers.pl on ${WEBKIT2_DIR} as
- well, since some dependencies pulled in via the WebKit2/WebKit2_C.h
- include in config.h are only generated from there.
-
- This is a bit redundant since this is also done in WebKit2's
- PlatformEfl.cmake, however the WTF and WebCore API tests do not depend
- on WebKit2 so the script may not have been called when these tests are
- being built.
-
- * TestWebKitAPI/PlatformEfl.cmake:
-
-2012-11-13 Zeno Albisser <zeno@webkit.org>
-
- Unreviewed: Adding watchlist definition for CoordinatedGraphics.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-11-13 Hugo Parente Lima <hugo.lima@openbossa.org>
-
- [cmake] Do not use GLOB to add WTR IDL files to buildsystem.
- https://bugs.webkit.org/show_bug.cgi?id=101785
-
- Reviewed by Caio Marcelo de Oliveira Filho.
-
- Using *.idl makes impossible to add IDL files depending on compiler flags,
- like a possible GamepadController.idl file found on Chromium.
-
- * WebKitTestRunner/CMakeLists.txt:
-
-2012-11-13 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] TestRunner should depend on webkit_wtf_support instead of compiling the files itself
- https://bugs.webkit.org/show_bug.cgi?id=102075
-
- Reviewed by Pavel Feldman.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
-
-2012-11-13 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][DRT] Remove extra layoutFrame() call when preparing to send an event via EventSender.
- https://bugs.webkit.org/show_bug.cgi?id=102074
-
- Reviewed by Kenneth Rohde Christiansen.
-
- * DumpRenderTree/efl/EventSender.cpp:
- (feedMouseEvent): Do not call DumpRenderTreeSupportEfl::layoutFrame()
- when sending an event, as it causes additional repaints that create
- wrong pixel results for tests such as
- fast/repaint/overflow-auto-in-overflow-auto-scrolled.html.
-
-2012-11-13 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] Enable Mutation observer
- https://bugs.webkit.org/show_bug.cgi?id=102066
-
- Reviewed by Pavel Feldman.
-
- * qmake/mkspecs/features/features.pri:
-
-2012-11-13 Xiaobo Wang <xbwang@torchmobile.com.cn>
-
- [BlackBerry] DRT - platform/blackberry/editing/text-iterator/findString-markers.html failed
- https://bugs.webkit.org/show_bug.cgi?id=102056
-
- Reviewed by Rob Buis.
-
- RIM PR 235836
-
- TestRunner::findString() was changed to call Page::findString() instead
- of WebPage::findNextString(). Page::findString() doesn't update
- TextMatch markers.
- Work-around by calling both Page::findString() and WebPage::findNextString().
-
- * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
- (TestRunner::findString):
-
-2012-11-12 Jochen Eisinger <jochen@chromium.org>
-
- Add the TestRunner public API to the ChromiumPublicApi watchlist, and introduce an entry for ChromiumTestRunner
- https://bugs.webkit.org/show_bug.cgi?id=101957
-
- Reviewed by Adam Barth.
-
- Chromium now also depends on the TestRunner public API, and as such, similar rules as for the Chromium WebKit API should apply.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-11-13 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] move tracking of damaged regions from WebViewHost to WebTestProxy
- https://bugs.webkit.org/show_bug.cgi?id=101927
-
- Reviewed by Adam Barth.
-
- This will allow for sharing the code with content_shell
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::display):
- * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
- (WebKit):
- (WebTestProxyBase):
- (WebTestRunner::WebTestProxy::didInvalidateRect):
- (WebTestRunner::WebTestProxy::didScrollRect):
- (WebTestRunner::WebTestProxy::scheduleComposite):
- (WebTestRunner::WebTestProxy::scheduleAnimation):
- (WebTestRunner::WebTestProxy::setWindowRect):
- (WebTestRunner::WebTestProxy::show):
- (WebTestRunner::WebTestProxy::didAutoResize):
- (WebTestRunner::WebTestProxy::postAccessibilityNotification):
- * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
- (WebTestRunner::WebTestProxyBase::setPaintRect):
- (WebTestRunner):
- (WebTestRunner::WebTestProxyBase::paintRect):
- (WebTestRunner::WebTestProxyBase::didInvalidateRect):
- (WebTestRunner::WebTestProxyBase::didScrollRect):
- (WebTestRunner::WebTestProxyBase::scheduleComposite):
- (WebTestRunner::WebTestProxyBase::scheduleAnimation):
- (WebTestRunner::WebTestProxyBase::show):
- (WebTestRunner::WebTestProxyBase::setWindowRect):
- (WebTestRunner::WebTestProxyBase::didAutoResize):
- (WebTestRunner::WebTestProxyBase::postAccessibilityNotification):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::createNewWindow):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::scheduleAnimation):
- (WebViewHost::show):
- (WebViewHost::setWindowRect):
- (WebViewHost::WebViewHost):
- (WebViewHost::proxy):
- (WebViewHost::setProxy):
- (WebViewHost::reset):
- (WebViewHost::paintInvalidatedRegion):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-11-12 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: clean up lint errors, part 1
- https://bugs.webkit.org/show_bug.cgi?id=102024
-
- Reviewed by Adam Barth.
-
- This patch cleans up a lot of miscellaneous minor lint errors that
- apparently aren't caught by unit tests, and suppresses a few
- false positives.
-
- Also, this patch removes the garden-o-matic "rollout" entry point
- since it's no longer being used by the frontend (rather than
- fix it to not generate lint errors).
-
- * Scripts/webkitpy/common/system/executive_mock.py:
- (MockExecutive2.run_command):
- * Scripts/webkitpy/common/system/filesystem_mock.py:
- (MockFileSystem.copyfile):
- * Scripts/webkitpy/layout_tests/controllers/manager.py:
- (Manager._http_tests):
- * Scripts/webkitpy/layout_tests/port/apple.py:
- (ApplePort):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.reference_files):
- * Scripts/webkitpy/layout_tests/port/chromium.py:
- (ChromiumPort):
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidDriver._teardown_performance):
- * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
- (ChromiumPortTestCase.TestAndroidPort.__init__):
- (ChromiumPortTestCase.test_default_configuration):
- * Scripts/webkitpy/layout_tests/port/port_testcase.py:
- (PortTestCase):
- (PortTestCase.test_driver_cmd_line):
- (PortTestCase.test_expectations_ordering):
- * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
- (HttpServerBase._check_that_all_ports_are_available):
- * Scripts/webkitpy/style/checkers/python.py:
- (Pylinter):
- * Scripts/webkitpy/tool/commands/gardenomatic.py:
- (GardenOMatic.__init__):
- * Scripts/webkitpy/tool/commands/queues.py:
- (CommitQueue):
- * Scripts/webkitpy/tool/servers/gardeningserver.py:
- (GardeningHTTPRequestHandler):
- (GardeningHTTPRequestHandler.localresult):
-
-2012-11-12 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: clean up lint errors, part 2
- https://bugs.webkit.org/show_bug.cgi?id=102029
-
- Reviewed by Adam Barth.
-
- This cleans up the remaining lint errors in webkitpy with four exceptions:
- 1) we don't lint thirdparty/ autoinstalled code, obviously
- 2) there's an intentional error in the unit tests for pylint itself
- 3) the implementation of webkit-patch optimize-expectations has
- an error but I think we can and should just remove that command as well.
- 4) I have not yet linted the test code
-
- * Scripts/webkitpy/common/newstringio.py:
- * Scripts/webkitpy/common/checkout/scm/scm.py:
- (SCM.find_checkout_root):
- (SCM.will.remote_merge_base):
- * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
- * Scripts/webkitpy/common/checkout/scm/svn.py:
- (SVNRepository.has_authorization_for_realm):
- (SVN.__init__):
- * Scripts/webkitpy/common/config/contributionareas.py:
- (ContributionAreas.names):
- * Scripts/webkitpy/common/config/ports.py:
- (DeprecatedPort):
- * Scripts/webkitpy/common/net/buildbot/buildbot.py:
- (Builder.force_build):
- * Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
- * Scripts/webkitpy/style/checkers/cpp.py:
- (check_posix_threading):
- (check_spacing):
- * Scripts/webkitpy/style/optparser.py:
- (ArgumentParser._create_option_parser):
- * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
- (AbstractLocalServerCommand.execute):
- * Scripts/webkitpy/tool/commands/download.py:
- (AbstractPatchProcessingCommand):
- (AbstractPatchProcessingCommand._process_patch):
- * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
- (AbstractEarlyWarningSystem):
-
-2012-11-12 Dirk Pranke <dpranke@chromium.org>
-
- remove 'webkit-patch optimize-expectations'
- https://bugs.webkit.org/show_bug.cgi?id=102032
-
- Reviewed by Adam Barth.
-
- Removing this command because it is totally broken (probably
- broke when I added support for multiple files in a cascade)
- and doesn't seem to do anything much useful. It certainly
- didn't actually optimize things.
-
- * Scripts/webkitpy/tool/commands/expectations.py: Removed.
-
-2012-11-12 Xiaobo Wang <xbwang@torchmobile.com.cn>
-
- [BlackBerry] DRT - Update Pixel Dump Support for OpenGL renderer
- https://bugs.webkit.org/show_bug.cgi?id=101894
-
- Reviewed by Rob Buis.
-
- RIM PR 241686
- Also remove an un-needed pixel lock, and fix a klocwork error in SKIA
- code path.
-
- * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
- (readPixelsUserInterfaceThread):
- (createBitmapContextFromWebView):
-
-2012-11-12 Daniel Bates <dbates@webkit.org>
-
- Perl errors from Tools/Scripts/copy-webkitlibraries-to-product-directory
- https://bugs.webkit.org/show_bug.cgi?id=101980
-
- Reviewed by Mark Rowe.
-
- Remove library libWebKitSystemInterfaceLeopard.a and libWebKitSystemInterfaceSnowLeopard.a
- from the list of libraries to copy to the specified built products directory
- as these libraries were removed from the repository in <http://trac.webkit.org/changeset/133670>.
-
- * Scripts/copy-webkitlibraries-to-product-directory:
-
-2012-11-12 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: integrate pylint into check-webkit-style, part I
- https://bugs.webkit.org/show_bug.cgi?id=101285
-
- Reviewed by Ojan Vafai.
-
- This patch re-works lint-webkitpy so that the logic is pushed
- into check-webkit-style (mostly); we don't yet control which
- messages are displayed using the rules in webkitpy/style/checker.py
- (we're still using the pylintrc to suppress messages instead),
- but otherwise things work. For now we will only report pylint
- "errors", not warnings.
-
- * Scripts/lint-webkitpy:
- * Scripts/webkitpy/style/checker.py:
- * Scripts/webkitpy/style/checkers/python.py:
- (PythonChecker):
- (PythonChecker.check):
- (PythonChecker._check_pep8):
- (PythonChecker._check_pylint):
- (Pylinter):
- (Pylinter.__init__):
- (Pylinter.run):
- (_FilteredStringIO):
- (_FilteredStringIO.__init__):
- (_FilteredStringIO.write):
- (_FilteredStringIO._filter):
- * Scripts/webkitpy/style/checkers/python_unittest.py:
- (PythonCheckerTest.test_check):
- * Scripts/webkitpy/style/checkers/python_unittest_input.py:
-
-2012-11-12 Dirk Pranke <dpranke@chromium.org>
-
- nrwt: remove a bunch of broken chromium-specific flags
- https://bugs.webkit.org/show_bug.cgi?id=101979
-
- Reviewed by Tony Chang.
-
- There were a bunch of chromium-specific flags that used to be
- supported by NRWT (and handled and passed on to DRT) but have
- probably been broken for a long time and are currently ignored.
-
- This patch removes all of those flags; the rule of thumb going forward
- is that we should only add flags that affect how the python code functions.
- If a flag is just passed verbatim to DRT, the user can use --additional-drt-flag
- for that.
-
- * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
- (parse_args):
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (MainTest.setUp):
-
-2012-11-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [EFL][WK2] Add --device-pixel-ratio command line option to EFL MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=101930
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added --device-pixel-ratio command line option to EFL MiniBrowser which sets
- the ratio between the CSS units and device pixels when the content is unscaled.
- Option is applied for all the views created by mini browser.
-
- * MiniBrowser/efl/main.c:
- (window_create):
- (elm_main):
-
-2012-11-12 Dirk Pranke <dpranke@chromium.org>
-
- remove the chromium-mac-mountainlion TestExpectations file
- https://bugs.webkit.org/show_bug.cgi?id=101789
-
- Reviewed by Ojan Vafai.
-
- Nearly all of the tests have been updated for 10.8 and the remaining
- failures have been merged into the main TestExpectations file. We
- don't need this hook any more.
-
- * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
- (ChromiumMacPort.operating_system):
- * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
- (ChromiumMacPortTest.test_path_to_image_diff):
-
-2012-11-12 Peter Beverloo <peter@chromium.org>
-
- [Chromium-Android] Restart the device's shell in root before pushing data
- https://bugs.webkit.org/show_bug.cgi?id=101944
-
- Reviewed by Adam Barth.
-
- Setting up md5sum and pushing the executable, fonts and test resources was
- unintentionally being done prior to executing the "adb root" command,
- which restarts the device's shell to be root. Since test data is still
- being pushed to /data/local/tmp, writing to which requires root access,
- devices not running as root would throw a ScriptError.
-
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidDriver._setup_test):
-
-2012-11-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] Support ResourceRequest's setTimeoutInterval
- https://bugs.webkit.org/show_bug.cgi?id=101731
-
- Reviewed by Simon Hausmann.
-
- Enable XHR_TIMEOUT now that we support the necessary feature.
-
- * qmake/mkspecs/features/features.pri:
-
-2012-11-12 Gustavo Noronha Silva <gns@gnome.org>
-
- Unreviewed. Removing myself from the list of address to CC on EWS
- build failure; the CC turned out to just be too noisy so I'm
- tracking those in a different way.
-
- * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
- (GtkEWS):
-
-2012-11-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] Can not load MHTML documents
- https://bugs.webkit.org/show_bug.cgi?id=101765
-
- Reviewed by Simon Hausmann.
-
- Enable MHTML feature.
-
- * qmake/mkspecs/features/features.pri:
-
-2012-11-12 Tommy Widenflycht <tommyw@google.com>
-
- MediaStream API: Schedule the RTCDataChannel events to be triggered at idle state
- https://bugs.webkit.org/show_bug.cgi?id=101751
-
- Reviewed by Adam Barth.
-
- Makes the data channel mocks to be synchronous instead of asynchronous to be able to
- properly test RTCDataChannel event handling.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::sendStringData):
- (MockWebRTCPeerConnectionHandler::sendRawData):
-
-2012-11-12 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] move TestRunner implementation into WebTestRunner namespace
- https://bugs.webkit.org/show_bug.cgi?id=101837
-
- Reviewed by Adam Barth.
-
- That way, we don't get collisions when linking e.g. against chromium's
- net test support library.
-
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/GamepadController.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (WebTestRunner):
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
- (WebTestRunner):
- (TestInterfaces):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TextInputController.h:
- (WebTestRunner):
-
-2012-11-12 Zeno Albisser <zeno@webkit.org>
-
- [Qt] MiniBrowser should not strongly depend on QtTestSupport.
- https://bugs.webkit.org/show_bug.cgi?id=101775
-
- Introducing HAVE(QTTESTSUPPORT) to allow building
- MiniBrowser without QtTestSupport.
- This is necessary when using a production build.
-
- Reviewed by Tor Arne Vestbø.
-
- * MiniBrowser/qt/MiniBrowserApplication.cpp:
- (MiniBrowserApplication::handleUserOptions):
- * qmake/mkspecs/features/configure.prf:
- * qmake/mkspecs/features/features.prf:
-
-2012-11-11 Kangil Han <kangil.han@samsung.com>
-
- Change build congratulation message in EFL
- https://bugs.webkit.org/show_bug.cgi?id=101833
-
- Reviewed by Gyuyoung Kim.
-
- EFL port is currently supporting both WK1 and WK2.
- But, build congratulation message still shows WK1(EWebLauncher) only.
- Therefore, this patch adopts WK2 reference execution(MiniBrowser) in its message.
-
- From 'To run EWebLauncher with this newly-built code, use the'
- to 'To run EWebLauncher/MiniBrowser with this newly-built code, use the'.
-
- * Scripts/build-webkit:
- (writeCongrats):
- * Scripts/webkitdirs.pm:
- (launcherName):
-
-2012-11-09 Ryosuke Niwa <rniwa@webkit.org>
-
- People with dichromacy can't tell crashes and passes on flakiness dashboard
- https://bugs.webkit.org/show_bug.cgi?id=101711
-
- Reviewed by Ojan Vafai.
-
- Lower the brightness of orange, and raise the brightness of green so that
- people with color blindnes can still distinguish passes and crashes easily.
-
- * TestResultServer/static-dashboards/flakiness_dashboard_tests.css:
- (.P):
- (.C):
-
-2012-11-09 Tommy Widenflycht <tommyw@google.com>
-
- MediaStream API: Deleting all files relating to the deprecated PeerConnection00
- https://bugs.webkit.org/show_bug.cgi?id=101730
-
- Reviewed by Adam Barth.
-
- Since RTCPeerConenction has superseeded PeerConnection00 this patch removes all
- files relating to the old API.
-
- * DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
- * DumpRenderTree/chromium/MockWebMediaStreamCenter.h:
- (MockWebMediaStreamCenter):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
-
-2012-11-09 Yael Aharon <yael.aharon@intel.com>
-
- [EFL] Give the view a size in TestWebKitAPI
- https://bugs.webkit.org/show_bug.cgi?id=101770
-
- Reviewed by Laszlo Gombos.
-
- 2 tests are currently failing, because they expect us to paint, but we don't paint if the view size is empty.
-
- * TestWebKitAPI/efl/PlatformWebView.cpp:
- (TestWebKitAPI::PlatformWebView::PlatformWebView):
- (TestWebKitAPI::PlatformWebView::~PlatformWebView):
- (TestWebKitAPI):
- (TestWebKitAPI::PlatformWebView::resizeTo):
-
-2012-11-09 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r134068.
- http://trac.webkit.org/changeset/134068
- https://bugs.webkit.org/show_bug.cgi?id=101766
-
- Caused crashes on the bots. (Requested by rakuco on #webkit).
-
- * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-11-09 Zan Dobersek <zandobersek@gmail.com>
-
- [GTK] Bump the jhbuild Cairo version to 1.12.8
- https://bugs.webkit.org/show_bug.cgi?id=101721
-
- Bump the Cairo version in Jhbuild moduleset to 1.12.8. This version
- should fix multiple failures in canvas tests and also contains
- fixes for X-related crashes that occurred from the 1.12.4 version onwards.
-
- * gtk/jhbuild.modules:
-
-2012-11-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [WTR][Cairo] Do not call paintRepaintRectOverlay() when there is no repaint rect.
- https://bugs.webkit.org/show_bug.cgi?id=101759
-
- Reviewed by Kenneth Rohde Christiansen.
-
- * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Improve
- the check for an empty repaintRect -- we need to check if the
- WKArrayRef has any items. `if (repaintRect)' will return true
- regardless of whether the array is empty or not.
-
-
-2012-11-09 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Stop watchlist from triggering QtBuildSystem rule on DerivedSources
-
- Having DerivedSources.pri in the watchlist regexp was creating too much
- noise.
-
- Reviewed by Ossy.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-11-09 Dominik Röttsches <dominik.rottsches@intel.com>
-
- webkitpy/layouttests integration test fails if high shards/processes environment variables are used
- https://bugs.webkit.org/show_bug.cgi?id=101455
-
- Reviewed by Dirk Pranke.
-
- Updating test to disregard WEBKIT_TEST_MAX_LOCKED_SHARDS environment variable.
-
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (MainTest.test_max_locked_shards):
-
-2012-11-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][DRT] Force a repaint before tracking repaint rects.
- https://bugs.webkit.org/show_bug.cgi?id=101743
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Do like other ports and force a repaint before we start tracking
- repaints so that the pixel results generated look more in line
- with what's expected.
-
- * DumpRenderTree/efl/DumpRenderTree.cpp:
- (displayWebView): Call DRTSupport::forceLayout() before start
- tracking repaints.
-
-2012-11-09 Xiaobo Wang <xbwang@torchmobile.com.cn>
-
- [BlackBerry] DRT - eventSender.keyDown() needs to support pageUp, pageDown, home, end key
- https://bugs.webkit.org/show_bug.cgi?id=100937
-
- Reviewed by Rob Buis.
-
- 1. Translate these keys to their corresponding BlackBerry key code.
- 2. Break down a KeyChar event to a KeyDown/KeyUp pair. This is required
- because we only handle scrolling on a KeyDown event in WebPage::keyEvent()
- , and internally a KeyChar event is interpreted as a KeyDown event + a
- KeyUp event in InputHandler::handleKeyboardInput().
-
- Tests fixed:
- 1. editing/input/scroll-viewport-page-up-down.html
- 2. editing/selection/move-begin-end.html
- 3. fast/forms/select-popup-pagekeys.html
-
- * DumpRenderTree/blackberry/EventSender.cpp:
- (keyDownCallback):
-
-2012-11-09 Simon Hausmann <simon.hausmann@digia.com>
-
- Unreviewed prospective Qt/Windows build bot fix:
-
- Make determination of qmake mkspec work with older versions of Qt that
- still create a "mkspecs/default" directory.
-
- * Scripts/webkitdirs.pm:
- (qtMakeCommand):
-
-2012-11-09 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] Introduce a WebTestProxy to override methods in WebViewClient for layout tests
- https://bugs.webkit.org/show_bug.cgi?id=101452
-
- Reviewed by Adam Barth.
-
- The WebTestProxy is template, so it can derive from an implementation
- of the WebViewClient interface. That way, WebTestProxy can hook into
- individual methods of the WebViewClient and forward all the rest to the
- actual implementation.
-
- To demonstrate how I want to use this, I moved the
- postAccessibilityNotification method from WebViewHost to WebTestProxy.
-
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h: Added.
- (WebKit):
- (WebTestRunner):
- (WebTestProxyBase):
- (WebTestProxy):
- (WebTestRunner::WebTestProxy::WebTestProxy):
- (WebTestRunner::WebTestProxy::~WebTestProxy):
- (WebTestRunner::WebTestProxy::postAccessibilityNotification):
- * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp: Added.
- (WebTestRunner):
- (WebTestRunner::WebTestProxyBase::WebTestProxyBase):
- (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
- (WebTestRunner::WebTestProxyBase::setInterfaces):
- (WebTestRunner::WebTestProxyBase::setDelegate):
- (WebTestRunner::WebTestProxyBase::doPostAccessibilityNotification):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::createNewWindow):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-11-09 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Build with MSVC fails to use nmake instead of make
- https://bugs.webkit.org/show_bug.cgi?id=98645
-
- Reviewed by Tor Arne Vestbø.
-
- Don't rely on the "default" mkspec but instead query the target
- mkspec variable from qmake to find the right qmake.conf.
-
- * Scripts/webkitdirs.pm:
- (qtMakeCommand):
-
-2012-11-08 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL] about:blank should display the blank page
- https://bugs.webkit.org/show_bug.cgi?id=101566
-
- Reviewed by Laszlo Gombos.
-
- Add a check to return early without prepending http:// scheme, if the
- URL is 'about:blank'.
-
- * EWebLauncher/url_utils.c:
- (url_from_user_input):
-
-2012-11-08 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add proper support for fullscreen API to MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=101615
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Implement fullscreen API support in MiniBrowser. When entering
- fullscreen a popup is shown to notify the user that something
- is displayed in fullscreen and to advertise that the Escape
- key can be used to exit fullscreen. This behavior is according
- to specification.
-
- * MiniBrowser/efl/main.c:
- (on_key_down):
- (on_fullscreen_accept):
- (on_fullscreen_deny):
- (on_fullscreen_enter):
- (on_fullscreen_exit):
- (window_create):
-
-2012-11-08 Slavomir Kaslev <skaslev@google.com>
-
- [Chromium] DumpRenderTree fix for canvas in software compositing
- https://bugs.webkit.org/show_bug.cgi?id=101509
-
- Reviewed by Adrienne Walker.
-
- Don't use accelerated canvas 2d when in software compositing mode.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::runFileTest):
-
-2012-11-08 Jakob Petsovits <jpetsovits@rim.com>
-
- [BlackBerry] Rework the API to use document coordinates
- https://bugs.webkit.org/show_bug.cgi?id=101608
- RIM PR 173292
-
- Reviewed by Adam Treat.
-
- Adapt to changed WebPage API.
- See Source/WebKit/blackberry/ChangeLog for details.
-
- * DumpRenderTree/blackberry/DumpRenderTree.cpp:
- (BlackBerry::WebKit::DumpRenderTree::DumpRenderTree):
- (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
-
-2012-11-08 Yael Aharon <yael.aharon@intel.com>
-
- [EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
- https://bugs.webkit.org/show_bug.cgi?id=101526
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Turn on WTF_USE_TILED_BACKING_STORE for EFL port.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-08 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix build with MSVC 2012 and Angle
- https://bugs.webkit.org/show_bug.cgi?id=101588
-
- Reviewed by Tor Arne Vestbø.
-
- Angle includes STL's <memory> header file, which with MSVC 2012 includes stdint.h. MSVC 2012
- does ship stdint.h, but it's lacking other headers such as inttypes.h.
-
- So for the rest of WebKit we have to continue to use our own versions of these files from
- JavaScriptCore/os-win32. But for Angle we are just including a shipped STL header file (memory)
- and so it's up to the compiler to make that work, i.e. using the stdint.h it ships.
-
- This patch moves the addition of JavaScriptCore/os-win32 out of default_post.prf, so that it
- doesn't apply to each and every target anymore. In particular it won't apply to Angle anymore,
- because its presence causes a build issue where due to the addition of os-win32/ we end up
- including our own stdint.h but are lacking WTF/ to be in the include search path (which our own
- stdint.h requires). So out of default_post.prf and into WTF.pri, our own wrappers are now only
- used where WTF is also needed, and since os-win32/stdint.h depends on wtf/Platform.h, it seems
- like a logical location.
-
- * qmake/mkspecs/features/default_post.prf:
-
-2012-11-08 Dominik Röttsches <dominik.rottsches@intel.com>
-
- Unreviewed, rolling out r133859.
- http://trac.webkit.org/changeset/133859
- https://bugs.webkit.org/show_bug.cgi?id=101526
-
- Breaks EFL bots test execution.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-08 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] Reduce the number of clean builds
- https://bugs.webkit.org/show_bug.cgi?id=100844
-
- Reviewed by Tor Arne Vestbø.
-
- A change in any Qt project file shouldn't trigger clean
- build always, but only if the incremental build failed.
-
- * Scripts/webkitdirs.pm:
- (buildQMakeProjects):
-
-2012-11-08 Kangil Han <kangil.han@samsung.com>
-
- [EFL][MiniBrowser] Add encoding detector option.
- https://bugs.webkit.org/show_bug.cgi?id=100931
-
- Reviewed by Gyuyoung Kim.
-
- Add a runtime option to enable/disable encoding detector.
-
- * MiniBrowser/efl/main.c:
- (window_create):
- (elm_main):
-
-2012-11-08 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] DumpRenderTree does not honor the shouldDumpPixels boolean argument of dumpAsText
- https://bugs.webkit.org/show_bug.cgi?id=101485
-
- Reviewed by Csaba Osztrogonác.
-
- [Qt] DumpRenderTree does not honor the shouldDumpPixels boolean argument of dumpAsText
-
- Support dumpAsText(true) which means we should not dump a render tree
- but should dump pixels. All other platforms already support it.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::dump):
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- (TestRunner::reset):
- (TestRunner::dumpAsText):
- * DumpRenderTree/qt/TestRunnerQt.h:
- (TestRunner::shouldDumpPixels):
- (TestRunner):
-
-2012-11-08 Yael Aharon <yael.aharon@intel.com>
-
- [EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
- https://bugs.webkit.org/show_bug.cgi?id=101526
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Turn on WTF_USE_TILED_BACKING_STORE for EFL port.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-11-07 Csaba Osztrogonác <ossy@webkit.org>
-
- Make wait-for-SVN-server.py accept empty string as revision
- https://bugs.webkit.org/show_bug.cgi?id=98014
-
- Reviewed by Dirk Pranke.
-
- * BuildSlaveSupport/wait-for-SVN-server.py:
- (waitForSVNRevision):
-
-2012-11-07 Dirk Pranke <dpranke@chromium.org>
-
- garden-o-matic should handle concurrent requests
- https://bugs.webkit.org/show_bug.cgi?id=101407
-
- Reviewed by Ojan Vafai.
-
- Garden-o-Matic is implemented on top of the BaseHttpServer
- python library, which implements a single-threaded (one request at
- a time) server. This means that we can only rebaseline one test at
- a time, and when using a local results file, even fetching the results
- for diffs is single-threaded.
-
- Mixing in the ThreadingMixin enables concurrent requests (subject
- to the global python interpreter lock). Given that we're doing all
- of the work in webkit-patch subprocesses, I think this is safe.
-
- Of course, it may not be safe to do some of the subprocesses in
- parallel (e.g., rollout), but I think as long as we don't issue
- commands that touch overlapping sets of files things should be fine.
- The file locking over modifying testexpectations should keep that
- from being corrupted.
-
- * Scripts/webkitpy/tool/servers/gardeningserver.py:
- (GardeningHTTPServer):
- (GardeningHTTPRequestHandler):
-
-2012-11-07 Andreas Kling <akling@apple.com>
-
- Remove build-webkit dependency on Java SDK for Apple Mac WebKit.
- <http://webkit.org/b/101492>
-
- Reviewed by Anders Carlsson.
-
- Don't check for a Java SDK before building the Apple Mac port. It's no longer needed for
- the build after the Java bridge was removed.
-
- * Scripts/build-webkit:
- (cMakeArgsFromFeatures):
-
-2012-11-07 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Allow client to override setWindowFrame() / getWindowFrame()
- https://bugs.webkit.org/show_bug.cgi?id=101496
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Provide implementation for on_window_geometry_get() / on_window_geometry_set()
- smart functions that interact with the elm_win widget.
-
- * MiniBrowser/efl/main.c:
- (on_window_geometry_get):
- (on_window_geometry_set):
- (window_create):
-
-2012-11-07 Yael Aharon <yael.aharon@intel.com>
-
- [EFL][WK2][AC] API tests crash
- https://bugs.webkit.org/show_bug.cgi?id=101480
-
- Reviewed by Kenneth Rohde Christiansen.
-
- When AC is enabled, 8 API tests are crashing. We need to properly set the evas engine for these tests.
-
- * TestWebKitAPI/efl/PlatformWebView.cpp:
- (TestWebKitAPI::initEcoreEvas):
-
-2012-11-07 Peter Beverloo <peter@chromium.org>
-
- Don't show the Android tester in garden-o-matic yet
- https://bugs.webkit.org/show_bug.cgi?id=101476
-
- Reviewed by Adam Barth.
-
- The Android tester just started running layout tests, and doesn't upload its
- results yet. Don't show it for now. This exception will be removed once it
- has a baseline of greenness.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- (.):
-
-2012-11-07 Balazs Kelemen <kbalazs@webkit.org>
-
- WebKitTestRunner flakily hangs when running pixel tests on Qt
- https://bugs.webkit.org/show_bug.cgi?id=100686
-
- Reviewed by Csaba Osztrogonác.
-
- Make WebKitTestRunner harden against the situation when the coordinated
- graphics rendering synchronisation fails. If we time out when waiting
- for the forced repaint to finish it usually a symptom of the synchronisation
- has been broken. In this case all other tests will fail with the same error.
- The underlying problem is not yet known. Ths patch make us report this situation
- as web process unresponsiveness, so the test harness will kill us and launch
- a new instance. This will make our pixel test bot usable while it should not limit
- us debugging the underlying bug.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::run):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::TestInvocation):
- (WTR::TestInvocation::invoke):
- (WTR::TestInvocation::dumpWebProcessUnresponsiveness):
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation): Introduce new members to hold our state
- that was local to invoke() so far.
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-11-07 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] Open link in this window action
- https://bugs.webkit.org/show_bug.cgi?id=101226
-
- Reviewed by Simon Hausmann.
-
- Populates the context-menu with the new action when the default action is to open in a new window.
-
- * QtTestBrowser/webview.cpp:
- (createContextMenu):
-
-2012-11-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [EFL][WK2] Add ewk_settings_preferred_minimum_contents_width_get/set API
- https://bugs.webkit.org/show_bug.cgi?id=101467
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added ewk_settings_preferred_minimum_contents_width_get/set API which is used for setting/getting
- of default minimum contents width for non viewport meta element sites.
- Set default minimum contents width to '0' for MiniBrowser as it should behave like desktop browser.
-
- * MiniBrowser/efl/main.c:
- (window_create):
-
-2012-11-07 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [EFL] Add EFL to garden-o-matic
- https://bugs.webkit.org/show_bug.cgi?id=101444
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added the EFL bots running layout tests to the garden-o-matic report
- page. We are skipping here the bot that just builds WebKit EFL to make
- the data fetching faster.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- (.):
-
-2012-11-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [EFL][WK2] Make EWK classes Ewk_Objects
- https://bugs.webkit.org/show_bug.cgi?id=101057
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Now all the existing EWK classes share common Ewk_Object ref/unref API.
-
- * MiniBrowser/efl/main.c:
- (close_file_picker):
- (on_file_chooser_request):
-
-2012-11-07 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] Unreviewed. Add Qt EWS bots to the watchers list.
-
- * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
- (QtEWS):
- (QtWK2EWS):
-
-2012-11-07 Grzegorz Czajkowski <g.czajkowski@samsung.com>
-
- WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
- https://bugs.webkit.org/show_bug.cgi?id=93611
-
- Reviewed by Gyuyoung Kim.
-
- WebKitTestRunner enables spelling feature to pass the layout tests from editing/spelling.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::resetStateToConsistentValues):
- Enables spelling by WebKit2 C API.
-
-2012-11-07 Dominik Röttsches <dominik.rottsches@intel.com>
-
- [EFL] Switch the efl-linux-slave-2 to Wk2 Release
- https://bugs.webkit.org/show_bug.cgi?id=101345
-
- Reviewed by Gyuyoung Kim.
-
- Switching efl-linux-slave-2 to Wk2 Release.
-
- * BuildSlaveSupport/build.webkit.org-config/config.json:
-
-2012-11-07 Christophe Dumez <christophe.dumez@intel.com>
-
- Add replaceWithLiteral() method to WTF::String
- https://bugs.webkit.org/show_bug.cgi?id=101257
-
- Reviewed by Benjamin Poulain.
-
- Add API tests for String::replaceWithLiteral() and corresponding
- StringImpl methods.
-
- * TestWebKitAPI/CMakeLists.txt: Add WTFString API tests to CMake.
- * TestWebKitAPI/Tests/WTF/StringImpl.cpp:
- (TestWebKitAPI::TEST):
- (TestWebKitAPI):
- * TestWebKitAPI/Tests/WTF/WTFString.cpp:
- (TestWebKitAPI::TEST):
-
-2012-11-07 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-
- [Qt] Fix build of modules depending on QtWebKit when using prefix
- https://bugs.webkit.org/show_bug.cgi?id=101437
-
- Reviewed by Simon Hausmann.
-
- Remove setting of MODULE_QMAKE_OUTDIR from here, it's been moved to .qmake.conf.
-
- * qmake/mkspecs/features/default_pre.prf:
-
-2012-11-06 Dan Beam <dbeam@chromium.org>
-
- Enable REQUEST_AUTOCOMPLETE for chromium port
- https://bugs.webkit.org/show_bug.cgi?id=101376
-
- Reviewed by Adam Barth.
-
- This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
- HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
-
- Enables the requestAutocomplete runtime feature flag during tests.
-
-2012-11-06 KyungTae Kim <ktf.kim@samsung.com>
-
- [WK2][EFL] Add shortcut for setting a pagination mode on Minibrowser
- https://bugs.webkit.org/show_bug.cgi?id=100301
-
- Reviewed by Gyuyoung Kim.
-
- Setting pagination modes is for a paginated view - left to right / right to left / top to bottom / bottom to top.
- Assign a shortcut "F7" to set pagination modes for tests.
-
- * MiniBrowser/efl/main.c:
- (on_key_down):
-
-2012-11-06 KyungTae Kim <ktf.kim@samsung.com>
-
- [EFL][EWebLauncher] Use Ctrl +/- to zoom in EWebLauncher
- https://bugs.webkit.org/show_bug.cgi?id=100207
-
- Reviewed by Gyuyoung Kim.
-
- Use "Ctrl -" instead of "F7" to zoom out, and use "Ctrl +" instead of "F8" to zoom in,
- and use "Ctrl 0" to set to default zoom level.
- They are more common shortcuts on usual browsers.
-
- * EWebLauncher/main.c:
- (on_key_down):
-
-2012-11-06 Oliver Hunt <oliver@apple.com>
-
- Don't warn about RefPtr* parameters
- https://bugs.webkit.org/show_bug.cgi?id=101403
-
- Reviewed by Gavin Barraclough.
-
- RefPtr<>* is a valid parameter type.
-
- * Scripts/webkitpy/style/checkers/cpp.py:
- (check_function_definition_and_pass_ptr):
- * Scripts/webkitpy/style/checkers/cpp_unittest.py:
- (PassPtrTest.test_ref_ptr_parameter_value):
-
-2012-11-06 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [WTR] Reset EventSender before running each test.
- https://bugs.webkit.org/show_bug.cgi?id=101353
-
- Reviewed by Simon Fraser.
-
- Contrary to what was done to at least some ports in DumpRenderTree,
- EventSender did not currently reset its values in WTR. This caused
- flakiness if a test such as editing/selection/fake-doubleclick.html was
- run twice in a row, since the click count was not reset across each
- run.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::TestController): Do not create m_eventSenderProxy
- in the constructor anymore, it is created in
- resetStateToConsistentValues now.
- (WTR::TestController::resetStateToConsistentValues): Recreate
- m_eventSenderProxy every time this method is run.
- * WebKitTestRunner/TestController.h: Make m_eventSenderProxy an OwnPtr
- and guard it with a platform #ifdef.
- * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
- (WTR::EventSenderProxy::~EventSenderProxy): Add an empty
- implementation.
- * WebKitTestRunner/mac/EventSenderProxy.mm:
- (WTR::EventSenderProxy::~EventSenderProxy): Ditto.
- * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
- (WTR::EventSenderProxy::~EventSenderProxy): Ditto.
-
-2012-11-06 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [EFL][WK2] Refactor Ewk_Auth_Request, Ewk_Url_Scheme_Request and Ewk_Download_Job to be Ewk_Objects
- https://bugs.webkit.org/show_bug.cgi?id=101383
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Ewk_Auth_Request, Ewk_Url_Scheme_Request and Ewk_Download_Job are Ewk_Objects now.
-
- * MiniBrowser/efl/main.c:
- (auth_popup_close):
- (on_authentication_request):
-
-2012-11-06 Tommy Widenflycht <tommyw@google.com>
-
- [chromium] MediaStream API: Remove the valgrind issue with MockWebRTCPeerConnectionHandler
- https://bugs.webkit.org/show_bug.cgi?id=101336
-
- Reviewed by Andreas Kling.
-
- This patch changes the delete to delete [] to match the new[].
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
-
-2012-11-06 Mihai Balan <mibalan@adobe.com>
-
- Add Adobe's bug tracker to committers.py
- https://bugs.webkit.org/show_bug.cgi?id=101338
-
- Reviewed by Kentaro Hara.
-
- Adding Adobe's bug tracker mailing list to committers.py
- to enable its inclusion in the autocomplete list.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-06 Sami Kyostila <skyostil@chromium.org>
-
- [chromium] Enable fixed position compositing on Android DRT
- https://bugs.webkit.org/show_bug.cgi?id=100263
-
- Reviewed by James Robinson.
-
- Chrome on Android forces composited mode for every page and creates
- stacking contexts and graphics layers for fixed positioned elements.
- Change the DumpRenderTree settings to match this.
-
- * DumpRenderTree/chromium/DumpRenderTree.cpp:
- (main):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::setAcceleratedCompositingForFixedPositionEnabled):
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset):
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidPort.additional_drt_flag):
-
-2012-11-06 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][WTR] EventSender: Get rid of the WTRMouseButton enum.
- https://bugs.webkit.org/show_bug.cgi?id=101340
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Get rid of an enum which was basically a duplicate of the
- WKEventMouseButton one in the shared API.
-
- The only difference is that it also had a case for a 4th mouse
- button that we treat in a special way in evasMouseButton() now.
-
- * WebKitTestRunner/EventSenderProxy.h:
- (EventSenderProxy):
- * WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
- (WTR::evasMouseButton):
- (WTR::EventSenderProxy::EventSenderProxy):
- (WTR::EventSenderProxy::mouseUp):
- (WTR::EventSenderProxy::mouseMoveTo):
- (WTR::EventSenderProxy::mouseScrollBy):
- (WTR::EventSenderProxy::leapForward):
-
-2012-11-06 Jussi Kukkonen <jussi.kukkonen@intel.com>
-
- [EFL][WK2] Minibrowser forgets http variables when url includes ampersand
- https://bugs.webkit.org/show_bug.cgi?id=101061
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Elementary entry only returns 'markup' text, meaning ampersands
- in a url will become "&amp;". Use elm_entry_markup_to_utf8() and
- elm_entry_utf8_to_markup() when interacting with the entry.
-
- * MiniBrowser/efl/main.c:
- (on_url_changed):
- (on_url_bar_activated):
-
-2012-11-06 Balazs Kelemen <kbalazs@webkit.org>
-
- DumpRenderTree should have --pixel-tests option again
- https://bugs.webkit.org/show_bug.cgi?id=98648
-
- Reviewed by Dirk Pranke.
-
- Add back the --pixel-tests command line option to DumpRenderTree.
- It was removed r124581 because tools don't use it after that patch.
- However, it turned out that it is useful for debugging and working
- with pixel tests.
-
- * DumpRenderTree/efl/DumpRenderTree.cpp:
- (parseCommandLineOptions):
- (runTest):
- * DumpRenderTree/gtk/DumpRenderTree.cpp:
- (initializeGlobalsFromCommandLineOptions):
- (runTest):
- * DumpRenderTree/mac/DumpRenderTree.mm:
- (initializeGlobalsFromCommandLineOptions):
- (runTest):
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (isOption):
- (printUsage):
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::processLine):
- * DumpRenderTree/qt/DumpRenderTreeQt.h:
- (WebCore::DumpRenderTree::setShouldDumpPixelsForAllTests):
- (DumpRenderTree):
- * DumpRenderTree/win/DumpRenderTree.cpp:
- (runTest):
- (dllLauncherEntryPoint):
- * DumpRenderTree/wx/DumpRenderTreeWx.cpp:
- (runTest):
- (MyApp::OnInit):
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::TestController):
- (WTR::TestController::initialize):
- (WTR::TestController::runTest):
- * WebKitTestRunner/TestController.h:
- (TestController):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline*: fix typo for --results-directory
- https://bugs.webkit.org/show_bug.cgi?id=101295
-
- Reviewed by Ojan Vafai.
-
- Had --results_directory instead of --results-directory in both the
- code and the unit test.
-
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (AbstractParallelRebaselineCommand._rebaseline_commands):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaselineJson.test_results_directory):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline*: fix handling of local file urls
- https://bugs.webkit.org/show_bug.cgi?id=101296
-
- Reviewed by Ojan Vafai.
-
- When using --results-directory, we need to make sure we're converting
- paths to file:/// urls for urllib to work correctly. Also, this
- patch reworks the unit tests to get better coverage (of the execute()
- command) and reduce copy/pasting of mock options.
-
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (RebaselineTest._rebaseline_test_and_update_expectations):
- (RebaselineTest.execute):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaselineTest.setUp):
- (test_rebaseline_updates_expectations_file):
- (test_rebaseline_does_not_include_overrides):
- (test_rebaseline_test_with_results_directory):
- (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
-
-2012-11-05 Kenneth Russell <kbr@google.com>
-
- Added secondary email address and IRC nick.
- https://bugs.webkit.org/show_bug.cgi?id=101290
-
- Unreviewed change to committers.py.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-05 Glenn Adams <glenn@skynav.com>
-
- Add IRC alias for Glenn Adams
- https://bugs.webkit.org/show_bug.cgi?id=101262
-
- Reviewed by Eric Seidel.
-
- Add IRC alias for Glenn Adams.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-05 Dima Gorbik <dgorbik@apple.com>
-
- Back out controversial changes from Bug 98665.
- https://bugs.webkit.org/show_bug.cgi?id=101244
-
- Reviewed by David Kilzer.
-
- Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h.
-
- * DumpRenderTree/mac/MockGeolocationProvider.mm:
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: lint, clean up rebaseline.py
- https://bugs.webkit.org/show_bug.cgi?id=101240
-
- Reviewed by Ojan Vafai.
-
- Miscellaneous cleanup of lint errors and warnings.
-
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (AbstractRebaseliningCommand):
- (RebaselineTest._test_root):
- (OptimizeBaselines._optimize_baseline):
- (OptimizeBaselines.execute):
- (AnalyzeBaselines.__init__):
- (AbstractParallelRebaselineCommand):
- (AbstractParallelRebaselineCommand._builders_to_fetch_from):
- (AbstractParallelRebaselineCommand._files_to_add):
- (AbstractParallelRebaselineCommand._rebaseline):
- (RebaselineExpectations.__init__):
- (Rebaseline.execute):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (_BaseTestCase.setUp):
- (TestAnalyzeBaselines.setUp):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch optimize-baselines should take a --platform arg
- https://bugs.webkit.org/show_bug.cgi?id=97623
-
- Reviewed by Ojan Vafai.
-
- So that we can optionally limit/control which platforms' results
- are affected.
-
- This patch adds --platform to analyze-baselines as well.
-
- * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
- (_baseline_search_hypergraph):
- (BaselineOptimizer.__init__):
- * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
- (TestBaselineOptimizer.__init__):
- (BaselineOptimizerTest.test_move_baselines):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (OptimizeBaselines.__init__):
- (OptimizeBaselines.execute):
- (AnalyzeBaselines.__init__):
- (AnalyzeBaselines.execute):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestAnalyzeBaselines.test_default):
- (TestAnalyzeBaselines.test_missing_baselines):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline-expectations should take a --platform arg
- https://bugs.webkit.org/show_bug.cgi?id=97621
-
- Reviewed by Ojan Vafai.
-
- So that we can limit which platforms we attempt to rebaseline;
- this can reduce the noise the command produces if some ports
- have errors or warnings in their TestExpectations files and/or
- help produce more predictable results.
-
- In testing this patch, I realized that the rebaseline-in-parallel
- commands (rebaseline-json, rebaseline-expectations, etc.) can
- cause multiple rebaseline-test-internal commands to attempt to
- modify the TestExpectations files concurrently, and that we needed
- to lock the files to prevent corruption; it would be nice if
- we can split the updating-the-expectations-files out separately
- from updating the filesystem (much like we do with the scm updates)
- to avoid this concurrency.
-
- * Scripts/webkitpy/common/system/file_lock_mock.py: Added.
- (MockFileLock):
- (MockFileLock.__init__):
- (MockFileLock.acquire_lock):
- (MockFileLock.release_lock):
- * Scripts/webkitpy/common/system/systemhost.py:
- (SystemHost.copy_current_environment):
- (SystemHost):
- (SystemHost.make_file_lock):
- * Scripts/webkitpy/common/system/systemhost_mock.py:
- (MockSystemHost.copy_current_environment):
- (MockSystemHost):
- (MockSystemHost.make_file_lock):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (RebaselineTest._update_expectations_file):
- (RebaselineExpectations.__init__):
- (RebaselineExpectations._add_tests_to_rebaseline_for_port):
- (RebaselineExpectations.execute):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: clean up options for specifying multiple platforms at once
- https://bugs.webkit.org/show_bug.cgi?id=101140
-
- Reviewed by Ojan Vafai.
-
- This patch reworks how we display the help strings for --platform
- options and how we filter out platforms matching a glob. This will
- be useful as I add patches to ensure that all the webkit-patch
- commands are using --platform consistently to filter ports.
-
- There should be no functional changes resulting from this patch.
-
- * Scripts/webkitpy/layout_tests/port/factory.py:
- (platform_options):
- (PortFactory.all_port_names):
- (PortFactory.get_from_builder_name):
- * Scripts/webkitpy/tool/commands/queries.py:
- (PrintExpectations.__init__):
- (PrintBaselines.__init__):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (AbstractRebaseliningCommand):
- (RebaselineJson.__init__):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaselineExpectations.setUp):
- (TestRebaselineExpectations.test_rebaseline_expectations):
-
-2012-11-05 Peter Beverloo <peter@chromium.org>
-
- The layout test runner shouldn't wait for data if stdout/stderr have been closed
- https://bugs.webkit.org/show_bug.cgi?id=101233
-
- Reviewed by Dirk Pranke.
-
- Trying to read the file descriptor for the stdout or stderr pipes when DumpRenderTree
- has crashed during a Chromium Android layout test-run, which uses FIFOs for
- communication, causes the File.fileno() method to raise a ValueError. Return early
- if either of the pipes has already been closed.
-
- * Scripts/webkitpy/layout_tests/port/server_process.py:
- (ServerProcess._wait_for_data_and_update_buffers_using_select):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline is broken
- https://bugs.webkit.org/show_bug.cgi?id=101235
-
- Reviewed by Ojan Vafai.
-
- It didn't get updated to handle the change in parsing --suffixes
- properly, and the unit test didn't get updated either, masking the
- problem.
-
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (Rebaseline._tests_to_update):
- (Rebaseline.execute):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaseline.test_rebaseline):
-
-2012-11-05 Dirk Pranke <dpranke@chromium.org>
-
- lint-webkitpy doesn't autoinstall pylint properly.
- https://bugs.webkit.org/show_bug.cgi?id=101106
-
- Reviewed by Ojan Vafai.
-
- Re-land r133381 with fix; ironically, lint-webkitpy would've
- complained about the problem. Also modify pylintrc and clean up
- any other lint errors in the modified files.
-
- * Scripts/webkitpy/common/system/autoinstall.py:
- (AutoInstaller._set_up_target_dir):
- (AutoInstaller):
- (AutoInstaller._make_package):
- (AutoInstaller._create_scratch_directory):
- (AutoInstaller._install):
- (AutoInstaller.install):
- * Scripts/webkitpy/pylintrc:
- * Scripts/webkitpy/thirdparty/__init__.py:
- (AutoinstallImportHook._ensure_autoinstalled_dir_is_in_sys_path):
- (AutoinstallImportHook):
- (AutoinstallImportHook.find_module):
- (AutoinstallImportHook._install_pylint):
- (AutoinstallImportHook._install_coverage):
- (AutoinstallImportHook._install_eliza):
- (AutoinstallImportHook._install_webpagereplay):
- (AutoinstallImportHook._install):
- * Scripts/webkitpy/thirdparty/__init___unittest.py:
- (ThirdpartyTest.test_import_hook.MockImportHook.__init__):
- (ThirdpartyTest.test_import_hook):
- (ThirdpartyTest.test_imports):
-
-2012-11-05 KyungTae Kim <ktf.kim@samsung.com>
-
- [EFL] Fix build warning in EWebLauncher/main.c
- https://bugs.webkit.org/show_bug.cgi?id=101197
-
- Reviewed by Kentaro Hara.
-
- Because the strp of _Ecore_Getopt_Value is char** (Ecore_Getopt.h),
- The parameter of ECORE_GETOPT_VALUE_STR should be char*
-
- * EWebLauncher/main.c:
- (_User_Arguments):
-
-2012-11-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [EFL][WK2] Add --window-size command line option to EFL MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=100942
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added window-size (-s) command line option to EFL MiniBrowser.
-
- * MiniBrowser/efl/main.c:
- (window_create):
- (parse_window_size):
- (elm_main):
-
-2012-11-05 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] The icon database path should be set by the client
- https://bugs.webkit.org/show_bug.cgi?id=101182
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Enable favicon database functionality in MiniBrowser since
- it is used and it is no longer enabled by default.
-
- * MiniBrowser/efl/main.c:
- (elm_main):
-
-2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WK2] setPlatformStrategies always asserts after r132744
- https://bugs.webkit.org/show_bug.cgi?id=100838
-
- Reviewed by Simon Hausmann.
-
- Reland with build fixes.
-
- Turned test runners to use the new QtTestSupport.
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * DumpRenderTree/qt/QtInitializeTestFonts.h: Removed.
- * MiniBrowser/qt/MiniBrowser.pro:
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize): Removed the comment from here
- because it was just lying, apparently two times. First, it is not incorrect
- to reinitialize our font set and clear font caches, it is what the tests
- expect. Second, the use of QRawFont has nothing to do with the font cache.
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-04 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r133381.
- http://trac.webkit.org/changeset/133381
- https://bugs.webkit.org/show_bug.cgi?id=101161
-
- It made webkit-patch useless (Requested by Ossy_weekend on
- #webkit).
-
- * Scripts/webkitpy/common/system/autoinstall.py:
- (AutoInstaller._create_scratch_directory):
- (AutoInstaller._install):
- (AutoInstaller.install):
- * Scripts/webkitpy/thirdparty/__init__.py:
- (AutoinstallImportHook.__init__):
- (AutoinstallImportHook._install_pylint):
- (AutoinstallImportHook._install_coverage):
- (AutoinstallImportHook._install_eliza):
- (AutoinstallImportHook._install):
- * Scripts/webkitpy/thirdparty/__init___unittest.py:
- (ThirdpartyTest.test_import_hook.MockImportHook.__init__):
- (ThirdpartyTest.test_import_hook):
-
-2012-11-03 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r133403, r133404, and r133409.
- http://trac.webkit.org/changeset/133403
- http://trac.webkit.org/changeset/133404
- http://trac.webkit.org/changeset/133409
- https://bugs.webkit.org/show_bug.cgi?id=101158
-
- "Broke tests" (Requested by kbalazs on #webkit).
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * DumpRenderTree/qt/QtInitializeTestFonts.cpp: Renamed from Source/WebCore/platform/qt/QtTestSupport.cpp.
- (WebKit):
- (WebKit::initializeTestFonts):
- * DumpRenderTree/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- (WebKit):
- * MiniBrowser/qt/MiniBrowser.pro:
- * MiniBrowser/qt/MiniBrowserApplication.cpp:
- (MiniBrowserApplication::handleUserOptions):
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize):
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WK2] setPlatformStrategies always asserts after r132744
- https://bugs.webkit.org/show_bug.cgi?id=100838
-
- 2nd unreviewed buildfix.
-
- * MiniBrowser/qt/MiniBrowserApplication.cpp:
-
-2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WK2] setPlatformStrategies always asserts after r132744
- https://bugs.webkit.org/show_bug.cgi?id=100838
-
- Unreviewed buildfix.
-
- * WebKitTestRunner/Target.pri:
-
-2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WK2] setPlatformStrategies always asserts after r132744
- https://bugs.webkit.org/show_bug.cgi?id=100838
-
- Reviewed by Simon Hausmann.
-
- Reland with build fix.
-
- Turned test runners to use the new QtTestSupport.
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * DumpRenderTree/qt/QtInitializeTestFonts.h: Removed.
- * MiniBrowser/qt/MiniBrowser.pro:
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize): Removed the comment from here
- because it was just lying, apparently two times. First, it is not incorrect
- to reinitialize our font set and clear font caches, it is what the tests
- expect. Second, the use of QRawFont has nothing to do with the font cache.
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-03 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r133397.
- http://trac.webkit.org/changeset/133397
- https://bugs.webkit.org/show_bug.cgi?id=101155
-
- "Broke Qt. No way to force the damn bots to do a clean build.
- I'm giving up." (Requested by kbalazs on #webkit).
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * DumpRenderTree/qt/QtInitializeTestFonts.cpp: Renamed from Source/WebCore/platform/qt/QtTestSupport.cpp.
- (WebKit):
- (WebKit::initializeTestFonts):
- * DumpRenderTree/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- (WebKit):
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize):
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WK2] setPlatformStrategies always asserts after r132744
- https://bugs.webkit.org/show_bug.cgi?id=100838
-
- Reviewed by Simon Hausmann.
-
- Turned test runners to use the new QtTestSupport.
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
- * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize): Removed the comment from here
- because it was just lying, apparently two times. First, it is not incorrect
- to reinitialize our font set and clear font caches, it is what the tests
- expect. Second, the use of QRawFont has nothing to do with the font cache.
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-02 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline is broken
- https://bugs.webkit.org/show_bug.cgi?id=101081
-
- Reviewed by Ojan Vafai.
-
- I broke this in r133061 and the unit tests weren't covering this
- code path. Fixed the issue and the tests. --results-directory
- doesn't make sense for either 'webkit-patch rebaseline' or
- 'webkit-patch rebaseline-expectations', so we don't want to expose
- that as a command line option, but they all call a common
- _rebaseline() routine that references options.results_directory,
- so we need to set a default value.
-
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (RebaselineExpectations.execute):
- (Rebaseline.execute):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaseline):
- (TestRebaseline.test_rebaseline):
-
-2012-11-02 Dirk Pranke <dpranke@chromium.org>
-
- lint-webkitpy doesn't autoinstall pylint properly
- https://bugs.webkit.org/show_bug.cgi?id=101106
-
- Reviewed by Ojan Vafai.
-
- Turns out the autoinstalling code for pylint didn't install
- pylint's dependencies, and the autoinstaller code didn't work
- using nested directories (e.g., "logilab/astng"). Fix those issues,
- clean up the autoinstaller code, and add tests to make sure everything
- imports successfully.
-
- * Scripts/webkitpy/common/system/autoinstall.py:
- (AutoInstaller._create_scratch_directory):
- (AutoInstaller._install):
- (AutoInstaller.install):
- * Scripts/webkitpy/thirdparty/__init__.py:
- (AutoinstallImportHook._ensure_autoinstalled_dir_is_in_sys_path):
- (AutoinstallImportHook._install_pylint):
- (AutoinstallImportHook._install_coverage):
- (AutoinstallImportHook._install_eliza):
- (AutoinstallImportHook._install):
- * Scripts/webkitpy/thirdparty/__init___unittest.py:
- (ThirdpartyTest.test_import_hook.MockImportHook.__init__):
- (ThirdpartyTest.test_import_hook):
- (ThirdpartyTest.test_imports):
-
-2012-11-02 Dirk Pranke <dpranke@chromium.org>
-
- nrwt prints an awkward result message for missing results
- https://bugs.webkit.org/show_bug.cgi?id=100915
-
- Reviewed by Ojan Vafai.
-
- Completely rework how we print out the description of
- each tests's result - we now will print either "passed" or "failed",
- followed by " unexpectedly" if we weren't expecting the result,
- followed by a short description of each type of failure that happened
- (in parentheses). Also reworked the description of each type of
- failure slightly to be clearer.
-
- Also rework the tests to make sure we have coverage of all of the
- messages. Examples of the new output are posted as an attachment to
- the bug.
-
- * Scripts/webkitpy/layout_tests/models/test_expectations.py:
- (TestExpectations):
- * Scripts/webkitpy/layout_tests/models/test_failures.py:
- (FailureTimeout.message):
- (FailureMissingResult.message):
- (FailureTextMismatch.message):
- (FailureMissingImageHash.message):
- (FailureMissingImage.message):
- (FailureImageHashMismatch.message):
- (FailureImageHashIncorrect.message):
- (FailureReftestMismatch.message):
- (FailureReftestMismatchDidNotOccur.message):
- (FailureReftestNoImagesGenerated.message):
- (FailureMissingAudio.message):
- (FailureAudioMismatch.message):
- (FailureEarlyExit.message):
- * Scripts/webkitpy/layout_tests/port/test.py:
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (MainTest.test_run_singly_actually_runs_tests):
- (MainTest.test_missing_and_unexpected_results):
- * Scripts/webkitpy/layout_tests/views/printing.py:
- (Printer._print_result_summary_entry):
- (Printer.print_finished_test):
- (Printer._result_message):
- (Printer._print_unexpected_results):
- * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
- * Scripts/webkitpy/tool/commands/queues_unittest.py:
-
-2012-11-02 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: clean up logging in common.system.autoinstall
- https://bugs.webkit.org/show_bug.cgi?id=101090
-
- Reviewed by Ojan Vafai.
-
- This module logged way too much, much of which was logging that
- was either really redundant or useful only during initial development.
- This patch deletes a lot of code and tweaks the remaining log messages
- to be more useful now.
-
- Also, clean up a bunch of lint errors and warnings.
-
- * Scripts/webkitpy/common/system/autoinstall.py:
- (AutoInstaller.__init__):
- (AutoInstaller._write_file):
- (AutoInstaller._set_up_target_dir):
- (AutoInstaller._create_scratch_directory):
- (AutoInstaller._url_downloaded_path):
- (AutoInstaller._is_downloaded):
- (AutoInstaller._record_url_downloaded):
- (AutoInstaller._extract_targz):
- (AutoInstaller._extract_all):
- (AutoInstaller._unzip):
- (AutoInstaller._download_to_stream):
- (AutoInstaller._download):
- (AutoInstaller._install):
- (AutoInstaller.install):
-
-2012-11-02 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch analyze-baselines output is weak
- https://bugs.webkit.org/show_bug.cgi?id=100998
-
- Reviewed by Ojan Vafai.
-
- Currently analyze-baselines prints a list of baselines that have
- the same checksum per line, but the format is hard to read;
- this patch cleans up the output to print by directory instead
- and use the same format I recently added for debugging optimize-baselines,
- then refactors the code so that we share and adds tests for
- analyze-baselines (which was untested).
-
- Also, I got rid of a couple of unnecessarily-hardcoded port names,
- and modified the baseline optimizer to log the current world when
- optimize fails.
-
- * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
- (BaselineOptimizer.read_results_by_directory):
- (BaselineOptimizer.write_by_directory):
- (BaselineOptimizer.optimize):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (OptimizeBaselines.execute):
- (AnalyzeBaselines.__init__):
- (AnalyzeBaselines._write):
- (AnalyzeBaselines._analyze_baseline):
- (AnalyzeBaselines.execute):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (_FakeOptimizer):
- (_FakeOptimizer.read_results_by_directory):
- (TestAnalyzeBaselines):
- (TestAnalyzeBaselines.setUp):
- (TestAnalyzeBaselines.test_default):
- (TestAnalyzeBaselines.test_missing_baselines):
-
-2012-11-02 Adam Barth <abarth@webkit.org>
-
- ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development
- https://bugs.webkit.org/show_bug.cgi?id=100711
-
- Reviewed by Eric Seidel.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
-
-2012-11-02 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r133303.
- http://trac.webkit.org/changeset/133303
- https://bugs.webkit.org/show_bug.cgi?id=101068
-
- "Broke qt wk2 build (seems like bots fails to rerun qmake if
- needed)" (Requested by kbalazs on #webkit).
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * DumpRenderTree/qt/QtInitializeTestFonts.cpp: Renamed from Source/WebCore/platform/qt/QtTestSupport.cpp.
- (WebKit):
- (WebKit::initializeTestFonts):
- * DumpRenderTree/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- (WebKit):
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize):
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-02 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WK2] setPlatformStrategies always asserts after r132744
- https://bugs.webkit.org/show_bug.cgi?id=100838
-
- Reviewed by Simon Hausmann.
-
- Turned test runners to use the new QtTestSupport.
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (main):
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::open):
- * QtTestBrowser/QtTestBrowser.pro:
- * QtTestBrowser/qttestbrowser.cpp:
- (LauncherApplication::handleUserOptions):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
- (WTR::activateFonts):
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
- * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
- * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
- (WTR::TestRunner::platformInitialize): Removed the comment from here
- because it was just lying, apparently two times. First, it is not incorrect
- to reinitialize our font set and clear font caches, it is what the tests
- expect. Second, the use of QRawFont has nothing to do with the font cache.
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/qt/main.cpp:
- (main):
-
-2012-11-02 Peter Beverloo <peter@chromium.org>
-
- Output Android's device status before running tests on the bots
- https://bugs.webkit.org/show_bug.cgi?id=100944
-
- Reviewed by Dirk Pranke.
-
- This adds a new step to the build master which will be run prior to the
- actual tests-suites on the Chromium Android tester, and soon the Chromium
- Android Perf bot. For each attached device, it outputs the build
- information, battery level, battery temperature and username.
-
- The Android tester currently is very flaky, and this will help tremendously
- in being able to figure out what's wrong with the bot.
-
- * BuildSlaveSupport/build.webkit.org-config/master.cfg:
- (OutputAndroidDeviceStatus):
- (TestFactory.__init__):
- * BuildSlaveSupport/chromium/output-android-device-status: Added.
- (GetAttachedDevices):
- (AndroidDeviceStatus):
- (AndroidDeviceStatus.__init__):
- (AndroidDeviceStatus._run_adb_command):
- (AndroidDeviceStatus.device_type):
- (AndroidDeviceStatus.device_build):
- (AndroidDeviceStatus.device_fingerprint):
- (AndroidDeviceStatus.battery_level):
- (AndroidDeviceStatus.battery_temperature):
- (AndroidDeviceStatus.username):
- (main):
-
-2012-11-02 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-
- [Qt] WTR: Make sure that eventSender.mouseDown sends a press event for the second press
- https://bugs.webkit.org/show_bug.cgi?id=101033
-
- Reviewed by Simon Hausmann.
-
- eventSender.mouseDown doesn't work properly since r133153 where
- MouseButtonDblClick events aren't interpreted as Press events anymore.
- The problem is that mouseDown sends a DblClick event instead of a Press,
- while the correct way is to send both events.
-
- Since QQuickWebView isn't doing anything with DblClick events anymore,
- simply send Press events all the time and let WebCore figure out
- where the double clicks are.
-
- * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
- (WTR::EventSenderProxy::updateClickCountForButton):
- (WTR::EventSenderProxy::mouseDown):
-
-2012-11-02 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add HTTP authentication support to MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=100953
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add HTTP authentication support to MiniBrowser. An authentication
- dialog now pops up to ask the user for credentials whenever
- a Web site requires authentication.
-
- * MiniBrowser/efl/main.c:
- (auth_popup_close):
- (on_auth_cancel):
- (on_auth_ok):
- (on_authentication_request):
- (window_create):
-
-2012-11-01 Yury Semikhatsky <yurys@chromium.org>
-
- Memory instrumentation: do not call checkCountedObject with wrong pointers
- https://bugs.webkit.org/show_bug.cgi?id=100958
-
- Reviewed by Alexander Pavlov.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: test that if there
- if there is class A derived from classes B and C and we have pointer B* to an
- object of class A then MemoryInstrumentationClient::checkoutCountedObject won't
- be called for B* but only for A*
-
- Also MemoryInstrumentation implementation used in the test was refactored to
- allow passing client as a parameter. The client implementation was extracted into
- a top-level class MemoryInstrumentationTestClient.
-
-2012-11-01 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Make File Chooser dialog modal in MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=100962
-
- Reviewed by Gyuyoung Kim.
-
- Make File Chooser dialog modal in MiniBrowser and make
- sure it is closed and freed when its parent window is
- closed.
-
- * MiniBrowser/efl/main.c:
- (close_file_picker):
- (on_filepicker_parent_deletion):
- (on_file_chooser_request):
-
-2012-11-01 Seonae Kim <sunaeluv.kim@samsung.com>
-
- [EFL][DRT] Support Geolocation
- https://bugs.webkit.org/show_bug.cgi?id=97427
-
- Reviewed by Gyuyoung Kim.
-
- Implement methods to use GeolocationClientMock in DumpRenderTree.
- This client attaches to the page whenever a view is created.
-
- * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
- (DumpRenderTreeChrome::createView):
- (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
- * DumpRenderTree/efl/TestRunnerEfl.cpp:
- (TestRunner::setMockGeolocationPosition):
- (TestRunner::setMockGeolocationPositionUnavailableError):
- (TestRunner::setGeolocationPermission):
- (TestRunner::numberOfPendingGeolocationPermissionRequests):
-
-2012-11-01 Ryosuke Niwa <rniwa@webkit.org>
-
- Remove tests no longer needed after r133229.
-
- * Scripts/webkitpy/performance_tests/perftest_unittest.py:
- (TestPerfTestFactory.test_inspector_test):
- * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
- (test_collect_tests_with_skipped_list):
-
-2012-11-01 Nico Weber <thakis@chromium.org>
-
- [chromium] Try to find ninja if it's not in the path already
- https://bugs.webkit.org/show_bug.cgi?id=100988
-
- Reviewed by Ryosuke Niwa.
-
- Similar to the gclient detection logic in update-webkit-chromium
-
- * Scripts/webkitdirs.pm:
- (buildChromiumNinja):
-
-2012-11-01 Eric Seidel <eric@webkit.org>
-
- Add Glenn Adams to the Contributor list
- https://bugs.webkit.org/show_bug.cgi?id=100982
-
- Reviewed by Adam Barth.
-
- I CC him enough on bugs it would help me to have him listed here.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-01 Jer Noble <jer.noble@apple.com>
-
- Add Python-LLDB support for WTF::Vector types.
- https://bugs.webkit.org/show_bug.cgi?id=100980
-
- Reviewed by Anders Carlsson.
-
- Add a synthetic child provider for WTF::Vector types.
-
- * lldb/lldb_webkit.py:
- (__lldb_init_module): Add both the summary and synthetic providers for WTF::Vector
- (WTFVector_SummaryProvider): Wrapper around WTFVectorProvider
- (WTFVectorProvider):
- (WTFVectorProvider.__init__):
- (WTFVectorProvider.num_children): Return m_size+2 children to account for synthesized children.
- (WTFVectorProvider.get_child_index): Synthesize child indexes for each entry in the Vector.
- (WTFVectorProvider.get_child_at_index): Synthesize children for each entry in the Vector.
- (WTFVectorProvider.update): Retrieve state from the underlying Vector.
- (WTFVectorProvider.has_children): Vectors always have children.
-
-2012-11-01 Zoltan Horvath <zoltan@webkit.org>
-
- Remove PageLoad directory entry from PerformanceTests pattern_map
- https://bugs.webkit.org/show_bug.cgi?id=100989
-
- Reviewed by Ryosuke Niwa.
-
- Since we removed PageLoad directory from PerformanceTests we don't need this entry in pattern_map.
-
- * Scripts/webkitpy/performance_tests/perftest.py:
- (PerfTestFactory):
-
-2012-11-01 Jer Noble <jer.noble@apple.com>
-
- Add LLDB-Python scripts to support WebKit data types.
- https://bugs.webkit.org/show_bug.cgi?id=100898
-
- Reviewed by Anders Carlsson.
-
- Add Summary providers for common WebKit string types.
-
- * lldb/lldb_webkit.py: Added.
- (__lldb_init_module): Register these providers with the debugger.
- (WTFString_SummaryProvider): Wrapper around WTFStringProvider.
- (WTFStringImpl_SummaryProvider): Wrapper around WTFStringImplProvider.
- (WTFAtomicString_SummaryProvider): Ditto.
- (guess_string_length): Walk through the string looking for a null-byte(s).
- (ustring_to_string): Walk through the string, extracting two-byte values, and concatenate them.
- (lstring_to_string): Walk through the string, extracting byte values, and concatenate them.
- (WTFStringImplProvider):
- (WTFStringImplProvider.__init__):
- (WTFStringImplProvider.get_length): Extract the m_length variable.
- (WTFStringImplProvider.get_data8): Extract the m_data8 variable.
- (WTFStringImplProvider.get_data16): Extract the m_data16 variable.
- (WTFStringImplProvider.to_string): Pass the appropriate data variable to {u,l}string_to_string.
- (WTFStringImplProvider.is_8bit): Check the m_hashAndFlags variable.
- (WTFStringProvider):
- (WTFStringProvider.__init__):
- (WTFStringProvider.stringimpl): Extract the m_impl variable.
- (WTFStringProvider.get_length): Pass through to WTFStringImplProvider.
- (WTFStringProvider.to_string): Ditto.
-
-2012-11-01 Peter Beverloo <peter@chromium.org>
-
- [Chromium-Android] Apache doesn't properly clean up ipc semaphores after a layout test run
- https://bugs.webkit.org/show_bug.cgi?id=100950
-
- Reviewed by Dirk Pranke.
-
- When a test run would fail to complete due to an exception in one of
- the workers, the HTTP server wouldn't get a chance to gracefully shut
- down. This caused too much IPC semaphores to be left on the server,
- causing Apache to fail to start in subsequent runs.
-
- By unifying the Android-specific code with other ports, we no longer
- fail to call the ChromiumPort/Base setup_test_run() and clean_up_test_run()
- methods either. Furthermore, the number_of_servers argument for starting
- the HTTP server is now available as well.
-
- Because not all tests require an HTTP server, it's not guaranteed that
- it will be started. Android depends on this, so add a new method to Port
- and override it for Android: requires_http_server().
-
- * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
- (LayoutTestRunner.run_tests):
- * Scripts/webkitpy/layout_tests/controllers/manager.py:
- (Manager._run_tests):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.to.requires_http_server):
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_dont_require_http_server):
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidPort.requires_http_server):
- (ChromiumAndroidPort.start_http_server):
- * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
- (ChromiumAndroidPortTest.test_must_require_http_server):
-
-2012-11-01 Adam Roben <aroben@webkit.org>
-
- Crash beneath WKRelease after failed load in MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=100954
-
- Reviewed by Sam Weinig.
-
- There were just some simple retain/release bugs.
-
- * MiniBrowser/mac/WK2BrowserWindowController.m:
- (-[WK2BrowserWindowController updateTextFieldFromURL:]):
- (-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
- Don't try to release null URLs.
-
- (-[WK2BrowserWindowController updateCommittedURLForFrame:]): Don't
- release a URL for which we don't have ownership.
-
-2012-10-31 Rob Buis <rbuis@rim.com>
-
- [BlackBerry] Fix editing/text-iterator/findString-expected.html fail
- https://bugs.webkit.org/show_bug.cgi?id=100902
-
- Reviewed by Yong Li.
-
- PR 210039
-
- Fix the test my using the Page::findString method instead of our own in-page searcher.
- This also syncs some of the changes we did regarding String usage.
-
- * DumpRenderTree/blackberry/DumpRenderTree.cpp:
- (BlackBerry::WebKit::DumpRenderTree::dumpFramesAsText):
- (BlackBerry::WebKit::dumpHistoryItem):
- (BlackBerry::WebKit::dumpBackForwardListForWebView):
- (BlackBerry::WebKit::DumpRenderTree::dump):
- (BlackBerry::WebKit::DumpRenderTree::didFinishDocumentLoadForFrame):
- (BlackBerry::WebKit::DumpRenderTree::didReceiveTitleForFrame):
- (BlackBerry::WebKit::DumpRenderTree::runJavaScriptAlert):
- * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
- (DumpRenderTree):
- * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
- (TestRunner::setMockGeolocationError):
- (TestRunner::layerTreeAsText):
- (TestRunner::findString):
- (TestRunner::setStorageDatabaseIdleInterval):
-
-2012-11-01 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add File Chooser dialog support to MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=100822
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add very basic file picker dialog to MiniBrowser so that
- the user can select a file from the file system when
- clicking an input element of type "file".
-
- * MiniBrowser/efl/main.c:
- (close_file_picker):
- (on_filepicker_deletion):
- (on_fileselector_done):
- (on_file_chooser_request):
- (window_create):
-
-2012-11-01 Yael Aharon <yael.aharon@intel.com>
-
- Unreviewed. Change my email address.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-11-01 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-
- [Qt] Double clicks/taps aren't passed down to the page
- https://bugs.webkit.org/show_bug.cgi?id=100949
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Touch mocking shouldn't transform double click events as well,
- this adds an extra touch update between clicks which prevents
- double-tap detection from triggering on web pages.
-
- Tested on the mobile version of Google maps.
-
- * MiniBrowser/qt/MiniBrowserApplication.cpp:
- (MiniBrowserApplication::notify):
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- NRWT: lint warnings don't show up by default
- https://bugs.webkit.org/show_bug.cgi?id=100914
-
- Reviewed by Ryosuke Niwa.
-
- NRWT wasn't printing any warnings if you had errors in your
- TestExpectations files; this means you would only notice this
- with --lint-test-files, which is probably bad. I'm not sure
- when this requested, but perhaps when we changed the
- warnings to not be fatal if you weren't linting the files.
-
- Now they're still not fatal, but at least we print them.
-
- Also fix one warning message where we were printing the test name twice.
-
- * Scripts/webkitpy/layout_tests/models/test_expectations.py:
- (TestExpectationsModel._already_seen_better_match):
- (TestExpectations._report_warnings):
- * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
- (MiscTests.test_parse_warnings_are_logged_if_not_in_lint_mode(self): Added.
-
-2012-10-31 Terry Anderson <tdanderson@chromium.org>
-
- Missing stderr output when using run-webkit-tests
- https://bugs.webkit.org/show_bug.cgi?id=100709
-
- Reviewed by Dirk Pranke.
-
- Appends #EOF to the end of the stderr output only at the end of a test,
- not possibly part-way through. This will allow all of the stderr output
- to appear on the results page after running run-webkit-tests.
-
- * DumpRenderTree/chromium/TestEventPrinter.cpp:
- (TestEventPrinter::handleTextFooter):
- (TestEventPrinter::handleTestFooter):
-
-2012-10-30 Mark Lam <mark.lam@apple.com>
-
- A JSC printf (support for %J+s and %b).
- https://bugs.webkit.org/show_bug.cgi?id=100566.
-
- Reviewed by Michael Saboff.
-
- Added regression tests for VMInspector::fprintf() sprintf() and snprintf().
-
- * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- * TestWebKitAPI/Tests/JavaScriptCore: Added.
- * TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp: Added.
-
-2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- Added viewport at-rule to the CSS parser and tokenizer
- https://bugs.webkit.org/show_bug.cgi?id=95961
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Enable CSS Device Adaptation by default on EFL.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-10-31 Terry Anderson <tdanderson@chromium.org>
-
- [touchadjustment] touch-links-two-finger-tap test pass incorrectly
- https://bugs.webkit.org/show_bug.cgi?id=100619
-
- Reviewed by Antonio Gomes.
-
- Store the touch area when sending a GestureTwoFingerTap event.
-
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::gestureEvent):
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- nrwt is not killing stuck DRTs on chromium win
- https://bugs.webkit.org/show_bug.cgi?id=100886
-
- Unreviewed, build fix.
-
- In the original implementation of NRWT for Chromium, we used
- to assume that DRT would always manage to exit on its own and
- so NRWT wouldn't attempt to kill DRT if it was stuck (this was the
- "hung worker" problem, and meant that if DRT hung, NRWT would hang).
-
- Eventually, we merged the chromium code with the other ports and
- now will always try to shut down DRTs if a test times out, but as
- part of that merge we left in a code path where we wouldn't
- shut the driver down on windows. This was resulting in stray
- DRTs being left around, and NRWT sometimes not exiting cleanly as
- a result.
-
- No unit tests added because this was a windows-only code path (hence
- hard to test) and that is now gone.
-
- * Scripts/webkitpy/layout_tests/port/server_process.py:
- (ServerProcess.stop):
-
-2012-10-31 Ami Fischman <fischman@chromium.org>
-
- [chromium] DRT and WTR should clear the cache between tests
- https://bugs.webkit.org/show_bug.cgi?id=93195
-
- Reviewed by Tony Chang.
-
- This change makes chromium DRT match the GTK+, Qt, and EFL ports.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::resetTestController): added a WebCache::clear() call to achieve the goal of the bug.
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- Fix typos introduced in r133061.
- Unreviewed, build fix.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
- * Scripts/webkitpy/tool/servers/reflectionhandler.py:
- (ReflectionHandler._serve_file):
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- garden-o-matic should work for local results
- https://bugs.webkit.org/show_bug.cgi?id=100805
-
- Reviewed by Adam Barth.
-
- This is the next step in making garden-o-matic replace
- 'webkit-patch rebaseline-server' and be able to deal with local
- results. garden-o-matic now accepts a '--results-directory' option
- that will point to a layout-test-results directory. At the moment
- this will only work if you are also filtering to a single bot/
- platform at a time (we can't handle multiple bots' worth of local
- results, but that is a logical next step).
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
- * Scripts/webkitpy/tool/commands/gardenomatic.py:
- (GardenOMatic.__init__):
- (GardenOMatic.execute):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (AbstractRebaseliningCommand):
- (RebaselineTest.__init__):
- (RebaselineTest._rebaseline_test):
- (RebaselineTest._rebaseline_test_and_update_expectations):
- (RebaselineTest.execute):
- (AbstractParallelRebaselineCommand._rebaseline_commands):
- (AbstractParallelRebaselineCommand._rebaseline):
- (RebaselineJson.__init__):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (_BaseTestCase):
- (test_rebaseline_updates_expectations_file):
- (test_rebaseline_does_not_include_overrides):
- (test_rebaseline_test):
- (test_rebaseline_test_and_print_scm_changes):
- (test_rebaseline_and_copy_test):
- (test_rebaseline_and_copy_test_no_existing_result):
- (test_rebaseline_and_copy_test_with_lion_result):
- (test_rebaseline_and_copy_no_overwrite_test):
- (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
- (TestRebaselineJson.test_rebaseline_all):
- (TestRebaselineJson.test_rebaseline_debug):
- (TestRebaselineJson.test_move_overwritten):
- (TestRebaselineJson.test_no_optimize):
- (TestRebaselineExpectations.test_rebaseline_expectations):
- * Scripts/webkitpy/tool/servers/gardeningserver.py:
- (GardeningHTTPRequestHandler.rebaselineall):
- (GardeningHTTPRequestHandler):
- (GardeningHTTPRequestHandler.localresult):
- * Scripts/webkitpy/tool/servers/reflectionhandler.py:
- (ReflectionHandler.do_POST):
- (ReflectionHandler):
- (ReflectionHandler.do_HEAD):
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- garden-o-matic should support gardening a single port and specifying how to deal with overwritten baselines
- https://bugs.webkit.org/show_bug.cgi?id=100563
-
- Reviewed by Ojan Vafai.
-
- This patch starts the process of making garden-o-matic more useful for
- bringing up a single new port in two ways. The goal is to fully
- obsolete webkit-patch rebaseline-server.
-
- First, it adds support for the --platform arguments to garden-o-matic
- (so that the UI will default to the right cluster of bots), and if the platform arg
- specifies a single bot, filters the results down to just that bot.
-
- Second, it adds support for --move-overwritten-baselines and changes
- the implementation of the move_overwritten_baselines setting in builders.py
- so that it is only used if this flag is provided.
-
- Future patches will make it possible to use local copies of the build
- results (rather than going to the bots) and other optimizations to make
- it faster to review lots of changes on a single bot.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- (.):
- * Scripts/webkitpy/layout_tests/port/builders.py:
- * Scripts/webkitpy/tool/commands/gardenomatic.py:
- (GardenOMatic):
- (GardenOMatic.execute):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (AbstractRebaseliningCommand):
- (AbstractRebaseliningCommand.__init__):
- (RebaselineTest):
- (OptimizeBaselines):
- (AnalyzeBaselines):
- (AbstractParallelRebaselineCommand):
- (AbstractParallelRebaselineCommand._rebaseline_commands):
- (AbstractParallelRebaselineCommand._rebaseline):
- (Rebaseline.__init__):
- * Scripts/webkitpy/tool/servers/gardeningserver.py:
- (GardeningHTTPServer.url):
- (GardeningHTTPRequestHandler.rebaselineall):
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- test-webkitpy: fix running modules and classes on the command line
- https://bugs.webkit.org/show_bug.cgi?id=100787
-
- Reviewed by Eric Seidel.
-
- Handling modules and classes are arguments on the command line
- was broken due to the way we were parsing test names looking for
- parallel and serial tests.
-
- * Scripts/webkitpy/test/main.py:
- (Tester._test_names):
- (_Loader):
- * Scripts/webkitpy/test/main_unittest.py:
- (TestStubs.integration_test_empty):
- (TestStubs):
- (TestStubs.serial_test_empty):
- (TestStubs.serial_integration_test_empty):
- (TesterTest._find_test_names):
- (TesterTest):
- (TesterTest.test_individual_names_are_not_run_twice):
- (TesterTest.test_integration_tests_are_not_found_by_default):
- (TesterTest.test_integration_tests_are_found):
-
-2012-10-31 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: refactor common command line arguments for --platform, rebaseline commands
- https://bugs.webkit.org/show_bug.cgi?id=100800
-
- Reviewed by Ojan Vafai.
-
- This change shuffles around how we share command-line options
- between NRWT and the various webkit-patch rebaselining commands.
-
- There are no functional changes in this patch but it should make
- things clearer and will be useful in a couple of upcoming patches.
-
- * Scripts/webkitpy/layout_tests/port/__init__.py:
- * Scripts/webkitpy/layout_tests/port/factory.py:
- (platform_options):
- (configuration_options):
- * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
- (parse_args):
- * Scripts/webkitpy/tool/commands/queries.py:
- (PrintExpectations.__init__):
- (PrintBaselines.__init__):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (AbstractRebaseliningCommand):
- (AbstractRebaseliningCommand.__init__):
- (RebaselineTest.__init__):
- (OptimizeBaselines.__init__):
- (AnalyzeBaselines.__init__):
- (AbstractParallelRebaselineCommand):
- (RebaselineJson.__init__):
- (RebaselineExpectations.__init__):
- (Rebaseline.__init__):
-
-2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [NRWT] Xvfb driver is leaking application cache files
- https://bugs.webkit.org/show_bug.cgi?id=100864
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Application Cache looks for XDG_CACHE_HOME which is now
- prepended with DUMPRENDERTREE_TEMP and cleaned up when
- the test worker finishes his job.
-
- * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
- (XvfbDriver._start):
-
-2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [EFL] DRT doesn't clean up after itself
- https://bugs.webkit.org/show_bug.cgi?id=100346
-
- Reviewed by Kenneth Rohde Christiansen.
-
- The test driver exports an environment variable DUMPRENDERTREE_TEMP
- which is used by both DRT and WTR as the folder for storing icons,
- databases, application cache, etc, overriding the default XDG_* path.
-
- We don't need to create these folders because in fact, they are never
- used and also never cleaned. Things created inside DUMPRENDERTREE_TEMP
- are automatically removed after the test run.
-
- * Scripts/webkitpy/layout_tests/port/efl.py:
- (EflPort.setup_environ_for_server):
-
-2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [WTR] WebKitTestRunner is not cleaning up the icon database
- https://bugs.webkit.org/show_bug.cgi?id=100678
-
- Reviewed by Kenneth Rohde Christiansen.
-
- The icon database was not being set to the temporary folder created for
- the test runner by the test driver, which is removed automatically
- after the run.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize):
-
-2012-10-31 Mike West <mkwst@chromium.org>
-
- Script run from an isolated world should bypass a page's CSP.
- https://bugs.webkit.org/show_bug.cgi?id=97398
-
- Reviewed by Adam Barth.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::DRTTestRunner):
- (DRTTestRunner::setIsolatedWorldContentSecurityPolicy):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- Adding a mechanism to set the Content Security Policy for an
- isolated world to Chromium's testRunner.
-
-2012-10-31 Michał Pakuła vel Rutka <m.pakula@samsung.com>
-
- [EFL][DRT] EventSender requires contextClick implementation
- https://bugs.webkit.org/show_bug.cgi?id=86091
-
- Reviewed by Gyuyoung Kim.
-
- Add contextClick for DumpRenderTreeEventSender basing on WebKit GTK
- implementation.
-
- * DumpRenderTree/efl/EventSender.cpp:
- (getMenuItemTitleCallback):
- (setMenuItemTitleCallback):
- (menuItemClickCallback):
- (contextClickCallback):
-
-2012-10-30 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [WTR] Memory leaks in TestWebKitAPI::didReceiveMessageFromInjectedBundle()
- https://bugs.webkit.org/show_bug.cgi?id=100770
-
- Reviewed by Sam Weinig.
-
- Adopt strings returned by WKStringCreateWithUTF8CString() in
- didReceiveMessageFromInjectedBundle() to avoid memory leaks.
-
- * TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent.cpp:
- (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
-
-2012-10-30 Kangil Han <kangil.han@samsung.com>
-
- Fix broken python unit test
- https://bugs.webkit.org/show_bug.cgi?id=100810
-
- Reviewed by Dirk Pranke.
-
- BUG 100755 has broken python unit test, e.g. assertion fail, since it modified baseline path.
- Therefore, this patch fixes it.
-
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaselineTest.test_baseline_directory):
-
-2012-10-30 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline*: add more helpful logging
- https://bugs.webkit.org/show_bug.cgi?id=100562
-
- Reviewed by Ojan Vafai.
-
- This change rewires the garden-o-matic and rebaseline* commands
- in webkit-patch so that --verbose propagates through all the
- subcommand invocations properly, and cleans up the logging so
- that you can actually tell what is happening. For now, we
- leave all of the logging at the logging.DEBUG level, which
- means that it gets mixed in will all the other debug logging noise
- and is harder to read, but we'll fix that in subsequent patches.
-
- * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
- (BaselineOptimizer._platform):
- (BaselineOptimizer._move_baselines):
- (BaselineOptimizer.optimize):
- * Scripts/webkitpy/tool/commands/gardenomatic.py:
- (GardenOMatic.execute):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (RebaselineTest._copy_existing_baseline):
- (RebaselineTest._rebaseline_test):
- (OptimizeBaselines._optimize_baseline):
- (OptimizeBaselines.execute):
- (AbstractParallelRebaselineCommand._run_webkit_patch):
- (AbstractParallelRebaselineCommand._rebaseline_commands):
- (AbstractParallelRebaselineCommand._files_to_add):
- (AbstractParallelRebaselineCommand._optimize_baselines):
- (AbstractParallelRebaselineCommand._rebaseline):
- (RebaselineExpectations._add_tests_to_rebaseline_for_port):
- (Rebaseline.execute):
- * Scripts/webkitpy/tool/servers/gardeningserver.py:
- (GardeningHTTPServer.__init__):
- (GardeningHTTPRequestHandler):
- (GardeningHTTPRequestHandler._run_webkit_patch):
- (GardeningHTTPRequestHandler.rebaselineall):
-
-2012-10-30 Dirk Pranke <dpranke@chromium.org>
-
- clean up tests for webkit-patch rebaseline* commands
- https://bugs.webkit.org/show_bug.cgi?id=100793
-
- Reviewed by Ojan Vafai.
-
- The tests in rebaseline_unittest.py had a lot of code cloning,
- and many of the tests tested whether things passed or failed by
- looking at what was logged instead of what was actually done;
- as a result the tests were kinda hard to understand and harder to
- maintain.
-
- This patch adds hooks to MockWeb() and MockExecutive() so we can
- directly see which URLs were fetched and calls invoked, and
- then reworks all of the unit tests to be easier to follow and
- maintain and not sensitive to the logging. Also there were a
- couple of tests that were redundant.
-
- There are no functional changes in this patch, and I verified that
- the coverage remains the same.
-
- * Scripts/webkitpy/common/net/web_mock.py:
- (MockWeb.__init__):
- (MockWeb.get_binary):
- * Scripts/webkitpy/common/system/executive_mock.py:
- (MockExecutive.__init__):
- (MockExecutive.run_command):
- (MockExecutive.kill_all):
- (MockExecutive):
- (MockExecutive.kill_process):
- (MockExecutive.popen):
- (MockExecutive.run_in_parallel):
- (MockExecutive2):
- (MockExecutive2.__init__):
- (MockExecutive2.run_command):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (_BaseTestCase):
- (_BaseTestCase.setUp):
- (_BaseTestCase._expand):
- (_BaseTestCase._read):
- (_BaseTestCase._write):
- (_BaseTestCase._zero_out_test_expectations):
- (TestRebaselineTest):
- (TestRebaselineTest.test_baseline_directory):
- (TestRebaselineTest.test_rebaseline_updates_expectations_file_noop):
- (test_rebaseline_updates_expectations_file):
- (test_rebaseline_does_not_include_overrides):
- (test_rebaseline_test):
- (test_rebaseline_test_and_print_scm_changes):
- (test_rebaseline_and_copy_test):
- (test_rebaseline_and_copy_test_no_existing_result):
- (test_rebaseline_and_copy_test_with_lion_result):
- (test_rebaseline_and_copy_no_overwrite_test):
- (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
- (TestRebaselineJson):
- (TestRebaselineJson.setUp):
- (TestRebaselineJson.tearDown):
- (TestRebaselineJson.test_rebaseline_all):
- (TestRebaselineJson.test_rebaseline_debug):
- (TestRebaseline):
- (TestRebaseline.test_tests_to_update):
- (TestRebaseline.test_rebaseline):
- (TestRebaseline.test_rebaseline.rebaseline_stub):
- (TestRebaselineExpectations):
- (TestRebaselineExpectations.setUp):
- (TestRebaselineExpectations.test_rebaseline_expectations):
- (TestRebaselineExpectations.test_rebaseline_expectations_noop):
- (TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):
-
-2012-10-30 Dirk Pranke <dpranke@chromium.org>
-
- test-webkitpy: fix import of coverage so that it works in a clean install
- https://bugs.webkit.org/show_bug.cgi?id=100780
-
- Reviewed by Tony Chang.
-
- The coverage module is written so that the parent directory needs
- to be in PYTHONPATH; work around that ...
-
- * Scripts/webkitpy/test/main_unittest.py:
- (TestStubs.test_empty):
- (TesterTest.test_individual_names_are_not_run_twice):
- (TesterTest):
- (TesterTest.integration_test_coverage_works):
- * Scripts/webkitpy/thirdparty/__init__.py:
- (AutoinstallImportHook._install_coverage):
-
-2012-10-30 Anders Carlsson <andersca@apple.com>
-
- Another build fix.
-
- * TestWebKitAPI/Tests/WebKit2/WebArchive.cpp:
- (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
-
-2012-10-30 Anders Carlsson <andersca@apple.com>
-
- Build fix.
-
- * WebKitTestRunner/mac/EventSenderProxy.mm:
- (WTR::EventSenderProxy::mouseScrollBy):
-
-2012-10-30 Rick Byers <rbyers@chromium.org>
-
- [touchadjustment] touch-links-longpress tests passes incorrectly
- https://bugs.webkit.org/show_bug.cgi?id=96810
-
- Reviewed by Antonio Gomes.
-
- Add support for suppling width/height information for longpress
- gesture (as for other gestures like tapDown) for the purposes
- of touch adjustment.
-
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::gestureEvent):
-
-2012-10-29 Anders Carlsson <andersca@apple.com>
-
- Build WebKit as C++11 on Mac
- https://bugs.webkit.org/show_bug.cgi?id=100720
-
- Reviewed by Daniel Bates.
-
- * DumpRenderTree/mac/Configurations/Base.xcconfig:
- * MiniBrowser/Configurations/Base.xcconfig:
- * TestWebKitAPI/Configurations/Base.xcconfig:
- * WebKitTestRunner/Configurations/Base.xcconfig:
- Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.
-
-2012-10-30 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][JHBUILD] Update EFL libraries to v1.7.1 stable release
- https://bugs.webkit.org/show_bug.cgi?id=100759
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Update Bump EFL libraries to the new stable release (v1.7.1)
- in JHBuild to pull the latest bug fixes.
-
- * efl/jhbuild.modules:
-
-2012-10-29 Anders Carlsson <andersca@apple.com>
-
- String::createCFString should return a RetainPtr
- https://bugs.webkit.org/show_bug.cgi?id=100419
-
- Reviewed by Andreas Kling.
-
- Update callers of String::createCFString.
-
- * WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm:
- (WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame):
-
-2012-10-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [WK2][WTR] WebKitTestRunner needs testRunner.queueLoadHTMLString
- https://bugs.webkit.org/show_bug.cgi?id=100747
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added testRunner.queueLoadHTMLString implementation.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::queueLoadHTMLString):
- (WTR):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::queueLoadHTMLString):
- (WTR):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/WorkQueueManager.cpp:
- (WTR::WorkQueueManager::queueLoadHTMLString):
- (WTR):
- * WebKitTestRunner/WorkQueueManager.h:
- (WorkQueueManager):
-
-2012-10-30 Kangil Han <kangil.han@samsung.com>
-
- [EFL] Baseline search path should consider both WK1 and WK2 on layout test.
- https://bugs.webkit.org/show_bug.cgi?id=100755
-
- Reviewed by Gyuyoung Kim.
-
- Current implementation doesn't consider WK1 case in baseline search path.
- Therefore, this patch fixes it.
-
- * Scripts/webkitpy/layout_tests/port/efl.py:
- (EflPort.default_baseline_search_path):
-
-2012-10-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [QT][DRT] Remove unneeded testRunner.setMediaType() implementation
- https://bugs.webkit.org/show_bug.cgi?id=100740
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Removed unneeded testRunner.setMediaType() implementation, as tests use
- cross-platform window.internals.settings.setMediaTypeOverride instead.
-
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- * DumpRenderTree/qt/TestRunnerQt.h:
- (TestRunner):
-
-2012-10-30 Kangil Han <kangil.han@samsung.com>
-
- [EFL][DRT] Bitmap should show whole view area.
- https://bugs.webkit.org/show_bug.cgi?id=100642
-
- Reviewed by Gyuyoung Kim.
-
- css sticky position test cases haven't been passed even though implementation has been landed by BUG 95182.
- This is because current create bitmap implementation refers to geometry position that considers scroll movement even though
- paint does it. Therefore, this patch always reflects current view size and remove duplicated graphic operation to dump correct bitmap image.
-
- * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
- (createBitmapContextFromWebView):
-
-2012-10-30 Jinwoo Song <jinwoo7.song@samsung.com>
-
- [EFL] Refactor tooltip callback signal in WebKit1
- https://bugs.webkit.org/show_bug.cgi?id=100571
-
- Reviewed by Gyuyoung Kim.
-
- Separate tooltip callback signal into 'tooltip,text,set'
- and 'tooltip,text,unset' to be consistent with WebKit2.
-
- * EWebLauncher/main.c:
- (on_tooltip_text_set):
- (on_tooltip_text_unset):
- (browserCreate):
-
-2012-10-29 Csaba Osztrogonác <ossy@webkit.org>
-
- Unreviewed, rolling out r132819.
- http://trac.webkit.org/changeset/132819
- https://bugs.webkit.org/show_bug.cgi?id=100388
-
- It made layout testing 40% slower and storage tests assert
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::DumpRenderTree):
- (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
- (WebCore::DumpRenderTree::dump):
- * DumpRenderTree/qt/DumpRenderTreeQt.h:
- (DumpRenderTree):
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- (TestRunner::reset):
- * DumpRenderTree/qt/TestRunnerQt.h:
- (TestRunner):
-
-2012-10-29 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] TestRunner needs to compile ChromiumCurrentTime and ChromiumThreading in components build
- https://bugs.webkit.org/show_bug.cgi?id=100658
-
- Reviewed by Tony Chang.
-
- Before, this was compiled into DumpRenderTree. I also dropped the
- include_dirs and dependencies block as TestRunner already has them.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
-
-2012-10-29 Takashi Sakamoto <tasak@google.com>
-
- Unreviewed. Adding myself as a committer.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-28 Mark Rowe <mrowe@apple.com>
-
- Simplify Xcode configuration settings that used to vary between OS versions.
-
- Reviewed by Dan Bernstein.
-
- * DumpRenderTree/mac/Configurations/Base.xcconfig:
- * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
- * MiniBrowser/Configurations/Base.xcconfig:
- * MiniBrowser/Configurations/DebugRelease.xcconfig:
- * TestWebKitAPI/Configurations/Base.xcconfig:
- * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
- * WebKitTestRunner/Configurations/Base.xcconfig:
- * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
-
-2012-10-28 Mark Rowe <mrowe@apple.com>
-
- Remove references to unsupported OS and Xcode versions.
-
- Reviewed by Anders Carlsson.
-
- * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
- * DumpRenderTree/mac/Configurations/Base.xcconfig:
- * DumpRenderTree/mac/Configurations/CompilerVersion.xcconfig: Removed.
- * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
- * MiniBrowser/Configurations/Base.xcconfig:
- * MiniBrowser/Configurations/CompilerVersion.xcconfig: Removed.
- * MiniBrowser/Configurations/DebugRelease.xcconfig:
- * TestWebKitAPI/Configurations/Base.xcconfig:
- * TestWebKitAPI/Configurations/CompilerVersion.xcconfig: Removed.
- * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
- * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- * WebKitTestRunner/Configurations/Base.xcconfig:
- * WebKitTestRunner/Configurations/CompilerVersion.xcconfig: Removed.
- * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
- * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
-
-2012-10-26 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: change non-verbose log format for webkit-patch
- https://bugs.webkit.org/show_bug.cgi?id=100561
-
- Reviewed by Ojan Vafai.
-
- Logging the module name and the log level is annoying and nearly useless.
- For starters, this change removes that unless you are doing verbose/
- debug logging. In the future we should split out the concepts of
- verbose and debug logging (like we did in test-webkitpy and
- run-webkit-tests) so that you could get this in debug logging.
-
- * Scripts/webkitpy/common/system/logutils.py:
- (_default_handlers):
- (configure_logging):
- * Scripts/webkitpy/common/system/logutils_unittest.py:
- (ConfigureLoggingTest.test_info_message):
- (ConfigureLoggingTest):
- (ConfigureLoggingTest.test_debug_message):
- (ConfigureLoggingTest.test_two_messages):
- (ConfigureLoggingVerboseTest):
- (ConfigureLoggingVerboseTest._logging_level):
- (ConfigureLoggingVerboseTest.test_info_message):
- (ConfigureLoggingVerboseTest.test_debug_message):
- (ConfigureLoggingCustomLevelTest.test_logged_message):
-
-2012-10-29 Christophe Dumez <christophe.dumez@intel.com>
-
- [CMAKE] Add TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp to CMakeLists.txt
- https://bugs.webkit.org/show_bug.cgi?id=100681
-
- Reviewed by Anders Carlsson.
-
- Add TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp to CMake since
- it is needed by plugins/npruntime/npruntime-calls-with-null-npp.html
- layout test.
-
- * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
-
-2012-10-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] Flaky security tests
- https://bugs.webkit.org/show_bug.cgi?id=100388
-
- Reviewed by Jocelyn Turcotte.
-
- Disable text dumping and load a blank URL to ensure the documentLoader is cleared
- before we start dumping text for the new page. Otherwise messages from the old page
- may end up in the text output of the new test.
-
- This matches what WebKitTestRunner does, and reuses the Qt code for waiting for flag.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::DumpRenderTree):
- (WebCore::runUntil):
- (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
- (WebCore::DumpRenderTree::finishedResetting):
- (WebCore::DumpRenderTree::dump):
- * DumpRenderTree/qt/DumpRenderTreeQt.h:
- (DumpRenderTree):
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- (TestRunner::resetDumping):
- (TestRunner::reset):
- * DumpRenderTree/qt/TestRunnerQt.h:
- (TestRunner):
-
-2012-10-29 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][WKTR] Enable Shadow DOM at runtime if compiled with SHADOW_DOM support
- https://bugs.webkit.org/show_bug.cgi?id=100668
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Enable Shadow DOM functionality at run time in WebKitTestRunner
- if compiled with SHADOW_DOM flag set. This is needed to run
- the Shadow DOM layout tests.
-
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::beginTesting):
-
-2012-10-29 Yael Aharon <yael.aharon@intel.com>
-
- [EFL][AC] Fix bugs preventing us from running layout tests with AC turned on
- https://bugs.webkit.org/show_bug.cgi?id=100598
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Make sure to use opengl_x11 engine when AC is turned on and X11 is in use.
- We cannot create a gl context otherwise.
-
- * MiniBrowser/efl/main.c:
- (elm_main):
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::initEcoreEvas):
- * DumpRenderTree/efl/DumpRenderTree.cpp:
- (initEcoreEvas):
- * EWebLauncher/efl/main.c:
- (windowCreate):
-
-2012-10-29 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][WK2] REGRESSION(r132342): fast/events/frame-tab-focus.html fails
- https://bugs.webkit.org/show_bug.cgi?id=100646
-
- Reviewed by Kenneth Rohde Christiansen.
-
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::focus): Improve the check we perform to
- decide whether the focus should be taken out of the view before
- focusing it again so that we do not unnecessarily unfocus it and
- cause blur/focus events to be triggered. Instead of just verifying
- if the Evas_Object representing the view has focus, use the WK C
- API to check that the currently focused frame is not the main
- frame.
-
-2012-10-29 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r132782.
- http://trac.webkit.org/changeset/132782
- https://bugs.webkit.org/show_bug.cgi?id=100653
-
- It made 400+ tests fail and 180 tests flakey on Qt (Requested
- by Ossy on #webkit).
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
-
-2012-10-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] Flaky security tests
- https://bugs.webkit.org/show_bug.cgi?id=100388
-
- Reviewed by Jocelyn Turcotte.
-
- Disable text output and load a blank URL to ensure the documentLoader is cleared
- before we start dumping text for the new page. Otherwise messages from the old page
- may end up in the text output of the new test.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
-
-2012-10-29 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] remove remaining usages of webkit_support from the TestRunner library
- https://bugs.webkit.org/show_bug.cgi?id=100344
-
- Reviewed by Adam Barth.
-
- The most important part is to not rely on calling out to gdk/X11 to
- translate keycodes to hardware keycodes, as this is not possible inside
- the sandbox.
-
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (WebKit):
- (webkit_support):
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::doDragDrop):
- (WebTestRunner::EventSender::updateClickCountForButton):
- (WebTestRunner::EventSender::mouseDown):
- (WebTestRunner::EventSender::mouseUp):
- (WebTestRunner::EventSender::mouseMoveTo):
- (WebTestRunner::EventSender::keyDown):
- (WebTestRunner::EventSender::replaySavedEvents):
- (WebTestRunner::EventSender::contextClick):
- (WebTestRunner::EventSender::beginDragWithFiles):
- (WebTestRunner::EventSender::sendCurrentTouchEvent):
- (WebTestRunner::EventSender::handleMouseWheel):
- (WebTestRunner::EventSender::gestureEvent):
- (WebTestRunner::EventSender::gestureFlingCancel):
- (WebTestRunner::EventSender::gestureFlingStart):
- * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Added.
- (WebTestRunner):
- (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
- * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::getCurrentTimeInMillisecond):
- (WebTestRunner):
- (WebTestRunner::WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::getCurrentTimeInMillisecond):
- (WebViewHost::getAbsoluteWebStringFromUTF8Path):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
-
- Unreviewed. Add jonathan.dong@torchmobile.com.cn as a committer.
- https://bugs.webkit.org/show_bug.cgi?id=100629
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-27 Dan Bernstein <mitz@apple.com>
-
- REAL_PLATFORM_NAME build setting is no longer needed
- https://bugs.webkit.org/show_bug.cgi?id=100587
-
- Reviewed by Mark Rowe.
-
- Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
- to PLATFORM_NAME.
-
- * DumpRenderTree/mac/Configurations/Base.xcconfig:
- * DumpRenderTree/mac/Configurations/CompilerVersion.xcconfig:
- * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
- * MiniBrowser/Configurations/Base.xcconfig:
- * MiniBrowser/Configurations/CompilerVersion.xcconfig:
- * TestWebKitAPI/Configurations/Base.xcconfig:
- * TestWebKitAPI/Configurations/CompilerVersion.xcconfig:
- * WebKitTestRunner/Configurations/Base.xcconfig:
- * WebKitTestRunner/Configurations/CompilerVersion.xcconfig:
- * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
-
-2012-10-26 Anders Carlsson <andersca@apple.com>
-
- Crash when making NPRuntime calls with a null NPP pointer
- https://bugs.webkit.org/show_bug.cgi?id=100569
-
- Reviewed by Darin Adler.
-
- Add new NPRuntimeCallsWithNullNPP plug-in test.
-
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
- * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
- (PluginTest::NPN_ReleaseVariantValue):
- (PluginTest::netscapeFuncs):
- * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
- (PluginTest):
- * DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp: Added.
- (NPRuntimeCallsWithNullNPP):
- (NPRuntimeCallsWithNullNPP::NPRuntimeCallsWithNullNPP):
- (NPRuntimeCallsWithNullNPP::NPP_New):
- * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
- * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
- * GNUmakefile.am:
-
-2012-10-26 Dominic Mazzoni <dmazzoni@google.com>
-
- AX: Notification should be sent when accessibilityIsIgnored changes
- https://bugs.webkit.org/show_bug.cgi?id=99547
-
- Reviewed by Chris Fleizach.
-
- Add additional accessibility notifications.
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::postAccessibilityNotification):
-
-2012-10-25 Roger Fong <roger_fong@apple.com>
-
- Get rid of (<X%) failing output for old-run-webkit-tests.
- https://bugs.webkit.org/show_bug.cgi?id=100447
-
- Reviewed by Jessie Berlin.
-
- Not a particularly useful piece of information. It's pretty much never above 1%.
- new-run-webkit-tests does not output this either.
-
- * Scripts/old-run-webkit-tests:
- (printResults):
-
-2012-10-26 Xianzhu Wang <wangxianzhu@chromium.org>
-
- Build bot gives incorrect link to EWS build failure
- https://bugs.webkit.org/show_bug.cgi?id=100436
-
- Reviewed by Adam Barth.
-
- * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
- (MockCommitQueue.__init__):
- (MockCommitQueue.command_failed): Return incremental failure_status_id
- (CommitQueueTaskTest.test_red_tree_patch_rejection): Check failure_status_id
- * Scripts/webkitpy/tool/bot/patchanalysistask.py:
- (PatchAnalysisTask._test_patch): Use the failure_status_id of test with patch when test without patch fails and test with patch has unexpected failures.
-
-2012-10-26 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- webkitpy: Pass the `Listen' Apache directive from webkitpy, not the httpd.conf files.
- https://bugs.webkit.org/show_bug.cgi?id=98602
-
- Reviewed by Dirk Pranke.
-
- Unify all the different `Listen' directives present in the several
- httpd.conf files we have in LayoutTests/http/conf. For one, we
- were already passing `Listen 127.0.0.1:8000' via webkitpy before,
- and opening the other ports from the conf files.
-
- The configuration files differed mostly in the way they handled
- IPV6 ports. Some of them did not listen to IPV6 ports because the
- systems which used them sometimes did not have IPV6 support. The
- `http_server_supports_ipv6' method has been added to Port to
- address that. cygwin, on its turn, still seems to use Apache 1.3,
- which does not support IPV6 at all; the newly-added method has a
- special case for that. Plus, perform a socket.getaddrinfo() call
- the same way Apache itself does so we are sure we only enable IPV6
- when setting that up in the httpd server is not going to fail.
-
- * Scripts/webkitpy/common/system/platforminfo_mock.py:
- (MockPlatformInfo.is_cygwin):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.baseline_version_dir):
- (Port.to.start_websocket_server):
- (Port.to):
- (Port.to.http_server_supports_ipv6):
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_http_server_supports_ipv6):
- (PortTest.test_build_path):
- * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
- (LayoutTestApacheHttpd):
- (LayoutTestApacheHttpd.__init__):
-
-2012-10-26 David Barton <dbarton@mathscribe.com>
-
- Unreviewed. Update my IRC nickname to a registered one.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-26 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix the LLInt build on Windows
- https://bugs.webkit.org/show_bug.cgi?id=97648
-
- Reviewed by Tor Arne Vestbø.
-
- Added BIN_EXTENSION variable - similar to automake - that expands to .exe as suffix for
- executable programs on Windows. Empty otherwise. Also added support for force_build_all
- to allow overriding us disabling build_all for TEMPLATE = app.
-
- * qmake/mkspecs/features/default_pre.prf:
-
-2012-10-26 Xiaobo Wang <xbwang@torchmobile.com.cn>
-
- [BlackBerry] Support pixel tests for BlackBerry DRT
- https://bugs.webkit.org/show_bug.cgi?id=100210
-
- Reviewed by Rob Buis.
-
- (The following 2 files are missed in previous patch(r132582), adding them
- again.)
-
- * DumpRenderTree/blackberry/build: Added.
- * DumpRenderTree/blackberry/src.pro: Added.
- Adds 2 files for building ImageDiff, by Christopher Wells.
-
-2012-10-26 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- Add feature flags for CSS Device Adaptation
- https://bugs.webkit.org/show_bug.cgi?id=95960
-
- Reviewed by Kenneth Rohde Christiansen.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-10-26 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r132552.
- http://trac.webkit.org/changeset/132552
- https://bugs.webkit.org/show_bug.cgi?id=100486
-
- Makes typeahead tests crash in debug. (Requested by pfeldman
- on #webkit).
-
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/DRTTestRunner.h:
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::doDragDrop):
- (WebTestRunner::EventSender::updateClickCountForButton):
- (WebTestRunner::EventSender::mouseDown):
- (WebTestRunner::EventSender::mouseUp):
- (WebTestRunner::EventSender::mouseMoveTo):
- (WebTestRunner::EventSender::keyDown):
- (WebTestRunner::EventSender::replaySavedEvents):
- (WebTestRunner::EventSender::contextClick):
- (WebTestRunner::EventSender::beginDragWithFiles):
- (WebTestRunner::EventSender::sendCurrentTouchEvent):
- (WebTestRunner::EventSender::handleMouseWheel):
- (WebTestRunner::EventSender::gestureEvent):
- (WebTestRunner::EventSender::gestureFlingCancel):
- (WebTestRunner::EventSender::gestureFlingStart):
- * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Removed.
- * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Removed.
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- (WebKit):
- (webkit_support):
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-26 Xiaobo Wang <xbwang@torchmobile.com.cn>
-
- [BlackBerry] Support pixel tests for BlackBerry DRT
- https://bugs.webkit.org/show_bug.cgi?id=100210
-
- Reviewed by Rob Buis.
-
- The implementation is based on the patch from Christopher Wells.
-
- * DumpRenderTree/blackberry/DumpRenderTree.cpp:
- (BlackBerry::WebKit::DumpRenderTree::DumpRenderTree):
- (BlackBerry::WebKit::DumpRenderTree::runTest):
- (BlackBerry::WebKit::DumpRenderTree::runCurrentTest):
- (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
- (BlackBerry::WebKit::DumpRenderTree::runTests):
- (BlackBerry::WebKit::DumpRenderTree::dump):
- * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
- (DumpRenderTree):
-
- * DumpRenderTree/blackberry/PNGImageEncoder.cpp:
- (BGRAtoRGBA):
- (encodeBitmapToPNG):
- * DumpRenderTree/blackberry/PNGImageEncoder.h:
- The changes to PNGImageEncoder files are from master_40, patched by Tyler
- Abbott and Rob Buis.
-
- * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
- (createBitmapContextFromWebView):
- (computeMD5HashStringForBitmapContext):
- (printPNG):
- (dumpBitmap):
- * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.h:
- (BitmapContext::createByAdoptingData):
- (BitmapContext::~BitmapContext):
- (BitmapContext):
- (BitmapContext::BitmapContext):
-
- * DumpRenderTree/blackberry/build: Added.
- * DumpRenderTree/blackberry/src.pro: Added.
- Adds 2 files for building ImageDiff, by Christopher Wells.
-
-2012-10-25 Min Qin <qinmin@chromium.org>
-
- Fix a layout test crash if a TestWebkitPlugin is put inside an iframe
- https://bugs.webkit.org/show_bug.cgi?id=100406
-
- Reviewed by Adam Barth.
-
- Resize the context with an empty rect will cause a gl_error in gles2_cmd_decoder.cc.
- Don't paint the plugin if m_rect is empty.
-
- * DumpRenderTree/chromium/TestWebPlugin.cpp:
- (TestWebPlugin::updateGeometry):
-
-2012-10-25 Jinwoo Song <jinwoo7.song@samsung.com>
-
- [EFL][WK2] Display tooltip in MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=99322
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Display tooltip in MiniBrowser using elm_object_tooltip_text_set().
-
- * MiniBrowser/efl/main.c:
- (on_tooltip_text_set):
- (on_tooltip_text_unset):
- (window_create):
-
-2012-10-25 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] remove remaining usages of webkit_support from the TestRunner library
- https://bugs.webkit.org/show_bug.cgi?id=100344
-
- Reviewed by Adam Barth.
-
- The most important part is to not rely on calling out to gdk/X11 to
- translate keycodes to hardware keycodes, as this is not possible inside
- the sandbox.
-
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (WebKit):
- (webkit_support):
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::doDragDrop):
- (WebTestRunner::EventSender::updateClickCountForButton):
- (WebTestRunner::EventSender::mouseDown):
- (WebTestRunner::EventSender::mouseUp):
- (WebTestRunner::EventSender::mouseMoveTo):
- (WebTestRunner::EventSender::keyDown):
- (WebTestRunner::EventSender::replaySavedEvents):
- (WebTestRunner::EventSender::contextClick):
- (WebTestRunner::EventSender::beginDragWithFiles):
- (WebTestRunner::EventSender::sendCurrentTouchEvent):
- (WebTestRunner::EventSender::handleMouseWheel):
- (WebTestRunner::EventSender::gestureEvent):
- (WebTestRunner::EventSender::gestureFlingCancel):
- (WebTestRunner::EventSender::gestureFlingStart):
- * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Added.
- (WebTestRunner):
- (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
- * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::getCurrentTimeInMillisecond):
- (WebTestRunner):
- (WebTestRunner::WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::getCurrentTimeInMillisecond):
- (WebViewHost::getAbsoluteWebStringFromUTF8Path):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r132514.
- http://trac.webkit.org/changeset/132514
- https://bugs.webkit.org/show_bug.cgi?id=100440
-
- "Broke chromium content_browsertests AccessibilityAriaMenu
- AccessibilityInputRange AccessibilityListMarkers" (Requested
- by scheib on #webkit).
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::postAccessibilityNotification):
-
-2012-10-25 Dirk Pranke <dpranke@chromium.org>
-
- rwt --lint-test-files doesn't handle the cascade properly
- https://bugs.webkit.org/show_bug.cgi?id=100315
-
- Reviewed by Ojan Vafai.
-
- We were only linting the first file in each port's list of
- expectations.
-
- This change pushes more of the logic for linting files into
- the TestExpectations classes themselves, but it's still a bit of
- a hack. A better solution will require splitting out the actual
- parsing of the files from the TestExpectations constructor.
-
- * Scripts/webkitpy/layout_tests/models/test_expectations.py:
- (TestExpectations):
- (TestExpectations.__init__):
- * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
- (parse_exp):
- (SkippedTests.check):
- * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
- (lint):
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (LintTest.test_all_configurations.FakePort.__init__):
- (LintTest.test_all_configurations):
- (LintTest.test_lint_test_files__errors):
- * Scripts/webkitpy/style/checkers/test_expectations.py:
- (TestExpectationsChecker.check_test_expectations):
-
-2012-10-25 Zan Dobersek <zandobersek@gmail.com>
-
- Unreviewed GTK gardening.
-
- Skipping the atspi-basic-hierarchy test case in the TestWebKitAccessibility
- WebKit2 API test since the test is currently failing.
-
- * Scripts/run-gtk-tests:
- (TestRunner):
-
-2012-10-25 Dominic Mazzoni <dmazzoni@google.com>
-
- AX: Notification should be sent when accessibilityIsIgnored changes
- https://bugs.webkit.org/show_bug.cgi?id=99547
-
- Reviewed by Chris Fleizach.
-
- Add additional accessibility notifications.
-
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::postAccessibilityNotification):
-
-2012-10-25 Dominik Röttsches <dominik.rottsches@intel.com>
-
- Conditionalize XHR timeout support
- https://bugs.webkit.org/show_bug.cgi?id=100356
-
- Reviewed by Adam Barth.
-
- Adding XHR_TIMEOUT feature in perl and qmake files.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
-
-2012-10-25 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Unreviewed. Update my contact info.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-25 Terry Anderson <tdanderson@chromium.org>
-
- Unreviewed. Adding myself as a committer.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-25 Zeno Albisser <zeno@webkit.org>
-
- [Qt] Adjust library name in webkitdirs.pm after r131300.
- https://bugs.webkit.org/show_bug.cgi?id=100376
-
- The library was renamed from QtWebKit to QtWebKitWidgets.
- run-launcher was still looking for QtWebKit.
-
- Reviewed by Simon Hausmann.
-
- * Scripts/webkitdirs.pm:
- (builtDylibPathForName):
-
-2012-10-22 Mikhail Naganov <mnaganov@chromium.org>
-
- [Chromium] Add supportMultipleWindows setting, needed for Android
- https://bugs.webkit.org/show_bug.cgi?id=99716
-
- Reviewed by Adam Barth.
-
- Add supportMultipleWindows settings for reusing the same view when
- opening popups. This is required for emulating the behavior of
- Android WebView. Adding into WebCore, as other ports might want to
- use this setting in the future.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::overridePreference):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset):
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
-
-2012-10-25 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] JavaScript popups are not focused when opened
- https://bugs.webkit.org/show_bug.cgi?id=100354
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Move focus to the JavaScript popups when opened so that the key events
- are forwarded to the popups instead of web view.
-
- * MiniBrowser/efl/main.c:
- (on_javascript_alert):
- (on_javascript_confirm):
- (on_javascript_prompt):
-
-2012-10-25 Eugene Klyuchnikov <eustas.bug@gmail.com>
-
- Web Inspector: Fix "check-inspector-strings" script and fix localized strings.
- https://bugs.webkit.org/show_bug.cgi?id=100090
-
- Reviewed by Vsevolod Vlasov.
-
- Script "check-inspector-strings" seems to be broken.
- Fixed it, refined search algorithm.
-
- * Scripts/check-inspector-strings: Fixed and refined.
-
-2012-10-24 Dirk Pranke <dpranke@chromium.org>
-
- nrwt: fix a couple of minor crashing issues under cygwin
- https://bugs.webkit.org/show_bug.cgi?id=100309
-
- Reviewed by Ojan Vafai.
-
- Cygwin was crashing on a null object reference and then
- an oserror in kill().
-
- * Scripts/webkitpy/common/system/executive.py:
- (Executive.kill_process):
- * Scripts/webkitpy/layout_tests/port/server_process.py:
- (ServerProcess.stop):
-
-2012-10-24 Dirk Pranke <dpranke@chromium.org>
-
- nrwt: truncate meter lines properly on windows
- https://bugs.webkit.org/show_bug.cgi?id=100062
-
- Reviewed by Tony Chang.
-
- This change adds the code to figure out the terminal width
- on windows (it was already there for Unixen) and moves it
- to a platform-specific object.
-
- * Scripts/webkitpy/common/system/platforminfo.py:
- (PlatformInfo.terminal_width):
- * Scripts/webkitpy/common/system/platforminfo_mock.py:
- (MockPlatformInfo.total_bytes_memory):
- (MockPlatformInfo):
- (MockPlatformInfo.terminal_width):
- * Scripts/webkitpy/layout_tests/views/metered_stream.py:
- (MeteredStream.__init__):
- (MeteredStream.number_of_columns):
- (MeteredStream.flush):
- * Scripts/webkitpy/layout_tests/views/printing.py:
- (Printer.__init__):
- (Printer._test_status_line):
-
-2012-10-24 Dirk Pranke <dpranke@chromium.org>
-
- tweak debug logging in webkit-patch optimize-baselines
- https://bugs.webkit.org/show_bug.cgi?id=100294
-
- Reviewed by Ojan Vafai.
-
- This changes the logging to print out the baselines found
- (and their checksums) even when we don't do anything.
-
- * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
- (BaselineOptimizer.optimize):
-
-2012-10-24 Sailesh Agrawal <sail@chromium.org>
-
- Incorrect keycodes for numpad /, -, +, .
- https://bugs.webkit.org/show_bug.cgi?id=99188
-
- Reviewed by Tony Chang.
-
- Add key mappings for all numpad keys.
-
- * DumpRenderTree/mac/EventSendingController.mm:
- (KeyMappingEntry):
- (-[EventSendingController keyDown:withModifiers:withLocation:]): Added all numpad keys.
-
-2012-10-24 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: clean up references to Skipped files
- https://bugs.webkit.org/show_bug.cgi?id=100045
-
- Reviewed by Ojan Vafai.
-
- Since they are no longer used or needed ...
-
- * Scripts/webkitpy/layout_tests/port/apple.py:
- (ApplePort._generate_all_test_configurations):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.skipped_layout_tests):
- (Port.expectations_files):
- (Port._wk2_port_name):
- * Scripts/webkitpy/layout_tests/port/gtk.py:
- (GtkPort):
- * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
- (MacTest.test_default_timeout_ms):
- * Scripts/webkitpy/layout_tests/port/port_testcase.py:
- (test_expectations_files):
- (test_expectations_files.platform_dirs):
- * Scripts/webkitpy/layout_tests/port/qt.py:
- (QtPort.__init__):
-
-2012-10-24 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] Use include paths relative to Source/ in the TestRunner's public API
- https://bugs.webkit.org/show_bug.cgi?id=100079
-
- Reviewed by Adam Barth.
-
- For a inside-chromium build, we usually don't add the WebKit API paths
- as include paths, so including files by name only does not work.
-
- Eventually we might want to move to a model where all includes are
- relative to Source/, so we're using that here already now.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
- * DumpRenderTree/chromium/TestRunner/public/WebEventSender.h:
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
-
-2012-10-24 Ojan Vafai <ojan@chromium.org>
-
- Show an error when there are no completed builds in the past 20 runs
- https://bugs.webkit.org/show_bug.cgi?id=100266
-
- Reviewed by Dimitri Glazkov.
-
- Right now we get a cryptic JS error in the console when loading the gtk port. This at least gives an error in
- the notification stream. We should probably tweak this UI to make it so we can make
- errors in the notification stream stick out (e.g. make the text red).
-
- We should also consider making the number of runs to load dynamic (e.g. if 20 runs don't work,
- try 40).
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/garden-o-matic.js:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results_unittests.js:
-
-2012-10-24 Ian Vollick <vollick@chromium.org>
-
- [chromium] Explicitly disable accelerated animations in DRT
- https://bugs.webkit.org/show_bug.cgi?id=100241
-
- Reviewed by Adrienne Walker.
-
- Disable accelerated animations by default in DRT.
-
- * DumpRenderTree/chromium/DumpRenderTree.cpp:
- (main):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::setAcceleratedAnimationEnabled):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell):
-
-2012-10-24 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-
- [Qt] Move the QQuickWebViewExperimental pointer to QQuickWebViewPrivate
- https://bugs.webkit.org/show_bug.cgi?id=100253
-
- Reviewed by Kenneth Rohde Christiansen.
-
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::WrapperWindow::handleStatusChanged):
- Use QQuickWebView::experimental rather than creating a new instance.
-
-2012-10-24 Thiago Marcos P. Santos <thiago.santos@intel.com>
-
- [EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
- https://bugs.webkit.org/show_bug.cgi?id=100243
-
- Reviewed by Kenneth Rohde Christiansen.
-
- These errors generate noise on the reports and in some cases, like when
- running perf tests, makes the test fail. By using Xext, we can add a
- dummy handler to ignore these errors.
-
- We could have added this handler on the top level EWK API, but that
- would be intrusive and could override handlers defined by the user.
-
- * WebKitTestRunner/PlatformEfl.cmake:
- * WebKitTestRunner/efl/main.cpp:
- (dummyExtensionErrorHandler):
- (main):
-
-2012-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
-
- Unreviewed. Fix the GTK+ build.
-
- * TestWebKitAPI/GNUmakefile.am: Add GTK_FLAGS to
- libTestWebKitAPIMain and webcore cflags to TestGtk.
-
-2012-10-24 Zeno Albisser <zeno@webkit.org>
-
- Implement GraphicsSurface for Windows.
- https://bugs.webkit.org/show_bug.cgi?id=98147
-
- Reviewed by Kenneth Rohde Christiansen.
-
- * qmake/mkspecs/features/features.prf:
- Activate GraphicsSurface on windows in case opengles2 (ANGLE)
- is available in QT_CONFIG.
-
-2012-10-24 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][WK2] fast/repaint/delete-into-nested-block.html and fast/repaint/4776765.html are flaky
- https://bugs.webkit.org/show_bug.cgi?id=100010
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Force the main view to receive focus even if Evas already
- considers it to be focused.
-
- It might happen that a different frame is focused by a page and
- the focus change notification does not reach Evas. When another
- test is run, the main frame is then not considered to be focused
- by WebCore, and things such as focus rings are not drawn as
- expected.
-
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::focus):
-
-2012-10-24 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r132333.
- http://trac.webkit.org/changeset/132333
- https://bugs.webkit.org/show_bug.cgi?id=100234
-
- Crashes many tests on the EFL-WK2 bot. (Requested by rakuco on
- #webkit).
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::resetStateToConsistentValues):
- * WebKitTestRunner/efl/TestControllerEfl.cpp:
- (WTR::TestController::platformInitializeContext):
-
-2012-10-24 Dongwoo Joshua Im <dw.im@samsung.com>
-
- [GTK] Fix build break - undefined reference to 'gtk_init'
- https://bugs.webkit.org/show_bug.cgi?id=100221
-
- Unreviewed build fix.
-
- GTK_LIBS is needed for TestWTF.
-
- * TestWebKitAPI/GNUmakefile.am:
-
-2012-10-24 Grzegorz Czajkowski <g.czajkowski@samsung.com>
-
- WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
- https://bugs.webkit.org/show_bug.cgi?id=93611
-
- Reviewed by Hajime Morita.
-
- WebKitTestRunner enables spelling feature to pass the layout tests from editing/spelling.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::resetStateToConsistentValues):
- Enables spelling by WebKit2 C API.
-
- * WebKitTestRunner/efl/TestControllerEfl.cpp:
- (WTR::TestController::platformInitializeContext):
- Attaches WKTextChecker's client and sets default language for WebKit2-EFL port.
-
-2012-10-24 Mario Sanchez Prada <mario@webkit.org>
-
- [WK2] [GTK] TestWebKitAccessibility is not being run
- https://bugs.webkit.org/show_bug.cgi?id=100102
-
- Reviewed by Carlos Garcia Campos.
-
- Removed wrong early return in _start_accessibility_daemons().
-
- * Scripts/run-gtk-tests:
- (TestRunner._lookup_atspi2_binary): Removed wrong line.
-
-2012-10-24 Noel Gordon <noel.gordon@gmail.com>
-
- [chromium] Plumb DRT WebkitShouldRespectImageOrientation through to page settings
- https://bugs.webkit.org/show_bug.cgi?id=100197
-
- Reviewed by Kent Tamura.
-
- fast/images/exif-orientation.html and fast/images/exif-orientation-css.html require a DRT
- WebkitShouldRespectImageOrientation preference. Add the chromium implementation for this
- preference and plumb it through to page settings.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::overridePreference): Update the tests WebkitShouldRespectImageOrientation
- setting in DRT prefs.
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset): Disable the preference before and after each test.
- (WebPreferences::applyTo): Apply the preference to the page settings of each test.
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
-
-2012-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
-
- [GTK] TestWebKitAPI/TestWebKit2 and TestWebKitAPI/TestGtk link to the installed libs
- https://bugs.webkit.org/show_bug.cgi?id=100134
-
- Reviewed by Martin Robinson.
-
- Do not share the LDADD variable among TestWTF, TestWebKit2 and
- TestGtk.
-
- * TestWebKitAPI/GNUmakefile.am:
-
-2012-10-23 Kihong Kwon <kihong.kwon@samsung.com>
-
- Unreviewed. Adding myself as committer.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-23 Dan Bernstein <mitz@apple.com>
-
- Tools changes for <rdar://problem/2966974> [mac] Kerning and ligatures are not enabled by default
- https://bugs.webkit.org/show_bug.cgi?id=100188
-
- Reviewed by Sam Weinig.
-
- Disable kerning and ligatures by default when running the tests.
-
- * DumpRenderTree/mac/DumpRenderTree.mm:
- (resetDefaultsToConsistentValues): Set a value of NO for the
- WebKitKerningAndLigaturesEnabledByDefault user default.
- * WebKitTestRunner/mac/main.mm:
- (main): Register a value of NO for the WebKitKerningAndLigaturesEnabledByDefault user
- default.
-
-2012-10-23 Simon Fraser <simon.fraser@apple.com>
-
- Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText()
- https://bugs.webkit.org/show_bug.cgi?id=100159
-
- Reviewed by Tim Horton.
-
- Make WebKitTestRunner use a WKView with a tile cache for tests run in a directory
- whose path includes "tiled-drawing". It does this by passing around a WKDictionary
- of options, and if the current PlatformWebView doesn't support those options, it will
- create a new one.
-
- * WebKitTestRunner/PlatformWebView.h:
- (PlatformWebView): Add a WKDictionaryRef options dictionary argument.
- (WTR::PlatformWebView::viewSupportsOptions): Returns true if the view
- supports the options in the WKDictionaryRef.
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize): Call createWebViewWithOptions() with
- no options in the normal case.
- (WTR::TestController::createWebViewWithOptions): Moved code into this fuction
- so we can call it in two places.
- (WTR::TestController::ensureViewSupportsOptions): If the current view
- doesn't support the given options, throw it away and makea new one that does.
- * WebKitTestRunner/TestController.h:
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::shouldUseTiledDrawing): Return true if the directory contains "tiled-drawing".
- (WTR::updateTiledDrawingForCurrentTest): Tell the TestController to check whether
- the view supports the given options. No-op for non-Mac platforms.
- (WTR::TestInvocation::invoke): Call updateTiledDrawingForCurrentTest().
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
- * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
- * WebKitTestRunner/mac/PlatformWebViewMac.mm:
- (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:useTiledDrawing:]):
- (-[TestRunnerWKView _shouldUseTiledDrawingArea]): Subclass the WKView so we can return
- a custom value from this method.
- (WTR::PlatformWebView::PlatformWebView):
- (WTR::PlatformWebView::viewSupportsOptions):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
- * WebKitTestRunner/win/PlatformWebViewWin.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
-
-2012-10-23 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r132276.
- http://trac.webkit.org/changeset/132276
- https://bugs.webkit.org/show_bug.cgi?id=100189
-
- It broke the Qt-WK2 build intentionally (Requested by
- Ossy_night on #webkit).
-
- * WebKitTestRunner/PlatformWebView.h:
- (PlatformWebView):
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize):
- * WebKitTestRunner/TestController.h:
- (TestController):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR):
- (WTR::TestInvocation::invoke):
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::PlatformWebView):
- * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
- (WTR::PlatformWebView::PlatformWebView):
- * WebKitTestRunner/mac/PlatformWebViewMac.mm:
- (WTR::PlatformWebView::PlatformWebView):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::PlatformWebView):
- * WebKitTestRunner/win/PlatformWebViewWin.cpp:
- (WTR::PlatformWebView::PlatformWebView):
-
-2012-10-23 Martin Robinson <mrobinson@igalia.com>
-
- [GTK][Soup] Implement the default authentication dialog via WebCoreSupport
- https://bugs.webkit.org/show_bug.cgi?id=99351
-
- Reviewed by Carlos Garcia Campos.
-
- We no longer need to turn off the soup authentication dialog soup feature,
- because it's not installed.
-
- * DumpRenderTree/gtk/DumpRenderTree.cpp:
- (setDefaultsToConsistentStateValuesForTesting): Don't turn off the feature any longer.
-
-2012-10-23 Simon Fraser <simon.fraser@apple.com>
-
- Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText()
- https://bugs.webkit.org/show_bug.cgi?id=100159
-
- Reviewed by Tim Horton.
-
- Make WebKitTestRunner use a WKView with a tile cache for tests run in a directory
- whose path includes "tiled-drawing". It does this by passing around a WKDictionary
- of options, and if the current PlatformWebView doesn't support those options, it will
- create a new one.
-
- * WebKitTestRunner/PlatformWebView.h:
- (PlatformWebView): Add a WKDictionaryRef options dictionary argument.
- (WTR::PlatformWebView::viewSupportsOptions): Returns true if the view
- supports the options in the WKDictionaryRef.
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize): Call createWebViewWithOptions() with
- no options in the normal case.
- (WTR::TestController::createWebViewWithOptions): Moved code into this fuction
- so we can call it in two places.
- (WTR::TestController::ensureViewSupportsOptions): If the current view
- doesn't support the given options, throw it away and makea new one that does.
- * WebKitTestRunner/TestController.h:
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::shouldUseTiledDrawing): Return true if the directory contains "tiled-drawing".
- (WTR::updateTiledDrawingForCurrentTest): Tell the TestController to check whether
- the view supports the given options. No-op for non-Mac platforms.
- (WTR::TestInvocation::invoke): Call updateTiledDrawingForCurrentTest().
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
- * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
- * WebKitTestRunner/mac/PlatformWebViewMac.mm:
- (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:useTiledDrawing:]):
- (-[TestRunnerWKView _shouldUseTiledDrawingArea]): Subclass the WKView so we can return
- a custom value from this method.
- (WTR::PlatformWebView::PlatformWebView):
- (WTR::PlatformWebView::viewSupportsOptions):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
- * WebKitTestRunner/win/PlatformWebViewWin.cpp:
- (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
-
-2012-10-23 David Barton <dbarton@mathscribe.com>
-
- [MathML] Symbol font uses greek letters for roman ones on linux and Windows
- https://bugs.webkit.org/show_bug.cgi?id=99921
-
- Reviewed by Eric Seidel.
-
- Enable the STIXSizeOneSym font for testing.
-
- * DumpRenderTree/mac/DumpRenderTree.mm:
- (allowedFontFamilySet):
- * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
- (WTR::allowedFontFamilySet):
-
-2012-10-23 Tony Chang <tony@chromium.org>
-
- [chromium] Chromium window build system does not rebuild correctly when enabling/disabling a feature
- https://bugs.webkit.org/show_bug.cgi?id=38926
-
- Reviewed by Eric Seidel.
-
- Remove hack for clobbering build when features.gypi changes. Now that
- Chromium requires VS2010 or newer, this bug has gone away.
-
- * Scripts/update-webkit:
-
-2012-10-23 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] remove the const qualifier from WebTestDelegate::printMessage
- https://bugs.webkit.org/show_bug.cgi?id=100082
-
- Reviewed by Adam Barth.
-
- There's no reason the method should be const, and indeed for
- content_shell we want to send an IPC which is a non-const operation.
-
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::printMessage):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::printMessage):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
-
- Add support for resolution media query
- https://bugs.webkit.org/show_bug.cgi?id=99077
-
- Reviewed by Antti Koivisto.
-
- Add support for the RESOLUTION_MEDIA_QUERY feature flag.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
-
-2012-10-23 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
-
- Adding myself to commiters.py
- https://bugs.webkit.org/show_bug.cgi?id=100122
-
- Unreviewed update to commiters.py.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-23 Timothy Hatcher <timothy@apple.com>
-
- Unreviewed watchlist change to monitor Inspector IDLs.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-23 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [WK2] [WTR] WebKitTestRunner needs testRunner.queueForwardNavigation
- https://bugs.webkit.org/show_bug.cgi?id=99700
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Implemented testRunner.queueForwardNavigation, made little refactoring in Work Queue
- to obviate code duplication.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::queueBackNavigation):
- (WTR):
- (WTR::InjectedBundle::queueForwardNavigation):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::queueForwardNavigation):
- (WTR):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/WorkQueueManager.cpp:
- (NavigationItem):
- (WTR::NavigationItem::NavigationItem):
- (WTR::NavigationItem::invoke):
- (WTR):
- (WTR::WorkQueueManager::queueBackNavigation):
- (WTR::WorkQueueManager::queueForwardNavigation):
- * WebKitTestRunner/WorkQueueManager.h:
- (WorkQueueManager):
-
-2012-10-23 Simon Hausmann <simon.hausmann@digia.com>
-
- Unreviewed trivial Qt build fix: Fix build without USE_3D_GRAPHICS
-
- Disable USE_GRAPHICS_SURFACE if we don't have USE_3D_GRAPHICS because
- GraphicsSurface.h needs GraphicsContext3D.
-
- * qmake/mkspecs/features/features.prf:
-
-2012-10-23 Simon Pena <spena@igalia.com>
-
- Unreviewed. Adding myself as committer.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-22 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] Move the call to RegisterIsolatedFileSystem to the WebTestDelegate interface
- https://bugs.webkit.org/show_bug.cgi?id=100048
-
- Reviewed by Adam Barth.
-
- The call needs to be done outside of the sandbox.
-
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::beginDragWithFiles):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::registerIsolatedFileSystem):
- (WebTestRunner):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::registerIsolatedFileSystem):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-22 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: remove unneeded debug messages from find_files()
- https://bugs.webkit.org/show_bug.cgi?id=100041
-
- Reviewed by Adam Barth.
-
- This routine gets called all the time when loading the virtual
- suites, and the debug messages were spamming me.
-
- * Scripts/webkitpy/common/find_files.py:
- (_normalized_find):
-
-2012-10-22 Tony Chang <tony@chromium.org>
-
- [chromium] Add Mac 10.7 Debug bot since it's on the waterfall
- https://bugs.webkit.org/show_bug.cgi?id=100028
-
- Reviewed by Eric Seidel.
-
- garden-o-matic can't baseline without this entry.
-
- * Scripts/webkitpy/layout_tests/port/builders.py:
-
-2012-10-22 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] introduce WebTask to the TestRunner library
- https://bugs.webkit.org/show_bug.cgi?id=99964
-
- Reviewed by Adam Barth.
-
- I'm also removing the dependency on webkit_support, and instead go
- through the WebTestDelegate interface.
-
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
- * DumpRenderTree/chromium/DRTDevToolsAgent.h:
- (DRTDevToolsAgent::taskList):
- * DumpRenderTree/chromium/DRTDevToolsClient.cpp:
- * DumpRenderTree/chromium/DRTDevToolsClient.h:
- (DRTDevToolsClient::taskList):
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (InvokeCallbackTask::InvokeCallbackTask):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner::taskList):
- (DRTTestRunner::WorkQueue::taskList):
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (RTCSessionDescriptionRequestSuccededTask::RTCSessionDescriptionRequestSuccededTask):
- (RTCSessionDescriptionRequestFailedTask::RTCSessionDescriptionRequestFailedTask):
- (RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
- (RTCVoidRequestTask::RTCVoidRequestTask):
- (StringDataTask::StringDataTask):
- (CharPtrDataTask::CharPtrDataTask):
- (DataChannelReadyStateTask::DataChannelReadyStateTask):
- (RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
- (MockWebRTCPeerConnectionHandler):
- (MockWebRTCPeerConnectionHandler::taskList):
- * DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
- (MockWebSpeechInputController::SpeechTask::SpeechTask):
- * DumpRenderTree/chromium/MockWebSpeechInputController.h:
- (MockWebSpeechInputController::taskList):
- (MockWebSpeechInputController):
- * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
- * DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
- (MockWebSpeechRecognizer::taskList):
- (MockWebSpeechRecognizer):
- (MockWebSpeechRecognizer::StepTask::StepTask):
- * DumpRenderTree/chromium/Task.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/Task.cpp.
- (WebTestRunner):
- (WebTestRunner::invokeTask):
- (TaskWrapper):
- (WebTestRunner::TaskWrapper::TaskWrapper):
- (WebTestRunner::TaskWrapper::~TaskWrapper):
- (WebTestRunner::TaskWrapper::Run):
- (postTask):
- (postDelayedTask):
- * DumpRenderTree/chromium/Task.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/public/WebTask.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/Task.h.
- (WebTestRunner):
- (WebTask):
- (WebTaskList):
- (WebMethodTask):
- (WebTestRunner::WebMethodTask::WebMethodTask):
- (WebTestRunner::WebMethodTask::~WebMethodTask):
- (WebTestRunner::WebMethodTask::run):
- (WebTestRunner::WebMethodTask::cancel):
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestRunner):
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::scheduleAsynchronousClick):
- (WebTestRunner::KeyDownTask::KeyDownTask):
- (WebTestRunner::EventSender::scheduleAsynchronousKeyDown):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
- (WebTestRunner::EventSender::taskList):
- (EventSender):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (WebTestRunner):
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
- * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/Task.cpp.
- (WebTestRunner):
- (WebTestRunner::WebTask::WebTask):
- (WebTestRunner::WebTask::~WebTask):
- (WebTestRunner::WebTaskList::WebTaskList):
- (WebTestRunner::WebTaskList::~WebTaskList):
- (WebTestRunner::WebTaskList::registerTask):
- (WebTestRunner::WebTaskList::unregisterTask):
- (WebTestRunner::WebTaskList::revokeAll):
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::postTask):
- (WebTestRunner):
- (WebTestRunner::WebTestInterfaces::Internal::postDelayedTask):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::initialize):
- * DumpRenderTree/chromium/WebUserMediaClientMock.cpp:
- (UserMediaRequestTask::UserMediaRequestTask):
- * DumpRenderTree/chromium/WebUserMediaClientMock.h:
- (WebUserMediaClientMock::taskList):
- (WebUserMediaClientMock):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::postTask):
- (WebViewHost::postDelayedTask):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
- (WebViewHost::taskList):
- (WebViewHost::HostMethodTask::HostMethodTask):
-
-2012-10-22 Ojan Vafai <ojan@chromium.org>
-
- Update flakiness dashboard to match the state of the builders.
- * TestResultServer/static-dashboards/builders.js:
- (isChromiumDepsGTestRunner):
- Broaden the filter since Chromium naming scheme is not consistent.
- (loadBuildersList):
- The main Chromium master now only runs builders, no tests.
- * TestResultServer/static-dashboards/dashboard_base.js:
- Remove test suites that no longer run on any of these masters.
-
-2012-10-22 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] add a method for printing message to the WebTestDelegate
- https://bugs.webkit.org/show_bug.cgi?id=99960
-
- Reviewed by Adam Barth.
-
- When using the TestRunner library from the content_shell, we can't print
- message directly but need to send them to the browser process.
-
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
- (WebTestRunner::AccessibilityController::fallbackCallback):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
- (WebTestRunner::AccessibilityController::setDelegate):
- (AccessibilityController):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::EventSender::dumpFilenameBeingDragged):
- * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp:
- (GamepadController::connect):
- (GamepadController::disconnect):
- (GamepadController::setId):
- (GamepadController::setButtonCount):
- (GamepadController::setButtonData):
- (GamepadController::setAxisCount):
- (GamepadController::setAxisData):
- (GamepadController::fallbackCallback):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
- (TestInterfaces::~TestInterfaces):
- (TestInterfaces::setDelegate):
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::printMessage):
- (WebTestRunner):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::didBeginEditing):
- (WebViewHost::lastContextMenuData):
- (WebViewHost::clearContextMenuData):
- (WebViewHost::setEditCommand):
- (WebViewHost::clearEditCommand):
- (WebViewHost::fillSpellingSuggestionList):
- (WebViewHost::setGamepadData):
- (WebViewHost::printMessage):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- I now only watch Selectors instead of all of CSS.
-
- Unreviewed update of watchlist.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-22 Yury Semikhatsky <yurys@chromium.org>
-
- Make sure base and derived class pointers are different in MemoryInstrumentationTest.instrumentedWithMultipleAncestors
- https://bugs.webkit.org/show_bug.cgi?id=99987
-
- Reviewed by Alexander Pavlov.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: changed first parent
- class in the list so that it has virtual table as well as the second one. This
- way we may be sure that pointer to the second ancestor class will differ from
- the pointer to the derived class.
-
-2012-10-22 Yury Semikhatsky <yurys@chromium.org>
-
- Unreviewed. Fix compilation after r132059.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-22 Dominik Röttsches <dominik.rottsches@intel.com>
-
- Adding Cairo and Harfbuzz watchlist entries
-
- Unreviewed watchlist update.
-
- Added myself to these new ones and SVG.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-22 Yury Semikhatsky <yurys@chromium.org>
-
- Web Inspector: do not double count memory of objects with multiple ancestors
- https://bugs.webkit.org/show_bug.cgi?id=99958
-
- Reviewed by Alexander Pavlov.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: Test that there
- is no double counting in case of multiple inheritance.
-
-2012-10-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] Basic gesture event handling
- https://bugs.webkit.org/show_bug.cgi?id=66173
-
- Reviewed by Simon Hausmann.
-
- Add support for eventSender.gestureLongPress.
-
- * DumpRenderTree/qt/EventSenderQt.cpp:
- (EventSender::EventSender):
- (EventSender::gestureLongPress):
- * DumpRenderTree/qt/EventSenderQt.h:
- (EventSender):
-
-2012-10-22 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [WTR] Properly initialize TestRunner::m_dumpSelectionRect.
- https://bugs.webkit.org/show_bug.cgi?id=99970
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Follow-up to r131476: actually initialize m_dumpSelectionRect to
- some value to avoid some flakyness in the tests.
-
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::TestRunner):
-
-2012-10-22 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Don't build any of the tools in production_build
-
- Reviewed by Simon Hausmann.
-
- * Tools.pro:
- * qmake/mkspecs/features/configure.prf:
-
-2012-10-22 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Move OBJECTS_DIR and friends to default_pre.prf
-
- The introduction of load(qt_build_config) in .qmake.conf meant
- that we started loading qtmodule.pri, which in turn set both
- MOC_DIR, RCC_DIR, and OBJECTS_DIR.
-
- We were setting OBJECTS_DIR in default_post under a isEmpty() guard
- so that project files could override the objects dir. Instead of
- using the isEmpty() check we move it to defaul_pre, which will
- override the qtmodule.pri settings, but still allow project files
- to override it.
-
- Reviewed by Ossy.
-
- * qmake/mkspecs/features/default_post.prf:
- * qmake/mkspecs/features/default_pre.prf:
-
-2012-10-22 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript
- https://bugs.webkit.org/show_bug.cgi?id=42675
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::queueLoadingScript):
- (WTR):
- (WTR::InjectedBundle::queueNonLoadingScript):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::queueLoadingScript):
- (WTR):
- (WTR::TestRunner::queueNonLoadingScript):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/WorkQueueManager.cpp:
- (WTR):
- (WTR::runJavaScriptFunction):
- (ScriptItem):
- (WTR::ScriptItem::ScriptItem):
- (WTR::ScriptItem::invoke):
- (WTR::WorkQueueManager::queueBackNavigation):
- (WTR::WorkQueueManager::queueLoadingScript):
- (WTR::WorkQueueManager::queueNonLoadingScript):
- * WebKitTestRunner/WorkQueueManager.h:
- (WorkQueueManager):
-
-2012-10-22 Zan Dobersek <zandobersek@gmail.com>
-
- Unreviewed, a follow-up to r132034 where I forgot to address
- Ojan's review comment about the race condition in handleLocationChange.
-
- * TestResultServer/static-dashboards/dashboard_base.js:
- (handleLocationChange):
-
-2012-10-22 Zan Dobersek <zandobersek@gmail.com>
-
- [TestResultServer] Move the resource loading into a dedicated class
- https://bugs.webkit.org/show_bug.cgi?id=99246
-
- Reviewed by Ojan Vafai.
-
- A new 'loader' namespace is created, containing the request method (previously located in dashboard_base.js)
- and the new Loader object, which handles the loading of all the necessary data the dashboard might require.
-
- * TestResultServer/static-dashboards/aggregate_results.html: Include the loader.js source file.
- * TestResultServer/static-dashboards/builders.js:
- (requestBuilderList): Use the request method located in the loader namespace instead of the removed doXHR method.
- (onBuilderListLoad): Now parses the response text of the passed-in XHR. When all the builder lists are loaded the
- resource loader object is notified appropriately.
- (onErrorLoadingBuilderList): The partial function that calls this function also adds an XHR parameter.
- * TestResultServer/static-dashboards/dashboard_base.js: Much of the resource loading-related code is moved to loader.js.
- The Loader object is now used to load all the required resources.
- (parseParameters): Don't push the 'builder' parameter into the current state if the unit tests are being run.
- (resourceLoadingComplete): This method gets called when all the resources are loaded and the dashboard should
- proceed with generating the page.
- (handleLocationChange):
- * TestResultServer/static-dashboards/flakiness_dashboard.html: Include the loader.js source file.
- * TestResultServer/static-dashboards/flakiness_dashboard.js: The request method has been relocated to the loader namespace.
- * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js: The affected test cases are modified appropriately.
- (test):
- * TestResultServer/static-dashboards/loader.js: Added.
- (.): A new namespace is introduced, publicly exporting the request method that performs an XHR operation and a Loader object
- which oversees resource loading. The loading is done in steps, first loading the builders list, after that the results files
- the current dashboard needs, and lastly the TestExpectations files if they are required by the dashboard. When done the loader
- calls the resourceLoadingComplete method located in dashboard_base.js. This signals the dashboard all resources are available
- and it can proceed with generating the dashboard page.
- * TestResultServer/static-dashboards/loader_unittests.js: Added. Contains unit tests for the Loader object, covering the
- incremental loading and the loading of results files and TestExpectations files. The builders list loading is currently not
- tested as the unit tests page overrides related methods that possibly affect other tests' behavior.
- * TestResultServer/static-dashboards/run-unittests.html: Now includes the loader.js and loader_unittests.js source file.
- Refactors the code a bit due to changes in how onBuilderListLoad behaves.
- * TestResultServer/static-dashboards/timeline_explorer.html: Now includes the loader.js source file.
- * TestResultServer/static-dashboards/treemap.html: Ditto. Also refactors the code to take into account
- that all the test files are now loaded before generating the dashboard page.
-
-2012-10-21 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] introduce a public API for the TestRunner library
- https://bugs.webkit.org/show_bug.cgi?id=99904
-
- Reviewed by Adam Barth.
-
- The API decouples the public API from the underlying implementation, so
- embedders can depend on it. I'm also changing DRT to consume the
- TestRunner API through the public API, except for DRTTestRunner and all
- places that require Task.h. These two will be migrated in later changes.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/DRTDevToolsAgent.h:
- * DumpRenderTree/chromium/DRTDevToolsClient.h:
- * DumpRenderTree/chromium/MockSpellCheck.cpp:
- (MockSpellCheck::fillSuggestionList):
- * DumpRenderTree/chromium/MockSpellCheck.h:
- (MockSpellCheck):
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
- * DumpRenderTree/chromium/MockWebSpeechInputController.h:
- * DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
- * DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
- (WebKit):
- (WebTestRunner):
- (WebAccessibilityController):
- * DumpRenderTree/chromium/TestRunner/public/WebEventSender.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
- (WebKit):
- (WebTestRunner):
- (WebEventSender):
- * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
- (WebKit):
- (WebTestRunner):
- (WebTestDelegate):
- * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h.
- (WebKit):
- (WebTestRunner):
- (WebTestInterfaces):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
- (WebTestRunner):
- (WebTestRunner::makeMenuItemStringsFor):
- * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
- (WebTestRunner):
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
- (TestDelegate):
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
- (TestInterfaces):
- * DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
- (WebTestRunner):
- (WebTestRunner::WebAccessibilityController::WebAccessibilityController):
- (WebTestRunner::WebAccessibilityController::setFocusedElement):
- (WebTestRunner::WebAccessibilityController::notificationReceived):
- (WebTestRunner::WebAccessibilityController::shouldLogAccessibilityEvents):
- * DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
- (WebTestRunner):
- (WebTestRunner::WebEventSender::WebEventSender):
- (WebTestRunner::WebEventSender::doDragDrop):
- * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp: Added.
- (WebTestRunner):
- (WebTestInterfaces::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::testInterfaces):
- (WebTestRunner::WebTestInterfaces::Internal::accessibilityController):
- (WebTestRunner::WebTestInterfaces::Internal::eventSender):
- (WebTestRunner::WebTestInterfaces::Internal::Internal):
- (WebTestRunner::WebTestInterfaces::Internal::~Internal):
- (WebTestRunner::WebTestInterfaces::Internal::setDelegate):
- (WebTestRunner::WebTestInterfaces::Internal::clearContextMenuData):
- (WebTestRunner::WebTestInterfaces::Internal::clearEditCommand):
- (WebTestRunner::WebTestInterfaces::Internal::fillSpellingSuggestionList):
- (WebTestRunner::WebTestInterfaces::Internal::setEditCommand):
- (WebTestRunner::WebTestInterfaces::Internal::lastContextMenuData):
- (WebTestRunner::WebTestInterfaces::Internal::setGamepadData):
- (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
- (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
- (WebTestRunner::WebTestInterfaces::setWebView):
- (WebTestRunner::WebTestInterfaces::setDelegate):
- (WebTestRunner::WebTestInterfaces::bindTo):
- (WebTestRunner::WebTestInterfaces::resetAll):
- (WebTestRunner::WebTestInterfaces::accessibilityController):
- (WebTestRunner::WebTestInterfaces::eventSender):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::initialize):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::eventSender):
- (TestShell::accessibilityController):
- (TestShell):
- * DumpRenderTree/chromium/WebUserMediaClientMock.h:
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::finishLastTextCheck):
- (WebViewHost::fillSpellingSuggestionList):
- * DumpRenderTree/chromium/WebViewHost.h:
- (WebViewHost):
-
-2012-10-21 Viatcheslav Ostapenko <v.ostapenko@samsung.com>
-
- Unreviewed. Updating my emails.
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-20 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][DRT] Implement tracking and painting repaint rectangles.
- https://bugs.webkit.org/show_bug.cgi?id=99838
-
- Reviewed by Gyuyoung Kim.
-
- Implement displayWebView() and start tracking/painting the repaint
- rectangles for the repaint tests that rely on it.
-
- * DumpRenderTree/efl/DumpRenderTree.cpp:
- (displayWebView):
- * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
- (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
- * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
- (createBitmapContextFromWebView):
-
-2012-10-19 Dan Bernstein <mitz@apple.com>
-
- Add bundle API for hit-testing
- https://bugs.webkit.org/show_bug.cgi?id=99907
-
- Reviewed by Sam Weinig.
-
- Added an API test for WKBundleFrameCreateHitTest().
-
- * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added InjectedBundleFrameHitTest.cpp,
- InjectedBundleFrameHitTest_bundle.cpp, and link-with-title.html.
-
- * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp: Added.
- (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Checks that the message contains the
- title of the link in link-with-title.html.
- (TestWebKitAPI::setInjectedBundleClient):
- (TestWebKitAPI::TEST):
- * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp: Added.
- (TestWebKitAPI::InjectedBundleFrameHitTestTest::InjectedBundleFrameHitTestTest):
- (TestWebKitAPI::didFinishLoadForFrameCallback): Hit tests at (50, 50) and sends the link title
- from the result back to the UI process.
- (TestWebKitAPI::InjectedBundleFrameHitTestTest::didCreatePage):
- (TestWebKitAPI::InjectedBundleFrameHitTestTest::frameLoadFinished):
- * TestWebKitAPI/Tests/WebKit2/link-with-title.html: Added.
-
-2012-10-19 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131944.
- http://trac.webkit.org/changeset/131944
- https://bugs.webkit.org/show_bug.cgi?id=99891
-
- On second thoughts, not such a great idea (Requested by jamesr
- on #webkit).
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::createNewWindow):
-
-2012-10-19 Alexandre Elias <aelias@chromium.org>
-
- [chromium] API to pass impl thread via WebLayerTreeView
- https://bugs.webkit.org/show_bug.cgi?id=99863
-
- Reviewed by James Robinson.
-
- This adds an API to pass the compositor impl thread via WebView and
- WebLayerTreeView. This is currently a no-op change, but in the future
- this codepath will supercede WebCompositor. The goal is to avoid statics
- in compositor initialization.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::createNewWindow):
-
-2012-10-19 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [Cairo][WTR] Implement the painting of repaint rectangles.
- https://bugs.webkit.org/show_bug.cgi?id=99839
-
- Reviewed by Martin Robinson.
-
- Implement the required code to paint the gray overlay with
- transparent regions for the repaint rectangles, as other ports
- already do and as is already done in most WK1 ports.
-
- * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
- (WTR::paintRepaintRectOverlay):
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-09-08 Alpha Lam <hclam@chromium.org>
-
- [chromium] Implement deferred image decoding
- https://bugs.webkit.org/show_bug.cgi?id=94240
-
- Reviewed by Stephen White.
-
- Add --enable-deferred-image-decoding to DRT.
-
- * DumpRenderTree/chromium/DumpRenderTree.cpp:
- (main):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::setDeferredImageDecodingEnabled):
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset):
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
- * Scripts/webkitpy/layout_tests/port/chromium.py:
- (ChromiumPort.virtual_test_suites):
-
-2012-10-19 Dongwoo Joshua Im <dw.im@samsung.com>
-
- Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT
- https://bugs.webkit.org/show_bug.cgi?id=99804
-
- Reviewed by Julien Chaffraix.
-
- CSS3 text related properties will be implemented under this flag,
- including text decoration, text-align-last, and text-justify.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
-
-2012-10-19 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WTR] renderToOffscreenBuffer should not be set if the real render loop is active
- https://bugs.webkit.org/show_bug.cgi?id=99831
-
- Reviewed by Jocelyn Turcotte.
-
- Do not set renderToOffscreenBuffer if we have called setRenderWithoutShowing.
- We do not need it in this case and these things are actually conflicting.
-
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::WrapperWindow::handleStatusChanged):
- (WTR::PlatformWebView::PlatformWebView):
- (WTR::PlatformWebView::windowShapshotEnabled): Added a comment
- describing why this workaround is needed.
-
-2012-10-19 Zan Dobersek <zandobersek@gmail.com>
-
- [WK2][GTK] Fullscreen tests timing out in bots
- https://bugs.webkit.org/show_bug.cgi?id=93973
-
- Reviewed by Philippe Normand.
-
- Add webcore_cppflags to the CPPFLAGS for WebKitTestRunner and the
- injected bundle library. webcore_cppflags contains all the feature
- defines' macros so the ENABE(*) compilation guards should now work
- properly (i.e. enable the code behind them when the feature is enabled).
-
- * WebKitTestRunner/GNUmakefile.am:
-
-2012-10-19 Simon Hausmann <simon.hausmann@digia.com>
-
- Unreviewed, rolling out r131734.
- http://trac.webkit.org/changeset/131734
-
- Broke ANGLE build where we end up with @echo foo && @echo -n
-
- * qmake/mkspecs/features/default_post.prf:
-
-2012-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
-
- REGRESSION (r130640 - r130644): TestCookieManager API test is failing
- https://bugs.webkit.org/show_bug.cgi?id=98738
-
- Reviewed by Philippe Normand.
-
- * Scripts/run-gtk-tests:
- (TestRunner): Unskip /webkit2/WebKitCookieManager/accept-policy.
-
-2012-10-19 Tommy Widenflycht <tommyw@google.com>
-
- MediaStream API: Update the RuntimeEnabledFeatures flags
- https://bugs.webkit.org/show_bug.cgi?id=99714
-
- Reviewed by Adam Barth.
-
- Enabling the DeprecatedPeerConnection so that all tests still run.
-
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
-
-2012-10-18 Dominic Mazzoni <dmazzoni@google.com>
-
- AX: labelForElement is slow when there are a lot of DOM elements
- https://bugs.webkit.org/show_bug.cgi?id=97825
-
- Reviewed by Ryosuke Niwa.
-
- Implement titleUIElement in the chromium port of DRT, and
- fix getAccessibleElementById so that it ensures the backing store
- is up-to-date.
-
- * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
- (AccessibilityController::getAccessibleElementById):
- * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
- (AccessibilityUIElement::titleUIElementCallback):
-
-2012-10-17 Ilya Tikhonovsky <loislo@chromium.org>
-
- Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
- https://bugs.webkit.org/show_bug.cgi?id=99457
-
- Reviewed by Yury Semikhatsky.
-
- countObjectSize now requires pointer to object as the first argument.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-18 Dirk Pranke <dpranke@chromium.org>
-
- make move_overwritten_baselines_to work again while rebaselining
- https://bugs.webkit.org/show_bug.cgi?id=99793
-
- Reviewed by Ojan Vafai.
-
- We used to have code that would help when rebaselining results
- for new ports (e.g., when moving from Lion to Mountain Lion) but
- it appears that code bitrotted during all the refactoring since
- the last time we needed this. This patch makes things work
- again, adds more tests that will hopefully make clearer what
- is supposed to work, and renames various parameters to be
- consistent.
-
- * Scripts/webkitpy/layout_tests/port/builders.py:
- (move_overwritten_baselines_to):
- (builder_path_for_port_name):
- * Scripts/webkitpy/tool/commands/rebaseline.py:
- (RebaselineTest.__init__):
- (RebaselineTest._copy_existing_baseline):
- (RebaselineTest._rebaseline_test):
- (RebaselineTest.execute):
- (AbstractParallelRebaselineCommand._rebaseline_commands):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (test_rebaseline_json_with_move_overwritten_baselines_to):
- (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
- * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
- (GardeningServerTest.test_rebaselineall):
-
-2012-10-18 Roger Fong <roger_fong@apple.com>
-
- Unreviewed. Skip really old flaky failing jscore date test.
- There's a bug tracking it here: https://bugs.webkit.org/show_bug.cgi?id=53712.
-
- * Scripts/run-javascriptcore-tests:
-
-2012-10-18 Byungwoo Lee <bw80.lee@samsung.com>
-
- Fix build warning.
- https://bugs.webkit.org/show_bug.cgi?id=99788
-
- Reviewed by Kentaro Hara.
-
- Use return value of mktemp() for removing -Wunused-result.
-
- * MiniBrowser/efl/main.c:
- (on_download_request):
-
-2012-10-18 Benjamin Poulain <bpoulain@apple.com>
-
- [WK2] WebKit2 does not build without PLUGIN_PROCESS on Mac
- https://bugs.webkit.org/show_bug.cgi?id=99771
-
- Reviewed by Anders Carlsson.
-
- * DumpRenderTree/mac/MockWebNotificationProvider.mm: The file was not including config.h,
- effectively breaking feature flags.
-
-2012-10-18 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [EFL][DRT] Make textareas resizable by default.
- https://bugs.webkit.org/show_bug.cgi?id=99719
-
- Reviewed by Gyuyoung Kim.
-
- Enable painting the textarea resizer at the corner by default,
- just as it already is the case for WK2. This eases the work needed
- to get the pixel tests in shape and run by the bots, as both the
- WK1 and WK2 ports will have more similar results.
-
- * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
- (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
-
-2012-10-18 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] Add a webkit_test_support target that WebTestingSupport
- https://bugs.webkit.org/show_bug.cgi?id=99772
-
- Reviewed by Adam Barth.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
-
-2012-10-18 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] move TestRunner files into a src/ sub directory
- https://bugs.webkit.org/show_bug.cgi?id=99776
-
- Reviewed by Adam Barth.
-
- This is in preparation of adding a public API to the TestRunner library.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
- * DumpRenderTree/DumpRenderTree.gypi:
- * DumpRenderTree/chromium/DRTTestRunner.h:
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp.
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.h.
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp.
- * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.h.
- * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp.
- * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.h.
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppVariant.cpp.
- * DumpRenderTree/chromium/TestRunner/src/CppVariant.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppVariant.h.
- * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp.
- * DumpRenderTree/chromium/TestRunner/src/EventSender.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/EventSender.h.
- * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp.
- * DumpRenderTree/chromium/TestRunner/src/GamepadController.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/GamepadController.h.
- * DumpRenderTree/chromium/TestRunner/src/Task.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/Task.cpp.
- * DumpRenderTree/chromium/TestRunner/src/Task.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/Task.h.
- * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestDelegate.h.
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp.
- * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.h.
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestRunner.cpp.
- * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestRunner.h.
- * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TextInputController.cpp.
- * DumpRenderTree/chromium/TestRunner/src/TextInputController.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TextInputController.h.
-
-2012-10-18 Dirk Pranke <dpranke@chromium.org>
-
- [chromium] garden-o-matic should ignore the 10.8 Tests bot
- https://bugs.webkit.org/show_bug.cgi?id=99765
-
- Reviewed by Adam Barth.
-
- It's really more of an FYI bot at this point and can be safely
- ignored like the Content Shell bots.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- (.):
-
-2012-10-18 Jochen Eisinger <jochen@chromium.org>
-
- [chromium] Simplify TestInterfaces, as this class won't be directly exposed in the TestRunner library's interface
- https://bugs.webkit.org/show_bug.cgi?id=99766
-
- Reviewed by Adam Barth.
-
- This reverts http://trac.webkit.org/changeset/123240
-
- * DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp:
- (TestInterfaces::TestInterfaces):
- (TestInterfaces::~TestInterfaces):
- (TestInterfaces::setWebView):
- (TestInterfaces::setDelegate):
- (TestInterfaces::bindTo):
- (TestInterfaces::resetAll):
- (TestInterfaces::accessibilityController):
- (TestInterfaces::eventSender):
- * DumpRenderTree/chromium/TestRunner/TestInterfaces.h:
- (TestInterfaces):
-
-2012-10-18 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131810.
- http://trac.webkit.org/changeset/131810
- https://bugs.webkit.org/show_bug.cgi?id=99762
-
- Broke linux debug webkit_unit_tests (Requested by
- danakj|gardening on #webkit).
-
- * DumpRenderTree/chromium/DumpRenderTree.cpp:
- (main):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset):
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
- * Scripts/webkitpy/layout_tests/port/chromium.py:
- (ChromiumPort.virtual_test_suites):
-
-2012-10-18 Alpha Lam <hclam@chromium.org>
-
- [chromium] Implement deferred image decoding
- https://bugs.webkit.org/show_bug.cgi?id=94240
-
- Reviewed by Stephen White.
-
- Add --enable-deferred-image-decoding to DRT.
-
- * DumpRenderTree/chromium/DumpRenderTree.cpp:
- (main):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::TestShell):
- (TestShell::resetWebSettings):
- * DumpRenderTree/chromium/TestShell.h:
- (TestShell::setDeferredImageDecodingEnabled):
- (TestShell):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (WebPreferences::reset):
- (WebPreferences::applyTo):
- * DumpRenderTree/chromium/WebPreferences.h:
- (WebPreferences):
- * Scripts/webkitpy/layout_tests/port/chromium.py:
- (ChromiumPort.virtual_test_suites):
-
-2012-10-18 Dirk Pranke <dpranke@chromium.org>
-
- webkitpy: fix chromium bot configs in builders.py
- https://bugs.webkit.org/show_bug.cgi?id=99638
-
- Reviewed by Ojan Vafai.
-
- Updating after the great bot-renaming and deleting a test case
- that is no longer needed.
-
- * Scripts/webkitpy/layout_tests/port/builders.py:
- * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
- (BuildCoverageExtrapolatorTest.test_extrapolate):
-
-2012-10-18 Dirk Pranke <dpranke@chromium.org>
-
- [chromium] Add 10.8 bot into fallback path, make work with garden-o-matic
- https://bugs.webkit.org/show_bug.cgi?id=99748
-
- Reviewed by Ryosuke Niwa.
-
- Subject pretty much says it all ...
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- * Scripts/webkitpy/layout_tests/port/builders.py:
- * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
- (ChromiumMacPort):
- * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
- (ChromiumMacPortTest.test_versions):
- (ChromiumMacPortTest.test_baseline_path):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaseline.test_baseline_directory):
- (test_rebaseline_and_copy_test_with_lion_result):
- (test_rebaseline_expectations):
-
-2012-10-18 Timothy Hatcher <timothy@apple.com>
-
- Teach prepare-ChangeLog how to handle non-function properties in JavaScript prototypes.
-
- https://bugs.webkit.org/show_bug.cgi?id=99747
-
- Reviewed by Joseph Pecoraro.
-
- * Scripts/prepare-ChangeLog:
- (get_function_line_ranges_for_javascript): Clear currentIdentifiers when comma is encountered
- so it does not tack those identifiers onto the next changed function.
-
-2012-10-18 James Simonsen <simonjam@chromium.org>
-
- Add a script for exporting http/tests/w3c/webperf/submission to W3C
- https://bugs.webkit.org/show_bug.cgi?id=99675
-
- Reviewed by Tony Gentilcore.
-
- This does the inverse of Scripts/import-w3c-performance-wg-tests.
-
- * Scripts/export-w3c-performance-wg-tests: Added.
-
-2012-10-18 Pablo Flouret <pablof@motorola.com>
-
- Implement css3-conditional's @supports rule
- https://bugs.webkit.org/show_bug.cgi?id=86146
-
- Reviewed by Antti Koivisto.
-
- * Scripts/webkitperl/FeatureList.pm:
- * qmake/mkspecs/features/features.pri:
- Add an ENABLE_CSS3_CONDITIONAL_RULES flag.
-
-2012-10-18 Xiaobo Wang <xbwang@torchmobile.com.cn>
-
- [BlackBerry] Dump DRT output to stdout if test is passed as command line argument
- https://bugs.webkit.org/show_bug.cgi?id=99150
-
- Reviewed by Rob Buis.
-
- Fixed some code style errors as well.
-
- * DumpRenderTree/blackberry/DumpRenderTree.cpp:
- (BlackBerry::WebKit::DumpRenderTree::runTest):
- (BlackBerry::WebKit::DumpRenderTree::runRemainingTests):
- (BlackBerry::WebKit::DumpRenderTree::runTests):
- (BlackBerry::WebKit::DumpRenderTree::isHTTPTest):
- (BlackBerry::WebKit::DumpRenderTree::dump):
- (BlackBerry::WebKit::DumpRenderTree::addMessageToConsole):
- * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
- (DumpRenderTree):
-
-2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Improved support for silent builds
-
- Reviewed by Tor Arne Vestbø.
-
- Silence our extra compilers when CONFIG+=silent is set.
-
- * qmake/mkspecs/features/default_post.prf:
-
-2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Reduce memory pressure at link time with less compromise on speed of linking
-
- Reviewed by Csaba Osztrogonác.
-
- Revert r131718 that made us pass -fno-keep-memory to the linker for any
- i386 builds. The downside of passing that option is that it slows down
- the process of linking and as Ossy determined, release builds do _not_
- take as much memory (2.x GB) for linking but much less (~350MB).
-
- However there is one condition where even release builds do take up too
- much memory, and that is when Qt is configured with
- -separate-debug-info, because it adds a -g next to -O2. The recent
- introduction of loading qt_build_config enabled us to read qmodule.pri,
- which adds the -g if Qt is configured with -separate-debug-info. So
- instead of playing with -fno-keep-memory (which is a last resort
- measure for debug builds) we should tweak our existing mechanism of
- dealing with the debug info:
-
- production_build.prf tries to ensure that we use -g only in static
- libraries that contain API facing code, so that we get nice backtraces
- at least into the API layer. For other static libraries such as WebCore
- we skip -g via CONFIG += no_debug_info. One of the conditions for
- enabling this tweak is CONFIG(debug, debug|release). This patch adds
- contains(QT_CONFIG,separate_debug_info) to the conditions.
-
- The patch also extend the CONFIG += no_debug_info part with the removal
- of no_separate_debug_info. There is no point in running an extra
- build step to strip out debug info into a separate file if at the same
- time we tell the compiler to not generate any debug info altogether.
-
- * qmake/mkspecs/features/production_build.prf:
- * qmake/mkspecs/features/unix/default_post.prf:
-
-2012-10-18 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] OpenGL rendering is not possible on bots using Xvfb
- https://bugs.webkit.org/show_bug.cgi?id=99463
-
- Reviewed by Jocelyn Turcotte.
-
- Added a workaround to be able to disallow UI side OpenGL rendering
- if the environment is not suitable because it can be extremely slow
- with a software backend.
-
- * Scripts/webkitpy/layout_tests/port/qt.py:
- (QtPort.setup_environ_for_server): Let the environment variable
- QT_WEBKIT_DISABLE_UIPROCESS_DUMPPIXELS reach the driver. This variable
- should be defined on bots that don't have a suitable OpenGL environment.
- * WebKitTestRunner/PlatformWebView.h:
- (PlatformWebView):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::WrapperWindow::handleStatusChanged): Don't try to create an OpenGL
- surface and set the setRenderWithoutShowing flag on the window if the
- variable is set.
- (WTR::PlatformWebView::windowSnapshotImage):
- (WTR::PlatformWebView::windowShapshotEnabled):
- (WTR):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Use the old method
- of evaluating pixel results if the snapshot is not supported, that is to check
- the image we got from the web process. This is necessary for the bots to be able
- to run ref tests.
-
-2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] Implement pixel snapshot generation in WTR
- https://bugs.webkit.org/show_bug.cgi?id=95992
-
- Reviewed by Jocelyn Turcotte.
-
- Switch the Qt implementation of the PlatformWebView to use
- QQuickWindow::grabWindow to generate the pixel results. This way
- we will go through the scenegraph and test the actual rendering backend.
- We use QQuickWindowPrivate::setRenderWithoutShowing to avoid the need of
- showing the window.
-
- * WebKitTestRunner/Target.pri: Had to added a bunch
- of modules to be able to use QQuickWindowPrivate.
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::WrapperWindow::handleStatusChanged):
- (WTR::PlatformWebView::windowSnapshotImage):
-
-2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WTR] Do a forced repaint before generating pixel results
- https://bugs.webkit.org/show_bug.cgi?id=98654
-
- Reviewed by Jocelyn Turcotte.
-
- Do a forced repaint before grabbing the pixel snapshot. This extra
- synchronisation is necessary with the CoordinatedGraphics rendering
- backend because it has a fully asynchronous nature. This patch make
- us using the window snapshot for pixel results which is necessary to
- capture animations and other dynamic content. The actual grabbing of
- the window has not been implemented in this patch. It will come in
- a follow-up.
-
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::invoke):
- (WTR::TestInvocation::dump): Store results in member variables.
- Don't close output channels yet.
- (WTR::TestInvocation::dumpResults): Added. This is where we dump
- the results if no error happened.
- (WTR):
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::windowSnapshotImage):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::forceRepaintDoneCallback):
- (WTR):
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Clean up variables controlling Qt module creation/handling
-
- Reviewed by Tor Arne Vestbø.
-
- We now depend on a Qt 5 version that is new enough to allow us to
- clean this up. Qt's default_pre.prf uses MODULE_QMAKE_OUTDIR, but
- the other MODULE_BASE_* variables are onl used in qmodule.prf.
-
- * qmake/mkspecs/features/default_pre.prf:
-
-2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Reduce memory pressure during link time
-
- Reviewed by Tor Arne Vestbø.
-
- If possible always pass -fkeep-memory to the linker on i386. The
- library has grown so big that we need this not only for i386 debug
- builds but at least also for release.
-
- * qmake/mkspecs/features/unix/default_post.prf:
-
-2012-10-17 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Modularize documentation for QtWebKit
-
- Running 'make docs' would fail unless 'make qmake_all' was ran first,
- but qmake_all involved generating all the derived sources, which seems
- overly complex just for building documentation.
-
- We solve this by preventing all subdirs except QtWebKit from having a
- docs target. This would normally work fine on its own, but since we
- use CONFIG += ordered, there's now a missing doc target for the
- immediate dependency of the QtWebKit subdir. We solve this by adding
- a dummy-target ourselves.
-
- Finally, we clean up the qdocconf file to match the rest of the Qt
- documentation modularization efforts.
-
- Reviewed by Simon Hausmann.
-
- * qmake/mkspecs/features/default_post.prf:
-
-2012-10-17 Zoltan Horvath <zoltan@webkit.org>
-
- Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas
- https://bugs.webkit.org/show_bug.cgi?id=99609
-
- Reviewed by Ryosuke Niwa.
-
- Remove the implementation since it creates bogus JSGlobalDatas in the layout tests.
-
- * DumpRenderTree/mac/DumpRenderTree.mm:
- (dump):
-
-2012-10-17 Dirk Pranke <dpranke@chromium.org>
-
- [chromium] stop falling back to platform/mac for LayoutTest results
- https://bugs.webkit.org/show_bug.cgi?id=99666
-
- Reviewed by James Robinson.
-
- Previously the Chromium ports would fall back to results in
- platform/mac if a result was not found in platform/chromium-*.
- This allowed us to share a lot of results w/ the Apple Mac port,
- but often surprised people (especially at Apple ;) when changing
- something in that directory would break a Chromium build.
-
- The tests that are deleted in baselineoptimizer were for cases
- that are no longer relevant or possible in the current fallback
- graph.
-
- * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
- (BaselineOptimizerTest.test_move_baselines):
- (BaselineOptimizerTest.test_chromium_covers_mac_win_linux):
- * Scripts/webkitpy/layout_tests/port/chromium_android.py:
- (ChromiumAndroidPort):
- * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
- (ChromiumLinuxPort):
- * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
- (ChromiumMacPort):
- * Scripts/webkitpy/layout_tests/port/chromium_win.py:
- (ChromiumWinPort):
- * TestResultServer/static-dashboards/flakiness_dashboard.js:
-
-2012-10-17 Shashi Shekhar <shashishekhar@google.com>
-
- Remove redundant sdk_build parameter.
- https://bugs.webkit.org/show_bug.cgi?id=99648
-
- Reviewed by Adam Barth.
-
- sdk_build parameter is no longer needed.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
- * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
-
-2012-10-17 Joanmarie Diggs <jdiggs@igalia.com>
-
- [GTK] AccessibilityUIElement::role() should be consistent across platforms wherever possible
- https://bugs.webkit.org/show_bug.cgi?id=99640
-
- Reviewed by Chris Fleizach.
-
- Convert AtkRole instances to the Mac/Safari-style AXRole string.
-
- * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
- (roleToString): New method to convert AtkRole instances to the Mac/Safari-style AXRole string
- (AccessibilityUIElement::role): Output the Mac/Safair-style AXRole string rather than the AtkRole's name
-
-2012-10-17 Anders Carlsson <andersca@apple.com>
-
- Clean up Vector.h
- https://bugs.webkit.org/show_bug.cgi?id=99622
-
- Reviewed by Benjamin Poulain.
-
- Remove ReversedProxy test.
-
- * TestWebKitAPI/Tests/WTF/Vector.cpp:
-
-2012-10-17 Scott Graham <scottmg@chromium.org>
-
- Integer overflows/underflows in all Gamepad controller api calls.
- https://bugs.webkit.org/show_bug.cgi?id=97262
-
- Reviewed by Abhishek Arya.
-
- Range check controller inputs. This code is not exposed to the web,
- but makes fuzzers try less hard to break uninteresting code.
-
- * DumpRenderTree/chromium/TestRunner/GamepadController.cpp:
- (GamepadController::setButtonCount):
- (GamepadController::setButtonData):
- (GamepadController::setAxisCount):
- (GamepadController::setAxisData):
-
-2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
-
- Unreviewed watchlist email change.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-17 Dan Carney <dcarney@google.com>
-
- Bind isolatedWorldSecurityOrigin to world
- https://bugs.webkit.org/show_bug.cgi?id=99582
-
- Reviewed by Adam Barth.
-
- Added ability to unset isolatedWorldSecurityOrigin.
-
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::setIsolatedWorldSecurityOrigin):
-
-2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
-
- Unreviewed watchlist addition.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-17 Sadrul Habib Chowdhury <sadrul@chromium.org>
-
- plugins: Allow a plugin to dictate whether it can receive drag events or not.
- https://bugs.webkit.org/show_bug.cgi?id=99355
-
- Reviewed by Tony Chang.
-
- Update the TestWebPlugin to implement the new |canProcessDrag| interface.
-
- * DumpRenderTree/chromium/TestWebPlugin.h:
- (TestWebPlugin::canProcessDrag):
-
-2012-10-17 Dominic Mazzoni <dmazzoni@google.com>
-
- Unreviewed. Create an accessibility watchlist.
-
- * Scripts/webkitpy/common/config/committers.py:
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-17 Jochen Eisinger <jochen@chromium.org>
-
- [gyp] fix bundle resources for DumpRenderTree on mac
- https://bugs.webkit.org/show_bug.cgi?id=99558
-
- Reviewed by Adam Barth.
-
- mac_bundle_resources doesn't propagate to targets that depend on it,
- so I'm wrapping it in an all_dependent_settings block.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
-
-2012-10-17 Harald Alvestrand <hta@google.com>
-
- Add myself to the MediaStream watchlist
- https://bugs.webkit.org/show_bug.cgi?id=99589
-
- Reviewed by Adam Barth.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [WK2][WTR] InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs
- https://bugs.webkit.org/show_bug.cgi?id=99581
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Now InjectedBundlePage::decidePolicyForNavigationAction() prints only filename part of local URLs (URLs where scheme
- equals to 'file').
-
- * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
- (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
-
-2012-10-17 Harald Alvestrand <hta@google.com>
-
- Implement the Selector argument to RTCPeerConnection.getStats
- https://bugs.webkit.org/show_bug.cgi?id=99460
-
- Reviewed by Adam Barth.
-
- The MockWebRTCPeerConnectionHandler will return one object only
- when it gets a selector, and an even number when there is no selector.
- This allows to verify that the argument is passed, but not its value.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::getStats):
-
-2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- WebKitTestRunner needs layoutTestController.queueReload
- https://bugs.webkit.org/show_bug.cgi?id=42672
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added implementation of testRunner.queueReload().
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::queueReload):
- (WTR):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::queueReload):
- (WTR):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/WorkQueueManager.cpp:
- (WTR::WorkQueueManager::queueReload):
- (WTR):
- * WebKitTestRunner/WorkQueueManager.h:
- (WorkQueueManager):
-
-2012-10-17 Mark Rowe <mrowe@apple.com>
-
- Fix the build with a newer version of clang.
-
- Reviewed by Dan Bernstein.
-
- Update to accommodate the renamed methods in WebCoreStatistics.
-
- * DumpRenderTree/mac/PixelDumpSupportMac.mm:
- (createPagedBitmapContext):
-
-2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- WebKitTestRunner needs testRunner.queueLoad
- https://bugs.webkit.org/show_bug.cgi?id=42674
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including
- Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process
- (as the needed functionality, like loading initiation, has to be invoked from UI process) and
- exchanges messages with Injected bundle.
-
- * WebKitTestRunner/CMakeLists.txt:
- * WebKitTestRunner/GNUmakefile.am:
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::InjectedBundle):
- (WTR::InjectedBundle::didReceiveMessage):
- (WTR::InjectedBundle::done):
- (WTR::InjectedBundle::shouldProcessWorkQueue):
- (WTR):
- (WTR::InjectedBundle::processWorkQueue):
- (WTR::InjectedBundle::queueBackNavigation):
- (WTR::InjectedBundle::queueLoad):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
- (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
- (WTR::InjectedBundlePage::didFinishLoadForFrame):
- (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
- (WTR::InjectedBundlePage::locationChangeForFrame):
- (WTR):
- * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
- (InjectedBundlePage):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::queueBackNavigation):
- (WTR):
- (WTR::TestRunner::queueLoad):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::resetStateToConsistentValues):
- * WebKitTestRunner/TestController.h:
- (WTR::TestController::workQueueManager):
- (TestController):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
- * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
- * WebKitTestRunner/WorkQueueManager.cpp: Added.
- (WTR):
- (WTR::mainPage):
- (WTR::goToItemAtIndex):
- (WTR::WorkQueueManager::WorkQueueManager):
- (WTR::WorkQueueManager::clearWorkQueue):
- (WTR::WorkQueueManager::processWorkQueue):
- (WTR::WorkQueueManager::queueLoad):
- (WTR::WorkQueueManager::queueBackNavigation):
- (WTR::WorkQueueManager::enqueue):
- * WebKitTestRunner/WorkQueueManager.h: Added.
- (WTR):
- (WorkQueueManager):
- (WTR::WorkQueueManager::isWorkQueueEmpty):
- (WorkQueueItem):
- (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem):
- * WebKitTestRunner/win/WebKitTestRunner.vcproj:
-
-2012-10-16 Andy Estes <aestes@apple.com>
-
- [WebKit2] Create Objective-C API for adding and removing user scripts
- https://bugs.webkit.org/show_bug.cgi?id=99528
-
- Reviewed by Anders Carlsson.
-
- Add three new API tests.
-
- * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
- (expectScriptValueIsString):
- (expectScriptValueIsBoolean):
- (expectScriptValueIsUndefined):
-
-2012-10-16 Dirk Pranke <dpranke@chromium.org>
-
- [chromium] add Mountain Lion baselines
- https://bugs.webkit.org/show_bug.cgi?id=99505
-
- Reviewed by Ojan Vafai.
-
- This change adds a temporary 10.8/MountainLion-specific
- expectations file for Chromium so that the bot can be green
- while we are updating all the baselines and triaging failures.
-
- * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
- (ChromiumMacPort.expectations_files):
- * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
- (ChromiumMacPortTest.test_ml_expectations):
-
-2012-10-16 Dima Gorbik <dgorbik@apple.com>
-
- Remove Platform.h include from the header files.
- https://bugs.webkit.org/show_bug.cgi?id=98665
-
- Reviewed by Eric Seidel.
-
- We don't want other clients that include WebKit headers to know about Platform.h.
-
- * DumpRenderTree/mac/MockGeolocationProvider.mm:
-
-2012-10-16 Tommy Widenflycht <tommyw@google.com>
-
- MediaStream API: Add the chromium API for RTCDataChannel
- https://bugs.webkit.org/show_bug.cgi?id=99435
-
- Reviewed by Adam Barth.
-
- Adding mock support for WebRTCDataChannel.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (StringDataTask):
- (StringDataTask::StringDataTask):
- (CharPtrDataTask):
- (CharPtrDataTask::CharPtrDataTask):
- (DataChannelReadyStateTask):
- (DataChannelReadyStateTask::DataChannelReadyStateTask):
- (RTCPeerConnectionReadyStateTask):
- (RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
- (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
- (MockWebRTCPeerConnectionHandler::initialize):
- (MockWebRTCPeerConnectionHandler::stop):
- (MockWebRTCPeerConnectionHandler::openDataChannel):
- (MockWebRTCPeerConnectionHandler::closeDataChannel):
- (MockWebRTCPeerConnectionHandler::sendStringData):
- (MockWebRTCPeerConnectionHandler::sendRawData):
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
- (MockWebRTCPeerConnectionHandler):
-
-2012-10-16 Chris Rogers <crogers@google.com>
-
- Rename some AudioNodes
- https://bugs.webkit.org/show_bug.cgi?id=99358
-
- Reviewed by Daniel Bates.
-
- * Scripts/do-webcore-rename:
-
-2012-10-16 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- Implement testRunner.dumpSelectionRect() in WebKitTestRunner
- https://bugs.webkit.org/show_bug.cgi?id=69545
-
- Reviewed by Simon Fraser.
-
- * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
- (WTR::InjectedBundlePage::dump): Set the
- kWKSnapshotOptionsPaintSelectionRectangle option if
- testRunner.dumpSelectionRect() is called.
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (WTR::TestRunner::dumpSelectionRect):
- (WTR::TestRunner::shouldDumpSelectionRect):
- (TestRunner):
-
-2012-10-16 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131461.
- http://trac.webkit.org/changeset/131461
- https://bugs.webkit.org/show_bug.cgi?id=99474
-
- Broke win7 bots (Requested by danakj|gardening on #webkit).
-
- * DumpRenderTree/chromium/TestEventPrinter.cpp:
- * DumpRenderTree/chromium/TestEventPrinter.h:
- (TestEventPrinter):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::dump):
-
-2012-10-16 Zoltan Horvath <zoltan@webkit.org>
-
- [chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
- https://bugs.webkit.org/show_bug.cgi?id=99288
-
- Reviewed by Ryosuke Niwa.
-
- Provide used JSHeap size as we did it for the Apple port.
-
- * DumpRenderTree/chromium/TestEventPrinter.cpp:
- (TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
- * DumpRenderTree/chromium/TestEventPrinter.h:
- (TestEventPrinter): handleDumpMemoryHeader declaration.
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::dump): Dump JSHeap value.
-
-2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix nmake wipeclean on Windows
-
- Reviewed by Tor Arne Vestbø.
-
- Delete all subdirectories and no files instead of ".".
-
- * qmake/mkspecs/features/configure.prf:
-
-2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix wipeclean on Windows
-
- Reviewed by Csaba Osztrogonác.
-
- Make sure to close the .qmake.cache file after opening it, otherwise it cannot be deleted on
- a clean build because this process (build-webkit) is still using it due to Windows' exclusive
- way of opening files.
-
- * Scripts/webkitdirs.pm:
- (buildQMakeProjects):
-
-2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Fix determination of changed files from SVN revisions
-
- Reviewed by Csaba Osztrogonác.
-
- isSVN() doesn't work from within the build directory, so change to the source directory before
- doing any VCS operations.
-
- * Scripts/VCSUtils.pm:
- * Scripts/webkitdirs.pm:
- (buildQMakeProjects):
-
-2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
-
- Fix build-webkit bailing out of !isSVN() and !isGit()
-
- Reviewed by Tor Arne Vestbø.
-
- Added missing else case with early return.
-
- * Scripts/VCSUtils.pm:
-
-2012-10-16 Simon Hausmann <simon.hausmann@digia.com>, Tor Arne Vestbø <tor.arne.vestbo@digia.com>
-
- [Qt] Add logic for triggering clean builds on changes to build system files
-
- Reviewed by Csaba Osztrogonác.
-
- Re-use the existing logic that gives us a range between old and new SVN revision and
- parse the summarized output of diff to see if any of the changed files include files
- that are part of the Qt build system. If they change we likely need a clean build and
- trigger it just to be on the safe side and reduce the amount of manual intervention
- needed on the Qt build bots.
-
- * Scripts/VCSUtils.pm:
- * Scripts/webkitdirs.pm:
- (buildQMakeProjects):
-
-2012-10-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- Fix the paths for QtGraphics related WebKit2 files.
-
- Unreviewed update of watchlist.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- CSS and TouchAdjustment - I am watching you!
-
- Unreviewed update of watchlist.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Silence C++11 warnings with older versions of clang
-
- Rubber-stamped by Tor Arne Vestbø.
-
- Some clang versions support -Wno-c++11-extensions and some use -Wno-c++0x-extensions.
- We cater both :)
-
- * qmake/mkspecs/features/unix/default_post.prf:
-
-2012-10-16 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [WK2] Provide WKURL API for resolving the relative URL with the given base URL
- https://bugs.webkit.org/show_bug.cgi?id=99317
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added API test for newly added WKURLCreateWithBaseURL().
-
- * TestWebKitAPI/PlatformEfl.cmake:
- * TestWebKitAPI/Tests/WebKit2/WKURL.cpp: Added.
- (TestWebKitAPI):
- (TestWebKitAPI::TEST):
-
-2012-10-16 Zan Dobersek <zandobersek@gmail.com>
-
- [GTK] Decrease the Cario jhbuild dep version back to 1.10.2
- https://bugs.webkit.org/show_bug.cgi?id=99443
-
- Reviewed by Philippe Normand.
-
- Crashes started to occur after the Cairo version in the JHBuild dependencies
- was bumped up to 1.12.4. This change brings it back down to 1.10.2, which
- worked fine.
-
- * gtk/jhbuild.modules:
-
-2012-10-16 Szilard Ledan <szledan@inf.u-szeged.hu>
-
- Separate WebKit2 instances use the same local storage
- https://bugs.webkit.org/show_bug.cgi?id=89666
-
- Reviewed by Simon Hausmann.
-
- TestController has been modified to get the local storage from
- DUMPRENDERTREE_TEMP environment variable. If it's undefined
- then it works with the default directory. The aim is for the parallelly
- started WTRs to use separate directories. It was implemented for WK1
- long time ago and it works fine.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize):
-
-2012-10-15 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Display page favicons in MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=99265
-
- Reviewed by Gyuyoung Kim.
-
- Display current page favicon in the URL bar.
- This uses the new favicon database API in
- EFL WebKit2.
-
- * MiniBrowser/efl/main.c:
- (on_favicon_received):
- (on_view_icon_changed):
- (window_create):
-
-2012-10-15 Simon Fraser <simon.fraser@apple.com>
-
- Update the url bar in MiniBrowser when getting the committed URL
- https://bugs.webkit.org/show_bug.cgi?id=99388
-
- Reviewed by Sam Weinig.
-
- Fix both WK1 and WK2 window controllers to update the URL in the
- text field when transitioning to the committed URL. This fixes
- the URL when dragging local files into the window.
-
- * MiniBrowser/mac/WK1BrowserWindowController.m:
- (-[WK1BrowserWindowController webView:didCommitLoadForFrame:]):
- * MiniBrowser/mac/WK2BrowserWindowController.m:
- (-[WK2BrowserWindowController updateTextFieldFromURL:]):
- (-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
- (-[WK2BrowserWindowController updateCommittedURLForFrame:]):
- (-[WK2BrowserWindowController didCommitLoadForFrame:]):
-
-2012-10-15 Ojan Vafai <ojan@chromium.org>
-
- Don't show the content shell and android test bots for webkit ToT
- https://bugs.webkit.org/show_bug.cgi?id=99380
-
- Reviewed by Dirk Pranke.
-
- Content shell used to coincidentally be skipped because it spelled WebKit correctly.
- Now skip it explicitly. The Android bot is up and running, but only has a stub for
- running tests. Skip it so we don't show a false error.
- * TestResultServer/static-dashboards/builders.js:
- (isChromiumWebkitTipOfTreeTestRunner):
-
-2012-10-15 Zoltan Horvath <zoltan@webkit.org>
-
- Add MountainLion Performance-bot to the Performance bots waterfall link
- https://bugs.webkit.org/show_bug.cgi?id=99378
-
- Reviewed by Dirk Pranke.
-
- Add MountainLion Performance-bot to the Performance bots waterfall link on the buildbots frontpage.
-
- * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
-
-2012-10-15 Yael Aharon <yael.aharon@intel.com>
-
- [EFL][WK2] Cannot set evas engine from command line
- https://bugs.webkit.org/show_bug.cgi?id=99286
-
- Reviewed by Kenneth Rohde Christiansen.
-
- If an engine name is passed on the command line, pass it along to evas.
-
- * MiniBrowser/efl/main.c:
- (elm_main):
-
-2012-10-15 Ojan Vafai <ojan@chromium.org>
-
- Lower the minimum time required to keep a test in the test results json
- https://bugs.webkit.org/show_bug.cgi?id=99346
-
- Reviewed by Eric Seidel.
-
- On the run-webkit-tests side, we floor the time. So, 5 seconds is too close to
- the 6 second timeout. Lower the time so that we can get a better sense of tests
- that are close to timing out.
-
- * TestResultServer/model/jsonresults.py:
- * TestResultServer/model/jsonresults_unittest.py:
- (JsonResultsTest.test_merge_keep_test_with_all_pass_but_slow_time):
-
-2012-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131306 and r131307.
- http://trac.webkit.org/changeset/131306
- http://trac.webkit.org/changeset/131307
- https://bugs.webkit.org/show_bug.cgi?id=99354
-
- It made layout testing extremely slow again (Requested by
- Ossy_night on #webkit).
-
- * WebKitTestRunner/Target.pri:
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::invoke):
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::WrapperWindow::handleStatusChanged):
- (WTR::PlatformWebView::windowSnapshotImage):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131327.
- http://trac.webkit.org/changeset/131327
- https://bugs.webkit.org/show_bug.cgi?id=99353
-
- broke the build (Requested by danakj|gardening on #webkit).
-
- * DumpRenderTree/chromium/TestEventPrinter.cpp:
- * DumpRenderTree/chromium/TestEventPrinter.h:
- (TestEventPrinter):
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::dump):
-
-2012-10-15 Kenichi Ishibashi <bashi@chromium.org>
-
- [WebSocket] Update pywebsocket to 0.7.8
- https://bugs.webkit.org/show_bug.cgi?id=99293
-
- Reviewed by Yuta Kitamura.
-
- Version 0.7.8 supports WebSocket frames and messages compression
- with blocks in which BFINAL bit is set to 1.
- We need this feature to add a test case of compression extension.
-
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py:
- (DeflateFrameExtensionProcessor.__init__):
- (DeflateFrameExtensionProcessor.set_bfinal):
- (DeflateFrameExtensionProcessor._outgoing_filter):
- (DeflateMessageProcessor.__init__):
- (DeflateMessageProcessor.set_bfinal):
- (DeflateMessageProcessor._process_outgoing_message):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py:
- (_Deflater.compress_and_finish):
- (_RFC1979Deflater.filter):
-
-2012-10-15 Zan Dobersek <zandobersek@gmail.com>
-
- [TestResultServer] TestExpectations should only be loaded for the flakiness dashboard
- https://bugs.webkit.org/show_bug.cgi?id=99245
-
- Reviewed by Ojan Vafai.
-
- Only load the TestExpectations when using the flakiness dashboard. Other dashboards
- don't need them so there's no reason to load them.
-
- * TestResultServer/static-dashboards/dashboard_base.js:
- (isFlakinessDashboard):
- (appendJSONScriptElements):
-
-2012-10-15 Zoltan Horvath <zoltan@webkit.org>
-
- [chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
- https://bugs.webkit.org/show_bug.cgi?id=99288
-
- Reviewed by Ryosuke Niwa.
-
- Provide used JSHeap size as we did it for the Apple port.
-
- * DumpRenderTree/chromium/TestEventPrinter.cpp:
- (TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
- * DumpRenderTree/chromium/TestEventPrinter.h:
- (TestEventPrinter): handleDumpMemoryHeader declaration.
- * DumpRenderTree/chromium/TestShell.cpp:
- (TestShell::dump): Dump JSHeap value.
-
-2012-10-15 George Staikos <staikos@webkit.org>
-
- [BlackBerry] Adapt to Platform API changes in string handling
- https://bugs.webkit.org/show_bug.cgi?id=99248
-
- Reviewed by Yong Li.
-
- Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
-
- * DumpRenderTree/blackberry/DumpRenderTree.cpp:
- (BlackBerry::WebKit::DumpRenderTree::runTest):
- * DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp:
- (LoadHTMLStringItem::invoke):
- (ScriptItem::invoke):
-
-2012-10-15 Kangil Han <kangil.han@samsung.com>
-
- [EFL][EWebLauncher] Add encoding detector option.
- https://bugs.webkit.org/show_bug.cgi?id=98726
-
- Reviewed by Gyuyoung Kim.
-
- Added an option to test WebCore's encoding detector functionality on EWebLauncher.
- With this patch, EWebLauncher would display text correctly even if web page wouldn't specify charset information.
-
- * EWebLauncher/main.c:
- (_User_Arguments):
- (windowCreate):
- (parseUserArguments):
-
-2012-10-15 Ilya Tikhonovsky <loislo@chromium.org>
-
- Build fix for Mac debug build.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] Implement pixel snapshot generation in WTR
- https://bugs.webkit.org/show_bug.cgi?id=95992
-
- Reviewed by Jocelyn Turcotte.
-
- Switch the Qt implementation of the PlatformWebView to use
- QQuickWindow::grabWindow to generate the pixel results. This way
- we will go through the scenegraph and test the actual rendering backend.
- We use QQuickWindowPrivate::setRenderWithoutShowing to avoid the need of
- showing the window.
-
- * WebKitTestRunner/Target.pri: Had to added a bunch
- of modules to be able to use QQuickWindowPrivate.
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::WrapperWindow::handleStatusChanged):
- (WTR::PlatformWebView::windowSnapshotImage):
-
-2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WTR] Do a forced repaint before generating pixel results
- https://bugs.webkit.org/show_bug.cgi?id=98654
-
- Reviewed by Jocelyn Turcotte.
-
- Do a forced repaint before grabbing the pixel snapshot. This extra
- synchronisation is necessary with the CoordinatedGraphics rendering
- backend because it has a fully asynchronous nature. This patch make
- us using the window snapshot for pixel results which is necessary to
- capture animations and other dynamic content. The actual grabbing of
- the window has not been implemented in this patch. It will come in
- a follow-up.
-
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::invoke):
- (WTR::TestInvocation::dump): Store results in member variables.
- Don't close output channels yet.
- (WTR::TestInvocation::dumpResults): Added. This is where we dump
- the results if no error happened.
- (WTR):
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::windowSnapshotImage):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::forceRepaintDoneCallback):
- (WTR):
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-10-15 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
- https://bugs.webkit.org/show_bug.cgi?id=88162
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Rename the QtWebKit module to QtWebKitWidgets.
-
- * DumpRenderTree/qt/DumpRenderTree.pro:
- * MiniBrowser/qt/MiniBrowser.pro:
- * MiniBrowser/qt/raw/Target.pri:
- * QtTestBrowser/QtTestBrowser.pro:
- * Scripts/webkitpy/layout_tests/port/qt.py:
- (QtPort._path_to_webcore_library):
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/Target.pri:
- * qmake/mkspecs/features/default_post.prf:
- * qmake/mkspecs/features/webkit_modules.prf:
- * qmake/mkspecs/features/win32/default_post.prf:
-
-2012-10-11 Kinuko Yasuda <kinuko@chromium.org>
-
- [chromium] Removes unnecessary dependencies in DumpRenderTree.gyp
- https://bugs.webkit.org/show_bug.cgi?id=99132
-
- Reviewed by Kent Tamura.
-
- Removing webkit_support:blob dependency for DumpRenderTree target as it doesn't seem necessary.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
-
-2012-10-15 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt][WK2] Buildfix for newer Qt5.
- https://bugs.webkit.org/show_bug.cgi?id=99303
-
- Reviewed by Simon Hausmann.
-
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::resizeTo):
-
-2012-10-14 Jon Lee <jonlee@apple.com>
-
- Allow notification origin permission request when no js callback is provided
- https://bugs.webkit.org/show_bug.cgi?id=63615
- <rdar://problem/11059590>
-
- Reviewed by Sam Weinig.
-
- Teach DRT to look at the existing entries in the permission hash map when permission is requested.
-
- * DumpRenderTree/mac/MockWebNotificationProvider.h: Expose policyForOrigin.
- * DumpRenderTree/mac/MockWebNotificationProvider.mm:
- (-[MockWebNotificationProvider setWebNotificationOrigin:permission:]):
- * DumpRenderTree/mac/UIDelegate.mm:
- (-[UIDelegate webView:decidePolicyForNotificationRequestFromOrigin:listener:]): Look at whether a
- policy for the origin already exists. If so, accept or deny the request as appropriate. Otherwise,
- accept by default.
-
-2012-10-13 Zan Dobersek <zandobersek@gmail.com>
-
- [TestResultServer] Unit tests require an update after r131239
- https://bugs.webkit.org/show_bug.cgi?id=99236
-
- Reviewed by Ojan Vafai.
-
- Replacing 'Webkit' with 'WebKit' in builder names througout the unit tests
- after the Chromium builders have been renamed recently.
-
- * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
-
-2012-10-12 Zan Dobersek <zandobersek@gmail.com>
-
- [TestResultServer] Add support for non-Chromium TestExpectations files
- https://bugs.webkit.org/show_bug.cgi?id=98422
-
- Reviewed by Ojan Vafai.
-
- Loads TestExpectations files for several other non-Chromium ports, parses them and
- properly distributes them per various platforms.
-
- * TestResultServer/static-dashboards/dashboard_base.js: g_expectations is replaced by
- g_expectationsByPlatform, an object that holds raw TestExpectations file contents for
- various platforms.
- (requestExpectationsFiles): First traverses through the platforms tree to gather all
- the TestExpectations files that should be loaded, then loads them in parallel.
- (appendJSONScriptElements):
- * TestResultServer/static-dashboards/flakiness_dashboard.js: The platforms tree is reorganized
- to describe each platform and possible subplatforms plainly yet in detail. The PLATFORM_FALLBACKS
- object is removed as it's not used anywhere. g_allTestsByPlatformAndBuildType is now filled by
- traversing the platforms tree.
- (traversePlatformsTree.traverse):
- (traversePlatformsTree): A helper function that traverses the platforms tree, invoking
- callback on each leaf node.
- (determineWKPlatform): A helper function to determine whether the builder is running WebKit1 or
- WebKit2 layer of a given platform.
- (chromiumPlatform): Chromium-specific platforms are now properly prefixed with 'CHROMIUM_'.
- (TestTrie): A new class that holds all the tests in a trie. The trie is constructed by iterating
- through the tests for each builder, adding each test to the trie.
- (TestTrie.prototype.forEach.traverse):
- (TestTrie.prototype.forEach): A helper function that traverses the tests trie, invoking callback on each leaf.
- (TestTrie.prototype._addTest): Aligns the test into the specified trie based on the test's path.
- (getAllTestsTrie): Instead of in list, the problematic tests from each builder are now stored in a trie.
- (individualTestsForSubstringList): Modified to traverse the trie instead of iterating the list.
- (allTestsWithResult): Ditto.
- (platformObjectForName): Splits the platform name by underscores and finds the appropriate platform object.
- (getParsedExpectations): Now operates on the passed-in parameter rather than on a global variable.
- (addTestToAllExpectationsForPlatform): Links expectations and modifiers to the test on the specified platform
- and any build type the modifiers might apply to (or all build types if there are no such modifiers).
- (processExpectationsForPlatform): Determines if the expectation should actually be processed for the given
- platform by checking if any platform's fallback platforms support platform modifier unions and if any modifiers
- represent such an union. If so, the expectation is then only processed if the given platform is in the union
- the modifier presents or there are no such modifiers.
- (processExpectations): Processes all acquired expectations by traversing the platforms tree and taking into
- account possible fallback platforms.
- (processTestRunsForBuilder):
- (realModifiers.return.modifiers.filter):
- (realModifiers): Modifiers other than build configurations and bug handles are now filtered out only if they
- are present in the platform's platform modifier unions or represent subplatforms of a platform that supports
- platform modifier unions.
- * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js: The test cases are updated and expanded
- where necessary to cover the changes.
- (resetGlobals):
- (test): Added a TestTrie test.
-
-2012-10-12 Dirk Pranke <dpranke@chromium.org>
-
- Update chromium bot names in garden-o-matic.
-
- Unreviewed, build fix.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
-
-2012-10-12 Ojan Vafai <ojan@chromium.org>
-
- Fix bot name filters now that the Chromium bots have been renamed.
- * TestResultServer/static-dashboards/builders.js:
- (isChromiumWebkitTipOfTreeTestRunner):
- (isChromiumWebkitDepsTestRunner):
- (isChromiumTipOfTreeGTestRunner):
-
-2012-10-12 Dirk Pranke <dpranke@chromium.org>
-
- [chromium] add ML bot and update bot names
- https://bugs.webkit.org/show_bug.cgi?id=99209
-
- Reviewed by Eric Seidel.
-
- This change adds proper baseline support for Mac10.8 (Mountain
- Lion or ML) to chromium and updates the bot names from "Webkit"
- to "WebKit" and ensures that all the bots have the OS version in
- the name on Mac and Win.
-
- We don't yet include a ML bot in garden-o-matic since it isn't
- green yet.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
- (.):
- * Scripts/webkitpy/layout_tests/port/builders.py:
- * Scripts/webkitpy/layout_tests/port/chromium.py:
- (ChromiumPort):
- * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
- (FactoryTest.test_get_from_builder_name):
- * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
- (TestRebaseline.test_baseline_directory):
- (TestRebaseline.test_rebaseline_updates_expectations_file_noop):
- (test_rebaseline_updates_expectations_file):
- (test_rebaseline_does_not_include_overrides):
- (test_rebaseline_test):
- (test_rebaseline_test_and_print_scm_changes):
- (test_rebaseline_and_copy_test):
- (test_rebaseline_and_copy_test_with_lion_result):
- (test_rebaseline_and_copy_no_overwrite_test):
- (test_rebaseline_expectations):
- * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
- (BuildCoverageExtrapolatorTest.test_extrapolate):
-
-2012-10-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [Qt][WK2] REGRESSION(r131057): It made plugins/plugin-document-back-forward.html timeout
- https://bugs.webkit.org/show_bug.cgi?id=99152
-
- Reviewed by Simon Fraser.
-
- Even though Response was already checked in WTR WKBundlePagePolicyClient decidePolicyForResponse callback,
- this check did not take plugins into consideration when deciding whether we can show the given MIME type or not
- so added another check in WTR UI process which also includes plugins.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::decidePolicyForResponse):
- * WebKitTestRunner/TestController.h:
- (TestController):
-
-2012-10-12 Rob Buis <rbuis@rim.com>
-
- [BlackBerry] Add tests of WebSocketEnabled preference
- https://bugs.webkit.org/show_bug.cgi?id=84982
-
- Reviewed by Yong Li.
-
- PR 209265.
-
- Allow WebSocketsEnabled preference setting.
-
- * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
- (TestRunner::overridePreference):
-
-2012-10-12 Tommy Widenflycht <tommyw@google.com>
-
- Creating a MediaStream subscription in watchlist
- https://bugs.webkit.org/show_bug.cgi?id=99172
-
- Reviewed by Yuta Kitamura.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-12 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131160.
- http://trac.webkit.org/changeset/131160
- https://bugs.webkit.org/show_bug.cgi?id=99163
-
- "It should not be landed without it's follow-up because it
- break pixal and ref tests without it." (Requested by kbalazs
- on #webkit).
-
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::invoke):
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::windowSnapshotImage):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-10-12 Jochen Eisinger <jochen@chromium.org>
-
- Create a separate gyp target for dependencies of DumpRenderTree
- https://bugs.webkit.org/show_bug.cgi?id=99023
-
- Reviewed by Tony Chang.
-
- This allows for pulling in the fonts and helpers required to run layout
- tests in the content_shell without depending on DumpRenderTree.
-
- * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
-
-2012-10-12 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt][WTR] Do a forced repaint before generating pixel results
- https://bugs.webkit.org/show_bug.cgi?id=98654
-
- Reviewed by Jocelyn Turcotte.
-
- Do a forced repaint before grabbing the pixel snapshot. This extra
- synchronisation is necessary with the CoordinatedGraphics rendering
- backend because it has a fully asynchronous nature. This patch make
- us using the window snapshot for pixel results which is necessary to
- capture animations and other dynamic content. The actual grabbing of
- the window has not been implemented in this patch. It will come in
- a follow-up.
-
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::invoke):
- (WTR::TestInvocation::dump): Store results in member variables.
- Don't close output channels yet.
- (WTR::TestInvocation::dumpResults): Added. This is where we dump
- the results if no error happened.
- (WTR):
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
- * WebKitTestRunner/TestInvocation.h:
- (TestInvocation):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- (WTR::PlatformWebView::windowSnapshotImage):
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::forceRepaintDoneCallback):
- (WTR):
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-10-12 Ilya Tikhonovsky <loislo@chromium.org>
-
- Unreviewed compile error fix for chromium windows bot.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-12 Ilya Tikhonovsky <loislo@chromium.org>
-
- Another unreviewed fix for clang builders.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-12 Ilya Tikhonovsky <loislo@chromium.org>
-
- Unreviewed compile error fix for clang builders.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-11 Ilya Tikhonovsky <loislo@chromium.org>
-
- Web Inspector: NMI move instrumentation tests from chromium test set to the cross platform test set.
- https://bugs.webkit.org/show_bug.cgi?id=99046
-
- Reviewed by Yury Semikhatsky.
-
- * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
-
-2012-10-11 Takashi Sakamoto <tasak@google.com>
-
- [WebKit IDL] remove all module from idl files.
- https://bugs.webkit.org/show_bug.cgi?id=99007
-
- Reviewed by Kentaro Hara.
-
- Since current WebIDL spec doesn't support "module", remove
- module from all idl files.
-
- No new tests. I ran run-bindings-tests and no error was reported.
-
- * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/GCController.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl:
- Removed "module".
-
-2012-10-11 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r131107.
- http://trac.webkit.org/changeset/131107
- https://bugs.webkit.org/show_bug.cgi?id=99126
-
- Causes an ASSERT (Requested by abarth|gardening on #webkit).
-
- * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
- (AccessibilityController::getAccessibleElementById):
- * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
- (AccessibilityUIElement::titleUIElementCallback):
-
-2012-10-11 Seokju Kwon <seokju.kwon@samsung.com>
-
- [EFL][WK2] Add support for Inspector
- https://bugs.webkit.org/show_bug.cgi?id=98639
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Enable developer extensions when browser is created.
- And Inspector can be opened by pressing Ctrl+i on browser.
-
- * MiniBrowser/efl/main.c:
- (on_key_down):
- (window_create):
-
-2012-10-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
-
- [EFL] Remove "web" word in web inspector
- https://bugs.webkit.org/show_bug.cgi?id=98724
-
- Reviewed by Laszlo Gombos.
-
- *web* word is redundant in web inspector. Beside r130494 and r130479 removed *web* from EFL WK2.
-
- * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
- (DumpRenderTreeChrome::createInspectorView):
- (DumpRenderTreeChrome::removeInspectorView):
- (DumpRenderTreeChrome::waitInspectorLoadFinished):
- (DumpRenderTreeChrome::onInspectorViewCreate):
- (DumpRenderTreeChrome::onInspectorViewClose):
- (DumpRenderTreeChrome::onInspectorFrameLoadFinished):
- * DumpRenderTree/efl/DumpRenderTreeChrome.h:
- (DumpRenderTreeChrome):
- * DumpRenderTree/efl/TestRunnerEfl.cpp:
- (TestRunner::showWebInspector):
- (TestRunner::closeWebInspector):
- * EWebLauncher/main.c:
- (on_inspector_ecore_evas_resize):
- (on_key_down):
- (on_inspector_view_create):
- (on_inspector_view_close):
- (on_inspector_view_destroyed):
- (browserCreate):
- (webInspectorCreate):
- (closeWindow):
- (main_signal_exit):
-
-2012-10-11 Timothy Hatcher <timothy@apple.com>
-
- Unreviewed watch list addition for Inspector.json.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-11 Dominic Mazzoni <dmazzoni@google.com>
-
- AX: labelForElement is slow when there are a lot of DOM elements
- https://bugs.webkit.org/show_bug.cgi?id=97825
-
- Reviewed by Ryosuke Niwa.
-
- Implement titleUIElement in the chromium port of DRT, and
- fix getAccessibleElementById so that it ensures the backing store
- is up-to-date.
-
- * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
- (AccessibilityController::getAccessibleElementById):
- * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
- (AccessibilityUIElement::titleUIElementCallback):
-
-2012-10-11 Dirk Pranke <dpranke@chromium.org>
-
- test-webkitpy runs individual tests twice
- https://bugs.webkit.org/show_bug.cgi?id=99098
-
- Reviewed by Adam Barth.
-
- If you were to run 'test-webkitpy webkitpy.test.main_unittests.TesterTests.test_no_tests_found',
- it would actually run the test twice. This fixes that.
-
- * Scripts/webkitpy/test/main.py:
- (Tester._parse_args):
- (Tester._test_names):
- * Scripts/webkitpy/test/main_unittest.py:
- (TesterTest.test_no_tests_found):
- (TesterTest):
- (TesterTest.test_individual_names_are_not_run_twice):
-
-2012-10-11 Xianzhu Wang <wangxianzhu@chromium.org>
-
- [Chromium-Android] Exception when the layout test driver is stopped
- https://bugs.webkit.org/show_bug.cgi?id=99084
-
- Reviewed by Dirk Pranke.
-
- On chromium-android, the process is killed directly in ServerProcess.stop() as the pipes are closed first.
- Should not try to read data from the pipes after the process is killed.
-
- * Scripts/webkitpy/layout_tests/port/server_process.py:
- (ServerProcess.stop): Don't read data after the process is killed.
-
-2012-10-11 Mario Sanchez Prada <msanchez@igalia.com>
-
- [GTK] REGRESSION(r131033): Favicons don't work in MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=99019
-
- Reviewed by Carlos Garcia Campos.
-
- Enable the favicons database by specifying the default path for
- the directory where the actual data will be stored.
-
- * MiniBrowser/gtk/main.c:
- (main): Set the default directory for the favicon database calling
- webkit_web_context_set_favicon_database_directory().
-
-2012-10-11 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [EFL][WK2] NWTR should launch MiniBrowser instead of EWebLauncher after test run
- https://bugs.webkit.org/show_bug.cgi?id=99075
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Pass the '-2' flag when executing run-launcher script after
- testing with WebKitTestRunner.
-
- * Scripts/webkitpy/layout_tests/port/efl.py:
- (EflPort.show_results_html_file):
-
-2012-10-11 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add support for Javascript popup boxes to MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=99021
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add support for JavaScript popups (alert, confirm, prompt)
- to MiniBrowser.
-
- * MiniBrowser/efl/main.c:
- (miniBrowserViewSmartClass):
- (browser_view_find):
- (quit_event_loop):
- (on_ok_clicked):
- (on_javascript_alert):
- (on_javascript_confirm):
- (on_javascript_prompt):
- (window_create):
- (elm_main):
-
-2012-10-11 Ryuan Choi <ryuan.choi@samsung.com>
-
- [EFL][jhbuild] Disable elm-web in elementary
- https://bugs.webkit.org/show_bug.cgi?id=99005
-
- Reviewed by Laszlo Gombos.
-
- * efl/jhbuild.modules: Added --disable-web to elementary.
-
-2012-10-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- REGRESSION (r129478-r129480): http/tests/loading/text-content-type-with-binary-extension.html failing on Apple MountainLion Debug WK2 (Tests)
- https://bugs.webkit.org/show_bug.cgi?id=98527
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added decidePolicyForResponse callback for WTR PagePolicyClient.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::initialize):
- (WTR::TestController::decidePolicyForResponse):
- (WTR):
- * WebKitTestRunner/TestController.h:
- (TestController):
-
-2012-10-11 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-
- [Qt] Make sure that -Wno-c++0x-compat is set even with production_build
-
- Reviewed by Simon Hausmann.
-
- This makes sure that QtWebKit can be built inside Qt without nullptr
- and narrowing warnings producing noise during compilation.
-
- * qmake/mkspecs/features/unix/default_post.prf:
-
-2012-10-11 Jinwoo Song <jinwoo7.song@samsung.com>
-
- [EFL][WK2] Revisit setting API names and documentation
- https://bugs.webkit.org/show_bug.cgi?id=98793
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Make frame flattening setting APIs to be consistent with others.
-
- * MiniBrowser/efl/main.c:
- (window_create):
-
-2012-10-11 Vivek Galatage <vivekgalatage@gmail.com>
-
- Fix committers.py for the names of contributors to appear on webkit.org/team.html
- https://bugs.webkit.org/show_bug.cgi?id=99004
-
- Reviewed by Yuta Kitamura
-
- Some of the nicknames in the committers.py file are using the single quotes (')
- but while parsing these, JSON throws an error: Single quotes (') are not allowed in JSON
- Hence coverting these single quotes to (") so as the contributor names appear properly
- on http://www.webkit.org/team.html
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-10 Lucas Forschler <lforschler@apple.com>
-
- Remove Apple Mac Snow Leopard bots.
-
- * BuildSlaveSupport/build.webkit.org-config/config.json:
-
-2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add toolbar buttons to MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=98883
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Add toolbar buttons to MiniBrowser to support
- navigation back / forward, refresh and go
- to home page.
-
- * MiniBrowser/efl/main.c:
- (_Browser_Window):
- (on_back_forward_list_changed):
- (on_back_button_clicked):
- (on_forward_button_clicked):
- (on_refresh_button_clicked):
- (on_home_button_clicked):
- (create_toolbar_button):
- (window_create):
-
-2012-10-10 Andy Estes <aestes@apple.com>
-
- Fix the Lion build after r130948.
-
- * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
-
-2012-10-10 Andy Estes <aestes@apple.com>
-
- Speculative build fix for Snow Leopard after r130948.
-
- * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: Pull the
- declaration of backgroundColorQuery out of a block to appease GCC.
-
-2012-10-10 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
-
- [WK2][WTR] WebKitTestRunner UI process should be aware of Custom Policy Delegate
- https://bugs.webkit.org/show_bug.cgi?id=95974
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Added TestController::decidePolicyForNavigationAction() function as a 'decidePolicyForNavigationAction' WKPagePolicyClient callback
- for WTR UI process. WTR bundle client notifies UI process about Custom Policy Delegate via newly added message,
- so that TestController is aware of whether Custom Policy Delegate as enabled and
- permissive. This data is used then in TestController::decidePolicyForNavigationAction for making policy decision.
-
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::setCustomPolicyDelegate):
- (WTR):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::setCustomPolicyDelegate):
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::TestController):
- (WTR::TestController::initialize):
- (WTR::TestController::resetStateToConsistentValues):
- (WTR::TestController::setCustomPolicyDelegate):
- (WTR):
- (WTR::TestController::decidePolicyForNavigationAction):
- * WebKitTestRunner/TestController.h:
- (TestController):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
-
-2012-10-10 Zoltan Horvath <zoltan@webkit.org>
-
- Pageload tests should measure memory usage
- https://bugs.webkit.org/show_bug.cgi?id=93958
-
- Reviewed by Ryosuke Niwa.
-
- Add JS Heap and Heap memory measurement to PageLoad tests.
-
- * DumpRenderTree/mac/DumpRenderTree.mm:
- (dump): Print memory results with DRT.
- * Scripts/old-run-webkit-tests:
- (readFromDumpToolWithTimer): Hadle memory results.
- * Scripts/webkitpy/layout_tests/port/driver.py:
- (DriverOutput.__init__): Add new parameter for the results.
- (Driver.__init__): Initialize the new parameter.
- (Driver.run_test):
- (Driver._read_first_block): Add support for the new headers.
- (Driver._process_stdout_line):
- (ContentBlock.__init__):
- * Scripts/webkitpy/performance_tests/perftest.py:
- (PageLoadingPerfTest.calculate_statistics): Move statistics calculation into a function.
- (PageLoadingPerfTest.run): Handle the new memory results.
- (PageLoadingPerfTest.run.in):
- (PageLoadingPerfTest):
- * Scripts/webkitpy/performance_tests/perftest_unittest.py: Add test for memory results of pageloadtests.
- (TestPageLoadingPerfTest.MockDriver.__init__):
- (TestPageLoadingPerfTest.MockDriver.run_test):
- (TestPageLoadingPerfTest.test_run_with_memory_output):
-
-2012-10-04 Andy Estes <aestes@apple.com>
-
- [WebKit2] Create an API for adding and removing user stylesheets from a page group
- https://bugs.webkit.org/show_bug.cgi?id=98432
-
- Reviewed by Sam Weinig.
-
- Add three new API tests:
-
- - Test adding a user stylesheet before a page is created. This tests
- the code path where the sheet is sent to the web process as part of
- the new page's WebPageCreationParameters.
- - Test adding a user stylesheet after a page is created. This tests the
- code patch where the sheet is sent as a separate message to all
- processes containing the given page group.
- - Test removing all user stylesheets.
-
- * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: Added.
- (-[UserContentTestLoadDelegate initWithBlockToRunOnLoad:]):
- (-[UserContentTestLoadDelegate browsingContextControllerDidFinishLoad:]):
- (expectScriptValue):
- * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextGroupTest.mm:
-
-2012-10-10 Dan Bernstein <mitz@apple.com>
-
- Changed debug-safari, debug-minibrowser and debug-test-runner to use LLDB by default when
- using Xcode 4.5 or later.
-
- Reviewed by Anders Carlsson.
-
- * Scripts/webkitdirs.pm:
- (determineDebugger): Changed the default debugger from GDB to LLDB when the Xcode version
- is 4.5 or later. Added a --use-gdb switch for overriding this.
- (printHelpAndExitForRunAndDebugWebKitAppIfNeeded): Updated to mention --use-gdb and the
- how the default debugger choice depends on the Xcode version. Also changed the description
- of --no-saved-state to use the same terminology Xcode’s scheme editor uses to describe this
- option, and clarified to which OS X versions it applies.
-
-2012-10-10 Antonio Gomes <agomes@rim.com>
-
- Unreviewed watch list addition.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-10 Dirk Pranke <dpranke@chromium.org>
-
- NRWT crashes on too many timeouts
- https://bugs.webkit.org/show_bug.cgi?id=97047
-
- Reviewed by Tony Chang.
-
- Apparently if you kill a subprocess directly python doesn't
- auto-close the file descriptors.
-
- * Scripts/webkitpy/layout_tests/port/server_process.py:
- (ServerProcess._reset):
- * Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
-
-2012-10-10 Zan Dobersek <zandobersek@gmail.com>
-
- [TestResultServer] Enable CORS for test files
- https://bugs.webkit.org/show_bug.cgi?id=98918
-
- Reviewed by Dirk Pranke.
-
- Serve the JSON test files with the Access-Control-Allow-Origin
- response header to enable cross-origin sharing of these files.
- This eases up hacking on TestResultServer.
-
- * TestResultServer/handlers/testfilehandler.py:
- (GetFile._serve_json):
-
-2012-10-10 Andreas Kling <kling@webkit.org>
-
- Future-proof the WTF.DoubleHashCollisions test.
- <http://webkit.org/b/98853>
-
- Reviewed by Anders Carlsson.
-
- Add a check that the two keys that are supposed to clobber each other actually end up
- in the same bucket with the DefaultHash<double> hash function.
-
- * TestWebKitAPI/Tests/WTF/HashMap.cpp:
- (TestWebKitAPI::bucketForKey):
- (TestWebKitAPI):
- (TestWebKitAPI::TEST):
-
-2012-10-10 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] Test drivers should handle repaint rects
- https://bugs.webkit.org/show_bug.cgi?id=68870
-
- Reviewed by Zoltan Herczeg.
-
- Implemented masking the area not covered by repaint rects.
- This is equivalent with the implementation for Mac.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::dump):
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- (TestRunner::display):
- * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
- * WebKitTestRunner/qt/TestInvocationQt.cpp:
- (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
-
-2012-10-10 Vivek Galatage <vivekgalatage@gmail.com>
-
- [Qt]QtTestBrowser should have default url(google.com) when no command line args
- https://bugs.webkit.org/show_bug.cgi?id=98880
-
- Reviewed by Simon Hausmann.
-
- Making QtTestBrowser use www.google.com as default url when no arguments are passed
-
- * QtTestBrowser/qttestbrowser.cpp:
- (main):
-
-2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Port MiniBrowser to Elementary
- https://bugs.webkit.org/show_bug.cgi?id=98748
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Port MiniBrowser to Elementary to simplify the
- code and make future improvements easier. The
- URL bar is now an Elementary Entry widget and
- supports additional functionality like copy /
- paste.
-
- * CMakeLists.txt:
- * EWebLauncher/url_bar.c:
- (on_urlbar_key_down): Remove WK2-specific code
- now that this file is no longer used by MiniBrowser.
- * MiniBrowser/efl/CMakeLists.txt:
- * MiniBrowser/efl/main.c:
- (_Browser_Window):
- (window_free):
- (window_close):
- (view_focus_set):
- (on_mouse_down):
- (title_set):
- (on_title_changed):
- (on_url_changed):
- (on_close_window):
- (on_progress):
- (quit):
- (on_url_bar_activated):
- (on_url_bar_clicked):
- (on_window_deletion):
- (window_create):
- (elm_main):
- * efl/jhbuild.modules: Add Elementary to jhbuild and bump
- EFL dependencies to 1.7.
-
-2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][SOUP] ResourceError.isCancellation() is not carried over IPC
- https://bugs.webkit.org/show_bug.cgi?id=98882
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Do not display the error page in MiniBrowser if the loading
- error corresponds to a cancellation.
-
- * MiniBrowser/efl/main.c:
- (on_error):
-
-2012-10-09 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
-
- [Qt] WTR: Fix an assert triggered by EventSenderProxy::touchEnd
- https://bugs.webkit.org/show_bug.cgi?id=98735
-
- Reviewed by Kenneth Rohde Christiansen.
-
- ASSERT: "itemForTouchPointId.isEmpty()" in file qt5/qtdeclarative/src/quick/items/qquickwindow.cpp, line 1563
- This assert is caused by QQuickWindow not registering our TouchPointReleased
- since it expects QTouchEvent::touchPointStates() to be filled by the event's sender.
-
- This patch calculates the touchPointStates like QQuickWindowPrivate::touchEventWithPoints does.
-
- * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
- (WTR::EventSenderProxy::sendTouchEvent):
-
-2012-10-10 Allan Sandfeld Jensen <allan.jensen@digia.com>
-
- [Qt] DumpRenderTree needs a beginDragWithFiles implementation
- https://bugs.webkit.org/show_bug.cgi?id=50902
-
- Reviewed by Simon Hausmann.
-
- Implement support for beginDragWithFiles. This function similates dragging without going
- though regular event handling. Which allows us to test effects of dropping files on
- different elements.
-
- * DumpRenderTree/qt/EventSenderQt.cpp:
- (EventSender::EventSender):
- (EventSender::mouseUp):
- (EventSender::mouseMoveTo):
- (EventSender::beginDragWithFiles):
- * DumpRenderTree/qt/EventSenderQt.h:
- (EventSender):
-
-2012-10-10 KwangYong Choi <ky0.choi@samsung.com>
-
- [EFL][WTR][CMake] Add a missing TestNetscapePlugin file
- https://bugs.webkit.org/show_bug.cgi?id=98637
-
- Reviewed by Kenneth Rohde Christiansen.
-
- PluginScriptableObjectOverridesAllProperties.cpp is used during
- plugins/npruntime/overrides-all-properties.html test introduced by r123936.
-
- * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
-
-2012-10-10 Kenichi Ishibashi <bashi@chromium.org>
-
- Update pywebsocket to 0.7.7
- https://bugs.webkit.org/show_bug.cgi?id=98872
-
- Reviewed by Yuta Kitamura.
-
- This version contains server-side permessage-compress extension support.
- We need this version to add tests for permessage-compress extension.
-
- I confirmed all tests under http/tests/websocket passed.
-
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/__init__.py:
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hixie75.py:
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py:
- (parse_frame):
- (FragmentedFrameBuilder.__init__):
- (FragmentedFrameBuilder.build):
- (create_closing_handshake_body):
- (StreamOptions.__init__):
- (Stream.__init__):
- (Stream._receive_frame._receive_bytes):
- (Stream._receive_frame):
- (Stream.receive_filtered_frame):
- (Stream.send_message):
- (Stream._get_message_from_frame):
- (Stream):
- (Stream._process_close_message):
- (Stream._process_ping_message):
- (Stream._process_pong_message):
- (Stream.receive_message):
- (Stream._send_closing_handshake):
- (Stream.get_last_received_opcode):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py:
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py:
- (Dispatcher.transfer_data):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py:
- (ExtensionProcessorInterface.name):
- (DeflateStreamExtensionProcessor):
- (DeflateStreamExtensionProcessor.name):
- (_log_compression_ratio):
- (_log_decompression_ratio):
- (DeflateFrameExtensionProcessor):
- (DeflateFrameExtensionProcessor.name):
- (DeflateFrameExtensionProcessor._outgoing_filter):
- (DeflateFrameExtensionProcessor._incoming_filter):
- (CompressionExtensionProcessorBase):
- (CompressionExtensionProcessorBase.for):
- (CompressionExtensionProcessorBase.__init__):
- (CompressionExtensionProcessorBase.name):
- (CompressionExtensionProcessorBase._get_compression_processor_response):
- (CompressionExtensionProcessorBase.set_compression_processor_hook):
- (PerFrameCompressionExtensionProcessor):
- (PerFrameCompressionExtensionProcessor.__init__):
- (PerFrameCompressionExtensionProcessor.name):
- (PerFrameCompressionExtensionProcessor._lookup_compression_processor):
- (DeflateMessageProcessor):
- (DeflateMessageProcessor.__init__):
- (DeflateMessageProcessor.name):
- (DeflateMessageProcessor.get_extension_response):
- (DeflateMessageProcessor.setup_stream_options):
- (DeflateMessageProcessor.setup_stream_options._OutgoingMessageFilter):
- (DeflateMessageProcessor.setup_stream_options._OutgoingMessageFilter.__init__):
- (DeflateMessageProcessor.setup_stream_options._OutgoingMessageFilter.filter):
- (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter):
- (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter.__init__):
- (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter.decompress_next_message):
- (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter.filter):
- (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter):
- (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter.__init__):
- (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter.set_compression_bit):
- (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter.filter):
- (DeflateMessageProcessor.setup_stream_options._IncomingFrameFilter):
- (DeflateMessageProcessor.setup_stream_options._IncomingFrameFilter.__init__):
- (DeflateMessageProcessor.setup_stream_options._IncomingFrameFilter.filter):
- (DeflateMessageProcessor.set_c2s_max_window_bits):
- (DeflateMessageProcessor.set_c2s_no_context_takeover):
- (DeflateMessageProcessor.enable_outgoing_compression):
- (DeflateMessageProcessor.disable_outgoing_compression):
- (DeflateMessageProcessor._process_incoming_message):
- (DeflateMessageProcessor._process_outgoing_message):
- (DeflateMessageProcessor._process_incoming_frame):
- (DeflateMessageProcessor._process_outgoing_frame):
- (PerMessageCompressionExtensionProcessor):
- (PerMessageCompressionExtensionProcessor.__init__):
- (PerMessageCompressionExtensionProcessor.name):
- (PerMessageCompressionExtensionProcessor._lookup_compression_processor):
- (MuxExtensionProcessor):
- (MuxExtensionProcessor.__init__):
- (MuxExtensionProcessor.name):
- (MuxExtensionProcessor.get_extension_response):
- (MuxExtensionProcessor.setup_stream_options):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py:
- (do_handshake):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py:
- (validate_subprotocol):
- (check_request_line):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/draft75.py: Removed.
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py:
- (Handshaker.do_handshake):
- (Handshaker._set_protocol):
- (Handshaker._create_stream):
- (Handshaker):
- (Handshaker._create_handshake_response):
- (Handshaker._send_handshake):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py:
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/msgutil.py:
- (send_message):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py: Added.
- (MuxUnexpectedException):
- (MuxNotImplementedException):
- (LogicalConnectionClosedException):
- (PhysicalConnectionError):
- (PhysicalConnectionError.__init__):
- (LogicalChannelError):
- (LogicalChannelError.__init__):
- (_encode_channel_id):
- (_encode_number):
- (_create_add_channel_response):
- (_create_drop_channel):
- (_create_flow_control):
- (_create_new_channel_slot):
- (_create_fallback_new_channel_slot):
- (_parse_request_text):
- (_ControlBlock):
- (_ControlBlock.__init__):
- (_MuxFramePayloadParser):
- (_MuxFramePayloadParser.that):
- (_MuxFramePayloadParser.__init__):
- (_MuxFramePayloadParser.read_channel_id):
- (_MuxFramePayloadParser.read_inner_frame):
- (_MuxFramePayloadParser._read_number):
- (_MuxFramePayloadParser._read_size_and_contents):
- (_MuxFramePayloadParser._read_add_channel_request):
- (_MuxFramePayloadParser._read_add_channel_response):
- (_MuxFramePayloadParser._read_flow_control):
- (_MuxFramePayloadParser._read_drop_channel):
- (_MuxFramePayloadParser._read_new_channel_slot):
- (_MuxFramePayloadParser.read_control_blocks):
- (_MuxFramePayloadParser.remaining_data):
- (_LogicalRequest):
- (_LogicalRequest.__init__):
- (_LogicalRequest.is_https):
- (_LogicalConnection):
- (_LogicalConnection.__init__):
- (_LogicalConnection.get_local_addr):
- (_LogicalConnection.get_remote_addr):
- (_LogicalConnection.get_memorized_lines):
- (_LogicalConnection.write):
- (_LogicalConnection.write_control_data):
- (_LogicalConnection.notify_write_done):
- (_LogicalConnection.append_frame_data):
- (_LogicalConnection.read):
- (_LogicalConnection.set_read_state):
- (_LogicalStream):
- (_LogicalStream.interprets):
- (_LogicalStream.__init__):
- (_LogicalStream._create_inner_frame):
- (_LogicalStream._write_inner_frame):
- (_LogicalStream.replenish_send_quota):
- (_LogicalStream.consume_receive_quota):
- (_LogicalStream.send_message):
- (_LogicalStream._receive_frame):
- (_LogicalStream.receive_message):
- (_LogicalStream._send_closing_handshake):
- (_LogicalStream.send_ping):
- (_LogicalStream._send_pong):
- (_LogicalStream.close_connection):
- (_LogicalStream._drain_received_data):
- (_OutgoingData):
- (_OutgoingData.__init__):
- (_PhysicalConnectionWriter):
- (_PhysicalConnectionWriter.__init__):
- (_PhysicalConnectionWriter.put_outgoing_data):
- (_PhysicalConnectionWriter._write_data):
- (_PhysicalConnectionWriter.run):
- (_PhysicalConnectionWriter.stop):
- (_PhysicalConnectionReader):
- (_PhysicalConnectionReader.__init__):
- (_PhysicalConnectionReader.run):
- (_Worker):
- (_Worker.__init__):
- (_Worker.run):
- (_MuxHandshaker):
- (_MuxHandshaker.__init__):
- (_MuxHandshaker._create_stream):
- (_MuxHandshaker._create_handshake_response):
- (_MuxHandshaker._send_handshake):
- (_LogicalChannelData):
- (_LogicalChannelData.__init__):
- (_HandshakeDeltaBase):
- (_HandshakeDeltaBase.that):
- (_HandshakeDeltaBase.__init__):
- (_HandshakeDeltaBase.create_headers):
- (_MuxHandler):
- (_MuxHandler.are):
- (_MuxHandler.__init__):
- (_MuxHandler.start):
- (_MuxHandler.add_channel_slots):
- (_MuxHandler.wait_until_done):
- (_MuxHandler.notify_write_done):
- (_MuxHandler.send_control_data):
- (_MuxHandler.send_data):
- (_MuxHandler._send_drop_channel):
- (_MuxHandler._send_error_add_channel_response):
- (_MuxHandler._create_logical_request):
- (_MuxHandler._do_handshake_for_logical_request):
- (_MuxHandler._add_logical_channel):
- (_MuxHandler._process_add_channel_request):
- (_MuxHandler._process_flow_control):
- (_MuxHandler._process_drop_channel):
- (_MuxHandler._process_control_blocks):
- (_MuxHandler._process_logical_frame):
- (_MuxHandler.dispatch_message):
- (_MuxHandler.notify_worker_done):
- (_MuxHandler.notify_reader_done):
- (_MuxHandler.fail_physical_connection):
- (_MuxHandler.fail_logical_channel):
- (use_mux):
- (start):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py:
- (_StandaloneRequest.get_protocol):
- (_StandaloneRequest):
- (_alias_handlers):
- (WebSocketServer.__init__):
- (WebSocketServer._create_sockets):
- (WebSocketServer.server_bind):
- (WebSocketServer.server_activate):
- (WebSocketRequestHandler.parse_request):
- (_configure_logging):
- (_build_option_parser):
- (_main):
- (_main.if):
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/stream.py:
- * Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py:
- (_Deflater.compress):
- (_RFC1979Deflater.filter):
-
-2012-10-09 Damian Kaleta <dkaleta@apple.com>
-
- extract-localizable-strings script should be able to handle paths to files containing whitespaces.
- https://bugs.webkit.org/show_bug.cgi?id=98844
-
- Reviewed by Dan Bernstein.
-
- * Scripts/extract-localizable-strings: Added ability to handle whitespace.
-
-2012-10-09 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [Cairo] Bump Cairo to fix more canvas/philip tests
- https://bugs.webkit.org/show_bug.cgi?id=97658
-
- Reviewed by Martin Robinson.
-
- Bumping cairo to version 1.12.4 which fixes more canvas/philip tests.
-
- * efl/jhbuild.modules:
- * gtk/jhbuild.modules:
-
-2012-10-09 Julien Chaffraix <jchaffraix@webkit.org>
-
- Unreviewed Chromium Windows build fix after r130823.
-
- * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
- (roleToString): Re-added the 'default' label as some cases are not handled.
-
-2012-10-09 Sadrul Habib Chowdhury <sadrul@chromium.org>
-
- [chromium] Add drop event for plugins.
- https://bugs.webkit.org/show_bug.cgi?id=98827
-
- Reviewed by Adam Barth.
-
- Update the test plugin to receive drop events.
-
- * DumpRenderTree/chromium/TestWebPlugin.cpp:
- (TestWebPlugin::handleDragStatusUpdate):
-
-2012-10-09 Dominic Mazzoni <dmazzoni@google.com>
-
- AX: 5 accessibility tests just need minor tweaks to pass on chromium
- https://bugs.webkit.org/show_bug.cgi?id=98311
-
- Reviewed by Chris Fleizach.
-
- Update roleToString on Chromium to include all missing roles,
- which enables some layout tests to pass.
-
- * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
- (roleToString):
-
-2012-10-09 Dirk Pranke <dpranke@chromium.org>
-
- webkit-patch rebaseline-expectations doesn't work w/o failures specified
- https://bugs.webkit.org/show_bug.cgi?id=98810
-
- Reviewed by Ojan Vafai.
-
- If you try to mark a test as foo.html [ Rebaseline ] it wasn't
- getting picked up for rebaselining; we needed to think the test
- was failing.
-
- * Scripts/webkitpy/layout_tests/models/test_expectations.py:
- (TestExpectations.get_rebaselining_failures):
- * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
- (RebaseliningTest.test_get_rebaselining_failures):
-
-2012-10-09 Daniel Bates <dbates@webkit.org>
-
- VCSUtils.pm doesn't support SVN 1.7 diff files
- <https://bugs.webkit.org/show_bug.cgi?id=80762>
-
- Reviewed by Eric Seidel.
-
- Implement support for the SVN 1.7 diff format.
-
- * Scripts/VCSUtils.pm:
- (parseChunkRange): Modified to support parsing an SVN 1.7 chunk range
- that begins and ends with "##" (e.g. ## -0,0 +1,7 ##). For comparison,
- earlier versions of SVN parsed chunk ranges of the form "@@ -0,0 +1,7 @@".
-
- (parseSvnDiffHeader): Modified to parse an SVN 1.7 binary diff; SVN 1.7
- has an unusual display format for a binary diff. It repeats the first
- two lines of the diff header.
-
- (parseSvnProperty): Modified to ignore both an SVN 1.7 chunk range and
- lines of the form "\ No newline at end of property". SVN 1.7 emits the latter
- message after a property value that doesn't end in a newline.
-
- (parseSvnPropertyValue): Stop parsing an SVN property value when we encounter
- a line of the form "\ No newline at end of property" (emitted by svn diff as of
- SVN 1.7).
-
- * Scripts/webkitperl/VCSUtils_unittest/parseChunkRange.pl:
- - Added the following unit tests:
- "Line count is 0"
- "New line count is 1"
-
- * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffFooter.pl:
- - Added the following unit tests:
- "svn:executable followed by custom property using SVN 1.7 syntax"
- "svn:executable followed by custom property without newline using SVN 1.7 syntax"
-
- * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl:
- - Updated test results for test "binary file".
- - Added unit test "binary file using SVN 1.7 syntax".
-
- * Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl:
- - Added the following unit tests:
- "simple: add svn:executable using SVN 1.7 syntax"
- "simple: delete svn:executable using SVN 1.7 syntax"
- "add svn:mime-type and add svn:executable using SVN 1.7 syntax"
-
- * Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl:
- - Added the following unit tests:
- "singe-line '+' change using SVN 1.7 syntax"
- "single-line '-' change using SVN 1.7 syntax"
-
-2012-10-09 James Robinson <jamesr@chromium.org>
-
- Unreviewed, rolling out r128488.
- http://trac.webkit.org/changeset/128488
- https://bugs.webkit.org/show_bug.cgi?id=96678
-
- The bot is fixed now
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
- (.):
-
-2012-10-09 Zan Dobersek <zandobersek@gmail.com>
-
- XvfbDriver unit test is flaky on Linux builders
- https://bugs.webkit.org/show_bug.cgi?id=98346
-
- Reviewed by Adam Barth.
-
- Temporarily skip the XvfbDriver test case that tests
- the display number of the next free display. The test
- is flaky on Linux builders.
-
- * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
- (XvfbDriverTest.disabled_test_next_free_display):
-
-2012-10-09 Ojan Vafai <ojan@chromium.org>
-
- Don't duplicated build numbers when merging flakiness dashboard JSON
- https://bugs.webkit.org/show_bug.cgi?id=98812
-
- Reviewed by Dirk Pranke.
-
- In general, build numbers are not unique, but we should basically never
- get the same build number uploaded twice in a row. This is a workaround
- for https://bugs.webkit.org/show_bug.cgi?id=97643, which frequently hits this
- because we update results_small.json and timeout updating results.json and then
- we retry the whole request.
-
- * TestResultServer/model/jsonresults.py:
- (JsonResults.merge):
- * TestResultServer/model/jsonresults_unittest.py:
- (JsonResultsTest.test_merge_duplicate_build_number):
-
-2012-10-09 Alexis Menard <alexis@webkit.org>
-
- [GTK] Shadow builds are not working anymore.
- https://bugs.webkit.org/show_bug.cgi?id=98785
-
- Reviewed by Martin Robinson.
-
- When setting WEBKITOUTPUTDIR the build was failing with a python
- error : the os.execve expect three arguments. Also the condition
- to check whether we build the GTK port with jhbuild or not was buggy
- as it was always assuming an in source build. We can use now jhbuildutils
- which has a convenient function to locate the directory where
- the dependencies built with jhbuild are and take into account WEBKITOUTPUTDIR.
- If the Dependencies path does not exist then the build was not done using
- jhbuild so we can fallback to a regular build against system libraries.
-
- * gtk/run-with-jhbuild:
-
-2012-10-08 Simon Fraser <simon.fraser@apple.com>
-
- Remove DRT/WTR implementations of layerTreeAsText
- https://bugs.webkit.org/show_bug.cgi?id=98697
-
- Reviewed by Tim Horton, James Robinson, Alexey Proskuryakov.
-
- Remove code related to layerTreeAsText(), which is now on window.internals.
-
- * DumpRenderTree/TestRunner.cpp:
- (TestRunner::staticFunctions):
- * DumpRenderTree/TestRunner.h:
- (TestRunner):
- * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
- * DumpRenderTree/chromium/DRTTestRunner.cpp:
- (DRTTestRunner::DRTTestRunner):
- * DumpRenderTree/chromium/DRTTestRunner.h:
- (DRTTestRunner):
- * DumpRenderTree/efl/TestRunnerEfl.cpp:
- * DumpRenderTree/gtk/TestRunnerGtk.cpp:
- * DumpRenderTree/mac/TestRunnerMac.mm:
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- * DumpRenderTree/qt/TestRunnerQt.h:
- (TestRunner):
- * DumpRenderTree/win/TestRunnerWin.cpp:
- * DumpRenderTree/wx/TestRunnerWx.cpp:
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
-
-2012-10-09 Zoltan Horvath <zoltan@webkit.org>
-
- Unreviewed. Remove myself from QtWebKit2 subscriptions.
-
- * Scripts/webkitpy/common/config/watchlist:
-
-2012-10-09 Harald Alvestrand <hta@google.com>
-
- Change PeerConnection getStats function to single value local / remote
- elements in RTCStatsReport.
- https://bugs.webkit.org/show_bug.cgi?id=98753
-
- Reviewed by Adam Barth.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::getStats):
-
-2012-10-09 Sadrul Habib Chowdhury <sadrul@chromium.org>
-
- [chromium] Make sure events are transformed correctly for plugins.
- https://bugs.webkit.org/show_bug.cgi?id=89250
-
- Reviewed by Tony Chang.
-
- Update the test plugin to print event details for mouse and gesture events.
-
- * DumpRenderTree/chromium/TestWebPlugin.cpp:
- (printEventDetails):
-
-2012-10-09 Simon Hausmann <simon.hausmann@digia.com>
-
- Unreviewed trivial Qt build fix: Remove stray closing braces from r130758.
-
- * qmake/mkspecs/features/features.prf:
-
-2012-10-09 Simon Hausmann <simon.hausmann@digia.com>
-
- [Qt] Clean up Qt module detection
-
- Reviewed by Tor Arne Vestbø.
-
- Replace the use of MOBILITY_CONFIG (not supported anymore) with modern use of haveQtModule.
-
- * qmake/mkspecs/features/features.prf:
-
-2012-10-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [GTK] Respect WEBKITOUTPUTDIR in run-with-jhbuild.
- https://bugs.webkit.org/show_bug.cgi?id=98732
-
- Reviewed by Gustavo Noronha Silva.
-
- Follow-up to r113066: if the WEBKITOUTPUTDIR environment variable
- was used when running update-webkitgtk-libs,
- WebKitBuild/Dependencies will not exist, so we now check its
- contents first and then fall back to WebKitBuild/.
-
- * gtk/run-with-jhbuild:
-
-2012-10-09 Zan Dobersek <zandobersek@gmail.com>
-
- Unreviewed GTK gardening.
-
- Skipping the accept-policy test in TestCookieManager API test that's
- currently failing. The test failure is covered by
- https://bugs.webkit.org/show_bug.cgi?id=98738.
-
- * Scripts/run-gtk-tests:
- (TestRunner):
-
-2012-10-09 Laszlo Gombos <l.gombos@samsung.com>
-
- [Qt] Remove redundant JAVASCRIPTCORE_JIT variable
- https://bugs.webkit.org/show_bug.cgi?id=50000
-
- Reviewed by Simon Hausmann.
-
- Use ENABLE_JIT instead.
-
- * qmake/mkspecs/features/valgrind.prf:
-
-2012-10-08 Kiran Muppala <cmuppala@apple.com>
-
- Throttle DOM timers on hidden pages.
- https://bugs.webkit.org/show_bug.cgi?id=98474
-
- Reviewed by Maciej Stachowiak.
-
- Implement testRunner.setPageVisibility on mac for testing throttling
- of timers on hidden pages using DumpRenderTree.
-
- * DumpRenderTree/mac/Configurations/Base.xcconfig:
- Fix build error on mac-ews bot. Add JSC copy of ICU headers to search path.
-
- * DumpRenderTree/mac/TestRunnerMac.mm:
- (TestRunner::resetPageVisibility):
- (TestRunner::setPageVisibility):
-
-2012-10-08 Dirk Pranke <dpranke@chromium.org>
-
- results.html and garden-o-matic are ignoring IMAGE failures when expected to FAIL
- https://bugs.webkit.org/show_bug.cgi?id=98706
-
- Reviewed by Ojan Vafai.
-
- FAIL is supposed to map onto Failure which is supposed to map
- onto the old [ TEXT, IMAGE_PLUS_TEXT, AUDIO ] mapping.
- results.html was including IMAGE in this and garden-o-matic was
- including CRASH and TIMEOUT as well :(.
-
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results_unittests.js:
-
-2012-10-08 Ryuan Choi <ryuan.choi@samsung.com>
-
- [EFL] Build ControlTheme only when necessary
- https://bugs.webkit.org/show_bug.cgi?id=98519
-
- Reviewed by Eric Seidel.
-
- * EWebLauncher/ControlTheme/CMakeLists.txt:
- Added custom command keyword not to build ControlTheme every time.
- In addition, removed `ALL` keyword because targets, which use ControlTheme,
- already have dependency.
-
-2012-10-08 Peter Rybin <peter.rybin@gmail.com>
-
- Do not swallow fatal messages in qt/DumpRenderTree
- https://bugs.webkit.org/show_bug.cgi?id=98211
-
- Reviewed by Eric Seidel.
-
- Fix condition in message type filtering.
-
- * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
- (messageHandler):
-
-2012-10-08 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
-
- Unreviewed. Moving myself from Committer to Reviewer list.
- http://lists.webkit.org/pipermail/webkit-dev/2012-October/022460.html
-
- * Scripts/webkitpy/common/config/committers.py:
-
-2012-10-08 Dirk Pranke <dpranke@chromium.org>
-
- nrwt: [chromium] run http tests in parallel on bigger machines
- https://bugs.webkit.org/show_bug.cgi?id=98562
-
- Reviewed by Eric Seidel.
-
- The "locked tests" shard (which includes the http tests and the
- perf tests) is the long pole on machines where we have 4 or more
- workers, so we should start making sure that
- we can run http tests in parallel, following the normal sharding
- rules (all tests in the same directory are in the same shard by
- default). We should still probably limit the number of workers
- hitting the web server in parallel where we can; a heuristic of
- no more than 25% of them seems okay for a start. This will
- likely only affect developer workstations and a couple of bots
- at first, so should be low risk and a good reward.
-
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.default_max_locked_shards):
- * Scripts/webkitpy/layout_tests/port/chromium.py:
- (ChromiumPort.default_max_locked_shards):
- * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
- (ChromiumPortTestCase.test_default_max_locked_shards):
- * Scripts/webkitpy/layout_tests/port/port_testcase.py:
- (PortTestCase.test_default_max_locked_shards):
- * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
- (_set_up_derived_options):
- (parse_args):
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (MainTest.test_max_locked_shards):
-
-2012-10-08 Zan Dobersek <zandobersek@gmail.com>
-
- GTK port should warn if bug modifier is missing in TestExpectations
- https://bugs.webkit.org/show_bug.cgi?id=98678
-
- Reviewed by Dirk Pranke.
-
- Reimplement the warn_if_bug_missing_in_test_expectations method in
- GtkPort, returning True for producing a warning in such cases.
-
- * Scripts/webkitpy/layout_tests/port/gtk.py:
- (GtkPort.warn_if_bug_missing_in_test_expectations):
-
-2012-10-08 Ryuan Choi <ryuan.choi@samsung.com>
-
- [EFL][DRT] Switch default backing store to single
- https://bugs.webkit.org/show_bug.cgi?id=98591
-
- Reviewed by Eric Seidel.
-
- There are two backing stores for WebKit/Efl, Single Backing Store(SBS) and
- Tiled Backing Store(TBS), and DRT/Efl has used TBS.
- But, TBS is not suitable to run pixel tests because it does not have a good way
- to render mock scrollbars well.
-
- So, this patch changes the default backing store to SBS.
- In addition, this changes the environment variable from DRT_USE_SINGLE_BACKING_STORE
- to DRT_USE_TILED_BACKING_STORE.
-
- * DumpRenderTree/efl/DumpRenderTreeView.cpp:
- (shouldUseTiledBackingStore):
- (chooseAndInitializeAppropriateSmartClass):
-
-2012-10-08 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [WK2][WTR] WebKitTestRunner needs testRunner.dispatchPendingLoadRequests
- https://bugs.webkit.org/show_bug.cgi?id=98638
-
- Reviewed by Eric Seidel.
-
- Add implementation for testRunner.dispatchPendingLoadRequests in
- WebKitTestRunner.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::dispatchPendingLoadRequests):
- (WTR):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
-
-2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add support for window.close in Minibrowser
- https://bugs.webkit.org/show_bug.cgi?id=98667
-
- Reviewed by Laszlo Gombos.
-
- When calling window.close() from JavaScript, MiniBrowser
- now closes the given window.
-
- * MiniBrowser/efl/main.c:
- (window_close):
- (on_ecore_evas_delete):
- (on_close_window):
- (window_create):
-
-2012-10-08 Ojan Vafai <ojan@chromium.org>
-
- Properly strip new tests from the test results json if they are pass/nodata/skip.
- https://bugs.webkit.org/show_bug.cgi?id=98669
-
- Reviewed by Eric Seidel.
-
- In _merge_json, we had a codepath that didn't call _normalize_results_json
- for tests that aren't already in the aggregated results.
- Instead, now do all the merging first and then normalize the aggregated results.
-
- * TestResultServer/model/jsonresults.py:
- (JsonResults._merge_json):
- (JsonResults._merge_tests):
- (JsonResults._normalize_results):
- (JsonResults):
- (JsonResults._should_delete_leaf):
- * TestResultServer/model/jsonresults_unittest.py:
- Removed test_merge_build_directory_hierarchy_old_version since there is
- no longer any version 3 json to support.
- (JsonResultsTest.test_merge_remove_new_test):
- (JsonResultsTest.test_merge_prune_extra_results_with_new_result_of_same_type):
-
-2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Simplify frame flattening support in MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=98657
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Simplify frame flattening support code in MiniBrowser to
- avoid passing the setting around to window_create()
- function().
-
- * MiniBrowser/efl/main.c:
- (on_key_down):
- (on_new_window):
- (window_create):
- (main):
-
-2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL] Use Ctrl+n shortcut to create a new window in MiniBrowser / EWebLauncher
- https://bugs.webkit.org/show_bug.cgi?id=98655
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Use "Ctrl+n" shortcut instead of "F9" to open a new window in
- MiniBrowser and EWebLauncher. This is the shortcut that is
- commonly used for this action.
-
- * EWebLauncher/main.c:
- (on_key_down):
- * MiniBrowser/efl/main.c:
- (on_key_down):
-
-2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add support for window.create in Minibrowser
- https://bugs.webkit.org/show_bug.cgi?id=98649
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Calling window.create() from JavaScript now creates a
- new window in Minibrowser, as directed.
-
- * MiniBrowser/efl/main.c:
- (on_new_window):
- (window_create):
-
-2012-10-08 Andreas Kling <kling@webkit.org>
-
- Using float/double as WTF hash table key is unreliable.
- <http://webkit.org/b/98627>
-
- Reviewed by Geoffrey Garen.
-
- Add a test case checking that using double as the hash table key type won't
- have problems distinguishing between keys that are considered equal by operator==
- but have different binary representations.
-
- * TestWebKitAPI/Tests/WTF/HashMap.cpp:
- (TestDoubleHashTraits):
-
-2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Use URL instead of URI in the API
- https://bugs.webkit.org/show_bug.cgi?id=98643
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Update Minibrowser to reflect API changes. We now
- use URL instead of URI in WK2 EFL API.
-
- * EWebLauncher/url_bar.c:
- (on_urlbar_key_down):
- * MiniBrowser/efl/CMakeLists.txt:
- * MiniBrowser/efl/main.c:
- (on_url_changed):
- (window_create):
-
-2012-10-08 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] Reenable plugin tests
- https://bugs.webkit.org/show_bug.cgi?id=98528
-
- Reviewed by Csaba Osztrogonác.
-
- Uncomment this function so we can pick up the test plugin.
- It was commented out because of https://bugs.webkit.org/show_bug.cgi?id=86620
- and that bug seems to be fixed now.
-
- * WebKitTestRunner/qt/TestControllerQt.cpp:
- (WTR::TestController::initializeTestPluginDirectory):
-
-2012-10-08 Jinwoo Song <jinwoo7.song@samsung.com>
-
- [EFL][WK2] Support multiple window creation for MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=97884
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Implement the multiple window creation for MiniBrowser and bind the 'F9' key for opening a new window.
- Also, refactored MiniBrowser codes according to EFL coding style.
-
- * MiniBrowser/efl/main.c:
- (_Browser_Window):
- (window_free):
- (main_signal_exit):
- (on_ecore_evas_delete):
- (on_ecore_evas_resize):
- (on_key_down):
- (on_title_changed):
- (on_url_changed):
- (on_progress):
- (window_create):
- (main):
-
-2012-10-07 Seokju Kwon <seokju.kwon@samsung.com>
-
- [EFL] Add Web Inspector to EWebLauncher
- https://bugs.webkit.org/show_bug.cgi?id=91718
-
- Reviewed by Gyuyoung Kim.
-
- Implementation of Web Inspector in EWebLauncher.
- The Web Inspector can be opened or closed by pressing ctrl+i on web page.
-
- * EWebLauncher/main.c:
- (on_browser_ecore_evas_resize):
- (on_web_inspector_ecore_evas_resize):
- (on_key_down):
- (on_web_inspector_view_create):
- (on_web_inspector_view_close):
- (on_web_inspector_view_destroyed):
- (browserCreate):
- (webInspectorCreate):
- (windowCreate):
- (closeWindow):
- (main_signal_exit):
- (parseUserArguments):
-
-2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
-
- Rename first/second to key/value in HashMap iterators
- https://bugs.webkit.org/show_bug.cgi?id=82784
-
- Reviewed by Eric Seidel.
-
- * DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
- (MockWebSpeechInputController::addMockRecognitionResult):
- * DumpRenderTree/chromium/NotificationPresenter.cpp:
- (NotificationPresenter::simulateClick):
- (NotificationPresenter::show):
- * DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp:
- (CppBoundClass::~CppBoundClass):
- (CppBoundClass::invoke):
- (CppBoundClass::getProperty):
- (CppBoundClass::setProperty):
- (CppBoundClass::bindCallback):
- (CppBoundClass::bindProperty):
- * DumpRenderTree/chromium/WebPreferences.cpp:
- (applyFontMap):
- * DumpRenderTree/chromium/WebViewHost.cpp:
- (WebViewHost::printResourceDescription):
- * DumpRenderTree/mac/TestRunnerMac.mm:
- (worldIDForWorld):
- (TestRunner::evaluateScriptInIsolatedWorld):
- * DumpRenderTree/win/AccessibilityControllerWin.cpp:
- (AccessibilityController::~AccessibilityController):
- (AccessibilityController::winNotificationReceived):
- * DumpRenderTree/win/ResourceLoadDelegate.cpp:
- (ResourceLoadDelegate::descriptionSuitableForTestResult):
- * DumpRenderTree/win/TestRunnerWin.cpp:
- (worldIDForWorld):
- (TestRunner::evaluateScriptInIsolatedWorld):
- * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp:
- (TestWebKitAPI::DOMWindowExtensionBasic::willDestroyPage):
- * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp:
- (TestWebKitAPI::DOMWindowExtensionNoCache::willDestroyPage):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::worldIDForWorld):
- (WTR::TestRunner::evaluateScriptInIsolatedWorld):
-
-2012-10-07 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- Unreviewed, rolling out r130596.
- http://trac.webkit.org/changeset/130596
- https://bugs.webkit.org/show_bug.cgi?id=98616
-
- Broke build bots without IPV6 support
-
- * Scripts/webkitpy/common/system/platforminfo_mock.py:
- (MockPlatformInfo.is_cygwin):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.baseline_version_dir):
- (Port.to.start_websocket_server):
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_operating_system):
- (PortTest.test_build_path):
- * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
- (LayoutTestApacheHttpd):
- (LayoutTestApacheHttpd.__init__):
-
-2012-10-07 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- webkitpy: Pass the `Listen' Apache directive from Apache, not the httpd.conf files.
- https://bugs.webkit.org/show_bug.cgi?id=98602
-
- Reviewed by Eric Seidel.
-
- Unify all the different `Listen' directives present in the several
- httpd.conf files we have in LayoutTests/http/conf. For one, we
- were already passing `Listen 127.0.0.1:8000' via webkitpy before,
- and opening the other ports from the conf files.
-
- The configuration files differed mostly in the way they handled
- IPV6 ports. Some of them did not listen to IPV6 ports because the
- systems which used them sometimes did not have IPV6 support. The
- `http_server_supports_ipv6' method has been added to Port to
- address that. cygwin, on its turn, still seems to use Apache 1.3,
- which does not support IPV6 at all; the newly-added method has a
- special case for that.
-
- * Scripts/webkitpy/common/system/platforminfo_mock.py:
- (MockPlatformInfo.is_cygwin):
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.baseline_version_dir):
- (Port.to.start_websocket_server):
- (Port.to):
- (Port.to.http_server_supports_ipv6):
- * Scripts/webkitpy/layout_tests/port/base_unittest.py:
- (PortTest.test_http_server_supports_ipv6):
- (PortTest.test_build_path):
- * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
- (LayoutTestApacheHttpd):
- (LayoutTestApacheHttpd.__init__):
-
-2012-10-05 Simon Fraser <simon.fraser@apple.com>
-
- Attempt to fix the SnowLeopard build to making the implementation of
- -isPaginated come before its use.
-
- * MiniBrowser/mac/WK1BrowserWindowController.m:
- (-[WK1BrowserWindowController reload:]):
- (-[WK1BrowserWindowController forceRepaint:]):
- (-[WK1BrowserWindowController goBack:]):
- (-[WK1BrowserWindowController goForward:]):
- (-[WK1BrowserWindowController isPaginated]):
-
-2012-10-05 Simon Fraser <simon.fraser@apple.com>
-
- Provide a way to run WebKit1
- https://bugs.webkit.org/show_bug.cgi?id=98568
-
- Reviewed by Tim Horton.
-
- Make it possible to create both WebKit1 and WebKit2 windows in MiniBrowser.
-
- Turn BrowserWindowController into a base class; subclassed by
- WK1BrowserWindowController and WK2BrowserWindowController, each of
- which implement the BrowserController protocol.
-
- Use Command-N to get a WebKit1 window, and Command-Option-N to
- get a WK2 window. Also add "Open Location" to focus the URL bar,
- and code to add an http:// if missing.
-
- Hook up window title callbacks; append " [WK1/2]" to window title
- as appropriate.
-
- * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
- * MiniBrowser/mac/AppDelegate.m:
- (-[BrowserAppDelegate newWindow:]):
- (-[BrowserAppDelegate openPanelDidEnd:returnCode:contextInfo:]):
- * MiniBrowser/mac/BrowserWindowController.h:
- * MiniBrowser/mac/BrowserWindowController.m:
- (-[BrowserWindowController initWithWindow:]):
- (-[BrowserWindowController windowDidLoad]):
- (-[BrowserWindowController openLocation:]):
- (-[BrowserWindowController loadURLString:]):
- (-[BrowserWindowController applicationTerminating]):
- (-[BrowserWindowController addProtocolIfNecessary:]):
- * MiniBrowser/mac/MainMenu.xib:
- * MiniBrowser/mac/WK1BrowserWindowController.h: Copied from Tools/MiniBrowser/mac/BrowserWindowController.h.
- (WebView):
- * MiniBrowser/mac/WK1BrowserWindowController.m: Added.
- (-[WK1BrowserWindowController awakeFromNib]):
- (-[WK1BrowserWindowController dealloc]):
- (-[WK1BrowserWindowController loadURLString:]):
- (-[WK1BrowserWindowController fetch:]):
- (-[WK1BrowserWindowController showHideWebView:]):
- (-[WK1BrowserWindowController removeReinsertWebView:]):
- (-[WK1BrowserWindowController validateMenuItem:]):
- (-[WK1BrowserWindowController reload:]):
- (-[WK1BrowserWindowController forceRepaint:]):
- (-[WK1BrowserWindowController goBack:]):
- (-[WK1BrowserWindowController goForward:]):
- (-[WK1BrowserWindowController validateUserInterfaceItem:]):
- (-[WK1BrowserWindowController validateToolbar]):
- (-[WK1BrowserWindowController windowShouldClose:]):
- (-[WK1BrowserWindowController windowWillClose:]):
- (-[WK1BrowserWindowController applicationTerminating]):
- (-[WK1BrowserWindowController currentZoomFactor]):
- (-[WK1BrowserWindowController canZoomIn]):
- (-[WK1BrowserWindowController zoomIn:]):
- (-[WK1BrowserWindowController canZoomOut]):
- (-[WK1BrowserWindowController zoomOut:]):
- (-[WK1BrowserWindowController canResetZoom]):
- (-[WK1BrowserWindowController resetZoom:]):
- (-[WK1BrowserWindowController toggleZoomMode:]):
- (-[WK1BrowserWindowController isPaginated]):
- (-[WK1BrowserWindowController togglePaginationMode:]):
- (-[WK1BrowserWindowController find:]):
- (-[WK1BrowserWindowController dumpSourceToConsole:]):
- (-[WK1BrowserWindowController webView:didStartProvisionalLoadForFrame:]):
- (-[WK1BrowserWindowController webView:didReceiveTitle:forFrame:]):
- * MiniBrowser/mac/WK2BrowserWindowController.h: Copied from Tools/MiniBrowser/mac/BrowserWindowController.h.
- * MiniBrowser/mac/WK2BrowserWindowController.m: Copied from Tools/MiniBrowser/mac/BrowserWindowController.m.
- (-[WK2BrowserWindowController initWithContext:pageGroup:]):
- (-[WK2BrowserWindowController dealloc]):
- (-[WK2BrowserWindowController fetch:]):
- (-[WK2BrowserWindowController showHideWebView:]):
- (-[WK2BrowserWindowController removeReinsertWebView:]):
- (-[WK2BrowserWindowController validateMenuItem:]):
- (-[WK2BrowserWindowController reload:]):
- (-[WK2BrowserWindowController forceRepaint:]):
- (-[WK2BrowserWindowController goBack:]):
- (-[WK2BrowserWindowController goForward:]):
- (-[WK2BrowserWindowController validateUserInterfaceItem:]):
- (-[WK2BrowserWindowController validateToolbar]):
- (-[WK2BrowserWindowController windowShouldClose:]):
- (-[WK2BrowserWindowController windowWillClose:]):
- (-[WK2BrowserWindowController applicationTerminating]):
- (-[WK2BrowserWindowController currentZoomFactor]):
- (-[WK2BrowserWindowController setCurrentZoomFactor:]):
- (-[WK2BrowserWindowController canZoomIn]):
- (-[WK2BrowserWindowController zoomIn:]):
- (-[WK2BrowserWindowController canZoomOut]):
- (-[WK2BrowserWindowController zoomOut:]):
- (-[WK2BrowserWindowController canResetZoom]):
- (-[WK2BrowserWindowController resetZoom:]):
- (-[WK2BrowserWindowController toggleZoomMode:]):
- (-[WK2BrowserWindowController isPaginated]):
- (-[WK2BrowserWindowController togglePaginationMode:]):
- (-[WK2BrowserWindowController dumpSourceToConsole:]):
- (didStartProvisionalLoadForFrame):
- (didReceiveServerRedirectForProvisionalLoadForFrame):
- (didFailProvisionalLoadWithErrorForFrame):
- (didCommitLoadForFrame):
- (didFinishDocumentLoadForFrame):
- (didFinishLoadForFrame):
- (didFailLoadWithErrorForFrame):
- (didSameDocumentNavigationForFrame):
- (didReceiveTitleForFrame):
- (didFirstLayoutForFrame):
- (didFirstVisuallyNonEmptyLayoutForFrame):
- (didRemoveFrameFromHierarchy):
- (didDisplayInsecureContentForFrame):
- (didRunInsecureContentForFrame):
- (didDetectXSSForFrame):
- (didStartProgress):
- (didChangeProgress):
- (didFinishProgress):
- (didBecomeUnresponsive):
- (didBecomeResponsive):
- (processDidExit):
- (didChangeBackForwardList):
- (decidePolicyForNavigationAction):
- (decidePolicyForNewWindowAction):
- (decidePolicyForResponse):
- (createNewPage):
- (showPage):
- (closePage):
- (runJavaScriptAlert):
- (runJavaScriptConfirm):
- (runJavaScriptPrompt):
- (setStatusText):
- (mouseDidMoveOverElement):
- (getWindowFrame):
- (setWindowFrame):
- (runBeforeUnloadConfirmPanel):
- (runOpenPanel):
- (-[WK2BrowserWindowController awakeFromNib]):
- (-[WK2BrowserWindowController didStartProgress]):
- (-[WK2BrowserWindowController didChangeProgress:]):
- (-[WK2BrowserWindowController didFinishProgress]):
- (-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
- (-[WK2BrowserWindowController didStartProvisionalLoadForFrame:]):
- (-[WK2BrowserWindowController didReceiveServerRedirectForProvisionalLoadForFrame:]):
- (-[WK2BrowserWindowController didFailProvisionalLoadWithErrorForFrame:]):
- (-[WK2BrowserWindowController didFailLoadWithErrorForFrame:]):
- (-[WK2BrowserWindowController didSameDocumentNavigationForFrame:]):
- (-[WK2BrowserWindowController didCommitLoadForFrame:]):
- (-[WK2BrowserWindowController loadURLString:]):
- (-[WK2BrowserWindowController performFindPanelAction:]):
- (-[WK2BrowserWindowController find:]):
-
-2012-10-05 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
-
- [WK2][WTR] WebKitTestRunner needs testRunner.setSerializeHTTPLoads
- https://bugs.webkit.org/show_bug.cgi?id=98524
-
- Reviewed by Alexey Proskuryakov.
-
- Add implementation for testRunner.setSerializeHTTPLoads in
- WebKitTestRunner.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::beginTesting):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::setSerializeHTTPLoads):
- (WTR):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
-
-2012-10-05 Richard Larocque <rlarocque@chromium.org>
-
- TestResultsServer does not display sync_integration_tests results
- https://bugs.webkit.org/show_bug.cgi?id=98551
-
- Reviewed by Ojan Vafai.
-
- Allow builders whose name contains "Sync" to pass through the
- isChromiumWebkitDepsTestRunner filter.
-
- The test expectations in flakiness_dashboard_unittests.js have been
- updated to match the new behaviour.
-
- * TestResultServer/static-dashboards/builders.js:
- (isChromiumDepsGTestRunner):
-
-2012-10-05 Roger Fong <roger_fong@apple.com>
-
- Tests in webkitpy involving child processes are flaky.
- Skipping run_webkit_tests_integrationtest.py.
- https://bugs.webkit.org/show_bug.cgi?id=98559
-
- Reviewed by Dirk Pranke.
-
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (MainTest.test_verbose_in_child_processes):
-
-2012-10-05 Zan Dobersek <zandobersek@gmail.com>
-
- [Gtk] fast/xsl/xslt-missing-namespace-in-xslt.xml is failing on the 64-bit Debug builder
- https://bugs.webkit.org/show_bug.cgi?id=91009
-
- Reviewed by Martin Robinson.
-
- Include libxml2 into the jhbuild module. Version 2.8.0 introduces
- a more correct (but not completely correct) behavior in the
- fast/xsl/xslt-missing-namespace-in-xslt.html test.
-
- * gtk/jhbuild.modules:
-
-2012-10-05 Rob Buis <rbuis@rim.com>
-
- [BlackBerry] Implement TestRunner.setMockDeviceOrientation
- https://bugs.webkit.org/show_bug.cgi?id=98542
-
- Reviewed by Antonio Gomes.
-
- PR 120681
-
- This fixes tests in fast/dom/DeviceOrientation.
-
- * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
- (TestRunner::setMockDeviceOrientation):
-
-2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][WKTR] Implement UIClient focus callbacks in WebKitTestRunner
- https://bugs.webkit.org/show_bug.cgi?id=98256
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Implement UIClient's focus callbacks for the main page in
- WebKitTestRunner.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::focus):
- (WTR::TestController::initialize):
-
-2012-10-05 Mark Hahnenberg <mhahnenberg@apple.com>
-
- JSC should have a way to gather and log Heap memory use and pause times
- https://bugs.webkit.org/show_bug.cgi?id=98431
-
- Reviewed by Geoffrey Garen.
-
- * DumpRenderTree/mac/DumpRenderTree.mm:
- (main): Added a check as to whether we should dump our JSC Heap statistics on exit.
-
-2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Fix mktemp() compilation warning in Minibrowser
- https://bugs.webkit.org/show_bug.cgi?id=98493
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Fix wrong mktemp usage causing a compilation warning
- in MiniBrowser.
-
- * MiniBrowser/efl/main.c:
- (on_download_request):
-
-2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][WKTR] Avoid duplication of UIClient callbacks for main page and other pages
- https://bugs.webkit.org/show_bug.cgi?id=98503
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Avoid the need for duplicating UIClient callbacks for main page
- and other pages by passing the view as clientInfo
- for those callbacks.
-
- Previously, callbacks for the main page were passed the
- TestController as clientInfo while the callbacks for other pages
- were passed the PlatformWebView as clientInfo. This was error prone
- and leads to useless code duplication.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::getWindowFrame):
- (WTR::setWindowFrame):
- (WTR::runBeforeUnloadConfirmPanel):
- (WTR::TestController::createOtherPage):
- (WTR::TestController::initialize):
- (WTR::TestController::decidePolicyForNotificationPermissionRequest):
-
-2012-10-05 Sadrul Habib Chowdhury <sadrul@chromium.org>
-
- [chromium] Allow dragging into plugins.
- https://bugs.webkit.org/show_bug.cgi?id=98277
-
- Reviewed by Tony Chang.
-
- Update the TestWebPlugin to receive drag events and print them out.
-
- * DumpRenderTree/chromium/TestWebPlugin.cpp:
- (TestWebPlugin::handleDragStatusUpdate):
- * DumpRenderTree/chromium/TestWebPlugin.h:
- (TestWebPlugin):
-
-2012-10-05 Jongseok Yang <js45.yang@samsung.com>
-
- [EFL][WK2] Remove "web" word from ewk_web_error APIs
- https://bugs.webkit.org/show_bug.cgi?id=97886
-
- Reviewed by Gyuyoung Kim.
-
- Remove "web" word from ewk_web_error APIs.
- "web" word was redundant because "ewk" means "EFL WebKit" and WK APIs for error does not have "web" word.
-
- * MiniBrowser/efl/main.c:
- (on_error):
-
-2012-10-05 Csaba Osztrogonác <ossy@webkit.org>
-
- [Qt] Enable CSS compositing by default
- https://bugs.webkit.org/show_bug.cgi?id=98490
-
- Reviewed by Simon Hausmann.
-
- * qmake/mkspecs/features/features.pri:
-
-2012-10-05 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r130466.
- http://trac.webkit.org/changeset/130466
- https://bugs.webkit.org/show_bug.cgi?id=98495
-
- It made 12 tests crash on Qt-WK2 (Requested by Ossy on
- #webkit).
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::focus):
- (WTR::TestController::initialize):
-
-2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL] Fix window resizing / moving in WK1 and WKTR
- https://bugs.webkit.org/show_bug.cgi?id=98486
-
- Reviewed by Gyuyoung Kim.
-
- Fix PlatformWebView::windowFrame() and
- PlatformWebView::setWindowFrame() in EFL's WKTR so
- that it resizes / moves the window, not the view.
-
- The new code matches the implementation in EwkView's
- UIClient.
-
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::PlatformWebView::windowFrame):
- (WTR::PlatformWebView::setWindowFrame):
-
-2012-10-04 KyungTae Kim <ktf.kim@samsung.com>
-
- [EFL][WK2] Fix destination path when download with suggested filename on the Minibrowser
- https://bugs.webkit.org/show_bug.cgi?id=98334
-
- Reviewed by Gyuyoung Kim.
-
- Add callback functions for download requests to Minibrowser to set the destination path for download.
- Set the destination path with suggested file name as (destination folder) + (suggested file name).
- The 'destination folder' should be a specific folder user selected, but is set to '/tmp' for now.
-
- Additionally, for printing out the download status,
- use the info macro and set the verbose variable to 1 to enable it.
-
- * MiniBrowser/efl/main.c:
- (on_download_request):
- (on_download_finished):
- (on_download_failed):
- (browserCreate):
-
-2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][WKTR] Implement UIClient focus callbacks in WebKitTestRunner
- https://bugs.webkit.org/show_bug.cgi?id=98256
-
- Reviewed by Kenneth Rohde Christiansen.
-
- Implement UIClient's focus callbacks in WebKitTestRunner.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::focus):
- (WTR::TestController::initialize):
-
-2012-10-04 Rik Cabanier <cabanier@adobe.com>
-
- Turn Compositing on by default in WebKit build
- https://bugs.webkit.org/show_bug.cgi?id=98315
-
- Reviewed by Simon Fraser.
-
- enable -webkit-blend-mode on trunk.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-10-04 Ryuan Choi <ryuan.choi@samsung.com>
-
- [EFL][WK2] Add APIs to get/set the frame flattening.
- https://bugs.webkit.org/show_bug.cgi?id=95982
-
- Reviewed by Gyuyoung Kim.
-
- * MiniBrowser/efl/main.c: Added frame flattening option to test.
- (browserCreate):
- (main):
-
-2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL] Add libxml 2.8.0 to jhbuild
- https://bugs.webkit.org/show_bug.cgi?id=98418
-
- Reviewed by Laszlo Gombos.
-
- Add libxml 2.8.0 to EFL's jhbuild for consistency.
-
- * efl/jhbuild.modules:
-
-2012-10-03 Benjamin Poulain <bpoulain@apple.com>
-
- [WK2] Support all attributes of GeolocationPosition
- https://bugs.webkit.org/show_bug.cgi?id=98212
-
- Reviewed by Sam Weinig.
-
- Expand WebKitTestRunner and DumpRenderTree to test all the attributes
- of GeolocationPosition.
-
- * DumpRenderTree/TestRunner.cpp:
- (setMockGeolocationPositionCallback):
- * DumpRenderTree/TestRunner.h:
- (TestRunner):
- * DumpRenderTree/efl/TestRunnerEfl.cpp:
- (TestRunner::setMockGeolocationPosition):
- * DumpRenderTree/gtk/TestRunnerGtk.cpp:
- (TestRunner::setMockGeolocationPosition):
- * DumpRenderTree/mac/TestRunnerMac.mm:
- (TestRunner::setMockGeolocationPosition):
- * DumpRenderTree/win/TestRunnerWin.cpp:
- (TestRunner::setMockGeolocationPosition):
- * DumpRenderTree/wx/TestRunnerWx.cpp:
- (TestRunner::setMockGeolocationPosition):
- * WebKitTestRunner/GeolocationProviderMock.cpp:
- (WTR::GeolocationProviderMock::setPosition):
- * WebKitTestRunner/GeolocationProviderMock.h:
- (GeolocationProviderMock):
- * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
- (_platformTypeVariableDeclaration):
- Use a proper constructor for the JSValueRef, it is an opaque type, we are not supposed
- to build the pointer outself.
- This is necessary to support optional JSValueRef properly.
-
- * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::setMockGeolocationPosition):
- * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
- (InjectedBundle):
- * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
- (WTR::TestRunner::setMockGeolocationPosition):
- * WebKitTestRunner/InjectedBundle/TestRunner.h:
- (TestRunner):
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::setMockGeolocationPosition):
- * WebKitTestRunner/TestController.h:
- (TestController):
- * WebKitTestRunner/TestInvocation.cpp:
- (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
-
-2012-10-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- Make the Xvfb driver recognize `X' as a valid X server binary.
- https://bugs.webkit.org/show_bug.cgi?id=98434
-
- Reviewed by Dirk Pranke.
-
- The X server binary can also be called `X', so account for that
- possibility in the _next_free_display regexp.
-
- Additionally, make the regular expression require at least one
- space character after the `ps comm' part.
-
- * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
- (XvfbDriver._next_free_display):
- * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
- (XvfbDriverTest.test_next_free_display):
-
-2012-10-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- webkitpy: Accept WEBKITOUTPUTDIR in Port._setup_environ_for_server.
- https://bugs.webkit.org/show_bug.cgi?id=98436
-
- Reviewed by Dirk Pranke.
-
- The Xvfb driver (ab)uses Port._setup_environ_for_server() to set
- the environment for the server process, and the WEBKITOUTPUTDIR
- environment variable was not being passed through, causing the
- build directory to be wrongfully set to WebKitBuild/ all the time.
-
- * Scripts/webkitpy/layout_tests/port/base.py:
- (Port.to.setup_environ_for_server):
-
-2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL][WK2] Add setting to allow file access from file:// URLs
- https://bugs.webkit.org/show_bug.cgi?id=98121
-
- Reviewed by Laszlo Gombos.
-
- Allow file access from file:// URLs by default in Minibrowser
- to facilitate testing.
-
- * MiniBrowser/efl/main.c:
- (browserCreate):
-
-2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL] Run unit tests with Xvfb
- https://bugs.webkit.org/show_bug.cgi?id=98389
-
- Reviewed by Laszlo Gombos.
-
- Run EFL unit tests with Xvfb, similarly to GTK port.
-
- * Scripts/run-efl-tests:
-
-2012-10-04 Adrian Perez de Castro <aperez@igalia.com>
-
- [GTK] Enable inspector by default in GtkLauncher/MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=98333
-
- Reviewed by Xan Lopez.
-
- Both MiniBrowser and GtkLauncher are tools for testing, so in
- the end every time we want to test the inspector we have to
- manually enable enable the “developer extras” setting when using
- them. It make sense to have this setting enabled by default.
-
- * GtkLauncher/main.c:
- (main):
- * MiniBrowser/gtk/main.c:
- (main):
-
-2012-10-04 Harald Alvestrand <hta@google.com>
-
- Change RTCPeerConnection GetStats to use Date timestamp format
- https://bugs.webkit.org/show_bug.cgi?id=98263
-
- Reviewed by Yury Semikhatsky.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::getStats):
-
-2012-10-04 Dirk Pranke <dpranke@chromium.org>
-
- [NRWT] --skipped option is ignored when --test-list is used
- https://bugs.webkit.org/show_bug.cgi?id=98260
-
- Reviewed by Ojan Vafai.
-
- Adds a --skipped=always flag that will skip any tests listed in
- TestExpectations even if they're listed explicitly on the
- command line.
-
- This is most useful if you are using --test-list to specify a
- long list of files but you still want to skip some of them
- depending on what's in TestExpectations.
-
- * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
- (LayoutTestFinder.skip_tests):
- * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
- (parse_args):
- * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
- (MainTest.test_skipped_flag):
-
-2012-10-04 Sheriff Bot <webkit.review.bot@gmail.com>
-
- Unreviewed, rolling out r130377.
- http://trac.webkit.org/changeset/130377
- https://bugs.webkit.org/show_bug.cgi?id=98392
-
- Chromium Win compilation is broken (Requested by yurys on
- #webkit).
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::getStats):
-
-2012-10-04 Harald Alvestrand <hta@google.com>
-
- Change RTCPeerConnection GetStats to use Date timestamp format
- https://bugs.webkit.org/show_bug.cgi?id=98263
-
- Reviewed by Adam Barth.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (MockWebRTCPeerConnectionHandler::getStats):
-
-2012-10-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- Unreviewed, remove unused $legacyWebKitBlobBuilderSupport variable after r130343.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-10-03 Philip Rogers <pdr@google.com>
-
- Force GC between PageLoad tests.
- https://bugs.webkit.org/show_bug.cgi?id=98203
-
- Reviewed by Ryosuke Niwa.
-
- Previously, our PageLoad PerfTests had multi-modal distributions,
- typically with a small cluster at 1-2x the median. This turned out
- to be caused by not garbage collecting between tests!
-
- This patch adds a new file, force-gc.html, and loads this file between
- PageLoad tests to force a GC. I manually verified that this cleans up
- our perf test outliers.
-
- * Scripts/webkitpy/performance_tests/perftest.py:
- (PageLoadingPerfTest.__init__):
- (PageLoadingPerfTest):
- (PageLoadingPerfTest.run_single):
-
- This function now loads two pages: one to force a gc and
- then the test to run.
-
- * Scripts/webkitpy/performance_tests/perftest_unittest.py:
-
- Modified several existing tests to show that the force-gc file
- is loaded.
-
- (MockPort):
- (MockPort.__init__):
- (MockPort.perf_tests_dir):
- (TestPageLoadingPerfTest.MockDriver.__init__):
- (TestPageLoadingPerfTest.MockDriver.run_test):
- (TestPageLoadingPerfTest.test_run):
- (TestPageLoadingPerfTest.test_run_with_bad_output):
- (TestReplayPerfTest.ReplayTestPort):
- (TestReplayPerfTest.ReplayTestPort.__init__):
- (TestReplayPerfTest.test_run_single.run_test):
- (TestReplayPerfTest.test_run_single):
- (TestReplayPerfTest.test_run_single_fails_when_output_has_error):
- (TestPerfTestFactory.test_regular_test):
- (TestPerfTestFactory.test_inspector_test):
- (TestPerfTestFactory.test_page_loading_test):
-
-2012-10-03 Christophe Dumez <christophe.dumez@intel.com>
-
- [EFL] Enable use of X11 in DumpRenderTree / WebKitTestRunner
- https://bugs.webkit.org/show_bug.cgi?id=98231
-
- Reviewed by Gyuyoung Kim.
-
- Enable use of X11 in DumpRenderTree / WebKitTestRunner.
- Call ecore_evas_new() instead of ecore_evas_buffer_new()
- in EFL's DumpRenderTree and WebKitTestRunner.
- It is safe to do this now that we are using XvfbDriver
- for the layout tests.
-
- * DumpRenderTree/efl/DumpRenderTree.cpp:
- (parseCommandLineOptions):
- (initEcoreEvas):
- * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
- (WTR::initEcoreEvas):
- * WebKitTestRunner/efl/main.cpp:
- (main):
-
-2012-10-03 Dirk Pranke <dpranke@chromium.org>
-
- run-webkit-tests tests on win32 after r127302
- https://bugs.webkit.org/show_bug.cgi?id=98323
-
- Reviewed by Eric Seidel.
-
- run-webkit-tests tests on win32 after r127302
- https://bugs.webkit.org/show_bug.cgi?id=98323
-
- Reviewed by Eric Seidel.
-
- Looks like when we converted the json-building logic to use scm
- to try and get the svn revision, we missed a win32-ism and
- didn't check to make sure had initialized the scm subsystem.
-
- This change fixes that and renames _initialize_scm to be a public method.
-
- * Scripts/webkitpy/common/host.py:
- (Host.initialize_scm):
- * Scripts/webkitpy/common/host_mock.py:
- (MockHost.__init__):
- (MockHost.initialize_scm):
- * Scripts/webkitpy/layout_tests/controllers/manager.py:
- (summarize_results):
- * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
- (JSONResultsGeneratorBase.get_json):
- (JSONResultsGeneratorBase._get_result_char):
- (JSONResultsGeneratorBase._get_svn_revision):
- * Scripts/webkitpy/performance_tests/perftestsrunner.py:
- (PerfTestsRunner.__init__):
- * Scripts/webkitpy/style/checkers/test_expectations.py:
- (TestExpectationsChecker.__init__):
- * Scripts/webkitpy/style/main.py:
- (CheckWebKitStyle.main):
- * Scripts/webkitpy/tool/main.py:
- (WebKitPatch.handle_global_options):
- * Scripts/webkitpy/tool/servers/rebaselineserver.py:
- (get_test_baselines):
-
-2012-10-03 Adrian Perez de Castro <aperez@igalia.com>
-
- [GTK] Make inspector directly useable in GtkLauncher/MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=98310
-
- Reviewed by Martin Robinson.
-
- Make MiniBrowser/GtkLauncher define the path to the inspector
- resources by setting the WEBKIT_INSPECTOR_PATH environment
- variable pointing to the copy of the inspector resources in
- the build directory. If the environment variable is already
- defined, its value is not overwritten. The path is derived
- from the WEBKIT_EXEC_PATH macro defined in the makefiles.
-
- * GNUmakefile.am:
- * GtkLauncher/main.c:
- (main):
- * MiniBrowser/gtk/main.c:
- (main):
-
-2012-10-03 Benjamin Poulain <bpoulain@apple.com>
-
- Fix Geolocation/window-close-crash.html and harden WebKitTestRunner for Geolocation
- https://bugs.webkit.org/show_bug.cgi?id=97608
-
- Reviewed by Sam Weinig.
-
- The test fast/dom/Geolocation/window-close-crash.html was crashing because
- handleGeolocationPermissionRequest() was executed on the wrong pointer. Depending on how
- the page was created, the void* clientInfo can either be a PlatformWebView or
- a TestController.
-
- Using the global TestController fixes the issue.
-
- * WebKitTestRunner/GeolocationProviderMock.cpp:
- (WTR::GeolocationProviderMock::setPosition):
- (WTR::GeolocationProviderMock::setPositionUnavailableError):
- To be reliable, the test fast/dom/Geolocation/maximum-age.html needs the setting the position
- to clear the error and vice versa.
- This is the same behavior as GeolocationClientMock and MockGeolocationProvider of WebKit1.
-
- (WTR::GeolocationProviderMock::sendPositionIfNeeded):
- (WTR::GeolocationProviderMock::sendErrorIfNeeded):
- Some tests expect the position/error cant be sent multiple time,
- just keep the position after sending.
-
- * WebKitTestRunner/TestController.cpp:
- (WTR::decidePolicyForGeolocationPermissionRequest):
- (WTR::TestController::decidePolicyForGeolocationPermissionRequestIfPossible):
- * WebKitTestRunner/TestController.h:
- Let's play as if we did not know what is in GeolocationPermissionRequestManagerProxy like a real
- client would have to do.
-
-2012-10-03 Otto Derek Cheung <otcheung@rim.com>
-
- [BlackBerry] Implementing the NetworkInfo API for BB port
- https://bugs.webkit.org/show_bug.cgi?id=98273
-
- Reviewed by Rob Buis.
-
- Enabling NetworkInfo API for the BlackBerry port.
-
- * Scripts/webkitperl/FeatureList.pm:
-
-2012-10-03 Anders Carlsson <andersca@apple.com>
-
- Exception thrown when running accessibility/container-node-delete-causes-crash.html test
- https://bugs.webkit.org/show_bug.cgi?id=98291
-
- Reviewed by Andreas Kling.
-
- The accessibility/container-node-delete-causes-crash.html test will cause a full accessibility tree
- to be created by trying to look up an element with a non-existent ID. This caused an exception to be thrown
- when trying to access the children of an element that didn't have any children. Fix this by adding
- BEGIN_AX_OBJC_EXCEPTIONS/END_AX_OBJC_EXCEPTIONS around the call to get the children.
-
- * DumpRenderTree/mac/AccessibilityControllerMac.mm:
- (findAccessibleObjectById):
-
-2012-10-03 Ojan Vafai <ojan@chromium.org>
-
- Make partytime work when loading garden-o-matic from trac.webkit.org
- https://bugs.webkit.org/show_bug.cgi?id=98283
-
- Reviewed by Adam Barth.
-
- CSP was blocking the reqest for partytime.gif because 'self' wasn't on the img-src directive.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
-
-2012-10-03 Roger Fong <roger_fong@apple.com>
-
- Unreviewed. Adding sys.platform check to skip a failing assert on the Apple Windows platform.
- https://bugs.webkit.org/show_bug.cgi?id=98288
-
- * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
- (ChromiumAndroidDriverTest.test_command_from_driver_input):
-
-2012-10-03 Ojan Vafai <ojan@chromium.org>
-
- Get rid of warning about non-existant platform name when loading garden-o-matic
- https://bugs.webkit.org/show_bug.cgi?id=98282
-
- Reviewed by Adam Barth.
-
- If you loaded without a platform query parameter we'd return "null" as the platform name
- instead of null.
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
- * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:
-
-2012-10-03 Balazs Kelemen <kbalazs@webkit.org>
-
- [Qt] Enable mock scrollbars
- https://bugs.webkit.org/show_bug.cgi?id=98011
-
- Reviewed by Csaba Osztrogonác.
-
- Enable mock scrollbars for the Qt port. This patch will require a huge rebaseline.
-
- * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
- (WebCore::DumpRenderTree::DumpRenderTree):
- * WebKitTestRunner/TestController.cpp:
- (WTR::TestController::resetStateToConsistentValues):
-
-2012-10-03 Alberto Garcia <agarcia@igalia.com>
-
- [GTK] [WK2] Add favicon support to the MiniBrowser
- https://bugs.webkit.org/show_bug.cgi?id=98063
-
- Reviewed by Carlos Garcia Campos.
-
- Set the icon in the URI text entry using the favicon property of
- the WebKitWebView.
-
- * MiniBrowser/gtk/BrowserWindow.c:
- (_BrowserWindow):
- (updateUriEntryIcon):
- (uriEntryTextChanged):
- (faviconChanged):
- (browserWindowFinalize):
- (browser_window_init):
- (browserWindowConstructed):
-
-2012-10-03 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
-
- [Qt][DRT] Add support for overriding the "WebKitDisplayImagesKey" preference.
- https://bugs.webkit.org/show_bug.cgi?id=98200
-
- Reviewed by Csaba Osztrogonác.
-
- * DumpRenderTree/qt/TestRunnerQt.cpp:
- (TestRunner::overridePreference):
-
-2012-10-03 Zoltan Arvai <zarvai@inf.u-szeged.hu>
-
- [Qt][WRT] Fix build error with MSVC on Windows.
- https://bugs.webkit.org/show_bug.cgi?id=97697
-
- Reviewed by Simon Hausmann.
-
- WTR build is failing when WebKit directory is located on a longer path.
- This seems to caused by source files that has the same name in
- WTR and DRT directories. The solution is removing referencies
- from Target.pri to DRT directory and adding an alternate version of
- the required files to WTR. Those files simply include the real ones from DRT.
-
- * WebKitTestRunner/InjectedBundle/Target.pri:
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Added.
- * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Added.
-
-2012-10-03 Christophe Dumez <christophe.dumez@intel.com>
-
- [WK2][WKTR] TestRunner.setAlwaysAcceptCookies() causes flakiness
- https://bugs.webkit.org/show_bug.cgi?id=98238
-
- Reviewed by Csaba Osztrogonác.
-
- Reset AlwaysAcceptCookies setting between tests to avoid
- flakiness due to TestRunner.setAlwaysAcceptCookies().
-
- * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
- (WTR::InjectedBundle::beginTesting):
-
-2012-10-03 Harald Alvestrand <hta@google.com>
-
- Add data passing to the GetStats interface of RTCPeerConnection
- https://bugs.webkit.org/show_bug.cgi?id=98003
-
- Reviewed by Adam Barth.
-
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
- (RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
- (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
- (MockWebRTCPeerConnectionHandler::addStream):
- (MockWebRTCPeerConnectionHandler::removeStream):
- (MockWebRTCPeerConnectionHandler::getStats):
- * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
- (MockWebRTCPeerConnectionHandler):
-
-== Rolled over to ChangeLog-2012-10-02 ==
diff --git a/Tools/ChangeLog-2013-04-24 b/Tools/ChangeLog-2013-04-24
new file mode 100644
index 000000000..2c65dea21
--- /dev/null
+++ b/Tools/ChangeLog-2013-04-24
@@ -0,0 +1,39024 @@
+2013-04-23 David Grogan <dgrogan@chromium.org>
+
+ Unreviewed. Remove myself from watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-23 Jessie Berlin <jberlin@apple.com>
+
+ NRWT: confusing warning about a line being in a Skipped file when it is really just listed
+ in _missing_symbol_to_skipped_tests in base.py
+ https://bugs.webkit.org/show_bug.cgi?id=108884
+
+ Reviewed by Tim Horton.
+
+ Remove symbol-based skipped list detection.
+
+ * Scripts/webkitpy/port/base.py:
+ (Port._missing_feature_to_skipped_tests):
+ (Port._skipped_tests_for_unsupported_features):
+ * Scripts/webkitpy/port/port_testcase.py:
+ (PortTestCase.test_path_to_test_expectations_file):
+
+2013-04-23 Benjamin Poulain <bpoulain@apple.com>
+
+ Remove wxWebKit support from the Tools
+ https://bugs.webkit.org/show_bug.cgi?id=115005
+
+ Reviewed by Andreas Kling.
+
+ The wxWebKit port is no longer actively maintained by Kevin
+ on webkit.org. Remove the code until new maintainers resume the work.
+
+ * DumpRenderTree/DumpRenderTree.h:
+ * DumpRenderTree/config.h:
+ * DumpRenderTree/wscript: Removed.
+ * DumpRenderTree/wx/DumpRenderTreeWx.cpp: Removed.
+ * DumpRenderTree/wx/DumpRenderTreeWx.h: Removed.
+ * DumpRenderTree/wx/GCControllerWx.cpp: Removed.
+ * DumpRenderTree/wx/TestRunnerWx.cpp: Removed.
+ * DumpRenderTree/wx/WorkQueueItemWx.cpp: Removed.
+ * Scripts/build-dumprendertree:
+ * Scripts/build-jsc:
+ (buildMyProject):
+ * Scripts/build-webkit:
+ * Scripts/old-run-webkit-tests:
+ * Scripts/run-launcher:
+ * Scripts/webkitdirs.pm:
+ (argumentsForConfiguration):
+ (determineConfigurationProductDir):
+ (determinePassedArchitecture):
+ (builtDylibPathForName):
+ (determineIsQt):
+ (isAppleWebKit):
+ (launcherPath):
+ (launcherName):
+ (checkRequiredSystemConfig):
+ * Scripts/webkitpy/common/config/contributionareas.py:
+ * waf/build/build_utils.py: Removed.
+ * waf/build/settings.py: Removed.
+ * waf/build/waf_extensions.py: Removed.
+ * waf/build/wxpresets.py: Removed.
+ * wx/browser/browser.cpp: Removed.
+ * wx/browser/wscript: Removed.
+ * wx/install-unix-extras: Removed.
+ * wx/packaging/build-debian-installer.py: Removed.
+ * wx/packaging/build-mac-installer.py: Removed.
+ * wx/packaging/build-win-installer.py: Removed.
+ * wx/packaging/debian/changelog: Removed.
+ * wx/packaging/debian/compat: Removed.
+ * wx/packaging/debian/control: Removed.
+ * wx/packaging/debian/copyright: Removed.
+ * wx/packaging/debian/python-webkitwx.install: Removed.
+ * wx/packaging/debian/rules: Removed.
+ * wx/packaging/wxWebKitInstaller.iss.in: Removed.
+
+2013-04-23 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Fix test_build_check for Qt on Mac after r148075.
+ https://bugs.webkit.org/show_bug.cgi?id=115038
+
+ Reviewed by Csaba Osztrogonác.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (RunTest.test_build_check):
+ run-webkit-tests is supposed to fail, if it is run on a different
+ platform than specified on the command line.
+ However, Qt allows exactly this for Qt-platforms to allow comparing
+ of test results of different baselines.
+ Before r148075 "chromium-linux-x86" was used for testing.
+ This patch changes the port_name to gtk when running the test on mac.
+
+2013-04-23 Xan Lopez <xlopez@igalia.com>
+
+ [BlackBerry] Do not access BackForwardListImpl from DRT
+ https://bugs.webkit.org/show_bug.cgi?id=115041
+
+ Reviewed by Carlos Garcia Campos.
+
+ Use the right class to access the bflist functionality.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::dumpBackForwardListForWebView):
+
+2013-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add webkit_uri_request_get_http_headers to WebKit2 GTK+ API
+ https://bugs.webkit.org/show_bug.cgi?id=112160
+
+ Reviewed by Andreas Kling.
+
+ * MiniBrowser/gtk/GNUmakefile.am: Add missing libsoup flags to
+ CPPFLAGS.
+
+2013-04-23 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2] Make EFL WKView API shareable between ports
+ https://bugs.webkit.org/show_bug.cgi?id=114734
+
+ Reviewed by Anders Carlsson.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+
+ Updated project files accordingly to updated WKView API files
+ structure.
+
+2013-04-23 Andreas Kling <akling@apple.com>
+
+ Add Benjamin Poulain's @apple.com address to his entry. Unreviewed.
+
+ * Scripts/webkitpy/common/config/contributors.json:
+
+2013-04-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Respect image-rendering setting for determing image-rendering quality
+ https://bugs.webkit.org/show_bug.cgi?id=113405
+
+ Reviewed by Benjamin Poulain.
+
+ Remove CSS4 Images option. It is not ready for implementation.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-04-22 Mark Rowe <mrowe@apple.com>
+
+ <http://webkit.org/b/114989> Add a user default to allow use of the Safari binary rather than SafariForWebKitDevelopment
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/webkitdirs.pm:
+ (skipSafariExecutableEntitlementChecks): Look for the SkipSafariExecutableEntitlementChecks default in the
+ /Library/Preferences/org.webkit.BuildConfiguration preference domain.
+ (safariPathFromSafariBundle): If the user default is set asking us to skip the entitlement checks, return
+ the path to the regular Safari binary.
+
+2013-04-22 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Unreviewed Efl build fix after r148921
+
+ * TestWebKitAPI/CMakeLists.txt:
+
+2013-04-22 Benjamin Poulain <benjamin@webkit.org>
+
+ Remove the memory instrumentation code
+ https://bugs.webkit.org/show_bug.cgi?id=114931
+
+ Reviewed by Andreas Kling.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: Removed.
+
+2013-04-22 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Enable introspection always for developer builds
+ https://bugs.webkit.org/show_bug.cgi?id=114983
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * Scripts/webkitdirs.pm:
+ (runAutogenForAutotoolsProjectIfNecessary): Always enable introspection
+ when using build-webkit.
+ * gtk/jhbuildrc: Enable documentation for all jhbuild modules and explicitly
+ choose the memory gsettings backend while in the jhbuild. This eliminates
+ warnings from programs that fall back to the memory backend.
+
+2013-04-22 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Set up libPlatform.la
+ https://bugs.webkit.org/show_bug.cgi?id=114168
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: Link the DumpRenderTree executable against both libPlatform.la and libPlatformGtk.la libraries.
+
+2013-04-22 Xuefei Ren <xren@blackberry.com>
+
+ fix build warning(unused parameter)
+ https://bugs.webkit.org/show_bug.cgi?id=114855
+
+ Reviewed by Rob Buis.
+
+ remove warning(unused parameter) in
+ Tools/DumpRenderTree/blackberry/EventSender.cpp
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (getDragModeCallback):
+
+2013-04-22 Alberto Garcia <agarcia@igalia.com>
+
+ [BlackBerry] Add dummy implementation of AccessibilityController::accessibleElementById()
+ https://bugs.webkit.org/show_bug.cgi?id=114939
+
+ Reviewed by Carlos Garcia Campos.
+
+ This was added in r129308.
+
+ * DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp:
+ (AccessibilityController::accessibleElementById):
+
+2013-04-21 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ Unreviewed EFL build fix after r148855.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2013-04-21 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL][WK2] Mark WKViewClientWebProcessCallbacks API test as failing
+ https://bugs.webkit.org/show_bug.cgi?id=114922
+
+ Reviewed by Gyuyoung Kim.
+
+ Mark WKViewClientWebProcessCallbacks API test as failing on WK2 EFL.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2013-04-20 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Fix baseline positioning issue by updating Freetype
+ https://bugs.webkit.org/show_bug.cgi?id=106775
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild.modules: Bump the Freetype Jhbuild dependency to 2.4.11.
+ * gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch: Added. This is the Freetype
+ patch (committed as e0469372) that fixes rounding issues for smaller fonts. It is bound to be included
+ in the 2.4.12 release of Freetype (not released yet) but is provided here as its effect on baselines is
+ considered positive and will reduce the amout of future rebaselining.
+
+2013-04-20 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK] Fix unit test webkit2/WebKitFindController/hide
+ https://bugs.webkit.org/show_bug.cgi?id=89810
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Unskip test webkit2/WebKitFindController/hide.
+
+2013-04-19 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fixes for the flakiness dashboard.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+
+2013-04-17 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] Make the 32 bits bot only build and run API tests
+ https://bugs.webkit.org/show_bug.cgi?id=113532
+
+ Reviewed by Martin Robinson.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json: make the 32 bits bot use the new BuildAndAPITest type
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (BuildAndAPITestFactory): new factory that builds and runs API tests, only used by the GTK+ 32 bits bot at the
+ moment;
+ (BuildAndAPITestFactory.__init__): add API tests step for platforms that have it.
+
+2013-04-19 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Only use thin archives on Linux
+
+ Rubber-stamped by Jocelyn Turcotte.
+
+ Since "thin archive" is a feature of GNU's ar
+ we limit the usage to Linux to avoid problems
+ with other configurations (eg. macx-g++).
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2013-04-19 Krzysztof Czech <k.czech@samsung.com>
+
+ [GTK][WK2] accessibility/language-attribute.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=106342
+
+ Reviewed by Gyuyoung Kim.
+
+ Adds support for getting language information.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::language):
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Remove the isToTWebKit member variable from the BuilderGroup interface
+ https://bugs.webkit.org/show_bug.cgi?id=114805
+
+ Reviewed by Benjamin Poulain.
+
+ Remove the isToTWebKit member variable from the BuilderGroup and all its usages as it now defaults to true for every
+ builder group. The isTipOfTreeWebKitBuilder method now returns true by default but should be removed in a follow-up patch.
+ The BuilderGroup constructor does not accept the isToTWebKit parameter anymore so all the callsites are adjusted accordingly.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (BuilderGroup):
+ (loadBuildersList):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (isTipOfTreeWebKitBuilder):
+ (expectationsMap):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (test):
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] htmlForIndividualTests unit test should include its dummy builder under the webkit.org builder master
+ https://bugs.webkit.org/show_bug.cgi?id=114804
+
+ Reviewed by Benjamin Poulain.
+
+ The htmlForIndividualTests unit test should include its dummy builder under the sole supported webkit.org builder master
+ just so the unit tests properly functions.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Remove Chromium-specific helper functions that were used in the builder-loading code
+ https://bugs.webkit.org/show_bug.cgi?id=114803
+
+ Reviewed by Benjamin Poulain.
+
+ Remove three Chromium-specific helper functions that were used to determine Chromium DEPS, Content Shell and WebKit ToT
+ test runners. These are not required anymore and thus removed along with a couple of unit tests that were testing these
+ methods' correct behavior.
+
+ * TestResultServer/static-dashboards/builders.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Remove the Chromium-specific builder masters
+ https://bugs.webkit.org/show_bug.cgi?id=114802
+
+ Reviewed by Benjamin Poulain.
+
+ Remove all the Chromium-specific builder masters, the webkit.org builder master is the only one currently supported.
+
+ * TestResultServer/static-dashboards/builders.js:
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Remove all the Chromium-specific builder groups
+ https://bugs.webkit.org/show_bug.cgi?id=114801
+
+ Reviewed by Benjamin Poulain.
+
+ Remove all the Chromium-specific builder groups, all of these are not supported anymore.
+
+ * TestResultServer/static-dashboards/builders.js:
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Only accept the 'group' parameter if present in the layout tests builders group
+ https://bugs.webkit.org/show_bug.cgi?id=114799
+
+ Reviewed by Benjamin Poulain.
+
+ The layout tests builder group is the only one supported, all the other Chromium-specific builder groups are
+ bound to be removed.
+
+ * TestResultServer/static-dashboards/history.js:
+ (.):
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Remove Chromium-specific builder loading code from loadBuildersList
+ https://bugs.webkit.org/show_bug.cgi?id=114797
+
+ Reviewed by Benjamin Poulain.
+
+ Remove anything Chromium-specific from the builder-loading code, specifically removing support for loading builder data
+ for anything other that the layout-tests type and removing support for loading builder data from builders connected
+ to the Chromium-specific builder groups which are no longer supported.
+
+ * TestResultServer/static-dashboards/builders.js:
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] The currentBuilderGroupCategory method should return the layout tests builder groups by default
+ https://bugs.webkit.org/show_bug.cgi?id=114796
+
+ Reviewed by Benjamin Poulain.
+
+ With the Chromium builders no longer uploading results and the layout-tests test type the only one supported by the
+ WebKit's dashboard, the currentBuilderGroupCategory can now return LAYOUT_TESTS_BUILDER_GROUPS as the default builder
+ group category.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (currentBuilderGroupCategory):
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Narrow down the test types list to only layout-tests
+ https://bugs.webkit.org/show_bug.cgi?id=114795
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove all the redundant test types that the webkit.org builders do not upload results for. All of the removed
+ test types were specific to the Chromium builders.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] The revision rows for aggregate results should no longer include Chromium revisions
+ https://bugs.webkit.org/show_bug.cgi?id=114760
+
+ Reviewed by Benjamin Poulain.
+
+ With the Chromium builders no longer present there's no need to display the Chromium revision range under the
+ aggregate results. Only the first half of the htmlForRevisionRows method (the one returning the table row listing the
+ WebKit revisions) is now relevant - the method is therefor removed and its callsites updated to directly call the
+ htmlForTableRow method that returns the table row containing all the relevant WebKit revisions.
+
+ * TestResultServer/static-dashboards/aggregate_results.js:
+ (htmlForSummaryTable):
+ (htmlForTestType):
+
+2013-04-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [Dashboard] Remove Chromium-specific cases from the construction of the chart HTML for aggregate results
+ https://bugs.webkit.org/show_bug.cgi?id=114759
+
+ Reviewed by Benjamin Poulain.
+
+ Aggregate results are not viewable for Chromium builders anymore, meaning the WebKit revisions are shown by default.
+ This means the code in the chartHTML method can be simplified, defaulting the revision key to WEBKIT_REVISIONS_KEY
+ and the revision label to 'WebKit Revision'.
+
+ * TestResultServer/static-dashboards/aggregate_results.js:
+ (chartHTML):
+
+2013-04-18 Xuefei Ren <xren@blackberry.com>
+
+ remove build warning(unused parameter)
+ https://bugs.webkit.org/show_bug.cgi?id=114670
+
+ Reviewed by Rob Buis.
+
+ remove builde warning (unused parameter) in
+ Tools/DumpRenderTree/blackberry
+
+ * DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp:
+ (AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
+ (AccessibilityUIElement::scrollToGlobalPoint):
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::addMessageToConsole):
+ (BlackBerry::WebKit::DumpRenderTree::didReceiveResponseForFrame):
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (getDragModeCallback):
+ (setDragModeCallback):
+ (mouseWheelToCallback):
+ (contextClickCallback):
+ (mouseDownCallback):
+ (mouseUpCallback):
+ (mouseMoveToCallback):
+ (beginDragWithFilesCallback):
+ (leapForwardCallback):
+ (keyDownCallback):
+ (textZoomInCallback):
+ (textZoomOutCallback):
+ (zoomPageInCallback):
+ (zoomPageOutCallback):
+ (addTouchPointCallback):
+ (updateTouchPointCallback):
+ (setTouchModifierCallback):
+ (touchStartCallback):
+ (touchCancelCallback):
+ (touchMoveCallback):
+ (touchEndCallback):
+ (clearTouchPointsCallback):
+ (cancelTouchPointCallback):
+ (releaseTouchPointCallback):
+ (scalePageByCallback):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::authenticateSession):
+ (TestRunner::setSpatialNavigationEnabled):
+ (TestRunner::apiTestNewWindowDataLoadBaseURL):
+ (TestRunner::setPluginsEnabled):
+ (TestRunner::setApplicationCacheOriginQuota):
+ (TestRunner::addMockSpeechInputResult):
+ (TestRunner::setViewModeMediaFeature):
+ (TestRunner::deleteLocalStorageForOrigin):
+ (TestRunner::applicationCacheDiskUsageForOrigin):
+ (TestRunner::grantWebNotificationPermission):
+ (TestRunner::denyWebNotificationPermission):
+ (TestRunner::simulateWebNotificationClick):
+ (TestRunner::simulateLegacyWebNotificationClick):
+
+2013-04-18 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ [WK2][EFL] Text Checker's settings refactor
+ https://bugs.webkit.org/show_bug.cgi?id=111713
+
+ Reviewed by Andreas Kling.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ Use a new text checker API to enable spell checking.
+
+2013-04-18 Seokju Kwon <seokju.kwon@gmail.com>
+
+ [EFL] Add a newline to the end of log message
+ https://bugs.webkit.org/show_bug.cgi?id=114659
+
+ Reviewed by Gyuyoung Kim.
+
+ Move a newline to info() definition.
+
+ * EWebLauncher/main.c:
+ (on_load_finished):
+ (on_tooltip_text_set):
+ (on_tooltip_text_unset):
+ (on_inputmethod_changed):
+ (on_focus_out):
+ (on_focus_in):
+ (on_key_down):
+ (windowCreate):
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_download_request):
+ (on_download_finished):
+ (on_download_failed):
+ (on_refresh_button_clicked):
+ (on_popup_menu_discarded):
+ (on_popup_menu_item_clicked):
+ (popup_menu_populate):
+ (on_popup_menu_show):
+ (on_window_create):
+ (context_popup_item_selected_cb):
+ (on_context_menu_show):
+ (on_context_menu_hide):
+ (window_create):
+
+2013-04-17 Zan Dobersek <zandobersek@gmail.com>
+
+ [Dashboard] Remove code for showing 'WebKit roll' annotations in timelines for Chromium builders
+ https://bugs.webkit.org/show_bug.cgi?id=114755
+
+ Reviewed by Ryosuke Niwa.
+
+ The Chromium builders are no longer available to inspect so there's no need for the code that used to show
+ the 'WebKit roll' annotations in the Chromium builders' timeline.
+
+ * TestResultServer/static-dashboards/timeline_explorer.js:
+
+2013-04-17 Zan Dobersek <zandobersek@gmail.com>
+
+ [Dashboard] Clean up the timeline updating code, removing Chromium-specific cases
+ https://bugs.webkit.org/show_bug.cgi?id=114756
+
+ Reviewed by Ryosuke Niwa.
+
+ Clean up the updating of the timeline in the timeline explorer, defaulting to the webkit.org build master when
+ constructing the results URL and removing the possible row addition containing the Chromium commit range that
+ only applied to Chromium builders in the first place. Also removes the now-redundant shouldShowWebKitRevisionsOnly
+ method.
+
+ * TestResultServer/static-dashboards/timeline_explorer.js:
+
+2013-04-17 Alberto Garcia <agarcia@igalia.com>
+
+ media-stream and xslt are no longer configurable options in the GTK+ port
+ https://bugs.webkit.org/show_bug.cgi?id=114736
+
+ Reviewed by Martin Robinson.
+
+ media-stream support was removed in r145199 and XSLT is a hard
+ requirement since r145859. Attempting to pass those options to the
+ configure script, only results in a warning.
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject):
+
+2013-04-17 Michał Pakuła vel Rutka <m.pakula@samsung.com>
+
+ [EFL][WK2] Implement context menu in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=102932
+
+ Reviewed by Gyuyoung Kim.
+
+ Added context menu support for EFL port using Elementary context popup.
+
+ * MiniBrowser/efl/main.c:
+ (_Browser_Window):
+ (context_popup_item_selected_cb):
+ (context_popup_populate):
+ (on_context_menu_show):
+ (on_context_menu_hide):
+ (window_create):
+
+2013-04-17 Csaba Osztrogonác <ossy@webkit.org>
+
+ REGRESSION(r148588): It broke the Qt WK2 EWS
+ https://bugs.webkit.org/show_bug.cgi?id=114737
+
+ Reviewed by Jocelyn Turcotte.
+
+ * Scripts/webkitpy/common/config/ews.json: "Qt WK2 EWS" should use qt-wk2 port.
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port):
+ (QtPort.build_webkit_command): qt port shouldn't build WebKit2.
+ (QtPort.run_webkit_tests_command): qt port runs WK1 tests.
+ (QtWK2Port): Added.
+ (QtWK2Port.build_webkit_command): qt-wk2 port builds WK1 and WK2 too.
+ (QtWK2Port.run_webkit_tests_command): qt-wk2 port runs WK2 tests.
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_qt_port):
+ (DeprecatedPortTest):
+ (DeprecatedPortTest.test_qt_wk2_port):
+
+2013-04-17 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_efl_port): Adjusting the expected outcome of the EFL build-webkit command after r148589.
+
+2013-04-17 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Enable sub-pixel layout.
+ https://bugs.webkit.org/show_bug.cgi?id=113199
+
+ Reviewed by Jocelyn Turcotte.
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-04-16 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Add Efl WebKit2 EWS bot
+ https://bugs.webkit.org/show_bug.cgi?id=114564
+
+ Reviewed by Ryosuke Niwa.
+
+ Added EflWK2EWS, and add myself a watcher for EflWK2EWS.
+ Also add a deprecated EflWK2Port class.
+
+ Besides clean up eflews watchers.
+
+ * QueueStatusServer/config/queues.py:
+ * Scripts/webkitpy/common/config/ews.json:
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port):
+ (EflPort.build_webkit_command):
+ (EflWK2Port):
+ (EflWK2Port.build_webkit_command):
+
+2013-04-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Isolate Early Warning System definitions into a JSON
+ https://bugs.webkit.org/show_bug.cgi?id=114558
+
+ Reviewed by Benjamin Poulain.
+
+ Added ews.json to common/config, and made tool/commands/__init__.py call
+ AbstractEarlyWarningSystem.load_ews_classes to instantiate classes based on ews.json.
+
+ Reland the patch since the EWS failure was a false positive.
+
+ * Scripts/webkitpy/common/config/ews.json: Extracted from earlywarningsystem.py.
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem):
+ (AbstractEarlyWarningSystem.__init__):
+ (AbstractEarlyWarningSystem.load_ews_classes): Added. Loads ews.json.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSystemTest._default_expected_logs):
+ (_test_ews):
+ (test_ewses):
+
+2013-04-16 Sam Weinig <sam@webkit.org>
+
+ Fix fallout after r148545.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ Remove calls to non-existent API functions.
+
+2013-04-13 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Disable WinEWS tests, simply not enough bots.
+
+ All bots are running consistently now but the queue still keeps growing.
+ Until we get more bots or make the tests faster, it doesn't seem wise to keep running tests.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-04-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ The list of contributors in committers.py should be a separate JSON
+ https://bugs.webkit.org/show_bug.cgi?id=114673
+
+ Reviewed by Anders Carlsson.
+
+ Added webkitpy/common/config/contributors.json, made CommitterList load it.
+
+ * EWSTools/start-queue-mac.sh:
+ * EWSTools/start-queue.sh:
+ * Scripts/webkitpy/common/checkout/commitinfo.py:
+ (CommitInfo.committer):
+ * Scripts/webkitpy/common/config/contributors.json: Added.
+ * Scripts/webkitpy/common/config/committers.py:
+ (Reviewer.__init__):
+ (CommitterList.__init__):
+ (CommitterList.load_json): Added.
+ (CommitterList.load_json.emails):
+ (CommitterList.load_json.nicks):
+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+ (MockCommitInfo.author):
+
+2013-04-16 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [EFL] Bump libsoup dependency to 2.42.0
+ https://bugs.webkit.org/show_bug.cgi?id=113927
+
+ Reviewed by Gyuyoung Kim.
+
+ Update libsoup required version to v2.42.0 and GLib to v2.36.0 as
+ required by libsoup for EFL port.
+
+ * efl/jhbuild.modules:
+ * efl/patches/libsoup-2.40-auth-fix.patch: Removed as it's already
+ included in v2.42.0.
+
+2013-04-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Account class from committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=114671
+
+ Reviewed by Csaba Osztrogonác.
+
+ Account class was added to support watch list email addresses that are not associated with
+ a particular contributor but nobody uses these email address since Chromium port forked.
+
+ Remove it.
+
+ Also removed account_by_login from CommitterList since it was never called except its unittests.
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ * Scripts/webkitpy/common/config/committers.py:
+ (Contributor):
+ (Contributor.matches_glob):
+ (Reviewer.__init__):
+ (CommitterList.__init__):
+ (CommitterList._email_to_account_map):
+ (CommitterList._login_to_account_map):
+ (CommitterList.contributors_by_fuzzy_match):
+ (CommitterList.contributor_by_email):
+ (CommitterList.contributor_by_name):
+ (CommitterList.committer_by_email):
+ (CommitterList.reviewer_by_email):
+ * Scripts/webkitpy/common/config/committers_unittest.py:
+ (CommittersTest.test_committer_lookup):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ (Bugzilla._commit_queue_flag):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+ (test_commit_queue_flag):
+ * Scripts/webkitpy/common/watchlist/watchlistparser.py:
+ (WatchListParser._validate):
+
+2013-04-16 Mike West <mkwst@chromium.org>
+
+ Unreviewed update to the watchlist.
+
+ Removing 'mkwst+watchlist@chromium.org' from committers.py and the
+ watchist file; moving to 'mkwst@chromium.org' instead.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Move webkitpy.layout_tests.port to webkitpy.port
+ https://bugs.webkit.org/show_bug.cgi?id=114668
+
+ Reviewed by Maciej Stachowiak.
+
+ Moved. Port objects knows a lot more than just layout_tests. They doesn't belong down in layout_tests.
+
+ * Scripts/webkitpy/common/host.py:
+ * Scripts/webkitpy/common/host_mock.py:
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
+ * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
+ * Scripts/webkitpy/layout_tests/lint_test_expectations.py:
+ * Scripts/webkitpy/layout_tests/port: Removed.
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
+ * Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py:
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ * Scripts/webkitpy/port: Copied from Tools/Scripts/webkitpy/layout_tests/port.
+ * Scripts/webkitpy/port/apple.py:
+ * Scripts/webkitpy/port/base.py:
+ * Scripts/webkitpy/port/base_unittest.py:
+ * Scripts/webkitpy/port/config_unittest.py:
+ (ConfigTest.test_default_configuration__standalone):
+ * Scripts/webkitpy/port/driver_unittest.py:
+ * Scripts/webkitpy/port/efl.py:
+ * Scripts/webkitpy/port/efl_unittest.py:
+ * Scripts/webkitpy/port/factory.py:
+ * Scripts/webkitpy/port/factory_unittest.py:
+ * Scripts/webkitpy/port/gtk.py:
+ * Scripts/webkitpy/port/gtk_unittest.py:
+ * Scripts/webkitpy/port/image_diff.py:
+ * Scripts/webkitpy/port/image_diff_unittest.py:
+ * Scripts/webkitpy/port/leakdetector_unittest.py:
+ * Scripts/webkitpy/port/mac.py:
+ * Scripts/webkitpy/port/mac_unittest.py:
+ * Scripts/webkitpy/port/mock_drt.py:
+ * Scripts/webkitpy/port/mock_drt_unittest.py:
+ * Scripts/webkitpy/port/port_testcase.py:
+ * Scripts/webkitpy/port/qt.py:
+ * Scripts/webkitpy/port/qt_unittest.py:
+ * Scripts/webkitpy/port/server_process_unittest.py:
+ * Scripts/webkitpy/port/test.py:
+ * Scripts/webkitpy/port/win.py:
+ * Scripts/webkitpy/port/win_unittest.py:
+ * Scripts/webkitpy/port/xvfbdriver.py:
+ * Scripts/webkitpy/port/xvfbdriver_unittest.py:
+ * Scripts/webkitpy/tool/bot/botinfo_unittest.py:
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ * Scripts/webkitpy/tool/commands/perfalizer_unittest.py:
+ * Scripts/webkitpy/tool/commands/queries.py:
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ * Scripts/webkitpy/tool/servers/rebaselineserver.py:
+ * Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py:
+
+2013-04-16 Commit Queue <rniwa@webkit.org>
+
+ Unreviewed, rolling out r148498.
+ http://trac.webkit.org/changeset/148498
+ https://bugs.webkit.org/show_bug.cgi?id=114669
+
+ Appears to have broken EWS (Requested by rniwa on #webkit).
+
+ * Scripts/webkitpy/common/config/ews.json: Removed.
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem):
+ (AbstractEarlyWarningSystem.__init__):
+ (AbstractEarlyWarningSystem.handle_script_error.does):
+ (GtkEWS):
+ (GtkWK2EWS):
+ (EflEWS):
+ (QtEWS):
+ (QtWK2EWS):
+ (WinEWS):
+ (MacEWS):
+ (MacWK2EWS):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSystemTest._default_expected_logs):
+ (_test_ews):
+ (test_ewses):
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Isolate Early Warning System definitions into a JSON
+ https://bugs.webkit.org/show_bug.cgi?id=114558
+
+ Reviewed by Benjamin Poulain.
+
+ Added ews.json to common/config, and made tool/commands/__init__.py call
+ AbstractEarlyWarningSystem.load_ews_classes to instantiate classes based on ews.json.
+
+ * Scripts/webkitpy/common/config/ews.json: Extracted from earlywarningsystem.py.
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem):
+ (AbstractEarlyWarningSystem.__init__):
+ (AbstractEarlyWarningSystem.load_ews_classes): Added. Loads ews.json.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSystemTest._default_expected_logs):
+ (_test_ews):
+ (test_ewses):
+
+2013-04-15 Ryosuke Niwa <rniwa@webkit.org>
+
+ WKR gets stuck when there are many merges
+ https://bugs.webkit.org/show_bug.cgi?id=114632
+
+ Reviewed by Andreas Kling.
+
+ Move the last revision forward when it exists in a branch.
+ Otherwise, we'll be stuck looping over revisions made to merge patches.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot.next_work_item):
+
+2013-04-15 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] Missing a few packages for building on stock Fedora
+ https://bugs.webkit.org/show_bug.cgi?id=113916
+
+ Reviewed by Philippe Normand.
+
+ * gtk/install-dependencies: add packages that are missing.
+
+2013-04-15 Zan Dobersek <zdobersek@igalia.com>
+
+ REGRESSION (r148360): Failure in webkitpy.tool.multicommandtool_unittest.MultiCommandToolTest.test_command_help
+ https://bugs.webkit.org/show_bug.cgi?id=114602
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/tool/multicommandtool_unittest.py:
+ (CommandTest.test_required_arguments): Reset the static argument_names variable on the TrivialCommand
+ interface so its value doesn't leak into the following tests.
+
+2013-04-15 Zan Dobersek <zandobersek@gmail.com>
+
+ Deprecate land-cowboy in favor of land-cowhand
+ https://bugs.webkit.org/show_bug.cgi?id=104470
+
+ Reviewed by Darin Adler.
+
+ Move the LandCowboy command implementation under the LandCowhand command and deprecate the former.
+
+ * Scripts/webkitpy/tool/commands/download.py:
+ (LandCowhand):
+ (LandCowboy):
+ (LandCowboy._prepare_state):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ (test_land_cowhand): Adjust the unit tests by testing both LandCowhand and LandCowboy,
+ also checking the deprecation message in the output of the latter.
+
+2013-04-15 Jonathan Liu <net147@gmail.com>
+
+ Improve Windows cmd.exe detection
+ https://bugs.webkit.org/show_bug.cgi?id=114620
+
+ Reviewed by Jocelyn Turcotte.
+
+ The current detection code handles Windows cmd.exe and Cygwin shell
+ but not does not handle MSYS shell correctly. Simplify and improve the
+ detection by checking MINGW_IN_SHELL instead as used in other places
+ (e.g. qt_functions.prf).
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2013-04-15 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [webkitpy] Use $NUMBER_OF_PROCESSORS in Executive.cpu_count()
+ https://bugs.webkit.org/show_bug.cgi?id=114506
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.cpu_count): Modify function in order to use the environment
+ variable $NUMBER_OF_PROCESSORS if it is defined and it is an integer
+ greater than 0.
+
+2013-04-15 Xan Lopez <xlopez@igalia.com>
+
+ [BlackBerry] ASSERT in StyleResolver::ensureScopeResolver()
+ https://bugs.webkit.org/show_bug.cgi?id=114615
+
+ Reviewed by Carlos Garcia Campos.
+
+ Enable the style scoped feature if we have support for it.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+
+2013-04-15 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] QtMultimedia not used when GStreamer is not found
+ https://bugs.webkit.org/show_bug.cgi?id=111842
+
+ Reviewed by Philippe Normand.
+
+ Fallback to using QtMultimedia when native libraries are not found.
+
+ * qmake/mkspecs/features/features.prf:
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix attempt for webkitbot. Unicodify everything.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Whois.execute):
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ webkitbot should provide full name, email address, and IRC nicknames on whois
+ https://bugs.webkit.org/show_bug.cgi?id=114494
+
+ Reviewed by Benjamin Poulain.
+
+ A response like the one below is useless. Improve it:
+ webkitbot: rniwa: zdobersek is zdobersek (zandobersek@gmail.com). Why do you ask?
+
+ We now report full name, email address, committer/reviewer status, and IRC nickname.
+
+ Also teach webkitbot how to respond to ping.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (PingPong): Moved
+ (PingPong.execute):
+ (Whois._full_record_and_nick): Renamed and rewritten.
+ (Whois.execute):
+
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_whois): Updated test cases as needed.
+
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_help): Added ping.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot): Teached WKR how to respond to hi.
+
+2013-04-13 Anders Carlsson <andersca@apple.com>
+
+ Add form delegate method that's invoked right before sending a submit event to a form element
+ https://bugs.webkit.org/show_bug.cgi?id=114575
+
+ Reviewed by Dan Bernstein.
+
+ Add a test.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm: Added.
+ (-[FormDelegate willSendSubmitEventToForm:inFrame:withValues:]):
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+ * TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
+ (TestWebKitAPI::Util::toSTD):
+ Don't crash when a null NSString is passed to toSTD.
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Python test fix attempt after r148360.
+
+ * Scripts/webkitpy/tool/multicommandtool_unittest.py:
+ (test_command_help):
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Merge AbstractDeclarativeCommand into Command as a comment suggests
+ https://bugs.webkit.org/show_bug.cgi?id=114559
+
+ Reviewed by Antti Koivisto.
+
+ Merged two classes as the comment right above AbstractDeclarativeCommand suggested.
+ We need to merge a lot more classes to make webkitpy hackable.
+
+ * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
+ (AbstractLocalServerCommand):
+ (AbstractLocalServerCommand.__init__):
+ * Scripts/webkitpy/tool/commands/abstractsequencedcommand.py:
+ (AbstractSequencedCommand):
+ (AbstractSequencedCommand.__init__):
+ * Scripts/webkitpy/tool/commands/adduserstogroups.py:
+ (AddUsersToGroups):
+ * Scripts/webkitpy/tool/commands/analyzechangelog.py:
+ (AnalyzeChangeLog):
+ (AnalyzeChangeLog.__init__):
+ * Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py:
+ * Scripts/webkitpy/tool/commands/bugfortest.py:
+ (BugForTest):
+ * Scripts/webkitpy/tool/commands/bugsearch.py:
+ (BugSearch):
+ * Scripts/webkitpy/tool/commands/chromechannels.py:
+ (ChromeChannels):
+ (__init__):
+ * Scripts/webkitpy/tool/commands/download.py:
+ (AbstractPatchProcessingCommand):
+ * Scripts/webkitpy/tool/commands/findusers.py:
+ (FindUsers):
+ * Scripts/webkitpy/tool/commands/openbugs.py:
+ (OpenBugs):
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (BugsToCommit):
+ (PatchesInCommitQueue):
+ (PatchesToCommitQueue):
+ (PatchesToCommitQueue.__init__):
+ (PatchesToReview):
+ (PatchesToReview.__init__):
+ (PatchesToReview.execute):
+ (WhatBroke):
+ (ResultsFor):
+ (FailureReason):
+ (FindFlakyTests):
+ (TreeStatus):
+ (CrashLog):
+ (PrintExpectations):
+ (PrintExpectations.__init__):
+ (PrintBaselines):
+ (PrintBaselines.__init__):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (AbstractQueue.__init__):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ * Scripts/webkitpy/tool/commands/suggestnominations.py:
+ (SuggestNominations):
+ (SuggestNominations.__init__):
+ * Scripts/webkitpy/tool/commands/upload.py:
+ (CommitMessageForCurrentDiff):
+ (CommitMessageForCurrentDiff.__init__):
+ (CleanPendingCommit):
+ (CleanReviewQueue):
+ (AssignToCommitter):
+ (PostCommits):
+ (PostCommits.__init__):
+ (MarkBugFixed):
+ (MarkBugFixed.__init__):
+ (CreateBug):
+ (CreateBug.__init__):
+ * Scripts/webkitpy/tool/multicommandtool.py:
+ (Command):
+ (Command.__init__):
+ (Command.main):
+ (HelpCommand):
+ (HelpCommand.__init__):
+ * Scripts/webkitpy/tool/multicommandtool_unittest.py:
+ (TrivialCommand):
+ (TrivialCommand.__init__):
+ (LikesToRetry):
+ (LikesToRetry.__init__):
+ (CommandTest.test_name_with_arguments):
+ (CommandTest.test_required_arguments):
+ (test_command_help):
+
+2013-04-13 Ed Bartosh <bartosh@gmail.com>
+
+ [EFL] --minimal build fails with error: 'ViewModeInvalid' is not a member of 'WebCore::Page'
+ https://bugs.webkit.org/show_bug.cgi?id=114048
+
+ Reviewed by Gyuyoung Kim.
+
+ Wrapped view media related code in #if ENABLE(VIEW_MODE_CSS_MEDIA)
+
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::setViewModeMediaFeature):
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Merge watchlistloader into host since it's an unnecessary indirection
+ https://bugs.webkit.org/show_bug.cgi?id=114555
+
+ Reviewed by Antti Koivisto.
+
+ We don't need a class to load a file.
+
+ * Scripts/webkitpy/common/host.py:
+ (Host.watch_list):
+ * Scripts/webkitpy/common/watchlist/watchlistloader.py: Removed.
+ * Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py: Removed.
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Rename JSONResultsGeneratorBase to JSONResultsGenerator
+ https://bugs.webkit.org/show_bug.cgi?id=114553
+
+ Reviewed by Philippe Normand.
+
+ Renamed now that we've got rid of the old JSONResultsGenerator in r148352.
+
+ * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
+ (JSONLayoutResultsGenerator):
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ (JSONResultsGenerator):
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
+ (JSONGeneratorTest._test_json_generation):
+ (JSONGeneratorTest._verify_json_results):
+
+2013-04-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove more Chromium specific code from webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=114552
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/webkitpy/common/host.py:
+ (Host.checkout):
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ (JSONResultsGeneratorBase):
+ (JSONResultsGeneratorBase.__init__):
+ (JSONResultsGeneratorBase._is_results_all_of_type):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port):
+ (Port.expected_filename):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (PatchProcessingQueue._new_port_name_from_old):
+ (CommitQueue.did_pass_testing_ews):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._results_url):
+ (Rebaseline._builder_with_name):
+ * Scripts/webkitpy/tool/mocktool.py:
+ (MockTool.irc):
+
+2013-04-13 Zan Dobersek <zdobersek@igalia.com>
+
+ Fix flakiness dashboard unit test failures
+ https://bugs.webkit.org/show_bug.cgi?id=114518
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix the current failures in unit tests for the flakiness dashboard by adjusting failing
+ test cases to simulate loading the builders list from the webkit.org build master, replacing
+ the Chromium builders and platforms that are used in tests with builders and platforms for the
+ Apple Mac Lion WebKit2 port, and removing two test cases that were testing Chromium-specific
+ functionality of the dashboard.
+
+ This is sort of an interlude to the flakiness dashboard cleanup, with the removal of Chromium-specific
+ code and hopefully general simplification of the dashboard codebase coming in near future.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (resetGlobals):
+ (test):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-04-12 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: Make AccessibilityUIElementIOS.mm build on iOS
+
+ Reviewed by Chris Fleizach.
+
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: Declare
+ -_accessibilityPath from the WebAccessibilityObjectWrapper
+ class.
+ (_CGPathEnumerationIteration): Remove unused CGPoint* variable.
+
+2013-04-12 Jeffrey Pfau <jpfau@apple.com>
+
+ Unreviewed, remove an old email address for myself.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-04-12 Adenilson Cavalcanti <cavalcantii@gmail.com>
+
+ [WK2] WebPageProxy loadURL() won't work when called just after terminateProcess()
+ https://bugs.webkit.org/show_bug.cgi?id=110743
+
+ Reviewed by Benjamin Poulain.
+
+ Adding a new test file to check if loading a page just after WebProcess
+ has crashed (or was terminated) works. The test executes the
+ following steps (Load, Crash, Load), thus stressing WebProcess
+ reattach and process termination code path.
+
+ * TestWebKitAPI/GNUmakefile.am:
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp:
+ (TestWebKitAPI::setPageLoaderClient):
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp: Added.
+ (TestWebKitAPI):
+ (WebKit2CrashLoader):
+ (TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
+ (TestWebKitAPI::WebKit2CrashLoader::loadUrl):
+ (TestWebKitAPI::WebKit2CrashLoader::crashWebProcess):
+ (TestWebKitAPI::didFinishLoad):
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKit2/WebKit2.pro:
+
+2013-04-12 Ryosuke Niwa <rniwa@webkit.org>
+
+ [Mac] REGRESSION: Auto substitution strips new lines
+ https://bugs.webkit.org/show_bug.cgi?id=114537
+
+ Reviewed by Enrica Casucci.
+
+ Add a rule to replace "helloleworld" by "hello\nworld" for testing purpose.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+
+2013-04-09 Roger Fong <roger_fong@apple.com>
+
+ Re-enable WinEWS tests.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-04-12 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Split GtkAuthenticationDialog in two widgets
+ https://bugs.webkit.org/show_bug.cgi?id=103644
+
+ Reviewed by Xan Lopez.
+
+ * gtk/generate-gtkdoc:
+ (get_webkit2_options): Do not generate api docs for
+ WebKitAuthenticationDialog which is private in WebKit2.
+ (get_webkit1_options): Do not generate api docs for
+ webkitauthenticationdialog which is private in WebKit1.
+
+2013-04-12 Ryosuke Niwa <rniwa@webkit.org>
+
+ WebKit Queues should capitalize K in Wk2
+ https://bugs.webkit.org/show_bug.cgi?id=114524
+
+ Reviewed by Philippe Normand.
+
+ * QueueStatusServer/model/queues.py:
+ (Queue.display_name):
+
+2013-04-12 Ryosuke Niwa <rniwa@webkit.org>
+
+ [Mac] Enable spellchecking tests added in r141471
+ https://bugs.webkit.org/show_bug.cgi?id=108525
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow):
+ (resetDefaultsToConsistentValues):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2013-04-12 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK] Enable WebKit2 building on GTK EWSs
+ https://bugs.webkit.org/show_bug.cgi?id=114500
+
+ Reviewed by Philippe Normand.
+
+ Add configuration in order to be able to setup GTK EWSs building
+ WebKit2. A new queue gtk-wk2-ews is added.
+
+ * QueueStatusServer/config/queues.py:
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port):
+ (GtkWK2Port):
+ (GtkWK2Port.build_webkit_command):
+ (GtkWK2Port.run_webkit_tests_command):
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_gtk_port):
+ (DeprecatedPortTest):
+ (DeprecatedPortTest.test_gtk_wk2_port):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (GtkWK2EWS):
+
+2013-04-12 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Chromium scripts
+ https://bugs.webkit.org/show_bug.cgi?id=114492
+
+ Reviewed by Benjamin Poulain.
+
+ * Scripts/run-chromium-webkit-unit-tests: Removed.
+ * Scripts/update-webkit-chromium: Removed.
+
+2013-04-12 Commit Queue <rniwa@webkit.org>
+
+ Unreviewed, rolling out r148262.
+ http://trac.webkit.org/changeset/148262
+ https://bugs.webkit.org/show_bug.cgi?id=114493
+
+ Cairo dep should now build, rolling r148247 back in (Requested
+ by zdobersek on #webkit).
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject):
+ * gtk/jhbuild.modules:
+
+2013-04-11 Commit Queue <rniwa@webkit.org>
+
+ Unreviewed, rolling out r148247.
+ http://trac.webkit.org/changeset/148247
+ https://bugs.webkit.org/show_bug.cgi?id=114490
+
+ Cairo dep fails to build on builders due to missing EGL
+ headers (Requested by zdobersek on #webkit).
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject):
+ * gtk/jhbuild.modules:
+
+2013-04-11 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Add accelerated 2D canvas support using cairo-gl
+ https://bugs.webkit.org/show_bug.cgi?id=104672
+
+ Reviewed by Alejandro G. Castro.
+
+ Since the value of ACCELERATED_2D_CANVAS relies on some somewhat unusual
+ dependencies, don't override value of the setting determined by configure.
+ This will make it easier for people using build-webkit, but not the
+ WebKit JHBuild.
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject): Add a blacklist for settings to never override.
+ * gtk/jhbuild.modules: Build CairoGL.
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ build.webkit.org should link to webkit-queues instead of webkit-commit-queue
+ https://bugs.webkit.org/show_bug.cgi?id=114477
+
+ Reviewed by Benjamin Poulain.
+
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Leaks builder should not be triggered upon new commits
+ https://bugs.webkit.org/show_bug.cgi?id=114475
+
+ Reviewed by Jessie Berlin.
+
+ Don't trigger them on new checkins. Wait for Mountain Lion (Build), which already triggers
+ the leak builder when builds are done.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-04-11 Kalev Lember <kalevlember@gmail.com>
+
+ [GTK] Windows build failure after r136056
+ https://bugs.webkit.org/show_bug.cgi?id=114121
+
+ Reviewed by Martin Robinson.
+
+ * TestWebKitAPI/config.h: Make sure defines are correct for other
+ Windows ports than apple-win.
+
+2013-04-11 Ojan Vafai <ojan@chromium.org>
+
+ Remove myself from watchlists.
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix. Don't hard-code queues.webkit.org at least during the transition.
+
+ * QueueStatusServer/templates/statusbubble.html:
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Use webkit-queues.appspot.com instead of webkit-commit-queue.appspot.com
+ https://bugs.webkit.org/show_bug.cgi?id=114397
+
+ Reviewed by Benjamin Poulain.
+
+ Reland the patch since Alan appears to have finished the migration.
+
+ * Scripts/webkitpy/common/net/statusserver.py:
+ (StatusServer):
+
+2013-04-11 Brian Holt <brian.holt@samsung.com>
+
+ [Gtk] Combo boxes should be arrow-out-of-able similar to list boxes when caret-browsing is enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=76796
+
+ Reviewed by Chris Fleizach.
+
+ Make the Gtk window for the DRT a toplevel so that it gets the
+ focus from the window manager when the test starts.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (main):
+
+2013-04-04 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Use CSS4 image-rendering to determing image scaling quality
+ https://bugs.webkit.org/show_bug.cgi?id=113405
+
+ Reviewed by Simon Fraser.
+
+ Introduce new flag to enable experimental support for CSS4 Images.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove code for Chromium from wkbuild.py
+ https://bugs.webkit.org/show_bug.cgi?id=114423
+
+ Reviewed by Benjamin Poulain.
+
+ * BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
+ (_should_file_trigger_build):
+ * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
+ (ShouldBuildTest):
+
+2013-04-11 Philippe Normand <pnormand@igalia.com>
+
+ Unreviewed, update my IRC nickname.
+
+ * Scripts/webkitpy/common/config/committers.py: I no longer use philn-tp.
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove the rest of Chromium code from webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=114420
+
+ Reviewed by Benjamin Poulain.
+
+ * Scripts/webkitpy/common/config/urls.py:
+ (view_revision_url):
+ * Scripts/webkitpy/common/host.py:
+ (Host._engage_awesome_locale_hacks):
+ (Host.initialize_scm):
+ (Host):
+ * Scripts/webkitpy/common/host_mock.py:
+ (MockHost.__init__):
+ (MockHost.checkout):
+ * Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py: Removed.
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ (JSONResultsGeneratorBase._insert_generic_metadata):
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectationParser._tokenize_line):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (ExpectationSyntaxTests.test_bare_name_and_bugs):
+ (ExpectationSyntaxTests.test_warnings):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.skips_perf_test):
+ (Port.path_to_test_expectations_file):
+ (Port._port_flag_for_scripts):
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_function_definition):
+ (check_include_line):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (OrderOfIncludesTest.test_check_wtf_includes):
+ (WebKitStyleTest.test_webkit_export_check):
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+ (TestExpectationsTestCase.test_valid_expectations):
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Rollout.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_whois):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_help):
+ * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
+ (SheriffBotTest.test_command_aliases):
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ roll-chromium-deps doesn't roll DEPS
+ https://bugs.webkit.org/show_bug.cgi?id=114421
+
+ Reviewed by Antti Koivisto.
+
+ Roll DEPS. Rolling DEPS. Rolled DEPS.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (RollChromiumDEPS.execute):
+
+2013-04-11 Glenn Adams <glenn@skynav.com>
+
+ [webkitpy] Remove lingering return_exit_code usage in scm_mock and rebaselineserver.
+ https://bugs.webkit.org/show_bug.cgi?id=114418
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ (MockSCM.add): Remove optional remove_exit_code argument.
+ (MockSCM.add_list): Remove optional remove_exit_code argument and return value.
+ * Scripts/webkitpy/tool/servers/rebaselineserver.py:
+ (_rebaseline_test): Use ScriptError to capture SCM.add() failure and exit code.
+ (_move_test_baselines): Use ScriptError to capture SCM.add() failure and exit code.
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Fix roll-chromium-deps and hi.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Hi.execute):
+ (RollChromiumDEPS.execute):
+
+2013-04-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove webkitpy code to roll Chromium DEPS
+ https://bugs.webkit.org/show_bug.cgi?id=114415
+
+ Reviewed by Benjamin Poulain.
+
+ Removed the code to roll Chromium DEPS in WebKit.
+
+ * Scripts/webkitpy/common/checkout/checkout.py:
+ (Checkout.bug_id_for_this_commit):
+ * Scripts/webkitpy/common/checkout/checkout_mock.py:
+ (MockCheckout.commit_message_for_this_commit):
+ * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+ (CheckoutTest.test_suggested_reviewers):
+ * Scripts/webkitpy/common/checkout/deps.py: Removed.
+ * Scripts/webkitpy/common/checkout/deps_mock.py: Removed.
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (RollChromiumDEPS): Teach webkitbot a sense of humor.
+ (RollChromiumDEPS.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_create_bug):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_revert):
+ * Scripts/webkitpy/tool/bot/sheriff.py:
+ (Sheriff.post_rollout_patch):
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/roll.py: Removed.
+ * Scripts/webkitpy/tool/commands/roll_unittest.py: Removed.
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py: Removed.
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps.py: Removed.
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps_unittest.py: Removed.
+
+2013-04-11 Glenn Adams <glenn@skynav.com>
+
+ [webkitpy] SVNTest fails four tests when using subversion client 1.7 or later
+ https://bugs.webkit.org/show_bug.cgi?id=114386
+
+ Reviewed by Benjamin Poulain.
+
+ Subversion client 1.7 uses a new locking scheme that invalidates the technique used
+ in test_svn_lock(), so skip that test for 1.7 (or later) until a new technique
+ can be implemented. Further, 1.7 changed svn add to not add intermediate directories
+ by default and to return exit code 1 if a file/dir had already been added.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (test_svn_lock): Skip body of test if subversion client 1.7 or later.
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.add_list): Use --parents option and handle exit code 1 if subversion client 1.7 or later.
+
+2013-04-10 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed.
+
+ * GNUmakefile.am: Removing extra whitespace that's producing warnings.
+
+2013-04-10 Glenn Adams <glenn@skynav.com>
+
+ [webkitpy] Remove unused return_exit_code argument and returned values from SCM.{add,add_list}
+ https://bugs.webkit.org/show_bug.cgi?id=114410
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.add_list): Remove optional return_exit_code argument. Remove return value.
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.add): Remove optional return_exit_code argument.
+ (SCM.add_list): Remove optional return_exit_code argument.
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.add_list): Remove optional return_exit_code argument. Remove return value.
+
+2013-04-10 Eric Seidel <eric@webkit.org>
+
+ Remove myself from the watchlists, I'm getting too much bug mail. :)
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-10 Commit Queue <rniwa@webkit.org>
+
+ Unreviewed, rolling out r148158.
+ http://trac.webkit.org/changeset/148158
+ https://bugs.webkit.org/show_bug.cgi?id=114405
+
+ We need to migrate status data (Requested by rniwa on
+ #webkit).
+
+ * Scripts/webkitpy/common/net/statusserver.py:
+ (StatusServer):
+
+2013-04-10 Benjamin Poulain <bpoulain@apple.com>
+
+ Mass remove all the empty directories
+
+ Rubberstamped by Ryosuke Niwa.
+
+ * BuildSlaveSupport/gtk/crashmon/log: Removed.
+ * BuildSlaveSupport/gtk/xvfb/log: Removed.
+ * DumpRenderTree/ForwardingHeaders/wtf: Removed.
+ * DumpRenderTree/unix/TestNetscapePlugin/ForwardingHeaders/WebKit: Removed.
+ * MiniBrowser/gtk/WebBundle: Removed.
+ * MiniBrowser/win: Removed.
+ * QtTestPlatformPlugin/mac: Removed.
+ * Scripts/webkitpy/tool/bot/testdata: Removed.
+ * Scripts/webkitpy/tool/commands/data/rebaselineserver: Removed.
+ * efl/ImageDiff: Removed.
+ * iExploder/htdocs: Removed.
+ * iExploder/iexploder-1.7.2/output: Removed.
+ * iExploder/tools: Removed.
+ * qmake/config.tests/libexecdir: Removed.
+ * qmake/config.tests/libjpeg: Removed.
+ * qmake/config.tests/libpng: Removed.
+
+2013-04-10 Ryosuke Niwa <rniwa@webkit.org>
+
+ Use webkit-queeus.appspot.com instead of webkit-commit-queue.appspot.com
+ https://bugs.webkit.org/show_bug.cgi?id=114397
+
+ Reviewed by Benjamin Poulain.
+
+ * Scripts/webkitpy/common/net/statusserver.py:
+ (StatusServer):
+
+2013-04-10 Adam Barth <abarth@webkit.org>
+
+ Remove abarth from watchlists
+ https://bugs.webkit.org/show_bug.cgi?id=114390
+
+ Reviewed by Ryosuke Niwa.
+
+ I'm trying to cut down on the amount of bugmail I get so that I'll have
+ more of a chance to notice a piece of bugmail directed at me.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-10 Ryosuke Niwa <rniwa@webkit.org>
+
+ webkit-test-results.appspot.com loads the dashboard for Chromium by default
+ https://bugs.webkit.org/show_bug.cgi?id=114381
+
+ Reviewed by Benjamin Poulain.
+
+ Changed the defaults.
+
+ * TestResultServer/static-dashboards/builders.js:
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (currentBuilderGroupCategory):
+
+2013-04-10 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Chromium EWS bots from the queue status server
+ https://bugs.webkit.org/show_bug.cgi?id=113988
+
+ Reviewed by Benjamin Poulain.
+
+ Removed Chromium EWS bots. Also updated it to use webkit-queues.appspot.com.
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/config/queues.py:
+ * QueueStatusServer/model/queues.py:
+ (Queue.short_name):
+ (Queue.display_name):
+ * QueueStatusServer/model/queues_unittest.py:
+ (QueueTest.test_short_name):
+ (QueueTest.test_display_name):
+ (QueueTest.test_name_with_underscores):
+ * QueueStatusServer/templates/activebots.html:
+
+2013-04-10 Ojan Vafai <ojan@chromium.org>
+
+ Change all instances of test-results.appspot.com to webkit-test-results.appspot.com
+ https://bugs.webkit.org/show_bug.cgi?id=114370
+
+ Reviewed by Ryosuke Niwa.
+
+ Finish the transition of WebKit over to it's own instance of the flakiness dashboard.
+ Unfortunately, there's no way to test this until this is committed and there is
+ a master restart.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/notifications_unittests.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
+ * TestResultServer/generate_builders_json.py:
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/loader.js:
+
+2013-04-10 Glenn Adams <glenn@skynav.com>
+
+ [Qt] Fix regression to test-webkitpy.
+ https://bugs.webkit.org/show_bug.cgi?id=114368
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (PortFactory._default_port): Return qt-linux instead of chromium-linux as default port for linux/freebsd.
+ (PortFactory.get): Remove obsolete chromium port related code.
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.default_child_processes): Prevent type error if can't determine total memory.
+
+2013-04-10 Anders Carlsson <andersca@apple.com>
+
+ Remove unneeded headers from FrameLoader.h
+ https://bugs.webkit.org/show_bug.cgi?id=114223
+
+ Reviewed by Geoffrey Garen.
+
+ Add back headers implicitly included by other headers.
+
+ * WebKitTestRunner/WorkQueueManager.cpp:
+
+2013-04-10 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Include a crash-fixing patch for the at-spi2-atk dependency
+ https://bugs.webkit.org/show_bug.cgi?id=114365
+
+ Reviewed by Martin Robinson.
+
+ Add a patch for the at-spi2-atk 2.8.0 dependency that is applied through the Jhbuild setup.
+ The patch addresses crashes in the tally_event_reply method. It is already committed into the
+ at-spi2-atk source tree and will be available with the next stable release, after which the
+ patch should be removed and the dependency version bumped.
+
+ * gtk/jhbuild.modules:
+ * gtk/patches/at-spi2-atk-2.8.0-null-check-after-cleanup.patch: Added.
+
+2013-04-10 Brent Fulgham <bfulgham@webkit.org>
+
+ [WinCairo] Unreviewed build fix. Correct DropBox download link.
+
+ * Scripts/update-webkit-wincairo-libs: Revise download URL to
+ match change in DropBox server behavior.
+
+2013-04-09 Geoffrey Garen <ggaren@apple.com>
+
+ Removed an annoying message from svn-create-patch
+ https://bugs.webkit.org/show_bug.cgi?id=114332
+
+ Reviewed by Alexey Proskuryakov.
+
+ I see this message basically every time I write a patch, so it must not
+ be true.
+
+ * Scripts/svn-create-patch:
+ (generateDiff):
+
+2013-04-10 Anton Obzhirov <a.obzhirov@samsung.com>
+
+ [GTK] Add support for Page Visibility
+ https://bugs.webkit.org/show_bug.cgi?id=97324
+
+ Reviewed by Sam Weinig.
+
+ Implemented test runner API for page visibility layout tests.
+
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::resetPageVisibility):
+ (TestRunner::setPageVisibility):
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-04-10 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [ATK] REGRESSION(r148033): Add a stub for AccessibilityUIElement::pathDescription().
+ https://bugs.webkit.org/show_bug.cgi?id=114342
+
+ Reviewed by Gyuyoung Kim.
+
+ Commit 148033 only added an implementation for the Mac port, which made
+ other ports fail most tests since loading the injected bundle failed
+ with a missing symbol.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::pathDescription):
+
+2013-04-10 Artur Moryc <a.moryc@samsung.com>
+
+ [EFL] Add spell checking option to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=114282
+
+ Reviewed by Ryosuke Niwa.
+
+ Spell checking is enabled by adding a flag (t/text-checking)
+ with launching MiniBrowser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+
+2013-04-10 Zan Dobersek <zdobersek@igalia.com>
+
+ REGRESSION (r146518): WebKit2APITests/TestInspector is failing
+ https://bugs.webkit.org/show_bug.cgi?id=113281
+
+ Reviewed by Darin Adler.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Remove the skip entry for the WebKit2APITests/TestInspector unit test.
+
+2013-04-09 Glenn Adams <glenn@skynav.com>
+
+ Fix trivial test-webkitpy regression introduced by http://trac.webkit.org/changeset/148075.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (RunTest.test_build_check):
+
+2013-04-09 Glenn Adams <glenn@skynav.com>
+
+ [webkitpy] Remove chromium ports.
+ https://bugs.webkit.org/show_bug.cgi?id=114326
+
+ Reviewed by Dirk Pranke.
+
+ As a side effect, also:
+
+ - remove chromium builders from webkitpy.layout_tests.port.builders
+ - remove chromium builders from rebaseline
+ - rewrite chromium dependent tests in rebaseline_unittest
+ - remove chromium platform from garden-o-matic
+ - select apple platform as default platform in garden-o-matic
+ - remove chromium port dependencies from a few other tests (run_webkit_tests_integrationtest, factory_unittest, style.checkers.test_expectations_unittest)
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+ (BaselineOptimizerTest.test_move_baselines):
+ (BaselineOptimizerTest.test_efl):
+ (BaselineOptimizerTest.test_no_add_mac_future):
+ (BaselineOptimizerTest.test_win_does_not_drop_to_win_7sp0):
+ (BaselineOptimizerTest.test_common_directory_includes_root):
+ (BaselineOptimizerTest.test_complex_shadowing):
+ (BaselineOptimizerTest.test_virtual_ports_filtered):
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_linux.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_unittest.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (platform_options):
+ (PortFactory):
+ * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+ (FactoryTest.test_qt):
+ (FactoryTest.test_get_from_builder_name):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (RunTest.test_build_check):
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+ (TestExpectationsTestCase.test_determine_port_from_expectations_path):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (Rebaseline._builders_to_pull_from):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (_BaseTestCase):
+ (_BaseTestCase.setUp):
+ (TestRebaselineTest.setUp):
+ (TestRebaselineTest.test_baseline_directory):
+ (test_rebaseline_updates_expectations_file):
+ (test_rebaseline_does_not_include_overrides):
+ (test_rebaseline_test):
+ (test_rebaseline_test_and_print_scm_changes):
+ (test_rebaseline_and_copy_test):
+ (test_rebaseline_and_copy_test_no_existing_result):
+ (test_rebaseline_and_copy_test_with_lion_result):
+ (test_rebaseline_and_copy_no_overwrite_test):
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+
+2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ newcommitbot (WKR) requires a subversion checkout
+ https://bugs.webkit.org/show_bug.cgi?id=114309
+
+ Reviewed by Benjamin Poulain.
+
+ Directly talk to the subversion server instead of relying on a local checkout.
+ This allows us to run WKR off of a git clone.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot.next_work_item):
+ (NewCommitBot.process_work_item):
+
+2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ webkitbot refers to sheriffbot in help
+ https://bugs.webkit.org/show_bug.cgi?id=114307
+
+ Reviewed by Benjamin Poulain.
+
+ Fixed the bug by proxying the IRC nickname of "sheriffbot" via Sheriff object.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Help):
+ (Help.execute):
+ (RollChromiumDEPS.execute):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_help):
+ * Scripts/webkitpy/tool/bot/sheriff.py:
+ (Sheriff.name):
+
+2013-04-06 Roger Fong <roger_fong@apple.com>
+
+ Kill old processes between runs on WinEWS bots.
+ Temporarily disable tests to let bots catch up again.
+
+ * EWSTools/start-queue-win.sh:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-04-09 Glenn Adams <glenn@skynav.com>
+
+ [webkitpy] Remove chromium deprecated port support.
+ https://bugs.webkit.org/show_bug.cgi?id=114228
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port): Removed chromium ports from port name to port class mapping.
+ (ChromiumPort): Removed.
+ (ChromiumAndroidPort): Removed.
+ (ChromiumXVFBPort): Removed.
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_chromium_port): Removed.
+ (DeprecatedPortTest.test_chromium_android_port): Removed.
+ (DeprecatedPortTest.test_chromium_xvfb_port): Removed.
+ * Scripts/webkitpy/tool/steps/update_unittest.py:
+ (UpdateTest.test_update_command_non_interactive): Use mac instead of chromium ports.
+ (UpdateTest.test_update_command_interactive): Use mac instead of chromium ports.
+
+2013-04-09 Chris Fleizach <cfleizach@apple.com>
+
+ AX: The bounding paths should be made available through accessibility
+ https://bugs.webkit.org/show_bug.cgi?id=113817
+
+ Reviewed by David Kilzer.
+
+ Add a pathDescription property for testing so that it's possible
+ to verify that a path is being returned correctly.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (getPathDescriptionCallback):
+ (AccessibilityUIElement::pathDescription):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (_CGPathEnumerationIteration):
+ (AccessibilityUIElement::pathDescription):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::pathDescription):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::pathDescription):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::pathDescription):
+ (WTR):
+
+2013-04-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL] Declare TEST_THEME_DIR in a single place.
+ https://bugs.webkit.org/show_bug.cgi?id=114285
+
+ Reviewed by Anders Carlsson.
+
+ Adapt to the renaming of `THEME_DIR' to `TEST_THEME_DIR'.
+
+ * DumpRenderTree/efl/CMakeLists.txt:
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::createView):
+ (DumpRenderTreeChrome::createInspectorView):
+ (DumpRenderTreeChrome::initialize):
+ (DumpRenderTreeChrome::onDownloadRequest):
+ * EWebLauncher/CMakeLists.txt:
+ * EWebLauncher/main.c:
+ (findThemePath):
+ * EWebLauncher/url_bar.c:
+ (url_bar_add):
+ * MiniBrowser/efl/CMakeLists.txt:
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/PlatformEfl.cmake:
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+
+2013-04-09 ChangSeok Oh <changseok.oh@collabora.com>
+
+ [GTK][AC] upversion of clutter and its dependecy
+ https://bugs.webkit.org/show_bug.cgi?id=114016
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Upversion of clutter to 1.14, cogl to 1.14 and clutter-gtk to 1.4.4.
+
+ * gtk/jhbuild-optional.modules:
+
+2013-04-09 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [WK2] Drop WebProcess capabilities on Linux using seccomp filters
+ https://bugs.webkit.org/show_bug.cgi?id=89875
+
+ Reviewed by Maciej Stachowiak.
+
+ Add unit tests to verify if the handling of the open, openat, creat syscall
+ is being done right. We check if the Read/Write/ReadAndWrite permissions
+ are respected, if the canonical path is being resolved and if
+ the permissions are falling back to the topmost parent directory with a
+ policy set when the directory being opened has no policy.
+
+ We also test if any attempt of blocking SIGSYS is silently ignored.
+ SIGSYS cannot be blocked because in it's handler is where we hook
+ syscalls to the broker process.
+
+ Also added libseccomp to EFL's jhbuild to make the life of developers
+ willing to help easier.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp: Added.
+ (TestWebKitAPI):
+ (SeccompEnvironment):
+ (TestWebKitAPI::SeccompEnvironment::SetUp):
+ (TestWebKitAPI::SeccompEnvironment::TearDown):
+ (TestWebKitAPI::dummyHandler):
+ (TestWebKitAPI::TEST):
+ (TestWebKitAPI::stressTest):
+ * efl/jhbuild.modules:
+ * qmake/mkspecs/features/features.pri:
+
+2013-04-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ REGRESSION: Autocorrection doesn't work in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=113846
+
+ Reviewed by Alexey Proskuryakov.
+
+ The problem was that we were replacing NSSpellCheck's dictionary with our own
+ in DumpRenderTree but we were not adding necessary corrections to the dictionary.
+
+ Fixed the bug by having NSSpellChecker correct "mesage" and "wouldn" to "message"
+ and "would" respectively in DumpRenderTree.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+
+2013-04-09 Benjamin Poulain <benjamin@webkit.org>
+
+ Remove the gyp files for Tools
+ https://bugs.webkit.org/show_bug.cgi?id=114248
+
+ Reviewed by Ryosuke Niwa.
+
+ * DumpRenderTree/DumpRenderTree.gyp: Removed.
+ * DumpRenderTree/DumpRenderTree.gyp/.gitignore: Removed.
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp: Removed.
+ * DumpRenderTree/DumpRenderTree.gypi: Removed.
+ * TestWebKitAPI/TestWebKitAPI.gyp: Removed.
+ * TestWebKitAPI/TestWebKitAPI.gyp/.gitignore: Removed.
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp: Removed.
+ * TestWebKitAPI/TestWebKitAPI.gypi: Removed.
+
+2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ WKR (new-commit-bot) is too slow
+ https://bugs.webkit.org/show_bug.cgi?id=110087
+
+ Reviewed by Geoffrey Garen.
+
+ Running "svn up" or "git svn fetch" is way too slow (takes 2-3 minutes) on the machine I'm running the bot.
+ Just run "svn log -r <revision>" instead to cut down the delay.
+
+ Unfortunately, this work around doesn't work in a git checkout but who cares given I'm the one running the bot.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot):
+ (NewCommitBot.next_work_item):
+ (NewCommitBot._is_empty_log):
+ (NewCommitBot._update_checkout):
+
+2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix. Can't remove appendCustomBuildFlags.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (appendCustomBuildFlags):
+
+2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Chromium builders from build.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=113990
+
+ Reviewed by Benjamin Poulain.
+
+ Removed.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (InstallGtkDependencies):
+ (RunUnitTests.start):
+ (RunWebKit2Tests.start):
+ (Factory.__init__):
+ (unitTestsSupported):
+ (TestFactory.__init__):
+ (BuildAndTestFactory.__init__):
+ (BuildAndPerfTestFactory.__init__):
+ (BuildAndPerfTestWebKit2Factory.__init__):
+ (DownloadAndPerfTestFactory.__init__):
+ (loadBuilderConfig):
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2013-04-08 Benjamin Poulain <benjamin@webkit.org>
+
+ Remove HTML Notification
+ https://bugs.webkit.org/show_bug.cgi?id=114231
+
+ Reviewed by Ryosuke Niwa.
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-04-08 Glenn Adams <glenn@skynav.com>
+
+ Remove chromium EWS support, and fix broken test.
+ https://bugs.webkit.org/show_bug.cgi?id=114221
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractChromiumEWS): Removed.
+ (ChromiumLinuxEWS): Removed.
+ (ChromiumLinuxDebugEWS): Removed.
+ (ChromiumWindowsEWS): Removed.
+ (ChromiumAndroidEWS): Removed.
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSystemTest): Fix misspelled class name.
+ (test_ewses): Fix entry point name to ensure test is run.
+
+2013-04-08 Patrick Gansterer <paroga@webkit.org>
+
+ [WIN] Remove WebKit2 source code
+ https://bugs.webkit.org/show_bug.cgi?id=114096
+
+ Reviewed by Anders Carlsson.
+
+ Remove the windows specific parts of the MiniBrowser.
+
+ * MiniBrowser/MiniBrowser.vcproj: Removed.
+ * MiniBrowser/MiniBrowserLauncher.vcproj: Removed.
+ * MiniBrowser/MiniBrowserPostBuild.cmd: Removed.
+ * MiniBrowser/MiniBrowserPreBuild.cmd: Removed.
+ * MiniBrowser/win/BrowserView.cpp: Removed.
+ * MiniBrowser/win/BrowserView.h: Removed.
+ * MiniBrowser/win/BrowserWindow.cpp: Removed.
+ * MiniBrowser/win/BrowserWindow.h: Removed.
+ * MiniBrowser/win/MiniBrowser.cpp: Removed.
+ * MiniBrowser/win/MiniBrowser.h: Removed.
+ * MiniBrowser/win/MiniBrowser.rc: Removed.
+ * MiniBrowser/win/main.cpp: Removed.
+ * MiniBrowser/win/resource.h: Removed.
+ * MiniBrowser/win/stdafx.cpp: Removed.
+ * MiniBrowser/win/stdafx.h: Removed.
+
+2013-04-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Use port 6665 instead of 6667 since the latter doesn't seem to work well.
+
+ * Scripts/webkitpy/common/config/irc.py:
+
+2013-04-08 Arunprasad Rajkumar <arunprasadr@nds.com>
+
+ Call Netscape Plugin's toString() and valueOf() instead of providing default implementation
+ https://bugs.webkit.org/show_bug.cgi?id=113139
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters:
+ * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+ * DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp: Added.
+ (ToStringAndValueOfObject):
+ (ToStringAndValueOfObject::ToStringAndValueOfObject):
+ (ScriptableObject):
+ (ToStringAndValueOfObject::ScriptableObject::hasMethod):
+ (ToStringAndValueOfObject::ScriptableObject::invoke):
+ (ToStringAndValueOfObject::ScriptableObject::pluginTest):
+ (ToStringAndValueOfObject::NPP_GetValue):
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ * GNUmakefile.am:
+
+2013-04-08 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK] Bump gnome-themes-standard to 3.6.0
+ https://bugs.webkit.org/show_bug.cgi?id=114155
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild.modules: As now we depend on GTK+ 3.6.0 bump the
+ dependency of gnome-themes-standard accordingly.
+
+2013-04-08 David Levin <levin@chromium.org>
+
+ Remove my watchlist entries.
+ https://bugs.webkit.org/show_bug.cgi?id=114180
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL] Mark ShouldGoToBackForwardListItem API test as failing
+ https://bugs.webkit.org/show_bug.cgi?id=114161
+
+ Reviewed by Gyuyoung Kim.
+
+ Mark ShouldGoToBackForwardListItem API test as failing for EFL port
+ as it is crashing due to Bug 111074.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2013-04-07 David Kilzer <ddkilzer@apple.com>
+
+ Remove the rest of SVG_DOM_OBJC_BINDINGS
+ <http://webkit.org/b/114112>
+
+ Reviewed by Geoffrey Garen.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ - Remove --svg-dom-objc-bindings switch.
+ * qmake/mkspecs/features/features.pri:
+ - Remove reference to ENABLE_SVG_DOM_OBJC_BINDINGS.
+
+2013-04-07 Ed Bartosh <bartosh@gmail.com>
+
+ [EFL] -minimal build fails with error: WebCore::FrameSelection::notifyAccessibilityForSelectionChange()
+ https://bugs.webkit.org/show_bug.cgi?id=114089
+
+ Reviewed by Chris Fleizach.
+
+ Wrapped accessibility related code in #if HAVE(ACCESSIBILITY)
+ * DumpRenderTree/AccessibilityController.cpp:
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::DumpRenderTreeChrome):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+ (DumpRenderTreeChrome):
+
+2013-04-06 Laszlo Gombos <l.gombos@samsung.com>
+
+ Build fix after r147857, remove remaining USE(JSC) guards.
+
+ Unreviewed.
+
+ * DumpRenderTree/config.h:
+ * TestWebKitAPI/config.h:
+ * WebKitTestRunner/config.h:
+
+2013-04-06 Ryosuke Niwa <rniwa@webkit.org>
+
+ Rename sheriffbot to webkitbot
+ https://bugs.webkit.org/show_bug.cgi?id=114109
+
+ Reviewed by Benjamin Poulain.
+
+ Renamed since sheriffbot will be used in Blink.
+
+ * Scripts/webkitpy/tool/commands/sheriffbot.py:
+ (SheriffBot):
+ (SheriffBot.begin_work_queue):
+
+2013-04-06 Oliver Hunt <oliver@apple.com>
+
+ Unify the many and varied stack trace mechanisms, and make the result sane.
+ https://bugs.webkit.org/show_bug.cgi?id=114072
+
+ Reviewed by Filip Pizlo.
+
+ The commandline jsc executable no longer requires arguments, so
+ I've made run-jsc work without them.
+
+ * Scripts/run-jsc:
+
+2013-04-06 Ed Bartosh <bartosh@gmail.com>
+
+ [EFL] build fails with error: 'UINT_MAX' was not declared in this scope
+ https://bugs.webkit.org/show_bug.cgi?id=114086
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp: Included limits.h
+
+2013-04-06 Zan Dobersek <zdobersek@igalia.com>
+
+ Remove remaining PLATFORM(CHROMIUM) guards in TestWebKitAPI, WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=114083
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove the remaining three occurrences of the PLATFORM(CHROMIUM) build guards
+ in TestWebKitAPI and WebKitTestRunner.
+
+ * TestWebKitAPI/config.h:
+ * TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
+ (TestWebKitAPI::InjectedBundleController::platformInitialize):
+ * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+ (WTR::InjectedBundle::platformInitialize):
+
+2013-04-06 Geoffrey Garen <ggaren@apple.com>
+
+ Rolled out 147820 and 147818 because they caused plugins tests to ASSERT
+ https://bugs.webkit.org/show_bug.cgi?id=114094
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/run-jsc:
+
+2013-04-05 Ojan Vafai <ojan@chromium.org>
+
+ Move the flakiness dashboard to the new instance at webkit-test-results.appspot.com
+ https://bugs.webkit.org/show_bug.cgi?id=114080
+
+ Reviewed by Ryosuke Niwa.
+
+ This way, the WebKit and Blink dashboard code can change as appropriate without
+ needing to consider the other project's needs. This still doesn't update the
+ buildbots to upload to the new location, or the dashboard code to pull the
+ results.json files from the new location, but it at least allows for changing the
+ UI code (e.g. the WebKit one can remove all knowledge of the Chromium bots).
+
+ * TestResultServer/app.yaml:
+
+2013-04-05 Ryosuke Niwa <rniwa@webkit.org>
+
+ Re-enable testing on the commit queue
+ https://bugs.webkit.org/show_bug.cgi?id=114078
+
+ Reviewed by Darin Adler.
+
+ Re-enabled the feature and the associated tests.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+ (CommitQueueTask.run):
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ (CommitQueueTaskTest._run_through_task):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (CommitQueueTest._mock_test_result):
+
+2013-04-05 Oliver Hunt <oliver@apple.com>
+
+ Unify the many and varied stack trace mechanisms, and make the result sane.
+ https://bugs.webkit.org/show_bug.cgi?id=114072
+
+ Reviewed by Filip Pizlo.
+
+ The commandline jsc executable no longer requires arguments, so
+ I've made run-jsc work without them.
+
+ * Scripts/run-jsc:
+
+2013-04-05 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Make SVG Group containers accessible elements
+ https://bugs.webkit.org/show_bug.cgi?id=113939
+
+ Reviewed by Simon Fraser.
+
+ Implement axController.elementAtPoint for iOS.
+ Implement a correct version of clickPoint for iOS.
+
+ * DumpRenderTree/ios/AccessibilityControllerIOS.mm:
+ (AccessibilityController::elementAtPoint):
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::clickPointX):
+ (AccessibilityUIElement::clickPointY):
+
+2013-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r147773 and r147774.
+ http://trac.webkit.org/changeset/147773
+ http://trac.webkit.org/changeset/147774
+ https://bugs.webkit.org/show_bug.cgi?id=114056
+
+ Causing some exceptions on AppEngine I don't understand
+ (Requested by rniwa on #webkit).
+
+ * QueueStatusServer/config/queues.py:
+ * QueueStatusServer/model/queues.py:
+ (Queue.short_name):
+ (Queue.display_name):
+ * QueueStatusServer/model/queues_unittest.py:
+ (QueueTest.test_short_name):
+ (QueueTest.test_display_name):
+ (QueueTest.test_name_with_underscores):
+
+2013-04-05 Geoffrey Garen <ggaren@apple.com>
+
+ Fixed run-bindings-tests by removing V8
+ https://bugs.webkit.org/show_bug.cgi?id=114053
+
+ Reviewed by Benjamin Poulain.
+
+ * Scripts/run-bindings-tests:
+ (main):
+
+2013-04-05 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix.
+
+ * QueueStatusServer/model/queues.py:
+ (Queue.short_name):
+ (Queue.display_name):
+
+2013-04-05 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Chromium EWS bots from the queue status server
+ https://bugs.webkit.org/show_bug.cgi?id=113988
+
+ Reviewed by Benjamin Poulain.
+
+ Removed Chromium EWS bots.
+
+ * QueueStatusServer/config/queues.py:
+ * QueueStatusServer/model/queues.py:
+ (Queue.short_name):
+ (Queue.display_name):
+ * QueueStatusServer/model/queues_unittest.py:
+ (QueueTest.test_short_name):
+ (QueueTest.test_display_name):
+ (QueueTest.test_name_with_underscores):
+
+2013-04-05 Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
+
+ [EFL] Enable indexed database
+ https://bugs.webkit.org/show_bug.cgi?id=107248
+
+ Reviewed by Alexis Menard.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-04-05 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Remove vestiges of Chromium bits from watchlists.
+ https://bugs.webkit.org/show_bug.cgi?id=114047
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitpy/common/config/watchlist: Removed vestiges.
+
+2013-04-05 Chris Fleizach <cfleizach@apple.com>
+
+ Add James Craig to the contributors list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-04-04 Kent Tamura <tkent@chromium.org>
+
+ Remove ChromiumPublicApi pattern, and cc/message rules for it.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-04 Benjamin Poulain <bpoulain@apple.com>
+
+ Temporarily disable the Python unittests broken by the commit queue not running layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=113997
+
+ Reviewed by Ryosuke Niwa.
+
+ Disable the tests until Ryosuke gets the time and hardware to have
+ a testing commit-queue.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ (CommitQueueTaskTest):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (CommitQueueTest):
+
+2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Chromium builders from build.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=113990
+
+ Reviewed by Benjamin Poulain.
+
+ Land the part to disable triggering of Chromium builders first so that we may start
+ deleting more Chromium code that breaks the update step.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-04-04 Benjamin Poulain <bpoulain@apple.com>
+
+ Remove Chromium's DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=113989
+
+ Reviewed by Kent Tamura.
+
+ On second thought, let's not go to Camelot. It is a silly place.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+
+2013-04-04 Geoffrey Garen <ggaren@apple.com>
+
+ Nixed the defunct chromium folder from DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=113993
+
+ Reviewed by Ryosuke Niwa.
+
+ * DumpRenderTree/chromium: Removed.
+ * DumpRenderTree/chromium/DRTDevToolsAgent.cpp: Removed.
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h: Removed.
+ * DumpRenderTree/chromium/DRTDevToolsClient.cpp: Removed.
+ * DumpRenderTree/chromium/DRTDevToolsClient.h: Removed.
+ * DumpRenderTree/chromium/DumpRenderTree.cpp: Removed.
+ * DumpRenderTree/chromium/ImageDiff.cpp: Removed.
+ * DumpRenderTree/chromium/LayoutTestHelper.mm: Removed.
+ * DumpRenderTree/chromium/LayoutTestHelperWin.cpp: Removed.
+ * DumpRenderTree/chromium/MockPlatform.cpp: Removed.
+ * DumpRenderTree/chromium/MockPlatform.h: Removed.
+ * DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp: Removed.
+ * DumpRenderTree/chromium/MockWebPrerenderingSupport.h: Removed.
+ * DumpRenderTree/chromium/Task.cpp: Removed.
+ * DumpRenderTree/chromium/Task.h: Removed.
+ * DumpRenderTree/chromium/TestEventPrinter.cpp: Removed.
+ * DumpRenderTree/chromium/TestEventPrinter.h: Removed.
+ * DumpRenderTree/chromium/TestNavigationController.cpp: Removed.
+ * DumpRenderTree/chromium/TestNavigationController.h: Removed.
+ * DumpRenderTree/chromium/TestNetscapePlugIn: Removed.
+ * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders: Removed.
+ * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit: Removed.
+ * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h: Removed.
+ * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h: Removed.
+ * DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h: Removed.
+ * DumpRenderTree/chromium/TestRunner: Removed.
+ * DumpRenderTree/chromium/TestRunner/public: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockConstraints.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockConstraints.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDTMFSenderHandler.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDTMFSenderHandler.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDataChannelHandler.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDataChannelHandler.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechInputController.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechInputController.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechRecognizer.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechRecognizer.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.mm: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
+ * DumpRenderTree/chromium/TestShell.cpp: Removed.
+ * DumpRenderTree/chromium/TestShell.h: Removed.
+ * DumpRenderTree/chromium/TestShellAndroid.cpp: Removed.
+ * DumpRenderTree/chromium/TestShellMac.mm: Removed.
+ * DumpRenderTree/chromium/TestShellPosix.cpp: Removed.
+ * DumpRenderTree/chromium/TestShellStub.cpp: Removed.
+ * DumpRenderTree/chromium/TestShellWin.cpp: Removed.
+ * DumpRenderTree/chromium/TestShellX11.cpp: Removed.
+ * DumpRenderTree/chromium/WebViewHost.cpp: Removed.
+ * DumpRenderTree/chromium/WebViewHost.h: Removed.
+ * DumpRenderTree/chromium/android_fallback_fonts.xml: Removed.
+ * DumpRenderTree/chromium/android_main_fonts.xml: Removed.
+ * DumpRenderTree/chromium/config.h: Removed.
+ * DumpRenderTree/chromium/fonts.conf: Removed.
+
+2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove the rebaseline queue server since nobody except maybe one person from Google uses it.
+
+ Rubber stamped by Benjamin Poulain.
+
+ * RebaselineQueueServer: Removed.
+ * RebaselineQueueServer/app.yaml: Removed.
+ * RebaselineQueueServer/handlers: Removed.
+ * RebaselineQueueServer/handlers/__init__.py: Removed.
+ * RebaselineQueueServer/handlers/builderqueue.py: Removed.
+ * RebaselineQueueServer/handlers/pages.py: Removed.
+ * RebaselineQueueServer/index.yaml: Removed.
+ * RebaselineQueueServer/main.py: Removed.
+ * RebaselineQueueServer/model: Removed.
+ * RebaselineQueueServer/model/__init__.py: Removed.
+ * RebaselineQueueServer/model/queueentry.py: Removed.
+ * RebaselineQueueServer/static: Removed.
+ * RebaselineQueueServer/static/builder-frame-empty.html: Removed.
+ * RebaselineQueueServer/static/styles.css: Removed.
+ * RebaselineQueueServer/templates: Removed.
+ * RebaselineQueueServer/templates/builder-picker.html: Removed.
+ * RebaselineQueueServer/templates/builder-queue-edit.html: Removed.
+ * RebaselineQueueServer/templates/builder-queue-list.html: Removed.
+ * RebaselineQueueServer/templates/home.html: Removed.
+
+2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Fix setup-commit-queue and temporarily disable testing on commit-queue
+ https://bugs.webkit.org/show_bug.cgi?id=113979
+
+ Reviewed by Benjamin Poulain.
+
+ Use commit-queue@webkit.org instead of webkit.bot.review@gmail.com in commit-queue,
+ and temporarily disable tests in commit-queue as we don't have enough resources at the moment.
+
+ * EWSTools/setup-commit-queue.sh:
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+ (CommitQueueTask.run):
+
+2013-04-04 Dirk Pranke <dpranke@chromium.org>
+
+ temporarily make flakiness dashboard work again webkit.org bots
+ https://bugs.webkit.org/show_bug.cgi?id=113972
+
+ Reviewed by Ojan Vafai.
+
+ This patch disables the chromium.org layout test bots TestExpectations
+ parsing temporarily until we can work out the right way to split into
+ two instances for webkit.org and chromium.org and figure out which
+ code to delete where :).
+
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+
+2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Fix webkitpy tests after r147678.
+
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (CommitQueueTest.test_commit_queue):
+ (test_manual_reject_during_processing):
+
+2013-04-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ The commit queue should use Mac MountainLion port
+ https://bugs.webkit.org/show_bug.cgi?id=113971
+
+ Reviewed by Lucas Forschler.
+
+ * EWSTools/setup-commit-queue.sh: Copied from Tools/EWSTools/GoogleComputeEngine/build-commit-queue.sh.
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (CommitQueue):
+
+2013-04-04 Dirk Pranke <dpranke@chromium.org>
+
+ turn off running tests on chromium linux EWS bots
+ https://bugs.webkit.org/show_bug.cgi?id=113959
+
+ Reviewed by Geoffrey Garen.
+
+ Now that the Chromium port is no longer being maintained
+ there's little point in running the tests. Soon we should
+ just shut this bot off altogether.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (ChromiumLinuxEWS):
+
+2013-04-04 Andrew Scherkus <scherkus@chromium.org>
+
+ Unreviewed. Removing feature-media-reviews@chromium.org from Media watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-04-04 Pierre Rossi <pierre.rossi@gmail.com>
+
+ Indentation fix to get webkit-patch working again after r147625
+
+ Unreviewed.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (MacEWS):
+ (MacWK2EWS):
+
+2013-04-04 Lucas Forschler <lforschler@apple.com>
+
+ Turn tests back on for Mac WK1/WK2 EWS.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (MacEWS):
+ (MacWK2EWS):
+
+2013-04-04 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK][WK2] MiniBrowser custom URI scheme support
+ https://bugs.webkit.org/show_bug.cgi?id=112419
+
+ Reviewed by Carlos Garcia Campos.
+
+ Add support for about URIs in MiniBrowser. An example about page is show
+ with URI "about:minibrowser", the rest of the cases it will show a
+ proper message explaining that the about page didn't exist.
+
+ Internally it uses "minibrowser-about" prefix instead of "about", but
+ from the user point of view it works with "about" prefix.
+
+ * MiniBrowser/gtk/BrowserWindow.c: Add miniBrowserAboutScheme constant.
+ (getInternalURI): Method to convert URIs from "about" prefix to
+ "minibrowser-about".
+ (getExternalURI): Opposite method.
+ (webViewURIChanged): Use "about" prefix to show the URI to users.
+ (webViewEnterFullScreen): Ditto.
+ (browser_window_load_uri): Use "minibrowser-about" prefix internally.
+ * MiniBrowser/gtk/main.c: Add miniBrowserAboutScheme constant.
+ (aboutURISchemeRequestCallback): Callback to manage about calls.
+ (main): Register the URI scheme to manage about URIs.
+
+2013-04-03 Roger Fong <roger_fong@apple.com>
+
+ Re-enable WinEWS tests.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-04-03 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK][Jhbuild] Move ATK to the main moduleset, bump ATK, at-spi2-(atk|core) versions to 2.8.0
+ https://bugs.webkit.org/show_bug.cgi?id=113883
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild-optional.modules: Remove the ATK entry as it is now placed in jhbuild.modules.
+ * gtk/jhbuild.modules: Add ATK to the list of webkitgtk-testing-dependencies metamodule, using the 2.8.0 version.
+ The at-spi2-core and at-spi2-atk versions are also increased to 2.8.0.
+
+2013-04-03 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK] Include Pango in jhbuild-optional.modules
+ https://bugs.webkit.org/show_bug.cgi?id=113878
+
+ Reviewed by Martin Robinson.
+
+ Since r147547 Pango 1.32.0 is required. Including the module in the
+ JHBuild optional moduleset.
+
+ * gtk/jhbuild-optional.modules: Add Pango module.
+
+2013-04-03 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Add getter for JSC TestRunner to DumpRenderTreeQt.
+ https://bugs.webkit.org/show_bug.cgi?id=113864
+
+ Moving setDefersLoading from TestRunnerQt to TestRunner
+ requires access to the non-Qt TestRunner.
+ As long as we instantiate both TestRunner and TestRunnerQt,
+ we need a separate getter for the non-Qt TestRunner instance.
+
+ Reviewed by Simon Hausmann.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebPage::resetSettings):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (DumpRenderTree::jscTestRunner):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::setDefersLoading):
+ Moving setDefersLoading from TestRunnerQt
+ to TestRunner.
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-04-03 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK][WK2] Unskip /webkit2/WebKitWebContext/uri-scheme
+ https://bugs.webkit.org/show_bug.cgi?id=104779
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Unskip /webkit2/WebKitWebContext/uri-scheme as it is
+ passing in current trunk.
+
+2013-04-03 Pierre Rossi <pierre.rossi@digia.com>
+
+ Fix HAVE(QTTESTSUPPORT) logic
+
+ build_qttestsupport has not been added to WEBKIT_CONFIG in detectFeatures,
+ resulting in HAVE(QTTESTSUPPORT) never being true.
+ Move that logic down in sanitizeFeatures.
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ * qmake/mkspecs/features/features.prf:
+
+2013-04-03 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Bump required versions of some dependencies
+ https://bugs.webkit.org/show_bug.cgi?id=113282
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild.modules: Update libsoup, glib, at-spi2 and gtk+ versions.
+
+2013-04-03 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
+
+ [GTK] gst-plugins-good fails to build with newer Linux(v4l2)
+ https://bugs.webkit.org/show_bug.cgi?id=113809
+
+ Reviewed by Philippe Normand.
+
+ Newer Linux kernels have removed some deprecated macros from v4l2
+ headers, causing gst-plugins-good's build to break. We don't need it
+ right now, so just disable it.
+
+ * gtk/jhbuild.modules: disable v4l2 usage in gst-plugins-good.
+
+2013-03-28 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
+
+ [Qt] Switch ContextMenu implementation to CROSS_PLATFORM_CONTEXT_MENU
+ https://bugs.webkit.org/show_bug.cgi?id=113535
+
+ Reviewed by Simon Hausmann.
+
+ Adding USE_CROSS_PLATFORM_CONTEXT_MENUS to WEBKIT_CONFIG.
+
+ * qmake/mkspecs/features/features.prf:
+
+2013-04-03 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Move logic of simple forwarding functions to TestRunner.
+ https://bugs.webkit.org/show_bug.cgi?id=113863
+
+ Reviewed by Simon Hausmann.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::setTextDirection):
+ (TestRunner::goBack):
+ (TestRunner::evaluateScriptInIsolatedWorld):
+ (TestRunner::addUserStyleSheet):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-04-03 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Disable media support using QuickTime if deployment target != SDK
+
+ We link to a single libWebKitSystemInterface static lib, so unless the
+ deployment target matches the SDK let's not pretend like we'll be able
+ to run on anything lower than the SDK version.
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/features.prf:
+
+2013-04-02 James Craig <james@cookiecrook.com>
+
+ AXRoleDescripton for DL is "list"; should be "description list"
+ https://bugs.webkit.org/show_bug.cgi?id=111665
+
+ Reviewed by Chris Fleizach.
+
+ Defining the role and description strings.
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+
+2013-04-02 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Disable running tests on Win EWS queue.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-04-02 Lucas Forschler <lforschler@apple.com>
+
+ Disable running tests on the MAC WK2 EWS queue.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (MacWK2EWS):
+
+2013-04-02 Julie Parent <jparent@chromium.org>
+
+ Dashboard refactor: Move dashboard specific history related features to History.
+ https://bugs.webkit.org/show_bug.cgi?id=113717
+
+ Reviewed by Ojan Vafai.
+
+ Each dashboard now creates its own History object, with a custom
+ configuration. This changes from just overriding global functions
+ to passing in callbacks for generatePage, handleValidHashParameter,
+ and handleQueryParameterChange. Same with passing in defaultStateValues
+ and DB_SPECIFIC_INVALIDATING_PARAMS, rather than overriding the global
+ variables.
+
+ All functions related to these features are now (mostly) private
+ function on History.
+
+ Loader no longer needs a loadingComplete callback, since it can just
+ initialize the history object itself.
+
+ * TestResultServer/static-dashboards/aggregate_results.js:
+ (handleValidHashParameter):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (generatePage):
+ (.switch.return):
+ (handleQueryParameterChange):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (resetGlobals):
+ * TestResultServer/static-dashboards/history.js:
+ (.):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+ * TestResultServer/static-dashboards/timeline_explorer.js:
+ (generatePage):
+ (initCurrentBuilderTestResults):
+ * TestResultServer/static-dashboards/treemap.js:
+ (generatePage):
+ (.switch.return):
+ (handleQueryParameterChange):
+
+2013-04-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r147401.
+ http://trac.webkit.org/changeset/147401
+ https://bugs.webkit.org/show_bug.cgi?id=113767
+
+ The patch makes it extremely hard to set up the dependencies
+ properly on the GTK builders (Requested by zdobersek on
+ #webkit).
+
+ * gtk/jhbuild.modules:
+
+2013-04-02 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Empty tooltip shown when hovering over popup menu items
+ https://bugs.webkit.org/show_bug.cgi?id=113382
+
+ Reviewed by Gyuyoung Kim.
+
+ Do not show the empty tooltip box if the text is null.
+
+ * MiniBrowser/efl/main.c:
+ (popup_menu_populate):
+
+2013-04-02 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Bump required versions of some dependencies
+ https://bugs.webkit.org/show_bug.cgi?id=113282
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild.modules: Update libsoup, glib, at-spi2 and gtk+ versions.
+
+2013-04-01 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r147319.
+ http://trac.webkit.org/changeset/147319
+ https://bugs.webkit.org/show_bug.cgi?id=113707
+
+ The unit test is still failing on the buildbot (Requested by
+ zdobersek on #webkit).
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2013-04-01 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK][WK2] Unskip /webkit2/WebKitWebContext/uri-scheme
+ https://bugs.webkit.org/show_bug.cgi?id=104779
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Unskip /webkit2/WebKitWebContext/uri-scheme as it is
+ passing in current trunk.
+
+2013-03-31 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r147289.
+ http://trac.webkit.org/changeset/147289
+ https://bugs.webkit.org/show_bug.cgi?id=113678
+
+ broke Win7 (dbg) build (Requested by shinyak|gardener on
+ #webkit).
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/public/WebUserMediaClientMock.h.
+ (WebTestRunner):
+ (WebUserMediaClientMock):
+ (WebTestRunner::WebUserMediaClientMock::~WebUserMediaClientMock):
+ (WebTestRunner::WebUserMediaClientMock::taskList):
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_function_definition):
+
+2013-03-31 Adam Barth <abarth@webkit.org>
+
+ configure-svn-config.sh fails
+ https://codereview.chromium.org/13392007/
+
+ Reviewed by Eric Seidel.
+
+ This script was trying to use "svn checkout" to dowload a file from
+ svn.webkit.org, but "svn checkout" only works with directories.
+ Instead, we should use "svn export".
+
+ * EWSTools/configure-svn-config.sh:
+
+2013-03-31 Wei Jia <wjia@chromium.org>
+
+ Allow WebUserMediaClientMock to be used by client
+ https://bugs.webkit.org/show_bug.cgi?id=113633
+
+ Reviewed by Adam Barth.
+
+ Export WebUserMediaClientMock.
+ Allow files in chromium/TestRunner/public to have WEBKIT_EXPORT.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebUserMediaClientMock.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h.
+ (WebUserMediaClientMock):
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h: Removed.
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_function_definition):
+
+2013-03-29 Alexey Proskuryakov <ap@apple.com>
+
+ Expose FeatureObserver data to WebKit clients
+ https://bugs.webkit.org/show_bug.cgi?id=113613
+
+ Reviewed by Sam Weinig.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage): Added an initializer for featuresUsedInPage.
+
+2013-03-29 Greg Hughes <ghughes@apple.com>
+
+ Allow multiple searchKeys to be passed to AXUIElementCopyParameterizedAttributeValue
+ https://bugs.webkit.org/show_bug.cgi?id=112276
+
+ Reviewed by Chris Fleizach.
+
+ Added support to test accessibility search predicates with multiple keys.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (uiElementForSearchPredicateCallback):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ * DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp:
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::uiElementForSearchPredicate):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::uiElementForSearchPredicate):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::uiElementForSearchPredicate):
+
+2013-03-29 Ryosuke Niwa <rniwa@webkit.org>
+
+ Fix a typo in r147147 to fix Mac EWS.
+
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (PatchProcessingQueue._new_port_name_from_old):
+
+2013-03-28 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL] Build break with latest EFL libraries after r146265
+ https://bugs.webkit.org/show_bug.cgi?id=113558
+
+ Unreviewed build fix.
+
+ * TestWebKitAPI/PlatformWebView.h:
+ * WebKitTestRunner/PlatformWebView.h:
+
+2013-03-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Unreviewed. Fix build break when running --update-efl in WebKit EFL.
+
+ * efl/jhbuild.modules: Remove to run autogen.sh in libgcrypt autogen. It causes configuration fail
+ in libgcrypt build.
+
+2013-03-28 Lucas Forschler <lforschler@apple.com>
+
+ Disable running tests on Mac EWS until we can find a way to keep the queue at a reasonable length.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (MacEWS):
+
+2013-03-28 Ryosuke Niwa <rniwa@webkit.org>
+
+ Use the right OS name on Mac EWS instead of mac-future.
+
+ Rubber-stamped by Dirk Pranke.
+
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (PatchProcessingQueue._new_port_name_from_old):
+ (PatchProcessingQueue.begin_work_queue):
+ (PatchProcessingQueue._upload_results_archive_for_patch):
+
+2013-03-28 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la
+ https://bugs.webkit.org/show_bug.cgi?id=112546
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: Reference the platformgtk_cppflags amongst the libWebCoreInternals' CPPFLAGS. GtkVersioning.c file has
+ moved back to Source/WebCore/platform. Fix an indentation issue as well.
+
+2013-03-28 Ming Xie <mxie@blackberry.com>
+
+ [BlackBerry] Committer Email Updates
+ https://bugs.webkit.org/show_bug.cgi?id=113435
+
+ Reviewed by Rob Buis.
+
+ Add the @blackberry.com email address for all our BlackBerry
+ WebKit committers. This is the first step for our email address
+ migration.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-28 Philippe Normand <pnormand@igalia.com>
+
+ [jhbuild] GStreamer system plugins conflict with the ones built in jhbuild
+ https://bugs.webkit.org/show_bug.cgi?id=113508
+
+ Reviewed by Martin Robinson.
+
+ Prevent the GStreamer plugin scanner to load system-wide
+ plugins. Only the ones built in JHBuild should be loaded and used
+ at runtime.
+
+ * efl/jhbuildrc:
+ * gtk/jhbuildrc:
+
+2013-03-27 Philippe Normand <pnormand@igalia.com>
+
+ [GTK] run-launcher --gtk -2 fails on a WK2-only build
+ https://bugs.webkit.org/show_bug.cgi?id=113386
+
+ Reviewed by Carlos Garcia Campos.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName): The WebKit2GTK .so name change from 1.0
+ version to 3.0. Reflect this change so the builtDylibPathForName
+ function doesn't fail to report the library as found.
+
+2013-03-28 Jaehun Lim <ljaehun.lim@samsung.com>
+
+ [CMAKE] Build fix after r147052. Add WebKit2/Shared/Plugins to include path
+ https://bugs.webkit.org/show_bug.cgi?id=113484
+
+ Unreviewed build fix.
+
+ Add "WebKit2/Shared/Plugins" to include path for TestWebKitAPI, WebKitTestRunner.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * WebKitTestRunner/CMakeLists.txt:
+
+2013-03-27 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ Revision for the internal jhbuild is too old
+ https://bugs.webkit.org/show_bug.cgi?id=113324
+
+ Reviewed by Martin Robinson.
+
+ Update the minimum required version to a point where jhbuild won't
+ fail installing packages when trying to remove a symlink to a directory.
+
+ * jhbuild/jhbuild-wrapper: Updated revision.
+
+2013-03-27 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK][jhbuild] gst-plugins-good mixes system libsoup-gnome with custom libsoup
+ https://bugs.webkit.org/show_bug.cgi?id=113203
+
+ Reviewed by Philippe Normand.
+
+ We build our libsoup without GNOME support. gst-plugins-good does separate
+ pkg-config checks for libsoup-gnome and libsoup, causing the build to use
+ libsoup-gnome from the system and soup from the jhbuild prefix. This may lead to
+ build failures as the headers of those diverge. We do not use souphttpsrc, so
+ disable it when building gst-plugins-good.
+
+ * gtk/jhbuild.modules: disable soup support in gst-plugins-good.
+
+2013-03-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix after r146852. Please another reference to the Lion leaks builder.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-03-27 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK][webkitpy] A huge list of warnings about missing bugs in expectations when running NRWT with WKTR
+ https://bugs.webkit.org/show_bug.cgi?id=113421
+
+ Reviewed by Dirk Pranke.
+
+ When running the layout tests with WKTR through NRWT, the GTK port also uses the generic WK2 TestExpectations file.
+ This file contains a large amount of expectations that are not listing a specific bug modifier, so this produces an
+ equally large amount of warnings due to the GTK port preferring for every expectation to have the bug modifier present
+ in the GTK-specific TestExpectations files.
+
+ To avoid this only enable the warnings only when not using WKTR.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.warn_if_bug_missing_in_test_expectations):
+
+2013-03-27 Antti Koivisto <antti@apple.com>
+
+ Fix Zalan's email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-27 Csaba Osztrogonác <ossy@webkit.org>
+
+ master.cfg cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=113195
+
+ Reviewed by Ryosuke Niwa.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+
+2013-03-27 Csaba Osztrogonác <ossy@webkit.org>
+
+ master.cfg fine-tuning for Qt Mountain Lion Release bot
+ https://bugs.webkit.org/show_bug.cgi?id=113191
+
+ Reviewed by Ryosuke Niwa.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+ - Rename the slave due to its location change.
+ - Update the platform of the slave.
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunQtAPITests): Enable running WK2 API tests on Qt.
+ (RunQtAPITests.start):
+ (RunWebKit2Tests.start): Force pixel tests on the Qt Mountain Lion Release builder.
+ (BuildAndTestWebKit2Factory): Added. (Build WK1 and WK2 too, but run only WK2 tests.)
+
+2013-03-27 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][jhbuild] Evas fails to build when Wayland is present on the system
+ https://bugs.webkit.org/show_bug.cgi?id=113403
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ As of Evas 1.7.5, when Wayland is detected on the system, support for
+ both Wayland SHM and Wayland EGL is automatically enabled in autoconf.
+ The code, however, seems to depend on a few other flags which must be
+ explicitly enabled.
+
+ If those additional GL-related options are passed, we end up
+ having issues on the WebKit side, so disable Wayland support for
+ now.
+
+ * efl/jhbuild.modules:
+
+2013-03-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r146864.
+ http://trac.webkit.org/changeset/146864
+ https://bugs.webkit.org/show_bug.cgi?id=113391
+
+ causes crashes on Wk2 EFL release bot (Requested by drott on
+ #webkit).
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-03-27 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [jhbuild] Correctly specify an alternate number of make jobs.
+ https://bugs.webkit.org/show_bug.cgi?id=113396
+
+ Reviewed by Philippe Normand.
+
+ So far, we were using the `MAKEFLAGS' environment variable to pass the
+ number of compilation jobs we wanted to jhbuild. jhbuild itself, on the
+ other hand, prefers to use the `jobs' variable from jhbuildrc for that.
+
+ We now behave more closely to the rest of the WebKit tools by first
+ checking the `NUMBER_OF_PROCESSORS' environment variable and, if it is
+ not set, just letting jhbuild itself figure out how many jobs to use.
+
+ * efl/jhbuildrc:
+ * gtk/jhbuildrc:
+
+2013-03-27 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Remove Qt specific WorkQueueItem definitions.
+ https://bugs.webkit.org/show_bug.cgi?id=112891
+
+ This patch is preparation work for removing
+ WorkQueue related code from TestRunnerQt and
+ replacing it with generic TestRunner code.
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::queueBackNavigation):
+ (TestRunnerQt::queueForwardNavigation):
+ (TestRunnerQt::queueLoadHTMLString):
+ (TestRunnerQt::queueReload):
+ (TestRunnerQt::queueLoadingScript):
+ (TestRunnerQt::queueNonLoadingScript):
+ (TestRunner::queueLoad):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+ * DumpRenderTree/qt/WorkQueueItemQt.cpp:
+ (LoadItem::invoke):
+ (LoadHTMLStringItem::invoke):
+ (LoadAlternateHTMLStringItem::invoke):
+ (ReloadItem::invoke):
+ (ScriptItem::invoke):
+ (BackForwardItem::invoke):
+ * DumpRenderTree/qt/WorkQueueItemQt.h:
+ (LoadAlternateHTMLStringItem::LoadAlternateHTMLStringItem):
+ (LoadAlternateHTMLStringItem):
+
+2013-03-26 Julie Parent <jparent@chromium.org>
+
+ Flakiness dashboard: simplify logic around which tests to show.
+ https://bugs.webkit.org/show_bug.cgi?id=113250
+
+ Reviewed by Ojan Vafai.
+
+ The different filters for showing results are only used for layout
+ tests, otherwise, we show everything.
+
+ Change the defaults to false (what layout tests used), and only
+ look at the values when viewing layout tests.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (htmlForTestsWithExpectationsButNoFailures):
+ (shouldHideTest):
+
+2013-03-26 Isaac Levy <ilevy@google.com>
+
+ Update bots on test-results.appspot
+ https://bugs.webkit.org/show_bug.cgi?id=113333
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/builders.jsonp:
+
+2013-03-26 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed GTK gardening.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): A follow-up to 146859, skipping the complete WebKit2APITests/TestInspector unit test.
+
+2013-03-26 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Enable release/debug/2/webkit2 options for run-qtwebkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=113287
+
+ Reviewed by Jocelyn Turcotte.
+
+ * Scripts/run-qtwebkit-tests:
+ (Options.__init__):
+
+2013-03-26 Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
+
+ [EFL] Enable IndexedDB by default
+ https://bugs.webkit.org/show_bug.cgi?id=107248
+
+ Reviewed by Laszlo Gombos.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ Enable IndexedDB by default on EFL.
+
+2013-03-26 Alan Cutter <alancutter@chromium.org>
+
+ Sheriffbot should explain rollout failures in a human readable form.
+ https://bugs.webkit.org/show_bug.cgi?id=107092
+
+ Reviewed by Ryosuke Niwa.
+
+ Improved sheriffbot's error reporting when a rollout command fails to reverse diff files (the most common failure).
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Rollout._check_diff_failure):
+ (Rollout.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_rollout):
+
+2013-03-26 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed GTK gardening.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Skipping a failing unit test after r146518.
+
+2013-03-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove Lion leaks builder
+ https://bugs.webkit.org/show_bug.cgi?id=113252
+
+ Reviewed by Andreas Kling.
+
+ Removed.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-03-25 Kent Tamura <tkent@chromium.org>
+
+ Rename ENABLE_INPUT_TYPE_DATETIME
+ https://bugs.webkit.org/show_bug.cgi?id=113254
+
+ Reviewed by Kentaro Hara.
+
+ Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
+ Actually I'd like to remove the code, but we shouldn't remove it yet
+ because we shipped products with it on some platforms.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-03-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove one more line that was intended to be removed in r146657.
+
+ * Scripts/webkitpy/layout_tests/models/test_run_results.py:
+ (summarize_results):
+
+2013-03-25 Roger Fong <roger_fong@apple.com>
+
+ No longer run bindings tests on WinEWS bots which are causing hangs on the bots.
+ Re-enable WinEWS tests.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (WinPort.run_bindings_tests_command):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r146793.
+ http://trac.webkit.org/changeset/146793
+ https://bugs.webkit.org/show_bug.cgi?id=113248
+
+ Fix did not work (Requested by rfong on #webkit).
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ REGRESSION(r146657): Test failures reported incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=113223
+
+ Reviewed by Dirk Pranke.
+
+ The bug was caused by BuildBotPrinter not taking the new behavior into account.
+
+ Fixed the bug by exposing enabled_pixel_tests_in_retry flag via ResultDetails object and have BuildBotPrinter
+ treat ['TEXT', 'IMAGE+TEXT'] as a regular failure when the flag is set true.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run):
+
+ * Scripts/webkitpy/layout_tests/models/test_run_results.py:
+ (RunDetails.__init__):
+ (summarize_results): Remove the line I intended to remove in r146657.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (logging_run): Return details instead of the exit code.
+ (run_and_capture): Ditto.
+
+ (RunTest.test_full_results_html):
+ (RunTest.test_hung_thread):
+ (RunTest.test_no_tests_found):
+ (RunTest.test_no_tests_found_2):
+ (RunTest.test_repeat_each_iterations_num_tests):
+ (RunTest.test_run_singly_actually_runs_tests):
+ (RunTest.test_test_list):
+ (RunTest.test_missing_and_unexpected_results):
+ (RunTest.test_pixel_test_directories):
+ (RunTest.test_missing_and_unexpected_results_with_custom_exit_code):
+ (RunTest.test_crash_with_stderr):
+ (RunTest.test_no_image_failure_with_image_diff):
+ (RunTest.test_crash_log):
+ (RunTest.test_exit_after_n_failures_upload):
+ (RunTest.test_results_directory_absolute):
+ (RunTest.test_results_directory_relative):
+ (RunTest.test_retrying_and_flaky_tests):
+ (RunTest.test_retrying_force_pixel_tests): Added a test case to ensure enabled_pixel_tests_in_retry is set.
+ (RunTest.test_retrying_uses_retries_directory):
+ (RunTest.test_reftest_should_not_use_naming_convention_if_not_listed_in_reftestlist):
+ (RunTest.test_output_diffs):
+ (EndToEndTest.test_reftest_with_two_notrefs):
+ (RebaselineTest.test_reset_results):
+ (RebaselineTest.test_missing_results):
+ (RebaselineTest.test_new_baseline):
+
+ * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
+ (BuildBotPrinter.print_results):
+ (BuildBotPrinter.print_unexpected_results):
+ (BuildBotPrinter.print_unexpected_results.add_result): Don't treat ['TEXT', 'IMAGE+TEXT'] as flaky
+ when we forced pixel tests in retry (i.e. pixel test was initially disabled).
+
+2013-03-25 Julie Parent <jparent@chromium.org>
+
+ Dashboard refactor: Move cross dashboard history related code into history.js.
+ https://bugs.webkit.org/show_bug.cgi?id=113104
+
+ Reviewed by Ojan Vafai.
+
+ All functions relating to cross dashboard behavior move from being
+ globals to methods on the history.History object. Names stay the same,
+ except many are made private, ones that should have been constants now
+ are, and the long standing TODO to change "currentState" to
+ dashboardSpecificState is done.
+
+ We now create a global history object in dashboard_base, as an
+ intermediate measure. Once the dashboard specific code is
+ added to history, each DB will need to create its own, and this
+ global will be eliminated.
+
+ * TestResultServer/static-dashboards/aggregate_results.js:
+ (handleValidHashParameter):
+ (htmlForBuilder):
+ (rawValuesHTML):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseDashboardSpecificParameters):
+ (defaultValue):
+ (currentBuilderGroupCategory):
+ (currentBuilderGroupName):
+ (handleLocationChange):
+ (expectationsMap):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (generatePage):
+ (.switch.return):
+ (platformAndBuildType):
+ (individualTests):
+ (substringList):
+ (processMissingAndExtraExpectations):
+ (pathToFailureLog):
+ (showPopupForBuild):
+ (htmlForTestsWithExpectationsButNoFailures):
+ (shouldHideTest):
+ (isCrossBuilderView):
+ (tableHeaders):
+ (htmlForSingleTestRow):
+ (htmlForTableColumnHeader):
+ (generatePageForExpectationsUpdate):
+ (handleUpdate):
+ (nextUpdate):
+ (setUpdateIndex):
+ (htmlForIndividualTestOnAllBuildersWithResultsLinks):
+ (.appendExpectationsItem):
+ (loadExpectations):
+ (.dummyNode.onload):
+ (loadExpectationsLayoutTests):
+ (appendExpectations):
+ (htmlForNavBar):
+ (checkBoxToToggleState):
+ (linkHTMLToToggleState):
+ (generatePageForBuilder):
+ (isInvalidKeyForCrossBuilderView):
+ (handleQueryParameterChange):
+ (showLegend):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (resetGlobals):
+ (test):
+ * TestResultServer/static-dashboards/history.js:
+ (.):
+ * TestResultServer/static-dashboards/history_unittests.js:
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+ * TestResultServer/static-dashboards/timeline_explorer.js:
+ (generatePage):
+ (initCurrentBuilderTestResults):
+ (selectBuild):
+ (showResultsDelta):
+ * TestResultServer/static-dashboards/treemap.js:
+ (generatePage):
+ (.switch.return):
+ (handleFocus):
+ * TestResultServer/static-dashboards/ui.js:
+
+2013-03-25 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Enable WinEWS tests again.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-25 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ [HarfBuzz] ICU detection fix in HarfBuzz obsoletes our workaround
+ https://bugs.webkit.org/show_bug.cgi?id=112166
+
+ HarfBuzz 0.9.14 merged my patch for icu detection without
+ pkg-config files, as needed by for example Ubuntu 12.04.
+ This obsoletes our local workaround. Removed it for GTK and EFL.
+
+ Reviewed by Martin Robinson.
+
+ * efl/jhbuild.modules: Patch reference removed, version bumped to 0.9.14.
+ * efl/patches/harfbuzz-icu-detection-fix.patch: Removed.
+ * gtk/jhbuild.modules: Patch reference removed, version bumped to 0.9.14.
+ * gtk/patches/harfbuzz-icu-detection-fix.patch: Removed.
+
+2013-03-22 Kiran Muppala <cmuppala@apple.com>
+
+ Unreviewed. Move self from contributor to committer list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ EWS should use a human readable port name when uploading layout test archives
+ https://bugs.webkit.org/show_bug.cgi?id=113099
+
+ Reviewed by Dirk Pranke.
+
+ Use new port's object's name() method to report human readable port names.
+ This will also help us resolving the bug to apply layout test results posted by EWS.
+
+ * Scripts/webkitpy/tool/bot/botinfo.py:
+ (BotInfo.__init__): Take port's name.
+ (BotInfo.summary_text):
+
+ * Scripts/webkitpy/tool/bot/botinfo_unittest.py:
+ (BotInfoTest.test_summary_text):
+
+ * Scripts/webkitpy/tool/bot/flakytestreporter.py:
+ (FlakyTestReporter.__init__): Preserve the old behavior since we don't have a real port object here.
+
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (PatchProcessingQueue.__init__): Initialize self._port.
+ (PatchProcessingQueue._upload_results_archive_for_patch): Intansitate a real port object if needed,
+ and use that for the attachment filename and the comment posted.
+
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (PatchProcessingQueueTest.test_upload_results_archive_for_patch): Port name is updated to be
+ "mac-snowleopard" as expected for TestPort.
+
+2013-03-22 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Turn off EWS test on Win again.
+ The battle continues.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ NRWT: Enable pixel tests when retrying tests
+ https://bugs.webkit.org/show_bug.cgi?id=112898
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run): Call _force_pixel_tests_if_needed before retrying tests and set pixel_tests False
+ if we've forced pixel tests in the retry.
+ (Manager._run_tests):
+ (Manager._clean_up_run): Fixed the capitalizations.
+ (Manager._force_pixel_tests_if_needed): Added.
+
+ * Scripts/webkitpy/layout_tests/models/test_run_results.py:
+ (_interpret_test_failures): Now that this function maybe called multiple times, only set
+ 'image_diff_percent' if it doesn't already exist.
+
+ (summarize_results): When the first attempt resulted in a text failure and the second attempt
+ resulted in image and text failures and we've forced to run pixel tests in the retry run,
+ treat this as a regular regression instead of a flakiness.
+
+ Also update test_dict with retry_result so that image_diff_percent maybe filled in if retry
+ run had image diffs.
+
+ * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
+ (summarized_results):
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (parse_full_results): Moved out of EndToEndTest to be used in test_retrying_force_pixel_tests.
+ Also removed some dead code.
+
+ (RunTest.test_retrying_force_pixel_tests): Added. Assert that we generate and only generate
+ pixel results in retries when pixel tests is turned off. Also assert that image_diff_percent
+ is set and pixel_tests_enabled is set to false.
+ (EndToEndTest.test_reftest_with_two_notrefs):
+
+2013-03-22 Tim Horton <timothy_horton@apple.com>
+
+ Make it possible to run layout tests on Retina MBP
+ https://bugs.webkit.org/show_bug.cgi?id=93673
+
+ Reviewed by Ryosuke Niwa.
+
+ Use NSWindow SPI and override -backingScaleFactor so that WKTR and DRT
+ windows on 2x machines still run at 1x.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow):
+ Reset the window resolution to 1x on creation.
+ * DumpRenderTree/mac/DumpRenderTreeWindow.h: Add NSWindow details.
+ * DumpRenderTree/mac/DumpRenderTreeWindow.mm:
+ (-[DumpRenderTreeWindow backingScaleFactor]): Override, always return 1.
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (-[WebKitTestRunnerWindow backingScaleFactor]): Override, always return 1.
+ (WTR::PlatformWebView::PlatformWebView):
+ Add NSWindow details, reset the window resolution to 1x on creation.
+
+2013-03-19 Ryosuke Niwa <rniwa@webkit.org>
+
+ Leak bots shouldn't build
+ https://bugs.webkit.org/show_bug.cgi?id=112774
+
+ Reviewed by Simon Fraser.
+
+ Since leak bots use regular debug builds, there is no need to build on these bots.
+ Simply downloading builds will dramatically improve the cycle time of these bots.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (TestLeaksFactory): Renamed from BuildAndTestLeaksFactory and changed to inherit from
+ TestFactory instead of BuildAndTestFactory.
+
+2013-03-22 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Fix the TestWebKitAPI build
+ https://bugs.webkit.org/show_bug.cgi?id=113044
+
+ Reviewed by Tor Arne Vestbø.
+
+ The generate-forwarding-headers script would only be run
+ after the targets in InjectedBundle.pri since the second
+ addStrictSubdirOrderBetween call in
+ Tools/TestWebKitAPI/TestWebKitAPI.pro would overwrite
+ the derived_sources -> injected_bundle order in SUBDIRS.
+
+ Fix it by only moving the dependent target at the end of
+ SUBDIRS, don't touch its dependency.
+
+ * qmake/mkspecs/features/functions.prf:
+
+2013-03-22 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] View is not focused when fullscreen mode toggled
+ https://bugs.webkit.org/show_bug.cgi?id=113009
+
+ Reviewed by Laszlo Gombos.
+
+ Set focus on view when fullscreen mode enabled/disabled
+ by FullScreen API.
+
+ * MiniBrowser/efl/main.c:
+ (on_fullscreen_accept):
+ (on_fullscreen_deny):
+
+2013-03-21 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt is no longer saving retry results in the retries/ subdirectory
+ https://bugs.webkit.org/show_bug.cgi?id=112995
+
+ Reviewed by Ojan Vafai.
+
+ I think this has been broken a long time, unfortunately. This
+ patch should fix that.
+
+ In order to do so, I had to pass the directory to use from
+ the Worker object through the SingleTestWriter to the
+ TestResultWriter. While I was plumbing that through, I rationalized
+ the order of the parameter arguments a bit ...
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (Worker._run_single_test):
+ * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
+ (run_single_test):
+ (SingleTestRunner.__init__):
+ (SingleTestRunner._run_compare_test):
+ (SingleTestRunner._run_rebaseline):
+ (SingleTestRunner._run_reftest):
+ * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
+ (write_test_result):
+ * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
+ (TestResultWriterTest.test_reftest_diff_image):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (RunTest.test_retrying_uses_retries_directory):
+
+2013-03-21 Filip Pizlo <fpizlo@apple.com>
+
+ JSC profiler should have an at-a-glance report of the success of DFG optimization
+ https://bugs.webkit.org/show_bug.cgi?id=112988
+
+ Reviewed by Geoffrey Garen.
+
+ * Scripts/display-profiler-output:
+
+2013-03-21 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] Linux ASAN WebKit canary is running out of memory
+ https://bugs.webkit.org/show_bug.cgi?id=112978
+
+ Reviewed by Tony Chang.
+
+ Running the AddressSanitizer on a crash takes a lot of
+ memory, so we should serialize access to it to avoid running
+ out of memory on a machine.
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._get_crash_log):
+ * Scripts/webkitpy/layout_tests/port/http_lock.py:
+ (HttpLock.__init__):
+ (HttpLock.wait_for_httpd_lock):
+
+2013-03-21 Min Qin <qinmin@chromium.org>
+
+ Cleanup android media layout test code
+ https://bugs.webkit.org/show_bug.cgi?id=112944
+
+ Reviewed by Adam Barth.
+
+ Chromium change: https://codereview.chromium.org/12892010/
+ The current android layout tests are using WebmediaPlayerInProcessAndroid class.
+ The code path has been largely diverged from that of the WebMediaPlayerImplAndroid.
+ It is not worth the effort to keep the code path, and the layout tests will not reflect the actual behavior on the browser.
+ Instead, we should switch to use content shell for layout tests.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::resetTestController):
+
+2013-03-21 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] add missing project dependencies to DRT to fix Mac Valgrind
+ https://bugs.webkit.org/show_bug.cgi?id=112953
+
+ Reviewed by Tony Chang.
+
+ When I created the DumpRenderTree_resources target in r144863 I
+ forgot to declare the needed dependencies on the other resource
+ targets. Due to a quirk of ordering, this appears to have been fine
+ w/ ninja but not w/ Xcode (which is still being used on the chromium
+ mac valgrind bots). Declaring the dependencies fixes the build
+ failures.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-21 Brent Fulgham <bfulgham@webkit.org>
+
+ [WinCairo] Correct assert in Empty BitmapImage Test.
+ https://bugs.webkit.org/show_bug.cgi?id=112934
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
+ (TestWebKitAPI::TEST): Use proper RefPtr and adoptRef
+ to avoid ref counting assertion when leaving test scope.
+
+2013-03-21 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] generate-feature-defines-files is incompatible with Python3
+ https://bugs.webkit.org/show_bug.cgi?id=112956
+
+ Reviewed by Martin Robinson.
+
+ Make the generate-feature-defines-files compatible with Python3 by calling the items()
+ method on the dictionary objects when iterating through said dictionaries.
+
+ * gtk/generate-feature-defines-files:
+ (write_feature_defines_header):
+ (write_flattened_feature_defines_file):
+
+2013-03-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ kill-old-processes spits out error messages on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=112878
+
+ Reviewed by Jessie Berlin.
+
+ Use grep -E instead of grep -P since grep on Mac doesn't seem to support the latter even though it's
+ included in the list of options grep --help shows.
+
+ Also use double-slash in escaping ++ in clang++ since the slashes needs to escape + inside the shell.
+
+ * BuildSlaveSupport/kill-old-processes:
+ (main):
+
+2013-03-21 Alberto Garcia <agarcia@igalia.com>
+
+ [BlackBerry] AccessibilityUIElement: add dummy implementations of scroll methods
+ https://bugs.webkit.org/show_bug.cgi?id=112597
+
+ Reviewed by Xan Lopez.
+
+ These were introduced for the Chromium port in r105295. We need
+ dummy implementations in order to compile the BlackBerry port.
+
+ * DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp:
+ (AccessibilityUIElement::scrollToMakeVisible):
+ (AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
+ (AccessibilityUIElement::scrollToGlobalPoint):
+
+2013-03-21 Roger Fong <roger_fong@apple.com>
+
+ Re-enable WinEWS tests following r146376.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-21 Zoltan Horvath <zoltan@webkit.org>
+
+ Unreviewed. Add Bem Jones-Bey to the list of contributors.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-21 Claudio Saavedra <csaavedra@igalia.com>
+
+ [GTK] Missing atk in install-dependencies script
+ https://bugs.webkit.org/show_bug.cgi?id=112272
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * gtk/install-dependencies: Add missing atk dependency.
+
+2013-03-21 Claudio Saavedra <csaavedra@igalia.com>
+
+ [GTK] Missing backslash in install-dependencies script
+ https://bugs.webkit.org/show_bug.cgi?id=112907
+
+ Reviewed by Philippe Normand.
+
+ * gtk/install-dependencies: Add missing backslash to dependencies
+ list.
+
+2013-03-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ EWS bots have stopped uploading results to bugzilla
+ https://bugs.webkit.org/show_bug.cgi?id=101091
+
+ Reviewed by Adam Barth.
+
+ The bug was caused by LayoutTestResultsReader passing a relative file path to the archive zip
+ to workspace.archive_zip. Because archive_zip uses the results directory as the working directory,
+ this relative file path resoled to a file inside a non-existent directory for "zip".
+
+ Fixed the bug by resolving both test results directory and zip archive paths in
+ LayoutTestResultsReader.archive.
+
+ Also made workspace.create_zip print the source_path so that we may debug these issues more easily
+ in the future.
+
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ (MockFileSystem.splitext): Don't assume the entire file path is a file extension when there is no ".".
+
+ * Scripts/webkitpy/common/system/workspace.py:
+ (Workspace.create_zip): Log the source path when "zip" failed.
+
+ * Scripts/webkitpy/common/system/workspace_mock.py:
+ (MockWorkspace.create_zip): Record zip_path and source_path for testing.
+
+ * Scripts/webkitpy/common/system/workspace_unittest.py:
+ (WorkspaceTest.test_create_zip_exception): Test that.
+
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
+ (LayoutTestResultsReader.archive): Resolve paths before passing them to workspace.create_zip.
+ This is the actual bug fix.
+
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+ (test_archive_last_layout_test_results_with_relative_path): Added a test case.
+
+2013-03-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move WebThemeEngine implementations to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=112751
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::themeEngine):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebKit):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::themeEngine):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.cpp: Renamed from Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp.
+ (WebTestRunner::WebTestThemeControlWin::WebTestThemeControlWin):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeControlWin::~WebTestThemeControlWin):
+ (WebTestRunner::WebTestThemeControlWin::box):
+ (WebTestRunner::WebTestThemeControlWin::line):
+ (WebTestRunner::WebTestThemeControlWin::triangle):
+ (WebTestRunner::WebTestThemeControlWin::roundRect):
+ (WebTestRunner::WebTestThemeControlWin::oval):
+ (WebTestRunner::WebTestThemeControlWin::circle):
+ (WebTestRunner::WebTestThemeControlWin::nestedBoxes):
+ (WebTestRunner::WebTestThemeControlWin::markState):
+ (WebTestRunner::WebTestThemeControlWin::draw):
+ (WebTestRunner::WebTestThemeControlWin::drawTextField):
+ (WebTestRunner::WebTestThemeControlWin::drawProgressBar):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h.
+ (WebTestRunner):
+ (WebTestThemeControlWin):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h.
+ (WebTestRunner):
+ (WebTestThemeEngineMac):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.mm: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm.
+ (+[FakeActiveWindow alwaysActiveWindow]):
+ (+[FakeActiveWindow alwaysInactiveWindow]):
+ (-[FakeActiveWindow initWithActiveControls:]):
+ (-[FakeActiveWindow _hasActiveControls]):
+ (WebTestRunner::WebTestThemeEngineMac::paintScrollbarThumb):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeEngineMac::paintHIThemeScrollbarThumb):
+ (WebTestRunner::WebTestThemeEngineMac::paintNSScrollerScrollbarThumb):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.cpp: Added.
+ (WebTestRunner::WebTestThemeEngineWin::paintButton):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeEngineWin::paintMenuList):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarArrow):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarThumb):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarTrack):
+ (WebTestRunner::WebTestThemeEngineWin::paintSpinButton):
+ (WebTestRunner::WebTestThemeEngineWin::paintTextField):
+ (WebTestRunner::WebTestThemeEngineWin::paintTrackbar):
+ (WebTestRunner::WebTestThemeEngineWin::paintProgressBar):
+ (WebTestRunner::WebTestThemeEngineWin::getSize):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h.
+ (WebTestRunner):
+ (WebTestThemeEngineWin):
+ (WebTestRunner::WebTestThemeEngineWin::WebTestThemeEngineWin):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestShellMac.mm:
+ (platformInit):
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (platformInit):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp: Removed.
+
+2013-03-20 Brent Fulgham <bfulgham@webkit.org>
+
+ [WinCairo] Unreviewed build fix for TestWebKitAPI under VS2010
+
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props: Added.
+ New property sheet that does not link against CoreFoundation and
+ CFNetwork.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props:
+ Use new TestWebKitAPICommonWinCairo property sheet.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props:
+ Ditto.
+
+2013-03-20 Brent Fulgham <bfulgham@webkit.org>
+
+ [WinCairo] Unreviewed build fix for VS2010.
+
+ Had to add WinCairo-specific property sheets to deal with some
+ library and path differences with the main Apple port.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props: Added.
+
+2013-03-20 Benjamin Poulain <bpoulain@apple.com>
+
+ [WK2] Remove VIEW_MODE_CSS_MEDIA from WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=112849
+
+ Reviewed by Sam Weinig.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
+2013-03-20 Brent Fulgham <bfulgham@webkit.org>
+
+ [WinCairo] Build WebKit Tools under VS2010
+ https://bugs.webkit.org/show_bug.cgi?id=112821
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
+ Add WinCairo-specific build target.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj: Add WinCairo-specific build target.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeWinCairo.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
+ Add WinCairo-specific build target.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
+ Add WinCairo-specific build target.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj: Add
+ WinCairo-specific build target.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props: Added.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj: Add WinCairo-
+ specific build target.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj: Add
+ WinCairo-specific build target.
+ * win/record-memory/record-memory.vcxproj: Add WinCairo target.
+ * win/record-memory/record-memoryDebugWinCairo.props: Added.
+ * win/record-memory/record-memoryReleaseWinCairo.props: Added.
+
+2013-03-20 Roger Fong <roger_fong@apple.com>
+
+ API test gardening AppleWin port.
+
+ The BitmapImageEmptyFrameTest should only be tested on Cairo not on AppleWin port.
+
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+
+2013-03-20 Roger Fong <roger_fong@apple.com>
+
+ Test fix for Win EWS bots, catch various errors and restart script if necessary.
+
+ * EWSTools/start-queue-win.sh:
+
+2013-03-20 Sami Kyostila <skyostil@chromium.org>
+
+ Unreviewed, add myself to committers.py.
+
+2013-03-20 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Unreviewed. Adding another email for me.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-20 Justin Novosad <junov@google.com>
+
+ [Chromium] Code cleanup: removing support for non-deferred 2d canvas rendering
+ https://bugs.webkit.org/show_bug.cgi?id=112605
+
+ Reviewed by James Robinson.
+
+ Deleting all the code that was used for propagating and supporting
+ the Chromium setting for disabling deferred 2d canvas rendering.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ (TestShell::runFileTest):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
+2013-03-20 Ádám Kallai <kadam@inf.u-szeged.hu>
+
+ [Qt] Qt 4.8 tool related stuff removal from webkitpy.
+ https://bugs.webkit.org/show_bug.cgi?id=112699.
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._search_paths):
+ (QtPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+ (QtPortTest):
+ (QtPortTest._assert_search_path):
+ (QtPortTest._assert_expectations_files):
+
+2013-03-19 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Enable kerning by default
+ https://bugs.webkit.org/show_bug.cgi?id=112704
+
+ Reviewed by Jocelyn Turcotte.
+
+ Disable kerning by default, since some reference test expectations
+ expect kerning to be default off.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::reset):
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+
+2013-03-20 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Remove empty function stubs from TestRunnerQt.
+ https://bugs.webkit.org/show_bug.cgi?id=112799
+
+ We are reducing the code in TestRunnerQt step by step,
+ in order to finally replace all of it with the generic
+ TestRunner implementation.
+ This patch removes several simple function stubs that
+ currently do not implement any actual functionality.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-03-20 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Don't show the SearchBar by default when MiniBrowser opened
+ https://bugs.webkit.org/show_bug.cgi?id=112687
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Hide the SearchBar by default on window creation.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+
+2013-03-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r146304.
+ http://trac.webkit.org/changeset/146304
+ https://bugs.webkit.org/show_bug.cgi?id=112788
+
+ to many expectations to update (Requested by antonm on
+ #webkit).
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.cpp: Removed.
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestShellMac.mm:
+ (platformInit):
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (platformInit):
+ * DumpRenderTree/chromium/WebThemeControlDRTWin.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.cpp.
+ (WebThemeControlDRTWin::WebThemeControlDRTWin):
+ (WebThemeControlDRTWin::~WebThemeControlDRTWin):
+ (WebThemeControlDRTWin::box):
+ (WebThemeControlDRTWin::line):
+ (WebThemeControlDRTWin::triangle):
+ (WebThemeControlDRTWin::roundRect):
+ (WebThemeControlDRTWin::oval):
+ (WebThemeControlDRTWin::circle):
+ (WebThemeControlDRTWin::nestedBoxes):
+ (WebThemeControlDRTWin::markState):
+ (WebThemeControlDRTWin::draw):
+ (WebThemeControlDRTWin::drawTextField):
+ (WebThemeControlDRTWin::drawProgressBar):
+ * DumpRenderTree/chromium/WebThemeControlDRTWin.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.h.
+ (WebThemeControlDRTWin):
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.h.
+ (WebThemeEngineDRTMac):
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.mm.
+ (+[FakeActiveWindow alwaysActiveWindow]):
+ (+[FakeActiveWindow alwaysInactiveWindow]):
+ (-[FakeActiveWindow initWithActiveControls:]):
+ (-[FakeActiveWindow _hasActiveControls]):
+ (WebThemeEngineDRTMac::paintScrollbarThumb):
+ (stateToHIEnableState):
+ (WebThemeEngineDRTMac::paintHIThemeScrollbarThumb):
+ (WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp: Added.
+ (webRectToSkIRect):
+ (drawControl):
+ (drawTextField):
+ (drawProgressBar):
+ (WebThemeEngineDRTWin::paintButton):
+ (WebThemeEngineDRTWin::paintMenuList):
+ (WebThemeEngineDRTWin::paintScrollbarArrow):
+ (WebThemeEngineDRTWin::paintScrollbarThumb):
+ (WebThemeEngineDRTWin::paintScrollbarTrack):
+ (WebThemeEngineDRTWin::paintSpinButton):
+ (WebThemeEngineDRTWin::paintTextField):
+ (WebThemeEngineDRTWin::paintTrackbar):
+ (WebThemeEngineDRTWin::paintProgressBar):
+ (WebThemeEngineDRTWin::getSize):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.h.
+ (WebThemeEngineDRTWin):
+ (WebThemeEngineDRTWin::WebThemeEngineDRTWin):
+
+2013-03-19 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Support -webkit-font-smoothing
+ https://bugs.webkit.org/show_bug.cgi?id=106009
+
+ Reviewed by Jocelyn Turcotte.
+
+ Set shouldUseFontSmoothing to false to match WebKitTestRunner.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::reset):
+
+2013-03-20 Krzysztof Czech <k.czech@samsung.com>
+
+ [GTK] accessibility/aria-scrollbar-role.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98358
+
+ Reviewed by Martin Robinson.
+
+ Adds support for checking accessibility object's orientation.
+ Orientation is checked by retrieving proper state of accessibility object.
+
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
+ (checkElementState):
+ (AccessibilityUIElement::orientation):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::orientation):
+
+2013-03-19 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move WebThemeEngine implementations to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=112751
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::themeEngine):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebKit):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::themeEngine):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.cpp: Renamed from Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp.
+ (WebTestRunner::WebTestThemeControlWin::WebTestThemeControlWin):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeControlWin::~WebTestThemeControlWin):
+ (WebTestRunner::WebTestThemeControlWin::box):
+ (WebTestRunner::WebTestThemeControlWin::line):
+ (WebTestRunner::WebTestThemeControlWin::triangle):
+ (WebTestRunner::WebTestThemeControlWin::roundRect):
+ (WebTestRunner::WebTestThemeControlWin::oval):
+ (WebTestRunner::WebTestThemeControlWin::circle):
+ (WebTestRunner::WebTestThemeControlWin::nestedBoxes):
+ (WebTestRunner::WebTestThemeControlWin::markState):
+ (WebTestRunner::WebTestThemeControlWin::draw):
+ (WebTestRunner::WebTestThemeControlWin::drawTextField):
+ (WebTestRunner::WebTestThemeControlWin::drawProgressBar):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h.
+ (WebTestRunner):
+ (WebTestThemeControlWin):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h.
+ (WebTestRunner):
+ (WebTestThemeEngineMac):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.mm: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm.
+ (+[FakeActiveWindow alwaysActiveWindow]):
+ (+[FakeActiveWindow alwaysInactiveWindow]):
+ (-[FakeActiveWindow initWithActiveControls:]):
+ (-[FakeActiveWindow _hasActiveControls]):
+ (WebTestRunner::WebTestThemeEngineMac::paintScrollbarThumb):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeEngineMac::paintHIThemeScrollbarThumb):
+ (WebTestRunner::WebTestThemeEngineMac::paintNSScrollerScrollbarThumb):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.cpp: Added.
+ (WebTestRunner::WebTestThemeEngineWin::paintButton):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeEngineWin::paintMenuList):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarArrow):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarThumb):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarTrack):
+ (WebTestRunner::WebTestThemeEngineWin::paintSpinButton):
+ (WebTestRunner::WebTestThemeEngineWin::paintTextField):
+ (WebTestRunner::WebTestThemeEngineWin::paintTrackbar):
+ (WebTestRunner::WebTestThemeEngineWin::paintProgressBar):
+ (WebTestRunner::WebTestThemeEngineWin::getSize):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h.
+ (WebTestRunner):
+ (WebTestThemeEngineWin):
+ (WebTestRunner::WebTestThemeEngineWin::WebTestThemeEngineWin):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestShellMac.mm:
+ (platformInit):
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (platformInit):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp: Removed.
+
+2013-03-19 Tony Chang <tony@chromium.org>
+
+ Move testRunner.setTouchDragDropEnabled to internals.settings
+ https://bugs.webkit.org/show_bug.cgi?id=112739
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner): Remove unnecessary code.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner): Remove unnecessary code.
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo): Always set to false.
+
+2013-03-19 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Migrate to WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
+ https://bugs.webkit.org/show_bug.cgi?id=112754
+
+ Reviewed by Darin Fisher.
+
+ Remove old code behind ifndef WEBKIT_USE_NEW_WEBFILESYSTEMTYPE
+ now that it's always defined.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-03-19 Kenneth Russell <kbr@google.com>
+
+ Unreviewed, rolling out r146290.
+ http://trac.webkit.org/changeset/146290
+ https://bugs.webkit.org/show_bug.cgi?id=112751
+
+ Broke Chromium Mac build.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.cpp: Removed.
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestShellMac.mm:
+ (platformInit):
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (platformInit):
+ * DumpRenderTree/chromium/WebThemeControlDRTWin.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.cpp.
+ (WebThemeControlDRTWin::WebThemeControlDRTWin):
+ (WebThemeControlDRTWin::~WebThemeControlDRTWin):
+ (WebThemeControlDRTWin::box):
+ (WebThemeControlDRTWin::line):
+ (WebThemeControlDRTWin::triangle):
+ (WebThemeControlDRTWin::roundRect):
+ (WebThemeControlDRTWin::oval):
+ (WebThemeControlDRTWin::circle):
+ (WebThemeControlDRTWin::nestedBoxes):
+ (WebThemeControlDRTWin::markState):
+ (WebThemeControlDRTWin::draw):
+ (WebThemeControlDRTWin::drawTextField):
+ (WebThemeControlDRTWin::drawProgressBar):
+ * DumpRenderTree/chromium/WebThemeControlDRTWin.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.h.
+ (WebThemeControlDRTWin):
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.h.
+ (WebThemeEngineDRTMac):
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.mm.
+ (+[FakeActiveWindow alwaysActiveWindow]):
+ (+[FakeActiveWindow alwaysInactiveWindow]):
+ (-[FakeActiveWindow initWithActiveControls:]):
+ (-[FakeActiveWindow _hasActiveControls]):
+ (WebThemeEngineDRTMac::paintScrollbarThumb):
+ (stateToHIEnableState):
+ (WebThemeEngineDRTMac::paintHIThemeScrollbarThumb):
+ (WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp: Added.
+ (webRectToSkIRect):
+ (drawControl):
+ (drawTextField):
+ (drawProgressBar):
+ (WebThemeEngineDRTWin::paintButton):
+ (WebThemeEngineDRTWin::paintMenuList):
+ (WebThemeEngineDRTWin::paintScrollbarArrow):
+ (WebThemeEngineDRTWin::paintScrollbarThumb):
+ (WebThemeEngineDRTWin::paintScrollbarTrack):
+ (WebThemeEngineDRTWin::paintSpinButton):
+ (WebThemeEngineDRTWin::paintTextField):
+ (WebThemeEngineDRTWin::paintTrackbar):
+ (WebThemeEngineDRTWin::paintProgressBar):
+ (WebThemeEngineDRTWin::getSize):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.h.
+ (WebThemeEngineDRTWin):
+ (WebThemeEngineDRTWin::WebThemeEngineDRTWin):
+
+2013-03-19 Krzysztof Czech <k.czech@samsung.com>
+
+ [EFL] canvas-fallback-content.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=111998
+
+ Reviewed by Chris Fleizach.
+
+ Adds support for getting platform name.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticValues):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::platformName):
+
+2013-03-19 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move WebThemeEngine implementations to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=112751
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::themeEngine):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebKit):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::themeEngine):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.cpp: Renamed from Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp.
+ (WebTestRunner::WebTestThemeControlWin::WebTestThemeControlWin):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeControlWin::~WebTestThemeControlWin):
+ (WebTestRunner::WebTestThemeControlWin::box):
+ (WebTestRunner::WebTestThemeControlWin::line):
+ (WebTestRunner::WebTestThemeControlWin::triangle):
+ (WebTestRunner::WebTestThemeControlWin::roundRect):
+ (WebTestRunner::WebTestThemeControlWin::oval):
+ (WebTestRunner::WebTestThemeControlWin::circle):
+ (WebTestRunner::WebTestThemeControlWin::nestedBoxes):
+ (WebTestRunner::WebTestThemeControlWin::markState):
+ (WebTestRunner::WebTestThemeControlWin::draw):
+ (WebTestRunner::WebTestThemeControlWin::drawTextField):
+ (WebTestRunner::WebTestThemeControlWin::drawProgressBar):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeControlWin.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h.
+ (WebTestRunner):
+ (WebTestThemeControlWin):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h.
+ (WebTestRunner):
+ (WebTestThemeEngineMac):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineMac.mm: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm.
+ (+[FakeActiveWindow alwaysActiveWindow]):
+ (+[FakeActiveWindow alwaysInactiveWindow]):
+ (-[FakeActiveWindow initWithActiveControls:]):
+ (-[FakeActiveWindow _hasActiveControls]):
+ (WebTestRunner::WebTestThemeEngineMac::paintScrollbarThumb):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeEngineMac::paintHIThemeScrollbarThumb):
+ (WebTestRunner::WebTestThemeEngineMac::paintNSScrollerScrollbarThumb):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.cpp: Added.
+ (WebTestRunner::WebTestThemeEngineWin::paintButton):
+ (WebTestRunner):
+ (WebTestRunner::WebTestThemeEngineWin::paintMenuList):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarArrow):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarThumb):
+ (WebTestRunner::WebTestThemeEngineWin::paintScrollbarTrack):
+ (WebTestRunner::WebTestThemeEngineWin::paintSpinButton):
+ (WebTestRunner::WebTestThemeEngineWin::paintTextField):
+ (WebTestRunner::WebTestThemeEngineWin::paintTrackbar):
+ (WebTestRunner::WebTestThemeEngineWin::paintProgressBar):
+ (WebTestRunner::WebTestThemeEngineWin::getSize):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestThemeEngineWin.h: Renamed from Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h.
+ (WebTestRunner):
+ (WebTestThemeEngineWin):
+ (WebTestRunner::WebTestThemeEngineWin::WebTestThemeEngineWin):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestShellMac.mm:
+ (platformInit):
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (platformInit):
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp: Removed.
+
+2013-03-19 Kenneth Rohde Christiansen <kenneth@webkit.org> and Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Separate WebView further from EwkView
+ https://bugs.webkit.org/show_bug.cgi?id=111591
+
+ Reviewed by Caio Marcelo de Oliveira Filho.
+
+ Updated EFL PlatformWebView to meet the new WKView API and ewk view private API.
+ PlatformWKView is pointer to Evas_Object for EFL, as this is more natural and
+ since we can afford it having EWKViewGetWKView() private API to access WKView.
+
+ * TestWebKitAPI/PlatformWebView.h:
+ * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::PlatformWebView::PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::~PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::resizeTo):
+ (TestWebKitAPI::PlatformWebView::page):
+ (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
+ (TestWebKitAPI::PlatformWebView::simulateMouseMove):
+ (TestWebKitAPI::PlatformWebView::simulateRightClick):
+ * WebKitTestRunner/PlatformWebView.h:
+ * WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
+ (WTR::EventSenderProxy::dispatchEvent):
+ (WTR::EventSenderProxy::keyDown):
+ (WTR::EventSenderProxy::sendTouchEvent):
+ (WTR::EventSenderProxy::setTouchModifier):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::~PlatformWebView):
+ (WTR::PlatformWebView::resizeTo):
+ (WTR::PlatformWebView::page):
+ (WTR::PlatformWebView::focus):
+ (WTR::PlatformWebView::windowSnapshotImage):
+
+2013-03-19 Roger Fong <roger_fong@apple.com>
+
+ Changes to VS2010 project files should only trigger builds on Windows bots.
+ https://bugs.webkit.org/show_bug.cgi?id=112731
+
+ Reviewed by Timothy Horton.
+
+ * BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
+ (_should_file_trigger_build):
+
+2013-03-19 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. webkitpy tests fix for Windows, runtests.py run-webkit-tests arguments changed.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+ (RunTestsTest.test_webkit_run_unit_tests):
+
+2013-03-19 Julie Parent <jparent@chromium.org>
+
+ Dashboards: Introduce history namespace and unit tests.
+ https://bugs.webkit.org/show_bug.cgi?id=112645
+
+ Reviewed by Ojan Vafai.
+
+ Laying the framework for introducing the new history object and
+ namespace. This moves only static functions into the history
+ namespace, and moves corresponding unit tests into seperate
+ unit test file.
+
+ * TestResultServer/static-dashboards/aggregate_results.html:
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseCrossDashboardParameters):
+ (parseDashboardSpecificParameters):
+ (parseParameters):
+ * TestResultServer/static-dashboards/flakiness_dashboard.html:
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (.switch.return):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ * TestResultServer/static-dashboards/history.js: Added.
+ * TestResultServer/static-dashboards/history_unittests.js: Added.
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/run-embedded-unittests.html:
+ * TestResultServer/static-dashboards/run-unittests.html:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/timeline_explorer.js:
+ * TestResultServer/static-dashboards/treemap.html:
+ * TestResultServer/static-dashboards/treemap.js:
+ (.switch.return):
+ * TestResultServer/static-dashboards/ui.js:
+
+2013-03-19 Daniel Bates <dbates@webkit.org>
+
+ svn-apply has trouble applying a patch that adds a Windows newline to EOF
+ https://bugs.webkit.org/show_bug.cgi?id=112732
+
+ Reviewed by Eric Seidel.
+
+ Fixes an issues where a diff that adds a Windows line ending (CRLF) to the end
+ of an existing file cannot be applied.
+
+ In particular, svn-{apply, unapply} compensate for differences in line endings
+ by converting the line endings in a diff to match the line endings in the target
+ file. The diff(1) command precedes the last line of a diff that adds a newline
+ character to the end of a file with the special character sequence "\n \\ No newline at end of file\n"
+ Svn-{apply, unapply} converts the newline characters (\n) in this character sequence
+ to \r\n (CRLF) when the target file has Windows line endings and patch(1) complains
+ when applying this modified diff. Instead, svn-{apply, unapply} should not modify
+ the newline characters in this special character sequence to match the line endings
+ in the target file.
+
+ * Scripts/VCSUtils.pm:
+ (parseDiff):
+ * Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl:
+ Added tests:
+ - "SVN: Patch adds Windows newline to EOF and IndexPath has Windows line endings"
+ - "SVN: Patch adds Mac newline to EOF and IndexPath has Mac line endings"
+ - "Git: Patch adds Windows newline to EOF and IndexPath has Windows line endings"
+ - "Git: Patch adds Mac newline to EOF and IndexPath has Mac line endings"
+ (escapeNewLineCharacters): Added.
+ (toMacLineEndings): Added.
+
+2013-03-19 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove compositor settings that don't go through WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=112718
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
+2013-03-19 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r146101.
+ https://bugs.webkit.org/show_bug.cgi?id=111884
+
+ re-enable custom freetype on asan; this needs to be on
+ now that the bot is running lucid.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-19 Alberto Garcia <agarcia@igalia.com>
+
+ [BlackBerry] Enable USE_SYSTEM_MALLOC by default
+ https://bugs.webkit.org/show_bug.cgi?id=112365
+
+ Reviewed by Benjamin Poulain.
+
+ Enable USE_SYSTEM_MALLOC by default via FeatureList.pm instead of
+ harcoding it in wtf/Platform.h
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-03-19 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Make ImageDiff similar to Chromium's ImageDiff
+ https://bugs.webkit.org/show_bug.cgi?id=94782
+
+ Based on patch by Csaba Osztrogonác.
+ Reviewed by Jocelyn Turcotte.
+
+ The diff image is generated with bright red indicating errors, but letting the base image
+ shine through so the context of the error-pixel can be identified.
+
+ * DumpRenderTree/qt/ImageDiff.cpp:
+ (main):
+
+2013-03-18 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Fix the build of QtTestBrowser if the print preview dialog is disabled in Qt
+
+ Rubber-stamped by Csaba Osztrogonác.
+
+ Check for QT_NO_PRINTPREVIEWDIALOG instead of QT_NO_PRINTER
+ since the latter might not cover the former.
+
+ * QtTestBrowser/launcherwindow.cpp:
+ (LauncherWindow::print):
+
+2013-03-18 Simon Fraser <simon.fraser@apple.com>
+
+ Style tweeks to default.css.
+
+ Rubber-stamped by David Kilzer.
+
+ Give visited links a different color to other links, so you can
+ see which builds you've viewed.
+
+ Make the <small> text less tiny.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/default.css:
+ (small):
+ (a:link,a:visited,a:active):
+ (a:visited):
+
+2013-03-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove the temporary hack for webkit-perf.appspot.com and cleanup the code
+ https://bugs.webkit.org/show_bug.cgi?id=112494
+
+ Reviewed by Dirk Pranke.
+
+ Removed the code to override webkit-perf.appspot.com by perf.webkit.org.
+ Also merged two pairs of methods to cleanup the code.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.run): Merged _upload_and_show_results.
+ (PerfTestsRunner._generate_results): Merged _generate_output_files.
+
+2013-03-18 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] build xdisplaycheck when building DRT
+ https://bugs.webkit.org/show_bug.cgi?id=112636
+
+ Reviewed by Tony Chang.
+
+ It appears that we need xdisplaycheck to be built in order for
+ Xvfb to be started correctly on the bots, and DRT was missing
+ a dependency on it. This may be the cause of the ASAN bot not
+ starting up properly (it only builds DRT).
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-18 David Levin <levin@chromium.org>
+
+ Implement icon change notification dump for Chromium's test shell.
+ https://bugs.webkit.org/show_bug.cgi?id=112614
+
+ This was previously implemented for some other platforms in r58111
+ and r116547.
+
+ In r122806, fast/dom/icon-url-property.html stopped using it, but
+ it is useful for tests, so I plan to re-add it to that test again.
+
+ Reviewed by Jochen Eisinger.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner::WebTestProxy::didChangeIcon): Add handler so that
+ icon change notifications from WebKit may be logged in test output.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner): Expose dumpIconChanges.
+ (WebTestRunner::TestRunner::reset): Clear the new dump variable.
+ (WebTestRunner::TestRunner::shouldDumpIconChanges): Expose the dump vairable.
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::dumpIconChanges): Implement the test method.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didChangeIcon):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didChangeIcon): Add the output about changing the icon.
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-03-18 Julie Parent <jparent@chromium.org>
+
+ Cleanup: Move js for treemap and aggregate_results into own js files.
+ https://bugs.webkit.org/show_bug.cgi?id=112618
+
+ Reviewed by Dirk Pranke.
+
+ No functional changes, just moving the code into separate js file
+ rather than inlined in the html, so we can test it, make it more
+ modular, etc. Other dashboard types are already done this way.
+
+ * TestResultServer/static-dashboards/aggregate_results.html:
+ * TestResultServer/static-dashboards/aggregate_results.js: Copied from Tools/TestResultServer/static-dashboards/aggregate_results.html.
+ (generatePage):
+ (handleValidHashParameter):
+ (htmlForBuilder):
+ (rawValuesHTML):
+ (chartHTML):
+ (filteredValues):
+ (chart):
+ (htmlForRevisionRows):
+ (wrapHTMLInTable):
+ (htmlForSummaryTable):
+ (valuesPerExpectation):
+ (htmlForTestType):
+ (htmlForTableRow):
+ (extendedEncode):
+ * TestResultServer/static-dashboards/treemap.html:
+ * TestResultServer/static-dashboards/treemap.js: Copied from Tools/TestResultServer/static-dashboards/treemap.html.
+ (humanReadableTime):
+ (convertToWebTreemapFormat):
+ (reverseSortByAverage):
+ (generatePage):
+ (focusPath):
+ (.switch.return):
+ (handleQueryParameterChange):
+ (extractName):
+ (fullName):
+ (handleFocus.):
+ (handleFocus):
+
+2013-03-18 Zan Dobersek <zdobersek@igalia.com>
+
+ [webkitpy] '/usr/bin/interdiff' output while running test-webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=112622
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/tool/steps/haslanded_unittest.py:
+ (HasLandedTest): Pipe the stdout and stderr output of the subprocess call to subprocess.PIPE, eliminating unnecessary output.
+
+2013-03-18 Zan Dobersek <zdobersek@igalia.com>
+
+ [NRWT][GTK] Add gtk-wk1 directory to the list of baseline search paths when using DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=112619
+
+ Reviewed by Dirk Pranke.
+
+ When using DumpRenderTree on the Gtk port, NRWT should look for baselines first in the LayoutTests/platform/gtk-wk1
+ directory and then fall back to the generic LayoutTests/platform/gtk directory.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.default_baseline_search_path): Implement the method on the GtkPort class, mapping every search path to the
+ Port._webkit_baseline_path method.
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_default_baseline_search_path): Add a test for the changes that are being introduced.
+ (GtkPortTest.test_port_specific_expectations_files): Wrap a couple of long lines.
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineTest.test_baseline_directory): Enhance one and add an additional test case for baseline directories
+ that are expected based on the builder name.
+
+2013-03-18 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Create WebFileSystemType enum to allow easier filesystem refactoring
+ https://bugs.webkit.org/show_bug.cgi?id=112571
+
+ Reviewed by Adam Barth.
+
+ Update function declarations for new WebFileSystemType enum. (All
+ changes are behind an #ifdef so we can sync required changes in embedders.)
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::openFileSystem):
+ (WebViewHost::deleteFileSystem):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-03-18 Julie Parent <jparent@chromium.org>
+
+ Cleanup: Move timeline_exporer js out of html file into js.
+ https://bugs.webkit.org/show_bug.cgi?id=112188
+
+ Reviewed by Dirk Pranke.
+
+ Moves the javascript out of the html file and into a new js file.
+ This follows the format of flakiness_dashboard.{html|js}.
+
+ Also moves code from dashboard_base that is used only by this one
+ dashboard, and makes it private to the dashboard.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/timeline_explorer.js: Copied from Tools/TestResultServer/static-dashboards/timeline_explorer.html.
+ (generatePage):
+ (initCurrentBuilderTestResults):
+ (shouldShowWebKitRevisionsOnly):
+ (updateTimelineForBuilder.):
+ (updateTimelineForBuilder):
+ (selectBuild):
+ (updateBuildIndicator):
+ (.addRow):
+ (.addNumberRow):
+ (.inspectorNode.getElementsByTagName.0.onclick):
+ (.inspectorNode.getElementsByTagName.1.onclick):
+ (.inspectorNode.getElementsByTagName.2.onclick):
+ (updateBuildInspector):
+ (showResultsDelta):
+ (decompressResults.addFlakyDelta):
+ (decompressResults):
+
+2013-03-18 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r145272.
+ http://trac.webkit.org/changeset/145272
+ https://bugs.webkit.org/show_bug.cgi?id=111884
+
+ Turns out the ASAN build is still broken; possibly there's
+ something still setting LD_LIBRARY_PATH, or possibly there's
+ something else wrong. In the meantime, we need it to work again.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ delete-stale-build-files is too aggressive
+ https://bugs.webkit.org/show_bug.cgi?id=112595
+
+ Reviewed by Tim Horton.
+
+ It appears that whitelisting file extensions to keep is not a good idea.
+ Blacklist files to delete instead, and only delete .o files for now.
+ We can add more file extensions as needed.
+
+ * BuildSlaveSupport/delete-stale-build-files:
+
+2013-03-18 Simon Fraser <simon.fraser@apple.com>
+
+ Disable accessibility notifications after each test
+ https://bugs.webkit.org/show_bug.cgi?id=112579
+
+ Reviewed by Tim Horton.
+
+ In WebKitTestRunner, if any tests triggered accessibility notifications,
+ the global notification handler would thereafter be active, and fire
+ notifications for all subsequent tests.
+
+ Fix by implementing AccessibilityController::resetToConsistentState() for
+ Mac, and using it to clear the global notification handler.
+
+ * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
+ (WTR::AccessibilityController::addNotificationListener): Remove stupid comment.
+ (WTR::AccessibilityController::removeNotificationListener): Explicitly call
+ -stopObserving so that unregistering the observer doesn't rely on object lifetimes
+ (e.g. because of -autorelease).
+ (WTR::AccessibilityController::logAccessibilityEvents): Stub.
+ (WTR::AccessibilityController::resetToConsistentState): Remove the notification listener
+ if there is one.
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h:
+ Add -stopObserving
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
+ (-[AccessibilityNotificationHandler dealloc]): Call -stopObserving
+ (-[AccessibilityNotificationHandler stopObserving]): Unregister from the notification
+ center.
+
+2013-03-18 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove WebGraphicsContext3DInProcessImpl support from DRT.
+ https://bugs.webkit.org/show_bug.cgi?id=112392
+
+ Reviewed by James Robinson.
+
+ Removes the command line flag option from DRT.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+
+2013-03-18 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] plugins/plugin-clip-subframe.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=112570
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: Add the LogNPPSetWindow.cpp file to the build.
+
+2013-03-17 Morten Stenshorne <mstensho@opera.com>
+
+ Add reload button (and F5 accelerator) to the GtkLauncher toolbar
+ https://bugs.webkit.org/show_bug.cgi?id=112442
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * GtkLauncher/main.c:
+ (reloadCb):
+ (createToolbar):
+ (createWindow):
+
+2013-03-15 Simon Fraser <simon.fraser@apple.com>
+
+ REGRESSION (r144884?): WebKit2.DOMWindowExtensionBasic API test is asserting
+ https://bugs.webkit.org/show_bug.cgi?id=112205
+
+ Disable this API test until Geoff can fix it.
+
+ * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp:
+ (TestWebKitAPI::TEST):
+
+2013-03-15 Jochen Eisinger <jochen@chromium.org>
+
+ plugins/netscape-plugin-setwindow-size*.html and plugins/pass-different-npp-struct.html should be async
+ https://bugs.webkit.org/show_bug.cgi?id=112478
+
+ Reviewed by Tony Chang.
+
+ There is nothing that ensures that the log messages from the plugin
+ come in before the layout test finished loading.
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
+ (PassDifferentNPPStruct::NPP_SetWindow):
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NPP_SetWindow):
+
+2013-03-15 Simon Fraser <simon.fraser@apple.com>
+
+ Have the mac port support per_test_timeout in webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=112466
+
+ Reviewed by Dirk Pranke.
+
+ Both WTR and DRT handle --timeout arguments, so we can
+ have the scripts pass the timeout values down to the tools.
+
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.supports_per_test_timeout):
+
+2013-03-15 Rouslan Solomakhin <rouslan@chromium.org>
+
+ Remove setAsynchronousSpellCheckingEnabled from test runners
+ https://bugs.webkit.org/show_bug.cgi?id=112362
+
+ Reviewed by Tony Chang.
+
+ Remove setAsynchronousSpellCheckingEnabled from test runners. The setting is now
+ in internals.settings, so all ports can share it.
+
+ * DumpRenderTree/TestRunner.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/TestRunner.h: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/efl/TestRunnerEfl.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/mac/TestRunnerMac.mm: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/qt/TestRunnerQt.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/qt/TestRunnerQt.h: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/win/TestRunnerWin.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+ * DumpRenderTree/wx/TestRunnerWx.cpp: Remove setAsynchronousSpellCheckingEnabled() method.
+
+2013-03-15 Simon Fraser <simon.fraser@apple.com>
+
+ Fix the stupid unit tests.
+
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (test_sample_process):
+
+2013-03-14 Simon Fraser <simon.fraser@apple.com>
+
+ Collect samples for unresponsive web processes
+ https://bugs.webkit.org/show_bug.cgi?id=112409
+
+ Reviewed by Tim Horton.
+
+ When we detect that a subprocess was unresponsive, run the 'sample'
+ tool on that process, for the Mac port.
+
+ The sample will be linked to from the results.html page, next
+ to the crash log link.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._look_for_new_crash_logs): Before looking for crash logs,
+ look for samples on disk.
+ * Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
+ (TestResultWriter):
+ (TestResultWriter.copy_sample_file): Teach TestResultWriter about
+ -sample.txt files, and have it copy their contents to a new file
+ next to the test that spawned them (as we do for crash logs).
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.look_for_new_samples): Base class does nothing for sampling.
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver._check_for_driver_crash): Kick off a sample if we detected
+ that the subprocess was unresponsive.
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.sample_file_path): Utility to generate the file path
+ to the generated sample files at the top level of layout-test-results.
+ (MacPort.look_for_new_crash_logs): Fix typo
+ (MacPort.look_for_new_samples): New function to find sample files.
+ (MacPort.sample_process): Use the utility function to get the file path.
+
+2013-03-15 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Remove simple getters and setters from TestRunnerQt
+ https://bugs.webkit.org/show_bug.cgi?id=112343
+
+ Reviewed by Benjamin Poulain.
+
+ The removed functions and boolean members
+ are being replaced by the implementations in the
+ generic TestRunner.h.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (DumpRenderTree::dumpFrameScrollPosition):
+ (DumpRenderTree::dumpFramesAsText):
+ (DumpRenderTree::dump):
+ (DumpRenderTree::titleChanged):
+ (DumpRenderTree::dumpDatabaseQuota):
+ (DumpRenderTree::dumpApplicationCacheQuota):
+ (DumpRenderTree::statusBarMessage):
+ (DumpRenderTree::createWindow):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::reset):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-03-15 Ryosuke Niwa <rniwa@webkit.org>
+
+ Update the link on build.webkit.org to refer to perf.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=112416
+
+ Reviewed by Philip Rogers.
+
+ Updated the link. Also updated the template to use HTML5 DOCTYPE.
+
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2013-03-15 Tobias Mueller <tobiasmue@gnome.org>
+
+ Build fix for Tools/GtkLauncher/Programs_GtkLauncher-main.o if gstreamer is not installed
+ https://bugs.webkit.org/show_bug.cgi?id=112394
+
+ Reviewed by Philippe Normand.
+
+ * GtkLauncher/main.c:
+ (main): Guard using the gstreamer function with #ifdef WTF_USE_GSTREAMER
+
+2013-03-14 Andreas Kling <akling@apple.com>
+
+ REGRESSION(r145169): [Mac][WK2] http/tests/security/cross-frame-access-put.html fails.
+ <http://webkit.org/b/111815>
+ <rdar://problem/13380145>
+
+ Reviewed by Anders Carlsson.
+
+ Add PlatformWebView::didInitializeClients() and call it after setting up all the clients
+ after creating a PlatformWebView. Otherwise, the initial WindowAndViewFramesChanged message
+ will be sent before there's a UI client set up to adjust the frame with WTR's fake origin.
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createOtherPage):
+ (WTR::TestController::createWebViewWithOptions):
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::didInitializeClients):
+
+2013-03-14 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][MiniBrowser] Add a search field to the MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=112122
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement a search field to test API ewk_view_text_find() and add a shortcut 'ctrl' + f.
+
+ * MiniBrowser/efl/main.c:
+ (_Browser_Window):
+ (search_box_show):
+ (search_box_hide):
+ (on_key_down):
+ (on_url_changed):
+ (on_search_field_aborted):
+ (on_search_field_activated):
+ (on_search_field_clicked):
+ (on_search_backward_button_clicked):
+ (on_search_forward_button_clicked):
+ (window_create):
+
+2013-03-14 Julie Parent <jparent@chromium.org>
+
+ Cleanup: Remove g_resourceLoader.
+ https://bugs.webkit.org/show_bug.cgi?id=112305
+
+ Reviewed by Dirk Pranke.
+
+ Removing another global.
+
+ Now, each dashboard creates its own loader, rather than having
+ a general global one.
+
+ Remove usage of g_resourceLoader.isLoadingComplete from
+ handleLocationChange by ensuring that handleLocationChange is
+ never called before the loader is done. It was called in two
+ places before: 1 was from the callback when the loader is done,
+ so that was obviously true, and the other was from onhashchange,
+ where it would just return rather than running. Instead, lets
+ only register the onhashchange handler once the loader is
+ setup, so the check is no longer necessary.
+
+ Remove isLoadingComplete since it is now unused.
+
+ Callback for loader is now initializeHistory, rather than just
+ handleLocationChange which will set up the hashchange handler now.
+ This will all eventually be moving to a new History object.
+
+ * TestResultServer/static-dashboards/aggregate_results.html:
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (handleLocationChange):
+ (intializeHistory):
+ (decompressResults):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (generatePage):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/treemap.html:
+
+2013-03-14 Manuel Rego Casasnovas <rego@igalia.com>
+
+ Add selectTrailingWhitespaceEnabled setting to WebCore::Page
+ https://bugs.webkit.org/show_bug.cgi?id=109404
+
+ Reviewed by Tony Chang.
+
+ Removes all the code related to smartInsertDeleteEnabled and
+ selectTrailingWhitespaceEnabled settings as they will be managed from
+ internals from now on.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (WebKit):
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
+ (DumpRenderTree):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner::WebTestProxy::didStopLoading):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::applyTo): Set default values for
+ smartInsertDeleteEnabled and selectTrailingWhitespaceEnabled settings as
+ Chromium DRT default values are different from Chromium browser.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+
+2013-03-14 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Disable DRT on Windows
+
+ Reviewed by Jocelyn Turcotte.
+
+ We don't run and maintain DRT on Windows, so let's not try to maintain the build of it.
+
+ * qmake/mkspecs/features/configure.prf:
+
+2013-03-14 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] Add an API for adding and removing user style sheets from a page group
+ https://bugs.webkit.org/show_bug.cgi?id=110728
+
+ Reviewed by Gyuyoung Kim.
+
+ Use the page group to create the view object.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+
+2013-03-14 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Improve the handling of mock geolocation, device orientation and motion clients
+
+ Reviewed by Tor Arne Vestbø.
+
+ The mock versions of these web facing features should be instantiated when
+ running in DumpRenderTree only. In order for them to work, no extra Qt modules
+ such as QtLocation are actually needed.
+
+ This patch decouples enabling device orientation/motion and geolocation from
+ the underlying Qt modules and makes them available in developer builds
+ (!production_build) and backed by mock backends when running in drt.
+
+ So if the Qt 5 modules are available, they'll be used (unless drtRun). For
+ developers the web facing features are always enabled (although requests will
+ time out) and the mock backends are enabled inside DRT, allowing for the layout
+ tests to run with less dependencies.
+
+ In addition this also enables the mock device motion client, which was
+ previously never instantiated.
+
+ * qmake/mkspecs/features/features.prf:
+
+2013-03-14 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Removing no-ops and simple setters/getters from TestRunnerQt
+ https://bugs.webkit.org/show_bug.cgi?id=112340
+
+ Reviewed by Simon Hausmann.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (DumpRenderTree::dump):
+ Replace shouldDumpBackForwardList() with TestController:dumpBackForwardList().
+ (DumpRenderTree::dumpApplicationCacheQuota):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::reset):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-03-14 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Port DRT to use TestRunner::dumpAsText()
+ https://bugs.webkit.org/show_bug.cgi?id=112260
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ (WebCore::methodNameStringForFailedTest):
+ Change parameter from type TestRunnerQt* to TestRunner*.
+ (WebCore::DumpRenderTree::dump):
+ TestRunnerQt::shouldDumpPixels() always returned true in our case.
+ Instead we should rely on TestRunner::generatePixelResults().
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::reset):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-03-13 Kunihiko Sakamoto <ksakamoto@chromium.org>
+
+ Implement FontLoader interface
+ https://bugs.webkit.org/show_bug.cgi?id=98395
+
+ Reviewed by Eric Seidel.
+
+ Enable FontLoadEvents runtime flag for TestShell.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+
+2013-03-13 Julie Parent <jparent@chromium.org>
+
+ CLeanup: remove unnecessary call to parseParameters.
+ https://bugs.webkit.org/show_bug.cgi?id=112309
+
+ Reviewed by Ojan Vafai.
+
+ We call parseCrossDashboardParameters when the dashboard initially
+ loads to set the state required for loadBuildersList, and then we
+ call it again once we are fully done with loading, so there is no
+ reason to call it in the middle of the loading process here.
+
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+
+2013-03-13 Elliott Sprehn <esprehn@chromium.org>
+
+ Unreviewed. Now I'm a reviewer :)
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-13 Ryosuke Niwa <rniwa@webkit.org>
+
+ Threaded HTML Parser is missing feature define flags in all but Chromium port's build files
+ https://bugs.webkit.org/show_bug.cgi?id=112277
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-03-13 Adam Barth <abarth@webkit.org>
+
+ run-perf-tests should support content_shell
+ https://bugs.webkit.org/show_bug.cgi?id=112291
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+
+2013-03-13 Oliver Hunt <oliver@apple.com>
+
+ Simplify Checked<> multiplication
+ https://bugs.webkit.org/show_bug.cgi?id=112286
+
+ Reviewed by James Robinson.
+
+ Add tests for multiplication by zero and max to ensure we don't
+ mess them up should we ever make changes to Checked<> in future.
+
+ * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
+ (TestWebKitAPI):
+
+2013-03-13 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Unreviewed prospective Windows build fix
+
+ Do the usual thing, include the moc generated code in the .cpp file instead
+ of compiling it standalone, to ensure that config.h is included, too, and
+ NOMINMAX is defined to avoid the min/max conflict when also including qdatetime.h.
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+
+2013-03-13 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Port TestRunner::findString to shared interface
+ https://bugs.webkit.org/show_bug.cgi?id=112147
+
+ Reviewed by Jocelyn Turcotte.
+
+ This patch also removes DumpRenderTree and some other helper classes from
+ the WebCore namespace, to which they do not really belong.
+
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (DumpRenderTree::DumpRenderTree):
+ (DumpRenderTree::~DumpRenderTree):
+ (DumpRenderTree::instance):
+ (DumpRenderTree::setShouldTimeout):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (DumpRenderTree):
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::contextClick):
+ (EventSender::sendEvent):
+ (EventSender::postEvent):
+ * DumpRenderTree/qt/EventSenderQt.h:
+ (EventSender::isGraphicsBased):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::TestRunnerQt):
+ (TestRunner::findString):
+ (TestRunnerQt::setMockDeviceOrientation):
+ (TestRunnerQt::setGeolocationPermission):
+ (TestRunnerQt::numberOfPendingGeolocationPermissionRequests):
+ (TestRunnerQt::setMockGeolocationPositionUnavailableError):
+ (TestRunnerQt::setMockGeolocationPosition):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-03-13 Mikhail Naganov <mnaganov@chromium.org>
+
+ [Chromium] Rename android_build_type to android_webview_build in .gyp files.
+ https://bugs.webkit.org/show_bug.cgi?id=112129
+
+ Reviewed by Adam Barth.
+
+ Following Chromium
+ http://src.chromium.org/viewvc/chrome?view=rev&revision=187556
+ this is being renamed to better explain what it does.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-13 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Unreviewed trivial typo fix
+
+ * DumpRenderTree/qt/DumpRenderTree.pro: It's TestRunner.h, not
+ TextRunner.h. Thanks Zeno :)
+
+2013-03-12 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Prepare DRT for transition to shared TestRunner interface
+ https://bugs.webkit.org/show_bug.cgi?id=112144
+
+ Reviewed by Benjamin Poulain.
+
+ Prepare Qt's DRT for a transition from the QObject based TestRunner to
+ the JSC C API based one.
+
+ This is impplemented by instantiating the QObject based testRunner in
+ the global object, then instantiating the JSC C based TestRunner
+ separately and placing it "behind" the QObject based testRunner through
+ injection of the individual functions through proxies. (prototype
+ chaining doesn't work due to the this object and Function.prototype.bind
+ doesn't work due to the native function)
+
+ This allows for porting over method by method by removing the method
+ from the QObject TestRunnerQt and implementing it in the JSC C based
+ TestRunner.
+
+ In order for this to link and run dummy implementations of all the
+ necessary TestRunner functions are provided.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ (WebCore::DumpRenderTree::initJSObjects):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (DumpRenderTree):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::~TestRunner):
+ (TestRunner::addDisallowedURL):
+ (TestRunner::queueLoad):
+ (TestRunner::removeAllVisitedLinks):
+ (TestRunner::setAcceptsEditing):
+ (TestRunner::simulateLegacyWebNotificationClick):
+ (TestRunner::setWindowIsKey):
+ (TestRunner::setAlwaysAcceptCookies):
+ (TestRunner::addOriginAccessWhitelistEntry):
+ (TestRunner::setWebViewEditable):
+ (TestRunner::clearAllApplicationCaches):
+ (TestRunner::setTextDirection):
+ (TestRunner::notifyDone):
+ (TestRunner::numberOfPendingGeolocationPermissionRequests):
+ (TestRunner::overridePreference):
+ (TestRunner::pathToLocalResource):
+ (TestRunner::removeAllWebNotificationPermissions):
+ (TestRunner::simulateWebNotificationClick):
+ (TestRunner::closeIdleLocalStorageDatabases):
+ (TestRunner::focusWebView):
+ (TestRunner::setBackingScaleFactor):
+ (TestRunner::removeChromeInputField):
+ (TestRunner::addChromeInputField):
+ (TestRunner::originsWithLocalStorage):
+ (TestRunner::deleteAllLocalStorage):
+ (TestRunner::deleteLocalStorageForOrigin):
+ (TestRunner::observeStorageTrackerNotifications):
+ (TestRunner::syncLocalStorage):
+ (TestRunner::windowCount):
+ (TestRunner::setWaitToDump):
+ (TestRunner::waitForPolicyDelegate):
+ (TestRunner::webHistoryItemCount):
+ (TestRunner::showWebInspector):
+ (TestRunner::closeWebInspector):
+ (TestRunner::evaluateInWebInspector):
+ (TestRunner::setSerializeHTTPLoads):
+ (TestRunner::apiTestNewWindowDataLoadBaseURL):
+ (TestRunner::setCustomPolicyDelegate):
+ (TestRunner::setDatabaseQuota):
+ (TestRunner::setDomainRelaxationForbiddenForURLScheme):
+ (TestRunner::resetPageVisibility):
+ (TestRunner::keepWebHistory):
+ (TestRunner::goBack):
+ (TestRunner::originsWithApplicationCache):
+ (TestRunner::applicationCacheDiskUsageForOrigin):
+ (TestRunner::display):
+ (TestRunner::dispatchPendingLoadRequests):
+ (TestRunner::clearPersistentUserStyleSheet):
+ (TestRunner::callShouldCloseOnWebView):
+ (TestRunner::copyDecodedHostName):
+ (TestRunner::clearBackForwardList):
+ (TestRunner::clearAllDatabases):
+ (TestRunner::clearApplicationCacheForOrigin):
+ (TestRunner::apiTestGoToCurrentBackForwardItem):
+ (TestRunner::authenticateSession):
+ (TestRunner::abortModal):
+ (TestRunner::setStorageDatabaseIdleInterval):
+ (TestRunner::setAsynchronousSpellCheckingEnabled):
+ (TestRunner::setXSSAuditorEnabled):
+ (TestRunner::setSpatialNavigationEnabled):
+ (TestRunner::setScrollbarPolicy):
+ (TestRunner::setJavaScriptCanAccessClipboard):
+ (TestRunner::setAutomaticLinkDetectionEnabled):
+ (TestRunner::setUserStyleSheetEnabled):
+ (TestRunner::setUserStyleSheetLocation):
+ (TestRunner::setUseDashboardCompatibilityMode):
+ (TestRunner::setTabKeyCyclesThroughElements):
+ (TestRunner::setSmartInsertDeleteEnabled):
+ (TestRunner::setSelectTrailingWhitespaceEnabled):
+ (TestRunner::setPrivateBrowsingEnabled):
+ (TestRunner::setPluginsEnabled):
+ (TestRunner::setPopupBlockingEnabled):
+ (TestRunner::setMockSpeechInputDumpRect):
+ (TestRunner::setPersistentUserStyleSheetLocation):
+ (TestRunner::setMockGeolocationPosition):
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ (TestRunner::setMockDeviceOrientation):
+ (TestRunner::setMainFrameIsFirstResponder):
+ (TestRunner::setIconDatabaseEnabled):
+ (TestRunner::setGeolocationPermission):
+ (TestRunner::setDefersLoading):
+ (TestRunner::setCacheModel):
+ (TestRunner::setAuthorAndUserStylesEnabled):
+ (TestRunner::setAllowFileAccessFromFileURLs):
+ (TestRunner::setAppCacheMaximumSize):
+ (TestRunner::setAllowUniversalAccessFromFileURLs):
+ (TestRunner::setApplicationCacheOriginQuota):
+ (TestRunner::denyWebNotificationPermission):
+ (TestRunner::grantWebNotificationPermission):
+ (TestRunner::setValueForUser):
+ (TestRunner::setViewModeMediaFeature):
+ (TestRunner::setPageVisibility):
+ (TestRunner::addMockSpeechInputResult):
+ (TestRunner::removeOriginAccessWhitelistEntry):
+ (TestRunner::addUserScript):
+ (TestRunner::isCommandEnabled):
+ (TestRunner::evaluateScriptInIsolatedWorld):
+ (TestRunner::evaluateScriptInIsolatedWorldAndReturnValue):
+ (TestRunner::copyEncodedHostName):
+ (TestRunner::addUserStyleSheet):
+ (TestRunner::findString):
+ (TestRunner::execCommand):
+ (TestRunner::localStorageDiskUsageForOrigin):
+
+2013-03-12 Julie Parent <jparent@chromium.org>
+
+ Cleanup: Move flatten-trie to loader.
+ https://bugs.webkit.org/show_bug.cgi?id=112196
+
+ Reviewed by Dirk Pranke.
+
+ flatten-trie is used only by the loader, so move it there and make it
+ private, rather than global in dashbaord_base. Moved the corresponding
+ unit test from flakiness_dashboard_unittests to loader_unittests.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-03-12 Oliver Hunt <oliver@apple.com>
+
+ Unbreak api tests
+
+ * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
+ (TestWebKitAPI):
+
+2013-03-12 Tim Horton <timothy_horton@apple.com>
+
+ Unreviewed, disabling tests for Win EWS.
+
+ win-ews obviously cannot keep up with running tests, it's >300 behind.
+ Probably doesn't help that its (likely) running tests serially.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-12 Tim Horton <timothy_horton@apple.com>
+
+ Add a --build-directory argument to delete-stale-build-files
+ https://bugs.webkit.org/show_bug.cgi?id=112198
+
+ Reviewed by Ryosuke Niwa.
+
+ * BuildSlaveSupport/delete-stale-build-files:
+ (main): Add --build-directory argument.
+
+2013-03-12 Oliver Hunt <oliver@apple.com>
+
+ Appease MSVC
+
+ * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
+ (TestWebKitAPI):
+
+2013-03-12 Oliver Hunt <oliver@apple.com>
+
+ Add more Checked<> tests
+ https://bugs.webkit.org/show_bug.cgi?id=112190
+
+ Reviewed by Geoffrey Garen.
+
+ Tests!
+
+ * TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp:
+ (TestWebKitAPI):
+
+2013-03-12 Julie Parent <jparent@chromium.org>
+
+ Cleanup: Move loading complete function into callback, rather than global.
+ https://bugs.webkit.org/show_bug.cgi?id=112167
+
+ Reviewed by Dirk Pranke.
+
+ Stop calling global functions, pass in proper handler to Loader
+ constructor. Note that the callback is optional, as tests, and
+ some potential dashboards, do not need one.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-03-12 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL][WK2] Add popup menu support to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=108934
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement popup menu support in MiniBrowser by handling popup_menu_show
+ and popup_menu_hide smart functions on the view and using the Ewk popup
+ menu API.
+
+ * MiniBrowser/efl/main.c:
+ (_Browser_Window):
+ (on_popup_menu_discarded):
+ (on_popup_menu_item_clicked):
+ (popup_menu_populate):
+ (on_popup_menu_show):
+ (on_popup_menu_hide):
+ (window_create): Use calloc() instead of malloc() to allocate memory for
+ Browser_Window. This makes sure all the structs members are initialized
+ to 0 (such as the new elm_popup_menu pointer).
+
+2013-03-12 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Set up the libPlatformGtk.la library
+ https://bugs.webkit.org/show_bug.cgi?id=111738
+
+ Reviewed by Martin Robinson.
+
+ * GNUmakefile.am: Reference platformgtk_cppflags variable along with webcoregtk_cppflags variable.
+ Adjust the path to GtkVersioning.c, the file has moved under Source/Platform.
+ * TestWebKitAPI/GNUmakefile.am: Reference platformgtk_cppflags variable along with webcoregtk_cppflags variable.
+
+2013-03-12 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Enable Web Audio in development builds
+ https://bugs.webkit.org/show_bug.cgi?id=111831
+
+ Reviewed by Philippe Normand.
+
+ Web Audio is already quite well supported on the GTK port but still has a few issues
+ that must be addressed before it is enabled by default. Despite that it should be enabled
+ in development builds just so we are up-to-date with future feature infrastructure changes.
+ The Web Audio-related layout tests are not run yet due to missing support in DRT/WKTR, but
+ that's an obvious goal before enabling the feature in release builds.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-03-11 Andreas Kling <akling@apple.com>
+
+ [Mac][WK1] Add support for alert() in MiniBrowser.
+ <http://webkit.org/b/112090>
+
+ Reviewed by Anders Carlsson.
+
+ * MiniBrowser/mac/WK1BrowserWindowController.m:
+ (-[WK1BrowserWindowController webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
+
+2013-03-11 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: Create ui.Errors
+ https://bugs.webkit.org/show_bug.cgi?id=111785
+
+ Reviewed by Ojan Vafai.
+
+ Create ui.Errors for handling errors the dashboards
+ encounter. Loader now has a Error object that it can add to,
+ and individual dashboards can show errors when desired.
+ Currently, only flakiness_db shows errors, but this is
+ generic and there is no reason why other dbs wouldn't want to
+ show errors.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (resourceLoadingComplete):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (generatePage):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/ui.js:
+ (.):
+
+2013-03-08 Geoffrey Garen <ggaren@apple.com>
+
+ Some StringHasher tests are broken because of missing null termination
+ https://bugs.webkit.org/show_bug.cgi?id=111284
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/Tests/WTF/StringHasher.cpp:
+ (TestWebKitAPI): Added null termination since C strings are null-terminated.
+ (TestWebKitAPI::TEST): Removed #ifdef's that disabled this testing since
+ the bug caught by it is now fixed.
+
+2013-03-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r145200.
+ http://trac.webkit.org/changeset/145200
+ https://bugs.webkit.org/show_bug.cgi?id=112063
+
+ Broke a couple of unit tests (Requested by zdobersek on
+ #webkit).
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-03-11 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] WebKit2-only build fails
+ https://bugs.webkit.org/show_bug.cgi?id=112033
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * GNUmakefile.am: Split the list of files the docs-build.stamp target depends on into the
+ generic part, WebKit1-specific part and WebKit2-specific part.
+ * TestWebKitAPI/GNUmakefile.am: The TestGtk executable should not link agains libwebkitgtk
+ as it is not WebKit1-specific, but should rather link to libWebCore.la and libWebCoreGtk.la
+ directly.
+
+2013-03-11 Dima Gorbik <dgorbik@apple.com>
+
+ Adding myself to the committers list.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-11 Jeff Rogers <jrogers@rim.com>
+
+ [BlackBerry] Disable MathML support
+ https://bugs.webkit.org/show_bug.cgi?id=111929
+
+ Reviewed by Rob Buis.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-03-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL][GTK][WKTR] Regression(r145231): Undefined symbol in libTestRunnerInjectedBundle.so
+ https://bugs.webkit.org/show_bug.cgi?id=111970
+
+ Reviewed by Chris Fleizach.
+
+ Provide dummy implementation for AccessibilityUIElement::supportedActions() in ATK
+ or libTestRunnerInjectedBundle.so cannot be loaded in EFL / GTK otherwise, due to
+ undefined symbol.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::supportedActions):
+ (WTR):
+
+2013-03-11 Chris Hopman <cjhopman@chromium.org>
+
+ [chromium] Android apk targets should depend directly on Java library targets
+ https://bugs.webkit.org/show_bug.cgi?id=111746
+
+ Reviewed by Eric Seidel.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ Make DumpRenderTree_apk depend directly on base_java and net_java.
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
+ Make TestWebKitAPI_apk depend directly on base_java.
+
+2013-03-11 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove obsolete user gesture methods from WebFrame
+ https://bugs.webkit.org/show_bug.cgi?id=111696
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::handleInputEvent):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+
+2013-03-10 Silvia Pfeiffer <silviapf@chromium.org>
+
+ Unreviewed, add myself to commiters.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-08 Julie Parent <jparent@chromium.org>
+
+ Cleanup: Remove dead code.
+ https://bugs.webkit.org/show_bug.cgi?id=111900
+
+ Reviewed by Dirk Pranke.
+
+ Treemap overrides a global function that used to be in
+ dashboard_base, but was removed months ago in
+ https://bugs.webkit.org/show_bug.cgi?id=99246, so this code has
+ no caller.
+
+ * TestResultServer/static-dashboards/treemap.html:
+
+2013-03-08 Harald Alvestrand <hta@chromium.org>
+
+ Implemented new API for RTCStatsReport object.
+ https://bugs.webkit.org/show_bug.cgi?id=110333
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp:
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::getStats):
+
+2013-03-08 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] use custom freetype on linux asan builds again
+ https://bugs.webkit.org/show_bug.cgi?id=111884
+
+ Reviewed by Tony Chang.
+
+ We no longer need the workaround after chromium r186540.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-08 Ryosuke Niwa <rniwa@webkit.org>
+
+ Warning about the user not having edit rights on Bugzilla is confusing new contributors
+ https://bugs.webkit.org/show_bug.cgi?id=111798
+
+ Reviewed by Dirk Pranke.
+
+ Don't scare people by the warning. Instead, tell them to ignore it if they don't have EditBugs privileges.
+
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+
+2013-03-08 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove WebLayerTreeViewClient and WebLayerTreeView::Settings
+ https://bugs.webkit.org/show_bug.cgi?id=111632
+
+ Reviewed by Adrienne Walker.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-03-08 Benjamin Poulain <benjamin@webkit.org>
+
+ [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=111297
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setViewModeMediaFeature):
+
+2013-03-08 Chris Fleizach <cfleizach@apple.com>
+
+ [Mac] [WK2] platform/mac/accessibility/press-action-is-first.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=111814
+
+ Reviewed by Ryosuke Niwa.
+
+ Add the needed supportedActions() attribute to WKTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::supportedActions):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::supportedActions):
+
+2013-03-08 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL] Memory leak at WKViewClientWebProcessCallbacks API test
+ https://bugs.webkit.org/show_bug.cgi?id=111851
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp:
+ (TestWebKitAPI::TEST):
+
+ Fixed WKURLRef instance leaking.
+
+2013-03-08 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL] [WK2] Some authentication tests fail in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=106407
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add patch from upstream for libsoup 2.40 to fix several authentication
+ test cases.
+
+ * efl/jhbuild.modules:
+ * efl/patches/libsoup-2.40-auth-fix.patch: Added.
+
+2013-03-08 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Enable Web Audio in development builds
+ https://bugs.webkit.org/show_bug.cgi?id=111831
+
+ Reviewed by Philippe Normand.
+
+ Web Audio is already quite well supported on the GTK port but still has a few issues
+ that must be addressed before it is enabled by default. Despite that it should be enabled
+ in development builds just so we are up-to-date with future feature infrastructure changes.
+ The Web Audio-related layout tests are not run yet due to missing support in DRT/WKTR, but
+ that's an obvious goal before enabling the feature in release builds.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-03-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] delay clearing the TestRunners until the main view was deleted
+ https://bugs.webkit.org/show_bug.cgi?id=111823
+
+ Reviewed by Eric Seidel.
+
+ During WebViewHost::shutdown, we navigate the WebView to about:blank.
+ This may call into the test runners which assume that the delegate is
+ always non-NULL.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::~TestShell):
+
+2013-03-07 Alan Cutter <alancutter@chromium.org>
+
+ Sheriffbot whois command can't search by full name
+ https://bugs.webkit.org/show_bug.cgi?id=111825
+
+ Reviewed by Eric Seidel.
+
+ Allowed multiple arguments to Sheriffbot's whois command.
+ Updated test expectations.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Whois.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_whois):
+
+2013-03-07 Nils Barth <nbarth@chromium.org>
+
+ Add Nils Barth and Koji Hara to committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=111806
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-07 Glenn Adams <glenn@skynav.com>
+
+ run-pert-tests should have a --test-runner-count option
+ https://bugs.webkit.org/show_bug.cgi?id=111726
+
+ Reviewed by Ryosuke Niwa.
+
+ Add --test-runner-count option to run-perf-tests, with default value of 4.
+ This option allows command line configuration of the number of times to invoke
+ the test runner (serially, not in parallel) when running a specific test in
+ a test set.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest): Add DEFAULT_TEST_RUNNER_COUNT constant.
+ (PerfTest.__init__): Rename process_run_count to test_runner_count (throughout).
+ (PerfTest.run): Rename process_run_count to test_runner_count.
+ (SingleProcessPerfTest.__init__): Add test_runner_count optional argument.
+ (ChromiumStylePerfTest.__init__): Add test_runner_count optional argument.
+ (ReplayPerfTest.__init__): Add test_runner_count optional argument.
+ (PerfTestFactory.create_perf_test): Add test_runner_count optional argument.
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args): Add '--test-runner-count' option.
+ (PerfTestsRunner._collect_tests): Use test_runner_count when creating PerfTest.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (MainTest._test_run_with_json_output): Add optional compare_logs argument.
+ (MainTest.test_run_with_repeat):
+ (MainTest.test_run_with_test_runner_count): Add new test for test-runner-count option semantics.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (MainTest.test_default_args): Add test for default option argument values.
+ (MainTest.test_parse_args): Add test for test-runner-count option parsing.
+
+2013-03-07 Christian Biesinger <cbiesinger@chromium.org>
+
+ Add myself to reviewers.py
+ https://bugs.webkit.org/show_bug.cgi?id=111757
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-03-07 Glenn Adams <glenn@skynav.com>
+
+ run-perf-tests should have a --repeat option
+ https://bugs.webkit.org/show_bug.cgi?id=100030
+
+ Reviewed by Ryosuke Niwa.
+
+ Add --repeat option to run-perf-tests, with default value of 1. When greater
+ than 1, runs test set specified number of times. Note that multiple runs are
+ not aggregated for statistical purposes.
+
+ Incidentally fixed typo: s/suceeds/succeeds/.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args): Add repeat option.
+ (PerfTestsRunner.run): Add outer repeat loop.
+ (PerfTestsRunner._generate_results): Split from original _generate_and_show_results.
+ (PerfTestsRunner._upload_and_show_results): Split from original _generate_and_show_results.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (MainTest._test_run_with_json_output): Add repeat optional argument for generating expected logs. Fix typo.
+ (MainTest._test_run_with_json_output.mock_upload_json): Fix typo.
+ (MainTest.test_run_with_json_output): Fix typo.
+ (MainTest.test_run_with_description): Fix typo.
+ (MainTest.test_run_respects_no_results): Fix typo.
+ (MainTest.test_run_with_slave_config_json): Fix typo.
+ (MainTest.test_run_with_multiple_repositories): Fix typo.
+ (MainTest.test_run_with_upload_json): Fix typo.
+ (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Fix typo.
+ (MainTest.test_run_with_repeat): Added new test for repeat count semantics.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (MainTest.test_parse_args): Add test for repeat option parsing.
+
+2013-03-07 Julie Parent <jparent@chromium.org>
+
+ showAllRuns checkbox no longer works on the stats dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=111673
+
+ Reviewed by Ojan Vafai.
+
+ Stats dashboard does not have any DB_SPECIFIC_INVALIDATING_PARAMETERS,
+ so we were trying to index into an undefined object.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (invalidateQueryParameters):
+
+2013-03-07 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Update #include for WebStorageNamespace.h
+ https://bugs.webkit.org/show_bug.cgi?id=111748
+
+ Reviewed by Adam Barth.
+
+ In anticipation of removing
+ WK/chromium/public/WebStorageNamespace.h (once downstream
+ references have been updated)
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+
+2013-03-07 Dirk Pranke <dpranke@chromium.org>
+
+ run-perf-tests fails due to svn_revision not working on a pure git clone
+ https://bugs.webkit.org/show_bug.cgi?id=110839
+
+ Reviewed by Ryosuke Niwa.
+
+ Previously we would call git svn find-rev to look up the commit for
+ a given revision, and that'll hang in a pure git checkout.
+
+ This patch changes the way we look up svn revisions in a git
+ repository to use git log --grep 'git-svn-id', which is much faster
+ than grepping ourselves. It also renames timestamp_of_latest_commit()
+ to timestamp_of_revision() in order to accurately reflect what
+ the method is doing. Note that this patch only changes the logic
+ inside latest_revision() and svn_revision(). I'll file a separate
+ bug to change git_commit_from_svn_revision().
+
+ This patch also contains some fixes to unit tests that had bit-rotted
+ or were otherwise fragile, so that test-webkitpy --all would pass
+ cleanly, and a fix to outputcapture so that
+ test-webkitpy -p would work correctly again.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.svn_revision):
+ (Git.timestamp_of_revision):
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.svn_revision):
+ (SCM.timestamp_of_revision):
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ (MockSCM.timestamp_of_revision):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (_shared_test_commit_with_message):
+ (test_commit_without_authorization):
+ (test_timestamp_of_revision):
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.timestamp_of_revision):
+ * Scripts/webkitpy/common/system/outputcapture.py:
+ Importing unittest2 directly may not be safe if this module is
+ imported before the autoinstaller gets a chance to set things up
+ properly. We don't actually need unittest2 here.
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._generate_results_dict):
+
+2013-03-07 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL] Bump libsoup dependency to 2.40.3 to fix regressions
+ https://bugs.webkit.org/show_bug.cgi?id=111756
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Bump libsoup to v2.40.3 to fix the regressions introduced by
+ previous v2.40.0 bump.
+
+ * efl/jhbuild.modules:
+
+2013-03-07 Roger Fong <roger_fong@apple.com>
+
+ Re-enable Win EWS tests.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-07 Dirk Pranke <dpranke@chromium.org>
+
+ [nrwt] handle corrupt http server pid files cleanly
+ https://bugs.webkit.org/show_bug.cgi?id=111628
+
+ Reviewed by Eric Seidel.
+
+ If the pid file from a previous http server is corrupt for some
+ reason, NRWT will just raise errors and not clean it up or recover.
+ This patch fixes that to at least delete the pid file and
+ not throw; not that we may still have stale http servers left on
+ the system, since there's no way to know which pid to kill if
+ the file was corrupted.
+
+ * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
+ (HttpServerBase.start):
+ (HttpServerBase.stop):
+ (HttpServerBase._remove_pid_file):
+ * Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py: Added.
+ (TestHttpServerBase):
+ (TestHttpServerBase.test_corrupt_pid_file):
+
+2013-03-07 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Can't activate links with VoiceOver in Safari
+ https://bugs.webkit.org/show_bug.cgi?id=111755
+
+ Reviewed by Tim Horton.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (supportedActionsCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::supportedActions):
+
+2013-03-07 Roger Fong <roger_fong@apple.com>
+
+ Windows debug layout tests are crashing like crazy again.
+ Disable tests on Win EWS bots temporarily.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-07 Roger Fong <roger_fong@apple.com>
+
+ Make EWS bots build and test in release.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-03-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] don't track the top loading frame if no layout test is currently running
+ https://bugs.webkit.org/show_bug.cgi?id=111716
+
+ Reviewed by Kentaro Hara.
+
+ In DRT, we synchronously stop the test and start loading the next test
+ URL. However, in content_shell, this happens asynchronously. It's
+ important that the top loading frame is not changed due to stray
+ navigation events before the next test starts.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::setTopLoadingFrame):
+
+2013-03-06 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: Move all dashboard ui related code into ui.js.
+ https://bugs.webkit.org/show_bug.cgi?id=111621
+
+ Reviewed by Ojan Vafai.
+
+ Creates ui.js, a package for the common UI code the various
+ dashboards use. HTML generation is now in the ui.html namespace
+ and popup handling is in ui.popup.
+ Also moves the event listening for popups to ui.popup.show and
+ removes it on ui.popup.hid rather than having listener always
+ around.
+
+ * TestResultServer/static-dashboards/aggregate_results.html:
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard.html:
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (showPopupForBuild):
+ (htmlForNavBar):
+ (generatePageForIndividualTests.if):
+ (generatePageForIndividualTests):
+ * TestResultServer/static-dashboards/flakiness_dashboard_embedded_unittests.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ * TestResultServer/static-dashboards/run-embedded-unittests.html:
+ * TestResultServer/static-dashboards/run-unittests.html:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/treemap.html:
+ * TestResultServer/static-dashboards/ui.js: Added.
+ (.):
+
+2013-03-06 Krzysztof Czech <k.czech@samsung.com>
+
+ [EFL] Missing implementation of AccessibilityControllerEfl and AccessibilityUIElementEfl files
+ https://bugs.webkit.org/show_bug.cgi?id=110584
+
+ Reviewed by Gyuyoung Kim.
+
+ Adds missing implementation of AccessibilityControllerEfl
+ and AccessibilityUIElementEfl files. Modify DumpRenderTreeChrome
+ so that it can make accessibilityController as a js object.
+
+ * DumpRenderTree/AccessibilityController.h:
+ (AccessibilityController):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ * DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
+ (AccessibilityController::childElementById): Moved declaration to base class.
+ Implementation can be shared among other ports.
+ * DumpRenderTree/efl/AccessibilityControllerEfl.cpp: Copied from Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp.
+ (AccessibilityController::focusedElement):
+ (AccessibilityController::rootElement):
+ (AccessibilityController::accessibleElementById):
+ * DumpRenderTree/efl/AccessibilityUIElementEfl.cpp: Copied from Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp.
+ (AccessibilityUIElement::helpText):
+ * DumpRenderTree/efl/CMakeLists.txt:
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::DumpRenderTreeChrome):
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ (DumpRenderTreeChrome::onWindowObjectCleared):
+ (DumpRenderTreeChrome::accessibilityController):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+ (DumpRenderTreeChrome):
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+
+2013-03-06 Benjamin Poulain <benjamin@webkit.org>
+
+ WebKitTestRunner needs layoutTestController.elementDoesAutoCompleteForElementWithId
+ https://bugs.webkit.org/show_bug.cgi?id=42696
+
+ Reviewed by Andreas Kling.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+
+2013-03-06 Roger Fong <roger_fong@apple.com>
+
+ Re-enable WinEWS test and decrease iterations before clean build back to 10.
+
+ * EWSTools/start-queue-win.sh:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-06 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [WK2][GTK] Fix unit test WebKit2APITests/WebKitWebView/mouse-target
+ https://bugs.webkit.org/show_bug.cgi?id=82866
+
+ Reviewed by Martin Robinson.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Unflag WebKit2APITests/WebKitWebView/mouse-target test as
+ it is passing now.
+
+2013-03-06 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: remove dashboard time logging.
+ https://bugs.webkit.org/show_bug.cgi?id=111608
+
+ Reviewed by Dirk Pranke.
+
+ Remove logTime. It was never accurate, and the dev tools
+ have better ways to measure this if anyone cares to look
+ into dashboard perf.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (processTestRunsForBuilder):
+ (appendHTML):
+
+2013-03-06 Tony Chang <tony@chromium.org>
+
+ [chromium] making DumpRenderTree_resources a separate bundle breaks xcode
+ https://bugs.webkit.org/show_bug.cgi?id=111509
+
+ Reviewed by Dirk Pranke.
+
+ Add DumpRenderTree.pak to DumpRenderTree.app again.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-06 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] introduce WebUserGestureIndicator
+ https://bugs.webkit.org/show_bug.cgi?id=111531
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createView):
+
+2013-03-06 Alan Cutter <alancutter@chromium.org>
+
+ sheriffbot roll-chromium-deps shouldn't create a bug with None as the new revision.
+ https://bugs.webkit.org/show_bug.cgi?id=73482
+
+ Reviewed by Ryosuke Niwa.
+
+ Added input checking to the UpdateChromiumDEPS step.
+ Removed the default use of LKGR when the revision input is invalid. "LKGR" must be explicitly given instead.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py: Updated input validation and error message handling.
+ (RollChromiumDEPS):
+ (RollChromiumDEPS._parse_args):
+ (RollChromiumDEPS.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py: Updated unit tests.
+ (IRCCommandTest.test_roll_chromium_deps):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py: Updated unit tests.
+ (IRCBotTest.test_roll_chromium_deps_to_lkgr):
+ * Scripts/webkitpy/tool/commands/roll_unittest.py: Updated unit tests.
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps.py: Added input validation and added new error handling cases. Changed the logic of deciding to use LKGR to be only when the input is "LKGR".
+ (UpdateChromiumDEPS._fetch_last_known_good_revision):
+ (UpdateChromiumDEPS):
+ (UpdateChromiumDEPS._parse_revision_number):
+ (UpdateChromiumDEPS._validate_revisions):
+ (UpdateChromiumDEPS.run):
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps_unittest.py: Added unit tests.
+ (UpdateChromiumDEPSTest):
+ (UpdateChromiumDEPSTest.test_parse_revision_number):
+ * Scripts/webkitpy/tool/commands/roll.py: Updated help text.
+ (RollChromiumDEPS):
+ (PostChromiumDEPSRoll):
+
+2013-03-06 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt][MiniBrowser] Touch mocking broken for chained getures
+ https://bugs.webkit.org/show_bug.cgi?id=111430
+
+ Reviewed by Jocelyn Turcotte.
+
+ Make it possible again to use touch mocking to test gesture chains
+ like pan->pinch->pan->pinch without lifting the primary "finger".
+ For this to work we need to track the pressed mouse buttons and
+ only synthesize touch release events when the ctrl key is released
+ if no mouse button is pressed. Else the pressed mouse button(s)
+ should result in a stationary touch point in a touch update event.
+ Since it has been fixed in Qt 5.0.1 use QGuiApplication::keyboardModifiers()
+ to check for the state of the ctrl key modifier instead of getting
+ it from the mouse events.
+
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::MiniBrowserApplication):
+ (MiniBrowserApplication::notify):
+
+2013-03-05 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] don't use custom freetype on linux asan for now
+ https://bugs.webkit.org/show_bug.cgi?id=111516
+
+ Unreviewed, build fix.
+
+ Turns out the custom lib is getting picked up by other binaries
+ on our bot, which is bad.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-05 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] making DumpRenderTree_resources a separate bundle breaks xcode
+ https://bugs.webkit.org/show_bug.cgi?id=111509
+
+ Unreviewed, build fix.
+
+ Actually comment out the flag :(.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-05 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] making DumpRenderTree_resources a separate bundle breaks xcode
+ https://bugs.webkit.org/show_bug.cgi?id=111509
+
+ Unreviewed, build fix.
+
+ r144863 appears to have broken the xcode build; I'm temporarily
+ trying this instead, and if this doesn't work, I'll revert the
+ other changes.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-05 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] build a DumpRenderTree.pak even on windows
+ https://bugs.webkit.org/show_bug.cgi?id=111504
+
+ Reviewed by Tony Chang.
+
+ The Chromium Aura build uses the default theme to draw
+ controls, and that theme requires the ui ResourceBundle
+ to be initialized. On every other platform, we build
+ a DumpRenderTree.pak that works for this, but on Windows we
+ still compile the resources directly into DRT. As a first step,
+ let's build the pak file. I will then need to land a patch
+ in Chromium to actually load it. Then I can go back and move
+ the resources over to just use the .pak file and no longer need
+ the .rc's.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-03-05 Julie Parent <jparent@chromium.org>
+ Dashboard cleanup: move string utilities into their own namespace.
+
+ https://bugs.webkit.org/show_bug.cgi?id=111485
+
+ Reviewed by Ojan Vafai.
+
+ One of many pieces to clean up dashboard_base.
+
+ Moves string utility functions into separate file (string.js) and into their own namespace rather than cluttering up the global scope.
+
+ * TestResultServer/static-dashboards/aggregate_results.html:
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (isTreeMap):
+ (isFlakinessDashboard):
+ * TestResultServer/static-dashboards/flakiness_dashboard.html:
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (determineWKPlatform):
+ (chromiumPlatform):
+ (platformAndBuildType):
+ (substringList):
+ (individualTestsForSubstringList):
+ (filterBugs):
+ (populateExpectationsData):
+ (processMissingTestsWithExpectations):
+ (processMissingAndExtraExpectations):
+ (htmlForSingleTestRow):
+ (.dummyNode.onload):
+ (expectationsTitle):
+ * TestResultServer/static-dashboards/run-embedded-unittests.html:
+ * TestResultServer/static-dashboards/run-unittests.html:
+ * TestResultServer/static-dashboards/string.js: Added.
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/treemap.html:
+
+2013-03-05 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL] Build break with latest EFL libraries
+ https://bugs.webkit.org/show_bug.cgi?id=111028
+
+ Reviewed by Dirk Pranke.
+
+ * MiniBrowser/efl/CMakeLists.txt: Added ECORE_XXX_INCLUDE_DIRS.
+ * TestWebKitAPI/PlatformEfl.cmake: Ditto.
+ * WebKitTestRunner/PlatformEfl.cmake: Ditto.
+
+2013-03-05 Roger Fong <roger_fong@apple.com>
+
+ Increase number of WinEWS iterations to 20.
+ Don't reboot after each iteration set.
+ Make EWS bots just build temporarily so that the queue catches up again.
+
+ * EWSTools/start-queue-win.sh:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-03-04 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move check for threaded compositing from WebCompositorSupport to Platform
+ https://bugs.webkit.org/show_bug.cgi?id=111386
+
+ Reviewed by Adrienne Walker.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+
+2013-03-05 Min Qin <qinmin@chromium.org>
+
+ Copy dictionary to the external storage before running layout test on android
+ https://bugs.webkit.org/show_bug.cgi?id=111480
+
+ Reviewed by Adam Barth.
+
+ TestWebKitPlatformSupport now needs to read an external dictionary file.
+ This file does not exist on the device. We need to copy it before running layout tests.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._setup_md5sum_and_push_data_if_needed):
+ (ChromiumAndroidDriver._push_platform_resources):
+
+2013-03-05 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] DRT crashes in an Aura/Win build
+ https://bugs.webkit.org/show_bug.cgi?id=111394
+
+ Reviewed by Tony Chang.
+
+ When building (and running) with use_aura=1, we assume that
+ we're using the default theme engine, but DRT creates the
+ DRTWin theme engine and overwrites the default, leading to crashes
+ in basically every test from the mismatch.
+
+ This fix gets us down to at least "lots of crashes" :).
+
+ * DumpRenderTree/chromium/TestShellWin.cpp:
+ (platformInit):
+
+2013-03-05 Eric Seidel <eric@webkit.org>
+
+ Add html-parser-threaded perf test now that the threaded parser is enabled by default
+ https://bugs.webkit.org/show_bug.cgi?id=111200
+
+ Reviewed by Ryosuke Niwa.
+
+ Had to teach run-perf-tests to ignore one more warning.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest):
+
+2013-03-05 Jochen Eisinger <jochen@chromium.org>
+
+ Update list of builders for test results server
+ https://bugs.webkit.org/show_bug.cgi?id=111166
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/builders.jsonp:
+
+2013-03-05 Martin Robinson <mrobinson@igalia.com> and Tomas Popela <tpopela@redhat.com>
+
+ [GTK] Move basic dependency installation to a script
+ https://bugs.webkit.org/show_bug.cgi?id=110692
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * gtk/install-dependencies: Added. A Script which installs all dependencies
+ necessary for building for Debian-based distributions and Fedora.
+
+2013-03-05 James Robinson <jamesr@chromium.org>
+
+ Chromium DumpRenderTree dumps a core every time it's run (Linux/Debug)
+ https://bugs.webkit.org/show_bug.cgi?id=111440
+
+ Reviewed by Adrienne Walker.
+
+ Remove unnecessary WebCompositorSupport::shutdown call
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+
+2013-03-05 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed build fix.
+
+ * GNUmakefile.am: add generate-feature-defines-files scripts to EXTRA_DIST.
+
+2013-03-05 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt][MiniBrowser] Improve the update of touch indicators
+ https://bugs.webkit.org/show_bug.cgi?id=111429
+
+ Reviewed by Jocelyn Turcotte.
+
+ MiniBrowserApplication::sendTouchEvent sends an empty list
+ to BrowserWindow::updateVisualMockTouchPoints if the control
+ button is released, in which case the touch indicators should
+ be hidden so that we never end up with a leftover indicator
+ sticking on the screen.
+ This patch also simplifies the lookup of the indicator items by
+ replacing the findChild search in the item tree with a QHash
+ that stores the touch ID's and the pointers to the corresponding
+ indicator items.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::updateVisualMockTouchPoints):
+ * MiniBrowser/qt/BrowserWindow.h:
+ (BrowserWindow):
+
+2013-03-05 Tim Horton <timothy_horton@apple.com>, Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=81042
+
+ Reviewed by Enrica Casucci.
+
+ Add setAsynchronousSpellCheckingEnabled implementation for
+ WebKitTestRunner to have the possibility to test asynchronous
+ spell checking implementation from bug 109577.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setAsynchronousSpellCheckingEnabled):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2013-03-05 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Add the getStreamById method on RTCPeerConnection
+ https://bugs.webkit.org/show_bug.cgi?id=111311
+
+ Reviewed by Adam Barth.
+
+ Changing mocks to be more realistic.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp:
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::addStream):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::removeStream):
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.cpp:
+ (WebTestRunner::WebUserMediaClientMock::requestUserMedia):
+
+2013-03-05 Jochen Eisinger <jochen@chromium.org>
+
+ Add content shell bots to garden-o-matic for general failurse
+ https://bugs.webkit.org/show_bug.cgi?id=111168
+
+ Reviewed by Adam Barth.
+
+ All but the WebKit (Content Shell) Android bot is stable enough. While
+ they're not green yet, there must not be any non-layout test failures on
+ them.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ (.):
+
+2013-03-04 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove deprecated WebTestRunner::setFocus API
+ https://bugs.webkit.org/show_bug.cgi?id=111354
+
+ Reviewed by James Robinson.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+
+2013-03-04 Jochen Eisinger <jochen@chromium.org>
+
+ Run the bindings generation tests on EWS and CQ bots
+ https://bugs.webkit.org/show_bug.cgi?id=111358
+
+ Reviewed by Adam Barth.
+
+ The tests are super fast and not flaky.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.run_bindings_tests_command):
+ * Scripts/webkitpy/common/config/ports_mock.py:
+ (MockPort.run_webkit_tests_command):
+ (MockPort):
+ (MockPort.run_bindings_tests_command):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+ (RunTestsTest.test_webkit_run_unit_tests):
+ * Scripts/webkitpy/tool/steps/steps_unittest.py:
+
+2013-03-04 Eric Seidel <eric@webkit.org>
+
+ run-webkit-tests should support --profile and --profiler= just like run-perf-tests does
+ https://bugs.webkit.org/show_bug.cgi?id=111384
+
+ Reviewed by Ryosuke Niwa.
+
+ Sometimes I want to know why various LayoutTests are slow
+ without having to convert them into PerformanceTests in order
+ to use our fancy profiling. The Driver already knows how to
+ do the right thing, we just need to expose the options to the user.
+
+ Handling of these options is already unittested in the perftests_unittest.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+
+2013-03-04 Alan Cutter <alancutter@chromium.org>
+
+ check-webkit-style says "Have to enable auto props in the subversion config file"
+ https://bugs.webkit.org/show_bug.cgi?id=107724
+
+ Reviewed by Tony Chang.
+
+ Added a standard svn config file for WebKit developers to use.
+ Updated the style and commit queue bot build scripts to load this file.
+
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:
+ * EWSTools/configure-svn-config.sh: Copied from Tools/EWSTools/GoogleComputeEngine/build-commit-queue.sh.
+ * svn-config: Added.
+
+2013-03-04 James Robinson <jamesr@chromium.org>
+
+ [chromium] Switch to new webkit_support::CreateLayerTreeView interface
+ https://bugs.webkit.org/show_bug.cgi?id=111285
+
+ Reviewed by Adrienne Walker.
+
+ This removes the need for WebCompositorSupport::initialize and exposes
+ slightly fewer entry points across the repository boundary.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::webCompositorThread):
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+
+2013-03-04 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Get rid of some AppleWin VS2010 build warnings.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props:
+
+2013-03-04 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX (r144657): Fix DumpRenderTree build failure on iOS
+
+ Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm:95:29: error: class method '+stringWithJSStringRef:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
+ NSString *idAttribute = [NSString stringWithJSStringRef:idAttributeRef];
+ ^ ~~~~~~~~~~~~~~~~~~~~~
+ 1 error generated.
+
+ * DumpRenderTree/ios/AccessibilityControllerIOS.mm: Import
+ AccessibilityCommonMac.h.
+
+2013-03-04 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][EFL] Add callbacks to the WKViewClient to handle Web Process crash and relaunch
+ https://bugs.webkit.org/show_bug.cgi?id=109828
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added API test for newly added Web Process crash and Web Process relaunch WKViewClient
+ callbacks.
+
+ * TestWebKitAPI/CMakeLists.txt:
+
+ Tests located in 'TestWebKitAPI/Tests/WebKit2' subdirectories are also
+ considered.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::didFinishLoadForFrame):
+ (TestWebKitAPI::setPageLoaderClient):
+ (TestWebKitAPI::webProcessCrashed):
+ (TestWebKitAPI::webProcessDidRelaunch):
+ (TestWebKitAPI::setViewClient):
+ (TestWebKitAPI::TEST):
+
+2013-03-04 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Upstream iOS Accessibility DumpRenderTree changes
+ https://bugs.webkit.org/show_bug.cgi?id=111220
+
+ Reviewed by David Kilzer.
+
+ Upstream the iOS changes for accessibility in DumpRenderTree.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (headerElementAtIndexCallback):
+ (linkedElementCallback):
+ (elementsForRangeCallback):
+ (increaseTextSelectionCallback):
+ (decreaseTextSelectionCallback):
+ (assistiveTechnologySimulatedFocusCallback):
+ (stringForSelectionCallback):
+ (getIPhoneLabelCallback):
+ (getIPhoneHintCallback):
+ (getIPhoneValueCallback):
+ (getIPhoneIdentifierCallback):
+ (getIPhoneTraitsCallback):
+ (getIPhoneIsElementCallback):
+ (getIPhoneElementTextPositionCallback):
+ (getIPhoneElementTextLengthCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/ios: Added.
+ * DumpRenderTree/ios/AccessibilityControllerIOS.mm: Added.
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::~AccessibilityController):
+ (AccessibilityController::elementAtPoint):
+ (AccessibilityController::focusedElement):
+ (AccessibilityController::rootElement):
+ (findAccessibleObjectById):
+ (AccessibilityController::accessibleElementById):
+ (AccessibilityController::setLogFocusEvents):
+ (AccessibilityController::setLogScrollingStartEvents):
+ (AccessibilityController::setLogValueChangeEvents):
+ (AccessibilityController::setLogAccessibilityEvents):
+ (AccessibilityController::addNotificationListener):
+ (AccessibilityController::removeNotificationListener):
+ * DumpRenderTree/ios/AccessibilityUIElementIOS.mm: Added.
+ (AccessibilityUIElement::AccessibilityUIElement):
+ (AccessibilityUIElement::~AccessibilityUIElement):
+ (concatenateAttributeAndValue):
+ (AccessibilityUIElement::iphoneLabel):
+ (AccessibilityUIElement::iphoneHint):
+ (AccessibilityUIElement::iphoneValue):
+ (AccessibilityUIElement::iphoneIdentifier):
+ (AccessibilityUIElement::iphoneTraits):
+ (AccessibilityUIElement::iphoneIsElement):
+ (AccessibilityUIElement::iphoneElementTextPosition):
+ (AccessibilityUIElement::iphoneElementTextLength):
+ (AccessibilityUIElement::url):
+ (AccessibilityUIElement::x):
+ (AccessibilityUIElement::y):
+ (AccessibilityUIElement::width):
+ (AccessibilityUIElement::height):
+ (AccessibilityUIElement::clickPointX):
+ (AccessibilityUIElement::clickPointY):
+ (AccessibilityUIElement::getChildren):
+ (AccessibilityUIElement::getChildrenWithRange):
+ (AccessibilityUIElement::childrenCount):
+ (AccessibilityUIElement::elementAtPoint):
+ (AccessibilityUIElement::indexOfChild):
+ (AccessibilityUIElement::getChildAtIndex):
+ (AccessibilityUIElement::headerElementAtIndex):
+ (AccessibilityUIElement::linkedElement):
+ (AccessibilityUIElement::linkedUIElementAtIndex):
+ (AccessibilityUIElement::ariaOwnsElementAtIndex):
+ (AccessibilityUIElement::ariaFlowToElementAtIndex):
+ (AccessibilityUIElement::disclosedRowAtIndex):
+ (AccessibilityUIElement::selectedRowAtIndex):
+ (AccessibilityUIElement::rowAtIndex):
+ (AccessibilityUIElement::titleUIElement):
+ (AccessibilityUIElement::parentElement):
+ (AccessibilityUIElement::disclosedByRow):
+ (AccessibilityUIElement::increaseTextSelection):
+ (AccessibilityUIElement::decreaseTextSelection):
+ (AccessibilityUIElement::stringForSelection):
+ (AccessibilityUIElement::stringForRange):
+ (AccessibilityUIElement::attributedStringForRange):
+ (AccessibilityUIElement::attributedStringRangeIsMisspelled):
+ (AccessibilityUIElement::elementsForRange):
+ (AccessibilityUIElement::getLinkedUIElements):
+ (AccessibilityUIElement::getDocumentLinks):
+ (AccessibilityUIElement::attributesOfLinkedUIElements):
+ (AccessibilityUIElement::attributesOfDocumentLinks):
+ (AccessibilityUIElement::attributesOfChildren):
+ (AccessibilityUIElement::allAttributes):
+ (AccessibilityUIElement::stringAttributeValue):
+ (AccessibilityUIElement::isPressActionSupported):
+ (AccessibilityUIElement::isIncrementActionSupported):
+ (AccessibilityUIElement::isDecrementActionSupported):
+ (AccessibilityUIElement::boolAttributeValue):
+ (AccessibilityUIElement::isAttributeSettable):
+ (AccessibilityUIElement::isAttributeSupported):
+ (AccessibilityUIElement::parameterizedAttributeNames):
+ (AccessibilityUIElement::role):
+ (AccessibilityUIElement::subrole):
+ (AccessibilityUIElement::roleDescription):
+ (AccessibilityUIElement::title):
+ (AccessibilityUIElement::description):
+ (AccessibilityUIElement::orientation):
+ (AccessibilityUIElement::stringValue):
+ (AccessibilityUIElement::language):
+ (AccessibilityUIElement::helpText):
+ (AccessibilityUIElement::intValue):
+ (AccessibilityUIElement::minValue):
+ (AccessibilityUIElement::maxValue):
+ (AccessibilityUIElement::valueDescription):
+ (AccessibilityUIElement::insertionPointLineNumber):
+ (AccessibilityUIElement::isEnabled):
+ (AccessibilityUIElement::isRequired):
+ (AccessibilityUIElement::isFocused):
+ (AccessibilityUIElement::isSelected):
+ (AccessibilityUIElement::isExpanded):
+ (AccessibilityUIElement::isChecked):
+ (AccessibilityUIElement::hierarchicalLevel):
+ (AccessibilityUIElement::ariaIsGrabbed):
+ (AccessibilityUIElement::ariaDropEffects):
+ (AccessibilityUIElement::lineForIndex):
+ (AccessibilityUIElement::boundsForRange):
+ (AccessibilityUIElement::attributesOfColumnHeaders):
+ (AccessibilityUIElement::attributesOfRowHeaders):
+ (AccessibilityUIElement::attributesOfColumns):
+ (AccessibilityUIElement::attributesOfRows):
+ (AccessibilityUIElement::attributesOfVisibleCells):
+ (AccessibilityUIElement::attributesOfHeader):
+ (AccessibilityUIElement::rowCount):
+ (AccessibilityUIElement::columnCount):
+ (AccessibilityUIElement::indexInTable):
+ (AccessibilityUIElement::rowIndexRange):
+ (AccessibilityUIElement::columnIndexRange):
+ (AccessibilityUIElement::cellForColumnAndRow):
+ (AccessibilityUIElement::selectedTextRange):
+ (AccessibilityUIElement::assistiveTechnologySimulatedFocus):
+ (AccessibilityUIElement::setSelectedTextRange):
+ (AccessibilityUIElement::increment):
+ (AccessibilityUIElement::decrement):
+ (AccessibilityUIElement::showMenu):
+ (AccessibilityUIElement::press):
+ (AccessibilityUIElement::accessibilityValue):
+ (AccessibilityUIElement::documentEncoding):
+ (AccessibilityUIElement::documentURI):
+ (_accessibilityNotificationCallback):
+ (AccessibilityUIElement::addNotificationListener):
+ (AccessibilityUIElement::removeNotificationListener):
+ (AccessibilityUIElement::isFocusable):
+ (AccessibilityUIElement::isSelectable):
+ (AccessibilityUIElement::isMultiSelectable):
+ (AccessibilityUIElement::isSelectedOptionActive):
+ (AccessibilityUIElement::isVisible):
+ (AccessibilityUIElement::isOffScreen):
+ (AccessibilityUIElement::isCollapsed):
+ (AccessibilityUIElement::isIgnored):
+ (AccessibilityUIElement::hasPopup):
+ (AccessibilityUIElement::takeFocus):
+ (AccessibilityUIElement::takeSelection):
+ (AccessibilityUIElement::addSelection):
+ (AccessibilityUIElement::removeSelection):
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ (AccessibilityUIElement::numberAttributeValue):
+
+2013-03-04 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] pass all focus handling methods through the WebTestDelegate
+ https://bugs.webkit.org/show_bug.cgi?id=111328
+
+ Reviewed by Nico Weber.
+
+ In content_shell, the focus handling is asynchronous. To allow for
+ switching the focus synchronously between WebViews, we need to intercept
+ didFocus and didBlur and forward it to the WebTestDelegate.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ (WebTestRunner::WebTestDelegate::setFocus):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner::WebTestProxy::didFocus):
+ (WebTestRunner::WebTestProxy::didBlur):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::setWindowIsKey):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didFocus):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::didBlur):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didFocus):
+ (WebViewHost::didBlur):
+ (WebViewHost::setFocus):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-03-04 Claudio Saavedra <csaavedra@igalia.com>
+
+ [GTK] No need to manually add system paths to jhbuildrc
+ https://bugs.webkit.org/show_bug.cgi?id=110850
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * gtk/jhbuildrc: Remove calls to addpath() for items that jhbuild
+ already takes care of.
+
+2013-03-04 Kinuko Yasuda <kinuko@chromium.org>
+
+ [chromium] TestWebKitAPI WTF.StringHasher_addCharacters is broken on Chromium Android
+ https://bugs.webkit.org/show_bug.cgi?id=111284
+
+ Disabling the failing two tests on Android.
+
+ Reviewed by Jochen Eisinger.
+
+ * TestWebKitAPI/Tests/WTF/StringHasher.cpp:
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2013-03-04 Kunihiko Sakamoto <ksakamoto@chromium.org>
+
+ Add build flag for FontLoader
+ https://bugs.webkit.org/show_bug.cgi?id=111289
+
+ Reviewed by Benjamin Poulain.
+
+ Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-03-03 Benjamin Poulain <benjamin@webkit.org>
+
+ [Mac] Get rid of a useless method from DOMHTMLInputElement
+ https://bugs.webkit.org/show_bug.cgi?id=111279
+
+ Reviewed by Sam Weinig.
+
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::setValueForUser):
+ The method _setValueForUser: was added for testing. This feature is already
+ exposed by DOMHTMLInputElement as a private API and it is how this code is exercised
+ in real use cases. Get rid of the method created for testing, use the real thing
+ instead.
+
+2013-03-03 Ryosuke Niwa <rniwa@webkit.org>
+
+ Some perf. tests have variances that differ greatly between runs
+ https://bugs.webkit.org/show_bug.cgi?id=97510
+
+ Reviewed by Benjamin Poulain.
+
+ Use multiple instances of DumpRenderTree or WebKitTestRunner to amortize the effect of the runtime
+ environment on test results (we run each instance after one another, not in parallel).
+
+ We use 4 instances of the test runner, each executing 5 in-process iterations, for the total of 20
+ iterations as it was done previously in single process. These values are hard-coded in perftest.py
+ and runner.js but they are to be configurable in the future.
+
+ Set of 5 iterations obtained by the same test runner is treated as an "iteration group" and each
+ metric now reports an array of the length 4 with each element containing an array of 5 iteration
+ values obtained by each test runner instance as opposed to a flattened array of 20 iteration values.
+
+ Unfortunately, we can use the same trick on Dromaeo because we're already doing only 5 iterations
+ and repeating the entire Dromaeo 4 times will take too long. We need to disable more Dromaeo tests
+ as needed. To this end, added SingleProcessPerfTest to preserve the old behavior.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTestMetric.append_group): Renamed from append.
+ (PerfTestMetric.grouped_iteration_values): Added.
+ (PerfTestMetric.flattened_iteration_values): Renamed from iteration_values.
+
+ (PerfTest.__init__): Takes the number of processes (drivers) to run tests with.
+ This parameter is only used by SingleProcessPerfTest.
+
+ (PerfTest.run): Repeat tests using different driver processes.
+ (PerfTest._run_with_driver): Returns a boolean instead of a list of measured metrics
+ since metrics are shared between multiple drivers (i.e. multiple calls to _run_with_driver).
+ We instead use _ensure_metrics to obtain the matched metrics and store the data there.
+ (PerfTest._ensure_metrics): Added.
+
+ (SingleProcessPerfTest): Added. Used to run Dromaeo tests where running it on 4 different
+ instances of DumpRenderTree/WebKitTestRunner takes too long.
+ (SingleProcessPerfTest.__init__):
+
+ (ReplayPerfTest._run_with_driver): Updated to use _ensure_metrics.
+
+ (PerfTestFactory): Use SingleProcessPerfTest to run Dromaeo tests.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py: Updated various tests that expect
+ _run_with_driver to return a list of metrics. Now it returns a boolean indicating whether
+ the test succeeded or not. Obtain the dictionary of metrics via test._metrics instead.
+
+ (TestPerfTestMetric.test_append): Updated per name and added some test cases for
+ grouped_iteration_values.
+
+ (TestPerfTest._assert_results_are_correct):
+
+ (TestSingleProcessPerfTest): Added.
+ (TestSingleProcessPerfTest.test_use_only_one_process):
+ (TestSingleProcessPerfTest.test_use_only_one_process.run_single):
+
+ (TestReplayPerfTest.test_run_with_driver_accumulates_results):
+ (TestReplayPerfTest.test_run_with_driver_accumulates_memory_results):
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: Updated values of
+ sample standard deviations since we're now running tests 4 times.
+ (MainTest._test_run_with_json_output.mock_upload_json):
+ (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json):
+
+2013-03-03 Alexandre Elias <aelias@chromium.org>
+
+ [chromium] Remove WebLayerTreeView::setViewportSize call
+ https://bugs.webkit.org/show_bug.cgi?id=110727
+
+ Reviewed by James Robinson.
+
+ After https://codereview.chromium.org/12328080 lands,
+ setViewportSize is called from the Chromium side. The multiplication
+ by deviceScaleFactor here was prone to off-by-one errors.
+ The layoutSize() function was only used here so delete it as well.
+
+ DumpRenderTree WebViewHost must now call this method as well.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ (WebViewHost::setWindowRect):
+ (WebViewHost::setDeviceScaleFactor):
+ (WebViewHost::updateViewportSize):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-27 Darin Adler <darin@apple.com>
+
+ StringHasher functions require alignment that call sites do not all guarantee
+ https://bugs.webkit.org/show_bug.cgi?id=110171
+
+ Reviewed by Benjamin Poulain.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/GNUmakefile.am:
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WTF/WTF.pro:
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ Added the StringHasher.cpp file.
+
+ * TestWebKitAPI/Tests/WTF/StringHasher.cpp: Added. Contains a bunch of tests
+ for the functions in the StringHasher class.
+
+2013-03-02 Benjamin Poulain <bpoulain@apple.com>
+
+ Move computedStyleIncludingVisitedInfo from TestRunner to Internals
+ https://bugs.webkit.org/show_bug.cgi?id=109772
+
+ Reviewed by Andreas Kling.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2013-03-01 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: do not visit raw pointers by default.
+ https://bugs.webkit.org/show_bug.cgi?id=110943
+
+ Reviewed by Yury Semikhatsky.
+
+ Unfortunately in many cases raw pointer may point to an object that has been deleted.
+ There is no working solution to solve this problem in general.
+ It could be solved only on case by case basis.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp:
+ (TestWebKitAPI::TEST):
+
+2013-03-01 Jason Anderssen <janderssen@gmail.com>
+
+ Move markerTextForListItem from TestRunner to Internals
+ https://bugs.webkit.org/show_bug.cgi?id=110939
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ Don't use legacy test names when returning results from PerfTest.run
+ https://bugs.webkit.org/show_bug.cgi?id=111148
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTestMetric.name): Renamed from metric.
+ (PerfTest.test_name_without_file_extension): Extracted from legacy_chromium_bot_compatible_test_name.
+ (PerfTest.run): Use metric name instead of the legacy name to store iteration values.
+ (ChromiumStylePerfTest.parse_and_log_output): Use the metric name to store results as done in PerfTest.run.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPerfTestMetric.test_init_set_time_metric):
+ (TestPerfTestMetric.legacy_chromium_bot_compatible_test_name): Removed. The integration tests test this.
+ (TestReplayPerfTest.test_run_with_driver_accumulates_results):
+ (TestReplayPerfTest.test_run_with_driver_accumulates_memory_results):
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.__init__):
+ (PerfTestsRunner._generate_results_dict): Updated to iterate over (test, metrics) pair. Use view_source_url
+ to obtain the trac URL instead of hard coding it.
+ (PerfTestsRunner._run_tests_set):
+
+2013-03-01 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Add an extra project that assembles all project build logs on Windows into a single file.
+ https://bugs.webkit.org/show_bug.cgi?id=111202
+
+ This is useful for running VCExpress builds from command line because there is
+ no unified solution output, only per project build logs.
+ The project will be run as the last project in the solution.
+
+ * win/AssembleBuildLogs: Added.
+ * win/AssembleBuildLogs/AssembleBuildLogs.vcxproj: Added.
+ * win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters: Added.
+ * win/AssembleBuildLogs/AssembleLogs.cmd: Added.
+ * win/AssembleBuildLogs/README: Added.
+
+2013-03-01 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Increase number of patches processed before clean building on WinEWS bots.
+
+ * EWSTools/start-queue-win.sh:
+
+2013-03-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ Don't return statistics in PerfTest.run
+ https://bugs.webkit.org/show_bug.cgi?id=111145
+
+ Reviewed by Dirk Pranke.
+
+ Simply return a list of values obtained in each iteration from PerfTest.run.
+ Also simplify various methods as needed.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTestMetric.__init__): Moved the code to convert 'Time' metric to 'FrameRate' and 'Runs'
+ as needed from PerfTestsRunner._generate_results_dict.
+
+ (PerfTestMetric.legacy_chromium_bot_compatible_test_name): Always append the metric name now
+ that we don't have to worry about the backward compatibility here.
+
+ (PerfTestMetric.iteration_values): Added.
+ (PerfTestMetric.unit): Added.
+ (PerfTestMetric.metric_to_unit):
+ (PerfTestMetric.time_unit_to_metric): Extracted from PerfTestsRunner._generate_results_dict.
+
+ (PerfTest.run):
+ (PerfTest.log_statistics): Merged compute_statistics and self.output_statistics.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPerfTestMetric.test_init_set_missing_unit):
+ (TestPerfTestMetric.test_init_set_time_metric): Added.
+ (TestPerfTestMetric.test_legacy_chromium_bot_compatible_test_name):
+ (TestPerfTestMetric.test_append):
+ (TestPerfTestMetric.test_compute_statistics): Removed. Integration tests check some of these
+ test cases and it's not critical to keep math right as they're not used in output JSON anymore.
+ (TestPerfTest._assert_results_are_correct):
+ (TestReplayPerfTest.test_run_with_driver_accumulates_results):
+ (TestReplayPerfTest.test_run_with_driver_accumulates_memory_results):
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._generate_results_dict):
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (EventTargetWrapperTestData): The metric name shows up at the end of the test name as expected.
+ (SomeParserTestData): Ditto.
+ (MemoryTestData): Ditto.
+
+2013-03-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Enable LINK_PREFETCH
+ https://bugs.webkit.org/show_bug.cgi?id=111158
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-03-01 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Update features.pri with new features
+ https://bugs.webkit.org/show_bug.cgi?id=111157
+
+ Reviewed by Jocelyn Turcotte.
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-03-01 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] put WebTestProxy::scheduleComposite back in place
+ https://bugs.webkit.org/show_bug.cgi?id=111146
+
+ Reviewed by Nico Weber.
+
+ The call was removed in http://trac.webkit.org/changeset/144398 because
+ DRT doesn't need it. However, content shell depends on this call.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner::WebTestProxy::scheduleComposite):
+
+2013-02-28 Ryosuke Niwa <rniwa@webkit.org>
+
+ Merge PerfTestRunner._run_single_test into PerfTestRunner._run_tests_set
+ https://bugs.webkit.org/show_bug.cgi?id=111142
+
+ Reviewed by Adam Barth.
+
+ Merged _run_single_test into _run_tests_set. The code looks much cleaner now.
+
+ Also removed _print_status since it's never used anywhere.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.run):
+ (PerfTestsRunner._run_tests_set):
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (MainTest.run_test):
+ (MainTest.test_run_test_set):
+ (MainTest.test_run_test_set_kills_drt_per_run):
+ (MainTest.test_run_test_set_for_parser_tests):
+
+2013-02-28 Kiran Muppala <cmuppala@apple.com>
+
+ Disable window occlusion detection for WebKitTestRunner Web View on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=111116
+
+ Reviewed by Simon Fraser.
+
+ Window occlusion notifications were causing WebKitTestRunner's Web View
+ to be detected as occluded and causing a few JavaScript timer layout
+ tests to fail. https://bugs.webkit.org/show_bug.cgi?id=111025, fixed this
+ by initializing the page visibility to "visible" after creating the view.
+ But a better solution is to disable window occlusion detection, so that
+ not only the page but also the view is treated as visible.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions): Remove call to
+ setVisibilityState, since it is no longer necessary.
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView): Disable window occlusion
+ detection for the created WKView.
+
+2013-02-28 Li Yin <li.yin@intel.com>
+
+ [chromium] Events can't be triggered on MediaStreamTrack
+ https://bugs.webkit.org/show_bug.cgi?id=110930
+
+ Reviewed by Kentaro Hara.
+
+ Related code was moved to MediaStreamCenterChromium::didStopLocalMediaStream
+
+ * DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.cpp:
+ (WebTestRunner::MockWebMediaStreamCenter::didStopLocalMediaStream):
+
+2013-02-27 James Robinson <jamesr@chromium.org>
+
+ [chromium] Use DumpRenderTree-specific interface for DRT's compositor embedding
+ https://bugs.webkit.org/show_bug.cgi?id=111017
+
+ Reviewed by Adam Barth.
+
+ This decouples DumpRenderTree from WebLayerTreeViewClient.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHostDRTLayerTreeViewClient):
+ (WebViewHostDRTLayerTreeViewClient::WebViewHostDRTLayerTreeViewClient):
+ (WebViewHostDRTLayerTreeViewClient::~WebViewHostDRTLayerTreeViewClient):
+ (WebViewHostDRTLayerTreeViewClient::Layout):
+ (WebViewHostDRTLayerTreeViewClient::ScheduleComposite):
+ (WebViewHost::initializeLayerTreeView):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (webkit_support):
+ (WebViewHost):
+
+2013-02-28 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Unreviewed, add my secondary email address to the list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-28 Philip Rogers <pdr@google.com>
+
+ Add Philip Rogers as a reviewer.
+
+ Unreviewed update of committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-28 Ryosuke Niwa <rniwa@webkit.org>
+
+ Merge more methods on PerfTest
+ https://bugs.webkit.org/show_bug.cgi?id=111030
+
+ Reviewed by Dirk Pranke.
+
+ Merged parse_output into _run_with_driver as it was the only caller. Also merged _should_ignore_line_in_stderr
+ and _should_ignore_line_in_parser_test_result into _filter_output since it was their only caller.
+
+ This makes the control flow a lot more comprehensible.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest._run_with_driver):
+ (PerfTest._should_ignore_line):
+ (PerfTest._filter_output):
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPerfTest._assert_results_are_correct):
+ (test_ignored_stderr_lines):
+
+2013-02-28 Robert Hogan <robert@webkit.org>
+
+ Update my IRC nick
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-28 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Enable thin archives before parsing the project files
+
+ Rubber-stamped by Simon Hausmann.
+
+ The targetSubDir() function can be called before default_post.prf has been
+ parsed therefore the gnu_thin_archives option has to be set in default_pre.prf
+ which is parsed before the main project file.
+ This issue was revealed by r144299 and fixes the clean build.
+
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/default_pre.prf:
+
+2013-02-28 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Enable CANVAS_PATH flag
+ https://bugs.webkit.org/show_bug.cgi?id=108508
+
+ Reviewed by Simon Hausmann.
+
+ Also enable CANVAS_PATH flag for Qt.
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-02-28 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt][TestWebKitAPI] The activeBuildConfig() function has been replaced with targetSubDir()
+
+ Rubber-stamped by Csaba Osztrogonác.
+
+ Besides suppressing a warning about the non-existing function this
+ fixes the build if there is a subdirectory (eg. debug-and-release).
+
+ * TestWebKitAPI/InjectedBundle.pri:
+ * TestWebKitAPI/TestWebKitAPI.pri:
+
+2013-02-28 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WTR] WTR cannot load injected bundle
+ https://bugs.webkit.org/show_bug.cgi?id=111063
+
+ Reviewed by Csaba Osztrogonác.
+
+ WTR was not able to load injected bundle because of undefined
+ symbols for AccessibilityUIElement::scrollToMakeVisible().
+ Adding empty implementation of this function to AccessibilityUIElementAtk.cpp
+ solves the problem.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::scrollToMakeVisible):
+
+2013-02-28 Alberto Garcia <albgarcia@rim.com>
+
+ [BlackBerry] TestRunnerBlackBerry: remove layerTreeAsText, it's gone from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=110464
+
+ Reviewed by Rob Buis.
+
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+
+2013-02-28 Xan Lopez <xlopez@rim.com>
+
+ [BlackBerry] DumpRenderTreeSupport: update the set position methods
+ https://bugs.webkit.org/show_bug.cgi?id=110578
+
+ Reviewed by Rob Buis.
+
+ TestRunner::setMockGeolocationPosition() changed in r130416:
+ http://trac.webkit.org/changeset/130416/trunk/Tools/DumpRenderTree/TestRunner.h
+
+ DumpRenderTreeSupport::setMockGeolocationError() was renamed to
+ setMockGeolocationPositionUnavailableError() in r129444:
+ http://trac.webkit.org/changeset/129444/trunk/Source/WebKit/blackberry/WebKitSupport/DumpRenderTreeSupport.h
+
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+
+2013-02-28 Xan Lopez <xlopez@rim.com>
+
+ [BlackBerry] WorkQueueItemBlackBerry: use the new FrameLoader API
+ https://bugs.webkit.org/show_bug.cgi?id=110465
+
+ Reviewed by Rob Buis.
+
+ * DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp:
+ (LoadItem::invoke):
+
+2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ PerfTestRunner doesn't need _needs_http and _has_http_lock
+ https://bugs.webkit.org/show_bug.cgi?id=111037
+
+ Reviewed by Adam Barth.
+
+ Delete these variables in favor of using a local variable.
+
+ Member variables are like global variables. They introduce implicit dependencies
+ between member functions.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.__init__):
+ (PerfTestsRunner._start_http_servers):
+ (PerfTestsRunner):
+ (PerfTestsRunner._stop_http_servers):
+ (PerfTestsRunner.run):
+
+2013-02-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r144224.
+ http://trac.webkit.org/changeset/144224
+ https://bugs.webkit.org/show_bug.cgi?id=111045
+
+ Caused plugins/pass-different-npp-struct.html to time out
+ (Requested by abarth on #webkit).
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
+ (PassDifferentNPPStruct::NPP_SetWindow):
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NPP_SetWindow):
+
+2013-02-27 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Enable threaded HTML parser by default in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=110907
+
+ Reviewed by Eric Seidel.
+
+ This patch changes --enable-threaded-html-parser into
+ --disable-threaded-html-parser and thereby enables the threaded HTML
+ parser by default for the Chromium port.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2013-02-27 Kiran Muppala <cmuppala@apple.com>
+
+ Initialize page visibility after creating WebKitTestRunner WebView on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=111025
+
+ Reviewed by Simon Fraser.
+
+ Set page visibility to "visible" after creating WebView to override
+ visibility state inferred from window occlusion notifications on Mac.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions): Add call to
+ setVisibilityState.
+
+2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Merge PageLoadingPerfTest into ReplayPerfTest
+ https://bugs.webkit.org/show_bug.cgi?id=111027
+
+ Reviewed by Dirk Pranke.
+
+ Merged two classes.
+
+ We should really move ahead with the bug 100991 and get rid of PageLoadingPerfTest
+ part of ReplayPerfTest.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (ReplayPerfTest): Moved _FORCE_GC_FILE here.
+ (ReplayPerfTest.__init__):
+ (ReplayPerfTest._run_with_driver): Moved from PageLoadingPerfTest.
+ (ReplayPerfTest.run_single): Load the GC page as run_single on PageLoadingPerfTest did.
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestReplayPerfTest):
+ (TestReplayPerfTest.test_run_single.run_test):
+ (TestReplayPerfTest.test_run_single): Make sure test_time is passed down properly from output.
+ (TestReplayPerfTest.test_run_with_driver_accumulates_results): Renamed from
+ TestPageLoadingPerfTest.test_run.
+ (TestReplayPerfTest.test_run_with_driver_accumulates_results.mock_run_signle):
+ (TestReplayPerfTest.test_run_with_driver_accumulates_memory_results): Renamed from
+ TestPageLoadingPerfTest.test_run_with_memory_output
+ (TestReplayPerfTest.test_run_with_driver_accumulates_memory_results.mock_run_signle):
+ (TestReplayPerfTest.test_prepare_calls_run_single):
+
+2013-02-27 Eric Seidel <eric@webkit.org>
+
+ Add --additional-drt-flag option to run-perf-tests to make it easy to test runtime options
+ https://bugs.webkit.org/show_bug.cgi?id=111021
+
+ Reviewed by Dirk Pranke.
+
+ The underlying code (which is shared with run-webkit-tests)
+ already knew how to support this option, it just wasn't exposed
+ via the run-perf-tests front-end. This patch fixes that.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+
+2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Stop uploading results to webkit-perf.appspot.com
+ https://bugs.webkit.org/show_bug.cgi?id=110954
+
+ Reviewed by Benjamin Poulain.
+
+ Pass in perf.webkit.org instead of webkit-perf.appspot.com as the test results server.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunAndUploadPerfTests):
+
+2013-02-27 James Simonsen <simonjam@chromium.org>
+
+ [chromium] Lower priority of preloaded images
+ https://bugs.webkit.org/show_bug.cgi?id=110527
+
+ Plumb the didChangePriority signal into DRT so it can be tested.
+
+ Reviewed by Nate Chapin.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner::WebTestProxy::didChangeResourcePriority):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpResourcePriorities):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::dumpResourceRequestPriorities):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ (WebTestRunner::WebTestProxyBase::willSendRequest):
+ (WebTestRunner::WebTestProxyBase::didChangeResourcePriority):
+ (WebTestRunner):
+
+2013-02-27 Chris Fleizach <cfleizach@apple.com>
+
+ AX: Mac platform should support ability to scroll an element into visible
+ https://bugs.webkit.org/show_bug.cgi?id=109860
+
+ Reviewed by Beth Dakin.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (scrollToMakeVisibleCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::scrollToMakeVisible):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::scrollToMakeVisible):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::scrollToMakeVisible):
+ (WTR):
+
+2013-02-27 John Bauman <jbauman@chromium.org>
+
+ Plugin in iframe may not display
+ https://bugs.webkit.org/show_bug.cgi?id=109879
+
+ Reviewed by Simon Fraser.
+
+ LogNPPSetWindow will be used with other ports as well.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+
+2013-02-27 Jochen Eisinger <jochen@chromium.org>
+
+ plugins/netscape-plugin-setwindow-size*.html and plugins/pass-different-npp-struct.html should be async
+ https://bugs.webkit.org/show_bug.cgi?id=110973
+
+ Reviewed by Adam Barth.
+
+ There is nothing that ensures that the log messages from the plugin
+ come in before the layout test finished loading.
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp:
+ (PassDifferentNPPStruct::NPP_SetWindow):
+ * DumpRenderTree/TestNetscapePlugIn/main.cpp:
+ (NPP_SetWindow):
+
+2013-02-27 Glenn Adams <glenn@skynav.com>
+
+ Add ENABLE_CSS3_TEXT_LINE_BREAK flag.
+ https://bugs.webkit.org/show_bug.cgi?id=110944
+
+ Reviewed by Dean Jackson.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-02-27 Yong Li <yong.li.webkit@outlook.com>
+
+ Unreviewed. Remove myself from watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-27 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Switch QtWebKit to GStreamer 1.0.
+ https://bugs.webkit.org/show_bug.cgi?id=106669.
+
+ Original patch by Sebastian Dröge.
+ Reviewed by Csaba Osztrogonác.
+
+ Build with GStreamer 1.0 if available, but support GStreamer 0.10
+ temporarily to make upgrading easy and the patch suitable for Qt5.
+
+ * qmake/mkspecs/features/features.prf:
+
+2013-02-27 Szilard Ledan <szledan@inf.u-szeged.hu>
+
+ Unreviewed. Added myself to committers.py
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r144192.
+ http://trac.webkit.org/changeset/144192
+ https://bugs.webkit.org/show_bug.cgi?id=110984
+
+ Stored svn password on wrong computer (Requested by kkristof
+ on #webkit).
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-27 Szilard Ledan <szledan@inf.u-szeged.hu>
+
+ Unreviewed. Added myself to committers.py
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix after r144155. The report page is located at /api/report, not /api/test/report.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._upload_json):
+
+2013-02-27 Ryosuke Niwa <rniwa@webkit.org>
+
+ Stop uploading results to webkit-perf.appspot.com
+ https://bugs.webkit.org/show_bug.cgi?id=110954
+
+ Reviewed by Benjamin Poulain.
+
+ When the specified test results server was webkit-perf.appspot.com, replace it by perf.webkit.org.
+ Also, always use the new JSON format. Removed the code to generate the old format.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._generate_and_show_results):
+ (PerfTestsRunner._generate_results_dict):
+ (PerfTestsRunner._merge_slave_config_json):
+ (PerfTestsRunner._generate_output_files):
+
+2013-02-27 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r144136, r144143, and r144147.
+ http://trac.webkit.org/changeset/144136
+ http://trac.webkit.org/changeset/144143
+ http://trac.webkit.org/changeset/144147
+ https://bugs.webkit.org/show_bug.cgi?id=110950
+
+ Caused some timeouts and flaky crashes (Requested by abarth on
+ #webkit).
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Use perf.webkit.org JSON format in results page
+ https://bugs.webkit.org/show_bug.cgi?id=110842
+
+ Reviewed by Benjamin Poulain.
+
+ Change the default JSON format from that of webkit-perf.appspot.com to that of perf.webkit.org.
+
+ A whole bunch of integration tests have been updated to use the new JSON format.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._generate_and_show_results): Renamed output and output_path to legacy_output
+ and legacy_output_json_path respectively.
+ (PerfTestsRunner._generate_results_dict): Don't assume meta build information is always available.
+ (PerfTestsRunner._generate_output_files): Make json_output, which is used to generate the default
+ JSON file and the results page out of perf_webkit_output instead of legacy_output.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (MainTest.test_run_memory_test):
+ (MainTest._test_run_with_json_output.mock_upload_json):
+ (MainTest):
+ (MainTest.test_run_with_json_output):
+ (MainTest.test_run_with_description):
+ (MainTest.test_run_generates_json_by_default):
+ (MainTest.test_run_merges_output_by_default):
+ (MainTest.test_run_respects_reset_results):
+ (MainTest.test_run_generates_and_show_results_page):
+ (MainTest.test_run_with_slave_config_json):
+ (MainTest.test_run_with_multiple_repositories):
+ (MainTest.test_run_with_upload_json):
+ (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json):
+
+2013-02-26 Adam Barth <abarth@webkit.org>
+
+ [Chromium] Enable threaded HTML parser by default in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=110907
+
+ Reviewed by Eric Seidel.
+
+ This patch changes --enable-threaded-html-parser into
+ --disable-threaded-html-parser and thereby enables the threaded HTML
+ parser by default for the Chromium port.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2013-02-26 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] Re-enable the fixed version of freetype on linux
+ https://bugs.webkit.org/show_bug.cgi?id=110542
+
+ Reviewed by Tony Chang.
+
+ Re-land the change in r143794 to switch to building with a fixed
+ version of FreeType for just DumpRenderTree. This allows us to share
+ one version of pixel baselines for both Lucid and Precise, and run the
+ layout tests in a stock Precise install (instead of a Lucid chroot).
+ Going forward, this approach isolates us from os-level changes to the
+ version of FreeType. Note that Chromium itself still uses the system
+ FreeType and is unaffected by this change.
+
+ This setting can still be turned off (at compile/gyp-time) by
+ manually setting use_custom_freetype=0.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-02-26 Nico Weber <thakis@chromium.org>
+
+ [chromium] content shell drt: Enable WebKit::setLayoutTestMode()
+ https://bugs.webkit.org/show_bug.cgi?id=110890
+
+ Reviewed by Jochen Eisinger.
+
+ Several functions in webkit check that bit to change rendering
+ in layout test mode. For example, platform/graphics/skia/FrontSkia.cpp
+ disables font smoothing in this mode. TestShell and DRT both set
+ this flag, so content shell drt should set it too.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+
+2013-02-26 Vivek Galatage <vivek.vg@samsung.com>
+
+ new-commit-bot: Fix the unit test newcommitbot-unittest.py due to r144040
+ https://bugs.webkit.org/show_bug.cgi?id=110884
+
+ Reviewed by Csaba Osztrogonác.
+
+ Adding the missing spaces before ':' in the unit test.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot_unittest.py:
+
+2013-02-26 Vivek Galatage <vivek.vg@samsung.com>
+
+ new-commit-bot: Some IRC clients doesn't linkify rollout messages
+ https://bugs.webkit.org/show_bug.cgi?id=110861
+
+ Reviewed by Ryosuke Niwa.
+
+ Adding the space before ':' in order to fix the links shown for the rollout message.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot._summarize_commit_log):
+
+2013-02-26 Joone Hur <joone.hur@intel.com>
+
+ [GTK] Add Clutter to jhbuild
+ https://bugs.webkit.org/show_bug.cgi?id=110245
+
+ Reviewed by Martin Robinson.
+
+ Add clutter, cogl, clutter-gtk, and atk to the optional moduleset.
+ This allows to build WebKitGtk+ with clutter as an acceleration backend
+ within the jhbuild environment.
+
+ * gtk/jhbuild-optional.modules:
+
+2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Another fix attempt after r143991 since having \r? after a greedy match doesn't help.
+
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.value_from_svn_info):
+
+2013-02-25 Alan Cutter <alancutter@chromium.org>
+
+ GCE EWS bots failing intermittently on HTTP 502 error while updating their status
+ https://bugs.webkit.org/show_bug.cgi?id=110845
+
+ Unreviewed EWS bot fix.
+
+ Switch the Queue Status Server address the EWS bots use to a more direct URL that
+ doesn't seem to be having problems from GCE like queues.webkit.org.
+
+ * Scripts/webkitpy/common/net/statusserver.py:
+ (StatusServer):
+
+2013-02-25 Dirk Pranke <dpranke@chromium.org>
+
+ Forgot to delete a no-longer-needed unit test after r143980.
+
+ Unreviewed, build fix.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ (ChromiumWinTest.test_path_to_image_diff):
+
+2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix. run-perf-tests was reporting with revision numbers ending with \r.
+ Don't include \r at the end of svn info lines on Windows.
+
+ This is similar to r143839.
+
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.value_from_svn_info):
+
+2013-02-25 James Simonsen <simonjam@chromium.org>
+
+ [Resource Timing] Update test suite so it can be exported to the W3C
+ https://bugs.webkit.org/show_bug.cgi?id=107343
+
+ Reviewed by Tony Gentilcore.
+
+ * Scripts/export-w3c-performance-wg-tests: Clean up output.
+ * Scripts/import-w3c-performance-wg-tests:
+
+2013-02-25 Anders Carlsson <andersca@apple.com>
+
+ Add a new unavailablePluginButtonClicked callback that takes a WKDictionary of plug-in information
+ https://bugs.webkit.org/show_bug.cgi?id=110821
+ <rdar://problem/13265303>
+
+ Reviewed by Beth Dakin.
+
+ Update for WebKit2 changes.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createOtherPage):
+ (WTR::TestController::createWebViewWithOptions):
+ (WTR::TestController::unavailablePluginButtonClicked):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+
+2013-02-21 Jeffrey Pfau <jpfau@apple.com>
+
+ Optionally partition cache to prevent using cache for tracking
+ https://bugs.webkit.org/show_bug.cgi?id=110269
+
+ Reviewed by Maciej Stachowiak.
+
+ Add test suite for public suffix functions on Mac.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/PublicSuffix.mm: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST_F):
+
+2013-02-25 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: reenable multiple http shards on chromium win
+ https://bugs.webkit.org/show_bug.cgi?id=110814
+
+ Reviewed by Tony Chang.
+
+ The underlying bug in DumpRenderTree that was causing us to look for a
+ pac file and timeout under load was fixed a while ago.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ (ChromiumWinPort.relative_test_filename):
+
+2013-02-25 Dirk Pranke <dpranke@chromium.org>
+
+ Make ninja the default w/ build-webkit --chromium on windows.
+ https://bugs.webkit.org/show_bug.cgi?id=110731
+
+ Unreviewed - TBR'ing thakis :).
+
+ * Scripts/update-webkit-chromium:
+
+2013-02-25 Anders Carlsson <andersca@apple.com>
+
+ Add a new pluginDidFail callback that takes a WKDictionary of plug-in information
+ https://bugs.webkit.org/show_bug.cgi?id=110793
+ <rdar://problem/13265303>
+
+ Reviewed by Sam Weinig.
+
+ Update for WebKit2 API changes.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ Fix python unit tests after yoli's email address update in http://trac.webkit.org/changeset/143922
+ https://bugs.webkit.org/show_bug.cgi?id=110775
+
+ Unreviewed, basically a rebaseline.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ [chromium] Try to get the webkit builder to use msvs again
+ https://bugs.webkit.org/show_bug.cgi?id=110771
+
+ Reviewed by Eric Seidel.
+
+ The msvs gyp generator apparently doesn't write the sln file on every
+ run, so check the vcxproj file instead.
+
+ * Scripts/webkitdirs.pm:
+ (determineIsChromiumNinja):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ [chromium] try to unbreak run-chromium-webkit-unit-tests on the mac bots
+ https://bugs.webkit.org/show_bug.cgi?id=110767
+
+ Reviewed by Eric Seidel.
+
+ The tester runs gyp, which generates out/Release/build.ninja. The bot
+ scripts use existence (and timestamp) of that file to decide if the
+ current build is supposed to be ninja or xcodebuild. The file exists,
+ so the snapshot is extracted to out/Release. The snapshot doesn't
+ contain build.ninja however due to
+ http://trac.webkit.org/changeset/140375 , so after extracting the
+ snapshot the scripts think that this is an xcodebuild build. So remove
+ the part of that revision that removed ninja files from the archive,
+ and the bots should be happy again.
+
+ * BuildSlaveSupport/built-product-archive:
+ (archiveBuiltProduct):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ Fix tests after r143910
+ https://bugs.webkit.org/show_bug.cgi?id=110757
+
+ Reviewed by Andreas Kling.
+
+ While here, also add a test for the bug r143910 fixed.
+
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ScriptErrorTest.test_message_with_output):
+ (ScriptErrorTest):
+ (ScriptErrorTest.test_message_with_tuple):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ [chromium] Apparently built-product-archive is written in Python, not Perl :-/
+ https://bugs.webkit.org/show_bug.cgi?id=110755
+
+ Reviewed by Jochen Eisinger.
+
+ * BuildSlaveSupport/built-product-archive:
+ (archiveBuiltProduct):
+ (extractBuiltProduct):
+
+2013-02-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r143895.
+ http://trac.webkit.org/changeset/143895
+ https://bugs.webkit.org/show_bug.cgi?id=110758
+
+ broke a bunch of tests (Requested by thakis__ on #webkit).
+
+ * Scripts/update-webkit-chromium:
+
+2013-02-25 Andreas Kling <akling@apple.com>
+
+ Unreviewed, fix simple mistake in r143903.
+ <http://webkit.org/b/110746>
+
+ Reviewed by Andreas Kling.
+
+ Pass git revision, not svn revision, to git shell command.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.timestamp_of_latest_commit):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ [chromium] Let built-product-archive log which directory it's archiving from and extracting to
+ https://bugs.webkit.org/show_bug.cgi?id=110748
+
+ Reviewed by Jochen Eisinger.
+
+ One of the mac testers runs DRT from out/ but WebKitUnitTests from
+ xcodebuild. I'm trying to understand what's going on.
+
+ * BuildSlaveSupport/built-product-archive:
+ (archiveBuiltProduct):
+ (extractBuiltProduct):
+
+2013-02-23 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: replace String with const char* in MemoryObjectInfo
+ https://bugs.webkit.org/show_bug.cgi?id=110599
+
+ Reviewed by Yury Semikhatsky.
+
+ Due to potentially dynamic nature of names and classNames we need to make a copy of the strings
+ that were given us via MemoryInstrumentation calls.
+ So I extended client api with registerString method that pushes the strings
+ down to the serializer.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp:
+ (TestWebKitAPI::Helper::Helper):
+ (Helper):
+ (TestWebKitAPI::Helper::addNode):
+ (TestWebKitAPI::TEST):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ Make ScriptError not crash when args is a tuple
+ https://bugs.webkit.org/show_bug.cgi?id=110747
+
+ Reviewed by Jochen Eisinger.
+
+ I'm trying to understand the error on
+ http://build.webkit.org/builders/Chromium%20Win%20Release%20%28Tests%29/builds/34563/steps/layout-test/logs/stdio
+ better. I'll likely have to revert the ninja switch on windows, but
+ having error reporting code that doesn't itself crash sounds like a
+ good thing to have anyways.
+
+ The problem is that '%s' % (1, 2) errors out, and args is sometimes a
+ tuple not a list.
+
+ * Scripts/run-chromium-webkit-unit-tests:
+ * Scripts/webkitpy/common/system/executive.py:
+ (ScriptError.__init__):
+
+2013-02-25 Laszlo Gombos <l.gombos@samsung.com>
+
+ [EFL] Align feature defaults
+ https://bugs.webkit.org/show_bug.cgi?id=110715
+
+ Enable 3D_RENDERING in FeatureList.pm as it is enabled by default in
+ OptionsEfl.cmake.
+
+ Reviewed by Gyuyoung Kim.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-02-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ run-perf-tests reports wrong commit time
+ https://bugs.webkit.org/show_bug.cgi?id=110746
+
+ Reviewed by Andreas Kling.
+
+ The bug was caused by running "svn info" on a subdirectory, which returns a timestamp
+ of when the subdirectory was last modified.
+
+ Run "svn info -r <revision> <repository root>" instead. Specifying revision number is
+ insufficient since running "svn log -r <revision>" on a partial checkout only returns
+ an empty result if the revision didn't modify the subdirectory.
+
+ For git, there is no partial checkout, so we just need to pass in "-r" option to keep
+ the interface compatible with svn.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ (MockSCM.timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (test_timestamp_of_latest_commit):
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.timestamp_of_latest_commit):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._generate_results_dict):
+
+2013-02-25 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move WebRuntimeFeatures configuration to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=110712
+
+ Reviewed by Nico Weber.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2013-02-25 Nico Weber <thakis@chromium.org>
+
+ Make ninja the default build system for build-webkit --chromium on windows
+ https://bugs.webkit.org/show_bug.cgi?id=110731
+
+ Reviewed by Jochen Eisinger.
+
+ With http://crbug.com/169945 fixed, this should now work.
+
+ * Scripts/update-webkit-chromium:
+
+2013-02-24 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] GTK+ 2 build broken since GTK_API_VERSION_2 moved to autoconfig.h
+ https://bugs.webkit.org/show_bug.cgi?id=110702
+
+ Reviewed by Martin Robinson.
+
+ * GtkLauncher/main.c: include autotoolsconfig.h.
+ * Scripts/webkitpy/style/checker.py: make GtkLauncher/main.c exempt of
+ the include ordering check, since it uses autotoolsconfig.h which needs to
+ come first.
+
+2013-02-24 Hajime Morrita <morrita@google.com>
+
+ [Custom Elements] Implement bare-bone document.register()
+ https://bugs.webkit.org/show_bug.cgi?id=100229
+
+ Reviewed by Adam Barth.
+
+ Added enableCustomDOMElements flag.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2013-02-23 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] DumpRenderTree TestShell::initialize should take Platform* now that WebKitPlatformSupport is empty
+ https://bugs.webkit.org/show_bug.cgi?id=110606
+
+ Reviewed by Adam Barth.
+
+ Part of a larger refactoring series; see tracking bug 82948.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (WebKitSupportTestEnvironment::WebKitSupportTestEnvironment):
+ (WebKitSupportTestEnvironment::mockPlatform):
+ (WebKitSupportTestEnvironment):
+ * DumpRenderTree/chromium/MockPlatform.cpp: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp.
+ (MockPlatform::create):
+ (MockPlatform::MockPlatform):
+ (MockPlatform::~MockPlatform):
+ (MockPlatform::setInterfaces):
+ (MockPlatform::cryptographicallyRandomValues):
+ (MockPlatform::createMediaStreamCenter):
+ (MockPlatform::createRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/MockPlatform.h: Copied from Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h.
+ (MockPlatform):
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp: Removed.
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
+2013-02-23 Ryosuke Niwa <rniwa@webkit.org>
+
+ Chromium Windows Perf bot fix. Tolerate CR at the end of the line that contains the timestamp.
+
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.timestamp_of_latest_commit):
+
+2013-02-23 Jason Anderssen <janderssen@gmail.com>
+
+ Move setAutofilled from TestRunner to WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=110521
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+
+2013-02-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ Upload results to perf.webkit.org in addition to the one specified by --test-results-server
+ https://bugs.webkit.org/show_bug.cgi?id=108577
+
+ Reviewed by Dirk Pranke.
+
+ Upload results to perf.webkit.org using new JSON format as well as the host specified by
+ --test-results-server. The new format is needed to provide extra information perf.webkit.org
+ need such as the subversion commit time and test URLs. This is a temporarily measure until
+ we complete the transition and the old JSON format and the code to upload results to
+ webkit-perf.appspot.com can be deleted.
+
+ This patch adds scm.timestamp_of_latest_commit to obtain the timestamp of the latest commit present
+ in a svn checkout or a git clone. This information is embedded in JSON submitted to perf.webkit.org
+ so that the app can sort performance test results based on the timestamp of the last commit.
+
+ It also changes the repository names returned by port objects to be properly capitalized
+ human readable names such as WebKit instead of lowercased names such as webkit since these names
+ are displayed on perf.webkit.org for humans. Several users of this feature has been updated
+ to explicitly lowercase the names.
+
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.timestamp_of_latest_commit): Added. Obtains the timestamp of the last commit. Unfortunately,
+ git's timestamp granularity is seconds so we're losing some information compared to using a regular
+ subversion client. To make matters worse, git doesn't have any option to show ISO-format timestamp in
+ UTC so we're going to manually fiddle with timezone.
+
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.timestamp_of_latest_commit): Added.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ (MockSCM.timestamp_of_latest_commit): Added.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (test_timestamp_of_latest_commit): Added a test for Git.timestamp_of_latest_commit.
+
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.timestamp_of_latest_commit): Added. With svn, all we need to do is to use --xml option and parse
+ the timestamp which is always in UTC.
+
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ (JSONResultsGeneratorBase._insert_generic_metadata): Lowercase the name. Note that the name
+ 'chromium' needs to be substituted by 'chrome' for historical reasons.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.repository_paths): Return WebKit instead of webkit as noted above.
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.repository_paths): Return Chromium instead of chromium as noted above.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.__init__): Store the current time in UTC as well as in local time.
+ (PerfTestsRunner._collect_tests):
+
+ (PerfTestsRunner._generate_and_show_results): Retrieve both regular output and one for perf.webkit.org,
+ and upload them appropriately.
+
+ (PerfTestsRunner._generate_results_dict): Store WebKit and Chromium revisions at which tests were ran
+ in revisions_for_perf_webkit and construct an output for perf.webkit.org.
+
+ (PerfTestsRunner._datetime_in_ES5_compatible_iso_format): Added.
+
+ (PerfTestsRunner._merge_slave_config_json): Merge slave configuration files into both regular output
+ and one for perf.webkit.org. Here, we prefix each key with "builder" for perf.webkit.org.
+ e.g. "processor" would be renamed to "builderProcessor".
+
+ (PerfTestsRunner._generate_output_files):
+
+ (PerfTestsRunner._upload_json): Added a remote path as an argument since we upload JSONs to /api/report
+ on perf.webkit.org whereas we upload it to /api/test/report on webkit-perf.appspot.com. Also added the code
+ to parse response as JSON when possible since perf.webkit.org returns a JSON response as opposed to
+ webkit-perf.appspot.com which spits out a plaintext response.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (MainTest._test_run_with_json_output.mock_upload_json): Tolerate perf.webkit.org/api/report for now.
+ (MainTest._test_run_with_json_output): Store a UTC time as perftestrunner would do.
+ (MainTest.test_run_with_upload_json_should_generate_perf_webkit_json): Added.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (MainTest.test_upload_json): Moved from itegrationtest.py since it really is a unit test. Also added test
+ cases to parse JSON responses.
+ (MainTest.test_upload_json.MockFileUploader): Refactored.
+ (MainTest.test_upload_json.MockFileUploader.reset): Added.
+ (MainTest.test_upload_json.MockFileUploader.__init__):
+ (MainTest.test_upload_json.MockFileUploader.upload_single_text_file):
+
+2013-02-22 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Update bot config for OpenSource bots to add two new Win7 Debug testers and get rid of WinXP Debug testers.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-02-22 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r143794.
+ http://trac.webkit.org/changeset/143794
+ https://bugs.webkit.org/show_bug.cgi?id=110542
+
+ debug linux builds broken?
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-02-22 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] enable the fixed version of freetype on linux
+ https://bugs.webkit.org/show_bug.cgi?id=110542
+
+ Reviewed by Tony Chang.
+
+ Switch to building with a fixed version of FreeType for
+ just DumpRenderTree. This allows us to share one version
+ of pixel baselines for both Lucid and Precise, and run
+ the layout tests in a stock Precise install (instead of a Lucid
+ chroot). Going forward, this approach isolates us from os-level
+ changes to the version of FreeType. Note that Chromium itself
+ still uses the system FreeType and is unaffected by this change.
+
+ This setting can still be turned off (at compile/gyp-time) by
+ manually setting use_custom_freetype=0.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-02-22 Anders Carlsson <andersca@apple.com>
+
+ Move pluginLoadPolicy to the page loader client
+ https://bugs.webkit.org/show_bug.cgi?id=110635
+
+ Reviewed by Sam Weinig.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createOtherPage):
+ (WTR::TestController::createWebViewWithOptions):
+
+2013-02-22 Kenneth Russell <kbr@google.com>
+
+ Unreviewed. Changed gman's primary address for auto-complete in Bugzilla.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-22 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [WTR] Do not dump information about empty subframes.
+ https://bugs.webkit.org/show_bug.cgi?id=110585
+
+ Reviewed by Simon Fraser.
+
+ Follow DumpRenderTree more closely by skipping empty frames
+ (frames which have no document). We are not really interested in
+ showing anything about them.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::dumpDescendantFramesText): Do not print subframe names when they
+ have no associated Document.
+
+2013-02-21 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][DRT] Do not dump empty frames.
+ https://bugs.webkit.org/show_bug.cgi?id=110474
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Follow the original Mac implementation more closely by skipping
+ empty frames (frames which have no document). We are not really
+ interested in showing anything about them.
+
+ * DumpRenderTree/efl/DumpRenderTree.cpp:
+ (dumpFramesAsText):
+
+2013-02-21 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] support the lucid version of freetype on precise in DRT
+ https://bugs.webkit.org/show_bug.cgi?id=107338
+
+ Reviewed by Tony Chang.
+
+ Modify the DRT build so that we can optionally link against
+ a fixed version of Freetype2. This allows us to share pixel test
+ results across multiple versions of Ubuntu without having to
+ worry about differences in font rendering.
+
+ At the moment this feature is off by default. Eventually it will
+ be on by default on linux.
+
+ Note that this only affects DRT; the regular Chromium binary
+ (and, for now, content_shell) will still use the system version
+ of Freetype.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-02-21 Rouslan Solomakhin <rouslan@chromium.org>
+
+ [Chromium] Remove the word "cheher" from the list of misspelled words
+ https://bugs.webkit.org/show_bug.cgi?id=110447
+
+ Reviewed by Tony Chang.
+
+ Other platforms do not mark "cheher" as a misspelled word in layout tests.
+ This change is to bring Chromium platform in line with the rest of the
+ platforms.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::hasInCache): Changed "cheher" to "wellcome".
+ (WebTestRunner::MockSpellCheck::fillSuggestionList): Removed "cheher" misspelling and "checker" suggestion.
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded): Removed "cheher" misspelling.
+
+2013-02-21 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] document WebTestDelegate and WebTestRunner interfaces
+ https://bugs.webkit.org/show_bug.cgi?id=110472
+
+ Reviewed by Adam Barth.
+
+ Also remove the default implementation of the remaining WebTestDelegate
+ methods now that all embedders provide this interface.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner):
+
+2013-02-19 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ Objective-C API: Need a way to use the Objective-C JavaScript API with WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=106059
+
+ Reviewed by Geoffrey Garen.
+
+ Added new tests for the WebKit API portion of the JSC Objective-C API.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/JSContextBackForwardCache1.html: Added.
+ * TestWebKitAPI/Tests/mac/JSContextBackForwardCache2.html: Added.
+ * TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm: Added.
+ (-[MyConsole log:]):
+ (-[MyConsole printHelloWorld]):
+ (-[MyConsole add:to:]):
+ (-[DidCreateJavaScriptContextFrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[DidCreateJavaScriptContextFrameLoadDelegate webView:didCreateJavaScriptContext:forFrame:]):
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2013-02-21 Stephen Chenney <schenney@chromium.org>
+
+ Unreviewed, add myself as a reviewer
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-21 Jer Noble <jer.noble@apple.com>
+
+ Unreviewed; add myself to the Media watchlist and update my committers.py setting to Reviewer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-21 Martin Robinson <mrobinson@igalia.com>
+
+ gtk/DumpRenderTree.cpp is missing <locale.h> include
+ https://bugs.webkit.org/show_bug.cgi?id=109386
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp: Fix the WebKitGTK+ Mac build
+ by include locale.h when we use setlocale.
+
+2013-02-21 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Move feature overriding to the configure phase
+ https://bugs.webkit.org/show_bug.cgi?id=110293
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * Scripts/webkitdirs.pm:
+ (runAutogenForAutotoolsProjectIfNecessary): Rename the feature file to
+ WebKitFeatureOverrides.txt to better match the other filenames used in
+ the new feature processing.
+ * gtk/generate-feature-defines-files: Added. A script which takes as an argument
+ the default features, overrides them with the contents of WebKitFeatureOverrrides.txt
+ and writes WebKitFeatures.txt and WebKitFeatures.h.
+ * gtk/override-feature-defines: Removed.
+
+2013-02-21 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] Remove obsolete DEPENDPATH assignment
+
+ Reviewed by Simon Hausmann
+
+ qmake now adds CONFIG+=depend_includepath by default, making manual
+ DEPENDPATH setup unnecessary.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2013-02-20 Vivek Galatage <vivekg@webkit.org>
+
+ Unreviewed. Changing primary email id.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-14 James Robinson <jamesr@chromium.org>
+
+ [chromium] Request WebLayerTreeView for DumpRenderTree via explicit testing path
+ https://bugs.webkit.org/show_bug.cgi?id=109634
+
+ Reviewed by Adrienne Walker.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createOutputSurface):
+ (WebViewHost::initializeLayerTreeView):
+
+2013-02-20 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Re-enable 3D CSS transforms when using build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=110402
+
+ Reviewed by Xan Lopez.
+
+ * Scripts/webkitperl/FeatureList.pm: Enable 3D rendering by default
+ when building WebKitGTK+.
+
+2013-02-20 Roger Fong <roger_fong@apple.com>
+
+ Get VS2010 Solution B&I ready.
+ <rdar://problem/1322988>
+
+ Rubberstamped by Timothy Horton.
+
+ Add Production configurations.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj:
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props:
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj:
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props: Added.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props:
+ * win/record-memory/record-memory.vcxproj:
+ * win/record-memory/record-memoryProduction.props: Added.
+ * win/record-memory/record-memoryRelease.props:
+
+2013-02-20 Dirk Schulze <krit@webkit.org>
+
+ Enable CANVAS_PATH flag
+ https://bugs.webkit.org/show_bug.cgi?id=108508
+
+ Reviewed by Simon Fraser.
+
+ Enable CANVAS_PATH flag on trunk.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-02-20 Tony Chang <tony@chromium.org>
+
+ Parse author names with commas in ChangeLogs
+ https://bugs.webkit.org/show_bug.cgi?id=110356
+
+ Reviewed by Dirk Pranke.
+
+ Paweł's name has a comma in it, which was confusing the ChangeLog parser.
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLogEntry): Move name splitting regexp into a constant.
+ (ChangeLogEntry._parse_reviewer_text): Use _split_reviewer_names.
+ (ChangeLogEntry._split_reviewer_names): Rename to be more specific.
+ (ChangeLogEntry._split_author_names_with_emails): Rename to be more specific and require emails.
+ (ChangeLogEntry._parse_author_text): Use _split_author_names_with_emails.
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_parse_authors): Test case with Paweł's name.
+
+2013-02-15 Dirk Schulze <krit@webkit.org>
+
+ [Chromium] Add runtime flag for CanvasPath
+ https://bugs.webkit.org/show_bug.cgi?id=109997
+
+ Reviewed by Adam Barth.
+
+ Added runtime flag for Canvas Path. Enabled it by default for TestShell. Otherwise
+ the constructor for Path on DOMWindow would never be activatable, since the script
+ is running after creating the DOMWindow object.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2013-02-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] use a WebTestProxyBase pointer to identify the window we need the history for
+ https://bugs.webkit.org/show_bug.cgi?id=110346
+
+ Reviewed by Adam Barth.
+
+ Using an index is very brittle, as the TestRunner API does not define
+ any ordering of windows.
+
+ Also, make TestRunner::shouldDumpBackForwardList() so content shell can
+ trigger the capturing in the browser process before generating the
+ text dump.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner):
+ (WebTestRunner::WebTestDelegate::captureHistoryForWindow):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::captureTree):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::captureHistoryForWindow):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-19 Rouslan Solomakhin <rouslan@chromium.org>
+
+ [Chromium] Serve spellcheck suggestions for editing/spelling/spelling-changed-text.html from cache
+ https://bugs.webkit.org/show_bug.cgi?id=109220
+
+ Reviewed by Tony Chang.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::hasInCache): Added a method to detect whether spellcheck results can be served from cache.
+ (WebTestRunner):
+ (WebTestRunner::MockSpellCheck::fillSuggestionList): Modified to suggest "checker" for the word "cheher".
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded): Modified to mark "cheher" as misspelling.
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::requestCheckingOfText): Modified to serve spellcheck suggestions from cache when possible.
+
+2013-02-20 Xabier Rodriguez Calvar <calvaris@igalia.com>
+
+ [Gtk] HTML5 Media controls require a design refresh
+ https://bugs.webkit.org/show_bug.cgi?id=83869
+
+ Reviewed by Philippe Normand.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (initializeGtkFontSettings): Added gnome as default icon theme for
+ the DRT.
+ * WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
+ (WTR::initializeGtkSettings): Added gnome as default icon theme for
+ the WTR.
+ * gtk/jhbuild.modules: Added gnome-icon-theme-symbolic as external
+ dependency.
+
+2013-02-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move most of the remaining mocks to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=110217
+
+ Reviewed by Nico Weber.
+
+ While most of the functionality provided by these mocks is also
+ available in the content module, there is no straight forward way to
+ inject the mock results required for layout tests.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxy::geolocationClient):
+ (WebTestRunner::WebTestProxy::speechInputController):
+ (WebTestRunner::WebTestProxy::speechRecognizer):
+ (WebTestRunner::WebTestProxy::deviceOrientationClient):
+ (WebTestRunner::WebTestProxy::requestPointerLock):
+ (WebTestRunner::WebTestProxy::requestPointerUnlock):
+ (WebTestRunner::WebTestProxy::isPointerLocked):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechInputController.cpp: Renamed from Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp.
+ (WebTestRunner::MockWebSpeechInputController::MockWebSpeechInputController):
+ (WebTestRunner):
+ (WebTestRunner::MockWebSpeechInputController::~MockWebSpeechInputController):
+ (WebTestRunner::MockWebSpeechInputController::setDelegate):
+ (WebTestRunner::MockWebSpeechInputController::addMockRecognitionResult):
+ (WebTestRunner::MockWebSpeechInputController::setDumpRect):
+ (WebTestRunner::MockWebSpeechInputController::clearResults):
+ (WebTestRunner::MockWebSpeechInputController::startRecognition):
+ (WebTestRunner::MockWebSpeechInputController::cancelRecognition):
+ (WebTestRunner::MockWebSpeechInputController::stopRecording):
+ (WebTestRunner::MockWebSpeechInputController::speechTaskFired):
+ (WebTestRunner::MockWebSpeechInputController::SpeechTask::SpeechTask):
+ (WebTestRunner::MockWebSpeechInputController::SpeechTask::stop):
+ (WebTestRunner::MockWebSpeechInputController::SpeechTask::runIfValid):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechInputController.h: Renamed from Tools/DumpRenderTree/chromium/MockWebSpeechInputController.h.
+ (WebKit):
+ (WebTestRunner):
+ (MockWebSpeechInputController):
+ (WebTestRunner::MockWebSpeechInputController::taskList):
+ (SpeechTask):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechRecognizer.cpp: Renamed from Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp.
+ (WebTestRunner::MockWebSpeechRecognizer::MockWebSpeechRecognizer):
+ (WebTestRunner):
+ (WebTestRunner::MockWebSpeechRecognizer::~MockWebSpeechRecognizer):
+ (WebTestRunner::MockWebSpeechRecognizer::setDelegate):
+ (WebTestRunner::MockWebSpeechRecognizer::start):
+ (WebTestRunner::MockWebSpeechRecognizer::stop):
+ (WebTestRunner::MockWebSpeechRecognizer::abort):
+ (WebTestRunner::MockWebSpeechRecognizer::addMockResult):
+ (WebTestRunner::MockWebSpeechRecognizer::setError):
+ (WebTestRunner::MockWebSpeechRecognizer::startTaskQueue):
+ (WebTestRunner::MockWebSpeechRecognizer::clearTaskQueue):
+ (WebTestRunner::MockWebSpeechRecognizer::StepTask::runIfValid):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebSpeechRecognizer.h: Renamed from Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.h.
+ (WebKit):
+ (WebTestRunner):
+ (MockWebSpeechRecognizer):
+ (WebTestRunner::MockWebSpeechRecognizer::wasAborted):
+ (WebTestRunner::MockWebSpeechRecognizer::client):
+ (WebTestRunner::MockWebSpeechRecognizer::handle):
+ (WebTestRunner::MockWebSpeechRecognizer::taskList):
+ (Task):
+ (WebTestRunner::MockWebSpeechRecognizer::Task::Task):
+ (WebTestRunner::MockWebSpeechRecognizer::Task::~Task):
+ (StepTask):
+ (WebTestRunner::MockWebSpeechRecognizer::StepTask::StepTask):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ (WebTestRunner::TestInterfaces::windowOpened):
+ (WebTestRunner):
+ (WebTestRunner::TestInterfaces::windowClosed):
+ (WebTestRunner::TestInterfaces::windowList):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::requestPointerLock):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::requestPointerUnlock):
+ (WebTestRunner::TestRunner::isPointerLocked):
+ (WebTestRunner::TestRunner::didAcquirePointerLockInternal):
+ (WebTestRunner::TestRunner::didNotAcquirePointerLockInternal):
+ (WebTestRunner::TestRunner::didLosePointerLockInternal):
+ (WebTestRunner::TestRunner::windowCount):
+ (WebTestRunner::TestRunner::setMockDeviceOrientation):
+ (WebTestRunner::TestRunner::numberOfPendingGeolocationPermissionRequests):
+ (WebTestRunner::TestRunner::setGeolocationPermission):
+ (WebTestRunner::TestRunner::setMockGeolocationPosition):
+ (WebTestRunner::TestRunner::setMockGeolocationPositionUnavailableError):
+ (WebTestRunner::TestRunner::addMockSpeechInputResult):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::addMockSpeechRecognitionResult):
+ (WebTestRunner::TestRunner::setMockSpeechRecognitionError):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ (WebTestRunner::TestRunner::didAcquirePointerLock):
+ (WebTestRunner::TestRunner::didNotAcquirePointerLock):
+ (WebTestRunner::TestRunner::didLosePointerLock):
+ (WebTestRunner::TestRunner::setPointerLockWillRespondAsynchronously):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner):
+ (TestRunner):
+ (HostMethodTask):
+ (WebTestRunner::TestRunner::HostMethodTask::HostMethodTask):
+ (WebTestRunner::TestRunner::HostMethodTask::runIfValid):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::setInterfaces):
+ (WebTestRunner::WebTestProxyBase::setDelegate):
+ (WebTestRunner::WebTestProxyBase::reset):
+ (WebTestRunner::WebTestProxyBase::captureTree):
+ (WebTestRunner::WebTestProxyBase::geolocationClientMock):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::deviceOrientationClientMock):
+ (WebTestRunner::WebTestProxyBase::speechInputControllerMock):
+ (WebTestRunner::WebTestProxyBase::speechRecognizerMock):
+ (WebTestRunner::WebTestProxyBase::geolocationClient):
+ (WebTestRunner::WebTestProxyBase::speechInputController):
+ (WebTestRunner::WebTestProxyBase::speechRecognizer):
+ (WebTestRunner::WebTestProxyBase::deviceOrientationClient):
+ (WebTestRunner::WebTestProxyBase::requestPointerLock):
+ (WebTestRunner::WebTestProxyBase::requestPointerUnlock):
+ (WebTestRunner::WebTestProxyBase::isPointerLocked):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebKit):
+ (WebViewHost):
+
+2013-02-20 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Make debug builds possible on 32bit Linux
+ https://bugs.webkit.org/show_bug.cgi?id=110231
+
+ Reviewed by Tor Arne Vestbø.
+
+ Use the stabs format for debug builds to make the object files
+ a bit smaller so that they can be linked on a 32bit system.
+
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2013-02-20 Takashi Toyoshima <toyoshim@chromium.org>
+
+ Unreviewed. Add myself to watch lists.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-19 Joshua Bell <jsbell@chromium.org>
+
+ Remove warning from run-bindings-tests
+ https://bugs.webkit.org/show_bug.cgi?id=110285
+
+ Reviewed by Kentaro Hara.
+
+ Since wkrev.com/139331 run-bindings-tests has been harmlessly emitting
+ "Unknown option: idlattributesfile". That option was removed from
+ bindings/scripts/preprocess-idls.pl but was still being passed by
+ the test script. Remove it.
+
+ * Scripts/webkitpy/bindings/main.py:
+ (BindingsTests.generate_supplemental_dependency): Remove unused arg.
+
+2013-02-19 Elliott Sprehn <esprehn@chromium.org>
+
+ Unreviewed. Add myself to watch lists.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-19 Hans Muller <hmuller@adobe.com>
+
+ Unreviewed, corrected primary email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-19 Hans Muller <hmuller@adobe.com>
+
+ Unreviewed. Adding myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-19 Pravin D <pravind@webkit.org>
+
+ Unreviewed, changing primary email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-19 Alan Cutter <alancutter@chromium.org>
+
+ REGRESSION: Sheriffbot is failing to process rollout requests
+ https://bugs.webkit.org/show_bug.cgi?id=106945
+
+ Reviewed by Adam Barth.
+
+ Modified Sheriffbot build script to track the svn repo from git and add bot user details to the git repo config file.
+ This resolves problems when Sheriffbot attempts to perform a rollout request.
+
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:
+ * EWSTools/configure-git-svn.sh: Copied from Tools/EWSTools/create-webkit-git.
+ * EWSTools/configure-git-user.sh: Renamed from Tools/EWSTools/create-webkit-git.
+
+2013-02-19 Claudio Saavedra <csaavedra@igalia.com>
+
+ Unreviewed build fix.
+
+ * efl/jhbuild.modules:
+ * gtk/jhbuild.modules:
+
+ Bump harfbuzz module to 0.9.7. See related bug 110145.
+
+2013-02-19 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Skip the build with a warning if certain tools cannot be found in the PATH
+ https://bugs.webkit.org/show_bug.cgi?id=110215
+
+ Reviewed by Tor Arne Vestbø.
+
+ Check that gperf, python, ruby, perl, bison and flex are in the PATH before
+ continuing the build. Otherwise skip with an error message explaining which
+ programs are missing from the build.
+
+ * qmake/mkspecs/features/configure.prf:
+ * qmake/mkspecs/features/functions.prf:
+
+2013-02-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r143319.
+ http://trac.webkit.org/changeset/143319
+ https://bugs.webkit.org/show_bug.cgi?id=110214
+
+ Causes build issues on win32 (Requested by carewolf on
+ #webkit).
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-02-19 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Enable MathML
+ https://bugs.webkit.org/show_bug.cgi?id=110205
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/features.pri:
+
+2013-02-17 Andrei Bucur <abucur@adobe.com>
+
+ Unreviewed. Adding myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-19 Hajime Morrita <morrita@google.com>
+
+ Unreviewed, updated spelling of my name.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-18 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed. Adjust expectations.
+
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp:
+ (TestWebKitAPI::TEST):
+
+2013-02-18 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed GTK gardening.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Skipped the ReloadPageAfterCrash unit test as it is flakily timing out.
+
+2013-02-18 Adenilson Cavalcanti <cavalcantii@gmail.com>
+
+ [Qt][WK2] Remove duped test name and append new test in project file
+ https://bugs.webkit.org/show_bug.cgi?id=110117
+
+ A new WK2 API test has landed recently (ResizeWindowAfterCrash), this patch will
+ add this test into the runnable test suite and remove a duped test in project file.
+
+ Reviewed by Jocelyn Turcotte.
+
+ * TestWebKitAPI/Tests/WebKit2/WebKit2.pro:
+
+2013-02-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove log spew from dumpAllBackForwardLists
+ https://bugs.webkit.org/show_bug.cgi?id=110108
+
+ Reviewed by Nico Weber.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+
+2013-02-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL][WK2] Disable failing API tests
+ https://bugs.webkit.org/show_bug.cgi?id=110081
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Disable DOMWindowExtensionBasic WK2 test on EFL port as it times out.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2013-02-18 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Disable the build if certain configure checks fail
+ https://bugs.webkit.org/show_bug.cgi?id=110094
+
+ Reviewed by Tor Arne Vestbø.
+
+ Allow for the build to be skipped (clear out SUBDIRS) if certain
+ configure conditions aren't met.
+
+ * qmake/mkspecs/features/configure.prf:
+
+2013-02-15 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt][WK2] Support WK2 API tests
+ https://bugs.webkit.org/show_bug.cgi?id=109843
+
+ Reviewed by Jocelyn Turcotte.
+
+ * TestWebKitAPI/DerivedSources.pri: Added.
+ * TestWebKitAPI/InjectedBundle.pri: Added.
+ * TestWebKitAPI/PlatformWebView.h:
+ * TestWebKitAPI/TestWebKitAPI.pri:
+ * TestWebKitAPI/TestWebKitAPI.pro:
+ * TestWebKitAPI/Tests/JavaScriptCore/JavaScriptCore.pro: Added.
+ * TestWebKitAPI/Tests/WTF/WTF.pro:
+ * TestWebKitAPI/Tests/WebKit2/WebKit2.pro: Added.
+ * TestWebKitAPI/qt/PlatformUtilitiesQt.cpp:
+ (TestWebKitAPI::Util::sleep):
+ (TestWebKitAPI::Util::createInjectedBundlePath):
+ (TestWebKitAPI::Util::createURLForResource):
+ (TestWebKitAPI::Util::isKeyDown):
+ (Util):
+ * TestWebKitAPI/qt/PlatformWebViewQt.cpp: Added.
+ (TestWebKitAPI):
+ (WrapperWindow):
+ (TestWebKitAPI::WrapperWindow::WrapperWindow):
+ (TestWebKitAPI::WrapperWindow::handleStatusChanged):
+ (TestWebKitAPI::PlatformWebView::PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::~PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::resizeTo):
+ (TestWebKitAPI::PlatformWebView::page):
+ (TestWebKitAPI::PlatformWebView::focus):
+ (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
+ (TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
+ (TestWebKitAPI::PlatformWebView::simulateMouseMove):
+ (TestWebKitAPI::PlatformWebView::simulateRightClick):
+ * TestWebKitAPI/qt/main.cpp:
+ (addQtWebProcessToPath):
+ (main):
+
+2013-02-18 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL][WK2] Refactor Ewk_Favicon code and stop relying on internal C++ API
+ https://bugs.webkit.org/show_bug.cgi?id=108598
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Update EFL's MiniBrowser to make use of new Ewk_Favicon API.
+
+ * MiniBrowser/efl/main.c:
+ (update_view_favicon):
+ (on_view_favicon_changed):
+ (window_create):
+
+2013-02-18 Zoltan Arvai <zarvai@inf.u-szeged.hu>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-13 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
+ https://bugs.webkit.org/show_bug.cgi?id=109554
+
+ In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
+ can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
+
+ Drive by fix: I introduced a client interface for the HeapGraphSerializer.
+ It helps me to do the tests for the serializer.
+
+ Reviewed by Yury Semikhatsky.
+
+ It is covered by newly added tests in TestWebKitAPI.
+
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Added.
+ (TestWebKitAPI):
+ (HeapGraphReceiver):
+ (TestWebKitAPI::HeapGraphReceiver::HeapGraphReceiver):
+ (TestWebKitAPI::HeapGraphReceiver::printGraph):
+ (TestWebKitAPI::HeapGraphReceiver::dumpNodes):
+ (TestWebKitAPI::HeapGraphReceiver::dumpEdges):
+ (TestWebKitAPI::HeapGraphReceiver::dumpBaseToRealNodeId):
+ (TestWebKitAPI::HeapGraphReceiver::dumpStrings):
+ (TestWebKitAPI::HeapGraphReceiver::serializer):
+ (TestWebKitAPI::HeapGraphReceiver::chunkPart):
+ (TestWebKitAPI::HeapGraphReceiver::dumpPart):
+ (TestWebKitAPI::HeapGraphReceiver::stringValue):
+ (TestWebKitAPI::HeapGraphReceiver::intValue):
+ (TestWebKitAPI::HeapGraphReceiver::nodeToString):
+ (TestWebKitAPI::HeapGraphReceiver::edgeToString):
+ (TestWebKitAPI::HeapGraphReceiver::printNode):
+ (Helper):
+ (TestWebKitAPI::Helper::Helper):
+ (TestWebKitAPI::Helper::addNode):
+ (TestWebKitAPI::Helper::addEdge):
+ (TestWebKitAPI::Helper::done):
+ (Object):
+ (TestWebKitAPI::Helper::Object::Object):
+ (TestWebKitAPI::TEST):
+ (Owner):
+ (TestWebKitAPI::Owner::Owner):
+ (TestWebKitAPI::Owner::reportMemoryUsage):
+
+2013-02-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ WKR build fix. Always use ascii since irclib/ircbot doesn't support unicode.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot.next_work_item):
+
+2013-02-17 Kangil Han <kangil.han@samsung.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-17 Alan Cutter <alancutter@chromium.org>
+
+ GCE EWS bots are all offline
+ https://bugs.webkit.org/show_bug.cgi?id=110069
+
+ Reviewed by Eric Seidel.
+
+ Updated GCE EWS build scripts to use the gcel-10-04-v20130104 image instead of the obsoleted ubuntu-10-04-v20120621.
+ This changed the ephemeral disk path to /dev/sdb and required /etc/hosts to be chmodded to 644.
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/GoogleComputeEngine/build-cr-linux-debug-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:
+ * EWSTools/build-vm.sh:
+ * EWSTools/start-queue.sh:
+
+2013-02-18 Eugene Klyuchnikov <eustas@chromium.org>
+
+ Unreviewed, add myself to commiters.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-17 Dongwoo Joshua Im <dw.im@samsung.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-17 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Fix typo in script.
+
+ * EWSTools/start-queue-win.sh:
+
+2013-02-15 Roger Fong <roger_fong@apple.com>
+
+ Pass in bot name as parameter to start-queue-win script.
+ https://bugs.webkit.org/show_bug.cgi?id=109998.
+
+ Reviewed by Darin Adler.
+
+ * EWSTools/start-queue-win.sh:
+
+2013-02-18 Byungwoo Lee <bw80.lee@samsung.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-17 Ryosuke Niwa <rniwa@webkit.org>
+
+ Rename new-commit-bot to WKR to disambiguate it from commit-queue.
+
+ Rubber-stamped by Andreas Kling.
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot.begin_work_queue):
+
+2013-02-16 Glenn Adams <glenn@skynav.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ new-commit-bot should report the full name of committer and reviewer instead of just nicks
+ https://bugs.webkit.org/show_bug.cgi?id=110040
+
+ Reviewed by Darin Adler.
+
+ Have it report names like "Ryosuke Niwa (rniwa)" instead of just "rniwa".
+
+ * Scripts/webkitpy/tool/commands/newcommitbot.py:
+ (NewCommitBot):
+ (NewCommitBot._summarize_commit_log):
+ * Scripts/webkitpy/tool/commands/newcommitbot_unittest.py:
+
+2013-02-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ We need a CIA replacement
+ https://bugs.webkit.org/show_bug.cgi?id=110008
+
+ Reviewed by Andreas Kling.
+
+ Added new-commit-bot.
+
+ * Scripts/webkitpy/tool/bot/queueengine.py:
+ (QueueEngine.__init__):
+ (QueueEngine): Made the sleep tiem configurable.
+ (QueueEngine._sleep_message):
+ (QueueEngine._sleep):
+ * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
+ (QueueEngineTest.test_sleep_message):
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/newcommitbot.py: Added.
+ (PingPong): Added. Implements the ping pong protocol.
+ (NewCommitBot):
+ (NewCommitBot.begin_work_queue):
+ (NewCommitBot.work_item_log_path):
+ (NewCommitBot.next_work_item): Update SVN revision and report any new commits made since
+ the last time we checked the head SVN revision.
+ (NewCommitBot.process_work_item):
+ (NewCommitBot._update_checkout): svn up.
+ (NewCommitBot._new_svn_revisions): Returns a range of new revisions.
+ (NewCommitBot._summarize_commit_log): Summarize a commit log to be posted on IRC.
+ (NewCommitBot.handle_unexpected_error):
+ (NewCommitBot.handle_script_error):
+ * Scripts/webkitpy/tool/commands/newcommitbot_unittest.py: Added.
+ (NewCommitBotTest.test_summarize_commit_log_basic): Tests for summarizing non-rollout commits.
+ (NewCommitBotTest.test_summarize_commit_log_rollout): Tests for summarizing rollouts.
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (AbstractQueue.execute):
+ * Scripts/webkitpy/tool/commands/queuestest.py:
+ (MockQueueEngine.__init__):
+ * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
+ (SheriffBotTest.test_command_aliases):
+ * Scripts/webkitpy/tool/main.py:
+ (WebKitPatch):
+
+2013-02-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] initialize all variables of TestRunner classes
+ https://bugs.webkit.org/show_bug.cgi?id=110013
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+
+2013-02-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] destroy the TestPlugin when the destroy() method is invoked.
+ https://bugs.webkit.org/show_bug.cgi?id=110012
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::destroy):
+
+2013-02-15 Adenilson Cavalcanti <cavalcantii@gmail.com>
+
+ [WK2] Write a test to simulate crashed WebProcess followed by Window resize
+ https://bugs.webkit.org/show_bug.cgi?id=109842
+
+ Reviewed by Benjamin Poulain.
+
+ This new test will kill WebProcess, followed by next resizing the Window. It helps to
+ identify if the port is testing for WebPageProxy data members state (e.g. DrawingArea, Frames)
+ before making calls into them.
+
+ * TestWebKitAPI/GNUmakefile.am:
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::didFinishLoad):
+ (TestWebKitAPI::didCrash):
+ (TestWebKitAPI::TEST):
+
+2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ Add CString operators for comparison with const char*
+ https://bugs.webkit.org/show_bug.cgi?id=109947
+
+ Reviewed by Darin Adler.
+
+ Add tests for WTF::CString's comparison operators.
+
+ * TestWebKitAPI/Tests/WTF/CString.cpp:
+ (TEST):
+
+2013-02-15 Zan Dobersek <zdobersek@igalia.com>
+
+ webkit-patch suggest-reviewers should limit itself to 5 reviewers
+ https://bugs.webkit.org/show_bug.cgi?id=107528
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/checkout.py:
+ (Checkout.suggested_reviewers): Iterate through the sorted commit info list,
+ scraping reviewers from the commit information and in the end producing a list
+ of reviewers that's sorted from the most to least recent activity of any reviewer
+ that has reviewed or authored patches for the changed files.
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (SuggestReviewers): Use the SuggestReviewers step instead of reimplementing much of
+ the same logic.
+ (SuggestReviewers._prepare_state): Force the reviewer suggestion because the option
+ defaults to False.
+ * Scripts/webkitpy/tool/steps/suggestreviewers.py:
+ (SuggestReviewers.run): Only list the first five suggested reviewers, now printed out
+ on a single line. Only ask for CC-ing the suggested reviewers to the bug if the
+ bug ID is located in the command's state.
+
+2013-02-15 Pablo Flouret <pablof@motorola.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-15 Roger Fong <roger_fong@apple.com>
+
+ Get Win EWS startup script checked into tree so we can make changes to all the EWS bots more easily.
+
+ * EWSTools/start-queue-win.sh: Added.
+
+2013-02-15 Andreas Kling <akling@apple.com>
+
+ Unbreak webkit-patch -- can't have both Committer and Contributor entry with same e-mail address.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-15 Joanmarie Diggs <jdiggs@igalia.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-15 Ryosuke Niwa <rniwa@webkit.org>
+
+ NRWT: ML Debug Test bot is timing out after cleaning up ports
+ https://bugs.webkit.org/show_bug.cgi?id=109912
+
+ Reviewed by Simon Fraser.
+
+ Added more debug messgaes to diagnose the issue.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run):
+
+2013-02-15 Claudio Saavedra <csaavedra@igalia.com>
+
+ Unreviewed. Add myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-15 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ Unreviewed. Update Yi Shen, Antonio Gomes and Laszlo Gombos'
+ emails on their behalf.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-15 Andrey Lushnikov <lushnikov@chromium.org>
+
+ Web Inspector: implement smart braces functionality
+ https://bugs.webkit.org/show_bug.cgi?id=109200
+
+ Reviewed by Pavel Feldman.
+
+ Fix eventSender.keyDown implementation to correctly process opening
+ round brace symbol.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::keyDown):
+
+2013-02-15 Jochen Eisinger <jochen@chromium.org>
+
+ Speculative build fix for chromium-win.
+
+ Unreviewed build fix.
+
+ Add declarations of the copy constructor and assignment operator to
+ WebTestProxyBase, so VS doesn't try to generate them.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+
+2013-02-15 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Port GCController to JSC C API
+ https://bugs.webkit.org/show_bug.cgi?id=109690
+
+ Reviewed by Benjamin Poulain.
+
+ Rename TestRunner to TestRunnerQt to avoid conflict when
+ including TestRunner.h in the future.
+
+ Replaced QObject based GCController implementation with JSC C API
+ based one.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::open):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::methodNameStringForFailedTest):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (WebCore::DumpRenderTree::testRunner):
+ (DumpRenderTree):
+ * DumpRenderTree/qt/GCControllerQt.cpp:
+ (GCController::getJSObjectCount):
+ * DumpRenderTree/qt/GCControllerQt.h: Removed.
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunnerQt::TestRunnerQt):
+ (TestRunnerQt::reset):
+ (TestRunnerQt::dumpNotifications):
+ (TestRunnerQt::processWork):
+ (TestRunnerQt::maybeDump):
+ (TestRunnerQt::dumpAsText):
+ (TestRunnerQt::waitUntilDone):
+ (TestRunnerQt::setViewModeMediaFeature):
+ (TestRunnerQt::webHistoryItemCount):
+ (TestRunnerQt::keepWebHistory):
+ (TestRunnerQt::notifyDone):
+ (TestRunnerQt::windowCount):
+ (TestRunnerQt::grantWebNotificationPermission):
+ (TestRunnerQt::ignoreLegacyWebNotificationPermissionRequests):
+ (TestRunnerQt::denyWebNotificationPermission):
+ (TestRunnerQt::removeAllWebNotificationPermissions):
+ (TestRunnerQt::simulateWebNotificationClick):
+ (TestRunnerQt::simulateLegacyWebNotificationClick):
+ (TestRunnerQt::display):
+ (TestRunnerQt::displayInvalidatedRegion):
+ (TestRunnerQt::clearBackForwardList):
+ (TestRunnerQt::pathToLocalResource):
+ (TestRunnerQt::dumpEditingCallbacks):
+ (TestRunnerQt::dumpFrameLoadCallbacks):
+ (TestRunnerQt::dumpProgressFinishedCallback):
+ (TestRunnerQt::dumpUserGestureInFrameLoadCallbacks):
+ (TestRunnerQt::dumpResourceLoadCallbacks):
+ (TestRunnerQt::dumpResourceResponseMIMETypes):
+ (TestRunnerQt::dumpWillCacheResponse):
+ (TestRunnerQt::dumpHistoryCallbacks):
+ (TestRunnerQt::setWillSendRequestReturnsNullOnRedirect):
+ (TestRunnerQt::setWillSendRequestReturnsNull):
+ (TestRunnerQt::setWillSendRequestClearHeader):
+ (TestRunnerQt::setDeferMainResourceDataLoad):
+ (TestRunnerQt::queueBackNavigation):
+ (TestRunnerQt::queueForwardNavigation):
+ (TestRunnerQt::queueLoad):
+ (TestRunnerQt::queueLoadHTMLString):
+ (TestRunnerQt::queueReload):
+ (TestRunnerQt::queueLoadingScript):
+ (TestRunnerQt::queueNonLoadingScript):
+ (TestRunnerQt::provisionalLoad):
+ (TestRunnerQt::timerEvent):
+ (TestRunnerQt::encodeHostName):
+ (TestRunnerQt::decodeHostName):
+ (TestRunnerQt::closeWebInspector):
+ (TestRunnerQt::setDeveloperExtrasEnabled):
+ (TestRunnerQt::setAsynchronousSpellCheckingEnabled):
+ (TestRunnerQt::showWebInspector):
+ (TestRunnerQt::evaluateInWebInspector):
+ (TestRunnerQt::goBack):
+ (TestRunnerQt::setDefersLoading):
+ (TestRunnerQt::setAllowUniversalAccessFromFileURLs):
+ (TestRunnerQt::setAllowFileAccessFromFileURLs):
+ (TestRunnerQt::setAppCacheMaximumSize):
+ (TestRunnerQt::setAutofilled):
+ (TestRunnerQt::setValueForUser):
+ (TestRunnerQt::setFixedContentsSize):
+ (TestRunnerQt::setPrivateBrowsingEnabled):
+ (TestRunnerQt::setSpatialNavigationEnabled):
+ (TestRunnerQt::setPopupBlockingEnabled):
+ (TestRunnerQt::setPluginsEnabled):
+ (TestRunnerQt::setPOSIXLocale):
+ (TestRunnerQt::setWindowIsKey):
+ (TestRunnerQt::setMainFrameIsFirstResponder):
+ (TestRunnerQt::setJavaScriptCanAccessClipboard):
+ (TestRunnerQt::setXSSAuditorEnabled):
+ (TestRunnerQt::dispatchPendingLoadRequests):
+ (TestRunnerQt::clearAllApplicationCaches):
+ (TestRunnerQt::clearApplicationCacheForOrigin):
+ (TestRunnerQt::localStorageDiskUsageForOrigin):
+ (TestRunnerQt::setApplicationCacheOriginQuota):
+ (TestRunnerQt::applicationCacheDiskUsageForOrigin):
+ (TestRunnerQt::originsWithApplicationCache):
+ (TestRunnerQt::setCacheModel):
+ (TestRunnerQt::setDatabaseQuota):
+ (TestRunnerQt::clearAllDatabases):
+ (TestRunnerQt::addOriginAccessWhitelistEntry):
+ (TestRunnerQt::removeOriginAccessWhitelistEntry):
+ (TestRunnerQt::setCustomPolicyDelegate):
+ (TestRunnerQt::waitForPolicyDelegate):
+ (TestRunnerQt::overridePreference):
+ (TestRunnerQt::setUserStyleSheetLocation):
+ (TestRunnerQt::setCaretBrowsingEnabled):
+ (TestRunnerQt::setAuthorAndUserStylesEnabled):
+ (TestRunnerQt::setUserStyleSheetEnabled):
+ (TestRunnerQt::setDomainRelaxationForbiddenForURLScheme):
+ (TestRunnerQt::callShouldCloseOnWebView):
+ (TestRunnerQt::setScrollbarPolicy):
+ (TestRunnerQt::setSmartInsertDeleteEnabled):
+ (TestRunnerQt::setSelectTrailingWhitespaceEnabled):
+ (TestRunnerQt::execCommand):
+ (TestRunnerQt::isCommandEnabled):
+ (TestRunnerQt::findString):
+ (TestRunnerQt::markerTextForListItem):
+ (TestRunnerQt::computedStyleIncludingVisitedInfo):
+ (TestRunnerQt::elementDoesAutoCompleteForElementWithId):
+ (TestRunnerQt::authenticateSession):
+ (TestRunnerQt::setIconDatabaseEnabled):
+ (TestRunnerQt::setMockDeviceOrientation):
+ (TestRunnerQt::setGeolocationPermission):
+ (TestRunnerQt::numberOfPendingGeolocationPermissionRequests):
+ (TestRunnerQt::setGeolocationPermissionCommon):
+ (TestRunnerQt::setMockGeolocationPositionUnavailableError):
+ (TestRunnerQt::setMockGeolocationPosition):
+ (TestRunnerQt::addMockSpeechInputResult):
+ (TestRunnerQt::setMockSpeechInputDumpRect):
+ (TestRunnerQt::startSpeechInput):
+ (TestRunnerQt::evaluateScriptInIsolatedWorldAndReturnValue):
+ (TestRunnerQt::evaluateScriptInIsolatedWorld):
+ (TestRunnerQt::addUserStyleSheet):
+ (TestRunnerQt::removeAllVisitedLinks):
+ (TestRunnerQt::addURLToRedirect):
+ (TestRunnerQt::originsWithLocalStorage):
+ (TestRunnerQt::deleteAllLocalStorage):
+ (TestRunnerQt::deleteLocalStorageForOrigin):
+ (TestRunnerQt::observeStorageTrackerNotifications):
+ (TestRunnerQt::syncLocalStorage):
+ (TestRunnerQt::resetPageVisibility):
+ (TestRunnerQt::setPageVisibility):
+ (TestRunnerQt::setAutomaticLinkDetectionEnabled):
+ (TestRunnerQt::setTextDirection):
+ (TestRunnerQt::setAlwaysAcceptCookies):
+ (TestRunnerQt::setAlwaysBlockCookies):
+ (TestRunnerQt::setAudioData):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunnerQt):
+
+2013-02-14 Karen Grunberg <kareng@chromium.org>
+
+ adding myself as a committer
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-14 Glenn Adams <glenn@skynav.com>
+
+ new-run-webkit-tests needs a shared TestExpectations between all WebKit ports
+ https://bugs.webkit.org/show_bug.cgi?id=37565
+
+ Introduce generic TestExpectations file that applies as a fallback for all ports, the location of which
+ is LayoutTests/TestExpectations.
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py:
+ (FakePort.path_to_generic_test_expectations_file):
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations.__init__):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.path_to_generic_test_expectations_file):
+ (Port):
+ (Port._port_specific_expectations_files):
+ (Port.expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_expectations_ordering):
+ (test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._port_specific_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+ (QtPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest.test_expectations_files):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (PrintExpectationsTest.test_paths):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._update_expectations_file):
+
+2013-02-14 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move pixel generation logic to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109686
+
+ Reviewed by Stephen White.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::~TestInterfaces):
+ (WebTestRunner::TestInterfaces::setWebView):
+ (WebTestRunner::TestInterfaces::proxy):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebTestRunner):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::setWebView):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::display):
+ (WebTestRunner::TestRunner::displayInvalidatedRegion):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::setWebView):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::reset):
+ (WebTestRunner::WebTestProxyBase::capturePixels):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::paintRect):
+ (WebTestRunner::WebTestProxyBase::paintInvalidatedRegion):
+ (WebTestRunner::WebTestProxyBase::paintPagesWithBoundaries):
+ (WebTestRunner::WebTestProxyBase::canvas):
+ (WebTestRunner::WebTestProxyBase::displayRepaintMask):
+ (WebTestRunner::WebTestProxyBase::display):
+ (WebTestRunner::WebTestProxyBase::displayInvalidatedRegion):
+ (WebTestRunner::WebTestProxyBase::discardBackingStore):
+ (WebTestRunner::WebTestProxyBase::setWindowRect):
+ (WebTestRunner::WebTestProxyBase::userMediaClient):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createMainWindow):
+ (TestShell::~TestShell):
+ (TestShell::showDevTools):
+ (TestShell::closeDevTools):
+ (TestShell::dump):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setWindowRect):
+ (WebViewHost::setDeviceScaleFactor):
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-14 Tony Chang <tony@chromium.org>
+
+ Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
+ https://bugs.webkit.org/show_bug.cgi?id=96934
+
+ * CLWrapper/CLWrapper.sln: Modified property svn:eol-style.
+ * DumpRenderTree/DumpRenderTree.sln: Modified property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherCommon.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherDebug.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherDebugAll.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherDebugCairoCFLite.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherProduction.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherRelease.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/DumpRenderTreeLauncherReleaseCairoCFLite.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherCommon.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherDebug.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherDebugAll.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherDebugCairoCFLite.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherProduction.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherRelease.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffLauncherReleaseCairoCFLite.vsprops: Added property svn:eol-style.
+ * DumpRenderTree/win/ImageDiffWinCairoCommon.vsprops: Added property svn:eol-style.
+ * MIDLWrapper/MIDLWrapper.sln: Modified property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherCommon.vsprops: Added property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherDebug.vsprops: Added property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherDebugAll.vsprops: Added property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherDebugCairoCFLite.vsprops: Added property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherProduction.vsprops: Added property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherRelease.vsprops: Added property svn:eol-style.
+ * MiniBrowser/Configurations/MiniBrowserLauncherReleaseCairoCFLite.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPICFNetwork.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPIDebug.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPIDebugAll.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPIDebugCairoCFLite.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPIInjectedBundleCommon.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPIRelease.vsprops: Added property svn:eol-style.
+ * TestWebKitAPI/Configurations/TestWebKitAPIReleaseCairoCFLite.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/Configurations/WebKitTestRunnerCoreGraphics.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/WebKitTestRunner.sln: Modified property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherCommon.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherDebug.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherDebugAll.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherDebugCairoCFLite.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherProduction.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherRelease.vsprops: Added property svn:eol-style.
+ * WebKitTestRunner/win/WebKitTestRunnerLauncherReleaseCairoCFLite.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherCommon.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherDebug.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherDebugAll.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherDebugCairoCFLite.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherProduction.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherRelease.vsprops: Added property svn:eol-style.
+ * WinLauncher/WinLauncherLauncherReleaseCairoCFLite.vsprops: Added property svn:eol-style.
+
+2013-02-14 Tony Chang <tony@chromium.org>
+
+ Unreviewed, set svn:eol-style CRLF for .sln files.
+
+ * CLWrapper/CLWrapper.sln: Modified property svn:eol-style.
+ * DumpRenderTree/DumpRenderTree.sln: Modified property svn:eol-style.
+ * MIDLWrapper/MIDLWrapper.sln: Modified property svn:eol-style.
+ * WebKitTestRunner/WebKitTestRunner.sln: Modified property svn:eol-style.
+
+2013-02-14 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Errors when building WebKit2 with Clang
+ https://bugs.webkit.org/show_bug.cgi?id=109603
+
+ Reviewed by Alexey Proskuryakov.
+
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+ (WTR::PlatformWebView::resizeTo): Cast the width and height parameters to the integer
+ type when constructing the GtkAllocation.
+
+ * CLWrapper/CLWrapper.sln: Modified property svn:eol-style.
+ * DumpRenderTree/DumpRenderTree.sln: Modified property svn:eol-style.
+ * MIDLWrapper/MIDLWrapper.sln: Modified property svn:eol-style.
+ * WebKitTestRunner/WebKitTestRunner.sln: Modified property svn:eol-style.
+
+2013-02-14 Roger Fong <roger_fong@apple.com>
+
+ Add eol-style=native to solution files. Add a new solution file.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln: Added property svn:eol-style.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj: Added property svn:eol-style. Modified property svn:ignore.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln: Added.
+
+2013-02-14 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ [GTK] Missing call to g_object_ref while retrieving accessible table cells
+ https://bugs.webkit.org/show_bug.cgi?id=106903
+
+ Reviewed by Martin Robinson.
+
+ Both DRT and WKTR need to call g_object_unref() now that an extra
+ reference is added in the implementation of atk_table_ref_at().
+
+ * DumpRenderTree/atk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::cellForColumnAndRow): Call g_object_unref
+ before returning the new instance of AccessibilityUIElement.
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::cellForColumnAndRow): Ditto.
+
+2013-02-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r142841.
+ http://trac.webkit.org/changeset/142841
+ https://bugs.webkit.org/show_bug.cgi?id=109791
+
+ Caused webkit_unit_tests to crash on chromium bots. (Requested
+ by atwilson_ on #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createOutputSurface):
+ (WebViewHost::initializeLayerTreeView):
+
+2013-02-13 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][jhbuild] Silence GSettings-related warning.
+ https://bugs.webkit.org/show_bug.cgi?id=109749
+
+ Reviewed by Martin Robinson.
+
+ Apply the same change done to the GTK+ port in r109127; this
+ silences the warnings printed by glib about the memory GSettings
+ backend being used.
+
+ Not only does this make the bots (as well as manual runs of, say,
+ WebKitTestRunner) much more silent, but it also removes an stderr
+ line (which run-perf-tests considers as a failure).
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.setup_environ_for_server): Explicitly set the
+ GSETTINGS_BACKEND environment variable to "memory".
+
+2013-02-14 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move mock notification presenter to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109706
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner::WebTestProxy::notificationPresenter):
+ * DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.cpp: Renamed from Tools/DumpRenderTree/chromium/NotificationPresenter.cpp.
+ (WebTestRunner::NotificationPresenter::NotificationPresenter):
+ (WebTestRunner):
+ (WebTestRunner::NotificationPresenter::~NotificationPresenter):
+ (WebTestRunner::NotificationPresenter::grantPermission):
+ (WebTestRunner::NotificationPresenter::simulateClick):
+ (WebTestRunner::NotificationPresenter::show):
+ (WebTestRunner::NotificationPresenter::cancel):
+ (WebTestRunner::NotificationPresenter::objectDestroyed):
+ (WebTestRunner::NotificationPresenter::checkPermission):
+ (WebTestRunner::NotificationPresenter::requestPermission):
+ * DumpRenderTree/chromium/TestRunner/src/NotificationPresenter.h: Renamed from Tools/DumpRenderTree/chromium/NotificationPresenter.h.
+ (WebTestRunner):
+ (NotificationPresenter):
+ (WebTestRunner::NotificationPresenter::setDelegate):
+ (WebTestRunner::NotificationPresenter::reset):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::setDelegate):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::notificationPresenter):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::grantWebNotificationPermission):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebKit):
+ (WebTestRunner):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::notificationPresenter):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ (TestShell::resetTestController):
+ * DumpRenderTree/chromium/TestShell.h:
+ (WebKit):
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-02-13 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Add separate DumpRenderTree VS2010 solution file.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj: Added property svn:ignore.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln: Added.
+
+2013-02-12 James Robinson <jamesr@chromium.org>
+
+ [chromium] Request WebLayerTreeView for DumpRenderTree via explicit testing path
+ https://bugs.webkit.org/show_bug.cgi?id=109634
+
+ Reviewed by Adrienne Walker.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createOutputSurface):
+ (WebViewHost::initializeLayerTreeView):
+
+2013-02-13 David Farler <dfarler@apple.com>
+
+ TestWebKitAPI fails to build for iphonesimulator: 'CFNetwork/CFNetworkDefs.h' file not found
+ https://bugs.webkit.org/show_bug.cgi?id=109766
+
+ Reviewed by David Kilzer.
+
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ - Don't search Mac OS X header search paths when building on iOS
+
+2013-02-13 Zan Dobersek <zdobersek@igalia.com>
+
+ The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
+ https://bugs.webkit.org/show_bug.cgi?id=109325
+
+ Reviewed by Anders Carlsson.
+
+ Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
+ two methods as they're provided by the C++ standard library being used.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (setAppCacheMaximumSizeCallback):
+ (setApplicationCacheOriginQuotaCallback):
+ (setDatabaseQuotaCallback):
+
+2013-02-13 Alan Cutter <alancutter@chromium.org>
+
+ cr-linux debug should use clang and maybe be a components build
+ https://bugs.webkit.org/show_bug.cgi?id=108512
+
+ Reviewed by Adam Barth.
+
+ Modified GCE cr-linux-debug-ews bot build scripts to configure clang over gcc for build performance.
+ Build bots will update clang with each bot cycle.
+ Updated GCE image paths to suit gcutil 1.6.1.
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/GoogleComputeEngine/build-cr-linux-debug-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:
+ * EWSTools/configure-clang-linux.sh: Copied from Tools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh.
+ * EWSTools/start-queue.sh:
+
+2013-02-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r142747.
+ http://trac.webkit.org/changeset/142747
+ https://bugs.webkit.org/show_bug.cgi?id=109746
+
+ broke component build (Requested by alecf_gardening on
+ #webkit).
+
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Removed.
+
+2013-02-13 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] fix TestRunner build with enable_webrtc=0
+ https://bugs.webkit.org/show_bug.cgi?id=109700
+
+ Reviewed by Tony Chang.
+
+ We can't use ENABLE() macros in the TestRunner library, however,
+ ENABLE_WEBRTC is defined by build/common.gypi, so we can use it.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockConstraints.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDTMFSenderHandler.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDataChannelHandler.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::userMediaClient):
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.cpp:
+
+2013-02-12 Roger Fong <roger_fong@apple.com>
+
+ TestWebKitAPI and record-memory projects and property sheets for VS2010.
+ https://bugs.webkit.org/show_bug.cgi?id=107034
+
+ Reviewed by Brent Fulgham.
+
+ * TestWebKitAPI/TestWebKitAPI.vcxproj: Added.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj: Added.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters: Added.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPostBuild.cmd: Copied from Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd.
+ * TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd: Copied from Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd.
+ * win/record-memory: Added.
+ * win/record-memory/main.cpp: Copied from Tools/record-memory-win/main.cpp.
+ * win/record-memory/record-memory.vcxproj: Added.
+ * win/record-memory/record-memory.vcxproj.filters: Added.
+ * win/record-memory/record-memoryCommon.props: Added.
+ * win/record-memory/record-memoryDebug.props: Added.
+ * win/record-memory/record-memoryRelease.props: Added.
+
+2013-02-13 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Use the source id when creating new tracks
+ https://bugs.webkit.org/show_bug.cgi?id=109688
+
+ Reviewed by Adam Barth.
+
+ Switching mock to new API.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.cpp:
+ (WebTestRunner::WebUserMediaClientMock::requestUserMedia):
+
+2013-02-13 Brent Fulgham <bfulgham@webkit.org>
+
+ [Windows] Unreviewed VS2010 fix to add $(ConfigurationBuildDir)/private
+ to include paths, to match VS2005 build behavior.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props:
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props:
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props:
+
+2013-02-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r142736.
+ http://trac.webkit.org/changeset/142736
+ https://bugs.webkit.org/show_bug.cgi?id=109716
+
+ Broke ABI, nightly builds crash on launch (Requested by ap on
+ #webkit).
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions):
+
+2013-02-13 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][EFL][WTR] Regression(r141836): WTR crashes on exit
+ https://bugs.webkit.org/show_bug.cgi?id=109456
+
+ Reviewed by Anders Carlsson.
+
+ WebView instance must not live longer than EwkView, as EwkView owns
+ objects that page proxy refers to, doing otherwise leads to a crash.
+
+ Test controller has own ptr containing WebView. Invoking of ewk_shutdown()
+ leads to evas objects deletion. So, the problem was that test controller was
+ deleted after ewk_shutdown() had been called in main() function causing
+ crashes on WTR exit.
+
+ The patch introduces a scope for test controller so that it is deleted first.
+
+ * WebKitTestRunner/efl/main.cpp:
+ (main):
+
+2013-02-13 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
+ https://bugs.webkit.org/show_bug.cgi?id=109554
+
+ In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
+ can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
+
+ Drive by fix: I introduced a client interface for the HeapGraphSerializer.
+ It helps me to do the tests for the serializer.
+
+ Reviewed by Yury Semikhatsky.
+
+ It is covered by newly added tests in TestWebKitAPI.
+
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Added.
+ (TestWebKitAPI):
+ (HeapGraphReceiver):
+ (TestWebKitAPI::HeapGraphReceiver::HeapGraphReceiver):
+ (TestWebKitAPI::HeapGraphReceiver::printGraph):
+ (TestWebKitAPI::HeapGraphReceiver::dumpNodes):
+ (TestWebKitAPI::HeapGraphReceiver::dumpEdges):
+ (TestWebKitAPI::HeapGraphReceiver::dumpBaseToRealNodeId):
+ (TestWebKitAPI::HeapGraphReceiver::dumpStrings):
+ (TestWebKitAPI::HeapGraphReceiver::serializer):
+ (TestWebKitAPI::HeapGraphReceiver::chunkPart):
+ (TestWebKitAPI::HeapGraphReceiver::dumpPart):
+ (TestWebKitAPI::HeapGraphReceiver::stringValue):
+ (TestWebKitAPI::HeapGraphReceiver::intValue):
+ (TestWebKitAPI::HeapGraphReceiver::nodeToString):
+ (TestWebKitAPI::HeapGraphReceiver::edgeToString):
+ (TestWebKitAPI::HeapGraphReceiver::printNode):
+ (Helper):
+ (TestWebKitAPI::Helper::Helper):
+ (TestWebKitAPI::Helper::addNode):
+ (TestWebKitAPI::Helper::addEdge):
+ (TestWebKitAPI::Helper::done):
+ (Object):
+ (TestWebKitAPI::Helper::Object::Object):
+ (TestWebKitAPI::TEST):
+ (Owner):
+ (TestWebKitAPI::Owner::Owner):
+ (TestWebKitAPI::Owner::reportMemoryUsage):
+
+2013-02-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [WK2] Remove web intents callbacks
+ https://bugs.webkit.org/show_bug.cgi?id=109654
+
+ Reviewed by Benjamin Poulain.
+
+ Web intents was removed by r142549.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions):
+
+2013-02-12 Adenilson Cavalcanti <cavalcantii@gmail.com>
+
+ [WK2] Page reloading will crash UIProcess after WebProcess was killed
+ https://bugs.webkit.org/show_bug.cgi?id=109305
+
+ Reviewed by Benjamin Poulain.
+
+ Adding a new test to simulate the case of WebProcess crash followed by a trying
+ to load a new page.
+
+ * TestWebKitAPI/GNUmakefile.am:
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::didFinishLoad):
+ (TestWebKitAPI::TEST):
+
+2013-02-11 Brent Fulgham <bfulgham@webkit.org>
+
+ Update WebKitDirs.pm for new Windows paths
+ https://bugs.webkit.org/show_bug.cgi?id=107714
+
+ Reviewed by Daniel Bates.
+
+ * Scripts/webkitdirs.pm: For each existing Windows environment
+ variable, also include creation of the 'new' variables. The
+ 'old' variables will be removed in a future update.
+ (windowsSourceSourceDir): New helper routine to return the
+ actual 'Source' folder of the WebKit source tree.
+
+2013-02-12 Alec Flett <alecflett@chromium.org>
+
+ Fix signedness in WebTestProxy
+ https://bugs.webkit.org/show_bug.cgi?id=109623
+
+ Reviewed by Adam Barth.
+
+ Fix signedness problem, using size_t instead of int.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+
+2013-02-12 Raymond Toy <rtoy@google.com>
+
+ Add alias
+ https://bugs.webkit.org/show_bug.cgi?id=109621
+
+ No review needed.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-12 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move text dump generation to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109575
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ (WebTestRunner::WebTestDelegate::captureHistoryForWindow):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestCommon.h.
+ (WebTestRunner::normalizeLayoutTestURL):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::checkResponseMimeType):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::shouldDumpAsText):
+ (WebTestRunner::TestRunner::shouldGeneratePixelResults):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::captureTree):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump):
+ (TestShell::captureHistoryForWindow):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::captureHistoryForWindow):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-02-12 Jessie Berlin <jberlin@apple.com>
+
+ Rollout r142618, it broke all the Mac builds.
+
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Removed.
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+
+2013-02-12 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Fix Chromium compilation after r142618.
+
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp:
+ (TestWebKitAPI::HeapGraphReceiver::printNode):
+
+2013-02-12 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Add an optional moduleset with hard to get packages (including libsecret)
+ https://bugs.webkit.org/show_bug.cgi?id=109195
+
+ Reviewed by Philippe Normand.
+
+ Add an optional moduleset that includes libsecret. This moduleset will
+ be used to install some annoyingly hard to obtain dependencies on older
+ distributions.
+
+ * gtk/jhbuild-optional.modules: Added.
+ * gtk/jhbuild.modules: Add a reference to the new moduleset file.
+
+2013-02-12 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
+ https://bugs.webkit.org/show_bug.cgi?id=109554
+
+ In some cases leaves have no pointer. As example when we report a leaf via addPrivateBuffer.
+ This patch has new set of tests for HeapGraphSerializer.
+
+ Reviewed by Yury Semikhatsky.
+
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebCore/HeapGraphSerializerTest.cpp: Added.
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+
+2013-02-12 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed followup to r142606, the EFL port also enables the CSS image-set
+ feature so the new configuration option's default value should reflect that.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-02-12 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Enable CSS Variables feature in development builds
+ https://bugs.webkit.org/show_bug.cgi?id=109474
+
+ Reviewed by Martin Robinson.
+
+ * Scripts/webkitperl/FeatureList.pm: Enable the feature on development
+ builds of the GTK port.
+
+2013-02-12 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Enable CSS image-set support in development builds
+ https://bugs.webkit.org/show_bug.cgi?id=109475
+
+ Reviewed by Martin Robinson.
+
+ * Scripts/webkitperl/FeatureList.pm: Add the configuration option for the feature.
+ Note that the Mac port also enables the feature but does so in Platform.h as the feature
+ is also enabled for the iOS port which can't at the moment be detected via webkitperl.
+
+2013-02-12 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Enable DOM4 events constructors in development builds
+ https://bugs.webkit.org/show_bug.cgi?id=109471
+
+ Reviewed by Martin Robinson.
+
+ * Scripts/webkitperl/FeatureList.pm: Enable the feature for the GTK port as well.
+
+2013-02-12 Zan Dobersek <zdobersek@igalia.com>
+
+ Remove unnecessary variables from FeatureList.pm
+ https://bugs.webkit.org/show_bug.cgi?id=109558
+
+ Reviewed by Daniel Bates.
+
+ A small cleanup, removing unused variables for which the related configuration
+ options were already removed.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-02-12 Zan Dobersek <zdobersek@igalia.com>
+
+ Remove ENABLE_XHR_RESPONSE_BLOB handling from various build systems
+ https://bugs.webkit.org/show_bug.cgi?id=109481
+
+ Reviewed by Daniel Bates.
+
+ The ENABLE_XHR_RESPONSE_BLOB feature define was removed from the code
+ back in r120574. There are still occurrences of it in various build systems
+ which should all be removed as they are useless.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-02-12 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move webrtc mocks to testrunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109041
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (WebKitSupportTestEnvironment):
+ (WebKitSupportTestEnvironment::mockPlatform):
+ (main):
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp:
+ (MockWebKitPlatformSupport::setInterfaces):
+ (MockWebKitPlatformSupport::createMediaStreamCenter):
+ (MockWebKitPlatformSupport::createRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/MockWebKitPlatformSupport.h:
+ (WebTestRunner):
+ (MockWebKitPlatformSupport):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxy::showContextMenu):
+ (WebTestRunner::WebTestProxy::userMediaClient):
+ * DumpRenderTree/chromium/TestRunner/src/MockConstraints.cpp: Renamed from Tools/DumpRenderTree/chromium/MockConstraints.cpp.
+ (WebTestRunner::MockConstraints::verifyConstraints):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockConstraints.h: Renamed from Tools/DumpRenderTree/chromium/MockConstraints.h.
+ (WebKit):
+ (WebTestRunner):
+ (MockConstraints):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.cpp: Renamed from Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp.
+ (WebTestRunner):
+ (WebTestRunner::MockWebMediaStreamCenter::MockWebMediaStreamCenter):
+ (WebTestRunner::MockWebMediaStreamCenter::queryMediaStreamSources):
+ (WebTestRunner::MockWebMediaStreamCenter::didEnableMediaStreamTrack):
+ (WebTestRunner::MockWebMediaStreamCenter::didDisableMediaStreamTrack):
+ (WebTestRunner::MockWebMediaStreamCenter::didAddMediaStreamTrack):
+ (WebTestRunner::MockWebMediaStreamCenter::didRemoveMediaStreamTrack):
+ (WebTestRunner::MockWebMediaStreamCenter::didStopLocalMediaStream):
+ (MockWebAudioDestinationConsumer):
+ (WebTestRunner::MockWebAudioDestinationConsumer::~MockWebAudioDestinationConsumer):
+ (WebTestRunner::MockWebMediaStreamCenter::didCreateMediaStream):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebMediaStreamCenter.h: Renamed from Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h.
+ (WebKit):
+ (WebTestRunner):
+ (MockWebMediaStreamCenter):
+ (WebTestRunner::MockWebMediaStreamCenter::MockWebMediaStreamCenter):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDTMFSenderHandler.cpp: Renamed from Tools/DumpRenderTree/chromium/MockWebRTCDTMFSenderHandler.cpp.
+ (WebTestRunner):
+ (DTMFSenderToneTask):
+ (WebTestRunner::DTMFSenderToneTask::DTMFSenderToneTask):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::MockWebRTCDTMFSenderHandler):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::setClient):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::currentToneBuffer):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::canInsertDTMF):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::insertDTMF):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDTMFSenderHandler.h: Renamed from Tools/DumpRenderTree/chromium/MockWebRTCDTMFSenderHandler.h.
+ (WebTestRunner):
+ (MockWebRTCDTMFSenderHandler):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::taskList):
+ (WebTestRunner::MockWebRTCDTMFSenderHandler::clearToneBuffer):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDataChannelHandler.cpp: Renamed from Tools/DumpRenderTree/chromium/MockWebRTCDataChannelHandler.cpp.
+ (WebTestRunner):
+ (DataChannelReadyStateTask):
+ (WebTestRunner::DataChannelReadyStateTask::DataChannelReadyStateTask):
+ (WebTestRunner::MockWebRTCDataChannelHandler::MockWebRTCDataChannelHandler):
+ (WebTestRunner::MockWebRTCDataChannelHandler::setClient):
+ (WebTestRunner::MockWebRTCDataChannelHandler::bufferedAmount):
+ (WebTestRunner::MockWebRTCDataChannelHandler::sendStringData):
+ (WebTestRunner::MockWebRTCDataChannelHandler::sendRawData):
+ (WebTestRunner::MockWebRTCDataChannelHandler::close):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCDataChannelHandler.h: Renamed from Tools/DumpRenderTree/chromium/MockWebRTCDataChannelHandler.h.
+ (WebTestRunner):
+ (MockWebRTCDataChannelHandler):
+ (WebTestRunner::MockWebRTCDataChannelHandler::taskList):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.cpp: Renamed from Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp.
+ (WebTestRunner):
+ (RTCSessionDescriptionRequestSuccededTask):
+ (WebTestRunner::RTCSessionDescriptionRequestSuccededTask::RTCSessionDescriptionRequestSuccededTask):
+ (RTCSessionDescriptionRequestFailedTask):
+ (WebTestRunner::RTCSessionDescriptionRequestFailedTask::RTCSessionDescriptionRequestFailedTask):
+ (RTCStatsRequestSucceededTask):
+ (WebTestRunner::RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
+ (RTCVoidRequestTask):
+ (WebTestRunner::RTCVoidRequestTask::RTCVoidRequestTask):
+ (RTCPeerConnectionStateTask):
+ (WebTestRunner::RTCPeerConnectionStateTask::RTCPeerConnectionStateTask):
+ (RemoteDataChannelTask):
+ (WebTestRunner::RemoteDataChannelTask::RemoteDataChannelTask):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::initialize):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::createOffer):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::createAnswer):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::setLocalDescription):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::setRemoteDescription):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::localDescription):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::remoteDescription):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::updateICE):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::addICECandidate):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::addStream):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::removeStream):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::getStats):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::createDataChannel):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::createDTMFSender):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::stop):
+ * DumpRenderTree/chromium/TestRunner/src/MockWebRTCPeerConnectionHandler.h: Renamed from Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h.
+ (WebKit):
+ (WebTestRunner):
+ (MockWebRTCPeerConnectionHandler):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::taskList):
+ (WebTestRunner::MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ (WebTestRunner::TestInterfaces::setDelegate):
+ (WebTestRunner::TestInterfaces::delegate):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::createMediaStreamCenter):
+ (WebTestRunner):
+ (WebTestRunner::WebTestInterfaces::createWebRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::userMediaClient):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.cpp: Renamed from Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp.
+ (WebTestRunner):
+ (UserMediaRequestTask):
+ (WebTestRunner::UserMediaRequestTask::UserMediaRequestTask):
+ (MockExtraData):
+ (WebTestRunner::WebUserMediaClientMock::WebUserMediaClientMock):
+ (WebTestRunner::WebUserMediaClientMock::requestUserMedia):
+ (WebTestRunner::WebUserMediaClientMock::cancelUserMediaRequest):
+ * DumpRenderTree/chromium/TestRunner/src/WebUserMediaClientMock.h: Renamed from Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h.
+ (WebTestRunner):
+ (WebUserMediaClientMock):
+ (WebTestRunner::WebUserMediaClientMock::~WebUserMediaClientMock):
+ (WebTestRunner::WebUserMediaClientMock::taskList):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-11 Timothy Loh <timloh@chromium.com>
+
+ webkit-patch upload regenerates the WebCore ChangeLog every time it's called
+ https://bugs.webkit.org/show_bug.cgi?id=108983
+
+ Reviewed by Ryosuke Niwa.
+
+ This patch puts the behaviour from Bug 74358 behind the flag (default=OFF)
+ `--update-changelogs', and removes the flag `--no-prepare-changelogs'.
+ The flag name change from prepare to update is since we still want to
+ prepare changelogs in the default case when none currently exist.
+
+ * Scripts/webkitpy/tool/commands/commandtest.py:
+ (CommandsTest.assert_execute_outputs):
+ * Scripts/webkitpy/tool/steps/options.py:
+ (Options):
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog.options):
+ (PrepareChangeLog.run):
+
+2013-02-11 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move printPage() implementation to testRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109436
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner::WebTestProxy::showContextMenu):
+ (WebTestRunner::WebTestProxy::printPage):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::printPage):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-02-11 James Robinson <jamesr@chromium.org>
+
+ [Chromium] Get rid of WebAnimationController
+ https://bugs.webkit.org/show_bug.cgi?id=109235
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-02-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface
+ https://bugs.webkit.org/show_bug.cgi?id=109534
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/gtk/EditingCallbacks.cpp:
+ (shouldShowDeleteInterfaceForElement):
+
+2013-02-11 Nico Weber <thakis@chromium.org>
+
+ Remove web intents code
+ https://bugs.webkit.org/show_bug.cgi?id=109501
+
+ Reviewed by Eric Seidel.
+
+ See thread "Removing ENABLE(WEB_INTENTS) code" on webkit-dev.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner::WebTestProxy::didEndEditing):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-02-11 Benjamin Poulain <benjamin@webkit.org>
+
+ Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings
+ https://bugs.webkit.org/show_bug.cgi?id=109349
+
+ Reviewed by Sam Weinig.
+
+ Get rid of TestRunner's setMinimumTimerInterval and all the related functions.
+
+ This also fixes an oddity:
+ TestRunners were initialized with a minimum timer interval of 10 milliseconds instead
+ of using the default value. All with the same copy of an outdated comment.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::reset):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2013-02-11 Dean Jackson <dino@apple.com>
+
+ Remove use of plugInStartLabelImage
+ https://bugs.webkit.org/show_bug.cgi?id=108273
+
+ Reviewed by Simon Fraser.
+
+ Take two - after rollout in r142405.
+ Removed plugInStartLabelImage entry from client structure.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+
+2013-02-11 Tony Chang <tony@chromium.org>
+
+ Move setFrameFlatteningEnabled from layoutTestController to window.internals.settings
+ https://bugs.webkit.org/show_bug.cgi?id=87149
+
+ Reviewed by Simon Fraser.
+
+ Remove testRunner.setFrameFlatteningEnabled from DRT and WTR. WebKit API
+ methods are left because there may be users of it. Add a test for Apple Mac
+ to ensure that the API for the preference still works using overridePreference.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2013-02-11 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Windows 7 Debug mode build fix.
+
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+
+2013-02-11 Tiancheng Jiang <tijiang@rim.com>
+
+ [BlackBerry] Set mouse document position for mouse event in DRT.
+ https://bugs.webkit.org/show_bug.cgi?id=109094.
+
+ Reviewed by Rob Buis.
+
+ RIM PR 246976.
+ Internally Reviewed by Nima Ghanavatian & Genevieve Mak.
+
+ Set mouse document position when we create mouse event in DRT.
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (setMouseEventDocumentPos):
+ (mouseDownCallback):
+ (mouseUpCallback):
+ (mouseMoveToCallback):
+
+2013-02-11 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Add graphics subdirectory to include path.
+ https://bugs.webkit.org/show_bug.cgi?id=109437
+
+ Reviewed by Rob Buis.
+
+ Add browser/platform/graphics to include path.
+
+ Internal review by Jeff Rogers.
+
+ * Scripts/webkitdirs.pm:
+ (blackberryCMakeArguments):
+
+2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ [EFL][WKTR] Regression(r141836) fast/dom/Window/mozilla-focus-blur.html started failing
+ https://bugs.webkit.org/show_bug.cgi?id=109438
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Some refactoring in r141836 caused the view not to get focus if the focused
+ frame is not the main one. The idea of the code was to remove focus from the
+ view if the focused frame was not the main one, and then focus the view again.
+ However, after the refactoring, the second step never happened: Focus was
+ removed but not given again.
+
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::focus):
+
+2013-02-11 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Don't generate documentation if building neither WebKit1 nor WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=109420
+
+ Reviewed by Philippe Normand.
+
+ Don't generate the GTK documentation if neither of the WebKit1 and WebKit2
+ layers was built. This just results in unnecessary errors being spewed out
+ by the gtkdoc utilities.
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject):
+
+2013-02-11 Antoine Quint <graouts@apple.com>
+
+ Unreviewed change to add myself to the Inspector IDLs watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-11 Krzysztof Czech <k.czech@samsung.com>
+
+ [GTK][EFL] Shares WebKit-GTK's DumpRenderTree accessibility implementation with other Webkit ports
+ https://bugs.webkit.org/show_bug.cgi?id=105007
+
+ Reviewed by Martin Robinson.
+
+ Shares specific ATK's accessibility implementation.
+ Keeps platform specific methods in EFL and GTK's directories.
+
+ * DumpRenderTree/atk/AccessibilityCallbacks.h: Renamed from Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h.
+ * DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp: Renamed from Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp.
+ (printAccessibilityEvent):
+ (axObjectEventListener):
+ (connectAccessibilityCallbacks):
+ (disconnectAccessibilityCallbacks):
+ * DumpRenderTree/atk/AccessibilityControllerAtk.cpp: Copied from Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp.
+ (AccessibilityController::AccessibilityController):
+ (AccessibilityController::~AccessibilityController):
+ (AccessibilityController::elementAtPoint):
+ (AccessibilityController::setLogFocusEvents):
+ (AccessibilityController::setLogScrollingStartEvents):
+ (AccessibilityController::setLogValueChangeEvents):
+ (AccessibilityController::setLogAccessibilityEvents):
+ (AccessibilityController::addNotificationListener):
+ (AccessibilityController::removeNotificationListener):
+ * DumpRenderTree/atk/AccessibilityUIElementAtk.cpp: Copied from Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp.
+ (coreAttributeToAtkAttribute):
+ (roleToString):
+ (replaceCharactersForResults):
+ (AccessibilityUIElement::AccessibilityUIElement):
+ (AccessibilityUIElement::~AccessibilityUIElement):
+ (AccessibilityUIElement::getLinkedUIElements):
+ (AccessibilityUIElement::getDocumentLinks):
+ (AccessibilityUIElement::getChildren):
+ (AccessibilityUIElement::getChildrenWithRange):
+ (AccessibilityUIElement::rowCount):
+ (AccessibilityUIElement::columnCount):
+ (AccessibilityUIElement::childrenCount):
+ (AccessibilityUIElement::elementAtPoint):
+ (AccessibilityUIElement::linkedUIElementAtIndex):
+ (AccessibilityUIElement::getChildAtIndex):
+ (AccessibilityUIElement::indexOfChild):
+ (attributeSetToString):
+ (AccessibilityUIElement::allAttributes):
+ (AccessibilityUIElement::attributesOfLinkedUIElements):
+ (AccessibilityUIElement::attributesOfDocumentLinks):
+ (AccessibilityUIElement::titleUIElement):
+ (AccessibilityUIElement::parentElement):
+ (AccessibilityUIElement::attributesOfChildren):
+ (AccessibilityUIElement::parameterizedAttributeNames):
+ (AccessibilityUIElement::role):
+ (AccessibilityUIElement::subrole):
+ (AccessibilityUIElement::roleDescription):
+ (AccessibilityUIElement::title):
+ (AccessibilityUIElement::description):
+ (AccessibilityUIElement::stringValue):
+ (AccessibilityUIElement::language):
+ (AccessibilityUIElement::x):
+ (AccessibilityUIElement::y):
+ (AccessibilityUIElement::width):
+ (AccessibilityUIElement::height):
+ (AccessibilityUIElement::clickPointX):
+ (AccessibilityUIElement::clickPointY):
+ (AccessibilityUIElement::orientation):
+ (AccessibilityUIElement::intValue):
+ (AccessibilityUIElement::minValue):
+ (AccessibilityUIElement::maxValue):
+ (AccessibilityUIElement::valueDescription):
+ (checkElementState):
+ (AccessibilityUIElement::isEnabled):
+ (AccessibilityUIElement::insertionPointLineNumber):
+ (AccessibilityUIElement::isPressActionSupported):
+ (AccessibilityUIElement::isIncrementActionSupported):
+ (AccessibilityUIElement::isDecrementActionSupported):
+ (AccessibilityUIElement::isRequired):
+ (AccessibilityUIElement::isFocused):
+ (AccessibilityUIElement::isSelected):
+ (AccessibilityUIElement::hierarchicalLevel):
+ (AccessibilityUIElement::ariaIsGrabbed):
+ (AccessibilityUIElement::ariaDropEffects):
+ (AccessibilityUIElement::isExpanded):
+ (AccessibilityUIElement::isChecked):
+ (AccessibilityUIElement::attributesOfColumnHeaders):
+ (AccessibilityUIElement::attributesOfRowHeaders):
+ (AccessibilityUIElement::attributesOfColumns):
+ (AccessibilityUIElement::attributesOfRows):
+ (AccessibilityUIElement::attributesOfVisibleCells):
+ (AccessibilityUIElement::attributesOfHeader):
+ (AccessibilityUIElement::indexInTable):
+ (indexRangeInTable):
+ (AccessibilityUIElement::rowIndexRange):
+ (AccessibilityUIElement::columnIndexRange):
+ (AccessibilityUIElement::lineForIndex):
+ (AccessibilityUIElement::boundsForRange):
+ (AccessibilityUIElement::stringForRange):
+ (AccessibilityUIElement::attributedStringForRange):
+ (AccessibilityUIElement::attributedStringRangeIsMisspelled):
+ (AccessibilityUIElement::uiElementForSearchPredicate):
+ (AccessibilityUIElement::cellForColumnAndRow):
+ (AccessibilityUIElement::selectedTextRange):
+ (AccessibilityUIElement::setSelectedTextRange):
+ (AccessibilityUIElement::stringAttributeValue):
+ (AccessibilityUIElement::numberAttributeValue):
+ (AccessibilityUIElement::boolAttributeValue):
+ (AccessibilityUIElement::isAttributeSettable):
+ (AccessibilityUIElement::isAttributeSupported):
+ (alterCurrentValue):
+ (AccessibilityUIElement::increment):
+ (AccessibilityUIElement::decrement):
+ (AccessibilityUIElement::press):
+ (AccessibilityUIElement::showMenu):
+ (AccessibilityUIElement::disclosedRowAtIndex):
+ (AccessibilityUIElement::ariaOwnsElementAtIndex):
+ (AccessibilityUIElement::ariaFlowToElementAtIndex):
+ (AccessibilityUIElement::selectedRowAtIndex):
+ (AccessibilityUIElement::rowAtIndex):
+ (AccessibilityUIElement::disclosedByRow):
+ (AccessibilityUIElement::accessibilityValue):
+ (AccessibilityUIElement::documentEncoding):
+ (AccessibilityUIElement::documentURI):
+ (AccessibilityUIElement::url):
+ (AccessibilityUIElement::addNotificationListener):
+ (AccessibilityUIElement::removeNotificationListener):
+ (AccessibilityUIElement::isFocusable):
+ (AccessibilityUIElement::isSelectable):
+ (AccessibilityUIElement::isMultiSelectable):
+ (AccessibilityUIElement::isSelectedOptionActive):
+ (AccessibilityUIElement::isVisible):
+ (AccessibilityUIElement::isOffScreen):
+ (AccessibilityUIElement::isCollapsed):
+ (AccessibilityUIElement::isIgnored):
+ (AccessibilityUIElement::hasPopup):
+ (AccessibilityUIElement::takeFocus):
+ (AccessibilityUIElement::takeSelection):
+ (AccessibilityUIElement::addSelection):
+ (AccessibilityUIElement::removeSelection):
+ (AccessibilityUIElement::scrollToMakeVisible):
+ (AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
+ (AccessibilityUIElement::scrollToGlobalPoint):
+ * DumpRenderTree/efl/CMakeLists.txt: Adds ATK headers, libraries, new sources.
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+ (AccessibilityController::focusedElement):
+ (AccessibilityController::rootElement):
+ (AccessibilityController::accessibleElementById):
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::helpText):
+ * GNUmakefile.am: Adds renamed sources.
+
+2013-02-11 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] clear the webcache from within the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109405
+
+ Reviewed by Kentaro Hara.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::resetAll):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::resetTestController):
+
+2013-02-11 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] add a destructor to EventSender
+ https://bugs.webkit.org/show_bug.cgi?id=109401
+
+ Reviewed by Kentaro Hara.
+
+ Otherwise, the compiler will automatically generate a destructor, for
+ which we need to unnecessarily include WebContextMenuData.h in the
+ header.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::~EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebKit):
+ (EventSender):
+
+2013-02-10 Tim Horton <timothy_horton@apple.com>
+
+ Unreviewed attempted build fix for Gtk after r142412
+
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+
+2013-02-10 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r142413.
+ http://trac.webkit.org/changeset/142413
+ https://bugs.webkit.org/show_bug.cgi?id=109383
+
+ didn't fix the gtk build (Requested by thorton on #webkit).
+
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+
+2013-02-10 Tim Horton <timothy_horton@apple.com>
+
+ Unreviewed attempted build fix for Gtk after r142412
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+
+2013-02-10 Tim Horton <timothy_horton@apple.com>
+
+ WKTR should propagate view creation options to opened windows
+ https://bugs.webkit.org/show_bug.cgi?id=109381
+
+ Reviewed by Simon Fraser.
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (WTR::PlatformWebView::options):
+ Add storage and a getter for PlatformWebView's creation options dictionary.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createOtherPage):
+ Propagate creation options from parent to child PlatformWebView when creating subwindows.
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ Store creation options on the PlatformWebView.
+
+2013-02-10 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, rolling out r142347.
+ http://trac.webkit.org/changeset/142347
+ https://bugs.webkit.org/show_bug.cgi?id=108273
+
+ Because a depending change r142343 was rolled out.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+
+2013-02-10 Kent Tamura <tkent@chromium.org>
+
+ [Chromium] Build fix for r142371
+ https://bugs.webkit.org/show_bug.cgi?id=109313
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebKit):
+
+2013-02-10 Zan Dobersek <zdobersek@igalia.com>
+
+ gtkdoc-scangobj throwing warnings when using Clang, causes generate-gtkdoc to fail
+ https://bugs.webkit.org/show_bug.cgi?id=109315
+
+ Reviewed by Philippe Normand.
+
+ * GNUmakefile.am: Define the CC environment variable to the CC compiler that the whole
+ project was configured to use. This ensures both the regular build and the gtkdoc-scangobj
+ program use the same compiler.
+ * gtk/generate-gtkdoc: Add '-Qunused-arguments' to the CFLAGS in case we're using Clang. This
+ forces Clang to suppress unused arguments warnings that can unnecessarily cause generate-gtkdoc
+ script to fail.
+
+2013-02-09 David Farler <dfarler@apple.com>
+
+ Make TestWebKitAPI work for iOS
+ https://bugs.webkit.org/show_bug.cgi?id=108978
+
+ Reviewed by Joseph Pecoraro.
+
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ Added back FRAMEWORK_SEARCH_PATHS for Lion builds.
+
+2013-02-09 David Farler <dfarler@apple.com>
+
+ Make TestWebKitAPI work for iOS
+ https://bugs.webkit.org/show_bug.cgi?id=108978
+
+ Reviewed by David Kilzer.
+
+ * Makefile: Added TestWebKitAPI to iOS MODULES list.
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ - Include FeatureDefines
+ - Removed VALID_ARCHS
+ - Removed FRAMEWORK_SEARCH_PATHS - allows building against other SDKs
+ - Excluded source files per platform
+ * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
+ - framework and library switches per platform
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ - Remove explicit framework and library linking (moved to xcconfigs)
+ - Added iOS main.mm
+ * TestWebKitAPI/config.h:
+ - Guard importing Cocoa.h and WebKit2_C.h on iOS
+ * TestWebKitAPI/ios/mainIOS.mm: Copied from Tools/TestWebKitAPI/mac/main.mm.
+ * TestWebKitAPI/mac/mainMac.mm: Renamed from Tools/TestWebKitAPI/mac/main.mm.
+
+2013-02-09 Justin Schuh <jschuh@chromium.org>
+
+ [CHROMIUM] Suppress c4267 build warnings for Win64 tests
+ https://bugs.webkit.org/show_bug.cgi?id=109359
+
+ Reviewed by Abhishek Arya.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2013-02-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add a link to EFL perf bot on build.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=109342
+
+ Reviewed by Gyuyoung Kim.
+
+ Added.
+
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2013-02-09 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ Unreviewed. Update my IRC nickname in committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-09 David Farler <dfarler@apple.com>
+
+ build-webkit: document sdk, debug, release, device, and simulator options
+ https://bugs.webkit.org/show_bug.cgi?id=109221
+
+ Reviewed by David Kilzer.
+
+ * Scripts/build-webkit: Add options to usage
+ * Scripts/webkitdirs.pm: Remove --deploy and --devel checks
+
+2013-02-09 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move context menu data tracking to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109313
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner::WebTestProxy::showContextMenu):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::setContextMenuData):
+ (WebTestRunner::EventSender::contextClick):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebKit):
+ (EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::showContextMenu):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::showContextMenu):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-09 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move methods that change initial testRunner state to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109043
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebKit):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::configureForTestWithURL):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebKit):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::showDevTools):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::showWebInspector):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::configureForTestWithURL):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+
+2013-02-09 Nico Weber <thakis@chromium.org>
+
+ Add myself as a reviewer. (Yay!!!!!)
+ https://bugs.webkit.org/show_bug.cgi?id=109110
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-08 Benjamin Poulain <bpoulain@apple.com>
+
+ Move workerThreadCount from TestRunner to WebCore Internals
+ https://bugs.webkit.org/show_bug.cgi?id=109239
+
+ Reviewed by Darin Adler.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticValues):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::webHistoryItemCount):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
+2013-02-08 Dean Jackson <dino@apple.com>
+
+ Remove use of plugInStartLabelImage
+ https://bugs.webkit.org/show_bug.cgi?id=108273
+
+ Reviewed by Simon Fraser.
+
+ Removed plugInStartLabelImage entry from client structure.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+
+2013-02-07 Timothy Hatcher <timothy@apple.com>
+
+ Fix the WebInspectorAPI watch list.
+
+ Reviewed by Joseph Pecoraro.
+
+ * Scripts/webkitpy/common/config/watchlist: Fix the regrexs.
+ Added InjectedScriptSource.js and Console.idl.
+
+2013-02-08 Roger Fong <roger_fong@apple.com>
+
+ DumpRenderTree, ImageDiff and TestNetscapePlugin projects, property sheets and resources for VS2010 solution.
+ https://bugs.webkit.org/show_bug.cgi?id=107034.
+
+ Reviewed by Brent Fulgham.
+
+ * DumpRenderTree/DumpRenderTree.vcxproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPostBuild.cmd: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def: Copied from DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc: Copied from DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPostBuild.cmd: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props: Added.
+ * DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/resource.h: Copied from DumpRenderTree/TestNetscapePlugIn/win/resource.h.
+ * DumpRenderTree/TestNetscapePlugIn/Tests/win/CallJSThatDestroysPlugin.cpp: Copied from DumpRenderTree/TestNetscapePlugIn/win/CallJSThatDestroysPlugin.cpp.
+ * DumpRenderTree/TestNetscapePlugIn/win/CallJSThatDestroysPlugin.cpp: Removed.
+
+2013-02-08 Harald Alvestrand <hta@google.com>
+
+ Fix and test for missing return
+
+ RTCPeerConnection.getStats() fails when remote stats are instantiated.
+ https://bugs.webkit.org/show_bug.cgi?id=109292
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::getStats):
+
+2013-02-08 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Removing the deprecated WebMediaStreamDescriptor and WebMediaStreamComponent shims
+ https://bugs.webkit.org/show_bug.cgi?id=109296
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/MockWebRTCDTMFSenderHandler.cpp:
+ (MockWebRTCDTMFSenderHandler::MockWebRTCDTMFSenderHandler):
+ * DumpRenderTree/chromium/MockWebRTCDTMFSenderHandler.h:
+ (MockWebRTCDTMFSenderHandler):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::createDTMFSender):
+
+2013-02-08 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Update my entries in the watchlist
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-08 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] copy normalizeLayoutTestURL code to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=109269
+
+ Reviewed by Kent Tamura.
+
+ The method doesn't have any external dependencies, so there's no reason
+ it should be on the delegate. It's still required by TestShell, however,
+ by making a copy, we can avoid implementing this in content shell.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.cpp:
+ (WebTestRunner::WebPermissions::allowImage):
+ (WebTestRunner::WebPermissions::allowScriptFromSource):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::windowCount):
+ * DumpRenderTree/chromium/TestShell.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-08 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL] Make the Performance bot also build WebKit.
+ https://bugs.webkit.org/show_bug.cgi?id=109273
+
+ Reviewed by Philippe Normand.
+
+ There has not been much benefit in fetching binaries compiled by
+ another bot; it makes the build bot take 6 to 7 minutes to upload
+ the binaries to build.webkit.org, we need to manually override
+ LD_LIBRARY_PATH to find the compiled libraries and still have
+ other path-related problems.
+
+ Since we have enough horsepower in the perf bot, let's experiment
+ with building WebKit there instead.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-02-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] turn TestRunner library into a component build
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ Reviewed by Adam Barth.
+
+ To achieve this, we need to drop all dependencies on WTF.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (WebTestRunner::MockGrammarCheck::checkGrammarOfString):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (WebTestRunner):
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::spellCheckWord):
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ (isASCIIAlpha):
+ (isNotASCIIAlpha):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+
+2013-02-07 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed followup to r142232.
+
+ Work around a bug in jhbuild that was incorrectly composing the source
+ package URL by adjusting slightly the repository and module paths.
+
+ * gtk/jhbuild.modules:
+
+2013-02-07 Zan Dobersek <zdobersek@igalia.com>
+
+ Use a mirror for the sourceware.org repo used in jhbuild
+
+ Unreviewed.
+
+ The ftp://sourceware.org site is down, causing errors when running jhbuild
+ and subsequently failing complete builds on the builders. Use the mirrors.kernel.org
+ mirror to get sources for the desired libffi dependency.
+
+ * gtk/jhbuild.modules:
+
+2013-02-07 David Farler <dfarler@apple.com>
+
+ Makefiles should work for arbitrary SDKs and architectures on Apple ports
+ https://bugs.webkit.org/show_bug.cgi?id=107863
+
+ Reviewed by Mark Rowe.
+
+ * DumpRenderTree/Makefile: SDKROOT=iphone* => -target All-iOS
+ * Makefile: Only build some projects for iOS
+
+2013-02-07 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Another temporary EWS bot fix. It'll totally work this time.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-02-07 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Fix syntax error in runtests.py.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-02-07 Roger Fong <roger_fong@apple.com>
+
+ Temporary fix for Win EWS bots.
+ Don't build DRT since it has already been built in the build step.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-02-07 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Cleanup command-line defines
+ https://bugs.webkit.org/show_bug.cgi?id=109213
+
+ Reviewed by Xan Lopez.
+
+ * TestWebKitAPI/config.h: Include the autotoolsconfig.h header to pick
+ up defines from autoconf.
+
+2013-02-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ git.svn_revision doesn't fetch the same revision as svn.svn_revision
+ https://bugs.webkit.org/show_bug.cgi?id=108684
+
+ Reviewed by Dirk Pranke.
+
+ Always call git log on the checkout root.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.svn_revision):
+
+2013-02-07 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Patch for testing Win EWS bots.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-02-07 Gavin Peters <gavinp@chromium.org>
+
+ Unreviewed, rolling out r142165.
+ http://trac.webkit.org/changeset/142165
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ Broke linux_aura builds.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ (WebTaskList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (MockGrammarCheck::checkGrammarOfString):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (append):
+ (isNotASCIIAlpha):
+ (MockSpellCheck::spellCheckWord):
+ (MockSpellCheck::initializeIfNeeded):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner):
+ (WebTestRunner::WebTaskList::WebTaskList):
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
+
+2013-02-07 Benjamin Poulain <bpoulain@apple.com>
+
+ Move pauseAnimation/pauseTransition from TestRunner to Internals
+ https://bugs.webkit.org/show_bug.cgi?id=109107
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
+2013-02-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] turn TestRunner library into a component build
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ Reviewed by Adam Barth.
+
+ To achieve this, we need to drop all dependencies on WTF.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (WebTestRunner::MockGrammarCheck::checkGrammarOfString):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (WebTestRunner):
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::spellCheckWord):
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ (isASCIIAlpha):
+ (isNotASCIIAlpha):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+
+2013-02-07 Eunmi Lee <eunmi15.lee@samsung.com>
+
+ Do not check enum's casing for WebKit2 C API.
+ https://bugs.webkit.org/show_bug.cgi?id=109128
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add "-readability/enum_casing" for WebKit2 C APIs because we use word
+ which starts with non-capital letter 'k' for types of enums.
+
+ * Scripts/webkitpy/style/checker.py:
+
+2013-02-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed warning fix.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (BuildAndTestFactory.__init__):
+ (DownloadAndPerfTestWebKit2Factory.__init__):
+
+2013-02-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed typo fix after r142121.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2013-02-07 Vivek Galatage <vivek.vg@samsung.com>
+
+ [Qt] QtTestBrowser should provide option to enable/disable Javascript
+ https://bugs.webkit.org/show_bug.cgi?id=107461
+
+ Reviewed by Jocelyn Turcotte.
+
+ Option to enable/disable Javascript would be handy option to test
+ certain functionalities of web pages with/without Javascript.
+
+ * QtTestBrowser/launcherwindow.cpp:
+ (LauncherWindow::createChrome):
+ (LauncherWindow::toggleJavaScriptEnabled):
+ * QtTestBrowser/launcherwindow.h:
+ (LauncherWindow):
+
+2013-02-07 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL] Add a WebKit2 Performance bot.
+ https://bugs.webkit.org/show_bug.cgi?id=109188
+
+ Reviewed by Csaba Osztrogonác.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json: Add the
+ efl-linux-perf-1 slave (a 64-bit Release WK2 Perf bot), and make
+ the "EFL Linux 64-bit Release" bot trigger it.
+
+2013-02-07 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] CHHW - Characters that are using 32 bits encoding get trunked to 16bits
+ https://bugs.webkit.org/show_bug.cgi?id=109126
+ PR 292540
+
+ Reviewed by Yong Li.
+
+ Change char code to 4 bytes.
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (keyDownCallback):
+
+2013-02-07 Gavin Peters <gavinp@chromium.org>
+
+ Unreviewed, rolling out r142090.
+ http://trac.webkit.org/changeset/142090
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ lots of selection expectations failures
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ (WebTaskList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (MockGrammarCheck::checkGrammarOfString):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (append):
+ (isNotASCIIAlpha):
+ (MockSpellCheck::spellCheckWord):
+ (MockSpellCheck::initializeIfNeeded):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner):
+ (WebTestRunner::WebTaskList::WebTaskList):
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
+
+2013-02-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] turn TestRunner library into a component build
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ Reviewed by Adam Barth.
+
+ To achieve this, we need to drop all dependencies on WTF.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (WebTestRunner::MockGrammarCheck::checkGrammarOfString):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (WebTestRunner):
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::spellCheckWord):
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ (isASCIIAlpha):
+ (isNotASCIIAlpha):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+
+2013-02-07 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Use GNU ar's thin archive format for intermediate static libs
+ https://bugs.webkit.org/show_bug.cgi?id=109052
+
+ Reviewed by Jocelyn Turcotte.
+
+ With debug builds we exceed the 4GiB limit of GNU ar when creating the WebCore
+ intermediate static library which results in build failure even with a x86_64
+ toolchain (http://sourceware.org/bugzilla/show_bug.cgi?id=14625).
+
+ When using a GNU toolchain we can use the thin archive format for these static
+ libraries which also has the benefit of not copying the object files, thus
+ drastically reducing disk usage and overall compile time.
+
+ Currently qmake does not support GNU ar's thin archive format so for
+ now we need to do the magic in the build system as a stopgap solution.
+
+ * qmake/mkspecs/features/configure.prf:
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/functions.prf:
+
+2013-02-05 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Compile WTF tests of TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=108935
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add initial stubs and files for building at least the WTF tests.
+ The WK2 tests need more platform code, in particular PlatformWebView
+ and injected bundle support.
+
+ * TestWebKitAPI/TestWebKitAPI.pri: Added.
+ * TestWebKitAPI/TestWebKitAPI.pro: Added.
+ * TestWebKitAPI/Tests/WTF/WTF.pro: Added.
+ * TestWebKitAPI/qt/InjectedBundleControllerQt.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::InjectedBundleController::platformInitialize):
+ * TestWebKitAPI/qt/PlatformUtilitiesQt.cpp: Added.
+ (Util):
+ (TestWebKitAPI::Util::run):
+ (TestWebKitAPI::Util::sleep):
+ (TestWebKitAPI::Util::createInjectedBundlePath):
+ (TestWebKitAPI::Util::createURLForResource):
+ (TestWebKitAPI::Util::URLForNonExistentResource):
+ * TestWebKitAPI/qt/main.cpp: Added.
+ (main):
+ * Tools.pro:
+ * qmake/mkspecs/features/default_post.prf:
+
+2013-02-06 Roger Fong <roger_fong@apple.com>
+
+ VS2010 WinLauncher project, property sheets and resources.
+ https://bugs.webkit.org/show_bug.cgi?id=107037.
+
+ Reviewed by Brent Fulgham.
+
+ * WinLauncher/WinLauncher.vcxproj: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.ico: Copied from WinLauncher/WinLauncher.ico.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.rc: Copied from WinLauncher/WinLauncherLauncher.rc.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.user: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc: Copied from WinLauncher/WinLauncher.rc.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.user: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd: Copied from WinLauncher/WinLauncherPostBuild.cmd.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd: Copied from WinLauncher/WinLauncherPreBuild.cmd.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h: Copied from WinLauncher/resource.h.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props: Added.
+ * WinLauncher/WinLauncher.vcxproj/WinLauncherResource.h: Copied from WinLauncher/WinLauncherLauncherResource.h.
+ * WinLauncher/WinLauncher.vcxproj/small.ico: Copied from WinLauncher/small.ico.
+
+2013-02-06 Terry Anderson <tdanderson@chromium.org>
+
+ Add support for gesture scroll events that do not propagate to enclosing scrollables
+ https://bugs.webkit.org/show_bug.cgi?id=108849
+
+ Reviewed by Antonio Gomes.
+
+ Modify chromium's DRT EventSender to support the new event type
+ GestureScrollUpdateWithoutPropagation.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::gestureScrollUpdateWithoutPropagation):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::handleInputEvent):
+
+2013-02-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r142032.
+ http://trac.webkit.org/changeset/142032
+ https://bugs.webkit.org/show_bug.cgi?id=109095
+
+ component build still broken (Requested by jochen__ on
+ #webkit).
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ (WebTaskList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (MockGrammarCheck::checkGrammarOfString):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (append):
+ (isNotASCIIAlpha):
+ (MockSpellCheck::spellCheckWord):
+ (MockSpellCheck::initializeIfNeeded):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner):
+ (WebTestRunner::WebTaskList::WebTaskList):
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
+
+2013-02-06 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] turn TestRunner library into a component build
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ Reviewed by Adam Barth.
+
+ To achieve this, we need to drop all dependencies on WTF.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (WebTestRunner::MockGrammarCheck::checkGrammarOfString):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (WebTestRunner):
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::spellCheckWord):
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ (isASCIIAlpha):
+ (isNotASCIIAlpha):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+
+2013-02-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r142025.
+ http://trac.webkit.org/changeset/142025
+ https://bugs.webkit.org/show_bug.cgi?id=109091
+
+ broke the build (Requested by tdanderson on #webkit).
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (EventSender):
+
+2013-02-06 Terry Anderson <tdanderson@chromium.org>
+
+ Add support for gesture scroll events that do not propagate to enclosing scrollables
+ https://bugs.webkit.org/show_bug.cgi?id=108849
+
+ Reviewed by Antonio Gomes.
+
+ Modify chromium's DRT EventSender to support the new event type
+ GestureScrollUpdateWithoutPropagation.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::gestureScrollUpdateWithoutPropagation):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (EventSender):
+
+2013-02-06 Zan Dobersek <zdobersek@igalia.com>
+
+ [TestResultServer] Adjust the name of the GTK 64-bit debug builder
+ https://bugs.webkit.org/show_bug.cgi?id=109016
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/builders.jsonp: The GTK 64-bit debug
+ builder was adjusted to build WebKit1 only, with the name changed accordingly.
+ Reflect that change here as well.
+
+2013-02-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r141991.
+ http://trac.webkit.org/changeset/141991
+ https://bugs.webkit.org/show_bug.cgi?id=109047
+
+ Fails to compile on all Chromium platforms (Requested by
+ schenney on #webkit).
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ (WebTaskList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (MockGrammarCheck::checkGrammarOfString):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (append):
+ (isNotASCIIAlpha):
+ (MockSpellCheck::spellCheckWord):
+ (MockSpellCheck::initializeIfNeeded):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner):
+ (WebTestRunner::WebTaskList::WebTaskList):
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Removed.
+
+2013-02-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r141995.
+ http://trac.webkit.org/changeset/141995
+ https://bugs.webkit.org/show_bug.cgi?id=109046
+
+ May allow me to roll out the real problem (Requested by
+ schenney on #webkit).
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::sendWebIntentResponse):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+
+2013-02-06 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] fix android build which doesn't support intents
+
+ Unreviewed build fix.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::sendWebIntentResponse):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+
+2013-02-06 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] turn TestRunner library into a component build
+ https://bugs.webkit.org/show_bug.cgi?id=108466
+
+ Reviewed by Adam Barth.
+
+ To achieve this, we need to drop all dependencies on WTF.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElementList::getOrCreate):
+ (WebTestRunner::AccessibilityUIElementList::createRoot):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElementList):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner::CppBoundClass::~CppBoundClass):
+ (WebTestRunner::CppBoundClass::invoke):
+ (WebTestRunner::CppBoundClass::getProperty):
+ (WebTestRunner::CppBoundClass::setProperty):
+ (WebTestRunner::CppBoundClass::bindCallback):
+ (WebTestRunner::CppBoundClass::bindGetterCallback):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::getAsCppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ (CppBoundClass):
+ (WebTestRunner::CppBoundClass::bindProperty):
+ (WebTestRunner::CppBoundClass::bindFallbackCallback):
+ (WebTestRunner::CppBoundClass::bindFallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner::CppVariant::toString):
+ (WebTestRunner::CppVariant::toInt32):
+ (WebTestRunner::CppVariant::toDouble):
+ (WebTestRunner::CppVariant::toBoolean):
+ (WebTestRunner::CppVariant::toStringVector):
+ (WebTestRunner::CppVariant::invoke):
+ (WebTestRunner::CppVariant::invokeDefault):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (CppVariant):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::reset):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::dispatchMessage):
+ (WebTestRunner::EventSender::leapForward):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::makeMenuItemStringsFor):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::addTouchPoint):
+ (WebTestRunner::EventSender::releaseTouchPoint):
+ (WebTestRunner::EventSender::updateTouchPoint):
+ (WebTestRunner::EventSender::cancelTouchPoint):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp:
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ (WebTestRunner::MockGrammarCheck::checkGrammarOfString):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h:
+ (WebTestRunner):
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (WebTestRunner::MockSpellCheck::spellCheckWord):
+ (WebTestRunner::MockSpellCheck::initializeIfNeeded):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp:
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestCommon.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ (isASCIIAlpha):
+ (isNotASCIIAlpha):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp:
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h:
+ (TestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner::TextInputController::markedRange):
+ (WebTestRunner::TextInputController::selectedRange):
+ (WebTestRunner::TextInputController::firstRectForCharacterRange):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp:
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ * DumpRenderTree/chromium/TestRunner/src/config.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+
+2013-02-06 Mike West <mkwst@chromium.org>
+
+ Add an ENABLE_NOSNIFF feature flag.
+ https://bugs.webkit.org/show_bug.cgi?id=109029
+
+ Reviewed by Jochen Eisinger.
+
+ This new flag will control the behavior of 'X-Content-Type-Options: nosniff'
+ when processing script and other resource types.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-02-06 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Implement DTMF support in RTCPeerConnection
+ https://bugs.webkit.org/show_bug.cgi?id=106782
+
+ Reviewed by Adam Barth.
+
+ Adding Mock functionality for the DTMFSender.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/MockWebRTCDTMFSenderHandler.cpp: Added.
+ (DTMFSenderToneTask):
+ (DTMFSenderToneTask::DTMFSenderToneTask):
+ (MockWebRTCDTMFSenderHandler::MockWebRTCDTMFSenderHandler):
+ (MockWebRTCDTMFSenderHandler::setClient):
+ (MockWebRTCDTMFSenderHandler::currentToneBuffer):
+ (MockWebRTCDTMFSenderHandler::canInsertDTMF):
+ (MockWebRTCDTMFSenderHandler::insertDTMF):
+ * DumpRenderTree/chromium/MockWebRTCDTMFSenderHandler.h: Copied from Source/Platform/chromium/public/WebMediaStreamTrack.h.
+ (MockWebRTCDTMFSenderHandler):
+ (MockWebRTCDTMFSenderHandler::taskList):
+ (MockWebRTCDTMFSenderHandler::clearToneBuffer):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::createDTMFSender):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ (MockWebRTCPeerConnectionHandler):
+
+2013-02-06 Christophe Dumez <ch.dumez@sisa.samsung.com>
+
+ Unreviewed. Update my email address in committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-05 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [CMake] Don't warn unused cmake variables which aren't used by cmake ports
+ https://bugs.webkit.org/show_bug.cgi?id=108761
+
+ Reviewed by Laszlo Gombos.
+
+ Ignore unused macro variables which aren't used by cmake ports.
+
+ * Scripts/webkitdirs.pm:
+ (generateBuildSystemFromCMakeProject):
+
+2013-02-05 Julie Parent <jparent@chromium.org>
+
+ Add cc_unittests to the dashboards
+ https://bugs.webkit.org/show_bug.cgi?id=108878
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (loadBuildersList):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (currentBuilderGroupCategory):
+
+2013-02-05 Adam Barth <abarth@webkit.org>
+
+ DumpRenderTree should be able to enable the threaded parser
+ https://bugs.webkit.org/show_bug.cgi?id=108970
+
+ Reviewed by Eric Seidel.
+
+ We can now enable the parser at runtime using --enable-threaded-html-parser.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ (WebPreferences):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setThreadedHTMLParser):
+ (TestShell):
+
+2013-02-05 Benjamin Poulain <bpoulain@apple.com>
+
+ Make StringBuilder::toAtomicString() consistent with StringBuilder::toString() for strings of null length
+ https://bugs.webkit.org/show_bug.cgi?id=108894
+
+ Reviewed by Andreas Kling.
+
+ * TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
+ Extend the tests to check toAtomicString() on an empty builder.
+
+2013-02-05 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove methods from the WebTestRunner interface that are only used by WebTestProxyBase
+ https://bugs.webkit.org/show_bug.cgi?id=108926
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebKit):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-02-05 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove unneccessary 0 checks for testRunner now that the TestRunner library owns it
+ https://bugs.webkit.org/show_bug.cgi?id=108923
+
+ Reviewed by Kentaro Hara.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::shouldBeginEditing):
+ (WebTestRunner::WebTestProxyBase::shouldEndEditing):
+ (WebTestRunner::WebTestProxyBase::shouldInsertNode):
+ (WebTestRunner::WebTestProxyBase::shouldInsertText):
+ (WebTestRunner::WebTestProxyBase::shouldChangeSelectedRange):
+ (WebTestRunner::WebTestProxyBase::shouldDeleteRange):
+ (WebTestRunner::WebTestProxyBase::shouldApplyStyle):
+ (WebTestRunner::WebTestProxyBase::didBeginEditing):
+ (WebTestRunner::WebTestProxyBase::didChangeSelection):
+ (WebTestRunner::WebTestProxyBase::didChangeContents):
+ (WebTestRunner::WebTestProxyBase::didEndEditing):
+ (WebTestRunner::WebTestProxyBase::createView):
+ (WebTestRunner::WebTestProxyBase::setStatusText):
+ (WebTestRunner::WebTestProxyBase::didStopLoading):
+ (WebTestRunner::WebTestProxyBase::isSmartInsertDeleteEnabled):
+ (WebTestRunner::WebTestProxyBase::isSelectTrailingWhitespaceEnabled):
+ (WebTestRunner::WebTestProxyBase::willPerformClientRedirect):
+ (WebTestRunner::WebTestProxyBase::didCancelClientRedirect):
+ (WebTestRunner::WebTestProxyBase::didStartProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didReceiveServerRedirectForProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didFailProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didCommitProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didReceiveTitle):
+ (WebTestRunner::WebTestProxyBase::didFinishDocumentLoad):
+ (WebTestRunner::WebTestProxyBase::didHandleOnloadEvents):
+ (WebTestRunner::WebTestProxyBase::didFailLoad):
+ (WebTestRunner::WebTestProxyBase::didFinishLoad):
+ (WebTestRunner::WebTestProxyBase::didChangeLocationWithinPage):
+ (WebTestRunner::WebTestProxyBase::didDisplayInsecureContent):
+ (WebTestRunner::WebTestProxyBase::didRunInsecureContent):
+ (WebTestRunner::WebTestProxyBase::didDetectXSS):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ (WebTestRunner::WebTestProxyBase::willRequestResource):
+ (WebTestRunner::WebTestProxyBase::didCreateDataSource):
+ (WebTestRunner::WebTestProxyBase::willSendRequest):
+ (WebTestRunner::WebTestProxyBase::didReceiveResponse):
+ (WebTestRunner::WebTestProxyBase::didFinishResourceLoad):
+ (WebTestRunner::WebTestProxyBase::didFailResourceLoad):
+ (WebTestRunner::WebTestProxyBase::runModalBeforeUnloadDialog):
+ (WebTestRunner::WebTestProxyBase::locationChangeDone):
+ (WebTestRunner::WebTestProxyBase::decidePolicyForNavigation):
+ (WebTestRunner::WebTestProxyBase::willCheckAndDispatchMessageEvent):
+
+2013-02-04 Alan Cutter <alancutter@chromium.org>
+
+ EWS bots don't remove untracked files after processing a patch
+ https://bugs.webkit.org/show_bug.cgi?id=108891
+
+ Reviewed by Adam Barth.
+
+ Added option to remove untracked files in the bot's repo.
+
+ * EWSTools/start-queue.sh:
+
+2013-02-04 Benjamin Poulain <bpoulain@apple.com>
+
+ Kill suspendAnimation(), resumeAnimation() and numberOfActiveAnimations() from DRT/WTR; use Internals
+ https://bugs.webkit.org/show_bug.cgi?id=108741
+
+ Reviewed by Tony Chang.
+
+ Remove all support for suspendAnimation(), resumeAnimation() and numberOfActiveAnimations().
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2013-02-04 Nico Weber <thakis@chromium.org>
+
+ [chromium] Try to get WebKit building with enable_web_intents set to 0 on Windows too.
+ https://bugs.webkit.org/show_bug.cgi?id=108887
+
+ Reviewed by Kentaro Hara.
+
+ This is a follow-up to http://trac.webkit.org/changeset/141614. The
+ Mac and Linux linkers didn't complain about the reference to
+ WebIntent in that function for some reason (probably because it's
+ a dead function that's stripped).
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-02-04 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: Make builder a real dashboardSpecificParameter.
+ https://bugs.webkit.org/show_bug.cgi?id=108706
+
+ Reviewed by Dirk Pranke.
+
+ Add builder to g_defaultDashboardSpecificParameter maps for the
+ dashboards where it is used (flakiness, timeline, treemap).
+ Default it to null, and then update reads of it to check the
+ builder group's default if one is not set, rather than trying to
+ set and track this everywhere.
+ This allows us to remove tons of special-casing of builder parsing,
+ including where we used to add it to the query string even when the
+ user did not specify it.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseParameters):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (generatePage):
+ (handleQueryParameterChange):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/treemap.html:
+
+2013-02-04 Julie Parent <jparent@chromium.org>
+
+ Setting tests on flakiness dashboard should invalidate builder.
+ https://bugs.webkit.org/show_bug.cgi?id=108521
+
+ Reviewed by Dirk Pranke.
+
+ When you move into a cross builder view, builder should not still be
+ set. Currently, it is deleted from the internal state, but still shows
+ up in the url, causing the current state and the hash to not match.
+
+ To see this in action, load the flakiness dashboard, select a builder,
+ and then click on an individual test, to get into individual test view.
+ The url will still have the builder you selected listed, even though it
+ is cleared in the UI.
+
+ The fix is to consider 'tests' to be a parameter that invalidates builder.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+
+2013-02-04 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ [EFL][WK2] Introduce a WebView class as counterpart for WKViewRef
+ https://bugs.webkit.org/show_bug.cgi?id=107931
+
+ Reviewed by Anders Carlsson.
+
+ Change platformView to be a WKView and use WKViewGetEvasObject
+ for the places where an Evas_Object is needed.
+
+ Instead of extracting the Ecore_Evas* from the m_view we use
+ the m_window instead, which actually holds the it.
+
+ * TestWebKitAPI/PlatformWebView.h:
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::PlatformWebView::PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::~PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::resizeTo):
+ (TestWebKitAPI::PlatformWebView::page):
+ (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
+ (TestWebKitAPI::PlatformWebView::simulateMouseMove):
+ (TestWebKitAPI::PlatformWebView::simulateRightClick):
+ * WebKitTestRunner/PlatformWebView.h:
+ * WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
+ (WTR::EventSenderProxy::sendTouchEvent):
+ (WTR::EventSenderProxy::setTouchModifier):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::~PlatformWebView):
+ (WTR::PlatformWebView::resizeTo):
+ (WTR::PlatformWebView::page):
+ (WTR::PlatformWebView::focus):
+ (WTR::PlatformWebView::windowFrame):
+ (WTR::PlatformWebView::setWindowFrame):
+ (WTR::PlatformWebView::windowSnapshotImage):
+
+2013-02-04 Timothy Loh <timloh@chromium.com>
+
+ Don't update author info in PrepareChangeLog and allow users to skip the PrepareChangeLog step entirely.
+ https://bugs.webkit.org/show_bug.cgi?id=108788
+
+ Reviewed by Ryosuke Niwa.
+
+ As per discussion in Bug 74358, it's probably preferable to remove the
+ behaviour of updating the author details in a ChangeLog entry. We also
+ want to be able to skip preparing change logs (e.g. rebaselining many
+ tests), so a --no-prepare-changelogs option is added to webkit-patch.
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLogEntry._parse_entry):
+ (ChangeLogEntry.date): Added
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_parse_log_entries_from_changelog):
+ * Scripts/webkitpy/tool/commands/commandtest.py:
+ (CommandsTest.assert_execute_outputs):
+ * Scripts/webkitpy/tool/steps/options.py:
+ (Options): Added --no-prepare-changelogs
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog.options):
+ (PrepareChangeLog._merge_entries): date_line() gets the entire line, including
+ the author's name and email, but we only want to replace the date.
+ (PrepareChangeLog.run):
+ * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
+ (PrepareChangeLogTest.test_resolve_existing_entry): Added tests for changed
+ authors. Removed unneeded variable.
+
+2013-02-04 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Remove WebEventSender and WebAccessibilityController from public TestRunner API
+ https://bugs.webkit.org/show_bug.cgi?id=108467
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebEventSender.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestRunner):
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner):
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ (WebTestRunner::TestInterfaces::setWebView):
+ (WebTestRunner::TestInterfaces::webView):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::setWebView):
+ (WebTestRunner::WebTestInterfaces::setDelegate):
+ (WebTestRunner::WebTestInterfaces::bindTo):
+ (WebTestRunner::WebTestInterfaces::resetAll):
+ (WebTestRunner::WebTestInterfaces::setTestIsRunning):
+ (WebTestRunner::WebTestInterfaces::webView):
+ (WebTestRunner::WebTestInterfaces::testRunner):
+ (WebTestRunner::WebTestInterfaces::testInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::setInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestRunner.cpp: Removed.
+ * DumpRenderTree/chromium/TestShell.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-02-04 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
+
+ [EFL] Add "full screen" parameter to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=108850
+
+ Reviewed by Antonio Gomes.
+
+ Implements the {-F,--full-screen}={true,false} parameter to WebKit EFL's
+ MiniBrowser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+ Added '-F/--full-screen' parameter functionality.
+
+2013-02-04 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove WebTestPlugin from the public TestRunner API
+ https://bugs.webkit.org/show_bug.cgi?id=108467
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestPlugin.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::createPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp.
+ (WebTestRunner::TestPlugin::TestPlugin):
+ (WebTestRunner):
+ (WebTestRunner::TestPlugin::~TestPlugin):
+ (WebTestRunner::TestPlugin::initialize):
+ (WebTestRunner::TestPlugin::destroy):
+ (WebTestRunner::TestPlugin::updateGeometry):
+ (WebTestRunner::TestPlugin::parsePrimitive):
+ (WebTestRunner::TestPlugin::parseColor):
+ (WebTestRunner::TestPlugin::parseOpacity):
+ (WebTestRunner::TestPlugin::parseBoolean):
+ (WebTestRunner::TestPlugin::initScene):
+ (WebTestRunner::TestPlugin::drawScene):
+ (WebTestRunner::TestPlugin::destroyScene):
+ (WebTestRunner::TestPlugin::initProgram):
+ (WebTestRunner::TestPlugin::initPrimitive):
+ (WebTestRunner::TestPlugin::drawPrimitive):
+ (WebTestRunner::TestPlugin::loadShader):
+ (WebTestRunner::TestPlugin::loadProgram):
+ (WebTestRunner::TestPlugin::handleInputEvent):
+ (WebTestRunner::TestPlugin::handleDragStatusUpdate):
+ (WebTestRunner::TestPlugin::create):
+ (WebTestRunner::TestPlugin::mimeType):
+ * DumpRenderTree/chromium/TestRunner/src/TestPlugin.h: Added.
+ (WebTestRunner):
+ (TestPlugin):
+ (WebTestRunner::TestPlugin::scriptableObject):
+ (WebTestRunner::TestPlugin::canProcessDrag):
+ (WebTestRunner::TestPlugin::paint):
+ (WebTestRunner::TestPlugin::updateFocus):
+ (WebTestRunner::TestPlugin::updateVisibility):
+ (WebTestRunner::TestPlugin::acceptsInputEvents):
+ (WebTestRunner::TestPlugin::didReceiveResponse):
+ (WebTestRunner::TestPlugin::didReceiveData):
+ (WebTestRunner::TestPlugin::didFinishLoading):
+ (WebTestRunner::TestPlugin::didFailLoading):
+ (WebTestRunner::TestPlugin::didFinishLoadingFrameRequest):
+ (WebTestRunner::TestPlugin::didFailLoadingFrameRequest):
+ (WebTestRunner::TestPlugin::isPlaceholder):
+ (WebTestRunner::TestPlugin::prepareTexture):
+ (WebTestRunner::TestPlugin::context):
+ (Scene):
+ (WebTestRunner::TestPlugin::Scene::Scene):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::createPlugin):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createPlugin):
+
+2013-02-04 Gustavo Noronha Silva <gns@gnome.org>
+
+ Add a new method for obtaining a build-type-dependent path,
+ instead of modifying all call sites to pass it in.
+
+ Reviewed by Martin Robinson.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner.__init__): use the new method, which takes a tuple.
+ (TestRunner._setup_testing_environment): ditto.
+ * gtk/common.py:
+ (get_build_path): accept a tuple that may include Release and
+ Debug as build types, for searching.
+ (build_path_for_build_types): new method that finds the path when
+ it is dependent on the build type.
+ (build_path): restore its original behaviour.
+
+2013-02-04 David Kilzer <ddkilzer@apple.com>
+
+ Remove duplicate entry from DumpRenderTree Xcode project
+
+ $ uniq Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj | diff -u - Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj | patch -p0 -R
+ patching file Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ Remove duplicate.
+
+2013-02-04 David Kilzer <ddkilzer@apple.com>
+
+ Sort TestWebKitAPI Xcode project file
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+
+2013-02-03 Alan Cutter <alancutter@chromium.org>
+
+ PatchLogs are not getting created on QueueStatusServer
+ https://bugs.webkit.org/show_bug.cgi?id=108593
+
+ Reviewed by Eric Seidel.
+
+ Added missing "added" patch event to submit-to-ews handler.
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/handlers/submittoews.py:
+ (SubmitToEWS._add_attachment_to_ews_queues):
+
+2013-02-03 Douglas Stockwell <dstockwell@chromium.org>
+
+ Unreviewed. Add dstockwell as a contributor in comitters.py and to the watchlist for animation
+ https://bugs.webkit.org/show_bug.cgi?id=108777
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-02-03 Sam Weinig <sam@webkit.org>
+
+ Fix failing test.
+
+ * TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp:
+ (TestWebKitAPI::didFinishLoadForFrame):
+
+2013-02-03 Timothy Loh <timloh@chromium.com>
+
+ Make ChangeLogEntry detect annotations by prepare-ChangeLog (Added/Removed/Copied from/Renamed from) as clean.
+ https://bugs.webkit.org/show_bug.cgi?id=108433
+
+ Reviewed by Eric Seidel.
+
+ PrepareChangeLog is supposed to update the file/function list if we
+ haven't touched it, but the existing regex doesn't handle the
+ annotations prepare-ChangeLog adds (e.g. "Added.")
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLogEntry.is_touched_files_text_clean):
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_is_touched_files_text_clean):
+
+2013-02-02 Dean Jackson <dino@apple.com>
+
+ Add Antoine Quint to the list of committers
+ https://bugs.webkit.org/show_bug.cgi?id=108750
+
+ No review necessary.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-02 Patrick Gansterer <paroga@webkit.org>
+
+ [CMake] Adopt the WinCE port to new CMake
+ https://bugs.webkit.org/show_bug.cgi?id=108754
+
+ Reviewed by Laszlo Gombos.
+
+ * WinCELauncher/CMakeLists.txt: Mark WinCELauncher
+ as WIN32 target to use the correct entry point.
+
+2013-02-02 Alexey Proskuryakov <ap@apple.com>
+
+ One is not allowed to use commit-queue to make oneself a committer.
+
+ * Scripts/webkitpy/common/config/committers.py: Rolled out r141693.
+ Also, changed e-mail order for Yongjun Zhang, so that Bugzilla autocomplete works.
+
+2013-02-02 Antoine Quint <graouts@apple.com>
+
+ Add Antoine Quint to the list of committers
+ https://bugs.webkit.org/show_bug.cgi?id=108750
+
+ Reviewed by Dean Jackson.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-02-01 Adrian Perez de Castro <aperez@igalia.com>
+
+ [GTK] Building fails in an armv5tel board
+ https://bugs.webkit.org/show_bug.cgi?id=108083
+
+ Reviewed by Martin Robinson.
+
+ In some systems in which $architecture is filled-in from "uname -m"
+ the value may not start with "arm-", but with "armvN", where "N" is
+ an architecture version number. The regexp in isARM() is modified
+ so it covers these kind of cases.
+
+ * Scripts/webkitdirs.pm:
+ (isARM):
+
+2013-02-01 Gregg Tavares <gman@google.com>
+
+ Update LayoutTests scripts to skip webgl folder on ports
+ https://bugs.webkit.org/show_bug.cgi?id=108705
+
+ Reviewed by Dirk Pranke.
+
+ I'm working on checking in the WebGL Conformance Tests
+ as layout tests into LayoutTests/webgl. For ports
+ that do not have WebGL enabled this changes will
+ skip tests in the "webgl" folder.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port._missing_symbol_to_skipped_tests):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_skipped_directories_for_symbols):
+
+2013-02-01 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Fix for webkitpy tests.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+
+2013-02-01 Jer Noble <jer.noble@apple.com>
+
+ LLDB: add synthetic provider for WTF::HashTable
+ https://bugs.webkit.org/show_bug.cgi?id=108718
+
+ Reviewed by Darin Adler.
+
+ Add a synthetic provider which will emit the contents of a given
+ WTF::HashTable. This allows clients using Xcode/lldb to enumerate
+ the hash contents.
+
+ * lldb/lldb_webkit.py:
+ (__lldb_init_module):
+ (__lldb_init_module.lldb_webkit):
+ (WTFHashTable_SummaryProvider):
+ (WTFVectorProvider.has_children):
+ (WTFHashTableProvider):
+ (WTFHashTableProvider.__init__):
+ (WTFHashTableProvider.num_children):
+ (WTFHashTableProvider.get_child_index):
+ (WTFHashTableProvider.get_child_at_index):
+ (WTFHashTableProvider.tableSize):
+ (WTFHashTableProvider.keyCount):
+ (WTFHashTableProvider.update):
+ (WTFHashTableProvider.has_children):
+
+2013-02-01 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Fix webkitpy tests since a build_style is not specified in some cases.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-02-01 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Re-try enabling Win-EWS tests for the third time.
+ https://bugs.webkit.org/show_bug.cgi?id=107968
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-01-31 Roger Fong <roger_fong@apple.com>
+
+ Fix test scripts for EWS bots to get them running once and for all.
+ https://bugs.webkit.org/show_bug.cgi?id=108422
+
+ Reviewed by Timothy Horton.
+
+ Disabling --quiet option on Windows for now because that fails when we try to use /dev/null.
+ runtests.py was not passing in a configuration to run-webkit-tests which causes DRT to build in release by default.
+ However, we build in Debug only on the EWS Windows bots, which caused the build to fail.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.options):
+ (RunTests.run):
+
+2013-02-01 Nico Weber <thakis@chromium.org>
+
+ [chromium] Build webkit with enable_web_intents set to 0.
+ https://bugs.webkit.org/show_bug.cgi?id=108408
+
+ Reviewed by Tony Chang.
+
+ I'll then make chromium build fine with that, then switch
+ enable_web_intents to 0, roll that into webkit, and then
+ actually remove the code hidden behind this flag.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-02-01 Zan Dobersek <zdobersek@igalia.com>
+
+ Set the GTK 64-bit Debug builder to build and test only WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=108648
+
+ Reviewed by Philippe Normand.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json: Change the builder name, type and
+ build directory to note that the builder builds and tests only the WebKit1 port on the GTK platform.
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (CompileWebKit1Only): Add the new build class that builds only the WebKit1 port of the builder's platform.
+ (BuildAndTestWebKit1OnlyFactory): Add the new factory that uses the CompileWebKit1Only build class
+ for building and testing only WebKit1 on the builder's platform.
+
+2013-02-01 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move ownership of TestRunner object to TestInterfaces
+ https://bugs.webkit.org/show_bug.cgi?id=108464
+
+ Reviewed by Adam Barth.
+
+ Before, TestShell owned the class. This also removes the last include
+ from DumpRenderTree to TestRunner/src.
+
+ This also deletes TestDelegate and uses WebTestDelegate everywhere
+ instead.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebKit):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
+ (WebTestRunner):
+ (WebTestRunner::AccessibilityController::setDelegate):
+ (AccessibilityController):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::makeMenuItemStringsFor):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::setDelegate):
+ (EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp:
+ (WebTestRunner::GamepadController::setDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.h:
+ (WebTestRunner):
+ (GamepadController):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner::TestInterfaces::TestInterfaces):
+ (WebTestRunner::TestInterfaces::~TestInterfaces):
+ (WebTestRunner::TestInterfaces::setWebView):
+ (WebTestRunner::TestInterfaces::setDelegate):
+ (WebTestRunner::TestInterfaces::bindTo):
+ (WebTestRunner::TestInterfaces::resetAll):
+ (WebTestRunner):
+ (WebTestRunner::TestInterfaces::setTestIsRunning):
+ (WebTestRunner::TestInterfaces::testRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebTestRunner):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebKit):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::Internal::testRunner):
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::setDelegate):
+ (WebTestRunner::WebTestInterfaces::Internal::setTestIsRunning):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestRunner.cpp: Added.
+ (WebTestRunner):
+ (WebTestRunner::WebTestRunner::WebTestRunner):
+ (WebTestRunner::WebTestRunner::shouldDumpEditingCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpAsText):
+ (WebTestRunner::WebTestRunner::setShouldDumpAsText):
+ (WebTestRunner::WebTestRunner::shouldGeneratePixelResults):
+ (WebTestRunner::WebTestRunner::setShouldGeneratePixelResults):
+ (WebTestRunner::WebTestRunner::shouldDumpChildFrameScrollPositions):
+ (WebTestRunner::WebTestRunner::shouldDumpChildFramesAsText):
+ (WebTestRunner::WebTestRunner::shouldDumpAsAudio):
+ (WebTestRunner::WebTestRunner::audioData):
+ (WebTestRunner::WebTestRunner::shouldDumpFrameLoadCallbacks):
+ (WebTestRunner::WebTestRunner::setShouldDumpFrameLoadCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpUserGestureInFrameLoadCallbacks):
+ (WebTestRunner::WebTestRunner::stopProvisionalFrameLoads):
+ (WebTestRunner::WebTestRunner::shouldDumpTitleChanges):
+ (WebTestRunner::WebTestRunner::shouldDumpCreateView):
+ (WebTestRunner::WebTestRunner::canOpenWindows):
+ (WebTestRunner::WebTestRunner::shouldDumpResourceLoadCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpResourceRequestCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpResourceResponseMIMETypes):
+ (WebTestRunner::WebTestRunner::webPermissions):
+ (WebTestRunner::WebTestRunner::shouldDumpStatusCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpProgressFinishedCallback):
+ (WebTestRunner::WebTestRunner::shouldDumpBackForwardList):
+ (WebTestRunner::WebTestRunner::deferMainResourceDataLoad):
+ (WebTestRunner::WebTestRunner::shouldDumpSelectionRect):
+ (WebTestRunner::WebTestRunner::testRepaint):
+ (WebTestRunner::WebTestRunner::sweepHorizontally):
+ (WebTestRunner::WebTestRunner::isPrinting):
+ (WebTestRunner::WebTestRunner::shouldStayOnPageAfterHandlingBeforeUnload):
+ (WebTestRunner::WebTestRunner::setTitleTextDirection):
+ (WebTestRunner::WebTestRunner::httpHeadersToClear):
+ (WebTestRunner::WebTestRunner::shouldBlockRedirects):
+ (WebTestRunner::WebTestRunner::willSendRequestShouldReturnNull):
+ (WebTestRunner::WebTestRunner::setTopLoadingFrame):
+ (WebTestRunner::WebTestRunner::topLoadingFrame):
+ (WebTestRunner::WebTestRunner::policyDelegateDone):
+ (WebTestRunner::WebTestRunner::policyDelegateEnabled):
+ (WebTestRunner::WebTestRunner::policyDelegateIsPermissive):
+ (WebTestRunner::WebTestRunner::policyDelegateShouldNotifyDone):
+ (WebTestRunner::WebTestRunner::shouldInterceptPostMessage):
+ (WebTestRunner::WebTestRunner::isSmartInsertDeleteEnabled):
+ (WebTestRunner::WebTestRunner::isSelectTrailingWhitespaceEnabled):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ (TestShell::createMainWindow):
+ (TestShell::~TestShell):
+ (TestShell::runFileTest):
+ (TestShell::resetTestController):
+ (TestShell::dump):
+ (TestShell::bindJSObjectsToWindow):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::testRunner):
+ (TestShell):
+
+2013-02-01 Alan Cutter <alancutter@chromium.org>
+
+ PatchLog process durations are increasing linearly with time (faulty data logging)
+ https://bugs.webkit.org/show_bug.cgi?id=108621
+
+ Reviewed by Eric Seidel.
+
+ Added a check to prevent a stop event from happening to the same patch multiple times.
+
+ * QueueStatusServer/loggers/recordpatchevent.py:
+ (RecordPatchEvent.stopped):
+
+2013-02-01 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK][WK2] MiniBrowser fullscreen signals support
+ https://bugs.webkit.org/show_bug.cgi?id=108005
+
+ Reviewed by Carlos Garcia Campos.
+
+ Shows a label for 2 seconds using overlay (if GTK >= 3.2.0) and hides
+ the toolbar when entering fullscreen. When leaving fullscreen the
+ label is hidden (if it's not hidden yet) and the toolbar is shown again.
+
+ * MiniBrowser/gtk/BrowserWindow.c:
+ (_BrowserWindow):
+ (fullScreenMessageTimeoutCallback):
+ (webViewEnterFullScreen):
+ (webViewLeaveFullScreen):
+ (browserWindowFinalize):
+ (browserWindowConstructed):
+
+2013-02-01 Alexis Menard <alexis@webkit.org>
+
+ Enable unprefixed CSS transitions by default.
+ https://bugs.webkit.org/show_bug.cgi?id=108216
+
+ Reviewed by Dean Jackson.
+
+ Rename the flag CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
+ to CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED which will be used later to
+ guard the unprefixing work for CSS Transforms and animations.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-01-31 David Farler <dfarler@apple.com>
+
+ Provide a sensible default architecture when building on iOS SDKs
+ https://bugs.webkit.org/show_bug.cgi?id=108395
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/webkitdirs.pm:
+ (determineArchitecture): Anchor SDK regex matches at the beginning.
+
+2013-01-31 Ryosuke Niwa <rniwa@webkit.org>
+
+ buildbot should not rely on webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=107379
+
+ Reviewed by Eric Seidel.
+
+ Move all Python files used in buildbot configuration into BuildSlaveSupport directory.
+ Once this patch is landed, we can stop restarting the master on webkitpy changes.
+
+ * BuildSlaveSupport/build.webkit.org-config/committer_auth.py:
+ * BuildSlaveSupport/build.webkit.org-config/htdigestparser.py: Copied from Tools/Scripts/webkitpy/common/net/htdigestparser.py.
+ * BuildSlaveSupport/build.webkit.org-config/htdigestparser_unittest.py: Copied from Tools/Scripts/webkitpy/common/net/htdigestparser_unittest.py.
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ * BuildSlaveSupport/build.webkit.org-config/wkbuild.py: Copied from Tools/Scripts/webkitpy/common/config/build.py.
+ * BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py: Copied from Tools/Scripts/webkitpy/common/config/build_unittest.py.
+ (ShouldBuildTest.test_should_build):
+ * Scripts/webkitpy/common/config/build.py: Removed.
+ * Scripts/webkitpy/common/config/build_unittest.py: Removed.
+ * Scripts/webkitpy/common/net/htdigestparser.py: Removed.
+ * Scripts/webkitpy/common/net/htdigestparser_unittest.py: Removed.
+
+2013-01-31 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r141349.
+ http://trac.webkit.org/changeset/141349
+ https://bugs.webkit.org/show_bug.cgi?id=108422
+
+ "yet another windows ews fix needed" (Requested by lforschler
+ on #webkit).
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-01-31 Rouslan Solomakhin <rouslan@chromium.org>
+
+ [Chromium] Suggest 'uppercase' for multi-word misspelling 'upper case'
+ https://bugs.webkit.org/show_bug.cgi?id=108509
+
+ Reviewed by Tony Chang.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (append): Added utility function to append WebString to WebVector.
+ (MockSpellCheck::fillSuggestionList): Suggest 'uppercase' for misspelling 'upper case'.
+
+2013-01-31 David Farler <dfarler@apple.com>
+
+ Provide a sensible default architecture when building on iOS SDKs
+ https://bugs.webkit.org/show_bug.cgi?id=108395
+
+ Reviewed by Joseph Pecoraro.
+
+ * Scripts/webkitdirs.pm:
+ (determineArchitecture):
+ Check for iphoneos and iphonesimulator SDKs for a default arch.
+ (determineXcodeSDK): Added.
+ (xcodeSDK): Added.
+ (XcodeOptions): Add ARCHS= if defined.
+
+2013-01-31 Christopher Cameron <ccameron@chromium.org>
+
+ Fix rubber-band effect on non-scrollable pages
+ https://bugs.webkit.org/show_bug.cgi?id=107611
+
+ Add mouseWheelBegin function to EventSender to allow
+ event-based rubber-banding tests.
+
+ Reviewed by Antonio Gomes.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::mouseDragBegin):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (EventSender):
+
+2013-01-31 James Robinson <jamesr@chromium.org>
+
+ [chromium] Notify the WebWidget when the WebViewHost is about to tear down compositing support
+ https://bugs.webkit.org/show_bug.cgi?id=108518
+
+ Reviewed by Adrienne Walker.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::shutdown):
+
+2013-01-31 Pratik Solanki <psolanki@apple.com>
+
+ DumpRenderTree should put NSSound calls inside USE(APPKIT)
+ https://bugs.webkit.org/show_bug.cgi?id=108499
+
+ Reviewed by Andy Estes.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+
+2013-01-30 Brian Weinstein <bweinstein@apple.com>
+
+ Add a call to the page UI client to determine if a plug-in should load
+ https://bugs.webkit.org/show_bug.cgi?id=108407
+ <rdar://problem/13066332>
+
+ Add entries for the new function in the necessary structs.
+
+ Reviewed by Anders Carlsson.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController awakeFromNib]):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createOtherPage):
+ (WTR::TestController::createWebViewWithOptions):
+
+2013-01-31 Florin Malita <fmalita@chromium.org>
+
+ [Chromium] Unreviewed gardening.
+
+ Win build fix after http://trac.webkit.org/changeset/141471.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (MockSpellCheck::spellCheckWord):
+
+2013-01-31 Enrica Casucci <enrica@apple.com>
+
+ WebKit2: provide new bundle APIs to allow bundle clients to be notified of pasteboard access.
+ https://bugs.webkit.org/show_bug.cgi?id=108396.
+ <rdar://problem/12920461>
+
+ Reviewed by Alexey Proskuryakov.
+
+ Adding new WebKit2 test with relevant bundle, to test the new APIs.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm: Added.
+ (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
+ (TestWebKitAPI::setInjectedBundleClient):
+ * TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp: Added.
+ (PasteboardNotificationsTest):
+ (TestWebKitAPI::willWriteToPasteboard):
+ (TestWebKitAPI::getPasteboardDataForRange):
+ (TestWebKitAPI::didWriteToPasteboard):
+ (TestWebKitAPI::PasteboardNotificationsTest::PasteboardNotificationsTest):
+ (TestWebKitAPI::PasteboardNotificationsTest::didCreatePage):
+ * TestWebKitAPI/Tests/WebKit2/execCopy.html: Added.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Updated to reflect
+ changes in InjectedBundleEditorClient.
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+
+2013-01-31 Rouslan Solomakhin <rouslan@chromium.org>
+
+ [Chromium] Add two-word misspelling to mock spellchecker
+ https://bugs.webkit.org/show_bug.cgi?id=108498
+
+ Reviewed by Tony Chang.
+
+ Some layout tests verify spellcheck behavior when multiple words are
+ marked as a single misspelling. This change adds a two-word misspelling
+ 'upper case' to the mock spellchecker used by layout tests.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp:
+ (MockSpellCheck::spellCheckWord): Modified to handle spaces in misspellings.
+ (MockSpellCheck::initializeIfNeeded): Modified to use a vector instead of a hash table.
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+ (MockSpellCheck): Changed misspellings container from hash table to vector.
+
+2013-01-31 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Prospective build fix.
+
+ Reviewed by Jocelyn Turcotte.
+
+ Don't create .prl files for intermediate libs as their contents get
+ injected within -Wl,-whole-archive -lFoo -wl,-no-whole-archive.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2013-01-31 Alan Cutter <alancutter@chromium.org>
+
+ EWS graphs have unusual data for patch waiting times
+ https://bugs.webkit.org/show_bug.cgi?id=108427
+
+ Reviewed by Eric Seidel.
+
+ The max_patches_waiting QueueLog property may have missed recording patches waiting in idle times when no events are fired to update it. I added a cron job to take care of this issue.
+ The patch wait duration in PatchLogs was being incorrectly updated after a patch expired and was picked up again from the queue. That period should really count towards the processing time instead.
+ Added a WarningLog to record if any erroneous situations occur due to invalid contents in the datastore. These basically highlight if any "impossible" execution paths get executed.
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/cron.yaml:
+ * QueueStatusServer/handlers/syncqueuelogs.py: Copied from Tools/QueueStatusServer/model/patchlog.py.
+ (SyncQueueLogs):
+ (SyncQueueLogs.get):
+ * QueueStatusServer/loggers/recordpatchevent.py:
+ (RecordPatchEvent.added):
+ (RecordPatchEvent.retrying):
+ (RecordPatchEvent.started):
+ (RecordPatchEvent.stopped):
+ (RecordPatchEvent.updated):
+ * QueueStatusServer/main.py:
+ * QueueStatusServer/model/patchlog.py:
+ (PatchLog.lookup):
+ (PatchLog):
+ (PatchLog.lookup_if_exists):
+ (PatchLog.calculate_process_duration):
+ (PatchLog._generate_key):
+ * QueueStatusServer/model/queuelog.py:
+ (QueueLog.update_max_patches_waiting):
+ (QueueLog._get_or_create_txn):
+ (QueueLog):
+ (QueueLog._get_patches_waiting):
+ * QueueStatusServer/model/warninglog.py: Copied from Tools/QueueStatusServer/model/patchlog.py.
+ (WarningLog):
+ (WarningLog.record):
+
+2013-01-31 Anders Carlsson <andersca@apple.com>
+
+ Remove Web Intents code from WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=108506
+
+ Reviewed by Simon Fraser.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ (InjectedBundlePage):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2013-01-31 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API: Rename WebMediaStreamDescriptor and WebMediaStreamComponent to WebMediaStream and WebMediaStreamTrack
+ https://bugs.webkit.org/show_bug.cgi?id=108458
+
+ Reviewed by Adam Barth.
+
+ Only renames, no other code changes.
+
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
+ (MockWebMediaStreamCenter::didEnableMediaStreamTrack):
+ (MockWebMediaStreamCenter::didDisableMediaStreamTrack):
+ (MockWebMediaStreamCenter::didAddMediaStreamTrack):
+ (MockWebMediaStreamCenter::didRemoveMediaStreamTrack):
+ (MockWebMediaStreamCenter::didStopLocalMediaStream):
+ (MockWebMediaStreamCenter::didCreateMediaStream):
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.h:
+ (MockWebMediaStreamCenter):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::addStream):
+ (MockWebRTCPeerConnectionHandler::removeStream):
+ (MockWebRTCPeerConnectionHandler::getStats):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ (MockWebRTCPeerConnectionHandler):
+ * DumpRenderTree/chromium/WebUserMediaClientMock.cpp:
+ (UserMediaRequestTask::UserMediaRequestTask):
+ (WebUserMediaClientMock::requestUserMedia):
+
+2013-01-31 Zan Dobersek <zdobersek@igalia.com>
+
+ REGRESSION (r141402): incorrectly set injected bundle path when running GTK unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=108496
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner.__init__): Add the build type as a member on the TestRunner interface.
+ (TestRunner._setup_testing_environment): Use the build type member to determine correct path
+ to the injected bundle.
+
+2013-01-31 Christophe Dumez <dchris@gmail.com>
+
+ [EFL] Disable Web Intents
+ https://bugs.webkit.org/show_bug.cgi?id=108457
+
+ Reviewed by Alexey Proskuryakov.
+
+ Remove EFL DRT code related to Web intents.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::createView):
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ (DumpRenderTreeChrome::onFrameCreated):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+ (DumpRenderTreeChrome):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::sendWebIntentResponse):
+ (TestRunner::deliverWebIntent):
+ * Scripts/webkitperl/FeatureList.pm: Turn off WEB_INTENTS flag
+ for EFL port.
+
+2013-01-31 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Disable force_static_libs_as_shared in developer builds if wk2 is enabled
+
+ Reviewed by Jocelyn Turcotte.
+
+ This is a temporary workaround during the development of #108471, where we move files around
+ but some link time dependencies might remain.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2013-01-31 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Make it possible to compile WebKit2 Qt related files without access to internal WK2 C++ API
+ https://bugs.webkit.org/show_bug.cgi?id=108472
+
+ Reviewed by Andreas Kling.
+
+ Add a new module to the qmake build system that represents the part of the WebKit2 Qt integration
+ that doesn't depend on WebKit2 internals.
+
+ * qmake/mkspecs/features/webkit_modules.prf:
+ * qmake/mkspecs/modules/webkit2qml.prf: Copied from Source/WebKit2/WebKit2.pro.
+
+2013-01-31 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove dead transitional code from WebViewImpl
+ https://bugs.webkit.org/show_bug.cgi?id=107889
+
+ Reviewed by Adam Barth.
+
+ ScrollingCoordinatorChromiumTests need to initialize compositing, so its implementation of
+ WebWidgetClient has to support the new compositor initialization path.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ (WebViewHost::setWebWidget):
+
+2013-01-31 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] run-gtk-tests does not respect the -d argument
+ https://bugs.webkit.org/show_bug.cgi?id=107822
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner.__init__): use the value for the debug option to decide what
+ build_type to request a path for.
+ * gtk/common.py:
+ (get_build_path): now accepts a build_type argument instead of trying both
+ Release and Debug in order, defaults to release.
+ (build_path): takes and passes a build_type argument, no default value.
+
+2013-01-31 Christophe Dumez <dchris@gmail.com>
+
+ Update Christophe Dumez's email address
+ https://bugs.webkit.org/show_bug.cgi?id=108453
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Update my email address in committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-31 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move runModalBeforeUnloadDialog to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=108442
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestRunner::WebTestProxy::runModalBeforeUnloadDialog):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::runModalBeforeUnloadDialog):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-01-31 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move postMessage related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=108343
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::willCheckAndDispatchMessageEvent):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::willCheckAndDispatchMessageEvent):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::willCheckAndDispatchMessageEvent):
+
+2013-01-30 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move remaining resource load related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=108334
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::allowExternalPages):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::canHandleRequest):
+ (WebTestRunner::WebTestProxy::cannotHandleRequestError):
+ (WebTestRunner::WebTestProxy::didCreateDataSource):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::canHandleRequest):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::cannotHandleRequestError):
+ (WebTestRunner::WebTestProxyBase::didCreateDataSource):
+ (WebTestRunner::WebTestProxyBase::willSendRequest):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::canHandleRequest):
+ (WebViewHost::didCreateDataSource):
+ (WebViewHost::willSendRequest):
+ (WebViewHost::allowExternalPages):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-01-30 Hajime Morrita <morrita@google.com>
+
+ Unreviewed test failure fix for r141341.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+
+2013-01-30 Levi Weintraub <leviw@chromium.org>
+
+ [Chromium] WebPluginContainerImpl adding imbalanced touch handler refs
+ https://bugs.webkit.org/show_bug.cgi?id=108381
+
+ Reviewed by James Robinson.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp: Adding an attribute that
+ tickles the case in WebPluginContainerImpl that imbalanced touch handler refs in Document.
+
+2013-01-30 Julie Parent <jparent@chromium.org>
+
+ Add a concept of dashboard parameters that invalidate others
+ https://bugs.webkit.org/show_bug.cgi?id=108362
+
+ Reviewed by Dirk Pranke.
+
+ There are certain parameters to the dashboards, that when selected,
+ invalidate others, such as selecting the test type invalidates the
+ builder group. Add this concept to dashboard_base and allow specifc
+ dashboard to add their own invalidating parameters.
+
+ The result is that when the user takes a specific action, like changing
+ the test type, the builder would get reset to the default for the new
+ test type, rather than erroring or not matching the query param, as is
+ the current behavior.
+
+ Also deletes some unused code (selectBuilder).
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (invalidateQueryParameters):
+ (setQueryParameter):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+ * TestResultServer/static-dashboards/treemap.html:
+
+2013-01-30 Kiran Muppala <cmuppala@apple.com>
+
+ Disable process suppression of DumpRenderTree on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=108400
+
+ Reviewed by Jessie Berlin.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (prepareConsistentTestingEnvironment): Take assertion to prevent
+ process suppression.
+
+2013-01-30 Roger Fong <roger_fong@apple.com>
+
+ Enable tests for Windows EWS!
+ https://bugs.webkit.org/show_bug.cgi?id=107968.
+ Patch by Lucas Forschler.
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-01-30 Christophe Dumez <christophe.dumez@intel.com>
+
+ Add a StringTypeAdapter for ASCIILiteral
+ https://bugs.webkit.org/show_bug.cgi?id=108338
+
+ Reviewed by Benjamin Poulain.
+
+ Add API tests for operator+() taking an ASCIILiteral.
+
+ * TestWebKitAPI/Tests/WTF/StringOperators.cpp:
+ (TestWebKitAPI::TEST):
+
+2013-01-30 Roger Fong <roger_fong@apple.com>
+
+ Modify runtests.py script so that --skip-failing-tests option is not added when platform is cygwin.
+
+ Rubberstamped by Timothy Horton.
+
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+
+2013-01-30 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r141205.
+ http://trac.webkit.org/changeset/141205
+ https://bugs.webkit.org/show_bug.cgi?id=108353
+
+ Command for running tests on windows needs to be investigated.
+ (Requested by lforschler on #webkit).
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-01-30 Tony Chang <tony@chromium.org>
+
+ [Chromium] Enable textarea resize corner for tests
+ https://bugs.webkit.org/show_bug.cgi?id=108385
+
+ Reviewed by Ojan Vafai.
+
+ We should test what we ship. Also, this makes us pass more tests in content_shell.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset): Turn on resize corner.
+
+2013-01-30 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move custom policy delegate to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=108328
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::decidePolicyForNavigation):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::policyDelegateEnabled):
+ (WebTestRunner::WebTestRunner::policyDelegateIsPermissive):
+ (WebTestRunner::WebTestRunner::policyDelegateShouldNotifyDone):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateEnabled):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::policyDelegateIsPermissive):
+ (WebTestRunner::TestRunner::policyDelegateShouldNotifyDone):
+ (WebTestRunner::TestRunner::setCustomPolicyDelegate):
+ (WebTestRunner::TestRunner::waitForPolicyDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::decidePolicyForNavigation):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::decidePolicyForNavigation):
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-30 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt][WK1] Support better testing of Web Notifications
+ https://bugs.webkit.org/show_bug.cgi?id=107696
+
+ Reviewed by Jocelyn Turcotte.
+
+ Do not dump notification output to the console by default, instead allow the
+ tests that need this feature to enable it.
+
+ Implement denyWebNotificationPermission and removeAllWebNotificationPermissions.
+ Remove unused m_desktopNotificationAllowedOrigins variable.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::TestRunner):
+ (TestRunner::reset):
+ (TestRunner::dumpNotifications):
+ (TestRunner::grantWebNotificationPermission):
+ (TestRunner::denyWebNotificationPermission):
+ (TestRunner::removeAllWebNotificationPermissions):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+
+2013-01-30 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move methods from WebTestDelegate to WebTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=108309
+
+ Reviewed by Adam Barth.
+
+ By moving more logic to the TestRunner library, we can share more
+ code with content shell.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::createView):
+ (WebTestRunner::WebTestProxy::isSmartInsertDeleteEnabled):
+ (WebTestRunner::WebTestProxy::isSelectTrailingWhitespaceEnabled):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::isSmartInsertDeleteEnabled):
+ (WebTestRunner::WebTestRunner::isSelectTrailingWhitespaceEnabled):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::isSmartInsertDeleteEnabled):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::isSelectTrailingWhitespaceEnabled):
+ (WebTestRunner::TestRunner::setSmartInsertDeleteEnabled):
+ (WebTestRunner::TestRunner::setSelectTrailingWhitespaceEnabled):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::createView):
+ (WebTestRunner::WebTestProxyBase::isSmartInsertDeleteEnabled):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::isSelectTrailingWhitespaceEnabled):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createView):
+ (WebViewHost::didStartLoading):
+ (WebViewHost::didStopLoading):
+ (WebViewHost::isSmartInsertDeleteEnabled):
+ (WebViewHost::isSelectTrailingWhitespaceEnabled):
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-30 Kwang Yul Seo <skyul@company100.net>
+
+ Unreviewed. Add Jae Hyun Park to contributor list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-29 Alan Cutter <alancutter@chromium.org>
+
+ Need a cr-linux debug EWS bot
+ https://bugs.webkit.org/show_bug.cgi?id=98957
+
+ Reviewed by Eric Seidel.
+
+ Added cr-linux-debug-ews bot to webkit-patch, QueueStatusServer and GCE build scripts.
+
+ * EWSTools/GoogleComputeEngine/build-cr-linux-debug-ews.sh: Added.
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/config/queues.py: Added.
+ * QueueStatusServer/model/queues.py:
+ (Queue.__init__):
+ (Queue.queue_with_name):
+ (Queue.all):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (ChromiumLinuxDebugEWS):
+
+2013-01-29 Alan Cutter <alancutter@chromium.org>
+
+ Tidy up Sheriffbot's Sheriffs command's unit tests
+ https://bugs.webkit.org/show_bug.cgi?id=108262
+
+ Reviewed by Eric Seidel.
+
+ Added the use of MockWeb instead of the filesystem to test the sheriffs command.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Sheriffs._retrieve_webkit_sheriffs):
+ (Sheriffs.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_sheriffs):
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_0.js: Removed.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_1.js: Removed.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_2.js: Removed.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_malformed.js: Removed.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_zero.js: Removed.
+
+2013-01-29 Lucas Forschler <lforschler@apple.com>
+
+ Enable tests for Windows EWS!
+ https://bugs.webkit.org/show_bug.cgi?id=107968
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (WinEWS):
+
+2013-01-29 Alan Cutter <alancutter@chromium.org>
+
+ MockWeb should be able to serve mock web content
+ https://bugs.webkit.org/show_bug.cgi?id=108240
+
+ Reviewed by Dirk Pranke.
+
+ Added the ability to have MockWeb serve mock web data.
+
+ * Scripts/webkitpy/common/host_mock.py:
+ (MockHost.__init__):
+ * Scripts/webkitpy/common/net/web_mock.py:
+ (MockWeb.__init__):
+ (MockWeb.get_binary):
+
+2013-01-29 Jessie Berlin <jberlin@apple.com>
+
+ run-api-tests should have an option to specify root
+ https://bugs.webkit.org/show_bug.cgi?id=108210
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/run-api-tests:
+ Add the option and use it to set the configuration product directory. Since it is supposed
+ to point to the built products, do not build the products if root is specified (this mimics
+ the behavior of run-javascriptcore-tests).
+
+2013-01-29 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
+
+ [EFL] Add Toggle fullscreen (F11) to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=108122
+
+ Reviewed by Antonio Gomes.
+
+ Adds fullscreen mode toggle (F11) option to MiniBrowser using native API.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down): Add 'F11' key handler.
+
+2013-01-29 Patrick Gansterer <paroga@webkit.org>
+
+ [CMake] Use offical Windows CE support
+ https://bugs.webkit.org/show_bug.cgi?id=108061
+
+ Reviewed by Laszlo Gombos.
+
+ Recent version of CMake has added Windows CE support, but uses a
+ slightly different interface than the patched version used before.
+ Change the command line parameters to use the offical CMake binaries.
+
+ * Scripts/webkitdirs.pm:
+ (cmakeBasedPortArguments):
+
+2013-01-29 Alan Cutter <alancutter@chromium.org>
+
+ QueueStatusServer needs pages to display historical queue data
+ https://bugs.webkit.org/show_bug.cgi?id=107659
+
+ Reviewed by Eric Seidel.
+
+ Created a /queue-charts/<queue-name> handler to present queue and patch data using Google Chart Tools.
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/config/charts.py: Copied from Tools/QueueStatusServer/model/queuelog.py.
+ (get_time_unit):
+ * QueueStatusServer/filters/webkit_extras.py:
+ (webkit_linkify):
+ (webkit_bug_id):
+ (webkit_attachment_id):
+ (results_link):
+ (queue_status_link):
+ (queue_charts_link):
+ * QueueStatusServer/handlers/queuecharts.py: Added.
+ (QueueCharts):
+ (QueueCharts.get):
+ (QueueCharts._get_min_med_max):
+ (QueueCharts._get_patch_data):
+ (QueueCharts._get_patch_logs):
+ (QueueCharts._get_queue_data):
+ (QueueCharts._get_queue_logs):
+ (QueueCharts._get_time_unit):
+ (QueueCharts._get_timestamp):
+ (QueueCharts._get_view_range):
+ * QueueStatusServer/handlers/queuestatus.py:
+ (QueueStatus.get):
+ * QueueStatusServer/index.yaml:
+ * QueueStatusServer/main.py:
+ * QueueStatusServer/model/queuelog.py:
+ (QueueLog):
+ (QueueLog.create_key):
+ (QueueLog.get_at):
+ (QueueLog.get_current):
+ (QueueLog.get_or_create):
+ (QueueLog._get_or_create_txn):
+ * QueueStatusServer/stylesheets/charts.css: Added.
+ (.chart):
+ (.choices):
+ * QueueStatusServer/templates/queuecharts.html: Added.
+ * QueueStatusServer/templates/queuestatus.html:
+
+2013-01-29 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ [GTK] Missing build flags when building with Harfbuzz
+ https://bugs.webkit.org/show_bug.cgi?id=108174
+
+ Reviewed by Martin Robinson.
+
+ Add FREETYPE_CFLAGS and FREETYPE_LIBS to makefiles so -lharfbuzz
+ parameter will be added to linking lines when needed.
+
+ * GNUmakefile.am: Added FREETYPE_CFLAGS and FREETYPE_LIBS.
+ * MiniBrowser/gtk/GNUmakefile.am: Ditto.
+ * TestWebKitAPI/GNUmakefile.am: Ditto.
+
+2013-01-29 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Implement resources API using injected bundle
+ https://bugs.webkit.org/show_bug.cgi?id=107457
+
+ Reviewed by Sam Weinig.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Unksip resources unit tests.
+
+2013-01-29 Michael Brüning <michael.bruning@digia.com>
+
+ Unreviewed, updated my email information.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-29 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] delete DRTTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=108082
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.cpp: Removed.
+ * DumpRenderTree/chromium/DRTTestRunner.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::testFinished):
+ (WebTestRunner::WebTestDelegate::testTimedOut):
+ (WebTestRunner::WebTestDelegate::isBeingDebugged):
+ (WebTestRunner::WebTestDelegate::layoutTestTimeout):
+ (WebTestRunner::WebTestDelegate::closeRemainingWindows):
+ (WebTestRunner::WebTestDelegate::navigationEntryCount):
+ (WebTestRunner::WebTestDelegate::windowCount):
+ (WebTestRunner::WebTestDelegate::setCustomPolicyDelegate):
+ (WebTestRunner::WebTestDelegate::waitForPolicyDelegate):
+ (WebTestRunner::WebTestDelegate::goToOffset):
+ (WebTestRunner::WebTestDelegate::reload):
+ (WebTestRunner::WebTestDelegate::loadURLForFrame):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::policyDelegateDone):
+ (WebTestRunner::WebTestRunner::shouldInterceptPostMessage):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::WorkQueue::~WorkQueue):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::WorkQueue::processWorkSoon):
+ (WebTestRunner::TestRunner::WorkQueue::processWork):
+ (WebTestRunner::TestRunner::WorkQueue::reset):
+ (WebTestRunner::TestRunner::WorkQueue::addWork):
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::policyDelegateDone):
+ (WebTestRunner::TestRunner::shouldInterceptPostMessage):
+ (WebTestRunner::TestRunner::waitUntilDone):
+ (WebTestRunner::TestRunner::notifyDone):
+ (WebTestRunner::TestRunner::completeNotifyDone):
+ (WorkItemBackForward):
+ (WebTestRunner::WorkItemBackForward::WorkItemBackForward):
+ (WebTestRunner::WorkItemBackForward::run):
+ (WebTestRunner::TestRunner::queueBackNavigation):
+ (WebTestRunner::TestRunner::queueForwardNavigation):
+ (WorkItemReload):
+ (WebTestRunner::WorkItemReload::run):
+ (WebTestRunner::TestRunner::queueReload):
+ (WorkItemLoadingScript):
+ (WebTestRunner::WorkItemLoadingScript::WorkItemLoadingScript):
+ (WebTestRunner::WorkItemLoadingScript::run):
+ (WorkItemNonLoadingScript):
+ (WebTestRunner::WorkItemNonLoadingScript::WorkItemNonLoadingScript):
+ (WebTestRunner::WorkItemNonLoadingScript::run):
+ (WebTestRunner::TestRunner::queueLoadingScript):
+ (WebTestRunner::TestRunner::queueNonLoadingScript):
+ (WorkItemLoad):
+ (WebTestRunner::WorkItemLoad::WorkItemLoad):
+ (WebTestRunner::WorkItemLoad::run):
+ (WebTestRunner::TestRunner::queueLoad):
+ (WorkItemLoadHTMLString):
+ (WebTestRunner::WorkItemLoadHTMLString::WorkItemLoadHTMLString):
+ (WebTestRunner::WorkItemLoadHTMLString::run):
+ (WebTestRunner::TestRunner::queueLoadHTMLString):
+ (WebTestRunner::TestRunner::locationChangeDone):
+ (WebTestRunner::TestRunner::windowCount):
+ (WebTestRunner::TestRunner::setCloseRemainingWindowsWhenComplete):
+ (WebTestRunner::TestRunner::setCustomPolicyDelegate):
+ (WebTestRunner::TestRunner::waitForPolicyDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ (WorkItem):
+ (WebTestRunner::TestRunner::WorkItem::~WorkItem):
+ (WorkQueue):
+ (WebTestRunner::TestRunner::WorkQueue::WorkQueue):
+ (WebTestRunner::TestRunner::WorkQueue::setFrozen):
+ (WebTestRunner::TestRunner::WorkQueue::isEmpty):
+ (WebTestRunner::TestRunner::WorkQueue::taskList):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ (TestShell::runFileTest):
+ (TestShell::loadURL):
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::testRunner):
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::testFinished):
+ (WebViewHost::testTimedOut):
+ (WebViewHost::isBeingDebugged):
+ (WebViewHost::layoutTestTimeout):
+ (WebViewHost::closeRemainingWindows):
+ (WebViewHost::navigationEntryCount):
+ (WebViewHost::windowCount):
+ (WebViewHost::setCustomPolicyDelegate):
+ (WebViewHost::waitForPolicyDelegate):
+ (WebViewHost::goToOffset):
+ (WebViewHost::reload):
+ (WebViewHost::loadURLForFrame):
+ (WebViewHost::shutdown):
+ (WebViewHost::testRunner):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebTestRunner):
+ (WebViewHost):
+
+2013-01-28 Timothy Loh <timloh@chromium.com>
+
+ Refactor ChangeLog and PrepareChangeLog to use FileSystem objects
+ https://bugs.webkit.org/show_bug.cgi?id=107903
+
+ Reviewed by Eric Seidel.
+
+ To make ChangeLog and PrepareChangeLog easier to test, we can use
+ FileSystem objects instead of just passing around paths.
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLog.__init__):
+ (ChangeLog.parse_latest_entry_from_file):
+ (ChangeLog.parse_entries_from_file):
+ (ChangeLog.latest_entry):
+ (ChangeLog.update_with_unreviewed_message):
+ (ChangeLog.set_reviewer):
+ (ChangeLog.set_short_description_and_bug_url):
+ (ChangeLog.delete_entries):
+ (ChangeLog.prepend_text):
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (ChangeLogTest):
+ (test_parse_log_entries_from_changelog):
+ (test_latest_entry_parse_single_entry):
+ (test_set_reviewer):
+ (test_set_short_description_and_bug_url):
+ (test_delete_entries):
+ (test_prepend_text):
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ (ReadableTextFileObject.__init__):
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog._ensure_bug_url):
+ (PrepareChangeLog._resolve_existing_entry):
+ (PrepareChangeLog.run):
+ * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
+ (test_ensure_bug_url):
+ * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
+ (_assert_message_for_revert_output):
+
+2013-01-28 Raymond Toy <rtoy@google.com>
+
+ Add myself to committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=107992
+
+ Reviewed by kbr@google.com.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-28 Joseph Pecoraro <pecoraro@apple.com>
+
+ [Mac] Update PageVisibilityState when WebView is hidden / visible
+ https://bugs.webkit.org/show_bug.cgi?id=107509
+
+ Reviewed by Sam Weinig.
+
+ Add a test that PageVisibility of WK1 WebViews and WK2 WKViews
+ automatically changes between hidden and visible as the view is added
+ and removed from window, or when it is in a window that changes
+ visibility, for instance by minimizing / deminimizing.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html: Added.
+ * TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm: Added.
+ (-[PageVisibilityStateDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
+ (runJavaScriptAlert):
+ (PageVisibilityStateWithWindowChanges):
+ (TestWebKitAPI::PageVisibilityStateWithWindowChanges::initializeView):
+ (TestWebKitAPI::PageVisibilityStateWithWindowChanges::teardownView):
+ (TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
+ (TestWebKitAPI::TEST_F):
+ Test visibility state of a page in a WebView/WKView with different window states.
+
+ * TestWebKitAPI/mac/WebKitAgnosticTest.h:
+ * TestWebKitAPI/mac/WebKitAgnosticTest.mm:
+ (TestWebKitAPI::WebKitAgnosticTest::teardownView):
+ (TestWebKitAPI::WebKitAgnosticTest::runWebKit1Test):
+ (TestWebKitAPI::WebKitAgnosticTest::runWebKit2Test):
+ Add a WK1 and WK2 teardownView to balance initializeView.
+
+2013-01-28 Joseph Pecoraro <pecoraro@apple.com>
+
+ Improve PageVisibility API with enums
+ https://bugs.webkit.org/show_bug.cgi?id=107364
+
+ Reviewed by Sam Weinig.
+
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::resetPageVisibility):
+ (TestRunner::setPageVisibility):
+ Update the WK1 test code to use the new WK1 enums.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::setVisibilityState):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setPageVisibility):
+ (WTR::TestRunner::resetPageVisibility):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::setVisibilityState):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ Update the WK2 test code to use the new WK2 API and enums.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::setPageVisibilityStateWithEvalContinuation):
+ (TestWebKitAPI::assertSerializedScriptValueIsStringValue):
+ (TestWebKitAPI::didRunStep1StateChangeVisibleToHidden):
+ (TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender):
+ (TestWebKitAPI::didRunStep3StateChangePrerenderToPreview):
+ (TestWebKitAPI::didRunStep4InStatePreview):
+ (TestWebKitAPI::TEST):
+ Test the new WK2 API with all enum types.
+
+2013-01-28 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove temporary define used for updating TestRunner API
+
+ Unreviewed. Clean-up change.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+
+2013-01-28 James Craig <james@cookiecrook.com>
+
+ HTML5 promotes DL from specific 'definition list' to superset 'description list'; accessibility strings and accessors should be updated to match.
+ https://bugs.webkit.org/show_bug.cgi?id=107650
+
+ Reviewed by Chris Fleizach.
+
+ Updating accessibility strings and accessors for DL/DT/DD.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Utilities.js:
+ (createDescriptionList):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ViewController.js:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+
+2013-01-28 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK][WTR] Update layoutTestController.pathToLocalResource
+ https://bugs.webkit.org/show_bug.cgi?id=107538
+
+ Reviewed by Martin Robinson.
+
+ * WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
+ (WTR::TestRunner::pathToLocalResource): Update implementation based on
+ DRT code.
+
+2013-01-28 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK][WTR] Move getTopLevelPath() to utilities file
+ https://bugs.webkit.org/show_bug.cgi?id=107541
+
+ Reviewed by Martin Robinson.
+
+ * WebKitTestRunner/GNUmakefile.am: Add new files.
+ * WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
+ (WTR::getOutputDir): Uses the moved method from InjectedBundleUtilities.
+ * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp: Added.
+ (WTR):
+ (WTR::topLevelPath): Implementation moved from ActivateFontsGtk.
+ * WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h: Added.
+ (WTR): Add new method header and documentation.
+
+2013-01-28 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL] Include Ecore_Getopt.h in MiniBrowser.
+ https://bugs.webkit.org/show_bug.cgi?id=108067
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Be explicit and include Ecore_Getopt.h since we use it for parsing
+ command line options. It is safer than relying on other headers
+ including it for us.
+
+ * MiniBrowser/efl/main.c:
+
+2013-01-28 Renata Hodovan <reni@webkit.org>
+
+ [WK2] Putting QtWebProcess into a chrooted sandbox
+ https://bugs.webkit.org/show_bug.cgi?id=90005
+
+ Reviewed by Anders Carlsson and Zoltan Herczeg.
+
+ Add feature flag for suid sandbox in linux.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-27 David Farler <dfarler@apple.com>
+
+ REGRESSION (r140912): Broke specifying non-trivial ARCHS value to make / build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=108028
+
+ Reviewed by Dan Bernstein.
+
+ * DumpRenderTree/Makefile: Reverted.
+ * Makefile: Reverted.
+ * Scripts/webkitdirs.pm: Reverted.
+
+2013-01-27 Zoltan Arvai <zarvai@inf.u-szeged.hu>
+
+ Fixing atomicIncrement implementation for Windows by dropping support before XP SP2.
+ https://bugs.webkit.org/show_bug.cgi?id=106740
+
+ Reviewed by Benjamin Poulain.
+
+ * DumpRenderTree/config.h:
+ * WinLauncher/stdafx.h:
+
+2013-01-26 David Farler <dfarler@apple.com>
+
+ Makefiles should work for arbitrary SDKs and architectures on Apple ports
+ https://bugs.webkit.org/show_bug.cgi?id=107863
+
+ Reviewed by David Kilzer.
+
+ * Makefile:
+ Added temporary filters for projects not yet building on iOS.
+ * DumpRenderTree/Makefile:
+ Building with iOS SDKs -> -target All-iOS
+ * Scripts/webkitdirs.pm:
+ (determineConfiguration):
+ Added --configuration switch detection.
+ (determineArchitecture):
+ Added --architecture and ARCH=(.*) switch detection.
+ (argumentsForConfiguration):
+ (determineXcodeSDK):
+ Look for --device, --simulator, and --sdk switches.
+ (xcodeSDK):
+ Added.
+ (XcodeOptions):
+ Determine Xcode SDK and generate -arch switches.
+
+2013-01-25 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move tracking of the top loading frame to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=107948
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::WorkQueue::processWorkSoon):
+ (DRTTestRunner::WorkQueue::processWork):
+ (DRTTestRunner::completeNotifyDone):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::setTopLoadingFrame):
+ (WebTestRunner::WebTestRunner::topLoadingFrame):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setTopLoadingFrame):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::topLoadingFrame):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ (WebTestRunner::TestRunner::locationChangeDone):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didStartProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didFailProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didFailLoad):
+ (WebTestRunner::WebTestProxyBase::didFinishLoad):
+ (WebTestRunner::WebTestProxyBase::locationChangeDone):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::reset):
+ (WebViewHost::updateURL):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r140774.
+ http://trac.webkit.org/changeset/140774
+ https://bugs.webkit.org/show_bug.cgi?id=107932
+
+ Tests ScrollingCoordinatorChromiumTest.fastScrollingByDefault
+ and fastScrollingForFixedPosition are failing (Requested by
+ keishi on #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ (WebViewHost::setWebWidget):
+
+2013-01-25 Alan Cutter <alancutter@chromium.org>
+
+ Quick fix for Chromium EWS bots running out of space due to a tmp file leak
+ https://bugs.webkit.org/show_bug.cgi?id=107905
+
+ Reviewed by Eric Seidel.
+
+ Added line to EWS loop to clear /tmp of known Chromium test leak.
+ Directories named ".org.chromium.Chromium.XXXXXX" not getting cleaned up.
+
+ * EWSTools/start-queue.sh:
+
+2013-01-25 Ryosuke Niwa <rniwa@webkit.org>
+
+ Update Anne's email address
+ https://bugs.webkit.org/show_bug.cgi?id=107866
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-24 Alan Cutter <alancutter@chromium.org>
+
+ HTTP 500 error between QueueStatusServer and bot(s)
+ https://bugs.webkit.org/show_bug.cgi?id=107184
+
+ Reviewed by Adam Barth.
+
+ Removed the use of memcache which was the source of the exception.
+
+ * QueueStatusServer/handlers/updatestatus.py:
+ (UpdateStatus.post):
+ * QueueStatusServer/model/attachment.py:
+ (Attachment):
+ (Attachment.summary):
+
+2013-01-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r140653.
+ http://trac.webkit.org/changeset/140653
+ https://bugs.webkit.org/show_bug.cgi?id=107916
+
+ Causes a temp file leak on the bots (Requested by abarth on
+ #webkit).
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::resetTestController):
+
+2013-01-24 Eric Seidel <eric@webkit.org>
+
+ Skip haslanded_unittest.py on systems which do not have interdiff installed
+ https://bugs.webkit.org/show_bug.cgi?id=106402
+
+ Unreviewed.
+
+ * Scripts/webkitpy/tool/steps/haslanded_unittest.py:
+ (HasLandedTest):
+
+2013-01-24 Ryosuke Niwa <rniwa@webkit.org>
+
+ Disable the failing webkitpy test for now.
+
+ * Scripts/webkitpy/tool/steps/haslanded_unittest.py:
+
+2013-01-24 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Fixing the diff_parser to correctly identify git diffs even with leading comments.
+ https://bugs.webkit.org/show_bug.cgi?id=107871
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/diff_parser.py:
+ * Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
+ * Scripts/webkitpy/tool/steps/haslanded.py:
+
+2013-01-24 James Robinson <jamesr@chromium.org>
+
+ [chromium] Remove dead transitional code from WebViewImpl
+ https://bugs.webkit.org/show_bug.cgi?id=107889
+
+ Reviewed by Adrienne Walker.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ (WebViewHost::setWebWidget):
+
+2013-01-24 Joshua Bell <jsbell@chromium.org>
+
+ Add watchlist for IndexedDB development, and add myself and others.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-01-24 Martin Robinson <mrobinson@igalia.com>
+
+ Abstract the logic for appending a UChar32 onto StringBuilder
+ https://bugs.webkit.org/show_bug.cgi?id=107505
+
+ Reviewed by Darin Adler.
+
+ * TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
+ (TestWebKitAPI::TEST): Added a simple test for appending UChar32.
+
+2013-01-24 Erik Arvidsson <arv@chromium.org>
+
+ Unreviewed, rolling out r140703.
+ http://trac.webkit.org/changeset/140703
+ https://bugs.webkit.org/show_bug.cgi?id=107556
+
+ r140561 was not the reason for the Android breakage
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::~TestShell):
+ (TestShell::closeWindow):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::WebViewHost):
+ (WebViewHost::~WebViewHost):
+ (WebViewHost::shutdown):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-24 Dean Jackson <dino@apple.com>
+
+ Allow some plugin snapshot UI content to come from Injected Bundle
+ https://bugs.webkit.org/show_bug.cgi?id=107852
+
+ Reviewed by Anders Carlsson.
+
+ Null implementations of plugInStartLabelTitle, plugInStartLabelSubtitle and
+ plugInExtraStyleSheet.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage):
+
+2013-01-24 Erik Arvidsson <arv@chromium.org>
+
+ Unreviewed, rolling out r140561.
+ http://trac.webkit.org/changeset/140561
+ https://bugs.webkit.org/show_bug.cgi?id=107556
+
+ Suspected to break Android which prevens WebKit roll
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::~TestShell):
+ (TestShell::closeWindow):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::WebViewHost):
+ (WebViewHost::~WebViewHost):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-24 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Adding "has-landed" command to webkit-patch which compares a
+ committed patch to the changes which exist locally (ignoring the
+ ChangeLog file).
+
+ https://bugs.webkit.org/show_bug.cgi?id=106402
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/diff_parser.py:
+ (git_diff_to_svn_diff):
+ * Scripts/webkitpy/common/net/bugzilla/bug.py:
+ (Bug.commit_revision):
+ * Scripts/webkitpy/common/net/bugzilla/bug_unittest.py:
+ (BugTest.test_is_in_comments):
+ (BugTest):
+ (BugTest.test_commit_revision):
+ * Scripts/webkitpy/tool/commands/upload.py:
+ (HasLanded):
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/haslanded.py: Added.
+ (HasLanded):
+ (HasLanded.convert_to_svn):
+ (HasLanded.strip_change_log):
+ (run):
+
+ * Scripts/webkitpy/common/net/bugzilla/bug.py:
+ (Bug.commit_revision):
+ * Scripts/webkitpy/common/net/bugzilla/bug_unittest.py:
+ (BugTest.test_is_in_comments):
+ (BugTest):
+ (BugTest.test_commit_revision):
+ * Scripts/webkitpy/tool/commands/upload.py:
+ (HasLanded):
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/haslanded.py: Added.
+ (HasLanded):
+ (HasLanded.convert_to_svn):
+ (HasLanded.strip_change_log):
+ (HasLanded.diff_diff):
+ (HasLanded.run):
+ * Scripts/webkitpy/tool/steps/haslanded_unittest.py: Added.
+ (HasLandedTest):
+ (HasLandedTest.test_run):
+ (test_convert_to_svn_and_strip_change_log):
+
+2013-01-24 Dan Carney <dcarney@google.com>
+
+ [chromium] move most WebViewHost printf calls to WebTestProxy
+ https://bugs.webkit.org/show_bug.cgi?id=107553
+
+ Reviewed by Jochen Eisinger.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::unableToImplementPolicyWithError):
+ (WebTestRunner::WebTestProxy::didAddMessageToConsole):
+ (WebTestRunner::WebTestProxy::runModalAlertDialog):
+ (WebTestRunner::WebTestProxy::runModalConfirmDialog):
+ (WebTestRunner::WebTestProxy::runModalPromptDialog):
+ (WebTestRunner::WebTestProxy::runModalBeforeUnloadDialog):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::reset):
+ (WebTestRunner::WebTestProxyBase::setLogConsoleOutput):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::unableToImplementPolicyWithError):
+ (WebTestRunner::WebTestProxyBase::didAddMessageToConsole):
+ (WebTestRunner::WebTestProxyBase::runModalAlertDialog):
+ (WebTestRunner::WebTestProxyBase::runModalConfirmDialog):
+ (WebTestRunner::WebTestProxyBase::runModalPromptDialog):
+ (WebTestRunner::WebTestProxyBase::runModalBeforeUnloadDialog):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::showDevTools):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didAddMessageToConsole):
+ (WebViewHost::runModalAlertDialog):
+ (WebViewHost::runModalConfirmDialog):
+ (WebViewHost::runModalPromptDialog):
+ (WebViewHost::runModalBeforeUnloadDialog):
+ (WebViewHost::unableToImplementPolicyWithError):
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-23 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Give webkit_support a chance to reset state between layout test runs
+ https://bugs.webkit.org/show_bug.cgi?id=107132
+
+ Reviewed by Adam Barth.
+
+ We currently only have need for this on OS(ANDROID), but now it
+ would be useful to have a hook for resetting state on all
+ platforms. Will soon be using this for IDBFactory initialization.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::resetTestController): Call webkit_support::ResetTestEnvironment()
+
+2013-01-23 Alan Cutter <alancutter@chromium.org>
+
+ QueueStatusServer crashes in production on next-patch
+ https://bugs.webkit.org/show_bug.cgi?id=107775
+
+ Reviewed by Adam Barth.
+
+ Replaced Python 2.5 incompatible call to timedelta.total_seconds().
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/model/patchlog.py:
+ (PatchLog.calculate_wait_duration):
+ (PatchLog.calculate_process_duration):
+ (PatchLog):
+ (PatchLog._time_delta_to_seconds):
+
+2013-01-23 Ryosuke Niwa <rniwa@webkit.org>
+
+ The previous patch wasn't complete. Finish reverting r139998 for real.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js:
+ (ProfilerAgent.getProfile):
+
+2013-01-23 Ryosuke Niwa <rniwa@webkit.org>
+
+ Revert r139998 for now since the Leaks Viewer pulls in a specific version of Inspector code.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js:
+ (ProfilerAgent.getProfile):
+
+2013-01-23 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Remove unused header files in chromium/public/platform/
+ https://bugs.webkit.org/show_bug.cgi?id=107741
+
+ Reviewed by James Robinson.
+
+ These header files have migrated to the new Platform directory.
+ This patch updates the remaining #include references and removes
+ the old files that did nothing but redirect to the new ones.
+
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h:
+
+2013-01-23 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Bump webkitgtk-test-fonts dependency to cover fallbacks for Tamil, Bengali, and others
+ https://bugs.webkit.org/show_bug.cgi?id=107727
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * gtk/jhbuild.modules: Update the JHBuild moduleset to point to the new webkitgtk-test-fonts.
+ We are using the git repository now that github has deprecated the downloads feature.
+
+2013-01-23 Tony Chang <tony@chromium.org>
+
+ Unreviewed, set svn:eol-style to CRLF on Windows .sln files.
+
+ * CLWrapper/CLWrapper.sln: Modified property svn:eol-style.
+ * DumpRenderTree/DumpRenderTree.sln: Modified property svn:eol-style.
+ * MIDLWrapper/MIDLWrapper.sln: Modified property svn:eol-style.
+ * WebKitTestRunner/WebKitTestRunner.sln: Modified property svn:eol-style.
+
+2013-01-23 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Update some #includes in DumpRenderTree for headers in the new Platform directory
+ https://bugs.webkit.org/show_bug.cgi?id=107145
+
+ Reviewed by Adam Barth.
+
+ Part of a larger refactoring series; see tracking bug 82948.
+
+ * DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h:
+ * DumpRenderTree/chromium/DRTDevToolsClient.h:
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ * DumpRenderTree/chromium/MockWebPrerenderingSupport.h:
+ * DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
+ * DumpRenderTree/chromium/MockWebSpeechInputController.h:
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ * DumpRenderTree/chromium/TestNavigationController.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.h:
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ * DumpRenderTree/chromium/TestShell.cpp:
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.h:
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp:
+ * DumpRenderTree/chromium/WebThemeEngineDRTWin.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+
+2013-01-23 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Use after free in plugins/geturlnotify-during-document-teardown.html
+ https://bugs.webkit.org/show_bug.cgi?id=107556
+
+ Reviewed by Tony Chang.
+
+ WebViewHost initiates a navigation to about:blank in its destructor.
+ However, since WebTestProxy inherits from WebViewHost, at this point
+ the WebViewClient and WebFrameClient interfaces are already partially
+ destructed resulting in the use after free.
+
+ This does not affect the chromium implementation since it doesn't
+ invoke WebKit API methods in its destructor.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::~TestShell):
+ (TestShell::closeWindow):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::WebViewHost):
+ (WebViewHost::~WebViewHost):
+ (WebViewHost::shutdown):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-23 Andrei Bucur <abucur@adobe.com>
+
+ [CSS Regions] Create Regions watchlist
+ https://bugs.webkit.org/show_bug.cgi?id=107281
+
+ Reviewed by Adam Barth.
+
+ This patch adds 4 new definitions:
+ - RegionsDevelopment - used to track the development progress for regions
+ - RegionsExpectationsMore and RegionsExpectationsLess - used to track expectations changes for the regions tests
+ - RegionsUsage - used to track changes that make use of regions in all the code base
+
+ For now, the Adobe internal tracker is the only email address listening for these patterns.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-01-22 Pavel Feldman <pfeldman@chromium.org>
+
+ Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
+ https://bugs.webkit.org/show_bug.cgi?id=107523
+
+ Reviewed by Yury Semikhatsky.
+
+ * DumpRenderTree/chromium/DRTDevToolsClient.cpp:
+ (DRTDevToolsClient::isUnderTest):
+ (DRTDevToolsClient::call):
+ * DumpRenderTree/chromium/DRTDevToolsClient.h:
+ (DRTDevToolsClient):
+
+2013-01-23 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Removing command line shortening as it makes it difficult to see the command during errors.
+ https://bugs.webkit.org/show_bug.cgi?id=107643
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (ScriptError):
+ (ScriptError.__init__):
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+
+2013-01-23 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Adding myself as contributor in committers.py (as requested by eseidel).
+ https://bugs.webkit.org/show_bug.cgi?id=107647
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-22 Alan Cutter <alancutter@chromium.org>
+
+ Add monitoring of patches and queues to the QueueStatusServer
+ https://bugs.webkit.org/show_bug.cgi?id=107612
+
+ Reviewed by Adam Barth.
+
+ Created classes for recording events into the datastore and integrated them into the existing handlers.
+ Code for presenting the recorded data will come in a separate patch.
+
+ * QueueStatusServer/app.yaml:
+ * QueueStatusServer/config/__init__.py: Added.
+ * QueueStatusServer/config/logging.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
+ * QueueStatusServer/config/messages.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
+ * QueueStatusServer/handlers/nextpatch.py:
+ (NextPatch.get):
+ (NextPatch._assign_patch):
+ * QueueStatusServer/handlers/releasepatch.py:
+ (ReleasePatch.post):
+ * QueueStatusServer/handlers/updatestatus.py:
+ (UpdateStatus.post):
+ * QueueStatusServer/handlers/updateworkitems.py:
+ (UpdateWorkItems._parse_work_items_string):
+ (UpdateWorkItems):
+ (UpdateWorkItems._update_work_items_from_request):
+ (UpdateWorkItems._queue_from_request):
+ (UpdateWorkItems.post):
+ * QueueStatusServer/loggers/__init__.py: Added.
+ * QueueStatusServer/loggers/recordbotevent.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
+ (RecordBotEvent):
+ (RecordBotEvent.activity):
+ * QueueStatusServer/loggers/recordpatchevent.py: Added.
+ (RecordPatchEvent):
+ (RecordPatchEvent.added):
+ (RecordPatchEvent.retrying):
+ (RecordPatchEvent.started):
+ (RecordPatchEvent.stopped):
+ (RecordPatchEvent.updated):
+ (RecordPatchEvent._get_patches_waiting):
+ * QueueStatusServer/model/patchlog.py: Copied from Tools/QueueStatusServer/model/queuestatus.py.
+ (PatchLog):
+ (PatchLog.lookup):
+ (PatchLog.calculate_wait_duration):
+ (PatchLog.calculate_process_duration):
+ * QueueStatusServer/model/queuelog.py: Copied from Tools/QueueStatusServer/handlers/nextpatch.py.
+ (QueueLog):
+ (QueueLog.get_current):
+ (QueueLog.create_key):
+ * QueueStatusServer/model/queuestatus.py:
+ (QueueStatus.is_retry_request):
+
+2013-01-22 Timothy Loh <timloh@chromium.com>
+
+ prepare-Changelog should support updating the list of changed files
+ https://bugs.webkit.org/show_bug.cgi?id=74358
+
+ Reviewed by Eric Seidel.
+
+ Needing to re-make ChangeLog entries when the list of files/functions
+ changes is a bit annoying, it'd be nice to have this more automated.
+ This patch makes `webkit-patch update' update the date line and bug
+ description if needed, and if the list of changed files/functions has
+ changed, either updates the list (if there are no annotations), or
+ otherwise appends the new list below.
+
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog._resolve_existing_entry):
+ (PrepareChangeLog):
+ (PrepareChangeLog._merge_entries):
+ (PrepareChangeLog.run):
+ * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
+ (PrepareChangeLogTest.test_resolve_existing_entry):
+ (make_entry):
+ (test_ensure_bug_url):
+
+2013-01-22 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Use Python 2.7 unittest syntax in our unittests
+ https://bugs.webkit.org/show_bug.cgi?id=105607
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/**/*_unittest.py:
+
+2013-01-22 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Convert disable-msg to disable for new pylint.
+ https://bugs.webkit.org/show_bug.cgi?id=107627
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVNRepository.has_authorization_for_realm):
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (Builder.force_build):
+ * Scripts/webkitpy/common/system/executive_mock.py:
+ (MockExecutive2.run_command):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.reference_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.test_default_configuration):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_expectations_ordering):
+ * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
+ (HttpServerBase._check_that_all_ports_are_available):
+ * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
+ (AbstractLocalServerCommand.execute):
+ * Scripts/webkitpy/tool/commands/download.py:
+ (AbstractPatchProcessingCommand):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (AbstractParallelRebaselineCommand):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (_BaseTestCase.setUp):
+ (TestAnalyzeBaselines.setUp):
+
+2013-01-22 Frank Farzan <frankf@chromium.org>
+
+ Flakiness dashboard: update builders.jsonp
+ https://bugs.webkit.org/show_bug.cgi?id=107610
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/builders.jsonp:
+
+2013-01-22 Frank Farzan <frankf@chromium.org>
+
+ Add Android instrumentation tests from ChromiumLinux waterfall
+ https://bugs.webkit.org/show_bug.cgi?id=107597
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (loadBuildersList):
+
+2013-01-21 Kentaro Hara <haraken@chromium.org>
+
+ Implement UIEvent constructor
+ https://bugs.webkit.org/show_bug.cgi?id=107430
+
+ Reviewed by Adam Barth.
+
+ Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
+
+ UIEvent constructor is implemented under a DOM4_EVENTS_CONSTRUCTOR flag,
+ which is enabled on Safari and Chromium for now.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-22 Timothy Loh <timloh@chromium.com>
+
+ Add functions to ChangeLog - parse bug desc/changed functions, delete/prepend entries
+ https://bugs.webkit.org/show_bug.cgi?id=107478
+
+ Reviewed by Eric Seidel.
+
+ On the road to resolving Bug 74358, we need a few more functions in
+ changelog.py.
+ To make things easier to mock, change @staticmethods to @classmethods.
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLogEntry):
+ (ChangeLogEntry._parse_reviewer_text):
+ (ChangeLogEntry._split_contributor_names):
+ (ChangeLogEntry._parse_author_name_and_email):
+ (ChangeLogEntry._parse_author_text):
+ (ChangeLogEntry._parse_touched_functions):
+ (ChangeLogEntry._parse_bug_description):
+ (ChangeLogEntry._parse_entry):
+ (ChangeLogEntry.date_line):
+ (ChangeLogEntry.bug_description):
+ (ChangeLogEntry.touched_functions):
+ (ChangeLogEntry.touched_files_text):
+ (ChangeLogEntry.is_touched_files_text_clean):
+ (ChangeLog):
+ (ChangeLog.parse_latest_entry_from_file):
+ (ChangeLog._separate_revision_and_line):
+ (ChangeLog.parse_entries_from_file):
+ (ChangeLog.set_short_description_and_bug_url):
+ (ChangeLog.delete_entries):
+ (ChangeLog.prepend_text):
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_parse_log_entries_from_changelog):
+ (test_latest_entry_parse):
+ (test_set_short_description_and_bug_url):
+ (test_delete_entries):
+ (test_prepend_text):
+
+2013-01-22 Lucas Forschler <lforschler@apple.com>
+
+ Create a MAC EWS startup shell script.
+
+ Reviewed by Ryosuke Niwa.
+
+ * EWSTools/start-queue-mac.sh: Added.
+
+2013-01-22 Joseph Pecoraro <pecoraro@apple.com>
+
+ [Mac] Enable Page Visibility (PAGE_VISIBILITY_API)
+ https://bugs.webkit.org/show_bug.cgi?id=107230
+
+ Reviewed by David Kilzer.
+
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::resetPageVisibility):
+ Fix a typo in the original implementation. resetPageVisibility should
+ pass initialState YES so an event is not dispatched, which causes
+ issues in multiple tests. This now matches other ports.
+
+2013-01-22 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Enable CSS Image Orientation feature
+ https://bugs.webkit.org/show_bug.cgi?id=99040
+
+ Reviewed by Martin Robinson.
+
+ Enable the CSS Image Orientation feature in the development
+ builds of the GTK port. The feature is still disabled in the release
+ builds.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-22 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Enable the <template> element support in development builds
+ https://bugs.webkit.org/show_bug.cgi?id=106575
+
+ Reviewed by Martin Robinson.
+
+ Enable the <template> element support in the development builds of the GTK port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-22 Zan Dobersek <zandobersek@gmail.com>
+
+ Prettify the output of the override-feature-defines script
+ https://bugs.webkit.org/show_bug.cgi?id=106542
+
+ Reviewed by Martin Robinson.
+
+ The output now clearly lists the feature defines being overridden
+ along with the default and overriding values for each feature define.
+
+ * gtk/override-feature-defines:
+ (adjust_feature_defines_makefile):
+ (adjust_feature_defines_makefile.override_feature_define):
+
+2013-01-22 Zan Dobersek <zdobersek@igalia.com>
+
+ Remove uses of deprecated unittest.TestCase aliases
+ https://bugs.webkit.org/show_bug.cgi?id=102252
+
+ Reviewed by Adam Barth.
+
+ Replace the deprecated assertEquals method of the TestCase interface
+ used in some webkitpy unittests with the assertEqual method.
+
+ * Scripts/webkitpy/common/system/profiler_unittest.py:
+ (ProfilerFactoryTest._assert_default_profiler_name):
+ (ProfilerFactoryTest.test_default_profiler_output):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ (TestHttpServer.test_win32_start_and_stop):
+
+2013-01-22 Jer Noble <jer.noble@apple.com>
+
+ REGRESSION(r140344): Repeated crashes in WKTR PlatformWebView::viewSupportsOptions().
+ https://bugs.webkit.org/show_bug.cgi?id=107562
+
+ Rubber-stamped by Alexy Proskuryakov.
+
+ The input to WKBooleanGetValue() is not NULL-safe, so NULL check its inputs before calling.
+
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::viewSupportsOptions):
+
+2013-01-22 Alexey Proskuryakov <ap@apple.com>
+
+ One is not allowed to use commit-queue to make oneself a committer.
+
+ * Scripts/webkitpy/common/config/committers.py: Removing eustas@chromium.org.
+
+2013-01-22 Eugene Klyuchnikov <eustas@chromium.org>
+
+ Add myself to commiters.py
+ https://bugs.webkit.org/show_bug.cgi?id=107546
+
+ Reviewed by Kentaro Hara.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-22 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK] Implement TestRunner::setTextDirection
+ https://bugs.webkit.org/show_bug.cgi?id=107131
+
+ Reviewed by Philippe Normand.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues): Reset direction to default value.
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::setTextDirection): Implement method using
+ gtk_widget_set_direction.
+
+2013-01-22 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move spell checking mocks to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=107455
+
+ Reviewed by Kent Tamura.
+
+ The content module doesn't provide its own WebSpellCheckClient.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::fillSpellingSuggestionList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner):
+ (WebTestProxyBase):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::makeMenuItemStringsFor):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.cpp: Renamed from Tools/DumpRenderTree/chromium/MockGrammarCheck.cpp.
+ (MockGrammarCheck::checkGrammarOfString):
+ * DumpRenderTree/chromium/TestRunner/src/MockGrammarCheck.h: Renamed from Tools/DumpRenderTree/chromium/MockGrammarCheck.h.
+ (WebKit):
+ (MockGrammarCheck):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.cpp: Renamed from Tools/DumpRenderTree/chromium/MockSpellCheck.cpp.
+ (MockSpellCheck::MockSpellCheck):
+ (MockSpellCheck::~MockSpellCheck):
+ (isNotASCIIAlpha):
+ (MockSpellCheck::spellCheckWord):
+ (MockSpellCheck::fillSuggestionList):
+ (MockSpellCheck::initializeIfNeeded):
+ * DumpRenderTree/chromium/TestRunner/src/MockSpellCheck.h: Renamed from Tools/DumpRenderTree/chromium/MockSpellCheck.h.
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.cpp: Added.
+ (WebTestRunner::SpellCheckClient::SpellCheckClient):
+ (WebTestRunner):
+ (WebTestRunner::SpellCheckClient::~SpellCheckClient):
+ (WebTestRunner::SpellCheckClient::setDelegate):
+ (WebTestRunner::SpellCheckClient::spellCheck):
+ (WebTestRunner::SpellCheckClient::checkTextOfParagraph):
+ (WebTestRunner::SpellCheckClient::requestCheckingOfText):
+ (WebTestRunner::SpellCheckClient::finishLastTextCheck):
+ (WebTestRunner::SpellCheckClient::autoCorrectWord):
+ * DumpRenderTree/chromium/TestRunner/src/SpellCheckClient.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
+ (WebTestRunner):
+ (SpellCheckClient):
+ (WebTestRunner::SpellCheckClient::taskList):
+ (WebTestRunner::SpellCheckClient::mockSpellCheck):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::setDelegate):
+ (WebTestRunner::WebTestProxyBase::spellCheckClient):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::WebViewHost):
+ (WebViewHost::setWebWidget):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-22 Krzysztof Czech <k.czech@samsung.com>
+
+ [EFL] Adds Accessibility support to wk1
+ https://bugs.webkit.org/show_bug.cgi?id=107440
+
+ Reviewed by Gyuyoung Kim.
+
+ * DumpRenderTree/efl/CMakeLists.txt: Adds ATK headers and libraries.
+
+2013-01-21 Joseph Pecoraro <pecoraro@apple.com>
+
+ [Mac] WK1 MiniBrowser should clear delegates before releasing webview
+ https://bugs.webkit.org/show_bug.cgi?id=107506
+
+ Reviewed by Dan Bernstein.
+
+ * MiniBrowser/mac/WK1BrowserWindowController.m:
+ (-[WK1BrowserWindowController dealloc]):
+
+2013-01-21 Dirk Schulze <dschulze@adobe.com>
+
+ Add build flag for Canvas's Path object (disabled by default)
+ https://bugs.webkit.org/show_bug.cgi?id=107473
+
+ Reviewed by Dean Jackson.
+
+ Add CANVAS_PATH build flag to build systems.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-21 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] Add APIs to set/get view source mode
+ https://bugs.webkit.org/show_bug.cgi?id=106633
+
+ Reviewed by Gyuyoung Kim.
+
+ Added a shotcut 'F8' in Minibrowser to display a source code
+ of the web page in a new window.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_window_create):
+ (window_create):
+ (elm_main):
+
+2013-01-21 Nico Weber <thakis@chromium.org>
+
+ [chromium] Don't archive generated source files.
+ https://bugs.webkit.org/show_bug.cgi?id=106736
+
+ Reviewed by Eric Seidel.
+
+ They shouldn't be needed to run tests. They don't need a lot of space,
+ but add many lines to the "extracting" stdout. This attempts to reduce
+ that noise a bit.
+
+ * BuildSlaveSupport/built-product-archive:
+ (archiveBuiltProduct):
+
+2013-01-21 Benjamin Poulain <benjamin@webkit.org>
+
+ Mac DumpRenderTree's installSignalHandlers() is unreachable code
+ https://bugs.webkit.org/show_bug.cgi?id=107383
+
+ Reviewed by Sam Weinig.
+
+ The CrashHandler of DumpRenderTree were originally used for restoring
+ the color profile of the main display even if DRT crashes.
+
+ That feature was later limited to pixel tests only in r29999.
+
+ In r104351, the DRT was changed to use device color space. Making the crash
+ handlers useless, but they were left in the code since the error reporting
+ code was still reachable.
+
+ Later, r124581 refactored the code and dumpPixelsForCurrentTest
+ is being used before being assigned its value.
+ This did cause any regression because the code had become useless with the previous change.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ Remove crashHandler() and installSignalHandlers() as they have become useless and
+ have been unreachable code for 6 months.
+ (dumpRenderTree):
+ Remove the code that was unreachable due to dumpPixelsForCurrentTest being always false
+ at those points.
+
+2013-01-21 Nico Weber <thakis@chromium.org>
+
+ Make ninja the default build system for build-webkit --chromium on mac
+ https://bugs.webkit.org/show_bug.cgi?id=106737
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/update-webkit-chromium:
+
+2013-01-21 Christophe Dumez <christophe.dumez@intel.com>
+
+ Regression(r140262): Causes a lot of flakiness
+ https://bugs.webkit.org/show_bug.cgi?id=107454
+
+ Reviewed by Alexey Proskuryakov.
+
+ r140262 introduced a lot of flakiness due to fixed layout mode
+ not getting disabled on the view after being enabled for
+ specific test cases. This patch makes sure fixed layout mode
+ properly gets reset in WebKitTestRunner to avoid flakiness.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::updateLayoutType):
+
+2013-01-21 Gustavo Noronha Silva <gns@gnome.org>
+
+ REGRESSION (r140285): GTK uses WKPageResourceLoadClient which was removed
+ https://bugs.webkit.org/show_bug.cgi?id=107421
+
+ Unreviewed build fix.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): skip Resource tests.
+
+2013-01-21 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WKTR] platformRunUntil() should keep the main loop running
+ https://bugs.webkit.org/show_bug.cgi?id=107442
+
+ Reviewed by Noam Rosenthal.
+
+ EFL's implementation of platformRunUntil() should keep the main loop
+ running and avoid calling sleep() between calls to
+ ecore_main_loop_iterate(). This call to sleep seems to be a source
+ of deadlocks (see Bug 106884).
+
+ * WebKitTestRunner/efl/TestControllerEfl.cpp:
+ (WTR::TestController::platformRunUntil):
+
+2013-01-21 Vivek Galatage <vivek.vg@samsung.com>
+
+ QtTestBrowser should provide way to clear selected elements
+ https://bugs.webkit.org/show_bug.cgi?id=107437
+
+ Reviewed by Simon Hausmann.
+
+ Provide a way to "Clear selection" in the "Develop" menu to clear the previous search highlight.
+ Invoke the clearSelection prior to highlighting new elements.
+
+ * QtTestBrowser/launcherwindow.cpp:
+ (ElementHighlight):
+ (LauncherWindow::createChrome):
+ (LauncherWindow::selectElements):
+ (LauncherWindow::clearSelection):
+ * QtTestBrowser/launcherwindow.h:
+ (LauncherWindow):
+
+2013-01-21 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move methods interacting with willSendRequest to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=107270
+
+ Reviewed by Kent Tamura.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::waitForPolicyDelegate):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldStayOnPageAfterHandlingBeforeUnload):
+ (WebTestRunner::WebTestRunner::httpHeadersToClear):
+ (WebTestRunner::WebTestRunner::shouldBlockRedirects):
+ (WebTestRunner::WebTestRunner::willSendRequestShouldReturnNull):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::httpHeadersToClear):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::shouldBlockRedirects):
+ (WebTestRunner::TestRunner::willSendRequestShouldReturnNull):
+ (WebTestRunner::TestRunner::setWillSendRequestClearHeader):
+ (WebTestRunner::TestRunner::setWillSendRequestReturnsNullOnRedirect):
+ (WebTestRunner::TestRunner::setWillSendRequestReturnsNull):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::willSendRequest):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::willSendRequest):
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-21 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Stop building WebKit2 on GTK EWSs
+ https://bugs.webkit.org/show_bug.cgi?id=107435
+
+ Reviewed by Philippe Normand.
+
+ The WebKit2 build of the GTK is at the moment not efficiently maintainable,
+ so stop building it on GTK EWSs.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (GtkPort.build_webkit_command):
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_gtk_port):
+
+2013-01-21 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Update the RTCPeerConnection states to match the latest specification
+ https://bugs.webkit.org/show_bug.cgi?id=107120
+
+ Reviewed by Adam Barth.
+
+ Updating mock to use the new states.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (RTCPeerConnectionStateTask::RTCPeerConnectionStateTask):
+ (MockWebRTCPeerConnectionHandler::initialize):
+ (MockWebRTCPeerConnectionHandler::updateICE):
+
+2013-01-20 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Extend diff_parser to support the --full-index output.
+ https://bugs.webkit.org/show_bug.cgi?id=107408
+
+ Reviewed by Maciej Stachowiak.
+
+ * Scripts/webkitpy/common/checkout/diff_parser.py:
+ (git_diff_to_svn_diff):
+ * Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
+ (DiffParserTest):
+ (DiffParserTest.test_git_diff_to_svn_diff):
+ (git_diff_to_svn_diff):
+
+2013-01-20 Yoshifumi Inoue <yosin@chromium.org>
+
+ Dragging over an element with scrollbars should scroll the element when dragging near edges
+ https://bugs.webkit.org/show_bug.cgi?id=39725
+
+ Reviewed by Hajime Morita.
+
+ This patch introduces canceling drag-and-drop by escape key for testing
+ behavior after cancellation drag-and-drop.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::doMouseUp):
+ (WebTestRunner::EventSender::finishDragAndDrop):
+ (WebTestRunner::EventSender::keyDown):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Added VKEY_ESCAPE.
+
+2013-01-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move frame generation related methods to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=107268
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::setWillSendRequestReturnsNull):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::display):
+ (WebTestRunner::WebTestDelegate::displayInvalidatedRegion):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::display):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::displayInvalidatedRegion):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::display):
+ (WebViewHost::displayInvalidatedRegion):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-01-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move speech related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=107266
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::displayInvalidatedRegion):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ (WebTestRunner::WebTestDelegate::addMockSpeechInputResult):
+ (WebTestRunner::WebTestDelegate::setMockSpeechInputDumpRect):
+ (WebTestRunner::WebTestDelegate::addMockSpeechRecognitionResult):
+ (WebTestRunner::WebTestDelegate::setMockSpeechRecognitionError):
+ (WebTestRunner::WebTestDelegate::wasMockSpeechRecognitionAborted):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::addMockSpeechInputResult):
+ (WebTestRunner::TestRunner::setMockSpeechInputDumpRect):
+ (WebTestRunner::TestRunner::addMockSpeechRecognitionResult):
+ (WebTestRunner::TestRunner::setMockSpeechRecognitionError):
+ (WebTestRunner::TestRunner::wasMockSpeechRecognitionAborted):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::addMockSpeechInputResult):
+ (WebViewHost::setMockSpeechInputDumpRect):
+ (WebViewHost::addMockSpeechRecognitionResult):
+ (WebViewHost::setMockSpeechRecognitionError):
+ (WebViewHost::wasMockSpeechRecognitionAborted):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-01-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move notification related methods to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=107269
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ (WebTestRunner::WebTestDelegate::grantWebNotificationPermission):
+ (WebTestRunner::WebTestDelegate::simulateLegacyWebNotificationClick):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::grantWebNotificationPermission):
+ (WebTestRunner::TestRunner::simulateLegacyWebNotificationClick):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::grantWebNotificationPermission):
+ (WebViewHost::simulateLegacyWebNotificationClick):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-01-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move geolocation related methods to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=107267
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::numberOfPendingGeolocationPermissionRequests):
+ (WebTestRunner::WebTestDelegate::setGeolocationPermission):
+ (WebTestRunner::WebTestDelegate::setMockGeolocationPosition):
+ (WebTestRunner::WebTestDelegate::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::numberOfPendingGeolocationPermissionRequests):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setGeolocationPermission):
+ (WebTestRunner::TestRunner::setMockGeolocationPosition):
+ (WebTestRunner::TestRunner::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::numberOfPendingGeolocationPermissionRequests):
+ (WebViewHost::setGeolocationPermission):
+ (WebViewHost::setMockGeolocationPosition):
+ (WebViewHost::setMockGeolocationPositionUnavailableError):
+ * DumpRenderTree/chromium/WebViewHost.h:
+
+2013-01-19 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed build fix for Qt WK2 after r140258.
+ Use the size_t type instead of unsigned for the variable
+ which holds the position of the first null character in the
+ console message.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::willAddMessageToConsole):
+
+2013-01-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r140260.
+ http://trac.webkit.org/changeset/140260
+ https://bugs.webkit.org/show_bug.cgi?id=107387
+
+ breaks fast/text/hyphens.html, fast/text/hyphenate-* (but
+ nothing else) (Requested by thakis__ on #webkit).
+
+ * Scripts/update-webkit-chromium:
+
+2013-01-19 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ Delegated scrolling: Assertion on attempt to show a CSS sticky element
+ https://bugs.webkit.org/show_bug.cgi?id=106890
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enabled fixed layout mode in WTR for 'fast/css/sticky' tests.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::shouldUseFixedLayout):
+ (WTR):
+ (WTR::updateLayoutType):
+
+2013-01-19 Nico Weber <thakis@chromium.org>
+
+ Make ninja the default build system for build-webkit --chromium on mac
+ https://bugs.webkit.org/show_bug.cgi?id=106737
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/update-webkit-chromium:
+
+2013-01-19 Zan Dobersek <zdobersek@igalia.com>
+
+ [WK2] svg/dom/fuzz-path-parser.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=107133
+
+ Reviewed by Alexey Proskuryakov.
+
+ Console messages can contain null characters before the end of string.
+ Appending such message to the StringBuilder as a WTFString appends the
+ complete string, including the null character. This later cuts off everything
+ after the null character when the string is being printed out to the test
+ output.
+
+ To avoid this, truncate the string up to the first null character. This
+ preserves the newline character appended immediately after this and
+ stops giving incorrect output.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::willAddMessageToConsole):
+
+2013-01-19 Eric Seidel <eric@webkit.org>
+
+ Update error regexps so that Parser/html-parser-srcdoc.html can "pass"
+ https://bugs.webkit.org/show_bug.cgi?id=107367
+
+ Reviewed by Ryosuke Niwa.
+
+ Using srcdoc instead of document.write changes the error output
+ ever so slightly. Clearly we were already trying to ignore these
+ messages, just not succeeding. This change makes this new test "pass" correctly.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest):
+
+2013-01-18 Dan Winship <danw@gnome.org>
+
+ REGRESSION (r139071): run-webkit-httpd complains at launch
+ https://bugs.webkit.org/show_bug.cgi?id=107310
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/webkitperl/httpd.pm:
+ (getApacheVersion): use preferred perl syntax
+
+2013-01-18 Julie Parent <jparent@chromium.org>
+
+ Add back 'group' as a default cross dashboard parameter, but with null as its value.
+ https://bugs.webkit.org/show_bug.cgi?id=107336
+
+ We need to have 'group' listed as a parameter, else we never parse it,
+ as we only parse parameters with defaults.
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+
+2013-01-18 Emil A Eklund <eae@chromium.org>
+
+ Update LayoutUnit rounding unit test
+ https://bugs.webkit.org/show_bug.cgi?id=107322
+
+ Reviewed by Levi Weintraub.
+
+ Update the LayoutUnitRounding test to use fromFloatRound for
+ values that cannot accurately be represented as a LayoutUnit
+ (the default behavior is to floor the value to the nearest
+ LayoutUnit).
+
+ * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
+ (TestWebKitAPI::TEST):
+
+2013-01-18 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ VCSUtils.pm: Stop calling git repo-config.
+ https://bugs.webkit.org/show_bug.cgi?id=107294
+
+ Reviewed by Dirk Pranke.
+
+ The `repo-config' git command has been deprecated since early
+ 2008, and recent versions have started warning it is deprecated.
+
+ Basically revert r27870 and use the `config' command all the time.
+
+ * Scripts/VCSUtils.pm:
+ (gitConfig):
+
+2013-01-18 Levi Weintraub <leviw@chromium.org>
+
+ LayoutUnit should round half consistently, not away from zero
+ https://bugs.webkit.org/show_bug.cgi?id=107208
+
+ Reviewed by Eric Seidel.
+
+ * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp: Updating to reflect and
+ cover this change in rounding behavior.
+
+2013-01-18 Tim Horton <timothy_horton@apple.com>
+
+ [mac] DumpRenderTree/WebKitTestRunner should not participate in Exposé/Mission Control
+ https://bugs.webkit.org/show_bug.cgi?id=107234
+
+ Reviewed by Simon Fraser.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (createWebViewAndOffscreenWindow): Disable participation in Exposé via NSWindowCollectionBehaviorStationary.
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView): Ditto.
+
+2013-01-18 Tim Horton <timothy_horton@apple.com>
+
+ [mac] DumpRenderTree/WebKitTestRunner should disable NSBeep
+ https://bugs.webkit.org/show_bug.cgi?id=107251
+
+ Reviewed by Simon Fraser.
+
+ Disable NSBeep in DumpRenderTree and WebKitTestRunner using NSSound SPI.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dumpRenderTree):
+ * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+ (WTR::InjectedBundle::platformInitialize):
+
+2013-01-18 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Enable indexed database for development builds
+ https://bugs.webkit.org/show_bug.cgi?id=107299
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * Scripts/webkitperl/FeatureList.pm: Enable indexed database by default
+ for GTK+ development builds.
+
+2013-01-18 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: Improve table-guessing heuristics
+ https://bugs.webkit.org/show_bug.cgi?id=107042
+
+ Reviewed by Chris Fleizach.
+
+ Implement parentElementCallback on Chromium to make testing easier.
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::parentElementCallback):
+
+2013-01-18 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Add property for IndexedDB database path to WebKitGTK+
+ https://bugs.webkit.org/show_bug.cgi?id=106136
+
+ Reviewed by Gustavo Noronha Silva.
+
+ During testing, set the web database directory to DUMPRENDERTREE_TEMP
+ before falling back to the old default. This is necessary because
+ indexed database tests require that each DRT shard is using a different
+ IDB database location.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (temporaryDatabaseDirectory): Added this helper for getting the
+ database directory.
+ (setDefaultsToConsistentStateValuesForTesting): Use the new helper.
+
+2013-01-18 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Enable API test InjectedBundleFrameHitTest on EFL
+ https://bugs.webkit.org/show_bug.cgi?id=107264
+
+ Reviewed by Laszlo Gombos.
+
+ Enable API test InjectedBundleFrameHitTest for hit-testing,
+ since it is now passing on both Debug and Release builds.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2013-01-18 Manuel Rego Casasnovas <rego@igalia.com>
+
+ [GTK] Implement TestRunner::addUserScript
+ https://bugs.webkit.org/show_bug.cgi?id=107275
+
+ Reviewed by Philippe Normand.
+
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::addUserScript): Implement method using
+ DumpRenderTreeSupportGtk::addUserScript.
+
+2013-01-18 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ Unreviewed, add my secondary email address to the list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-18 Dan Carney <dcarney@google.com>
+
+ [chromium] move pointerlock functions to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=107241
+
+ Reviewed by Jochen Eisinger.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::didAcquirePointerLock):
+ (WebTestRunner::WebTestDelegate::didNotAcquirePointerLock):
+ (WebTestRunner::WebTestDelegate::didLosePointerLock):
+ (WebTestRunner::WebTestDelegate::setPointerLockWillRespondAsynchronously):
+ (WebTestRunner::WebTestDelegate::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::didAcquirePointerLock):
+ (WebTestRunner::TestRunner::didNotAcquirePointerLock):
+ (WebTestRunner::TestRunner::didLosePointerLock):
+ (WebTestRunner::TestRunner::setPointerLockWillRespondAsynchronously):
+ (WebTestRunner::TestRunner::setPointerLockWillFailSynchronously):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-14 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ [EFL] Update freetype in jhbuild to 2.4.11 and activate subpixel layout
+ https://bugs.webkit.org/show_bug.cgi?id=106774
+
+ Reviewed by Martin Robinson.
+
+ In order to fix a long standing linespacing/font ascent & descent issue
+ we found that FreeType commit b0962ac34e660 solves that problem.
+ Let's update FreeType accordingly, but bump it to 2.4.11 due to the
+ maintainer recommending several security updates after that said commit.
+
+ Also, in order to avoid extra rebaselining, let's activate subpixel
+ layout at the same time.
+
+ * efl/jhbuild.modules: New freetype 2.4.11
+
+2013-01-17 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - Accept http/file URL when running drt-launcher from command line
+ https://bugs.webkit.org/show_bug.cgi?id=107107
+ PR 282192
+
+ Reviewed by Rob Buis.
+
+ The DRT application will convert relative/absolute file path to
+ file://<real-file-path> format, so we only check for http/file prefix.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::isFullUrl):
+ (WebKit):
+ (BlackBerry::WebKit::DumpRenderTree::runCurrentTest):
+
+2013-01-17 Frank Farzan <frankf@chromium.org>
+
+ Flakiness dashboard: Add ChromiumFYI master
+ https://bugs.webkit.org/show_bug.cgi?id=107180
+
+ Reviewed by Ojan Vafai.
+
+ This is needed to enable Chrome Android bots
+ to upload results for instrumentation tests.
+
+ * TestResultServer/generate_builders_json.py:
+ (main):
+ * TestResultServer/static-dashboards/builders.jsonp:
+
+2013-01-17 Frank Farzan <frankf@chromium.org>
+
+ Add Chrome on Android instrumentation test types to flakiness dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=106964
+
+ Reviewed by Ojan Vafai.
+
+ Specifically, add these test types:
+
+ androidwebview_instrumentation_tests
+ chromiumtestshell_instrumentation_tests
+ contentshell_instrumentation_tests
+
+ Also, add ChromiumFYI to the list of masters.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (loadBuildersList):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (currentBuilderGroupCategory):
+
+2013-01-17 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Fixing webkitpy's SCM unit tests.
+ https://bugs.webkit.org/show_bug.cgi?id=106429
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/detection_unittest.py:
+ (SCMDetectorTest.test_detect_scm_system):
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.in_working_directory):
+ (Git.read_git_config):
+ (Git._assert_can_squash):
+ (Git.remote_branch_ref):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (GitSVNTest.test_commit_with_message_multiple_local_commits_always_squash):
+ (GitTestWithMock):
+ (GitTestWithMock.make_scm):
+ (GitTestWithMock.test_create_patch):
+ * Scripts/webkitpy/common/system/outputcapture.py:
+ (OutputCapture.assert_outputs):
+ (OutputCaptureTestCaseBase):
+ * Scripts/webkitpy/test/printer.py:
+ (Printer.configure):
+
+2013-01-17 Julie Parent <jparent@chromium.org>
+
+ Flakiness dashboard assumes there must be ToT tests
+ https://bugs.webkit.org/show_bug.cgi?id=107155
+
+ Remove group as a default parameter, since we can't actually know
+ the name of a group initially. Instead, introduces
+ currentBuilderGroupName which returns the current builder group
+ if it has been explicitly set, or picks the first one available
+ as a default. Allows us to remove some extra code tracking this
+ stuff as well.
+
+ Reviewed by Ojan Vafai.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseCrossDashboardParameters):
+ (currentBuilderGroupName):
+ (currentBuilderGroup):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (platformAndBuildType):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+
+2013-01-16 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove NodeListsNodeData when it's no longer needed
+ https://bugs.webkit.org/show_bug.cgi?id=107074
+
+ Reviewed by Darin Adler.
+
+ Generalize the warning a little so that it's also ignored on PerformanceTests/DOM/TraverseChildNodes.html
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest):
+
+2013-01-17 Simon Fraser <simon.fraser@apple.com>
+
+ Ref test images are upside-down in WebKit2
+ https://bugs.webkit.org/show_bug.cgi?id=105457
+
+ Reviewed by Sam "Speedy" Weinig.
+
+ The bitmap context created in TestInvocation::dumpPixelsAndCompareWithExpected()
+ from the window snapshot contained a flipped copy of the image, causing all ref
+ and pixel images to be upside-down.
+
+ * WebKitTestRunner/cg/TestInvocationCG.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2013-01-17 Timothy Loh <timloh@google.com>
+
+ Replaced specifiers variable with is_debug in builders.py
+ https://bugs.webkit.org/show_bug.cgi?id=107057
+
+ Reviewed by Dirk Pranke.
+
+ Replaced specifiers variable with is_debug in builders.py to simplify
+ Bug 106259. The other specifiers are not used elsewhere in the code.
+ Fixed builder_name_for_port_name to return a debug builder if we don't
+ have a release builder.
+
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ (all_port_names):
+ (builder_name_for_port_name):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+
+2013-01-17 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Build with LevelDB when IndexedDB is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=103220
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * Scripts/webkitpy/style/checker.py: Do not style check the leveldb source code
+ as it does not conform to WebKit style.
+
+2013-01-17 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Fix misuse of ASSERT on ecore_evas_init()
+ https://bugs.webkit.org/show_bug.cgi?id=107119
+
+ Reviewed by Laszlo Gombos.
+
+ Do not use ASSERT on ecore_evas_init(), since the expression inside
+ the macro compiles out of release builds.
+
+ * TestWebKitAPI/PlatformEfl.cmake: Enable API test UserMessage.
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::initEcoreEvas): Remove ASSERT on ecore_evas_init().
+
+2013-01-17 Eugene Klyuchnikov <eustas@chromium.org>
+
+ Web Inspector: Profiler: split "getProfile" to "getCPUProfile" and "loadHeapSnapshot"
+ https://bugs.webkit.org/show_bug.cgi?id=104545
+
+ Reviewed by Yury Semikhatsky.
+
+ Adopt signature changes.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js:
+ (ProfilerAgent.getCPUProfile): Renamed.
+ (ProfilerAgent.getHeapSnapshot): Added.
+
+2013-01-17 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK][EFL] NWRT should check that Xvfb is installed
+ https://bugs.webkit.org/show_bug.cgi?id=71767
+
+ Reviewed by Dirk Pranke.
+
+ EFL and GTK ports now check that Xvfb is installed before running
+ layout tests. The command line used to check whether Xvfb is present
+ is a simple `which Xvfb` that should return 0 as the exit code upon
+ success.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.show_results_html_file):
+ (EflPort):
+ (EflPort.check_sys_deps):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.check_sys_deps):
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
+ (XvfbDriver):
+ (XvfbDriver.check_xvfb):
+
+2013-01-16 Alan Cutter <alancutter@chromium.org>
+
+ sheriffbot can't tell me who "kov" is
+ https://bugs.webkit.org/show_bug.cgi?id=106184
+
+ Reviewed by Eric Seidel.
+
+ Added glob style searching to the CommitterList contributors_by_search_string function so exact matches are favoured.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ (Account.matches_glob):
+ (CommitterList.contributors_by_search_string):
+ * Scripts/webkitpy/common/config/committers_unittest.py:
+ (CommittersTest.test_committer_lookup):
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Whois):
+
+2013-01-16 David Kilzer <ddkilzer@apple.com>
+
+ Use xcrun to find path to make for Mac port
+ <http://webkit.org/b/107091>
+
+ Reviewed by Dan Bernstein.
+
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort._build_java_test_support): Call self.make_command().
+ (MacPort.make_command): Add. Call xcrun_find().
+ (MacPort.nm_command): Use self.xcrun_find().
+ (MacPort.xcrun_find): Add. Extract from nm_command().
+
+2013-01-16 Sam Weinig <sam@webkit.org>
+
+ Make debug-safari --target-web-process work again
+ https://bugs.webkit.org/show_bug.cgi?id=107088
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/webkitdirs.pm:
+ (execMacWebKitAppForDebugging):
+ The shim is now called SecItemShim.
+
+2013-01-16 Alan Cutter <alancutter@chromium.org>
+
+ GCE build scripts don't take working directory into account when calling findzone.sh
+ https://bugs.webkit.org/show_bug.cgi?id=106962
+
+ Reviewed by Adam Barth.
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:
+
+2013-01-16 Alan Cutter <alancutter@chromium.org>
+
+ start-queue.sh does not pass remaining parameters correctly
+ https://bugs.webkit.org/show_bug.cgi?id=107054
+
+ Reviewed by Adam Barth.
+
+ start-queue.sh now passes all remaining params to the webkit-patch command.
+ Previously only one additional queue parameter could be sent.
+
+ * EWSTools/start-queue.sh:
+
+2013-01-16 Xueqing Huang <huangxueqing@baidu.com>
+
+ check-webkit-style script cannot running in Chinese windows.
+ https://bugs.webkit.org/show_bug.cgi?id=87548
+
+ Reviewed by Darin Adler.
+
+ * Scripts/webkitpy/common/system/platforminfo.py:
+ (PlatformInfo._win_version_tuple_from_cmd):
+
+2013-01-16 Dirk Pranke <dpranke@chromium.org>
+
+ Delete an extraneous print statement.
+ https://bugs.webkit.org/show_bug.cgi?id=106562
+
+ Delete the extraneous print statement introduced in r139841.
+
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.print_found):
+
+2013-01-16 Zan Dobersek <zdobersek@igalia.com>
+
+ Please reinstate --pixel
+ https://bugs.webkit.org/show_bug.cgi?id=101995
+
+ Reviewed by Dirk Pranke.
+
+ Add the '--pixel' and '--no-pixel' options for NRWT as aliases for
+ the '--pixel-tests' (or '-p') and '--no-pixel-tests' options respectively.
+ Some developers are still used to these options that were available in the ORWT.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+
+2013-01-16 Eric Seidel <eric@webkit.org>
+
+ Remove --shark* support from sunspider/run-sunspider now that Shark is dead
+ https://bugs.webkit.org/show_bug.cgi?id=99512
+
+ Reviewed by Darin Adler.
+
+ * Scripts/run-sunspider:
+
+2013-01-16 Eric Seidel <eric@webkit.org>
+
+ Remove webkitpy Visual Studio files, as core developers are not interested in maintaining them
+ https://bugs.webkit.org/show_bug.cgi?id=106036
+
+ Reviewed by Darin Adler.
+
+ * Scripts/webkitpy/webkitpy.pyproj: Removed.
+ * Scripts/webkitpy/webkitpy.sln: Removed.
+
+2013-01-16 Chris Hopman <cjhopman@chromium.org>
+
+ [Chromium] Remove hardcoded chromium_*.jar in gyp files
+ https://bugs.webkit.org/show_bug.cgi?id=104049
+
+ Reviewed by Eric Seidel.
+
+ Targets with dependencies (direct/indirect) on a java target receive
+ the chromium_*.jar paths in the variable input_jars_paths. Targets
+ should use that rather than hardcoding where they think the jar will
+ be. These can be passed directly to ant as INPUT_JARS_PATHS rather
+ than as --jars to generate_native_test.py.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
+
+2013-01-16 Dan Carney <dcarney@google.com>
+
+ [chromium] move setMockDeviceOrientation to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106895
+
+ Reviewed by Jochen Eisinger.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ (WebTestRunner::WebTestDelegate::setDeviceOrientation):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::setMockDeviceOrientation):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setDeviceOrientation):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] route more webkit_support and webviewhost callbacks through WebTestDelegate
+ https://bugs.webkit.org/show_bug.cgi?id=106904
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::notifyDone):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::setDeviceScaleFactor):
+ (WebTestRunner::WebTestDelegate::setFocus):
+ (WebTestRunner::WebTestDelegate::setAcceptAllCookies):
+ (WebTestRunner::WebTestDelegate::pathToLocalResource):
+ (WebTestRunner::WebTestDelegate::setLocale):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setAlwaysAcceptCookies):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setWindowIsKey):
+ (WebTestRunner::TestRunner::pathToLocalResource):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::setPOSIXLocale):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::taskList):
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setDeviceScaleFactor):
+ (WebViewHost::setFocus):
+ (WebViewHost::setAcceptAllCookies):
+ (WebViewHost::pathToLocalResource):
+ (WebViewHost::setLocale):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-16 Sergio Villar Senin <svillar@igalia.com>
+
+ [GTK] build-webkit fails if the jhbuild wrapper is not used
+ https://bugs.webkit.org/show_bug.cgi?id=106769
+
+ Reviewed by Martin Robinson.
+
+ Return an empty array instead of "" in
+ jhbuildWrapperPrefixIfNeeded() because otherwise that empty string
+ will not be recognized as a valid command when the returned array
+ is directly passed to perl's system() call.
+
+ * Scripts/webkitdirs.pm:
+ (jhbuildWrapperPrefixIfNeeded):
+
+2013-01-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] add title text direction attribute to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=106907
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::setTitleTextDirection):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setTitleTextDirection):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didReceiveTitle):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didReceiveTitle):
+
+2013-01-16 Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+ NRWT still confused about test count with --repeat-each and --iterations
+ https://bugs.webkit.org/show_bug.cgi?id=106562
+
+ Reviewed by Dirk Pranke.
+
+ Fix the printed unique test count and skipped count. This
+ seems to have broken in r127688 ("NRWT lies about the number
+ of tests that it's skipping when used with --repeat-each").
+
+ Also add a test for print_found()
+
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.print_found):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.test_details):
+ (Testprinter):
+ (Testprinter.test_found):
+
+2013-01-15 Zan Dobersek <zdobersek@igalia.com>
+
+ Unreviewed follow-up to r139769.
+
+ Note that omitting the WebKit1 code from the build now
+ works for GTK as well.
+
+ * Scripts/build-webkit:
+
+2013-01-15 Dirk Pranke <dpranke@chromium.org>
+
+ test-webkitpy: truncate output to the terminal width when necessary
+ https://bugs.webkit.org/show_bug.cgi?id=106973
+
+ Reviewed by Ojan Vafai.
+
+ this implements the same logic for test-webkitpy that we have
+ for run-webkit-tests (and ninja).
+
+ No tests written as this is exercised by running test-webkitpy itself.
+
+ * Scripts/webkitpy/test/printer.py:
+ (Printer.configure):
+ (Printer._test_line):
+
+2013-01-15 Dirk Pranke <dpranke@chromium.org>
+
+ remove extraneous output in test-webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=106971
+
+ Reviewed by Ojan Vafai.
+
+ We weren't ignoring or capturing the echoed output from
+ these two tests, and getting noise in the logs as a result.
+
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ExecutiveTest.test_auto_stringify_args):
+ (ExecutiveTest.test_popen_args):
+
+2013-01-15 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy.layout_tests.servers.http_server_unittest.TestHttpServer.test_win32_start_and_stop is flaky
+ https://bugs.webkit.org/show_bug.cgi?id=106974
+
+ Reviewed by Ryosuke Niwa.
+
+ I forgot to stub out the call to check to ensure that the ports were
+ available, so this test could fail if something was listening on 8000 or
+ 8443 on the machine.
+
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ (TestHttpServer.test_win32_start_and_stop):
+
+2013-01-15 Levi Weintraub <leviw@chromium.org>
+
+ Unreviewed, rolling out r139792.
+ http://trac.webkit.org/changeset/139792
+ https://bugs.webkit.org/show_bug.cgi?id=106970
+
+ Broke the windows build.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::notifyDone):
+ (DRTTestRunner::reset):
+ (DRTTestRunner::setAlwaysAcceptCookies):
+ (DRTTestRunner::setWindowIsKey):
+ (DRTTestRunner::pathToLocalResource):
+ (DRTTestRunner::setPOSIXLocale):
+ (InvokeCallbackTask):
+ (InvokeCallbackTask::InvokeCallbackTask):
+ (InvokeCallbackTask::runIfValid):
+ (DRTTestRunner::setBackingScaleFactor):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ (DRTTestRunner::taskList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::setDatabaseQuota):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setDatabaseQuota):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setPendingExtraData):
+ (WebViewHost::setDeviceScaleFactor):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-15 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix after r139357. The port name of MacWK2EWS should be 'mac-wk2'.
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (MacWK2Port):
+
+2013-01-15 Alan Cutter <alancutter@chromium.org>
+
+ Extend sheriffbot's "help" command to be able to get help on individual commands
+ https://bugs.webkit.org/show_bug.cgi?id=106629
+
+ Reviewed by Eric Seidel.
+
+ Added a help command to sheriffbot.
+ Fixed some style issues and ordered the commands alphabetically.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (IRCCommand):
+ (IRCCommand.execute):
+ (IRCCommand.usage):
+ (IRCCommand.help):
+ (CreateBug):
+ (CreateBug.execute):
+ (Help):
+ (Help.execute):
+ (Help._post_command_help):
+ (Hi):
+ (Hi.execute):
+ (Restart):
+ (RollChromiumDEPS):
+ (RollChromiumDEPS._parse_args):
+ (RollChromiumDEPS._expand_irc_nickname):
+ (RollChromiumDEPS.execute):
+ (Rollout):
+ (Rollout._extract_revisions):
+ (Rollout.execute):
+ (Sheriffs):
+ (Sheriffs.execute):
+ (Whois):
+ (Whois.execute):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_help):
+
+2013-01-15 Enrica Casucci <enrica@apple.com>
+
+ Add a new set of WebKit2 APIs for text search and
+ search results management.
+ https://bugs.webkit.org/show_bug.cgi?id=106834.
+ <rdar://problem/12597159>
+
+ Added new test for the new WebKit2 API for
+ text search.
+
+ Reviewed by Simon Fraser.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2/FindMatches.mm: Added.
+
+2013-01-15 Levi Weintraub <leviw@chromium.org>
+
+ [chromium] route more webkit_support and webviewhost callbacks through WebTestDelegate
+ https://bugs.webkit.org/show_bug.cgi?id=106904
+
+ Reverting 139794. It broke the build. It appears that a header file,
+ WebTextDirection.h, was left out.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner::setTitleTextDirection):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldStayOnPageAfterHandlingBeforeUnload):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldStayOnPageAfterHandlingBeforeUnload):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didReceiveTitle):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didReceiveTitle):
+
+2013-01-15 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] route more webkit_support and webviewhost callbacks through WebTestDelegate
+ https://bugs.webkit.org/show_bug.cgi?id=106904
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::notifyDone):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::setDeviceScaleFactor):
+ (WebTestRunner::WebTestDelegate::setFocus):
+ (WebTestRunner::WebTestDelegate::setAcceptAllCookies):
+ (WebTestRunner::WebTestDelegate::pathToLocalResource):
+ (WebTestRunner::WebTestDelegate::setLocale):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setAlwaysAcceptCookies):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setWindowIsKey):
+ (WebTestRunner::TestRunner::pathToLocalResource):
+ (WebTestRunner::TestRunner::setBackingScaleFactor):
+ (WebTestRunner::TestRunner::setPOSIXLocale):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner::TestRunner::taskList):
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setDeviceScaleFactor):
+ (WebViewHost::setFocus):
+ (WebViewHost::setAcceptAllCookies):
+ (WebViewHost::pathToLocalResource):
+ (WebViewHost::setLocale):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-15 Zan Dobersek <zdobersek@igalia.com>
+
+ Tests with WontFix expectation are (indirectly) skipped
+ https://bugs.webkit.org/show_bug.cgi?id=105860
+
+ Reviewed by Dirk Pranke.
+
+ Only skip the WontFix expectation if there are no other layout test
+ expectations (like Failure, ImageOnlyFailure) listed for the test.
+ This makes it possible to run an expected failure for which there
+ is no reason or interest to fix. There are some ports that would like
+ to exercise this behavior as well as specific test cases that should use
+ such expectations.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectationParser._tokenize_line): Only add the SKIP modifier for a
+ WONTFIX test if there are no expectations listed. The warning is adjusted
+ to reflect the new behavior.
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py: Add
+ and adjust test cases for these changes.
+ (ExpectationSyntaxTests.test_wontfix):
+ (SemanticTests.test_skip_and_wontfix):
+
+2013-01-15 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] add title text direction attribute to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=106907
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::setTitleTextDirection):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setTitleTextDirection):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::didReceiveTitle):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didReceiveTitle):
+
+2013-01-15 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: change the default # of locked shards on chromium_win to 1
+ https://bugs.webkit.org/show_bug.cgi?id=106938
+
+ Reviewed by Eric Seidel.
+
+ It looks like LigHTTPd might be buggy or unstable if we are
+ running multiple http tests in parallel; see
+ http://code.google.com/p/chromium/issues/detail?id=169530 for more
+ context as well. This change will stop running http tests in parallel
+ and we can see if this fixes things.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ (ChromiumWinPort.default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ (ChromiumWinTest.test_path_to_image_diff):
+ (ChromiumWinTest):
+ (ChromiumWinTest.test_default_max_locked_shards):
+
+2013-01-15 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move WebDatabase related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106905
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::clearAllDatabases):
+ (WebTestRunner::WebTestDelegate::setDatabaseQuota):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::clearAllDatabases):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setDatabaseQuota):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::clearAllDatabases):
+ (WebViewHost::setDatabaseQuota):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-15 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Renaming CleanWorkingDirectory step to DiscardLocalChanges to make
+ functionality match the name.
+ https://bugs.webkit.org/show_bug.cgi?id=106870
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/commands/download.py:
+ (Clean):
+ (Update):
+ (Build):
+ (BuildAndTest):
+ (CheckStyle):
+ (BuildAttachment):
+ (BuildAndTestAttachment):
+ (AbstractPatchApplyingCommand):
+ (ApplyWatchList):
+ (AbstractPatchLandingCommand):
+ (CreateRollout):
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/cleanworkingdirectory.py:
+ (CleanWorkingDirectory.options):
+ (CleanWorkingDirectory.run):
+ * Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py:
+ * Scripts/webkitpy/tool/steps/discardlocalchanges.py: Copied from Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py.
+ * Scripts/webkitpy/tool/steps/discardlocalchanges_unittest.py: Copied from Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py.
+
+2013-01-15 Zan Dobersek <zandobersek@gmail.com>
+
+ [Autotools] Add support for WebKit2-only builds
+ https://bugs.webkit.org/show_bug.cgi?id=106889
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * GNUmakefile.am: Only build the GtkLauncher and DumpRenderTree if building WebKit1.
+ * Scripts/build-webkit: Pass along the information on whether to build WebKit1 when
+ building the GTK port through build-webkit.
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject): Add the --disable-webkit1 configuration flag to the build
+ arguments when not building WebKit1.
+ (buildGtkProject): Pass along the information on whether to build WebKit1 when building
+ through the Autotools build system.
+
+2013-01-15 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Enable Performance Timeline, Resource Timing, Navigation Timing features
+ https://bugs.webkit.org/show_bug.cgi?id=106197
+
+ Reviewed by Martin Robinson.
+
+ * Scripts/webkitperl/FeatureList.pm: Add the configuration options for all three
+ features. Enable them on GTK, meaning they will be enabled in development builds
+ (i.e. when building with build-webkit).
+
+2013-01-15 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Enable CSS Image Resolution feature
+ https://bugs.webkit.org/show_bug.cgi?id=99038
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Enable the CSS Image Resolution feature for the development
+ builds of the GTK port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-15 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Stop passing the unstable features flag to configure script when using build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=106579
+
+ Reviewed by Gustavo Noronha Silva.
+
+ The --enable-unstable-features flag is not required to be passed anymore
+ to the configure script as it was removed in r138252.
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject):
+
+2013-01-15 Tony Chang <tony@chromium.org>
+
+ [chromium] Unreviewed, fix a bug where we don't properly shutdown lighttpd.
+
+ * Scripts/webkitpy/layout_tests/servers/http_server.py:
+ (Lighttpd._check_and_kill): Pass /pid so taskkill.exe doesn't error out on us.
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ (TestHttpServer.test_win32_start_and_stop):
+
+2013-01-15 Joshua Bell <jsbell@chromium.org>
+
+ Unreviewed. Adding Michael Pruett as contributor.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-15 Victor Carbune <victor@rosedu.org>
+
+ Unreviewed. Update my email addresses.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-15 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Waiting on the gdb process will lead to deadlock
+ https://bugs.webkit.org/show_bug.cgi?id=106906
+
+ Reviewed by Philippe Normand.
+
+ Use communicate() rather than wait() on the Popen object that's running the gdb
+ command. This avoids the deadlock that occurs on the GTK builders.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._get_gdb_output):
+
+2013-01-15 Zan Dobersek <zdobersek@igalia.com>
+
+ [GTK] Limit the number of frames printed out when backtracing with gdb
+ https://bugs.webkit.org/show_bug.cgi?id=106901
+
+ Reviewed by Philippe Normand.
+
+ Printing an unlimited number of frames when dumping the gdb backtracing
+ output can cause timeouts in the builders. This patch limits the number
+ of frames that are printed out to 1024.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._get_gdb_output):
+
+2013-01-15 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Fix ImageDiff's image format conversion
+ https://bugs.webkit.org/show_bug.cgi?id=106880
+
+ Reviewed by Csaba Osztrogonác.
+
+ Besides actually doing the conversion this also silences the suspicious warning:
+ "ignoring return value of function declared with warn_unused_result attribute".
+
+ * ImageDiff/qt/ImageDiff.cpp:
+ (main): QImage::convertToFormat, contrary to the assumed behaviour, returns a
+ copy of the image in the given format and does not alter the image itself.
+
+2013-01-15 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move remaining methods that just set a boolean flag to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106823
+
+ Reviewed by Darin Fisher.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldDumpBackForwardList):
+ (WebTestRunner::WebTestRunner::deferMainResourceDataLoad):
+ (WebTestRunner::WebTestRunner::shouldDumpSelectionRect):
+ (WebTestRunner::WebTestRunner::testRepaint):
+ (WebTestRunner::WebTestRunner::sweepHorizontally):
+ (WebTestRunner::WebTestRunner::isPrinting):
+ (WebTestRunner::WebTestRunner::shouldStayOnPageAfterHandlingBeforeUnload):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpBackForwardList):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::deferMainResourceDataLoad):
+ (WebTestRunner::TestRunner::shouldDumpSelectionRect):
+ (WebTestRunner::TestRunner::testRepaint):
+ (WebTestRunner::TestRunner::sweepHorizontally):
+ (WebTestRunner::TestRunner::isPrinting):
+ (WebTestRunner::TestRunner::shouldStayOnPageAfterHandlingBeforeUnload):
+ (WebTestRunner::TestRunner::dumpBackForwardList):
+ (WebTestRunner::TestRunner::setDeferMainResourceDataLoad):
+ (WebTestRunner::TestRunner::dumpSelectionRect):
+ (WebTestRunner::TestRunner::repaintSweepHorizontally):
+ (WebTestRunner::TestRunner::setPrinting):
+ (WebTestRunner::TestRunner::setShouldStayOnPageAfterHandlingBeforeUnload):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-01-14 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: stub out show_results_html for mock ports
+ https://bugs.webkit.org/show_bug.cgi?id=106848
+
+ Reviewed by Ojan Vafai.
+
+ We were accidentally using the underlying ports'
+ show_results_html_file() implementation, which would, unsurprisingly,
+ fail in many cases (e.g., running mock-efl on the mac).
+
+ No test added since we don't generally add tests for the mock
+ implementation.
+
+ * Scripts/webkitpy/layout_tests/port/mock_drt.py:
+ (MockDRTPort.show_results_html_file):
+
+2013-01-14 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Changing clean_working_directory/clean_local_commits and related
+ functions to have consistent naming.
+
+ https://bugs.webkit.org/show_bug.cgi?id=104198
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ * Scripts/webkitpy/tool/steps/cleanworkingdirectory.py:
+ * Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py:
+
+2013-01-14 Alan Cutter <alancutter@chromium.org>
+
+ Fix EWS GCE build scripts to detect which zone is available
+ https://bugs.webkit.org/show_bug.cgi?id=106524
+
+ Reviewed by Adam Barth.
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh:
+ * EWSTools/GoogleComputeEngine/findzone.sh: Added.
+
+2013-01-14 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Adding an error string to AmbiguousCommitError.
+ https://bugs.webkit.org/show_bug.cgi?id=106846
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (AmbiguousCommitError.__init__):
+
+2013-01-14 Dirk Pranke <dpranke@chromium.org>
+
+ kill whole lighttpd process tree for chromium win
+ https://bugs.webkit.org/show_bug.cgi?id=106838
+
+ Reviewed by Tony Chang.
+
+ Land a speculative fix for lighttpd.exe hanging on some chromium bots;
+ I think a test is causing a httpd server child process to wedge and
+ killing the parent httpd server process isn't sufficient to ensure
+ that the children are also killed.
+
+ * Scripts/webkitpy/layout_tests/servers/http_server.py:
+ (Lighttpd._check_and_kill):
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ (TestHttpServer.test_start_cmd):
+ (TestHttpServer):
+ (TestHttpServer.test_win32_start_and_stop):
+ (TestHttpServer.test_win32_start_and_stop.wait_for_action):
+ (TestHttpServer.test_win32_start_and_stop.mock_returns):
+ (TestHttpServer.test_win32_start_and_stop.mock_returns.return_value_thunk):
+
+2013-01-14 Nico Weber <thakis@chromium.org>
+
+ [chromium] Enable `update-webkit --chromium --ninja` on windows
+ https://bugs.webkit.org/show_bug.cgi?id=106836
+
+ Reviewed by Eric Seidel.
+
+ After running this, build-webkit --chromium will use ninja to build.
+ Apparently there are some minor issues with that still, so it's
+ not quite ready for use yet.
+
+ * Scripts/webkitdirs.pm:
+ (determineIsChromiumNinja):
+ (buildChromium):
+
+2013-01-14 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: use the same search path for baselines and TestExpectations on apple mac
+ https://bugs.webkit.org/show_bug.cgi?id=105599
+
+ Reviewed by Ryosuke Niwa.
+
+ Bug 105583 revealed some confusion due to the fact that the Apple
+ Mac port used a different list of directories to search for baselines
+ and TestExpectations files (actually, pretty much every port does).
+
+ It seems like a good idea to use the same list for both by default, but
+ making this happen will affect every port in slightly different ways, so
+ we'll try this on the Apple Mac port first.
+
+ Note that the effective changes for this are that:
+ 1) The apple mac port will look in platform/wk2 for baselines where
+ it didn't before (it will look after looking in mac-wk2 but before
+ the non-wk2 dirs)
+ 2) The apple mac-snowleopard port will use the expectations in
+ mac-lion as well as the expectations in mac-snowleopard, although
+ I'm not even sure if mac-snowleopard is still supported ...
+
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.default_baseline_search_path):
+ (MacPort.expectations_files):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (test_baseline_search_path):
+
+2013-01-14 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: Need to implement ColorWellRole
+ https://bugs.webkit.org/show_bug.cgi?id=106756
+
+ Reviewed by Chris Fleizach.
+
+ Returns a string representation of the value of a color
+ when the role is Color Well, to make it easy to write layout
+ tests for color controls.
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+
+2013-01-14 Dominic Mazzoni <dmazzoni@google.com>
+
+ Chromium: Error in AccessibilityUIElement::intValueGetterCallback
+ https://bugs.webkit.org/show_bug.cgi?id=106682
+
+ Reviewed by Chris Fleizach.
+
+ Modify Chromium's DRT implementation of intValue to return a
+ different value depending on the role.
+
+ There are actually platform-specific differences in what should
+ be returned in the "value" of an object, so Chromium normally keeps
+ these separate (i.e. valueForRange, headingLevel, hierarchicalLevel, etc.)
+ but this is a fine simplification to make cross-platform tests easier.
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::intValueGetterCallback):
+
+2013-01-14 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move remaining methods to dump WebViewClient callbacks to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106785
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::setStatusText):
+ (WebTestRunner::WebTestProxy::didStopLoading):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldDumpStatusCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpProgressFinishedCallback):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpStatusCallbacks):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::shouldDumpProgressFinishedCallback):
+ (WebTestRunner::TestRunner::dumpWindowStatusChanges):
+ (WebTestRunner::TestRunner::dumpProgressFinishedCallback):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::setStatusText):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::didStopLoading):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didStopLoading):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-14 Andrey Lushnikov <lushnikov@chromium.org>
+
+ Web Inspector: devtools front-end doesn't have focus in TestShell
+ https://bugs.webkit.org/show_bug.cgi?id=106778
+
+ Reviewed by Pavel Feldman.
+
+ Focus devTools window after loadURL method.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+
+2013-01-14 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][jhbuild] Build the GStreamer-related dependencies with the "configure" script
+ https://bugs.webkit.org/show_bug.cgi?id=106573
+
+ Reviewed by Philippe Normand.
+
+ Similarly to what's been described in bug 106569, we're building
+ from release tarballs, so there's no reason to regenerate the
+ autoconf-related stuff with autogen.sh, especially since we might
+ run into trouble with automake 1.13 and deprecated macros.
+
+ * efl/jhbuild.modules:
+
+2013-01-14 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] The Qt's configuration isn't honoured regarding the use of the system libpng and libjpeg
+ https://bugs.webkit.org/show_bug.cgi?id=104909
+
+ Reviewed by Simon Hausmann.
+
+ To be able to build redistribuable binary packages, Qt's configure switches
+ -qt-libpng and -qt-libjpeg are used to avoid having the binaries trying to
+ dynamically link to optional system libraries.
+ QtWebKit is doing its own configure checks for those libraries, thus adding a
+ runtime dependency that might not be fulfilled if the packager's machine had
+ those libraries while the user's machine won't.
+
+ Since in most cases where WebKit will want to use those system libraries, Qt will
+ also be using them, remove these configure tests from WebKit.
+
+ * qmake/config.tests/libjpeg/libjpeg.cpp: Removed.
+ * qmake/config.tests/libjpeg/libjpeg.pro: Removed.
+ * qmake/config.tests/libpng/libpng.cpp: Removed.
+ * qmake/config.tests/libpng/libpng.pro: Removed.
+ * qmake/mkspecs/features/features.prf:
+
+2013-01-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][jhbuild] Bump the EFL dependencies in jhbuild to 1.7.5.
+ https://bugs.webkit.org/show_bug.cgi?id=106574
+
+ Reviewed by Laszlo Gombos.
+
+ Rely on a more recent stable release, which includes support for
+ Lua 5.2 in Edje and other assorted minor fixes.
+
+ While here, also use the "configure" script to build the libraries
+ instead of relying on autogen.sh, which is not really needed with
+ a release tarball and may have problems with automake 1.13.
+
+ * efl/jhbuild.modules:
+
+2013-01-14 Andrey Lushnikov <lushnikov@chromium.org>
+
+ Web Inspector: fix DRT to deliver simulated events to devtools front-end
+ https://bugs.webkit.org/show_bug.cgi?id=106650
+
+ Reviewed by Pavel Feldman.
+
+ Add separated m_devToolsTestInterfaces object to testShell which is
+ bind to devTools webview.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ (TestShell::createMainWindow):
+ (TestShell::~TestShell):
+ (TestShell::showDevTools):
+ (TestShell::resetTestController):
+ (TestShell::bindJSObjectsToWindow):
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
+2013-01-14 Alan Cutter <alancutter@chromium.org>
+
+ Sheriffbot command aliases need test cases
+ https://bugs.webkit.org/show_bug.cgi?id=106754
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/tool/commands/sheriffbot_unittest.py:
+ (SheriffBotTest.test_command_aliases):
+
+2013-01-13 Alan Cutter <alancutter@chromium.org>
+
+ Allow users to misspell the "sheriffs" command in sheriffbot
+ https://bugs.webkit.org/show_bug.cgi?id=106628
+
+ Reviewed by Steve Block.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+
+2013-01-13 Alan Cutter <alancutter@chromium.org>
+
+ Make "gardeners" an alias for "sheriffs" in sherrifbot
+ https://bugs.webkit.org/show_bug.cgi?id=106627
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+
+2013-01-13 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] webkitpy-test: executive.py stringify_args error on the release test bot
+ https://bugs.webkit.org/show_bug.cgi?id=105380
+
+ Reviewed by Eric Seidel.
+
+ Fix a regression introduced in r137692 where we were double-encoding
+ the arguments to popen(); this was only an issue on windows, where
+ we would try to encode something to mbcs, then try to encode it
+ to unicode as if the input as ascii.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.run_command):
+
+2013-01-13 Alan Cutter <alancutter@chromium.org>
+
+ State who told sheriffbot to roll the Chromium deps and to what revision
+ https://bugs.webkit.org/show_bug.cgi?id=106626
+
+ Reviewed by Eric Seidel.
+
+ Added optional argument to post-chromium-deps-roll so Sheriffbot can specify ChangeLog message.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (RollChromiumDEPS._expand_irc_nickname):
+ (RollChromiumDEPS.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_roll_chromium_deps):
+ * Scripts/webkitpy/tool/bot/sheriff.py:
+ (Sheriff.post_chromium_deps_roll):
+ * Scripts/webkitpy/tool/commands/roll.py:
+ (RollChromiumDEPS._prepare_state):
+ (PostChromiumDEPSRoll):
+ (PostChromiumDEPSRoll._prepare_state):
+ * Scripts/webkitpy/tool/commands/roll_unittest.py:
+ (PostRollCommandsTest.test_prepare_state):
+ * Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py:
+ (PrepareChangeLogForDEPSRoll.run):
+
+2013-01-13 Alan Cutter <alancutter@chromium.org>
+
+ Add Alan Cutter as contributor
+ https://bugs.webkit.org/show_bug.cgi?id=106747
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-13 Jonathan Liu <net147@gmail.com>
+
+ Fix CONFIG missing link_pkgconfig on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=106647
+
+ Some libraries (e.g. libxslt, libxml2 and sqlite3) fail to link
+ properly on Windows because they are added to PKGCONFIG but
+ CONFIG does not contain link_pkgconfig.
+
+ This is because link_pkgconfig is added in unix/default_pre.prf
+ which is only used for UNIX platforms. To fix this, move it to
+ the general default_pre.prf.
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/default_pre.prf:
+ * qmake/mkspecs/features/unix/default_pre.prf:
+
+2013-01-12 Nico Weber <thakis@chromium.org>
+
+ nrwt/chromium: Don't prefer chromium over webkit build directories
+ https://bugs.webkit.org/show_bug.cgi?id=105597
+
+ Reviewed by Dirk Pranke.
+
+ Rely on the new timestamp logic instead. Requested by dpranke in
+ https://bugs.webkit.org/show_bug.cgi?id=105498
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._static_build_path):
+ * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py:
+ (ChromiumLinuxPortTest.test_build_path):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_build_path):
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ (ChromiumWinTest.test_build_path):
+
+2013-01-12 Nico Weber <thakis@chromium.org>
+
+ Use ninja by default on Linux for build-webkit --chromium, bot edition
+ https://bugs.webkit.org/show_bug.cgi?id=104434
+
+ Reviewed by Eric Seidel.
+
+ r139557 changed update-webkit to pick ninja by default on linux, but
+ the bots run update-webkit-chromium directly so they didn't see this.
+ Move the default for ninja into update-webkit-chromium so that it's
+ picked up by the bots, and let update-webkit forward non-default
+ options to there.
+
+ This way, the default is in one place only and both developers (who
+ usually use update-webkit which then shells out to
+ updat-webkit-chromium) and bots (which use update-webkit-chromium
+ directly) see the same behavior.
+
+ * Scripts/update-webkit:
+ * Scripts/update-webkit-chromium:
+
+2013-01-12 Nico Weber <thakis@chromium.org>
+
+ Make ninja the default build system on Linux for build-webkit --chromium
+ https://bugs.webkit.org/show_bug.cgi?id=104434
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/update-webkit:
+
+2013-01-12 Alan Cutter <alancutter@chromium.org>
+
+ Migrate the remaining bots in EC2 to Google Compute Engine
+ https://bugs.webkit.org/show_bug.cgi?id=106005
+
+ Reviewed by Eric Seidel.
+
+ Updated bot scripts for launching feeder-queue, style-queue and sheriffbot on GCE.
+
+ * EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh: Copied from Tools/EWSTools/build-repo.sh.
+ * EWSTools/boot.sh:
+ * EWSTools/build-repo.sh:
+ * EWSTools/start-queue.sh:
+
+2013-01-12 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move inspector related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106654
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::showDevTools):
+ (WebTestRunner::WebTestDelegate::closeDevTools):
+ (WebTestRunner::WebTestDelegate::evaluateInWebInspector):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::showWebInspector):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::closeWebInspector):
+ (WebTestRunner::TestRunner::evaluateInWebInspector):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::showDevTools):
+ (WebViewHost::closeDevTools):
+ (WebViewHost::evaluateInWebInspector):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-11 Julie Parent <jparent@chromium.org>
+
+ Builder should not be a valid parameter for stats dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=106698
+
+ Reviewed by Dirk Pranke.
+
+ Since builder is a dashboard specific parameter, dashboard_base
+ should not be handling it in handleValidHashParameterWrapper, rather,
+ each specific dashboard should in its handleValidHashParameter function.
+
+ Note that the FIXME in dashboard_base about this was actually wrong -
+ we don't want to move it to g_crossDashboardState, because it isn't
+ actually cross dashboard state.
+
+ In fact, flakiness and treemap have the code in
+ handleValidHashParameter, but it is currently dead code because
+ dashboard_base gets to it first.
+
+ Added the proper handling to timeline_explorer, since builder is
+ valid there.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+
+2013-01-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ REGRESSION: buildbot mangles error messages with timestamps run-webkit-tests outputs
+ https://bugs.webkit.org/show_bug.cgi?id=106688
+
+ Reviewed by Eric Seidel.
+
+ Update the regular expression used to strip the garbage at the beginning.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunWebKitTests.nrwt_log_message_regexp):
+
+2013-01-11 Pratik Solanki <psolanki@apple.com>
+
+ TestRunner leaks when running tests
+ https://bugs.webkit.org/show_bug.cgi?id=106683
+
+ Reviewed by Simon Fraser.
+
+ Remove extra ref() that we missed out on deleting when refactoring window.layoutTestController
+ to window.testRunner in r124705. This caused the TestRunner object to be leaked when running
+ tests.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::makeWindowObject):
+
+2013-01-11 Julie Parent <jparent@chromium.org>
+
+ Dashboard Cleanup: Add isLoadingComplete to the loader.Loader object.
+ https://bugs.webkit.org/show_bug.cgi?id=106247
+
+ Old code nulled out the loader instance when it completed loading and
+ then later used the fact that it was null to determine if it had loaded
+ or not. This is not only unintuitive, but it also prevents using the
+ loader object later on.
+
+ Added new method, used it, added unit test for it.
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (resourceLoadingComplete):
+ (handleLocationChange):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-01-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Try CRLF to LF change in r139407 again.
+
+ * BuildSlaveSupport/delete-stale-build-files:
+ (main):
+ (webkitBuildDirectory):
+ * BuildSlaveSupport/kill-old-processes:
+ (main):
+
+2013-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Disable the unit tests timeout when running from make check
+ https://bugs.webkit.org/show_bug.cgi?id=106670
+
+ Reviewed by Philippe Normand.
+
+ * GNUmakefile.am: Pass --timeout=-1 to run-gtk-test.
+
+2013-01-11 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Yet another unreviewed fix after r139431.
+
+ * Scripts/run-launcher: Pass the arguments to `jhbuild-wrapper' in
+ the correct order.
+
+2013-01-11 Dan Carney <dcarney@google.com>
+
+ [chromium] move some whitespace and resize related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106655
+
+ Reviewed by Jochen Eisinger.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ (WebTestRunner::WebTestDelegate::setClientWindowRect):
+ (WebTestRunner::WebTestDelegate::setSelectTrailingWhitespaceEnabled):
+ (WebTestRunner::WebTestDelegate::setSmartInsertDeleteEnabled):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::setSmartInsertDeleteEnabled):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setSelectTrailingWhitespaceEnabled):
+ (WebTestRunner::TestRunner::enableAutoResizeMode):
+ (WebTestRunner::TestRunner::disableAutoResizeMode):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setClientWindowRect):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-11 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ Unreviewed. Update my e-mail addresses.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-11 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Another unreviewed fix after r139431.
+
+ In a way, this is also a generic bug fix, since previously isEfl()
+ would fail when called from run-efl-tests and we thus did not use
+ jhbuild to run our tests. This now resulted in us calling
+ "jhbuild-wrapper run" without specifying a platform.
+
+ * Scripts/run-efl-tests: Pass "--efl" to ARGV manually for isEfl()
+ to work.
+
+2013-01-11 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt][WK1] Web Audio support
+ https://bugs.webkit.org/show_bug.cgi?id=106651
+
+ Reviewed by Jocelyn Turcotte.
+
+ Implements support for dumping audio data in DumpRenderTree.
+
+ Adds WebAudio to toggleable features in QtTestBrowser.
+
+ Enables LEGACY_WEB_AUDIO. This feature is required for 2/3 of the web audio regression tests. It is enabled by default
+ because it has no effect when WEB_AUDIO is not enabled. This combination matches the settings in FeatureList.pm.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::reset):
+ (TestRunner::overridePreference):
+ (TestRunner::setAudioData):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner::shouldDumpAsAudio):
+ (TestRunner::audioData):
+ (TestRunner):
+ * QtTestBrowser/launcherwindow.cpp:
+ (LauncherWindow::applyPrefs):
+ (LauncherWindow::createChrome):
+ (LauncherWindow::toggleWebAudio):
+ * QtTestBrowser/launcherwindow.h:
+ (WindowOptions::WindowOptions):
+ (WindowOptions):
+ (LauncherWindow):
+ * qmake/mkspecs/features/features.prf:
+ * qmake/mkspecs/features/features.pri:
+
+2013-01-11 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Unreviewed jhbuild-related fix after r139431.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.__init__): Pass a string to set_option_default(), since
+ shlex.split() will be called on it later.
+
+2013-01-11 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed typo fixes after r139431.
+
+ * Scripts/run-javascriptcore-tests:
+
+2013-01-11 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [jhbuild] Remove the "run-with-jhbuild" scripts.
+ https://bugs.webkit.org/show_bug.cgi?id=106572
+
+ Reviewed by Martin Robinson.
+
+ Both ports which use jhbuild were mostly duplicating the
+ `run-with-jhbuild' script in their own directories for no clear reason.
+
+ The script itself was just a thin wrapper around the `jhbuild-wrapper',
+ so just start using that directly and get rid of a useless middle man.
+
+ Adjust scripts which called run-with-jhbuild to call jhbuild-wrapper
+ instead.
+
+ * Scripts/run-javascriptcore-tests:
+ * Scripts/run-launcher:
+ * Scripts/webkitdirs.pm:
+ (runAutogenForAutotoolsProjectIfNecessary):
+ (buildAutotoolsProject):
+ (jhbuildWrapperPrefixIfNeeded):
+ (generateBuildSystemFromCMakeProject):
+ (buildCMakeGeneratedProject):
+ * Scripts/webkitpy/common/multiprocessing_bootstrap.py:
+ (run):
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.__init__):
+ (EflPort._image_diff_command):
+ * efl/run-with-jhbuild: Removed.
+ * gtk/run-with-jhbuild: Removed.
+
+2013-01-11 Alan Cutter <alancutter@chromium.org>
+
+ Allow arbitrary queue launch parameters in EWSTools/start-queue.sh
+ https://bugs.webkit.org/show_bug.cgi?id=106636
+
+ Reviewed by Adam Barth.
+
+ This parameter will allow the bot boot script to use start-queue.sh and provide an IRC password for sheriffbot.
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/screen-config:
+ * EWSTools/start-queue.sh:
+
+2013-01-10 Ryosuke Niwa <rniwa@webkit.org>
+
+ kill-old-processes and delete-stale-build-files use CRLF linebreaks
+ https://bugs.webkit.org/show_bug.cgi?id=106622
+
+ Reviewed by Simon Fraser.
+
+ Use LF instead of CRLF in kill-old-processes and delete-stale-build-files.
+ Also escape clang\+\+ correctly in kill-old-processes.
+
+ * BuildSlaveSupport/delete-stale-build-files:
+ * BuildSlaveSupport/kill-old-processes:
+
+2013-01-10 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix after r139357. It was missing a comma.
+
+ * QueueStatusServer/model/queues.py:
+ (Queue):
+
+2013-01-10 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Fixing AuthenticationError when running test-webkitpy as a non-committer.
+ https://bugs.webkit.org/show_bug.cgi?id=106420
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.push_local_commits_to_server):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVNRepository):
+ (SVNRepository.has_authorization_for_realm):
+
+2013-01-10 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][jhbuild] Use tarballs for gstreamer instead of git
+ https://bugs.webkit.org/show_bug.cgi?id=106552
+
+ Reviewed by Laszlo Gombos.
+
+ Use tarballs for gstreamer instead of git in EFL's jhbuild
+ to work around intermittent network issues on our build
+ bots. Tarballs are fully cached and require no network
+ operation if their checksum matches.
+
+ * efl/jhbuild.modules:
+
+2013-01-10 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add Mac WK2 EWS bots
+ https://bugs.webkit.org/show_bug.cgi?id=106590
+
+ Reviewed by Adam Barth.
+
+ Added MacWK2EWS, and made myself a watcher for MacEWS and MacWK2EWS.
+ Also add a deprecated MacWK2Port class.
+
+ * QueueStatusServer/model/queues.py:
+ (Queue):
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.port):
+ (MacWK2Port):
+ (MacWK2Port.run_webkit_tests_command):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (MacEWS):
+ (MacWK2EWS):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (_test_ewses):
+
+2013-01-10 Dan Carney <dcarney@google.com>
+
+ [chromium] move webpermissionclient related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106548
+
+ Reviewed by Jochen Eisinger.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner::WebTestDelegate::normalizeLayoutTestURL):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebKit):
+ (WebTestRunner::WebTestRunner::webPermissions):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::setDelegate):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::webPermissions):
+ (WebTestRunner::TestRunner::dumpPermissionClientCallbacks):
+ (WebTestRunner::TestRunner::setImagesAllowed):
+ (WebTestRunner::TestRunner::setScriptsAllowed):
+ (WebTestRunner::TestRunner::setStorageAllowed):
+ (WebTestRunner::TestRunner::setPluginsAllowed):
+ (WebTestRunner::TestRunner::setAllowDisplayOfInsecureContent):
+ (WebTestRunner::TestRunner::setAllowRunningOfInsecureContent):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.cpp: Renamed from Tools/DumpRenderTree/chromium/WebPermissions.cpp.
+ (WebTestRunner):
+ (WebTestRunner::WebPermissions::WebPermissions):
+ (WebTestRunner::WebPermissions::~WebPermissions):
+ (WebTestRunner::WebPermissions::allowImage):
+ (WebTestRunner::WebPermissions::allowScriptFromSource):
+ (WebTestRunner::WebPermissions::allowStorage):
+ (WebTestRunner::WebPermissions::allowPlugins):
+ (WebTestRunner::WebPermissions::allowDisplayingInsecureContent):
+ (WebTestRunner::WebPermissions::allowRunningInsecureContent):
+ (WebTestRunner::WebPermissions::setImagesAllowed):
+ (WebTestRunner::WebPermissions::setScriptsAllowed):
+ (WebTestRunner::WebPermissions::setStorageAllowed):
+ (WebTestRunner::WebPermissions::setPluginsAllowed):
+ (WebTestRunner::WebPermissions::setDisplayingInsecureContentAllowed):
+ (WebTestRunner::WebPermissions::setRunningInsecureContentAllowed):
+ (WebTestRunner::WebPermissions::setDelegate):
+ (WebTestRunner::WebPermissions::setDumpCallbacks):
+ (WebTestRunner::WebPermissions::reset):
+ * DumpRenderTree/chromium/TestRunner/src/WebPermissions.h: Renamed from Tools/DumpRenderTree/chromium/WebPermissions.h.
+ (WebTestRunner):
+ (WebPermissions):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ (TestShell::resetTestController):
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::normalizeLayoutTestURL):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-10 Alan Cutter <alancutter@chromium.org>
+
+ Split EWS tool cold-boot.sh into modular components
+ https://bugs.webkit.org/show_bug.cgi?id=106527
+
+ Reviewed by Adam Barth.
+
+ Split cold-boot.sh script up into build-vm.sh, build-repo.sh and build-boot-cmd.sh.
+ Updated GCE bot build scripts to match.
+ Unable to test scripts directly as they depend on being in the repository to work!
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/build-boot-cmd.sh: Copied from Tools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh.
+ * EWSTools/build-repo.sh: Copied from Tools/EWSTools/cold-boot.sh.
+ * EWSTools/build-vm.sh: Renamed from Tools/EWSTools/cold-boot.sh.
+
+2013-01-10 Julie Parent <jparent@chromium.org>
+
+ Dashboard Cleanup: Do not generate the page if we are about to reload.
+ https://bugs.webkit.org/show_bug.cgi?id=106584
+
+ Reviewed by Dirk Pranke.
+
+ Move the logic to determine if we should generate the page into
+ parseParameters() since that is where we have the knowledge to
+ determine it, and return that value to handleLocationChange,
+ rather than passing the changed parameters back to handleLocationChange
+ and having it make the decision.
+
+ This is logically equivalent, save one case: when we are about to do
+ a reload, we know that there is no reason to generate the page. Old
+ code was causing an extra page generation in this case.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseParameters):
+ (handleLocationChange):
+
+2013-01-10 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [jhbuild] Use the "configure" script to build glib
+ https://bugs.webkit.org/show_bug.cgi?id=106569
+
+ Reviewed by Martin Robinson.
+
+ So far both EFL and GTK have been using autogen.sh to build glib.
+ While that does work most of the time, it's not really needed since
+ we are downloading and building stable releases from tarballs.
+ Additionally, autogen.sh fails to work with automake 1.13 due to the
+ usage of some macros that have been removed (this has already been
+ fixed in glib master).
+
+ * efl/jhbuild.modules:
+ * gtk/jhbuild.modules:
+
+2013-01-10 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Changing tests to be consistent and use self.scm rather then recreating the scm object.
+ (Missed a couple)
+ https://bugs.webkit.org/show_bug.cgi?id=106536
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+
+2013-01-10 Tony Chang <tony@chromium.org>
+
+ Speed up supplemental dependency computation
+ https://bugs.webkit.org/show_bug.cgi?id=106503
+
+ Reviewed by Adam Barth.
+
+ Pass the IDL attributes file for generating the bindings in WebKitTestRunner.
+
+ * WebKitTestRunner/CMakeLists.txt:
+
+2013-01-10 Zan Dobersek <zandobersek@gmail.com>
+
+ Remove the ENABLE_ANIMATION_API feature define occurences
+ https://bugs.webkit.org/show_bug.cgi?id=106544
+
+ Reviewed by Simon Fraser.
+
+ The Animation API code was removed in r137243. The ENABLE_ANIMATION_API
+ feature define handling still lingers in various build systems and configurations
+ but is of no use, so it should be removed.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-01-10 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Add support for loading web process extensions
+ https://bugs.webkit.org/show_bug.cgi?id=105631
+
+ Reviewed by Gustavo Noronha Silva.
+
+ * MiniBrowser/gtk/GNUmakefile.am:
+ * MiniBrowser/gtk/main.c:
+ (main): Set WEBKIT_INJECTED_BUNDLE env var to use the injected
+ bundle lib from build dir.
+ * Scripts/webkitpy/style/checker.py: Add exceptions for GTK+ API
+ located in WebProcess/InjectedBundle/API/gtk.
+ * gtk/generate-gtkdoc:
+ (get_webkit2_options): Scan also files in
+ WebProcess/InjectedBundle/API/gtk to generate API docs.
+ (get_webkit2_options.injected_bundle_src_path): Helper function to
+ build paths in WebProcess/InjectedBundle/API/gtk.
+
+2013-01-10 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Writing immediately to created windows (open) fails
+ https://bugs.webkit.org/show_bug.cgi?id=105276
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Do not reset 'about:blank' url for the new pages in mini browser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+
+2013-01-10 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Changing tests to be consistent and use self.scm rather then recreating the scm object.
+ https://bugs.webkit.org/show_bug.cgi?id=106536
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+
+2013-01-10 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Converting to unittest2 so we can use assertItemsEqual, making tests
+ not dependent on order of items.
+ https://bugs.webkit.org/show_bug.cgi?id=106532
+
+ Before:
+ Ran 1733 tests in 38.385s
+ FAILED (failures=1, errors=22)
+
+ After:
+ Ran 1733 tests in 32.298s
+ FAILED (failures=0, errors=22)
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook._install_unittest2):
+
+2013-01-10 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Add gstreamer 1.0.5 to jhbuild
+ https://bugs.webkit.org/show_bug.cgi?id=106178
+
+ Reviewed by Laszlo Gombos.
+
+ Add gstreamer 1.0.5 to EFL's jhbuild configuration.
+
+ * efl/jhbuild.modules:
+
+2013-01-09 Alan Cutter <alancutter@chromium.org>
+
+ Updated parameters in GCE build scripts so they now work.
+ https://bugs.webkit.org/show_bug.cgi?id=106523
+
+ Reviewed by Adam Barth.
+
+ * EWSTools/GoogleComputeEngine/build-chromium-ews.sh:
+ * EWSTools/GoogleComputeEngine/build-commit-queue.sh:
+ * EWSTools/cold-boot.sh:
+
+2013-01-09 Mark Pilgrim <pilgrim@chromium.org>
+
+ [Chromium] Remove some stray references to WebKitPlatformSupport.h in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=106520
+
+ Reviewed by James Robinson.
+
+ Part of a larger refactoring series. See tracking bug 82948.
+
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.h:
+ * DumpRenderTree/chromium/WebThemeEngineDRTMac.mm:
+
+2013-01-09 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: Remove code for currentState and window.location.hash getting out of state
+ https://bugs.webkit.org/show_bug.cgi?id=106514
+
+ This is old code, as these can no longer get out of sync.
+ permmaLinkURLHash is generated from currentState, which is set only
+ from the location. The commment about how these can get out of sync
+ refers to a function that no longer exists.
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (handleLocationChange):
+
+2013-01-09 Julie Parent <jparent@chromium.org>
+
+ Dashboard Cleanup: Reload the page as soon as we know we need to.
+ https://bugs.webkit.org/show_bug.cgi?id=106515
+
+ No need to continue parsing all of the data once we know that
+ we need to do a reload.
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseParameters):
+
+2013-01-09 Eric Seidel <eric@webkit.org>
+
+ run-perf-tests --chromium-android --profile should show symbols for the kernel
+ https://bugs.webkit.org/show_bug.cgi?id=106498
+
+ Reviewed by Adam Barth.
+
+ Turns out this was easy, once I finally read the output from "perf report".
+ It appears there may be a bug in "perf record" on android, as it complains
+ about not being able to read from /proc/kallsyms even when
+ /proc/sys/kernel/kptr_restrict is 0. For now I've not bothered
+ to keep /proc/sys/kernel/kptr_restrict as 0 during the actual record
+ but rather just flip it to 0 long enough to grab the /proc/kallsyms
+ and then flip it back to whatever the device had.
+
+ /proc/sys/kernel/kptr_restrict controls what /proc/kallsyms returns
+ on Linux. /proc/kallsyms contains a mapping of kernel addresses
+ to symbol names. Its world-readable, but will return all 0s if you
+ don't have permission to see the kernel symbols. kptr_restrict
+ supports values 0, 1, 2. Where 0 means "everyone can see the real symbols"
+ 1 is only a specific group, and 2 is "no one, not even root".
+ By default kptr_restrict is 2 on Android it seems.
+ More kptr_restrict docs: http://lwn.net/Articles/420403/
+
+ I also took this opportunity to clean up how the perf record command
+ was built for use/display in AndroidPerf.profile_after_exit and
+ change to always using long-form names for the arguments (to hopefully help readability).
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (AndroidPerf.__init__):
+ (profile_after_exit):
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver._update_kallsyms_cache):
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+
+2013-01-09 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: remove dead code.
+ https://bugs.webkit.org/show_bug.cgi?id=106509
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseParameters):
+
+2013-01-09 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] accessibility/aria-labelledby-overrides-label.html requires a proper baseline
+ https://bugs.webkit.org/show_bug.cgi?id=105638
+
+ Reviewed by Martin Robinson.
+
+ The test was failing for two reasons:
+ - AccessibilityRenderObject::correspondingLabelForControlElement() was
+ not ignoring the ARIA labelled-by property
+ - AccessibilityController::accessibleElementById() was not implemented
+
+ Because getting an element by ID cannot be done in the UIProcess, the
+ decision was made to expose the element's ID as an accessible attribute
+ of the object.
+
+ In addition, fixing the bug in AccessibilityRenderObject made it possible
+ to eliminate the Gtk platform-specific expectations for another test.
+
+ * DumpRenderTree/gtk/AccessibilityControllerGtk.cpp:
+ (childElementById): Added. Walks the tree looking for the AtkObject
+ Attribute which exposes the HTML element's ID.
+ (AccessibilityController::accessibleElementById): Implemented.
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::title): Modified to print out "AXTitle: " even
+ when there is no title, as is done with the Mac port.
+ * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp:
+ (WTR::childElementById): Added. Walks the tree looking for the AtkObject
+ Attribute which exposes the HTML element's ID.
+ (WTR):
+ (WTR::AccessibilityController::accessibleElementById): Implemented.
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::title): Modified to print out "AXTitle: "
+ even when there is no title, as is done with the Mac port.
+
+2013-01-09 Gregg Tavares <gman@google.com>
+
+ Add Gregg Tavares as a committer
+ https://bugs.webkit.org/show_bug.cgi?id=106492
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-09 Roger Fong <roger_fong@apple.com>
+
+ Enable seamless iFrames for Windows DRT.
+ https://bugs.webkit.org/show_bug.cgi?id=106468.
+
+ Rubberstamped by Timothy Horton.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+
+2013-01-09 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2] Implement eventSender.scheduleAsynchronousKeyDown
+ https://bugs.webkit.org/show_bug.cgi?id=93979
+
+ Reviewed by Benjamin Poulain.
+
+ Implement eventSender.scheduleAsynchronousKeyDown() in
+ WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
+ * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
+ (WTR::createKeyDownMessageBody):
+ (WTR::EventSendingController::keyDown):
+ (WTR::EventSendingController::scheduleAsynchronousKeyDown):
+ * WebKitTestRunner/InjectedBundle/EventSendingController.h:
+ (EventSendingController):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::didReceiveKeyDownMessageFromInjectedBundle):
+ (WTR::TestController::didReceiveMessageFromInjectedBundle):
+ (WTR::TestController::didReceiveSynchronousMessageFromInjectedBundle):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+
+2013-01-09 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move resource load callback dumping to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106449
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ (WebTestRunner::WebTestDelegate::makeURLErrorDescription):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::assignIdentifierToRequest):
+ (WebTestRunner::WebTestProxy::willRequestResource):
+ (WebTestRunner::WebTestProxy::willSendRequest):
+ (WebTestRunner::WebTestProxy::didReceiveResponse):
+ (WebTestRunner::WebTestProxy::didFinishResourceLoad):
+ (WebTestRunner::WebTestProxy::didFailResourceLoad):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldDumpResourceLoadCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpResourceRequestCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpResourceResponseMIMETypes):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpResourceLoadCallbacks):
+ (WebTestRunner::TestRunner::shouldDumpResourceRequestCallbacks):
+ (WebTestRunner::TestRunner::shouldDumpResourceResponseMIMETypes):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::dumpResourceLoadCallbacks):
+ (WebTestRunner::TestRunner::dumpResourceRequestCallbacks):
+ (WebTestRunner::TestRunner::dumpResourceResponseMIMETypes):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::reset):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::assignIdentifierToRequest):
+ (WebTestRunner::WebTestProxyBase::willRequestResource):
+ (WebTestRunner::WebTestProxyBase::willSendRequest):
+ (WebTestRunner::WebTestProxyBase::didReceiveResponse):
+ (WebTestRunner::WebTestProxyBase::didFinishResourceLoad):
+ (WebTestRunner::WebTestProxyBase::didFailResourceLoad):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::willSendRequest):
+ (WebViewHost::makeURLErrorDescription):
+ (WebViewHost::reset):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-09 Dan Carney <dcarney@google.com>
+
+ [chromium] move dumpcreateview methods to testrunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106434
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldDumpCreateView):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpCreateView):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::dumpCreateView):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-01-09 Csaba Osztrogonác <ossy@webkit.org>
+
+ webkitpy cleanup: Merge additional_comment_text into comment_text
+ https://bugs.webkit.org/show_bug.cgi?id=106421
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/config/committervalidator.py:
+ (CommitterValidator.reject_patch_from_commit_queue):
+ (CommitterValidator.reject_patch_from_review_queue):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ (Bugzilla.set_flag_on_attachment):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
+ (MockBugzilla.set_flag_on_attachment):
+ * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem._post_reject_message_on_bug):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2013-01-09 Mario Sanchez Prada <mario.prada@samsung.com>
+
+ [GTK] Raise version of gdk-pixbuf in jhbuild up to 2.26.5
+ https://bugs.webkit.org/show_bug.cgi?id=106464
+
+ Reviewed by Martin Robinson.
+
+ Current version in jhbuild.modules (2.26.0) is giving trouble to
+ when trying to build WebKitGTK from scratch, due to a segmentation
+ fault error in gdk-pixbuf-query-loader during the 'make'
+ phase. Raising the version to 2.26.5 fixes this issue.
+
+ * gtk/jhbuild.modules: Version raised, checksums updated.
+
+2013-01-09 János Badics <jbadics@inf.u-szeged.hu>
+
+ [Qt][NRWT] Pass --timeout to DRT/WTR if a test is marked as SLOW.
+ https://bugs.webkit.org/show_bug.cgi?id=90968.
+
+ Reviewed by Csaba Osztrogonác.
+
+ Added functionality in DRT and WTR to use any timeout value while running
+ slow tests (eventually, any test). Now NRWT --time-out-ms determines the
+ timeout value for the test. Added a flag in NRWT (supports_per_test_timeout)
+ to indicate whether the current port supports setting timeout value
+ per test (it's False by default; I enabled it only on Qt).
+ Also corrected a typo in driver.py
+
+ * DumpRenderTree/DumpRenderTree.h:
+ (TestCommand::TestCommand):
+ (TestCommand):
+ * DumpRenderTree/DumpRenderTreeCommon.cpp:
+ (parseInputLine):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::processLine):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.supports_per_test_timeout):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.run_test):
+ (Driver._command_from_driver_input):
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort.supports_per_test_timeout):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::InjectedBundle):
+ (WTR::InjectedBundle::didReceiveMessage):
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setCustomTimeout):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController):
+ (WTR::TestController::getCustomTimeout):
+ (WTR):
+ (WTR::TestCommand::TestCommand):
+ (TestCommand):
+ (WTR::parseInputLine):
+ (WTR::TestController::runTest):
+ (WTR::TestController::runUntil):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::TestInvocation):
+ (WTR::TestInvocation::setCustomTimeout):
+ (WTR):
+ (WTR::TestInvocation::invoke):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+
+2013-01-08 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Regression(r138681): Add HAVE(ACCESSIBILITY) guard to atk files
+ https://bugs.webkit.org/show_bug.cgi?id=106290
+
+ Reviewed by Martin Robinson.
+
+ Some atk files don't use HAVE(ACCESSIBILITY). It might make build errors when
+ the macro isn't enabled.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+
+2013-01-08 Martin Robinson <mrobinson@igalia.com>
+
+ WebKitTestRunner needs support for setHandlesAuthenticationChallenges
+ https://bugs.webkit.org/show_bug.cgi?id=103653
+
+ Reviewed by Anders Carlsson.
+
+ Implement setHandlesAuthenticationChallenges in the UIProcess by sending credentials
+ and the enabled boolean to the UIProcess and then implementing the didReceiveAuthenticationChallengeInFrame
+ client callback.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Exposed the new TestRunner
+ methods to the JavaScript API.
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setHandlesAuthenticationChallenges): Added this callback for the JavaScript API.
+ (WTR::TestRunner::setAuthenticationUsername): Ditto.
+ (WTR::TestRunner::setAuthenticationPassword): Ditto.
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner): Added new declarations for the above.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions): Hook up the new didReceiveSynchronousMessageFromInjectedBundle
+ callback.
+ (WTR::TestController::resetStateToConsistentValues): Reset the credentials and enabled boolean between tests.
+ (WTR::TestController::didReceiveAuthenticationChallengeInFrame): Handle the callback by using
+ the authentication information passed from the InjectedBundle.
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::setHandlesAuthenticationChallenges): Added setter to allow TestInvocation
+ to communicate with the TestController.
+ (WTR::TestController::setAuthenticationUsername): Ditto.
+ (WTR::TestController::setAuthenticationPassword): Ditto.
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Handle the messages sending authentication
+ information from the InjectedBundle.
+ (WTR::TestInvocation::outputText): Added this method so that the TestController can output
+ text to the TestInvocation text output.
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation): Added declaration for new method.
+
+2013-01-08 Benjamin Poulain <benjamin@webkit.org>
+
+ Add myself as a watcher for Web Geolocation
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-01-08 Zan Dobersek <zandobersek@gmail.com>
+
+ [webkitpy] Call setup_test_run method of the parent Port interface when method is called on subclasses
+ https://bugs.webkit.org/show_bug.cgi?id=106364
+
+ Reviewed by Eric Seidel.
+
+ When the setup_test_run method is called on the subclasses of the base Port
+ interface, the parent method should also be called via super(), despite the
+ parent method not doing anything at the moment.
+
+ The according calls to super() are required in the ChromiumPort, EflPort
+ and GtkPort implementations.
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.setup_test_run):
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.setup_test_run):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.setup_test_run):
+
+2013-01-08 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: Remove globals g_buildersThatFailedToLoad and g_staleBuilders
+ https://bugs.webkit.org/show_bug.cgi?id=106356
+
+ g_buildersThatFailedToLoad and g_staleBuilders were globals defined in
+ dashboard_base, assigned by Loader, and used only by dashboard_base to
+ create error messages. Moved the variables to be privates on the Loader
+ object, moved error message creation to _getLoadingErrorMessages on the
+ Loader object, and now pass the errors back to dashboard base via the
+ resourceLoadingComplete callback.
+
+ Also removed the now unused clearError function, it was only being used
+ by unit tests to clean up global state.
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (resourceLoadingComplete):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-01-08 Zan Dobersek <zandobersek@gmail.com>
+
+ [EFL][GTK] Make the PulseAudioSanitizer an object on the EflPort, GtkPort
+ https://bugs.webkit.org/show_bug.cgi?id=106354
+
+ Reviewed by Eric Seidel.
+
+ Put the PulseAudioSanitizer object on the EflPort and GtkPort interfaces
+ instead of those two inheriting from it. Also add a mock object of the
+ sanitizer that's used in unit tests.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort):
+ (EflPort.__init__):
+ (EflPort.setup_test_run):
+ (EflPort.clean_up_test_run):
+ * Scripts/webkitpy/layout_tests/port/efl_unittest.py: Also correct the
+ importing order.
+ (EflPortTest.make_port): Put a mock PulseAudioSanitizer on the instance.
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort):
+ (GtkPort.__init__):
+ (GtkPort.setup_test_run):
+ (GtkPort.clean_up_test_run):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py: Also correct the
+ importing order.
+ (GtkPortTest.make_port): Put a mock PulseAudioSanitizer on the instance.
+ * Scripts/webkitpy/layout_tests/port/pulseaudio_sanitizer.py:
+ (PulseAudioSanitizer.unload_pulseaudio_module): Stylize the method as public.
+ (PulseAudioSanitizer.restore_pulseaudio_module): Ditto.
+ * Scripts/webkitpy/layout_tests/port/pulseaudio_sanitizer_mock.py: Added.
+ (PulseAudioSanitizerMock): A simple mock interface for PulseAudioSanitizer.
+ (PulseAudioSanitizerMock.unload_pulseaudio_module):
+ (PulseAudioSanitizerMock.restore_pulseaudio_module):
+
+2013-01-08 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move dumpFrameLoadCallbacks and friends to the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106324
+
+ Reviewed by Adam Barth.
+
+ Since the frame load callbacks are part of the WebFrameClient, the
+ WebTestProxy is now intercepting both WebViewClient and WebFrameClient
+ methods.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxy::WebTestProxy):
+ (WebTestProxy):
+ (WebTestRunner::WebTestProxy::didInvalidateRect):
+ (WebTestRunner::WebTestProxy::didScrollRect):
+ (WebTestRunner::WebTestProxy::scheduleComposite):
+ (WebTestRunner::WebTestProxy::scheduleAnimation):
+ (WebTestRunner::WebTestProxy::setWindowRect):
+ (WebTestRunner::WebTestProxy::show):
+ (WebTestRunner::WebTestProxy::didAutoResize):
+ (WebTestRunner::WebTestProxy::postAccessibilityNotification):
+ (WebTestRunner::WebTestProxy::startDragging):
+ (WebTestRunner::WebTestProxy::shouldBeginEditing):
+ (WebTestRunner::WebTestProxy::shouldEndEditing):
+ (WebTestRunner::WebTestProxy::shouldInsertNode):
+ (WebTestRunner::WebTestProxy::shouldInsertText):
+ (WebTestRunner::WebTestProxy::shouldChangeSelectedRange):
+ (WebTestRunner::WebTestProxy::shouldDeleteRange):
+ (WebTestRunner::WebTestProxy::shouldApplyStyle):
+ (WebTestRunner::WebTestProxy::didBeginEditing):
+ (WebTestRunner::WebTestProxy::didChangeSelection):
+ (WebTestRunner::WebTestProxy::didChangeContents):
+ (WebTestRunner::WebTestProxy::didEndEditing):
+ (WebTestRunner::WebTestProxy::registerIntentService):
+ (WebTestRunner::WebTestProxy::dispatchIntent):
+ (WebTestRunner::WebTestProxy::willPerformClientRedirect):
+ (WebTestRunner::WebTestProxy::didCancelClientRedirect):
+ (WebTestRunner::WebTestProxy::didStartProvisionalLoad):
+ (WebTestRunner::WebTestProxy::didReceiveServerRedirectForProvisionalLoad):
+ (WebTestRunner::WebTestProxy::didFailProvisionalLoad):
+ (WebTestRunner::WebTestProxy::didCommitProvisionalLoad):
+ (WebTestRunner::WebTestProxy::didReceiveTitle):
+ (WebTestRunner::WebTestProxy::didFinishDocumentLoad):
+ (WebTestRunner::WebTestProxy::didHandleOnloadEvents):
+ (WebTestRunner::WebTestProxy::didFailLoad):
+ (WebTestRunner::WebTestProxy::didFinishLoad):
+ (WebTestRunner::WebTestProxy::didChangeLocationWithinPage):
+ (WebTestRunner::WebTestProxy::didDisplayInsecureContent):
+ (WebTestRunner::WebTestProxy::didRunInsecureContent):
+ (WebTestRunner::WebTestProxy::didDetectXSS):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::setTestIsRunning):
+ (WebTestRunner::WebTestRunner::shouldDumpFrameLoadCallbacks):
+ (WebTestRunner::WebTestRunner::setShouldDumpFrameLoadCallbacks):
+ (WebTestRunner::WebTestRunner::shouldDumpUserGestureInFrameLoadCallbacks):
+ (WebTestRunner::WebTestRunner::stopProvisionalFrameLoads):
+ (WebTestRunner::WebTestRunner::shouldDumpTitleChanges):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setTestIsRunning):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::shouldDumpFrameLoadCallbacks):
+ (WebTestRunner::TestRunner::setShouldDumpFrameLoadCallbacks):
+ (WebTestRunner::TestRunner::shouldDumpUserGestureInFrameLoadCallbacks):
+ (WebTestRunner::TestRunner::stopProvisionalFrameLoads):
+ (WebTestRunner::TestRunner::shouldDumpTitleChanges):
+ (WebTestRunner::TestRunner::dumpFrameLoadCallbacks):
+ (WebTestRunner::TestRunner::dumpUserGestureInFrameLoadCallbacks):
+ (WebTestRunner::TestRunner::setStopProvisionalFrameLoads):
+ (WebTestRunner::TestRunner::dumpTitleChanges):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::webView):
+ (WebTestRunner::WebTestInterfaces::Internal::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::setWebView):
+ (WebTestRunner):
+ (WebTestRunner::WebTestInterfaces::Internal::setTestIsRunning):
+ (WebTestRunner::WebTestInterfaces::setWebView):
+ (WebTestRunner::WebTestInterfaces::setTestIsRunning):
+ (WebTestRunner::WebTestInterfaces::webView):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::willPerformClientRedirect):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::didCancelClientRedirect):
+ (WebTestRunner::WebTestProxyBase::didStartProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didReceiveServerRedirectForProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didFailProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didCommitProvisionalLoad):
+ (WebTestRunner::WebTestProxyBase::didReceiveTitle):
+ (WebTestRunner::WebTestProxyBase::didFinishDocumentLoad):
+ (WebTestRunner::WebTestProxyBase::didHandleOnloadEvents):
+ (WebTestRunner::WebTestProxyBase::didFailLoad):
+ (WebTestRunner::WebTestProxyBase::didFinishLoad):
+ (WebTestRunner::WebTestProxyBase::didChangeLocationWithinPage):
+ (WebTestRunner::WebTestProxyBase::didDisplayInsecureContent):
+ (WebTestRunner::WebTestProxyBase::didRunInsecureContent):
+ (WebTestRunner::WebTestProxyBase::didDetectXSS):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+ (TestShell::testFinished):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didStartProvisionalLoad):
+ (WebViewHost::didReceiveServerRedirectForProvisionalLoad):
+ (WebViewHost::didFailProvisionalLoad):
+ (WebViewHost::didCommitProvisionalLoad):
+ (WebViewHost::didReceiveTitle):
+ (WebViewHost::didFailLoad):
+ (WebViewHost::didFinishLoad):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2013-01-08 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Lower the default timeout value for WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=106353
+
+ Reviewed by Dirk Pranke.
+
+ The default timeout value for WebKitTestRunner should be lowered.
+ The current value (80 seconds) is irrational and just leads to producing
+ text failures for layout tests that genuinely time out. This just leads
+ to more deviation from the GTK WK1 port in terms of test expectations.
+
+ The value used is the same as when running the DumpRenderTree, that's
+ 6 seconds in release builds and 12 seconds in debug builds.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_default_timeout_ms):
+
+2013-01-08 Zan Dobersek <zandobersek@gmail.com>
+
+ test-webkitpy shows failure output on my linux box
+ https://bugs.webkit.org/show_bug.cgi?id=101261
+
+ Reviewed by Eric Seidel.
+
+ Mock out the PulseAudioSanitizer methods when creating testing instances
+ of EflPort and GtkPort interfaces in unit tests. This stops throwing up
+ PulseAudio output when the sanitizer was trying to unload modules which
+ were already unloaded by another unit test that was being run in parallel.
+
+ * Scripts/webkitpy/layout_tests/port/efl_unittest.py:
+ (EflPortTest):
+ (EflPortTest.make_port):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest):
+ (GtkPortTest.make_port):
+
+2013-01-08 Julie Parent <jparent@chromium.org>
+
+ Dashboard Cleanup: Remove g_hasDoneInitialPageGeneration
+ https://bugs.webkit.org/show_bug.cgi?id=106254
+
+ Remove the global variable g_hasDoneInitialPageGeneration. It was used
+ only to figure out if we should call addBuilderLoadErrors during
+ handleLocationChange, which was called when the loader completed and on
+ any hash change, but we only ever wanted to call addBuilderLoadErrors
+ on the initial loader load. Moved the call of addBuilderLoadErrors to
+ resourceLoadingComplete rather than handleLocationChange, so now we
+ only call it when we want to, and the check can go away completely.
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (addBuilderLoadErrors):
+ (resourceLoadingComplete):
+ (handleLocationChange):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+
+2013-01-08 Dominic Mazzoni <dmazzoni@google.com>
+
+ Add aboxhall@chromium.org to accessibility watchlist.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-01-08 Dan Winship <danw@gnome.org>
+
+ Add Apache 2.4 support for Fedora 18
+ https://bugs.webkit.org/show_bug.cgi?id=104478
+
+ Reviewed by Martin Robinson.
+
+ Apache 2.4's httpd.conf is slightly incompatible with 2.2's, so we
+ need a separate config.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port._apache_version):
+ (Port._apache_config_file_name_for_platform):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ * Scripts/run-webkit-httpd:
+ * Scripts/webkitperl/httpd.pm:
+ (getApacheVersion):
+ (getDefaultConfigForTestDirectory):
+ (getHTTPDConfigPathForTestDirectory):
+
+2013-01-08 Zan Dobersek <zandobersek@gmail.com>
+
+ Make the override-feature-defines script compatible with Python v3
+ https://bugs.webkit.org/show_bug.cgi?id=105742
+
+ Reviewed by Martin Robinson.
+
+ Instead of printing output through a statement, use the print function and format
+ the output using the str.format method. This makes the script runnable with Python v3.
+
+ * gtk/override-feature-defines:
+ (adjust_feature_defines_makefile):
+
+2013-01-08 Heikki Paajanen <heikki.paajanen@palm.com>
+
+ [Qt] Fix libxml2 config test
+ https://bugs.webkit.org/show_bug.cgi?id=106317
+
+ Reviewed by Simon Hausmann.
+
+ Don't assume standard include/libxml2, libxml-2.0.pc should know
+ where it's headers are.
+
+ * qmake/config.tests/libxml2/libxml2.cpp: Fix include
+
+2013-01-08 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Make Tools/gtk/generate-gtkdoc compatible with Python 3
+ https://bugs.webkit.org/show_bug.cgi?id=106195
+
+ Reviewed by Philippe Normand.
+
+ Perform changes in the generate-gtkdoc script and common and gtkdoc modules
+ to make the Python code compatible with Python 3. This includes modifying
+ print statements, exception handling, dictionary iteration and
+ byte-sequence-to-string conversion.
+
+ * gtk/common.py:
+ (get_build_path):
+ (pkg_config_file_variable):
+ (gtk_version_of_pkg_config_file):
+ * gtk/generate-gtkdoc:
+ (print_missing_api):
+ * gtk/gtkdoc.py:
+ (GTKDoc.__init__):
+ (GTKDoc._run_command):
+
+2013-01-02 Steve Block <steveblock@chromium.org>
+
+ Add chromium.org email address for Steve Block.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2013-01-07 Filip Pizlo <fpizlo@apple.com>
+
+ Rationalize closure call heuristics and profiling
+ https://bugs.webkit.org/show_bug.cgi?id=106270
+
+ Reviewed by Oliver Hunt.
+
+ Add ability to use display-profiler-output via a pipe, and add the ability to dump
+ all generated code ('display *' or 'd *').
+
+ * Scripts/display-profiler-output:
+
+2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Sorted more xcodeproj files.
+
+ * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
+
+2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Sorted xcodeproj files.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
+2013-01-07 Dan Bernstein <mitz@apple.com>
+
+ [mac] WebKit1 clients can’t tell when a frame has been removed from the hierarchy
+ https://bugs.webkit.org/show_bug.cgi?id=106261
+
+ Reviewed by Simon Fraser.
+
+ Added a test for -[WebFrameLoadDelegate webView:didRemoveFrameFromHierarchy:].
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm: Added.
+ (-[DidRemoveFrameFromHierarchyFrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[DidRemoveFrameFromHierarchyFrameLoadDelegate webView:didRemoveFrameFromHierarchy:]):
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2013-01-07 Ojan Vafai <ojan@chromium.org>
+
+ Add the Apple MountainLion bots to garden-o-matic.
+ Eventually, we really should move away from hardcoding
+ the list of bots.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+
+2013-01-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move web audio related methods to testrunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106211
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebKit):
+ (WebTestRunner::WebTestRunner::shouldDumpAsAudio):
+ (WebTestRunner::WebTestRunner::audioData):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpAsAudio):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::audioData):
+ (WebTestRunner::TestRunner::setAudioData):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump):
+
+2013-01-07 Mike West <mkwst@chromium.org>
+
+ Make the IFRAME_SEAMLESS flag runtime-enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=106213
+
+ Reviewed by Ojan Vafai.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ Ensure that seamless IFrames are enabled for layout tests in each of
+ the ports that support seamless IFrames.
+
+2013-01-07 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move dumpAsText and friends to the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=106222
+
+ Reviewed by Adam Barth.
+
+ This moves dumpAsText, dumpChildFramesAsText, and dumpChildFrameScrollPositions to the TestRunner library.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h:
+ (WebTestRunner::WebTestRunner::shouldDumpAsText):
+ (WebTestRunner::WebTestRunner::setShouldDumpAsText):
+ (WebTestRunner::WebTestRunner::shouldGeneratePixelResults):
+ (WebTestRunner::WebTestRunner::setShouldGeneratePixelResults):
+ (WebTestRunner::WebTestRunner::shouldDumpChildFrameScrollPositions):
+ (WebTestRunner::WebTestRunner::shouldDumpChildFramesAsText):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpAsText):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setShouldDumpAsText):
+ (WebTestRunner::TestRunner::shouldGeneratePixelResults):
+ (WebTestRunner::TestRunner::setShouldGeneratePixelResults):
+ (WebTestRunner::TestRunner::shouldDumpChildFrameScrollPositions):
+ (WebTestRunner::TestRunner::shouldDumpChildFramesAsText):
+ (WebTestRunner::TestRunner::dumpAsText):
+ (WebTestRunner::TestRunner::dumpChildFrameScrollPositions):
+ (WebTestRunner::TestRunner::dumpChildFramesAsText):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix attempt after r138810.
+
+ Apparently python 2.6 is really bad at floating point computation.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (MainTest.test_run_memory_test):
+
+2013-01-07 Ryosuke Niwa <rniwa@webkit.org>
+
+ Extract a class to represent a test result to simplify PerfTest.parse_output and PageLoadPerfTest._run_with_driver
+ https://bugs.webkit.org/show_bug.cgi?id=106172
+
+ Reviewed by Tony Chang.
+
+ Extracted PerfTestMetric, which represents a test result and knows how to compute statistics and convert itself
+ to a dictionary. A metric is a type of measurement each test makes such as "Time", "Malloc", and "JSHeap".
+ A single test (e.g. html5-full-render.html) may have multiple metrics, each of which is reported as a separate
+ test on perf-o-matic and perf. test's results page.
+
+ Also, use python's compute_statistics instead of reading statistics off of DriverOutput to simplify the code.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTestMetric): Added.
+ (PerfTestMetric.__init__): Added.
+ (PerfTestMetric.metric): Added.
+ (PerfTestMetric.has_values): Added.
+ (PerfTestMetric.legacy_chromium_bot_compatible_test_name): Added. Following the legacy convention, "Malloc" and
+ "JSHeap" will use "test_name:Malloc" whereas "Time" uses "test_name" itself. We should eventually move these
+ conversions to be done on the client side (perf-o-matic and results page).
+ (PerfTestMetric.append): Added.
+ (PerfTestMetric.to_dict): Added. Computes the statistics and generates the dictionary object that represents
+ a result for this metric.
+ (PerfTestMetric.metric_to_unit): Added. Each metric maps to exactly one unit (it's not one-to-one).
+ (PerfTestMetric.compute_statistics): Moved from PerfTest.
+
+ (PerfTest._create_driver): Extracted from PerfTest.run.
+ (PerfTest.run): Given an array of PerfTestMetric, generate the results dictionary. Also print out results
+ as needed.
+ (PerfTest._run_with_driver):
+ (PerfTest): Removed _result_classes and _result_class_regex. "result class" is the old name for "metric".
+ (PerfTest.parse_output): Dramatically simplified. We now just return an array of PerfTestMetric's. Also ignore
+ all keys except "values". We rely on PerfTestMetric to compute the statistics for us.
+
+ (ChromiumStylePerfTest.run): Added and merged _run_with_driver. Since chromium style perf tests are so different
+ from other perf tests, there isn't much point in sharing the code here.
+
+ (PageLoadingPerfTest._run_with_driver): Simplified. Just create an array of PerfTestMetric's without computing
+ statistics for the measured values.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPerfTestMetric): Added.
+ (TestPerfTestMetric.test_init_set_missing_unit): Added.
+ (TestPerfTestMetric.test_legacy_chromium_bot_compatible_test_name): Added.
+ (TestPerfTestMetric.test_has_values): Added.
+ (TestPerfTestMetric.test_append): Added.
+ (TestPerfTestMetric.test_compute_statistics.compute_statistics):
+ (TestPerfTestMetric.test_compute_statistics): Added a trivial test case.
+
+ (TestPerfTest._assert_results_are_correct): Updated as needed.
+ (TestPageLoadingPerfTest.test_run): Ditto. Notice that we no longer log anything in _run_with_driver. It's done
+ in PerfTest.run now after generating the results dictionary.
+ (TestPageLoadingPerfTest.test_run_with_memory_output): Ditto.
+
+2013-01-07 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Support size_t multiplication and division operators on LayoutUnit
+ https://bugs.webkit.org/show_bug.cgi?id=83848
+
+ Reviewed by Emil A Eklund.
+
+ * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
+ Added some simple tests for the new operators using size_t.
+
+2013-01-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] run-webkit-tests cleanup for parallel NRWT
+ https://bugs.webkit.org/show_bug.cgi?id=106220
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/run-webkit-tests:
+ (useNewRunWebKitTests):
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort):
+ (QtPort.default_child_processes):
+
+2013-01-07 Philippe Normand <pnormand@igalia.com>
+
+ Create a GStreamerAudio watchlist and add myself to it.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-01-05 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add svn:executable to a bunch of scripts in BuildSlaveSupport.
+ Also removed the empty mac directory.
+
+ * BuildSlaveSupport/built-product-archive: Added property svn:executable.
+ * BuildSlaveSupport/download-built-product: Added property svn:executable.
+ * BuildSlaveSupport/mac: Removed.
+ * BuildSlaveSupport/test-result-archive: Added property svn:executable.
+
+2013-01-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add a script to delete stale zero-byte build files
+ https://bugs.webkit.org/show_bug.cgi?id=106131
+
+ Reviewed by Tony Chang.
+
+ Delete zero-byte build files on Mac port for now. It doesn't do anything on other ports.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (DeleteStaleBuildFiles): Added.
+ (Factory.__init__): Add DeleteStaleBuildFiles step.
+ * BuildSlaveSupport/delete-stale-build-files: Added.
+ (main): Delete zero-byte files except ones intentionally generated by our build process.
+ (webkitBuildDirectory): Copied from build-product-archive.
+
+2013-01-04 Michael Pruett <michael@68k.org>
+
+ [GTK] Fix build error on GTK due to r138836
+ https://bugs.webkit.org/show_bug.cgi?id=106154
+
+ Reviewed by Kentaro Hara.
+
+ * GNUmakefile.am:
+
+2013-01-04 Dan Bernstein <mitz@apple.com>
+
+ [mac] WebKit1 has no equivalent of WKBundleNodeHandleCopyHTMLTableCellElementCellAbove
+ https://bugs.webkit.org/show_bug.cgi?id=106121
+
+ Reviewed by Adele Peterson.
+
+ Added test for -[DOMTHMLTableCellElement _cellAbove].
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm: Added.
+ (-[HTMLTableCellElementCellAboveTest webView:didFinishLoadForFrame:]):
+ (TestWebKitAPI):
+ (TestWebKitAPI::expectCellAboveCell):
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/mac/DOMHTMLTableCellElementCellAbove.html: Added.
+
+2013-01-04 Eric Seidel <eric@webkit.org>
+
+ FlakyTestReporter should be re-enabled and taught how to post patches
+ https://bugs.webkit.org/show_bug.cgi?id=103839
+
+ Reviewed by Adam Barth.
+
+ This moves LayoutTestResultsReader off of the DeprecatedPort object.
+ It also adds a real Port object to the EWS and CommitQueue objects
+ using a new PatchProcessingQueue superclass.
+ PatchProcessingQueue doesn't seem to be the cleanest insertion point
+ but works for this purpose.
+ I also moved _upload_results_archive_for_patch into PatchProcessingQueue
+ to resolve a FIXME.
+
+ This required some hacks/shiming between the non-specific "old"
+ port names which the EWS system is currently using, and the new
+ port objects. This shimming is done in PatchProcessingQueue._new_port_name_from_old.
+
+ Hopefully this will fix the flaky test reporter and results uploading.
+ Certainly it's another small step towards getting rid of the old ports.py
+ infrastructure and making the NRWT Port class common webkitpy infrastructure.
+
+ Now that DeprecatedPort is no longer used for the results directory
+ I removed all the explicit results-dir code which webkit-patch was using
+ in --non-interactive mode to tell NRWT to use a results-dir it understood. :)
+
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort.run_perl_unittests_command):
+ * Scripts/webkitpy/common/config/ports_mock.py:
+ (MockPort.name):
+ * Scripts/webkitpy/common/system/outputcapture.py:
+ (OutputCapture.assert_outputs):
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort.determine_full_port_name):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
+ (LayoutTestResultsReader.__init__):
+ (LayoutTestResultsReader):
+ (LayoutTestResultsReader._read_file_contents):
+ (LayoutTestResultsReader._create_layout_test_results):
+ (LayoutTestResultsReader._create_unit_test_results):
+ (LayoutTestResultsReader.results):
+ (LayoutTestResultsReader.archive):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+ (LayoutTestResultsReaderTest.test_missing_layout_test_results):
+ (LayoutTestResultsReaderTest.test_create_unit_test_results):
+ (test_missing_unit_test_results_path):
+ (test_layout_test_results):
+ (test_archive_last_layout_test_results):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem):
+ (AbstractEarlyWarningSystem.__init__):
+ (AbstractEarlyWarningSystem.begin_work_queue):
+ (AbstractEarlyWarningSystem.run_command):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (AbstractPatchQueue.work_item_log_path):
+ (PatchProcessingQueue):
+ (PatchProcessingQueue._new_port_name_from_old):
+ (PatchProcessingQueue.begin_work_queue):
+ (PatchProcessingQueue._upload_results_archive_for_patch):
+ (CommitQueue):
+ (CommitQueue.begin_work_queue):
+ (CommitQueue.run_command):
+ (AbstractReviewQueue):
+ (AbstractReviewQueue.__init__):
+ (AbstractReviewQueue.begin_work_queue):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (AbstractPatchQueueTest.test_next_patch):
+ (PatchProcessingQueueTest):
+ (PatchProcessingQueueTest.test_upload_results_archive_for_patch):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+
+2013-01-04 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove lost-compositor-context layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=106089
+
+ Reviewed by James Robinson.
+
+ Remove the loseCompositorContext() test function.
+
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2013-01-04 Adam Klein <adamk@chromium.org>
+
+ Remove ENABLE_MUTATION_OBSERVERS #define
+ https://bugs.webkit.org/show_bug.cgi?id=105459
+
+ Reviewed by Ryosuke Niwa.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2013-01-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Statistics used in perftest_unittest.py and perftest_integrationtest.py are bogus
+ https://bugs.webkit.org/show_bug.cgi?id=106078
+
+ Reviewed by Tony Chang.
+
+ This patch updates values for individual iterations in dummy performance tests used in
+ perftest_unittest.py and perftest_integrationtest.py so that they match up with
+ statistics such as stdev and median reported in those tests. This change is required
+ to resolve the bug 97510.
+
+ This patch also refactors integration tests by extracting *TestData classes that
+ centralizes the definitions of each dummy performance test's text (DRT output),
+ runner output, and parsed results (JSON) so that we may share more data between
+ python tests.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (MainTest._assert_results_are_correct): Extracted from test_parse_output.
+ Use self.assertAlmostEqual when comparing the standard deviation.
+ (MainTest.test_parse_output):
+ (test_parse_output_with_failing_line):
+ (test_parse_output_with_description): Use _assert_results_are_correct.
+ (test_parse_output_with_subtests): Ditto.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py:
+ (InspectorPassTestData): Extracted from tests below.
+ (EventTargetWrapperTestData): Ditto.
+ (SomeParserTestData): Ditto.
+ (MemoryTestData): Ditto.
+ (TestDriver.run_test): Moved test definitions out of the method.
+ (MainTest._normalize_output): Truncate standard deviations at 5th decimal point.
+ (MainTest._load_output_json): Extracted from create_runner.
+ (MainTest.create_runner):
+ (MainTest.test_run_test_set_for_parser_tests):
+ (MainTest.test_run_memory_test):
+ (MainTest._test_run_with_json_output):
+ (MainTest.test_run_with_json_output):
+ (MainTest.test_run_with_description):
+ (MainTest.test_run_generates_json_by_default):
+ (MainTest.test_run_merges_output_by_default):
+ (MainTest.test_run_respects_reset_results):
+ (MainTest.test_run_generates_and_show_results_page):
+ (MainTest.test_run_with_slave_config_json):
+ (MainTest.test_run_with_multiple_repositories):
+
+2013-01-04 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] [WebKit2] Clicking on a word that is selected in an editable area deletes it
+ https://bugs.webkit.org/show_bug.cgi?id=106045
+
+ Reviewed by Carlos Garcia Campos.
+
+ Update test results to confirm that compositions without preedits do not trigger
+ a composition confirmation.
+
+ * TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp:
+ (TestWebKitAPI::verifyCanceledComposition):
+
+2013-01-04 Sailesh Agrawal <sail@chromium.org>
+
+ [Mac] [WK2] platform/mac/fast/events/numpad-keycode-mapping.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=105958
+
+ Reviewed by Alexey Proskuryakov.
+
+ Ported code from DumpRenderTree to WebKitTestRunner to map all numpad keys.
+
+ * WebKitTestRunner/mac/EventSenderProxy.mm:
+ (KeyMappingEntry):
+ (WTR):
+ (WTR::EventSenderProxy::keyDown): Added all numpad keys.
+
+2013-01-03 Chris Fleizach <cfleizach@apple.com>
+
+ REGRESSION: [Mac] Intermittent crash in WTR::AccessibilityUIElement::isEqual
+ https://bugs.webkit.org/show_bug.cgi?id=106073
+
+ Reviewed by Ryosuke Niwa.
+
+ Check that the element being compared to is not nil.
+ This crash is happening because one of the accessibility tests does an isEqual comparison within a callback function.
+ It looks like occasionally, one of the elements passed in to the isEqual is nil because the notification handler is on the accessibility
+ controller, and the notification is being delivered after the document objects are cleared. This shouldn't happen but I've seen it
+ sometimes before on parallel WebKitTestRunner runs.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (AccessibilityUIElement::isEqual):
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::isEqual):
+
+2013-01-03 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Downloads can be flaky, so try downloading multiple times.
+ https://bugs.webkit.org/show_bug.cgi?id=105976
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._download_to_stream):
+
+2013-01-03 Eric Seidel <eric@webkit.org>
+
+ Rename Tool.port to deprecated_port in preparation for removing more callers
+ https://bugs.webkit.org/show_bug.cgi?id=106076
+
+ Reviewed by Ryosuke Niwa.
+
+ This resolves a long-standing FIXME to rename this method. :)
+
+ * Scripts/webkitpy/tool/bot/botinfo.py:
+ (BotInfo.summary_text):
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Rollout._update_working_copy):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
+ (LayoutTestResultsReader._create_layout_test_results):
+ (LayoutTestResultsReader._create_unit_test_results):
+ (LayoutTestResultsReader._results_directory):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+ (test_missing_unit_test_results_path):
+ * Scripts/webkitpy/tool/main.py:
+ (WebKitPatch.deprecated_port):
+ * Scripts/webkitpy/tool/mocktool.py:
+ (MockTool.deprecated_port):
+ * Scripts/webkitpy/tool/steps/build.py:
+ (Build.build):
+ * Scripts/webkitpy/tool/steps/checkstyle.py:
+ (CheckStyle.run):
+ * Scripts/webkitpy/tool/steps/commit.py:
+ (Commit._check_test_expectations):
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog.run):
+ * Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py:
+ (PrepareChangeLogForDEPSRoll.run):
+ * Scripts/webkitpy/tool/steps/preparechangelogforrevert.py:
+ (PrepareChangeLogForRevert.run):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/steps_unittest.py:
+ (StepsTest.test_runtests_args):
+ * Scripts/webkitpy/tool/steps/update.py:
+ (Update._update_command):
+
+2013-01-03 Eric Seidel <eric@webkit.org>
+
+ Add myself to the webkitpy watchlist.
+
+ Unreviewed.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2013-01-03 Ryosuke Niwa <rniwa@webkit.org>
+
+ Cleanup perftest* tests and add a test for computing statistics
+ https://bugs.webkit.org/show_bug.cgi?id=105685
+
+ Reviewed by Eric Seidel.
+
+ Add a test for PerfTest.compute_statistics (moved and renamed from PageLoadingPerfTest.calculate_statistics) and
+ extracted perftestsrunner_itegrationtests.py from perftestsrunner_unittests.py.
+
+ Also fixed a bug in compute_statistics that the mean ('avg') value can have a large rounding errors in some cases.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest.compute_statistics): Moved from PageLoadingPerfTest to prepare for the bug 97510. Also compute the mean
+ directly from sorted_values instead of using the one from Knuth's online algorithm. This approach gives more
+ accurate result for the mean.
+ (PageLoadingPerfTest.run_single):
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (MainTest.test_compute_statistics):
+ (MainTest.test_compute_statistics.compute_statistics): Added.
+ (TestPageLoadingPerfTest.test_run): floatify values.
+ (TestPageLoadingPerfTest.test_run_with_memory_output): Ditto. Also got rid of ".0" from mean values now that Python
+ correctly recognizes them as integers.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py: Copied from
+ Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py.
+ (TestDriver): Moved out of MainTest.
+ (MainTest): Got rid of assertWritten and all unit tests.
+ (MainTest._normalize_output): Renamed from normalizeFinishedTime to match the PEP8 naming convention.
+ (MainTest.test_run_test_set_kills_drt_per_run.TestDriverWithStopCount):
+ (MainTest.test_run_test_set_for_parser_tests):
+ (MainTest.test_run_memory_test):
+ (MainTest._test_run_with_json_output):
+ (MainTest.test_run_generates_json_by_default):
+ (MainTest.test_run_merges_output_by_default):
+ (MainTest.test_run_respects_reset_results):
+ (MainTest.test_run_generates_and_show_results_page): Use runner.load_output_json() instead of manually loading and
+ parsing output JSON files. Just verify that the output path is correct instead.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (MainTest): Removed all integration tests.
+ (MainTest.create_runner): Simplified.
+
+2013-01-03 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: remove usage of global g_defaultBuilderName
+ https://bugs.webkit.org/show_bug.cgi?id=106043
+
+ Use now public defaultBuilder() from the BuilderGroup, rather
+ than global variable.
+
+ Also eliminates the setup() and initBuilders() functions since we
+ no longer need to track the global.
+
+ Reviewed by Adam Barth.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (BuilderGroup.prototype.defaultBuilder):
+ (BuilderGroup.prototype.master):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (parseParameters):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (updateDefaultBuilderState):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-01-03 Ryosuke Niwa <rniwa@webkit.org>
+
+ Disable an intermittently failing unit test for now.
+ The failure is tracked by the bug 106051.
+
+ * TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm:
+ (TestWebKitAPI::TEST):
+
+2013-01-03 Dan Bernstein <mitz@apple.com>
+
+ No way to obtain a DOMNode given a JS wrapper for a Node
+ https://bugs.webkit.org/show_bug.cgi?id=106033
+
+ Added a test for +[DOMNode _nodeFromJSWrapper:].
+
+ Reviewed by Sam Weinig.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2013-01-03 Emil A Eklund <eae@chromium.org>
+
+ Fix overflow in LayoutUnit::ceil and floor for SATURATED_LAYOUT_ARITHMETIC
+ https://bugs.webkit.org/show_bug.cgi?id=105961
+
+ Reviewed by Levi Weintraub.
+
+ Add tests for LayoutUnit::ceil and floor.
+
+ * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
+ (TestWebKitAPI::TEST):
+ (TestWebKitAPI):
+
+2013-01-03 Julie Parent <jparent@chromium.org>
+
+ Add unit test for default builder for the dashboards.
+ https://bugs.webkit.org/show_bug.cgi?id=105972
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2013-01-03 Tony Chang <tony@chromium.org>
+
+ Generate internal.settings from Settings.in
+ https://bugs.webkit.org/show_bug.cgi?id=104740
+
+ Reviewed by Adam Barth.
+
+ * GNUmakefile.am: Compile new generated files on GTK+.
+ * qmake/mkspecs/features/default_post.prf: Qt: Make it so an action
+ with both extra_sources and add_output_to_sources=false will still
+ compile the files in extra_sources. This makes it possible to compile
+ InternalSettingsGenerated.cpp and not be confused by
+ InternalSettingsGenerated.idl.
+
+2013-01-03 Zan Dobersek <zandobersek@gmail.com>
+
+ [style] WebIDL-reflecting uppercase enums reported as style violation
+ https://bugs.webkit.org/show_bug.cgi?id=105832
+
+ Reviewed by Tony Chang.
+
+ Recognize the enum as WebIDL-reflecting one if there's a comment present that
+ indicates this. In enums spanning over multiple lines, the comment is expected
+ on the first line. In enums placed in one line, the comment is expected at the
+ end of that line.
+
+ WebIDL-reflecting enum values are required to be written in uppercase and as such
+ violate the common rule of these values being written in InterCaps. Annotating
+ enums this way makes it possible to avoid false style violation reports.
+
+ The comment is of form '// Web(?:Kit)?IDL enum'.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (_EnumState.__init__):
+ (_EnumState.process_clean_line):
+ (check_enum_casing):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (NoNonVirtualDestructorsTest.test_enum_casing):
+
+2013-01-03 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Adding favicon.ico to the garden-o-matic.
+ https://bugs.webkit.org/show_bug.cgi?id=105982
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/favicon.ico:
+
+2013-01-03 Jonathan Liu <net147@gmail.com>
+
+ [Qt] Fix library linking order
+ https://bugs.webkit.org/show_bug.cgi?id=105818
+
+ Some Qt libraries are linked before the private static libraries
+ that depend on them which results in QtWebKit failing to link.
+
+ Copy Qt module dependencies from QT to QT_PRIVATE when creating
+ module to ensure the Qt libraries are linked after the private
+ static libraries that depend on them.
+
+ Reviewed by Tor Arne Vestbø.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2013-01-02 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [EFL][WK2] Fix tooltip bugs in MiniBrowser.
+ https://bugs.webkit.org/show_bug.cgi?id=102209
+
+ Reviewed by Gyuyoung Kim.
+
+ Set tooltip on the elm_window instead of ewk_view, and add delay to
+ show the tooltip window.
+
+ Setting tooltip on the ewk_view makes elementary error message because
+ ewk_view is not an elementary widget. To remove the error message,
+ tooltip should be set on the elm_window.
+
+ Most browsers show the tooltip after a mouse pointer stays on an
+ element object that has tooltip text.
+ But elm_tooltip widget itself doesn't have delay or handle mouse
+ events to show/hide.
+
+ So additional codes are added to show/hide tooltip widget along with
+ mouse events.
+ 1) When a mouse pointer stays for a second on an element which has
+ tooltip text, then tooltip widget is displayed.
+ 2) When a mouse pointer is moved or out of ewk_view, hide the tooltip
+ widget.
+
+ * MiniBrowser/efl/main.c:
+ (_Tooltip_Information):
+ (_Browser_Window):
+ (on_tooltip_show):
+ (window_tooltip_hide):
+ (window_tooltip_update):
+ (on_mouse_in):
+ (on_mouse_move):
+ (on_mouse_out):
+ (window_free):
+ (on_tooltip_text_set):
+ (on_tooltip_text_unset):
+ (window_create):
+
+2013-01-02 Tony Chang <tony@chromium.org>
+
+ Unreviewed, rolling out r138661.
+ http://trac.webkit.org/changeset/138661
+ https://bugs.webkit.org/show_bug.cgi?id=104740
+
+ Compile problems on EFL
+
+ * GNUmakefile.am:
+ * qmake/mkspecs/features/default_post.prf:
+
+2013-01-02 Tony Chang <tony@chromium.org>
+
+ Generate internal.settings from Settings.in
+ https://bugs.webkit.org/show_bug.cgi?id=104740
+
+ Reviewed by Adam Barth.
+
+ * GNUmakefile.am: Compile new generated files on GTK+.
+ * qmake/mkspecs/features/default_post.prf: Qt: Make it so an action
+ with both extra_sources and add_output_to_sources=false will still
+ compile the files in extra_sources. This makes it possible to compile
+ InternalSettingsGenerated.cpp and not be confused by
+ InternalSettingsGenerated.idl.
+
+2013-01-02 Adam Barth <abarth@webkit.org>
+
+ Remove old-run-webkit-tests support from webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=105619
+
+ Reviewed by Eric Seidel.
+
+ This patch removes support for webkitpy parsing the
+ old-run-webkit-tests results format. There doesn't seem to be any
+ reason to keep this code around anymore now that most bots have
+ switched to new-run-webkit-tests.
+
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (Builder.fetch_layout_test_results):
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ (path_for_layout_test):
+ (LayoutTestResults.results_from_string):
+ (LayoutTestResults):
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+ (LayoutTestResultsTest.test_results_from_string):
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ (test_flaky_test_failure):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+ (LayoutTestResultsReaderTest.test_missing_layout_test_results):
+ * Scripts/webkitpy/tool/bot/patchanalysistask.py:
+ (PatchAnalysisTask._test_patch):
+ * Scripts/webkitpy/tool/commands/queuestest.py:
+ (QueuesTest.assert_queue_outputs):
+
+2013-01-02 Heikki Paajanen <heikki.paajanen@palm.com>
+
+ [Qt][WK2] Add simple UI to find text from page
+ https://bugs.webkit.org/show_bug.cgi?id=96481
+
+ Reviewed by Jocelyn Turcotte.
+
+ Find bar that slides between navigation bar and WebView.
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::toggleFind):
+ * MiniBrowser/qt/BrowserWindow.h:
+ (BrowserWindow):
+ * MiniBrowser/qt/MiniBrowser.qrc:
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::notify):
+ * MiniBrowser/qt/icons/find.png: Added.
+ * MiniBrowser/qt/qml/BrowserWindow.qml:
+
+2013-01-02 Christophe Dumez <christophe.dumez@intel.com>
+
+ Regression(r138603): Caused 2 webkitpy tests to fail
+ https://bugs.webkit.org/show_bug.cgi?id=105913
+
+ Reviewed by Kentaro Hara.
+
+ Fix 2 webkitpy tests that started to fail after
+ r138603.
+
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest._sheriff_test_data_url): Make sure the
+ returned test file URL is valid no matter what the
+ current working directory is.
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_help): Add "sheriffs" command to the
+ list of available commands.
+
+2013-01-01 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2] plugins/clicking-missing-plugin-fires-delegate.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=105897
+
+ Reviewed by Alexey Proskuryakov.
+
+ Dump in WebKitTestRunner the message that is expected by layout tests
+ when the missing plugin button is clicked.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::createWebViewWithOptions):
+ (WTR::TestController::unavailablePluginButtonClicked):
+ (WTR):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+
+2013-01-01 KwangYong Choi <ky0.choi@samsung.com>
+
+ [EFL] Enable MHTML feature
+ https://bugs.webkit.org/show_bug.cgi?id=105815
+
+ Reviewed by Laszlo Gombos.
+
+ Enable MHTML feature for EFL port by default.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2013-01-01 Alan Cutter <alancutter@chromium.org>
+
+ sheriff-bot should know who the gardeners/sheriffs are
+ https://bugs.webkit.org/show_bug.cgi?id=105698
+
+ Reviewed by Eric Seidel.
+
+ Added a "sheriffs" command to sheriffbot to fetch the current Chromium Webkit sheriffs.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (Current):
+ (Current._retrieve_webkit_sheriffs):
+ (Current.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_current):
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_0.js: Added.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_1.js: Added.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_2.js: Added.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_malformed.js: Added.
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_zero.js: Added.
+
+2012-12-31 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] Move ImageDiff to the Tools directory root
+ https://bugs.webkit.org/show_bug.cgi?id=105421
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * DumpRenderTree/gtk/GNUmakefile.ImageDiff.am: Removed.
+ * GNUmakefile.am:
+ * ImageDiff/gtk/ImageDiff.cpp: Renamed from Tools/DumpRenderTree/gtk/ImageDiff.cpp.
+
+2012-12-30 Mike West <mkwst@chromium.org>
+
+ Add myself to watchlists for CSP and console logs.
+ https://bugs.webkit.org/show_bug.cgi?id=105874
+
+ Reviewed by Dirk Pranke.
+
+ Because I really, really, really need more email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ Add mkwst+watchlist@chromium.org as a contributor.
+ * Scripts/webkitpy/common/config/watchlist:
+ Create watchlist categories for 1) the various mechanisms used to
+ generate console messages, and 2) CSP usage and files.
+
+2012-12-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [EFL] Enable TEMPLATE_ELEMENT feature
+ https://bugs.webkit.org/show_bug.cgi?id=105865
+
+ Reviewed by Laszlo Gombos.
+
+ * Scripts/webkitperl/FeatureList.pm: Enable template element feature for EFL port.
+
+2012-12-30 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed GTK gardening of the unit tests.
+
+ Skip the TestInspectorServer unit test that's timing out completely.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-12-29 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation plugin: do not generate 'not instrumented' warning for instrumented mutable members.
+ https://bugs.webkit.org/show_bug.cgi?id=105855
+
+ Reviewed by Vsevolod Vlasov.
+
+ Extract MemberExpr from ImplicitCastExpr. It happens when we instrument a mutable member because
+ addMember expects const T& and the mutable ref to member implicitly converts into const ref to member.
+
+ * clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp:
+ (ReportMemoryUsageVisitor):
+ (clang::AddMemberCallVisitor::VisitCallExpr):
+ (clang::ReportMemoryUsageVisitor::VisitCXXMethodDecl):
+ (clang::ReportMemoryUsageVisitor::checkMembersCoverage):
+
+2012-12-29 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation plugin: move function bodies out of class declarations.
+ https://bugs.webkit.org/show_bug.cgi?id=105852
+
+ Reviewed by Alexander Pavlov.
+
+ * clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp:
+ (clang):
+ (AddMemberCallVisitor):
+ (ReportMemoryUsageVisitor):
+ (clang::ReportMemoryUsageAction::ParseArgs):
+ (clang::AddMemberCallVisitor::VisitCallExpr):
+ (clang::ReportMemoryUsageVisitor::VisitCXXMethodDecl):
+ (clang::ReportMemoryUsageVisitor::emitWarning):
+ (clang::ReportMemoryUsageVisitor::findInstrumentationMethod):
+ (clang::ReportMemoryUsageVisitor::needsToBeInstrumented):
+ (clang::ReportMemoryUsageVisitor::CheckMembersCoverage):
+
+2012-12-29 Zan Dobersek <zandobersek@gmail.com>
+
+ [webkitpy] Omit webkitpy/thirdparty/BeautifulSoup.py from code coverage checking
+ https://bugs.webkit.org/show_bug.cgi?id=105835
+
+ Reviewed by Dirk Pranke.
+
+ The BeautifulSoup module is a third-party import and as such we don't have much control
+ over its testing. Because of that it should be omitted from code coverage checking.
+
+ * Scripts/webkitpy/test/main.py:
+ (Tester._run_tests):
+
+2012-12-28 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK][WK2] Add support for IME Composition
+ https://bugs.webkit.org/show_bug.cgi?id=65093
+
+ Reviewed by Carlos Garcia Campos.
+
+ Update unit tests for GtkInputMethodFilter to note whether or not an event
+ was a fake event synthesized for composition purposes. This is now used
+ for WebKit2.
+
+ * TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp:
+ (TestWebKitAPI::TestInputMethodFilter::sendSimpleKeyEvent):
+ (TestWebKitAPI::TestInputMethodFilter::sendKeyEventWithCompositionResults):
+ (TestWebKitAPI::TEST):
+ * gtk/generate-gtkdoc:
+ (get_webkit2_options): Skip new files in the WebKit2 source directory for documentation
+ generation.
+
+2012-12-27 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation. Update clang plugin according to the current state of memory instrumentation code.
+ https://bugs.webkit.org/show_bug.cgi?id=105800
+
+ Reviewed by Yury Semikhatsky.
+
+ * clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp:
+ (clang::ReportMemoryUsageConsumer::ReportMemoryUsageConsumer):
+ (clang):
+
+2012-12-27 Zan Dobersek <zandobersek@gmail.com>
+
+ Create a GTK build system watchlist and add myself to it
+ https://bugs.webkit.org/show_bug.cgi?id=105769
+
+ Reviewed by Dirk Pranke.
+
+ Add a GTK build system watchlist, watching the configure.ac, GNUmakefile.am files
+ and the input GNUmakefile.features.am.in file. The GNUmakefile.list.am files are
+ omitted on purpose due to relatively high change rate they are exposed to.
+
+ The new watchlist would be of use to me as the GTK build system recently went
+ through a series of changes that included a changed policy on adding configuration
+ flags to configure.ac and subsequent additions to GNUmakefile.am files. A PSA on the
+ mailing list about this change will be published later, but I'd also like to be
+ notified of any pending changes to these files just so I can check the changes are
+ in compliance with the new policy.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-12-26 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed. Replace find("Tools") with rfind("Tools") because base dir of WebKit may have Tools word.
+ As example ..../DevTools/src/third_party/WebKit
+
+ * Scripts/webkitpy/common/webkit_finder.py:
+ (WebKitFinder.webkit_base):
+
+2012-12-25 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Refactor snapshot taking code
+ https://bugs.webkit.org/show_bug.cgi?id=105687
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Call WKViewCreateSnapshot() instead of WKViewGetSnapshot()
+ since the function was renamed to follow naming style.
+
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::windowSnapshotImage):
+
+2012-12-24 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: propagate member type as edge type to the serialized heap graph.
+ https://bugs.webkit.org/show_bug.cgi?id=105725
+
+ Reviewed by Yury Semikhatsky.
+
+ MemberType value names were adjusted according to Style Guide.
+ Existing tests were extended with link type validation.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-12-24 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - Crashed when running pixels tests
+ https://bugs.webkit.org/show_bug.cgi?id=105711
+
+ RIM PR 270003
+
+ Reviewed by George Staikos.
+
+ Calling window->post() here will result in buffer swapping which is
+ only allowed in UI thread now, and I found we don't need to call it
+ for GL renderer.
+
+ * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
+ (createBitmapContextFromWebView):
+
+2012-12-22 Dan Winship <danw@gnome.org>
+
+ Add a patch to fix libxml2 2.9.0 regression
+ https://bugs.webkit.org/show_bug.cgi?id=104494
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild.modules:
+ * gtk/patches/libxml2-2.9.0-dtd.patch: patch from upstream
+
+2012-12-23 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Unreviewed update of status to reviewer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-23 Philippe Normand <pnormand@igalia.com>
+
+ [GTK][jhbuild] Bump GStreamer to 1.0.4
+ https://bugs.webkit.org/show_bug.cgi?id=105640
+
+ Reviewed by Martin Robinson.
+
+ * gtk/jhbuild.modules: Update GStreamer modules to 1.0.4.
+
+2012-12-21 Nico Weber <thakis@chromium.org>
+
+ chromium: webkit-build-directory doesn't handle ninja output dirs
+ https://bugs.webkit.org/show_bug.cgi?id=105671
+
+ Reviewed by Daniel Bates.
+
+ Teach webkit-build-directory to detect the ninja build directory.
+
+ * Scripts/webkitdirs.pm:
+ (determineBaseProductDir):
+ (determineIsChromiumNinja):
+
+2012-12-21 Ryosuke Niwa <rniwa@webkit.org>
+
+ [Mountain Lion] platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation.html failing
+ https://bugs.webkit.org/show_bug.cgi?id=95477
+
+ Reviewed by Sam Weinig.
+
+ Co-authored by Jia Pu.
+
+ Specify a fixed autocorrection dictionary in resetDefaultsToConsistentValues() so that
+ we can have consistent autocorrection behavior when running tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues):
+ * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
+ (WTR::InjectedBundle::platformInitialize):
+
+2012-12-21 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Add WebKit1-specific TestExpectations file
+ https://bugs.webkit.org/show_bug.cgi?id=97562
+
+ Reviewed by Dirk Pranke.
+
+ Implement the expectations_files method inside the GtkPort class that
+ returns the list of the TestExpectations files the current test configuration
+ requires. The method is implemented in a similar way as on the EFL port.
+ A unit test is also added.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort._search_paths):
+ (GtkPort):
+ (GtkPort.expectations_files):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_expectations_files):
+
+2012-12-21 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL] Enable feature option for the CSS sticky position
+ https://bugs.webkit.org/show_bug.cgi?id=105630
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enable CSS sticky position feature by default for the
+ EFL port. This feature option was added in r138252.
+
+ No new tests. Existing layout tests pass.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-21 Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+ [WK2] REGRESSION(r138232): It made 4 tests timeout
+ https://bugs.webkit.org/show_bug.cgi?id=105623
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ r138232 changed functionality so that empty text output
+ no longer leads to a dump() call, which leads to a timeout.
+ Instead do a text dump if there is text output or if there
+ is no audio output.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::dumpResults):
+
+2012-12-21 Zeno Albisser <zeno@webkit.org>
+
+ [Qt][Mac] run-launcher cannot find Qt5WebKitWidgets.
+ https://bugs.webkit.org/show_bug.cgi?id=105309
+
+ On Windows the library name is Qt5WebKitWidgets as well.
+ So r138136 should not have adjusted the library name for Windows.
+
+ Reviewed by Simon Hausmann.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName):
+
+2012-12-21 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Add new TestExpectations for qt-5.0-mac-wk2.
+ https://bugs.webkit.org/show_bug.cgi?id=105424
+
+ This change will allow us to run a very specific
+ subset of the available LayoutTests on a mac buildbot.
+ The new baseline search path for mac will look as follows:
+ qt-5.0-mac-wk2 -> qt-5.0-wk2 -> qt-5.0 -> qt-mac -> qt
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._search_paths):
+ * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+ (QtPortTest):
+
+2012-12-20 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL] Build break with latest EFL libraries.
+ https://bugs.webkit.org/show_bug.cgi?id=104827
+
+ Reviewed by Laszlo Gombos.
+
+ The eo EFL package is introduced and evas and ecore use it since 1.8.
+ While introducing Eo, EFL changed several structures of Evas and Ecore
+ from own specific class to Eo.
+
+ So, this patch adds FindEo and changes declaration of Evas, Evas_Object,
+ Ecore_Timer to build with latest EFL libraries.
+
+ * DumpRenderTree/efl/CMakeLists.txt: Includes eo EFL library.
+ * EWebLauncher/CMakeLists.txt: Ditto.
+ * MiniBrowser/efl/CMakeLists.txt: Ditto.
+ * ImageDiff/PlatformEfl.cmake: Ditto.
+ * TestWebKitAPI/PlatformEfl.cmake: Ditto.
+ * TestWebKitAPI/PlatformWebView.h: Modified declaration of Evas_Object.
+ * WebKitTestRunner/InjectedBundle/TestRunner.h: Modified declaration of Ecore_Timer.
+ * WebKitTestRunner/PlatformEfl.cmake: Includes eo EFL library.
+ * WebKitTestRunner/PlatformWebView.h: Modified declaration of Evas_Object.
+
+2012-12-20 Dirk Pranke <dpranke@chromium.org>
+
+ TestExpectation fallback is broken
+ https://bugs.webkit.org/show_bug.cgi?id=105583
+
+ Reviewed by Ryosuke Niwa.
+
+ When I added support for the -wk2 in port names, it looks
+ like I broke the way we computed the list of TestExpectations
+ files so that the implementation-version directory was left out :(.
+ Fixed and cleaned up the tests.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.expectations_files):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (TestWebKitPort.__init__):
+ (PortTestCase.test_skipped_directories_for_symbols):
+ (test_skipped_directories_for_features):
+ (test_skipped_directories_for_features_no_matching_tests_in_test_list):
+ (test_skipped_tests_for_unsupported_features_empty_test_list):
+ (test_skipped_layout_tests):
+ (test_expectations_files):
+
+2012-12-20 Anders Carlsson <andersca@apple.com>
+
+ Don't include WebKit2 headers when building TestWebKitAPI on windows
+ https://bugs.webkit.org/show_bug.cgi?id=105582
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/config.h:
+ * TestWebKitAPI/win/main.cpp:
+
+2012-12-20 Ryosuke Niwa <rniwa@webkit.org>
+
+ REGRESSION(r133820?): SimplifyMarkupTest API test asserts
+ https://bugs.webkit.org/show_bug.cgi?id=105370
+
+ Reviewed by Simon Fraser.
+
+ Re-enable the test.
+
+ * TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:
+ (TestWebKitAPI::TEST):
+
+2012-12-20 Nico Weber <thakis@chromium.org>
+
+ chromium nrwt: Pick the newest binary found in DEFAULT_BUILD_DIRECTORIES, not the first
+ https://bugs.webkit.org/show_bug.cgi?id=105498
+
+ Reviewed by Dirk Pranke.
+
+ Use the newest binary available rather than an than always picking one
+ build directory over another based on iteration order.
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._static_build_path):
+ Check for timestamps.
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_build_path_timestamps):
+ Test that out / xcodebuild selection happens based on timestamps
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ (ChromiumWinPortTest.test_build_path_timestamps):
+ Test that out / build selection happens based on timestamps
+
+2012-12-19 Simon Fraser <simon.fraser@apple.com>
+
+ Lots of sticky tests failing in WK2
+ https://bugs.webkit.org/show_bug.cgi?id=105464
+
+ Reviewed by Beth Dakin.
+
+ WebKitTestRunner had a race between snapshotting in the UI process,
+ and resettting after the test in the web process. InjectedBundle::done()
+ was a bad place to call page()->resetAfterTest(), because of this race;
+ it could reset the scroll position before the UI snapshot had been obtained.
+
+ Fix by moving the call to page()->resetAfterTest() into didReceiveMessage(),
+ for the "Reset" message which will come in before the next test.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::didReceiveMessage):
+ (WTR::InjectedBundle::done):
+
+2012-12-19 Filip Pizlo <fpizlo@apple.com>
+
+ DFG speculation checks that take JumpList should consolidate OSRExits
+ https://bugs.webkit.org/show_bug.cgi?id=105401
+
+ Reviewed by Oliver Hunt.
+
+ Update the profiler to understand that an OSR exit may have multiple
+ candidate exit sites.
+
+ * Scripts/display-profiler-output:
+
+2012-12-20 Eric Seidel <eric@webkit.org>
+
+ EWSes do not need to dump build/test logs when things pass
+ https://bugs.webkit.org/show_bug.cgi?id=105402
+
+ Reviewed by Dirk Pranke.
+
+ When we were first writing the commit-queue and EWS system
+ and running them locally, we thought it was important to see the
+ build/test output as it happened. Now these queues have been running
+ for years, and we don't use this feature anymore. So this patch
+ makes us stop tee-ing the output directly to stdout, and instead
+ only print any output from commands when they fail.
+
+ I also added some logging when we execute each command
+ since we are no longer printing the command output itself.
+ This should make it much easier to see errors with the EWS
+ system itself, now that all the passing-build output is removed.
+
+ This required updating a zillion unittests, since we have a bunch of
+ "integration" style testing of the queue-bots. Many of the unittests for the bots were
+ already approximating this behavior by using a "logging" Executive.
+ I disabled logging in those cases to avoid redundant logging in those tests.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.command_for_printing):
+ (Executive.run_command):
+ * Scripts/webkitpy/common/system/executive_mock.py:
+ (MockExecutive.command_for_printing):
+ (MockExecutive.run_command):
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ExecutiveTest.test_auto_stringify_args):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSytemTest._default_expected_logs):
+ (_test_ews):
+ (_test_ewses):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (AbstractQueue.run_webkit_patch):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (AbstractQueueTest._assert_run_webkit_patch):
+ (CommitQueueTest.test_commit_queue):
+ (test_rollout):
+ (test_rollout_lands):
+ (test_manual_reject_during_processing):
+ (StyleQueueTest.test_style_queue_with_style_exception):
+ (test_style_queue_with_watch_list_exception):
+
+2012-12-20 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: support clickPoint in DRT for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=97359
+
+ Reviewed by Chris Fleizach.
+
+ Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that
+ several more tests can pass.
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback):
+ (WebTestRunner):
+ (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback):
+ (WebTestRunner::AccessibilityUIElement::elementAtPointCallback):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElement):
+
+2012-12-20 Dan Bernstein <mitz@apple.com>
+
+ prepare-ChangeLog adds "Additional information of the change such as approach, rationale" where it doesn't make sense
+ https://bugs.webkit.org/show_bug.cgi?id=99268
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Scripts/prepare-ChangeLog:
+ (generateNewChangeLogs): Removed the "Additional information of the change" line.
+
+2012-12-20 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Skip unit test /webkit/atk/getTextInParagraphAndBodyModerate
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-12-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [Qt] Move ImageDiff to the Tools directory root
+ https://bugs.webkit.org/show_bug.cgi?id=105420
+
+ Reviewed by Tor Arne Vestbø.
+
+ Moved ImageDiff from outside DumpRenderTree because it is also a
+ dependency when running pixel tests for WebKit2.
+
+ * ImageDiff/ImageDiff.pro: Renamed from Tools/DumpRenderTree/qt/ImageDiff.pro.
+ * ImageDiff/qt/ImageDiff.cpp: Renamed from Tools/DumpRenderTree/qt/ImageDiff.cpp.
+ * Tools.pro:
+
+2012-12-20 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Remove the --enable-unstable-features configuration option
+ https://bugs.webkit.org/show_bug.cgi?id=105327
+
+ Reviewed by Martin Robinson.
+
+ Add a missing feature option for the CSS sticky position feature.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-20 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Skip unit test WebKit2.ForceRepaint that times out
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-12-20 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ [EFL] MiniBrowser does not play Infinite Gangnam Style
+ https://bugs.webkit.org/show_bug.cgi?id=103531
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ For EFL we would like this feature to be built by default.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-20 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] EWS bots should call qmake always
+ https://bugs.webkit.org/show_bug.cgi?id=90049
+
+ Reviewed by Simon Hausmann.
+
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-12-20 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] fix stray printf in TestRunner's WebTestProxy
+ https://bugs.webkit.org/show_bug.cgi?id=105515
+
+ Reviewed by Ryosuke Niwa.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::shouldInsertNode):
+
+2012-12-20 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ [WK2] WebAudio WKTR support
+ https://bugs.webkit.org/show_bug.cgi?id=95084
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implementing audio data dump support for WebKitTestRunner,
+ by adding the API to the IDL, enabling IPC for transferring
+ the audio data as bytebuffer and dumping it according
+ to run-webkit-tests script's expectations.
+ This enables audio testing on WebKit2 ports.
+ Based on initial wip-patch from Philippe Normand - thanks.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Adding setAudioData API.
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Assign audio buffer data to a local WKDataRef after extracting it from WK2 using WKBundleDataFromUint8Array bundle API.
+ (WTR::TestRunner::setAudioData):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h: Add a whatToDump state for dumping Audio.
+ (TestRunner):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: Add audio to the message that's transferred to the WKTR process.
+ (WTR::InjectedBundle::done):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h: Allow setting and audio result handle to be transferred.
+ (WTR::InjectedBundle::setAudioResult):
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dump): Dummy handling the Audio case in the switch, build fix for Mac.
+ * WebKitTestRunner/TestInvocation.cpp: Audio dump support, dump audio if we haven't received a text dump from the web process.
+ (WTR::TestInvocation::dumpResults):
+ (WTR):
+ (WTR::TestInvocation::dumpAudio):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Storing received audio data before dumping.
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+
+2012-12-20 Alberto Garcia <agarcia@igalia.com>
+
+ [GTK] Count failed and timed out tests separately
+ https://bugs.webkit.org/show_bug.cgi?id=105448
+
+ Reviewed by Carlos Garcia Campos.
+
+ Display the number of tests that fail, time out and are skipped
+ separately in the buildbot page.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunGtkAPITests.commandComplete):
+ (RunGtkAPITests.evaluateCommand):
+ (RunGtkAPITests.getText2):
+ * Scripts/run-gtk-tests:
+ (TestRunner.run_tests):
+
+2012-12-19 Ryosuke Niwa <rniwa@webkit.org>
+
+ PerfTest.parse_output does too much
+ https://bugs.webkit.org/show_bug.cgi?id=105391
+
+ Reviewed by Tony Chang.
+
+ Moved the code to filter lines into PerfTest._filter_output, which has been renamed from _filter_stderr.
+ Also moved the code to output test results into PerfTest._run_with_driver.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest.__init__): Added _description.
+ (PerfTest.description): Added.
+ (PerfTest._run_with_driver): Moved the code to output test description and test results.
+ (PerfTest._filter_output): Moved and renamed from PerfTest._filter_stderr.
+ (PerfTest.parse_output): Removed the code to output test results. Return test results and description
+ respectively. Also removed the code that allowed some tests to omit values since all tests report each
+ iteration now since r136492.
+ (PerfTest.output_statistics): Removed the code to print test description, now done in _run_with_driver.
+ (ChromiumStylePerfTest._run_with_driver): Added. Chromium style tests are sufficiently different from
+ regular PerfTest that it doesn't make much sense to share _run_with_driver. But really, we should just
+ get rid of this type of test altogether in favor of regular performance tests that uses runner.js.
+ (ChromiumStylePerfTest.parse_and_log_output): Renamed from parse_output.
+ (PageLoadingPerfTest._run_with_driver): Removed the explicit '' for the test description.
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (MainTest.test_parse_output): Removed the expected logs since parse_output no longer prints out results.
+ Also added a call to _filter_output since parse_output doesn't filter the output text anymore.
+ (MainTest.test_parse_output_with_failing_line): Added a call to _filter_output. Also added ',' after 'Time:'
+ so that it's not string-concatenated with the next line.
+ (MainTest.test_parse_output_with_description): Added; a test for PerfTest.description().
+ (MainTest.test_parse_output_with_subtests): Removed the expected logs, and added a call to _filter_output.
+
+2012-12-19 Alexis Menard <alexis@webkit.org>
+
+ Implement CSS parsing for CSS transitions unprefixed.
+ https://bugs.webkit.org/show_bug.cgi?id=104804
+
+ Reviewed by Dean Jackson.
+
+ Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED
+ to cover the work of unprefixing Transforms, Animations and
+ Transitions. It will let the possibility of each ports to turn it off
+ in their release branches until we're confident that these CSS
+ properties are ready to be unprefixed.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-12-19 Julien Chaffraix <jchaffraix@webkit.org>
+
+ 2 clampTo unit tests are failing
+ https://bugs.webkit.org/show_bug.cgi?id=105253
+
+ Reviewed by Emil A Eklund.
+
+ Removed clampToUnsigned as it was actually testing exactly what
+ clampToUnsignedLong was doing. Also made clampToIntFloat more robust
+ to precision loss (fix suggested by Emil).
+
+ * TestWebKitAPI/Tests/WTF/MathExtras.cpp:
+
+2012-12-19 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] Move ImageDiff to the Tools directory root
+ https://bugs.webkit.org/show_bug.cgi?id=105305
+
+ Reviewed by Laszlo Gombos.
+
+ We previously moved this directory from the DRT directory to
+ efl/ImageDiff. The major reason for doing so was because ImageDiff does
+ not depend on DumpRenderTree but for legacy reasons was living inside the
+ DRT folder, even though it is needed when running pixel tests for WK2.
+
+ Now we are moving to Tool directory root as other ports agreed to do the same.
+
+ * CMakeLists.txt:
+ * ImageDiff/CMakeLists.txt: Added.
+ * ImageDiff/PlatformEfl.cmake: Added.
+ * ImageDiff/efl/ImageDiff.cpp: Renamed from Tools/efl/ImageDiff/ImageDiff.cpp.
+ * efl/ImageDiff/CMakeLists.txt: Removed.
+
+2012-12-19 Zeno Albisser <zeno@webkit.org>
+
+ [Qt][Mac] run-launcher cannot find Qt5WebKitWidgets.
+ https://bugs.webkit.org/show_bug.cgi?id=105309
+
+ The version number is only used as a part
+ of the library name on Linux.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName):
+
+2012-12-19 Alberto Garcia <agarcia@igalia.com>
+
+ [GTK] Tests that time out are not considered as failures.
+ https://bugs.webkit.org/show_bug.cgi?id=105318
+
+ Reviewed by Martin Robinson.
+
+ Fix parsing of the GTK API tests log files.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunGtkAPITests.commandComplete):
+
+2012-12-18 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed, rolling out r138061.
+ https://bugs.webkit.org/show_bug.cgi?id=105396
+
+ Original patch:
+ http://trac.webkit.org/changeset/138061
+ https://bugs.webkit.org/show_bug.cgi?id=97359
+
+ It is crashing on Debug bots
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElement::elementAtPointCallback):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElement):
+
+2012-12-18 Alice Liu <alice.liu@apple.com>
+
+ Test for https://bugs.webkit.org/show_bug.cgi?id=105106
+ Add SPI to WebKit1 WebFrame for hit testing
+
+ Reviewed by Dan Bernstein.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added file Tests/mac/ElementAtPointInWebFrame.mm
+ * TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm: Added.
+ (TestWebKitAPI::TEST): Loads html with two divs positioned in the 2nd and 4th quadrants of the webview.
+ Then hit-tests at three points, expecting to hit the two divs and body element.
+
+2012-12-18 Alice Liu <alice.liu@apple.com>
+
+ Test for https://bugs.webkit.org/show_bug.cgi?id=105262
+ Add SPI to WebKit1 WebFrame for node conversion to JSValueRef
+
+ Reviewed by Anders Carlsson.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added file Tests/mac/JSWrapperForNodeInWebFrame.mm.mm
+ * TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm.mm: Added.
+ (TestWebKitAPI::TEST): Tests for the correct JS wrapper for a DOMNode, provided a WebScriptWorld.
+ Loads html with a single div element. In an isolated world, creates a property on that node.
+ Also, in the standard world, creates a different property on that node. Then tests for 4 things:
+ - Existence of the isolated property in the isolated world.
+ - Existence of the standard property in the standard world.
+ - Non-existence of the isolated property in the standard world.
+ - Non-existence of the standard property in the isolated world.
+
+2012-12-18 Simon Fraser <simon.fraser@apple.com>
+
+ Disable the SimplifyMarkup API test, wich asserts in debug builds.
+ Tracked by https://bugs.webkit.org/show_bug.cgi?id=105370.
+
+ * TestWebKitAPI/Tests/mac/SimplifyMarkup.mm:
+ (TestWebKitAPI::TEST):
+
+2012-12-18 Joseph Pecoraro <pecoraro@apple.com>
+
+ [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros)
+ https://bugs.webkit.org/show_bug.cgi?id=104279
+
+ Reviewed by David Kilzer.
+
+ Add a build phase script that checks a framework's header files for
+ Platform.h and Compiler.h macros. Also add some tests for the script.
+
+ * Scripts/check-for-inappropriate-macros-in-external-headers: Added.
+ Script to be used in build phases to check for inappropriate macros in headers.
+
+ * Scripts/test-webkitruby: Added.
+ Script that can be used to run all webkitruby tests.
+
+ * Scripts/test-webkit-scripts:
+ Also run the ruby tests.
+
+ * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/fake-data-failing-expected.txt: Added.
+ * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/pass-expected.txt: Added.
+ * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Fail.h: Added.
+ * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Pass.h: Added.
+ * Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb: Added.
+ Tests for the new script.
+
+2012-12-18 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: support clickPoint in DRT for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=97359
+
+ Reviewed by Chris Fleizach.
+
+ Implement clickPointX, clickPointY, and elementAtPoint for Chromium, so that
+ several more tests can pass.
+
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElement::clickPointXGetterCallback):
+ (WebTestRunner):
+ (WebTestRunner::AccessibilityUIElement::clickPointYGetterCallback):
+ (WebTestRunner::AccessibilityUIElement::elementAtPointCallback):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElement):
+
+2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ Build fix after r138045.
+
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._collect_tests): Use relative_path. We skip only when this path
+ is not explicitly specified. The condition was backwards but never matched so we
+ always ran the test regardless of whether it's listed in the skipped list or not.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (test_collect_tests_with_ignored_skipped_list): Renamed so that it actually runs.
+
+2012-12-18 Emil A Eklund <eae@chromium.org>
+
+ TestWebKitAPI/Tests/WebCore/LayoutUnit fails on mac
+ https://bugs.webkit.org/show_bug.cgi?id=105332
+
+ Reviewed by Levi Weintraub.
+
+ Create new test suite for LayoutUnit tests as the KURL tests are
+ of the incompatible TEST_F type.
+
+ * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp:
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST_F):
+
+2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ Running a skipped test with run-perf-tests could alert the user
+ https://bugs.webkit.org/show_bug.cgi?id=105219
+
+ Reviewed by Eric Seidel.
+
+ Force run skipped performance tests explicitly specified in the command line.
+ Also warn the user when the specified paths don't exist.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.relative_test_filename):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+ (PerfTestsRunner._collect_tests):
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (test_collect_tests_with_skipped_list_and_files):
+
+2012-12-18 Yaron Friedman <yfriedman@chromium.org>
+
+ Chrome Android java output is too verbose
+ https://bugs.webkit.org/show_bug.cgi?id=105247
+
+ Reviewed by Tony Chang.
+
+ Pass -quiet to ant to suppress extraneous output.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
+
+2012-12-18 Ryosuke Niwa <rniwa@webkit.org>
+
+ Consider removing --pause-before-testing option
+ https://bugs.webkit.org/show_bug.cgi?id=105248
+
+ Reviewed by Eric Seidel.
+
+ Remove --pause-before-testing option.
+
+ * Tools/Scripts/webkitpy/layout_tests/port/driver.py:
+ (DriverProxy.start): Removed.
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest.__init__):
+ (PerfTest.test_path): Renamed from path_or_url.
+ (PerfTest.run):
+ (PerfTest): Removed "driver" argument.
+ (PerfTest._run_with_driver):
+ (PerfTest.run_single):
+ (ChromiumStylePerfTest.__init__):
+ (PageLoadingPerfTest.__init__):
+ (PageLoadingPerfTest.run_single):
+ (PageLoadingPerfTest._run_with_driver): Renamed from run so that PerfTest.run can create a driver for us.
+ (ReplayPerfTest.__init__):
+ (ReplayPerfTest.prepare):
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPageLoadingPerfTest.test_run):
+ (TestPageLoadingPerfTest.test_run_with_memory_output):
+ (TestPageLoadingPerfTest.test_run_with_bad_output):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+ (PerfTestsRunner._run_tests_set): Removed the code to create a driver and pause before running the test.
+ (PerfTestsRunner._run_single_test): Removed "driver" argument.
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (run_test):
+ (test_run_test_pause_before_testing): Removed.
+
+2012-12-18 Alberto Garcia <agarcia@igalia.com>
+
+ [GTK] Tests that time out are not considered as failures.
+ https://bugs.webkit.org/show_bug.cgi?id=105318
+
+ Reviewed by Martin Robinson.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunGtkAPITests.commandComplete):
+ Consider log lines that end with TIMEOUT as errors.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner.run_tests):
+ Consider timeouts as failures when returning the number of failed
+ tests.
+
+2012-12-18 Pravin D <pravin.d@samsung.com>
+
+ Unreviewed, adding secondary email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-18 Pravin D <pravin.d@samsung.com>
+
+ Unreviewed, promoting myself to committer's list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-18 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] ImageDiff does not build on WebKit2 only builds
+ https://bugs.webkit.org/show_bug.cgi?id=105288
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Moved ImageDiff to the efl/ folder inside Tools/ (so we don't pollute
+ the folder with things which are EFL-specific.
+
+ ImageDiff will be built by default now regardless of WebKit API flavor
+ you choose.
+
+ * CMakeLists.txt:
+ * DumpRenderTree/efl/CMakeLists.txt:
+ * efl/ImageDiff/CMakeLists.txt: Added.
+ * efl/ImageDiff/ImageDiff.cpp: Renamed from Tools/DumpRenderTree/efl/ImageDiff.cpp.
+
+2012-12-18 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ [EFL][WK2] When creating new windows, use the opener's context
+ https://bugs.webkit.org/show_bug.cgi?id=105283
+
+ Reviewed by Laszlo Gombos.
+
+ Use the context of the opener if exists.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_window_create):
+ (window_create):
+ (elm_main):
+
+2012-12-18 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL][WK2] Gardening of TestWebKitAPI tests
+ https://bugs.webkit.org/show_bug.cgi?id=105268
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Some tests were marked as failing but are passing and the newly added
+ LayoutUnit should have it's own binary because it conflicts with the
+ fixture used by KURL and is failing on the bots because of that.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2012-12-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move webintent related methods to TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=105164
+
+ Reviewed by Darin Fisher.
+
+ Also deleted the unused deliveredIntentFailure and
+ deliveredIntentResult methods.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebKit):
+ (WebTestRunner::WebTestDelegate::setCurrentWebIntentRequest):
+ (WebTestRunner::WebTestDelegate::currentWebIntentRequest):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::registerIntentService):
+ (WebTestRunner::WebTestProxy::dispatchIntent):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::sendWebIntentResponse):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::deliverWebIntent):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::postAccessibilityNotification):
+ (WebTestRunner::WebTestProxyBase::registerIntentService):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::dispatchIntent):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::setCurrentWebIntentRequest):
+ (WebViewHost::currentWebIntentRequest):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebKit):
+ (WebViewHost):
+
+2012-12-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move editing callback dumping to the WebTestProxy
+ https://bugs.webkit.org/show_bug.cgi?id=105013
+
+ Reviewed by Darin Fisher.
+
+ To decide whether or not to dump the editing callbacks, the WebTestProxy
+ needs to query the TestRunner. For this purpose, I introduce a
+ WebTestRunner class that just exposes the shouldDumpEditingCallbacks
+ method. In contrast to e.g. WebEventSender, the WebTestRunner is just
+ an interface, and it is not owned by the WebTestInterfaces, but the
+ embedder of the TestRunner library must provide it. This will change
+ once all TestRunner methods are in the library.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ (DRTTestRunner::taskList):
+ (DRTTestRunner::WorkQueue::taskList):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h:
+ (WebTestRunner):
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestRunner):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::shouldBeginEditing):
+ (WebTestRunner::WebTestProxy::shouldEndEditing):
+ (WebTestRunner::WebTestProxy::shouldInsertNode):
+ (WebTestRunner::WebTestProxy::shouldInsertText):
+ (WebTestRunner::WebTestProxy::shouldChangeSelectedRange):
+ (WebTestRunner::WebTestProxy::shouldDeleteRange):
+ (WebTestRunner::WebTestProxy::shouldApplyStyle):
+ (WebTestRunner::WebTestProxy::didBeginEditing):
+ (WebTestRunner::WebTestProxy::didChangeSelection):
+ (WebTestRunner::WebTestProxy::didChangeContents):
+ (WebTestRunner::WebTestProxy::didEndEditing):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestRunner.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h.
+ (WebTestRunner):
+ (WebTestRunner::WebTestRunner::shouldDumpEditingCallbacks):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::~TestRunner):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::shouldDumpEditingCallbacks):
+ (WebTestRunner::TestRunner::dumpEditingCallbacks):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestRunner::WebTestInterfaces::Internal::testRunner):
+ (WebTestRunner::WebTestInterfaces::Internal::setTestRunner):
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::Internal):
+ (WebTestRunner::WebTestInterfaces::testRunner):
+ (WebTestRunner):
+ (WebTestRunner::WebTestInterfaces::setTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::postAccessibilityNotification):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::shouldBeginEditing):
+ (WebTestRunner::WebTestProxyBase::shouldEndEditing):
+ (WebTestRunner::WebTestProxyBase::shouldInsertNode):
+ (WebTestRunner::WebTestProxyBase::shouldInsertText):
+ (WebTestRunner::WebTestProxyBase::shouldChangeSelectedRange):
+ (WebTestRunner::WebTestProxyBase::shouldDeleteRange):
+ (WebTestRunner::WebTestProxyBase::shouldApplyStyle):
+ (WebTestRunner::WebTestProxyBase::didBeginEditing):
+ (WebTestRunner::WebTestProxyBase::didChangeSelection):
+ (WebTestRunner::WebTestProxyBase::didChangeContents):
+ (WebTestRunner::WebTestProxyBase::didEndEditing):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::shouldBeginEditing):
+ (WebViewHost::shouldEndEditing):
+ (WebViewHost::shouldInsertNode):
+ (WebViewHost::shouldInsertText):
+ (WebViewHost::shouldChangeSelectedRange):
+ (WebViewHost::shouldDeleteRange):
+ (WebViewHost::shouldApplyStyle):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-12-17 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Fix methods in TestRunner that directly modify the settings instead of going through WebPreferences
+ https://bugs.webkit.org/show_bug.cgi?id=105154
+
+ Reviewed by Tony Chang.
+
+ If the settings are modified directly, the embedder can't keep track of
+ them and might accidentially override the changed settings.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ (WebPreferences):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::setAsynchronousSpellCheckingEnabled):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setMinimumTimerInterval):
+ (WebTestRunner::TestRunner::setTouchDragDropEnabled):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo):
+
+2012-12-17 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Unreviewed unit test skipping.
+
+ Filed https://bugs.webkit.org/show_bug.cgi?id=105253 to re-enable them.
+
+ * TestWebKitAPI/Tests/WTF/MathExtras.cpp:
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2012-12-17 Dean Jackson <dino@apple.com>
+
+ Unreviewed. Add Silvia Pfeiffer to contributor list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-17 Dirk Pranke <dpranke@chromium.org>
+
+ build.webkit.org - add more google windows bots
+ https://bugs.webkit.org/show_bug.cgi?id=105225
+
+ Reviewed by Eric Seidel.
+
+ Adds two more windows bots (google-windows-3, a builder, and
+ google-windows-4, a tester) for the Chromium configs.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2012-12-17 Eric Seidel <eric@webkit.org>
+
+ Cleanup --profiler=perf code a little and allow up to 1000 report files (instead of 100)
+ https://bugs.webkit.org/show_bug.cgi?id=105217
+
+ Reviewed by Dirk Pranke.
+
+ Previously --profile would fail strangely if find_unused_filename returned None
+ (which would happen as soon as we had 100 report files).
+ Now we'll search through 1000 filenames before giving up (and assert if we failed to find one).
+ I also made some minor cleanups to the output of perf, and tried to make the
+ commands more self-documenting by using long-names for args.
+
+ * Scripts/webkitpy/common/system/profiler.py:
+ (SingleFileOutputProfiler.__init__):
+ (Perf.attach_to_pid):
+ (Perf.profile_after_exit):
+
+2012-12-17 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r137198.
+ http://trac.webkit.org/changeset/137198
+ https://bugs.webkit.org/show_bug.cgi?id=105212
+
+ This patch is causing API behavior compatibility problems
+ (Requested by zdobersek on #webkit).
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (willSendRequestCallback):
+
+2012-12-17 Elliott Sprehn <esprehn@chromium.org>
+
+ Unreviewed. Adding myself to committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-17 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: shuffle code around for cleanup in run_webkit_tests.py
+ https://bugs.webkit.org/show_bug.cgi?id=105078
+
+ Reviewed by Ojan Vafai.
+
+ This patch reorders functions so that run_webkit_tests can be
+ understood in a top-down matter better, and to make things slightly
+ more sensible when I merge manager.py into it.
+
+ Also, this adds tests for the actual main() routine, which had several
+ bugs get through testing a week or two ago.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (main):
+ (parse_args):
+ (_set_up_derived_options):
+ (run):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (RunTest):
+ (RunTest.test_no_http_tests):
+ (PortTest.disabled_test_mac_lion):
+ (MainTest):
+ (MainTest.test_exception_handling):
+ (MainTest.test_exception_handling.interrupting_run):
+ (MainTest.test_exception_handling.successful_run):
+ (MainTest.test_exception_handling.successful_run.FakeRunDetails):
+ (MainTest.test_exception_handling.exception_raising_run):
+
+2012-12-17 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: move --lint-test-files code into its own module
+ https://bugs.webkit.org/show_bug.cgi?id=105077
+
+ Reviewed by Eric Seidel.
+
+ It really didn't need to be in run_webkit_tests.py anymore.
+ This patch adds a new lint-test-expectations scripts to Tools/Scripts;
+ rwt --lint-test-files is still supported for backwards compatibility
+ for now.
+
+ * Scripts/lint-test-expectations: Added.
+ * Scripts/webkitpy/layout_tests/lint_test_expectations.py: Added.
+ (lint):
+ (main):
+ * Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py: Added.
+ (FakePort):
+ (FakePort.__init__):
+ (FakePort.test_configuration):
+ (FakePort.expectations_dict):
+ (FakePort.skipped_layout_tests):
+ (FakePort.all_test_configurations):
+ (FakePort.configuration_specifier_macros):
+ (FakePort.get_option):
+ (FakeFactory):
+ (FakeFactory.__init__):
+ (FakeFactory.get):
+ (FakeFactory.all_port_names):
+ (LintTest):
+ (LintTest.test_all_configurations):
+ (LintTest.test_lint_test_files):
+ (LintTest.test_lint_test_files__errors):
+ (MainTest):
+ (MainTest.test_success):
+ (MainTest.test_success.interrupting_lint):
+ (MainTest.test_success.successful_lint):
+ (MainTest.test_success.exception_raising_lint):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (main):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (StreamTestingMixin.assertNotEmpty):
+
+2012-12-17 Adam Klein <adamk@chromium.org>
+
+ build-webkit: rename --template-tag to --template-element to match ENABLE #define name
+ https://bugs.webkit.org/show_bug.cgi?id=105072
+
+ Reviewed by Laszlo Gombos.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-17 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Add some unit testing for WTF::clampTo* functions
+ https://bugs.webkit.org/show_bug.cgi?id=105060
+
+ Reviewed by Emil A Eklund.
+
+ The new tests are targeted at clamping to int / unsigned and float as those are
+ the one explicitely exposed through more dedicated functions (like clampToInteger,
+ clampToPositiveInteger and clampToFloat).
+
+ * TestWebKitAPI/Tests/WTF/MathExtras.cpp:
+
+2012-12-17 Eric Seidel <eric@webkit.org>
+
+ rpt --profile --chromium-android throws exception
+ https://bugs.webkit.org/show_bug.cgi?id=105061
+
+ Reviewed by Daniel Bates.
+
+ Somehow popen(args) got turned into popen(*args) at some point,
+ which caused my new stringify code to fail when args was passed by name.
+ Fixed and tested.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive._stringify_args):
+ (Executive):
+ (Executive.popen):
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ExecutiveTest.test_popen_args):
+
+2012-12-17 Mark Pilgrim <pilgrim@chromium.org>
+
+ Use Platform::current() instead of webKitPlatformSupport() in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=105054
+
+ Reviewed by Jochen Eisinger.
+
+ Part of a refactoring series; see tracking bug 82948.
+
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ (NotificationPresenter::show):
+ * DumpRenderTree/chromium/Task.cpp:
+ (postTask):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp:
+
+2012-12-17 Emil A Eklund <eae@chromium.org>
+
+ Clamp values in LayoutUnit::operator/ when SATURATED_LAYOUT_ARITHMETIC is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=104955
+
+ Reviewed by Julien Chaffraix.
+
+ Add tests for LayoutUnit.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/ForwardingHeaders: Added.
+ * TestWebKitAPI/ForwardingHeaders/WebCore: Added.
+ * TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h: Added.
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+
+2012-12-17 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] removed unused preferences from testRunner.overridePreference
+ https://bugs.webkit.org/show_bug.cgi?id=105169
+
+ Reviewed by Tony Chang.
+
+ Most notably this removes the code related to font family maps which is
+ now handled via window.internals.settings
+
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ (WebPreferences):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::overridePreference):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::applyTo):
+
+2012-12-17 James Robinson <jamesr@chromium.org>
+
+ [chromium] Move creation of WebLayerTreeView to WebWidgetClient
+ https://bugs.webkit.org/show_bug.cgi?id=105071
+
+ Reviewed by Adrienne Walker.
+
+ Update WebViewHost for the new WebWidgetClient interface.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::initializeLayerTreeView):
+ (WebViewHost::layerTreeView):
+ (WebViewHost::~WebViewHost):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-12-17 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ [EFL][WK2] window_create doesn't receive the url
+ https://bugs.webkit.org/show_bug.cgi?id=105184
+
+ Reviewed by Alexis Menard.
+
+ * MiniBrowser/efl/main.c: Use the url supplied to window_create
+ (on_window_create):
+
+2012-12-17 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: MemoryInstrumentation doesn't detect reportMemoryUsage method defined in a base class.
+ https://bugs.webkit.org/show_bug.cgi?id=105026
+
+ Reviewed by Yury Semikhatsky.
+
+ Old SFINAE test was replaced with new one based on this article:
+ http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
+
+ New test which covers this problem was added.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-12-17 Anthony Scian <ascian@rim.com>
+
+ [Blackberry] Static code analysis warning fixes
+ https://bugs.webkit.org/show_bug.cgi?id=105129
+
+ Reviewed by Rob Buis.
+
+ Added null checks for fopen calls, no recovery attempted; access fault prevention only.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::createFile):
+ (BlackBerry::WebKit::DumpRenderTree::runTest):
+
+2012-12-17 John Mellor <johnme@chromium.org>
+
+ Add Anton Vayvod and Tim Volodine as contributors in committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=105025
+
+ Unreviewed. Adds two contributors to committers.py.
+ They are initially contributing to the Text Autosizing feature (master bug: 84186).
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ Unreviewed, add myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-17 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] remove some unnecessary CONFIG additions
+
+ Reviewed by Simon Hausmann.
+
+ qt is already added by spec_pre.prf, warn_on and depend_includepath by
+ default_pre.prf.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-12-17 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed, rolling out r137892.
+ http://trac.webkit.org/changeset/137892
+ https://bugs.webkit.org/show_bug.cgi?id=105026
+
+ it broke compilation on windows
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-12-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: MemoryInstrumentation doesn't detect reportMemoryUsage method defined in a base class.
+ https://bugs.webkit.org/show_bug.cgi?id=105026
+
+ Reviewed by Yury Semikhatsky.
+
+ Old SFINAE test was replaced with new one based on this article:
+ http://stackoverflow.com/questions/1966362/sfinae-to-check-for-inherited-member-functions
+
+ New test which covers this problem was added.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-12-17 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] rely on automatic output directory setup
+
+ Reviewed by Simon Hausmann.
+
+ Now being a proper qt module (by virtue of having load(qt_build_config)
+ in .qmake.conf), webkit gets the path setup goodies for free.
+
+ This also fixes Makefile.api.Debug/Release trying to generate qrc_WebKit.cpp
+ at the same time, instead of the debug and release version ending up in different
+ directories as they should.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-12-17 Charles Wei <charles.wei@torchmobile.com.cn>
+
+ [BlackBerry] Need to re-enable video track
+ https://bugs.webkit.org/show_bug.cgi?id=105155
+
+ Reviewed by George Staikos.
+
+ Just enable Video Track for BlackBerry.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-17 János Badics <jbadics@inf.u-szeged.hu>
+
+ Unreviewed. Added myself to committers.py
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-17 Jonathan Liu <net147@gmail.com>
+
+ Fix linking of libraries with -Wl,-whole-archive
+ https://bugs.webkit.org/show_bug.cgi?id=104436
+
+ Reviewed by Simon Hausmann.
+
+ If there is more than one library in LIBS linked with
+ -Wl,-whole-archive -l... -Wl,-no-whole-archive, qmake tries to
+ merge the duplicate flags in LIBS which causes linking to fail.
+
+ Add no_smart_library_merge to CONFIG to prevent the duplicate
+ flags from being removed when using -Wl,-whole-archive.
+
+ * qmake/mkspecs/features/functions.prf:
+
+2012-12-16 Arvid Nilsson <anilsson@rim.com>
+
+ [BlackBerry] Adapt to new BlackBerry::Platform::TouchPoint API
+ https://bugs.webkit.org/show_bug.cgi?id=105143
+ RIM PR 171941
+
+ Reviewed by Rob Buis.
+ Internally reviewed by George Staikos.
+
+ Adapt to new method names and encapsulation of TouchPoint data members.
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (addTouchPointCallback):
+ (updateTouchPointCallback):
+ (touchEndCallback):
+ (releaseTouchPointCallback):
+ (sendTouchEvent):
+
+2012-12-16 Maciej Stachowiak <mjs@apple.com>
+
+ Add a script to compute the mean and 95% confidence interval (using two-sided t-test) of a sample set
+ https://bugs.webkit.org/show_bug.cgi?id=105148
+
+ Reviewed by Filip Pizlo.
+
+ Usage examples:
+
+ $ sampstat --help
+ Usage: sampstat [options] [FILES]
+ Compute the mean and 95% confidence interval of a sample set.
+ Standard input or files must contain two or more decimal numbers, one per line.
+
+ Options:
+ -h, --help show this help message and exit
+ -u UNIT, --unit=UNIT assume values are in units of UNIT
+ -v, --verbose print all values (with units)
+
+ $ sampstat -u MB memresults.txt
+ 2356.90 MB +/- 101.34 MB (4.3%)
+
+ $ sampstat -v -u MB memresults.txt
+ 2318.21 MB
+ 2399.56 MB
+ 2352.93 MB
+ ----------------
+ Mean: 2356.90 MB +/- 101.34 MB (4.3%)
+
+
+ * Scripts/sampstat: Added.
+ (sum): Helper function to compute the sum of a list.
+ (arithmeticMean): Compute the meam of a list.
+ (standardDeviation): Compute the sample standard deviation (unbiased estimator).
+ (standardError): Compute the sample standard error.
+ (tDist): Compute t(.025, n-1), the t-value for atwo-sided 95% confidence interval.
+ (twoSidedConfidenceInterval): Compute the two-sided confidence interval range about the mean.
+
+2012-12-15 Nima Ghanavatian <nghanavatian@rim.com>
+
+ [BlackBerry] Pass key modifiers with touch and mouse events
+ https://bugs.webkit.org/show_bug.cgi?id=105108
+
+ Reviewed by Rob Buis.
+
+ Update DRT to new api.
+
+ Internally reviewed by Gen Mak.
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (mouseDownCallback):
+ (mouseUpCallback):
+ (mouseMoveToCallback):
+
+2012-12-15 Zan Dobersek <zandobersek@gmail.com>
+
+ Stop the XvfbDriver before proceeding with its starting setup
+ https://bugs.webkit.org/show_bug.cgi?id=105006
+
+ Reviewed by Philippe Normand.
+
+ Just as with the base Driver implementation, stop the XvfbDriver
+ before proceeding with setting up lock files and a new Xvfb instance.
+ This forces any driver or Xvfb instances that are currently under
+ the driver's control to be closed/killed and cleaned up after.
+
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
+ (XvfbDriver._start):
+
+2012-12-14 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: make port_name a required parameter to the non-test ports
+ https://bugs.webkit.org/show_bug.cgi?id=105057
+
+ Reviewed by Eric Seidel.
+
+ This is just minor code cleanup along the path to making Port
+ constructors simpler and pushing more logic into the port factory.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.__init__):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.make_port):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (TestWebKitPort.__init__):
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ (TestPort):
+ (TestPort.determine_full_port_name):
+ (TestPort.__init__):
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+ (XvfbDriverTest.make_driver):
+ (XvfbDriverTest.test_stop):
+
+2012-12-14 Dirk Pranke <dpranke@chromium.org>
+
+ garden-o-matic doesn't know about reftests
+ https://bugs.webkit.org/show_bug.cgi?id=101976
+
+ Reviewed by Eric Seidel.
+
+ Attempt to make garden-o-matic properly aware of reftests again.
+
+ This is re-landing r137407 with a change to
+ rebaselineWithStatusUpdates() to actually pass the filtered
+ failureInofLost to checkout.rebaseline().
+
+ Unfortunately, the testing coverage for this whole module is almost
+ non-existent, and it's not obvious that there's a good way to
+ stub out checkout.rebaseline() to test that the right thing
+ happens. I verified the change manually.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js:
+
+2012-12-14 Ryosuke Niwa <rniwa@webkit.org>
+
+ "Running 1 DumpRenderTree over X shards" is not a helpful output
+ https://bugs.webkit.org/show_bug.cgi?id=104858
+
+ Reviewed by Dirk Pranke.
+
+ The word "shard" is not typically used in test frameworks. This word is confusing for many WebKit
+ contributors who typically don't have much experience on distributed computations and databases.
+ So only print this message out in the debug mode.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.print_workers_and_shards):
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ Add --profiler=PROFILER option to run-perf-tests to allow specifying which profiler to use on platforms with many
+ https://bugs.webkit.org/show_bug.cgi?id=104891
+
+ Reviewed by Ryosuke Niwa.
+
+ I also implemented a very simple "Sample" Profiler using
+ Mac OS X's /usr/bin/sample command line tool.
+
+ The real reason for this abstraction is to make it easy
+ to support both perf and pprof on linux which seem to
+ be about equally popular among those I ask in the Chrome team.
+
+ * Scripts/webkitpy/common/system/profiler.py:
+ (ProfilerFactory.create_profiler):
+ (ProfilerFactory):
+ (ProfilerFactory.available_profilers_by_name):
+ (ProfilerFactory.default_profiler_name):
+ (Sample):
+ (Sample.__init__):
+ (Sample.attach_to_pid):
+ (Sample.profile_after_exit):
+ (IProfiler.attach_to_pid):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.__init__):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ Unreviewed, fixing typo in python unittest.
+
+ I changed the default profiler on linux from pprof to perf in
+ bug 104971. I failed to update the unittest results at that time.
+
+ * Scripts/webkitpy/common/system/profiler_unittest.py:
+ (ProfilerFactoryTest.test_basic):
+
+2012-12-13 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Add a virtual test suite for enabling opt-in to composited scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=104911
+
+ Reviewed by Dirk Pranke.
+
+ Adds two virtual tests suites to run the tests in
+ compositing/overflow/ and scrollbars/ with the flag
+ --enable-accelerated-overflow-scroll, which I've also plumbed through
+ in the usual way.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h:
+ (WebPreferences):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp:
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner::WebPreferences::applyTo):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setAcceleratedCompositingForOverflowScrollEnabled):
+ (TestShell):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.virtual_test_suites):
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ Use 'perf' to profile on linux instead of google-pprof by default
+ https://bugs.webkit.org/show_bug.cgi?id=104971
+
+ Reviewed by Dirk Pranke.
+
+ This makes Chromium Linux match Chromium Android and use the perf
+ tool by default. Once https://bugs.webkit.org/show_bug.cgi?id=104891
+ lands it will be possible to use pprof again on Linux.
+
+ This is slightly more advanced than the AndroidPerf profiler as
+ instead of using a timeout on "perf record" I instead watch
+ for the termination of the target process and then control-C
+ the 'perf record' process. This required me to add two new
+ methods to Executive, one to have a limited-time wait() and
+ the second to be able to send a control-C. I chose to add
+ these to Executive to make them easier to mock/fix-for-win32
+ at a later time if needed.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.wait_limited):
+ (Executive.interrupt):
+ * Scripts/webkitpy/common/system/profiler.py:
+ (ProfilerFactory.create_profiler):
+ (Perf):
+ (Perf.__init__):
+ (Perf._perf_path):
+ (Perf.attach_to_pid):
+ (Perf._first_ten_lines_of_profile):
+ (Perf.profile_after_exit):
+
+2012-12-13 Julie Parent <jparent@chromium.org>
+
+ Dashboard cleanup: remove usage of global g_builders.
+ https://bugs.webkit.org/show_bug.cgi?id=104941
+
+ Reviewed by Dirk Pranke.
+
+ The dashboards use a lot of global state, which makes hacking on them
+ complicated. This change removes the use of one such global: g_builders.
+ In most cases, we can just use currentBuilderGroup().builders instead,
+ which is now currentBuilders().
+ Surprisingly, the most changes were required to the unit tests, since
+ they were even bigger offenders of bad hygiene, relying on global state
+ set by other tests, randomly clobbering global variables in ways the
+ real code doesn't, etc.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (BuilderGroup.prototype.setup):
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (.switch.return):
+ (htmlForTestTypeSwitcher):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (generatePage):
+ (getAllTestsTrie):
+ (processTestRunsForAllBuilders):
+ (showPopupForBuild):
+ (generatePageForExpectationsUpdate):
+ (loadExpectationsLayoutTests):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (resetGlobals):
+ (stubResultsByBuilder):
+ (test):
+ * TestResultServer/static-dashboards/loader.js:
+ (.):
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ Callers should not have to stringify args before calling Executive run_command/popen
+ https://bugs.webkit.org/show_bug.cgi?id=104975
+
+ Reviewed by Dirk Pranke.
+
+ One could argue that we should match the python call syntax here,
+ but I think it's a more friendly API if we automagically handle
+ stringification of args in run_command, etc.
+ This removes map(unicode, args) from several callsites.
+
+ When I first tried to land this change, I didn't realize that
+ Executive._command_for_printing depended on this behavior
+ having been applied to args in run_command. The fix is to
+ call _stringify_args in both run_command and popen.
+ This is slightly redundant, but given how short args have to be
+ (due to shell limits), I don't think the double-encode check
+ matters in practice.
+
+ This is slightly complicated by the fact that apache_http_server.py
+ is the one caller in our codebase which uses shell=True.
+ shell=True is a well-documented trail-of-tears:
+ http://stackoverflow.com/questions/3172470/actual-meaning-of-shell-true-in-subprocess
+ but to support this legacy (windows-only) code (which I can't easily test)
+ I've added an if-hack to avoid stringifying the the popen(shell=True) case.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.run_command):
+ (Executive._stringify_args):
+ (Executive.popen):
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ExecutiveTest.test_auto_stringify_args):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (attach_to_pid):
+
+2012-12-13 Adrienne Walker <enne@chromium.org>
+
+ Unreviewed, rolling out r137645, r137646, and r137667.
+ http://trac.webkit.org/changeset/137645
+ http://trac.webkit.org/changeset/137646
+ http://trac.webkit.org/changeset/137667
+ https://bugs.webkit.org/show_bug.cgi?id=104911
+
+ Breaks some overflow layout tests
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.virtual_test_suites):
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, rolling out r137661.
+ http://trac.webkit.org/changeset/137661
+ https://bugs.webkit.org/show_bug.cgi?id=104891
+
+ broke unit tests, run-webkit-tests
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive._run_command_with_teed_output):
+ (Executive.run_command):
+ (Executive.popen):
+ * Scripts/webkitpy/common/system/profiler.py:
+ (ProfilerFactory.create_profiler):
+ (GooglePProf.profile_after_exit):
+ (IProfiler.attach_to_pid):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.__init__):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: move rundetails, summarize_results into test_run_results
+ https://bugs.webkit.org/show_bug.cgi?id=104963
+
+ Reviewed by Eric Seidel.
+
+ More cleanup; this the plain-old-data functions out of manager.py
+ and into test_run_results next to the other aggregate data structures.
+
+ Also this cleans up a bunch of test code and reduces duplication.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ManagerTest.test_look_for_new_crash_logs):
+ * Scripts/webkitpy/layout_tests/models/test_run_results.py:
+ (TestRunResults.__init__):
+ (TestRunResults.add):
+ (RunDetails):
+ (RunDetails.__init__):
+ (_interpret_test_failures):
+ (summarize_results):
+ * Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py: Added.
+ (get_result):
+ (run_results):
+ (summarized_results):
+ (InterpretTestFailuresTest):
+ (InterpretTestFailuresTest.setUp):
+ (InterpretTestFailuresTest.test_interpret_test_failures):
+ (SummarizedResultsTest):
+ (SummarizedResultsTest.setUp):
+ (SummarizedResultsTest.test_no_svn_revision):
+ (SummarizedResultsTest.test_svn_revision):
+ (SummarizedResultsTest.test_summarized_results_wontfix):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
+ (BuildBotPrinterTests.get_printer):
+ (BuildBotPrinterTests.test_print_unexpected_results):
+ (BuildBotPrinterTests.test_print_results):
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ Make --profile output easier to understand for pprof on linux
+ https://bugs.webkit.org/show_bug.cgi?id=104957
+
+ Reviewed by Dirk Pranke.
+
+ pprof is kinda mysterious, so we print some information
+ on how to use it, and how to learn how to read the sample dump.
+ This is similar to what we've done for perf output for Chromium Android.
+
+ * Scripts/webkitpy/common/system/profiler.py:
+ (GooglePProf._pprof_path):
+ (GooglePProf.profile_after_exit):
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ Revert r137407 - it didn't actually work right.
+ https://bugs.webkit.org/show_bug.cgi?id=101976
+
+ Unreviewed, build fix.
+
+ Turns out that rebaselining was completely broken with this change :(
+ We're passing in a list of test names rather than the list of
+ failureInfo objects.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js:
+
+2012-12-13 Antoine Labour <piman@chromium.org>
+
+ [chromium] Small fixes for WebPluginContainer::setWebLayer
+ https://bugs.webkit.org/show_bug.cgi?id=104953
+
+ Reviewed by James Robinson.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp: Clean up
+ dangling pointers, force correct invalidation of the layer.
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ Add --profiler=PROFILER option to run-perf-tests to allow specifying which profiler to use on platforms with many
+ https://bugs.webkit.org/show_bug.cgi?id=104891
+
+ Reviewed by Dirk Pranke.
+
+ I also implemented a very simple "Sample" Profiler using
+ Mac OS X's /usr/bin/sample command line tool.
+
+ I also moved the map(unicode, args) call into Executive.popen
+ so that all callers don't have to do it themselves.
+
+ The real reason for this abstraction is to make it easy
+ to support both perf and pprof on linux which seem to
+ be about equally popular among those I ask in the Chrome team.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.popen):
+ * Scripts/webkitpy/common/system/profiler.py:
+ (ProfilerFactory.create_profiler):
+ (ProfilerFactory):
+ (ProfilerFactory.available_profilers_by_name):
+ (ProfilerFactory.default_profiler_name):
+ (Sample):
+ (Sample.__init__):
+ (Sample.attach_to_pid):
+ (Sample.profile_after_exit):
+ (IProfiler.attach_to_pid):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.__init__):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ support -wk2 port names properly in webkitpy.layout_tests.port
+ https://bugs.webkit.org/show_bug.cgi?id=104761
+
+ Reviewed by Eric Seidel.
+
+ Our support for WK2 port names was inconsistent at best; this patch
+ modifies the code so that <port_name>-wk2 is supported for all ports that
+ have WK2 implementations and is equivalent to specifying <port_name>
+ and -2/--webkit-test-runner. In addition, this modifies
+ builders.all_port_names() to include the wk2 variants.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort.determine_full_port_name):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.determine_full_port_name):
+ (Port.__init__):
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+ (DriverTest.make_port):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.default_baseline_search_path):
+ * Scripts/webkitpy/layout_tests/port/win.py:
+ (WinPort.default_baseline_search_path):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+
+2012-12-13 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Add a virtual test suite for enabling opt-in to composited scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=104911
+
+ Reviewed by Adrienne Walker.
+
+ Adds two virtual tests suites to run the tests in
+ compositing/overflow/ and scrollbars/ with the flag
+ --enable-accelerated-compositing-for-overflow-scroll
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.virtual_test_suites):
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ delete extraneous self.fail in mastercfg_unittest.py
+ https://bugs.webkit.org/show_bug.cgi?id=104940
+
+ Reviewed by Eric Seidel.
+
+ This was accidentally introduced in r137404.
+
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ Fix a mis-named variable after r137621.
+ https://bugs.webkit.org/show_bug.cgi?id=104871
+
+ Unreviewed, build fix.
+
+ * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
+ (BuildBotPrinter.print_results):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
+
+2012-12-13 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: rename ResultSummary
+ https://bugs.webkit.org/show_bug.cgi?id=104871
+
+ Reviewed by Eric Seidel.
+
+ This patch changes the names of ResultSummary and related modules,
+ classes, and variables as a part of the larger clean up in bug 103824.
+
+ This change is basically a bunch of search and replaces:
+ - result_summary.py -> test_run_results.py
+ - class ResultSummary -> class TestRunResults
+ - "result_summary" or "rs" as a generic variable name -> "run_results",
+ when it doesn't matter (or we don't know) if this refers to the
+ initial pass over the tests or the retry pass.
+ - "result_summary" as a variable containing the results of the initial,
+ complete test run -> "initial_results"
+ - "retry_summary" as a variable containing the results of retried
+ results -> "retry_results"
+ - ResultSummary.results (the property) -> TestRunResults.results_by_name
+ - ResultSummary.failures (the property) -> TestRunResults.failures_by_name
+ - RunDetails.result_summary -> RunDetails.initial_results
+ - RunDetails.retry_summary -> RunDetails.retry_results
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.__init__):
+ (LayoutTestRunner.run_tests):
+ (LayoutTestRunner._mark_interrupted_tests_as_skipped):
+ (LayoutTestRunner._interrupt_if_at_failure_limits):
+ (LayoutTestRunner._interrupt_if_at_failure_limits.interrupt_if_at_failure_limit):
+ (LayoutTestRunner._update_summary_with_result):
+ (LayoutTestRunner._handle_finished_test):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (FakePrinter.print_expected):
+ (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
+ (LayoutTestRunnerTests.test_update_summary_with_result):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (RunDetails.__init__):
+ (summarize_results):
+ (Manager.run):
+ (Manager._look_for_new_crash_logs):
+ (Manager._tests_to_retry):
+ (Manager._upload_json_files):
+ (Manager._stats_trie):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ManagerTest.test_look_for_new_crash_logs):
+ (SummarizeResultsTest):
+ (SummarizeResultsTest.get_run_results):
+ (SummarizeResultsTest.summarized_results):
+ * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
+ (JSONLayoutResultsGenerator.__init__):
+ (JSONLayoutResultsGenerator._get_modifier_char):
+ (JSONLayoutResultsGenerator._insert_failure_summaries):
+ (JSONLayoutResultsGenerator._get_failure_summary_entry):
+ * Scripts/webkitpy/layout_tests/models/test_run_results.py: Renamed from Tools/Scripts/webkitpy/layout_tests/models/result_summary.py.
+ (TestRunResults):
+ (TestRunResults.__init__):
+ (TestRunResults.add):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (get_test_results):
+ (MainTest.test_basic):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
+ (BuildBotPrinter.print_results):
+ (BuildBotPrinter.print_run_results):
+ (BuildBotPrinter._print_run_results_entry):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
+ (BuildBotPrinterTests.get_run_results):
+ (BuildBotPrinterTests.test_print_unexpected_results.get_unexpected_results):
+ (BuildBotPrinterTests):
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.print_expected):
+ (Printer._print_expected_results_of_type):
+ (Printer.print_results):
+ (Printer._print_timing_statistics):
+ (Printer._print_worker_statistics):
+ (Printer._print_aggregate_test_statistics):
+ (Printer._print_individual_test_times):
+ (Printer._print_directory_timings):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+
+2012-12-13 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] The WebKit2 bots are building and executing WebKit1 tests
+ https://bugs.webkit.org/show_bug.cgi?id=104690
+
+ Reviewed by Csaba Osztrogonác.
+
+ Pass --no-webkit1 option to the EFL WK2 bots when building. This
+ will disable WK1 API and thus, the WK1 API tests.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (CompileWebKit2Only):
+ (BuildAndTestFactory):
+ (BuildAndTestFactory.__init__):
+ (BuildAndTestWebKit2OnlyFactory):
+ Now bots using BuildAndTestWebKit2OnlyFactory (for instance only EFL) will
+ get --no-webkit1 as a parameter on the build-webkit script.
+ * Scripts/build-webkit:
+ Added support for -no-webkit1 for the Qt and EFL port.
+
+2012-12-13 Eric Seidel <eric@webkit.org>
+
+ build-webkit --chromium-android forces Make even when update-webkit used --ninja
+ https://bugs.webkit.org/show_bug.cgi?id=104839
+
+ Reviewed by Tony Chang.
+
+ This was recommended by Peter as part of:
+ https://bugs.webkit.org/show_bug.cgi?id=104434#c4
+ Fixing this makes build-webkit --chromium-android work for the common (ninja) case.
+
+ * Scripts/webkitdirs.pm:
+ (buildChromium):
+
+2012-12-13 Julie Parent <jparent@chromium.org>
+
+ Loader_unittests should reset state between runs.
+ https://bugs.webkit.org/show_bug.cgi?id=104862
+
+ Reviewed by Dirk Pranke.
+
+ The loader_unittests were not resetting state between runs, leaving
+ a lot of data behind in global objects that the dashboard and tests
+ rely on. A handful were resetting just a few objects. Use the common
+ resetGlobals() method instead.
+
+ * TestResultServer/static-dashboards/loader_unittests.js:
+
+2012-12-13 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt][WK2] Fix painting on Mac with retina display
+ https://bugs.webkit.org/show_bug.cgi?id=104574
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Remove setting the devicePixelRatio experimental property
+ since the value is now automatically picked up from Qt.
+
+ * MiniBrowser/qt/qml/BrowserWindow.qml:
+
+2012-12-13 Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+ [EFL][GTK] Don't call deprecated g_type_init when glib => 2.35
+ https://bugs.webkit.org/show_bug.cgi?id=103209
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ g_type_init() is deprecated from 2.35.0 onwards. Don't call it
+ in that case to avoid warnings and/or build failure.
+
+ * DumpRenderTree/gtk/ImageDiff.cpp:
+ (main):
+
+2012-12-13 Claudio Saavedra <csaavedra@igalia.com>
+
+ [Tools] Add exception for gtk_style_context_get()
+ https://bugs.webkit.org/show_bug.cgi?id=104896
+
+ Reviewed by Martin Robinson.
+
+ Add new exception for gtk_style_context_get().
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_for_null): Add exception for gtk_style_context_get().
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (WebKitStyleTest.test_null_false_zero): Add a unit
+ test for the new exception.
+
+2012-12-13 Joaquim Rocha <jrocha@igalia.com>
+
+ REGRESSION (r137432): The /webkit2/WebKitCookieManager/accept-policy unit test is failing
+ https://bugs.webkit.org/show_bug.cgi?id=104790
+
+ Reviewed by Carlos Garcia Campos.
+
+ Unskip the GTK accept policy test.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-12-13 Xingnan Wang <xingnan.wang@intel.com>
+
+ Unreviewed. Adding myself to committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-12 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Fix typo in NRWT.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.is_reference_html_file):
+
+2012-12-12 Roger Fong <roger_fong@apple.com>
+
+ Fix detection of ref test files in old and new run webkit tests.
+ https://bugs.webkit.org/show_bug.cgi?id=104850.
+
+ Reviewed by Timothy Horton.
+
+ * Scripts/old-run-webkit-tests:
+ (isUsedInReftest):
+ Add notref and ref prefix and suffix cases to isUsedinReftest.
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port):
+ (Port.is_reference_html_file):
+ Typo in NRWT.
+
+2012-12-12 Dirk Pranke <dpranke@chromium.org>
+
+ rework ChromiumAndroidDriver.start() et. al to avoid funky layering
+ https://bugs.webkit.org/show_bug.cgi?id=104856
+
+ Reviewed by Eric Seidel.
+
+ r137523 / bug 10357 introduced some back-and-forth hopping during
+ driver.start() in the chromium android port. This patch cleans it
+ up a bit.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver._start_once):
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.start):
+ (Driver._start):
+
+2012-12-12 Eric Seidel <eric@webkit.org>
+
+ Add support for run-perf-tests --chromium-android --profile
+ https://bugs.webkit.org/show_bug.cgi?id=103587
+
+ Reviewed by Dirk Pranke.
+
+ This makes it possible to profile PerformanceTests on an Android device
+ using run-perf-tests --chromium-android --profile.
+ CPU profiling on Android is sadly non-trivial, but this goes a long
+ ways towards making it more accessible to non-Android developers.
+
+ Although this script requires your device to be flashed with a
+ userdebug build (an annoyingly non-trivial endeavor for external contributors)
+ it endeavors to detect and explain the common errors encountered
+ while trying to setup a device for perf-based profiling.
+
+ * Scripts/webkitpy/common/system/profiler.py:
+ (GooglePProf.profile_after_exit): Discovered that pprof will just hang if passed a missing file.
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (AndroidPerf):
+ (AndroidPerf.__init__):
+ (AndroidPerf.check_configuration):
+ (AndroidPerf.print_setup_instructions):
+ (_file_exists_on_device):
+ (_run_adb_command):
+ (attach_to_pid):
+ (_perf_version_string):
+ (_find_perfhost_binary):
+ (_perfhost_path):
+ (_first_ten_lines_of_profile):
+ (profile_after_exit):
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver.__init__.methods):
+ (ChromiumAndroidDriver._find_or_create_symfs):
+ (ChromiumAndroidDriver._start_once):
+ (ChromiumAndroidDriver):
+ (ChromiumAndroidDriver._run_post_start_tasks):
+ (ChromiumAndroidDriver._pid_from_android_ps_output):
+ (ChromiumAndroidDriver._pid_on_target):
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ (ChromiumAndroidDriverTest.test_pid_from_android_ps_output):
+ (AndroidPerfTest):
+ (AndroidPerfTest.test_perf_output_regexp):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver._setup_environ_for_driver):
+ (Driver):
+ (Driver._start):
+ (Driver._run_post_start_tasks):
+ (Driver._pid_on_target):
+
+2012-12-12 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: remove deprecated ORWT compatibility command line flags
+ https://bugs.webkit.org/show_bug.cgi?id=104301
+
+ Reviewed by Eric Seidel.
+
+ The command line flags for --noshow-results, --[no-]launch-safari,
+ and --use-remote-links-to-tests were for compatibility with
+ old-run-webkit-tests, but the compatibility is not needed any more
+ since NRWT is basically default and the scripts that passed the
+ old flags have been updated.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (_set_up_derived_options):
+ (parse_args):
+
+2012-12-12 John Griggs <jgriggs@rim.com>
+
+ 2012-12-12 John Griggs <jgriggs@rim.com>
+
+ [BlackBerry] Update Media Controls
+ https://bugs.webkit.org/show_bug.cgi?id=104443
+ https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=204748
+
+ Update Media Controls for BlackBerry platform to allow audio, embedded video and fullscreen video controls to be positioned and styled differently.
+
+ Reviewed by Rob Buis.
+
+ BlackBerry-specific update to Media Controls - No new tests required.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-12 Justin Novosad <junov@google.com>
+
+ Adding myself to SkiaGraphics watchlist
+
+ Unreviewed
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-12-12 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Add authentication support to DRT and fix exposed issues in the libsoup backend
+ https://bugs.webkit.org/show_bug.cgi?id=104285
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Add support to DumpRenderTree for running authentication tests. Since the DRT
+ expects an authentication callback, we add one to DRTSupport to avoid #ifdefs
+ in platform-independent code for GTK+.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues): Reset the authentication password and username.
+ (authenticationCallback): Added.
+ (createWebView): Attach the authentiation callback during startup.
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (soupURIToKURL): soup_uri_to_string does not preserve passwords embedded
+ in the URL so we add a somewhat messy method of re-adding them when they exist.
+ It would be nice to use soupURIToKURL here, but it seems we cannot use KURL without
+ pulling in lots of WebCore code so we use string search and replace.
+ (TestRunner::queueLoad): Use the new helper.
+
+2012-12-12 Dirk Pranke <dpranke@chromium.org>
+
+ garden-o-matic should prefer efl/ over efl-wk1/ and efl-wk2/ when rebaselining
+ https://bugs.webkit.org/show_bug.cgi?id=102389
+
+ Reviewed by Tony Chang.
+
+ The code wasn't aware of both the efl-wk1 and efl-wk2 variants,
+ because all_port_names() by itself doesn't tell you about the
+ variants. Work around this for now, and filed bug 104761 to
+ address the underlying problem.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+ (BaselineOptimizerTest.test_efl):
+
+2012-12-12 Krzysztof Czech <k.czech@samsung.com>
+
+ [EFL] Possibility to turn off accessibility feature for WebKit-EFL.
+ https://bugs.webkit.org/show_bug.cgi?id=103036
+
+ Reviewed by Laszlo Gombos.
+
+ Guard dependencies for accessibility (ATK), so that they can be turned off.
+
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/PlatformEfl.cmake:
+
+2012-12-12 Simon Fraser <simon.fraser@apple.com>
+
+ Add some entries in the watchlist, and register me for them.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-12-12 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo.
+ https://bugs.webkit.org/show_bug.cgi?id=104796
+
+ Reviewed by Yury Semikhatsky.
+
+ It was not a good idea to introduce a fake root MemoryObjectInfo.
+ It makes a problem when we visit an object without its own MemoryObjectType.
+
+ Example: RenderBox has a global pointer to a hash map.
+ HashMap doesn't have its own object type because it is a generic container.
+ It will inherit object type from the fake root memory object info.
+ The same could happen for another container in another class with other MemoryObjectType.
+
+ This fact forces me to create custom process method for root objects
+ because they need to have their own MemoryObjectInfo with customisable memory object type.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+ Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using
+ for instrumented and not instrumented object classes.
+
+2012-12-12 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Remove the last of unnecessary configuration options in configure.ac
+ https://bugs.webkit.org/show_bug.cgi?id=104793
+
+ Reviewed by Martin Robinson.
+
+ Removing the filters and indexed database features from the list of features
+ being configurable through the configure script. This is not the case anymore
+ as the corresponding configuration options are being removed.
+
+ * Scripts/webkitdirs.pm:
+ (buildAutotoolsProject):
+
+2012-12-12 Mario Sanchez Prada <mario@webkit.org>
+
+ [GTK][WK2] New API to detect display/execution of insecure content
+ https://bugs.webkit.org/show_bug.cgi?id=104578
+
+ Reviewed by Martin Robinson.
+
+ Add coding style exception for 'readability/enum_casing' in GTK.
+
+ The GTK+ API use upper case, underscore separated, words in
+ certain types of enums (e.g. signals, properties).
+
+ * Scripts/webkitpy/style/checker.py: Added exception, both for
+ WebKitGTK+ and WebKit2GTK+.
+
+2012-12-12 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Fix build on chromium-win
+
+ Unreviewed build-fix.
+
+ MSVS indeed doesn't have snprintf, adding wtf/StringExtras.h include
+ to work around that.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp:
+
+2012-12-12 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix build on Mac
+
+ Reviewed by Csaba Osztrogonác.
+
+ On Mac OS X we have sqlite as a system library available.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-12-12 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed GTK gardening.
+
+ Skipping another unit test that regressed in r137432.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-12-12 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix linkage against SQLite
+ https://bugs.webkit.org/show_bug.cgi?id=104781
+
+ Reviewed by Csaba Osztrogonác.
+
+ Detect SQLite either through pkg-config, from the SQLITE3SRCDIR
+ environment variable or from qtbase via a qt5.git build. Bail out early
+ with an error message if neither option applies.
+
+ This removes the usage of $$QT.core.sources and the dependency on Qt's
+ system-sqlite configure setting. We should always favour a system
+ library over a copy in Qt.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-12-12 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Change the data channel descriptor pattern to a handler pattern
+ https://bugs.webkit.org/show_bug.cgi?id=104543
+
+ Reviewed by Kent Tamura.
+
+ Adding mocks to be able to test this refactoring.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/MockWebRTCDataChannelHandler.cpp: Added.
+ (DataChannelReadyStateTask):
+ (DataChannelReadyStateTask::DataChannelReadyStateTask):
+ (MockWebRTCDataChannelHandler::MockWebRTCDataChannelHandler):
+ (MockWebRTCDataChannelHandler::setClient):
+ (MockWebRTCDataChannelHandler::bufferedAmount):
+ (MockWebRTCDataChannelHandler::sendStringData):
+ (MockWebRTCDataChannelHandler::sendRawData):
+ (MockWebRTCDataChannelHandler::close):
+ * DumpRenderTree/chromium/MockWebRTCDataChannelHandler.h: Added.
+ (MockWebRTCDataChannelHandler):
+ (MockWebRTCDataChannelHandler::taskList):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
+ (RemoteDataChannelTask::RemoteDataChannelTask):
+ (MockWebRTCPeerConnectionHandler::createDataChannel):
+ (MockWebRTCPeerConnectionHandler::stop):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ (MockWebRTCPeerConnectionHandler):
+
+2012-12-12 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] WebTestPlugin must not depend on WTF::String
+ https://bugs.webkit.org/show_bug.cgi?id=104783
+
+ Reviewed by Kent Tamura.
+
+ In a component build, we can't access the WTF that is part of the
+ WebKit component. Accessing WTF instead will pull in a separate copy
+ into the TestRunner library. Instead of WTF::String::number use
+ snprintf() to print numbers.
+
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp:
+
+2012-12-12 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Do not automatically enable force_static_libs_as_shared when using debug_and_release
+ https://bugs.webkit.org/show_bug.cgi?id=104562
+
+ Reviewed by Tor Arne Vestbø.
+
+ force_static_libs_as_shared creates issues on Mac if QtWebKit is built as a framework.
+ QtWebProcess, for example, will link to the framework's release library and will rely
+ on DYLD_IMAGE_SUFFIX to switch to the debug build. Since QtWebProcess will also links
+ directly to the debug build of WebCore, and that QtWebKit release will link in the
+ release build of WebCore, both the debug and release version will be loaded.
+
+ To fix this properly we should make sure that applications always link to the release
+ build of dependent libraries by bypassing resolveFinalLibraryName.
+ Disable it for now as force_static_libs_as_shared is mainly for development while
+ debug_and_release is mainly for production builds.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-12-12 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed GTK gardening of the unit tests.
+
+ Skip two unit tests that regressed during the hackfest.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-12-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add Koji Ishii to the list of contributors.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-11 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: Make isActionSupported cross-platform.
+ https://bugs.webkit.org/show_bug.cgi?id=104681
+
+ Reviewed by Chris Fleizach.
+
+ Replace isActionSupported, which takes a platform-specific
+ argument, with three cross-platform methods.
+
+ * DumpRenderTree/AccessibilityUIElement.cpp:
+ (isPressActionSupportedCallback):
+ (isIncrementActionSupportedCallback):
+ (isDecrementActionSupportedCallback):
+ (AccessibilityUIElement::getJSClass):
+ * DumpRenderTree/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp:
+ (AccessibilityUIElement::isPressActionSupported):
+ (AccessibilityUIElement::isIncrementActionSupported):
+ (AccessibilityUIElement::isDecrementActionSupported):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner::AccessibilityUIElement::AccessibilityUIElement):
+ (WebTestRunner::AccessibilityUIElement::isPressActionSupportedCallback):
+ (WebTestRunner):
+ (WebTestRunner::AccessibilityUIElement::isIncrementActionSupportedCallback):
+ (WebTestRunner::AccessibilityUIElement::isDecrementActionSupportedCallback):
+ (WebTestRunner::AccessibilityUIElement::incrementCallback):
+ (WebTestRunner::AccessibilityUIElement::decrementCallback):
+ (WebTestRunner::AccessibilityUIElement::pressCallback):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (AccessibilityUIElement):
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::isPressActionSupported):
+ (AccessibilityUIElement::isIncrementActionSupported):
+ (AccessibilityUIElement::isDecrementActionSupported):
+ * DumpRenderTree/mac/AccessibilityUIElementMac.mm:
+ (AccessibilityUIElement::isPressActionSupported):
+ (AccessibilityUIElement::isIncrementActionSupported):
+ (AccessibilityUIElement::isDecrementActionSupported):
+ * DumpRenderTree/win/AccessibilityUIElementWin.cpp:
+ (AccessibilityUIElement::isPressActionSupported):
+ (AccessibilityUIElement::isIncrementActionSupported):
+ (AccessibilityUIElement::isDecrementActionSupported):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR::AccessibilityUIElement::isPressActionSupported):
+ (WTR::AccessibilityUIElement::isIncrementActionSupported):
+ (WTR::AccessibilityUIElement::isDecrementActionSupported):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
+ (WTR::AccessibilityUIElement::isPressActionSupported):
+ (WTR):
+ (WTR::AccessibilityUIElement::isIncrementActionSupported):
+ (WTR::AccessibilityUIElement::isDecrementActionSupported):
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: remove result_summary.total_tests_by_expectation
+ https://bugs.webkit.org/show_bug.cgi?id=104756
+
+ Reviewed by Eric Seidel.
+
+ This field wasn't being used by anything.
+
+ * Scripts/webkitpy/layout_tests/models/result_summary.py:
+ (ResultSummary.__init__):
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ garden-o-matic doesn't know about reftests
+ https://bugs.webkit.org/show_bug.cgi?id=101976
+
+ Reviewed by Ojan Vafai.
+
+ This is a first attempt at fixing this, sort of a "stop-the-bleeding"
+ fix. We will now look at the list of tests we're asked to rebaseline,
+ and log which ones are reftests into the status area, and rebaseline
+ the rest.
+
+ Longer-term, we should display feedback in the results area based on
+ which tests we're looking at. If the test list contains no reftests,
+ we should behave as today; if the list is all reftest, we should
+ probably disable the button, and if the list is a mix, we should
+ probably display an alert next to the button or something. It would
+ also be nice to annotate which tests were reftests, maybe with a
+ "(reftest)" next to the test name or something.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results.js:
+ (.):
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/results_unittests.js:
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ REGRESSION(r133380): new tests without expected file reported as failing tests on the bots
+ https://bugs.webkit.org/show_bug.cgi?id=101469
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix parsing of NRWT's output to identify missing results separately
+ from other regressions.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunWebKitTests._parseNewRunWebKitTestsOutput):
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+ (MasterCfgTest.test_nrwt_leaks_parsing):
+ (test_nrwt_missing_results):
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ buildbot: change run-webkit-tests --no-launch-safari to --no-show-results
+ https://bugs.webkit.org/show_bug.cgi?id=104299
+
+ Reviewed by Ryosuke Niwa.
+
+ Since --no-show-results is the more generically-named flag that NRWT uses.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunWebKitTests):
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ remove --use-remote-links-to-tests from buildbot configs (except apple win)
+ https://bugs.webkit.org/show_bug.cgi?id=104291
+
+ Reviewed by Csaba Osztrogonác.
+
+ This flag is ignored by NRWT and was just implemented for compatibility.
+ ORWT still uses it, though.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (RunWebKitTests):
+ (RunWebKitTests.start):
+
+2012-12-11 Anders Carlsson <andersca@apple.com>
+
+ ASSERT running platform/mac/plugins/convert-point.html on the WK2 bots
+ https://bugs.webkit.org/show_bug.cgi?id=104735
+
+ Reviewed by Jon Honeycutt.
+
+ Do the testing from within NPP_New instead of NPN_SetWindow. Plug-ins aren't supposed to do any real work inside NPP_SetWindow,
+ and doing so will more easily trigger the assertion failure. Ideally we should get rid of the initial sync painting pass, but this
+ gets the test passing again!
+
+ * DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp:
+ (ConvertPoint::NPP_New):
+
+2012-12-11 Julie Parent <jparent@chromium.org>
+
+ Dashboard unit tests should not make xhrs.
+ https://bugs.webkit.org/show_bug.cgi?id=104598
+
+ Reviewed by Dirk Pranke.
+
+ The unit test were requesting 25 files that they did not use.
+ Stub out loader.request to avoid making the xhrs.
+ Result: order of magnitude speed improvement in test run time (from ~1600ms to 160ms on my machine).
+
+ * TestResultServer/static-dashboards/run-embedded-unittests.html:
+ * TestResultServer/static-dashboards/run-unittests.html:
+
+2012-12-11 Filip Pizlo <fpizlo@apple.com>
+
+ Profiler should show bytecode dumps as they would have been visible to the JITs, including the profiling data that the JITs would see
+ https://bugs.webkit.org/show_bug.cgi?id=104647
+
+ Reviewed by Oliver Hunt.
+
+ Added a "profiling" (or "p") command to show the profiling data that the JITs saw
+ for each JIT compilation of a code block.
+
+ Also added instruction counts in the "full" display and made the "full" display the
+ default thing you see.
+
+ * Scripts/display-profiler-output:
+
+2012-12-11 Eric Seidel <eric@webkit.org>
+
+ Unreviewed, rolling out r137371.
+ http://trac.webkit.org/changeset/137371
+ https://bugs.webkit.org/show_bug.cgi?id=104434
+
+ Various scripts are not ready for out/ as the build directory,
+ this can't work as written.
+
+ * Scripts/update-webkit:
+ * Scripts/webkitdirs.pm:
+ (buildChromium):
+
+2012-12-11 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed GTK build functionality fix.
+
+ Turns out the CSP feature was not enabled, that's why all the tests were failing.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-11 Eric Seidel <eric@webkit.org>
+
+ Make Ninja the default build system for build-webkit --chromium
+ https://bugs.webkit.org/show_bug.cgi?id=104434
+
+ Reviewed by Daniel Bates.
+
+ As far as I can tell, most Chromium developers are now using Ninja
+ as their default build system instead of the native Xcode/Visual Studio/Make.
+ This change makes Ninja the default for developers as well as all Chromium webkit bots.
+
+ Developers can pass --no-ninja to get the platform-native buildsystem instead of Ninja.
+ It's possible we may wish to make this a per-platform default, and have
+ Ninja only be the default for Mac/Linux.
+
+ There was a thread on webkit-dev discussing this change:
+ http://lists.webkit.org/pipermail/webkit-dev/2012-December/023113.html
+
+ * Scripts/update-webkit:
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: record the order and run times of all of the tests in a single file
+ https://bugs.webkit.org/show_bug.cgi?id=104184
+
+ Reviewed by Ryosuke Niwa.
+
+ Replace the N tests_run*.txt files that we output into
+ layout-test-results with a single packed JSON trie that contains
+ the test ordering and run statistics. This can eventually be uploaded
+ to the TestResultsServer to replace the times.json file we currently
+ upload as well, and will let us replay the results of a previous
+ run fairly deterministically.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (Worker.__init__):
+ (Worker.start):
+ (Worker._run_test):
+ (Worker.stop):
+ (Worker._clean_up_after_test):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._upload_json_files):
+ (Manager._copy_results_html_file):
+ (Manager):
+ (Manager._stats_trie):
+ (Manager._stats_trie._worker_number):
+ * Scripts/webkitpy/layout_tests/models/test_results.py:
+ (TestResult.__init__):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_missing_and_unexpected_results):
+ (MainTest.test_retrying_and_flaky_tests):
+ (EndToEndTest.test_end_to_end):
+ (EndToEndTest.test_reftest_with_two_notrefs):
+ (RebaselineTest.test_reset_results):
+ (RebaselineTest.test_missing_results):
+ (RebaselineTest.test_new_baseline):
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ check-webkit-style complaining about TestExpectations lines a patch didn't modify
+ https://bugs.webkit.org/show_bug.cgi?id=104687
+
+ Reviewed by Ojan Vafai.
+
+ Way back in bug 60466 / r86165, we changed the style checker
+ for TestExpectations to ensure that the entire file linted, not
+ just the lines modified by a patch, in order to ensure that a
+ new line didn't cause errors elsewhere in the file (e.g., by
+ introducing duplicate lines). At the time, errors in the
+ expectations files were fatal and we didn't have a separate step
+ on the bots that would lint the files to ensure things were still
+ okay, so this was probably the right thing to do, but it could
+ cause some patches to fail the style check even though the patches
+ themselves were fine.
+
+ However, now errors aren't always fatal, and we have a separate build
+ step to lint the files. So, we should probably not punish the
+ patches and the style checker should filter out "unrelated" errors.
+
+ In theory we should be comparing the output pre- and post-patch
+ to filter out pre-existing errors, but I don't think the style
+ checker has that ability.
+
+ * Scripts/webkitpy/style/checkers/test_expectations.py:
+ (TestExpectationsChecker.__init__):
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+ (TestExpectationsTestCase.assert_lines_lint):
+
+2012-12-11 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt isn't rejecting unrecognized expectations
+ https://bugs.webkit.org/show_bug.cgi?id=104701
+
+ Reviewed by Ojan Vafai.
+
+ NRWT is silently ignoring unrecognized expectations like "Text"
+ and "Audio" (largely because I haven't fully removed support for
+ the old syntax and keywords and restructured the code to do the
+ proper checking). Temporarily change the tokenizer to reject
+ unrecognized expectations until I can make those changes.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectationParser._tokenize_line):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (ExpectationSyntaxTests.test_unknown_expectation):
+ (TestExpectationSerializationTests.disabled_test_string_whitespace_stripping):
+
+2012-12-11 Martin Robinson <mrobinson@igalia.com>
+
+ Fix a typo in my previous commit that is causing test failures.
+
+ Reviewed by Gustavo Noronha Silva.
+
+ There was an extra bit of statement appended after the end of a conditional. Somehow
+ this compiled and caused test failures.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (continuousMouseScrollByCallback):
+
+2012-12-11 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Spurious stderr output from the event sender
+ https://bugs.webkit.org/show_bug.cgi?id=104678
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Eliminate some spurious stderr output from the EventSender by using an early return
+ instead of an assertion that prints a warning to the console.
+
+ * DumpRenderTree/gtk/EventSender.cpp:
+ (continuousMouseScrollByCallback): We don't support continuous scroll events that
+ move by page, but we should just fail silently instead of printing an error.
+
+2012-12-11 Joone Hur <joone.hur@intel.com>
+
+ [GTK] Add GraphicsLayerActor
+ https://bugs.webkit.org/show_bug.cgi?id=91940
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Add GraphicsLayerActor to the list of classes that contain GObjects
+ in the style checker script so that it does not complain about GObject
+ coding style.
+
+ * Scripts/webkitpy/style/checker.py:
+
+2012-12-11 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] remove hack which avoids unused .obj directories all over the place
+
+ Reviewed by Simon Hausmann.
+
+ The feature is subject to upstreaming in Qt itself in
+ https://codereview.qt-project.org/#change,42011
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-12-11 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] move SQLITE3SRCDIR assignment to only use site
+
+ Reviewed by Simon Hausmann.
+
+ Target.pri includes WebCore.pri the almost first thing, so that is
+ covered as well.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-12-11 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] delete dead include paths
+
+ Reviewed by Simon Hausmann.
+
+ followup to https://bugs.webkit.org/show_bug.cgi?id=93446
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+
+2012-12-11 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Implement some missing FrameLoaderClient message in DRT
+ https://bugs.webkit.org/show_bug.cgi?id=104444
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Install a FrameLoadEvent callback that prints the necessary output for some
+ missing FrameLoader events.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (frameLoadEventCallback): Added.
+ (createWebView): Install the FrameLoader event callback.
+
+2012-12-11 Oswald Buddenhagen <oswald.buddenhagen@digia.com>
+
+ [Qt] change setup of QMAKE_MOC
+
+ Reviewed by Simon Hausmann.
+
+ don't load(moc) explicitly - turns out that this breaks
+ debug_and_release builds (the feature does not like being loaded before
+ default_post has been loaded).
+ so instead just do a minimal call to find the moc executable.
+
+ as it's in fact only two files which need it, so de-centralize this call
+ for the sake of saving some cpu cycles spent in qmake.
+
+ * WebKitTestRunner/InjectedBundle/DerivedSources.pri:
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-12-11 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Fix the linking of debug builds on Mac with force_static_libs_as_shared
+ https://bugs.webkit.org/show_bug.cgi?id=104559
+
+ Reviewed by Tor Arne Vestbø.
+
+ "contains(libraries, $$TARGET): return(true)" fails for intermediate libraries since
+ at this point TARGET may contain the "_debug" suffix.
+
+ Fix it by moving the TARGET adjustment later in the file.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-12-11 Martin Robinson <mrobinson@igalia.com>
+
+ [Coverity] [GTK] Remove some redundant null checks in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=104570
+
+ Reviewed by Daniel Bates.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (descriptionSuitableForTestResult): Remove a redundant null check.
+
+2012-12-11 Alberto Garcia <agarcia@igalia.com>
+
+ Remove unused GErrors
+ https://bugs.webkit.org/show_bug.cgi?id=104657
+
+ Reviewed by Martin Robinson.
+
+ Replace unused GErrors with null pointers.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (initializeFonts):
+ * DumpRenderTree/gtk/EditingCallbacks.cpp:
+ (dumpRange):
+ * WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp:
+ (WTR::inititializeFontConfigSetting):
+
+2012-12-11 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Bump the jhbuild libsoup version to fix an authentication issue
+ https://bugs.webkit.org/show_bug.cgi?id=104448
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Bump the libsoup version to one from the git repository. This requires updating
+ GLib as well which in turn requires adjusting the CFLAGS we pass when compiling
+ the scanobj step of the gtkdoc generation.
+
+ * gtk/generate-gtkdoc:
+ * gtk/jhbuild.modules:
+
+2012-12-11 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed functionality fix for the GTK port.
+
+ Enable the MicroData feature support for the GTK port in the FeatureList module.
+ This feature listing now again affects which features are enabled and which disabled
+ on the development builds of the GTK port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-11 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] MiniBrowser is not built
+ https://bugs.webkit.org/show_bug.cgi?id=104629
+
+ Reviewed by Gyuyoung Kim.
+
+ As we are finding an elementary package in Tools/MiniBrowser/efl/CMakeList.txt since r137203,
+ we need to check if the package is found in the same place not in the Tools/CMakeList.txt.
+
+ * CMakeLists.txt:
+ * MiniBrowser/efl/CMakeLists.txt:
+
+2012-12-11 Xabier Rodriguez Calvar <calvaris@igalia.com>
+
+ [GTK][jhbuild] Switch to GStreamer 1.0 build
+ https://bugs.webkit.org/show_bug.cgi?id=91727
+
+ Reviewed by Philippe Normand.
+
+ Switch build-webkit --gtk to GStreamer 1.0 support and build the
+ necessary GStreamer git modules from JHBuild.
+
+ * gtk/jhbuild.modules: Added GStreamer 1.0.3 build support.
+
+2012-12-11 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Feature enabling/disabling should be possible through build-webkit
+ https://bugs.webkit.org/show_bug.cgi?id=99271
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Refactor the code in webkitdirs.pm that builds an autotools project to generate
+ autogen.sh arguments, make arguments and installation prefix from the passed-in
+ parameters rather than generating all of that in build-webkit. The autogen.sh
+ arguments now contain only enable/disable flags for options that are actually
+ configurable in configure.ac, the flag value actually reflecting whether the feature
+ is enabled or disabled in the feature list.
+
+ Other features are overridable through modifying the GNUmakefile.features.am file.
+ All these features are now stored in the build directory and upon change trigger
+ a rerun of the autogen.sh script, pretty much like the autogen.sh arguments do.
+
+ The override-feature-defines script is called by autogen.sh, before GNUmakefile.in is
+ generated when calling autoreconf. Its task is to copy the GNUmakefile.features.am.in
+ into GNUmakefile.features.am and modify it if there's a text file in the build directory
+ that contains all the feature defines the build-webkit script has written. If the build
+ is not done through build-webkit (and there's no file in build directory listing all the
+ feature defines) the script does not advance further from copying.
+
+ This approach is taken to overcome the rigidness of the automake system as it's impossible
+ to effectively generate and use GNUmakefile.features.am or even GNUmakefile.features file
+ after the autoreconf command execution in autogen.sh.
+
+ * Scripts/build-jsc:
+ (buildMyProject):
+ * Scripts/build-webkit:
+ * Scripts/webkitdirs.pm:
+ (runAutogenForAutotoolsProjectIfNecessary):
+ (mustReRunAutogen):
+ (buildAutotoolsProject):
+ (buildGtkProject):
+ * Scripts/webkitperl/FeatureList.pm: Update the features that are currently enabled in
+ Source/WebCore/GNUmakefile.features.am.in but aren't in the feature list.
+ * Scripts/webkitpy/style/checker.py: Source/WebCore/GNUmakefile.features.am.in is recognized
+ as a text file and tabulation errors are reported. Skip the file to suppress them.
+ * gtk/override-feature-defines: Added.
+ (copy_feature_defines_makefile):
+ (adjust_feature_defines_makefile):
+ (adjust_feature_defines_makefile.override_feature_define):
+ (override_feature_defines):
+
+2012-12-10 Yury Semikhatsky <yurys@chromium.org>
+
+ Memory instrumentation: make sure each edge is reported only once
+ https://bugs.webkit.org/show_bug.cgi?id=104630
+
+ Reviewed by Pavel Feldman.
+
+ Test that outgoing edges are reported only once if we come to the same
+ object twice: first by an address of a base class and then by a real address
+ of the object.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-12-10 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove WebCompositorOutputSurface implementations from DRT
+ https://bugs.webkit.org/show_bug.cgi?id=104046
+
+ Reviewed by Darin Fisher.
+
+ The classes are now provided through WebCompositorSupport.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createOutputSurface):
+ * DumpRenderTree/chromium/WebViewHostOutputSurface.cpp: Removed.
+ * DumpRenderTree/chromium/WebViewHostOutputSurface.h: Removed.
+ * DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp: Removed.
+ * DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h: Removed.
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ change --no-launch-safari to --no-show-results in scripts
+ https://bugs.webkit.org/show_bug.cgi?id=104298
+
+ Reviewed by Eric Seidel.
+
+ Since Safari only exists on the Apple ports, NRWT calls the
+ command line flag --[no-]show-results instead. This updates
+ the scripts to use the new flag (but not the buildbot config yet).
+
+ * Scripts/generate-coverage-data:
+ * Scripts/webkit-tools-completion.sh:
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: fix mapping of AUDIO onto FAIL when printing unexpected results
+ https://bugs.webkit.org/show_bug.cgi?id=104597
+
+ Reviewed by Ojan Vafai.
+
+ This was broken in the recent printer refactoring.
+
+ * Scripts/webkitpy/layout_tests/views/buildbot_results.py:
+ (BuildBotPrinter.print_unexpected_results.add_result.is_expected):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
+ (BuildBotPrinterTests.get_result):
+ (BuildBotPrinterTests.test_print_unexpected_results):
+ (BuildBotPrinterTests.test_print_unexpected_results.get_unexpected_results):
+ (BuildBotPrinterTests):
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ old-run-webkit-tests: add --show-results properly
+ https://bugs.webkit.org/show_bug.cgi?id=104608
+
+ Reviewed by Eric Seidel.
+
+ Rework r137219 / bug 104601 to use the correct perl idiom.
+
+ * Scripts/old-run-webkit-tests:
+
+2012-12-10 Aaron Colwell <acolwell@chromium.org>
+
+ Unreviewed. Adding Aaron Colwell to the contributor list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-10 Anders Carlsson <andersca@apple.com>
+
+ Remove WebKit2 tests on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=104607
+
+ Reviewed by Tim Horton.
+
+ Stop building WebKit2 tests and remove associated files.
+
+ * TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Removed.
+ * TestWebKitAPI/win/PlatformUtilitiesWin.cpp: Removed.
+ * TestWebKitAPI/win/PlatformWebViewWin.cpp: Removed.
+ * TestWebKitAPI/win/TestWebKitAPI.sln: Removed.
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj:
+ * TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj: Removed.
+ * TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops: Removed.
+ * TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj: Removed.
+ * TestWebKitAPI/win/WindowMessageObserver.h: Removed.
+ * TestWebKitAPI/win/copy-resources.cmd: Removed.
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ old-run-webkit-tests: support --no-show-results for compatibility w/ NRWT
+ https://bugs.webkit.org/show_bug.cgi?id=104601
+
+ Reviewed by Eric Siedel.
+
+ This flag is being added so we can move all of the calling scripts
+ over to using --no-show-results instead of --no-launch-safari.
+
+ * Scripts/old-run-webkit-tests:
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: use the default logic for skipping platform-specific tests for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=104403
+
+ Reviewed by Stephen White.
+
+ I thought I had fixed this a while ago, but the chromium port was
+ using custom logic to figure out which platform/* tests to run (or
+ skip) and as a result we were getting some odd behavior (like running
+ tests in chromium-linux on chromium-mac, but only when there was
+ an expectation listed for the test).
+
+ Ports are supposed to only run the tests found under their
+ baseline_search_path() by default.
+
+ Not writing a test for this; theoretically there shouldn't been a
+ test checking that the behavior for Chromium was *different* than
+ the other ports before.
+
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort._missing_symbol_to_skipped_tests):
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ fix regression in test-webkitpy after r137189
+ https://bugs.webkit.org/show_bug.cgi?id=104589
+
+ Reviewed by Eric Seidel.
+
+ Need to specify full port names.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_build_check):
+
+2012-12-10 Laszlo Gombos <l.gombos@samsung.com>
+
+ [EFL] Change the minimum required EFL version to 1.6
+ https://bugs.webkit.org/show_bug.cgi?id=104431
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Change the minimum required EFL version to 1.6 from 1.7.
+ The elementary EFL package is only required to build MiniBrowser,
+ so I moved the required only to the Minibrowser CMake file.
+
+ * MiniBrowser/efl/CMakeLists.txt: In addition removed
+ ENABLE_GLIB_SUPPORT as it is obsolete and it was always set to be on.
+
+2012-12-10 Dean Jackson <dino@apple.com>
+
+ Unreviewed. Adding Antoine to the contributor list so his name autocompletes in bugzilla.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-10 Zan Dobersek <zandobersek@gmail.com>
+
+ REGRESSION (r118735): svg/dom/complex-svgView-specification.html, svg/dom/SVGViewSpec.html, svg/dom/viewspec-parser.html failing on GTK Linux 64-bit Release
+ https://bugs.webkit.org/show_bug.cgi?id=87734
+
+ Reviewed by Martin Robinson.
+
+ When willSendRequest should return null in testing, cancel the SoupMessage
+ instead of setting the request's URI to about:blank.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (willSendRequestCallback):
+
+2012-12-10 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Move the test implementation of WebKit::WebPlugin to the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=104537
+
+ Reviewed by Tony Chang.
+
+ In order to hide implementation details from the public TestRunner API,
+ I moved the plugin to WebTestPluginImpl and added a static create
+ method to WebTestPlugin. Also, I renamed the plugin from TestWebPlugin
+ to WebTestPlugin to be more in line with other classes in the
+ TestRunner API.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestPlugin.h: Added.
+ (WebTestRunner):
+ (WebTestPlugin):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestPlugin.cpp: Renamed from Tools/DumpRenderTree/chromium/TestWebPlugin.cpp.
+ (WebTestRunner::WebTestPlugin::create):
+ (WebTestRunner):
+ (WebTestRunner::WebTestPlugin::WebTestPlugin):
+ (WebTestRunner::WebTestPlugin::~WebTestPlugin):
+ (WebTestRunner::WebTestPlugin::mimeType):
+ * DumpRenderTree/chromium/TestWebPlugin.h: Removed.
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createPlugin):
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ run_webkit_tests throws exception when DRT is not present
+ https://bugs.webkit.org/show_bug.cgi?id=104565
+
+ Reviewed by Jochen Eisinger.
+
+ Don't actually try to print the bot results if there aren't
+ any because we exited before running any tests.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (main):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_build_check):
+
+2012-12-10 Benjamin Poulain <benjamin@webkit.org>
+
+ Add convenience methods to use ListHashSet for a LRU cache
+ https://bugs.webkit.org/show_bug.cgi?id=104499
+
+ Reviewed by Sam Weinig.
+
+ Test the new methods added to ListHashSet.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/GNUmakefile.am:
+ * TestWebKitAPI/TestWebKitAPI.gypi:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WTF/ListHashSet.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch print-expectations doesn't work right for platforms w/ shared expectations
+ https://bugs.webkit.org/show_bug.cgi?id=104405
+
+ Reviewed by Eric Seidel.
+
+ If multiple ports shared a TestExpectations file, webkit-patch
+ print-expectations would use the expectation for the first port
+ using that file and print the result for all ports, rather than
+ re-parse and print each port separately (e.g., we might print
+ the chromium-linux expectation for a file for both chromium-linux
+ and chromium-mac). Discovered while testing/debugging the fix
+ for bug 104403.
+
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ (TestPort._skipped_tests_for_unsupported_features):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (lint):
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (PrintExpectations._model):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (PrintExpectationsTest.test_platform):
+
+2012-12-10 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: fix total number of tests computed in the result summary
+ https://bugs.webkit.org/show_bug.cgi?id=104061
+
+ Reviewed by Jochen Eisinger.
+
+ Good thing I left this open, because I actually broke it again
+ the same way in a merge. Fix the computation of the one_line_summary
+ again, and add tests for it (also clean up some redundant tests).
+
+ Also, add constants into the test port code so that the knowledge
+ of how many tests should fail and how is next to the list of tests,
+ rather than a totally different place.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.run_tests):
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ (TestList.__getitem__):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (get_test_results):
+ (MainTest.setUp):
+ (MainTest.test_basic):
+ (MainTest.test_run_singly_actually_runs_tests):
+ (MainTest.test_test_list_with_prefix):
+ (MainTest.test_missing_and_unexpected_results_with_custom_exit_code.CustomExitCodePort):
+ (MainTest.test_tolerance.ImageDiffTestPort):
+ (EndToEndTest.parse_full_results):
+
+2012-12-10 Mike West <mkwst@chromium.org>
+
+ Log to console when script is blocked by sandbox attributes.
+ https://bugs.webkit.org/show_bug.cgi?id=104365
+
+ Reviewed by Ojan Vafai.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest):
+ Ignoring the new console message in perftests, as it broke parsing
+ for the Parser/html-parser.html microbenchmark.
+
+2012-12-10 Filip Pizlo <fpizlo@apple.com>
+
+ JSC profiling and debug dump code should use inferred names when possible
+ https://bugs.webkit.org/show_bug.cgi?id=104519
+
+ Reviewed by Oliver Hunt.
+
+ The format I'm using for referring to a code block is now name#hash. For example,
+ v8-crypto has something called bnpSquareTo#B5QFbU. The profiler allows you to use
+ either the hash, the inferred name, or the combined hash and full name when referring
+ to blocks.
+
+ * Scripts/display-profiler-output:
+
+2012-12-09 Filip Pizlo <fpizlo@apple.com>
+
+ Profiler should say things about OSR exits
+ https://bugs.webkit.org/show_bug.cgi?id=104497
+
+ Reviewed by Oliver Hunt.
+
+ Adds support for displaying OSR exit information for full summary (just displays the
+ counts and the number of recompilations), bytecode display (says which bytecodes
+ exited), and DFG display (annotates disassembly with taken OSR exits and their
+ counts).
+
+ * Scripts/display-profiler-output:
+
+2012-12-10 Alexis Menard <alexis@webkit.org>
+
+ [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag.
+ https://bugs.webkit.org/show_bug.cgi?id=104539
+
+ Reviewed by Antonio Gomes.
+
+ As discussed on webkit-dev it is not needed to keep this feature flag
+ as support for <position> type is a small feature that is already
+ implemented by three other UAs. It was useful while landing this
+ feature as partial bits were landed one after one.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-12-10 Martin Robinson <mrobinson@igalia.com>
+
+ Build fix.
+
+ Add a patchfile missing from my previous commit.
+
+ * gtk/patches/harfbuzz-icu-detection-fix.patch: Added.
+
+2012-12-10 Martin Robinson <mrobinson@igalia.com>
+
+ REGRESSION(137127): Causes assertion failures on the debug bots
+ https://bugs.webkit.org/show_bug.cgi?id=104549
+
+ Reviewed by Alejandro G. Castro.
+
+ After handling the new TextOutput message we should return the method
+ handling messages received.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Fix a missing early return.
+
+2012-12-09 Gustavo Noronha Silva <gustavo.noronha@collabora.com>
+
+ [Soup] utilize multipart/x-mixed-replace support recently added to libsoup
+ https://bugs.webkit.org/show_bug.cgi?id=94515
+
+ Reviewed by Martin Robinson.
+
+ This change requires a very recent libsoup, so update our jhbuild
+ requirements.
+
+ * gtk/jhbuild.modules: depend on soup version that adds the multipart/x-mixed-replace
+ support
+ * efl/jhbuild.modules: ditto
+
+2012-12-10 Zoltan Nyul <zoltan.nyul@intel.com>
+
+ Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=103886
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner.
+ This API is required by layout tests.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setViewModeMediaFeature):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-12-10 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] Bring Harfbuzz-ng support to Gtk
+ https://bugs.webkit.org/show_bug.cgi?id=92098
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Add HarfBuzz dependency.
+
+ * GNUmakefile.am: Add FreeType/HarfBuzz CFLAGS to the WebCore Internals library.
+ * gtk/jhbuild.modules: Add HarfBuzz to the JHbuild and remove Pango, since it
+ should no longer affect layout test results.
+
+2012-12-10 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Use QLibraryInfo::LibraryExecutablesPath unconditionally
+ https://bugs.webkit.org/show_bug.cgi?id=104541
+
+ Reviewed by Jocelyn Turcotte.
+
+ We now depend on a Qt 5 version that is guaranteed to have this API, so we
+ can remove the configure checks for it.
+
+ * qmake/config.tests/libexecdir/libexecdir.cpp: Removed.
+ * qmake/config.tests/libexecdir/libexecdir.pro: Removed.
+ * qmake/mkspecs/features/features.prf:
+
+2012-12-10 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ REGRESSION(r135863): GtkLauncher --help no longer displays all help options
+ https://bugs.webkit.org/show_bug.cgi?id=104382
+
+ Reviewed by Philippe Normand.
+
+ Remove gst_init() because it steals the GOptionContext.
+ gst_init_get_option_group() already does the initialization job.
+
+ * GtkLauncher/main.c:
+ (main):
+
+2012-12-10 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK][WTR] Implement AccessibilityUIElement::titleUIElement
+ https://bugs.webkit.org/show_bug.cgi?id=102953
+
+ Reviewed by Martin Robinson.
+
+ Implement AccessibilityUIElement::titleUIElement in the ATK backend
+ in the same manner it is implemented in DumpRenderTree. Both implementations
+ are updated to unref the relation set before the final function return
+ rather than at the end of each loop through the relations held in the said
+ relation set.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::titleUIElement):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::AccessibilityUIElement::titleUIElement):
+
+2012-12-10 Martin Robinson <mrobinson@igalia.com>
+
+ Fix the WebKit2 debug build
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Fix a typo of WKStringGetTypeID().
+
+2012-12-10 Martin Robinson <mrobinson@igalia.com>
+
+ [WTR] Move text output accumulation to the UIProcess
+ https://bugs.webkit.org/show_bug.cgi?id=104214
+
+ Reviewed by Darin Adler.
+
+ Instead of accumulating text output in the InjectedBundle and then sending it to the UIProcess
+ once a test is finished, immediately send any text output to the UIProcess. This will allow
+ WebKitTestRunner to output text from the UIProcess as well.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: Remove the handling of the text output
+ StringBuilder. Add a method to send output to the UIProcess.
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Change code that appends to the StringBuilder
+ to use the new outputText method.
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Ditto.
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: Ditto.
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::TestInvocation): Intialize the StringBuilder.
+ (WTR::TestInvocation::invoke): Clear the StringBuilder when a new tests starts.
+ (WTR::TestInvocation::dumpResults): m_textOutput is a StringBuilder now so the
+ method of printing the text is slightly different.
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Handle the new TextOutput
+ message by appending the results to the StringBuilder.
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation): Switch the type of m_textOutput.
+
+2012-12-10 Mihnea Ovidenie <mihnea@adobe.com>
+
+ Unreviewed. Adding Mihai Maerean to the list of contributors, working on CSSRegions.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-10 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] accessibility/language-attribute.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98369
+
+ Reviewed by Chris Fleizach.
+
+ The test is failing for two reasons: Not exposing the language
+ for accessible objects and AccessibilityUIElement::language() not
+ being implemented.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::language): Implemented.
+
+2012-12-10 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] accessibility/editable-webarea-context-menu-point.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98364
+
+ Reviewed by Chris Fleizach.
+
+ The test is failing because the clickPoint values remain unchanged. The
+ values remain unchanged because ATK lacks a means to keep track of this
+ information.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::clickPointX): Added comment that ATK doesn't have clickPoint details
+ (AccessibilityUIElement::clickPointY): Added comment that ATK doesn't have clickPoint details
+
+2012-12-09 Alejandro Piñeiro <apinheiro@igalia.com>
+
+ [GTK] lack of implemention of AccessibilityUIElementGtk::isSelectable and AccessibilityUIElementGtk::isMultiSelectable
+ https://bugs.webkit.org/show_bug.cgi?id=104481
+
+ Reviewed by Martin Robinson.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::isSelectable): Implement this by checking
+ the current state of the AtkObject.
+ (AccessibilityUIElement::isMultiSelectable): Implement this by
+ checking the current state of the AtkObject.
+
+2012-12-09 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] accessibility/placeholder.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98373
+
+ Reviewed by Martin Robinson.
+
+ The test was failing because the placeholder text was not supported and
+ AccessibilityUIElement::stringAttributeValue() was not implemented.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (coreAttributeToAtkAttribute): New convenience method to convert WebCore attribute
+ names into AtkObject attribute names
+ (AccessibilityUIElement::stringAttributeValue): implemented
+
+2012-12-09 Dan Winship <danw@gnome.org>
+
+ [GTK] Bump libxml2 requirement in jhbuild.modules
+ https://bugs.webkit.org/show_bug.cgi?id=104477
+
+ Reviewed by Martin Robinson.
+
+ Fedora 18's Apache depends on symbols in libxml2 2.9.0, so the
+ tests won't run if we only have libxml2 2.8.0 installed in the
+ jhbuild root.
+
+ * gtk/jhbuild.modules:
+
+2012-12-09 Zan Dobersek <zandobersek@gmail.com>
+
+ Remove testRunner.disableImageLoading()
+ https://bugs.webkit.org/show_bug.cgi?id=98083
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Remove the disableImageLoading methods and callback.
+ No tests use the method anymore and all ports except Wx
+ now support this behavior through overriding the
+ WebKitDisplayImagesKey preference.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::overridePreference): Add support for overriding the
+ WebKitDisplayImagesKey preference which is now the preferred way
+ of disabling image loading.
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+
+2012-12-09 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] accessibility/label-for-control-hittest.html is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98368
+
+ Reviewed by Martin Robinson.
+
+ The test was failing because AccessibilityUIElement::elementAtPoint was
+ not implemented.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (AccessibilityUIElement::elementAtPoint): implemented
+
+2012-12-09 Jon Lee <jonlee@apple.com>
+
+ [WK2] Move button image to injected bundle
+ https://bugs.webkit.org/show_bug.cgi?id=104107
+ <rdar://problem/12813842>
+
+ Reviewed by Simon Fraser.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::InjectedBundlePage): Update the bundle page UI client.
+
+2012-12-08 Halton Huo <halton.huo@intel.com>
+
+ [CMake] Add CMake style checker
+ https://bugs.webkit.org/show_bug.cgi?id=104240
+
+ Reviewed by Eric Seidel.
+
+ The CMake style checker is followed by existing style checkers like cpp, python.
+ Unit test is added as well.
+
+ * Scripts/webkitpy/style/checker.py: Use CMakeChecker CMAKE type files(.cmake or CMakeLists.txt)
+ (FileType):
+ (CheckerDispatcher._file_type):
+ (CheckerDispatcher._create_checker):
+ * Scripts/webkitpy/style/checkers/cmake.py: Added.
+ (CMakeChecker):
+ (CMakeChecker.__init__):
+ (CMakeChecker.check):
+ (CMakeChecker._process_line):
+ (CMakeChecker._check_trailing_whitespace):
+ (CMakeChecker._check_no_space_cmds):
+ (CMakeChecker._check_one_space_cmds):
+ (CMakeChecker._check_non_lowercase_cmd):
+ (CMakeChecker._check_indent):
+ * Scripts/webkitpy/style/checkers/cmake_unittest.py: Added.
+ (CMakeCheckerTest):
+ (CMakeCheckerTest.test_init):
+ (CMakeCheckerTest.test_init._mock_handle_style_error):
+ (CMakeCheckerTest.test_check):
+ (CMakeCheckerTest.test_check._mock_handle_style_error):
+
+2012-12-08 Kondapally Kalyan <kalyan.kondapally@intel.com>
+
+ [EFL] Enable WebGL by default.
+ https://bugs.webkit.org/show_bug.cgi?id=102991.
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enable WebGL by default.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-07 Scott Violet <sky@chromium.org>
+
+ [chromium] Remove linux theme related files and switch to default
+ https://bugs.webkit.org/show_bug.cgi?id=103897
+
+ Reviewed by Dimitri Glazkov.
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest): linux->default
+
+2012-12-07 Mike Lattanzio <mlattanzio@rim.com>
+
+ [BlackBerry] Update BlackBerry Port to use new Graphics::createBuffer BufferType enum values.
+ https://bugs.webkit.org/show_bug.cgi?id=104121
+
+ Reviewed by Rob Buis.
+
+ Update createBuffer call to reflect new BufferType enum.
+ Internal PR 254649
+ Internal Review: Jakob Petsovits
+
+ DRT is always backed for maximum compatibility.
+
+ * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
+ (createBitmapContextFromWebView):
+
+2012-12-07 Jochen Eisinger <jochen@chromium.org>
+
+ Add 'CHROMIUM_DEVEL_SANDBOX' to the environment variables to copy for layout test drivers
+ https://bugs.webkit.org/show_bug.cgi?id=104355
+
+ Reviewed by Dirk Pranke.
+
+ This enables chromium's content_shell driver to run with the full SUID
+ sandbox.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.to.setup_environ_for_server):
+
+2012-12-07 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL] Fix tools for WebKit2-only builds
+ https://bugs.webkit.org/show_bug.cgi?id=103904
+
+ Reviewed by Laszlo Gombos.
+
+ The libewebkit2.so should be used for library path for EFL WebKit2.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName):
+
+2012-12-07 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - Update implementation of TestRunner.setCustomPolicyDelegate()
+ https://bugs.webkit.org/show_bug.cgi?id=104243
+
+ RIM PR 259337
+
+ Reviewed by Rob Buis.
+
+ 1. Implement calculation of navigation originating in
+ didDecidePolicyForNavigationAction().
+ 2. Implement policy delegate for resource response.
+ 3. Enable customPolicyDelegate if waitForPolicyDelegate() is called.
+ 4. Minor optional updates in dump() and dumpFrameLoadCallbacks().
+
+ The patch fixed the following tests:
+ - http/tests/download
+ - fast/forms/mailto/formenctype-attribute-button-html.html
+ - fast/forms/mailto/formenctype-attribute-input-html.html
+ - fast/encoding/mailto-always-utf-8.html
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::DumpRenderTree):
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ (BlackBerry::WebKit::DumpRenderTree::dump):
+ (BlackBerry::WebKit::DumpRenderTree::didFinishLoadForFrame):
+ (BlackBerry::WebKit::DumpRenderTree::didDecidePolicyForNavigationAction):
+ (BlackBerry::WebKit::DumpRenderTree::didDecidePolicyForResponse):
+ (BlackBerry::WebKit::DumpRenderTree::setCustomPolicyDelegate):
+ * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
+ (DumpRenderTree):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::setCustomPolicyDelegate):
+ (TestRunner::waitForPolicyDelegate):
+ (TestRunner::overridePreference):
+
+2012-12-07 Gwang Yoon Hwang <ryumiel@company100.net>
+
+ [Qt] Adjust library name in layout_tests/port/qt.py after Qt5-r40
+ https://bugs.webkit.org/show_bug.cgi?id=104348
+
+ Reviewed by Csaba Osztrogonác.
+
+ After Qt-5.0.0-r40, the library was renamed from QtWebKitWidgets to
+ Qt5WebKitWidgets. run-webkit-tests were still looking for QtWebKitWidgets
+
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._path_to_webcore_library):
+
+2012-12-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed fix, unbreak run-launcher after library renaming.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName):
+
+2012-12-06 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed fix after r136896, unbreak --debug-rwt to make bots result verbose again.
+ https://bugs.webkit.org/show_bug.cgi?id=104296
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (main):
+
+2012-12-06 Rick Byers <rbyers@chromium.org>
+
+ CSS cursor property should support webkit-image-set
+ https://bugs.webkit.org/show_bug.cgi?id=99493
+
+ Reviewed by Beth Dakin.
+
+ Add ENABLE_MOUSE_CURSOR_SCALE - disabled by default
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-12-06 Vivek Galatage <vivek.vg@samsung.com>
+
+ Unreviewed. Fixing the email address order to work correctly with bugzilla.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-06 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] when forwarding events through the WebPluginContainer, create a UserGestureIndicator if processing a user gesture
+ https://bugs.webkit.org/show_bug.cgi?id=104306
+
+ Reviewed by Dimitri Glazkov.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::TestWebPlugin):
+ (TestWebPlugin::handleInputEvent): add support for printing the user gesture status
+ * DumpRenderTree/chromium/TestWebPlugin.h:
+ (TestWebPlugin):
+
+2012-12-06 Dirk Pranke <dpranke@chromium.org>
+
+ new-run-webkit-tests --lint-test-files seems to be broken
+ https://bugs.webkit.org/show_bug.cgi?id=104296
+
+ Unreviewed, build fix.
+
+ My recent refactoring caused me to not initialize the printer
+ before calling lint(); this patch restructures the code to make
+ the lint routine self-contained and do all the work necessary.
+ This will also make it easier to move this code out into a standalone
+ file.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (lint):
+ (main):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (LintTest.test_all_configurations):
+ (LintTest.test_lint_test_files):
+ (LintTest.test_lint_test_files__errors):
+
+2012-12-05 Filip Pizlo <fpizlo@apple.com>
+
+ DFG profiler should be helpful about gem installation
+ https://bugs.webkit.org/show_bug.cgi?id=104217
+
+ Reviewed by Oliver Hunt.
+
+ 'json' and 'highline' are not installed by default on the ruby distributions with
+ which I am familiar, and the default error messages don't make me happy. This makes
+ display-profiler-output print a helpful message if those gems are not found.
+
+ * Scripts/display-profiler-output:
+
+2012-12-05 Filip Pizlo <fpizlo@apple.com>
+
+ Profiler should print a helpful message if you pass the wrong arguments
+ https://bugs.webkit.org/show_bug.cgi?id=104222
+
+ Reviewed by Oliver Hunt.
+
+ * Scripts/display-profiler-output:
+
+2012-12-06 Ojan Vafai <ojan@chromium.org>
+
+ Allow for CCing a secondary email address from watchlists
+ https://bugs.webkit.org/show_bug.cgi?id=104286
+
+ Reviewed by Dirk Pranke.
+
+ Change my watchlist CC address so I can filter these separately from
+ when people explicitly CC me and update the watchlist parser to allow that.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+ * Scripts/webkitpy/common/watchlist/watchlistparser.py:
+ (WatchListParser._validate):
+ * Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py:
+ (WatchListParserTest.test_cc_rule_with_invalid_email):
+ (WatchListParserTest.test_cc_rule_with_secondary_email):
+
+2012-12-06 Max Vujovic <mvujovic@adobe.com>
+
+ Unreviewed. Add myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-06 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL] [WK2] fast/dom/vertical-scrollbar-in-rtl.html makes fast/regions tests flaky
+ https://bugs.webkit.org/show_bug.cgi?id=104139
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Resize the window back to 800x600 between tests.
+ This should be a no-op if the test did not resize the window.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2012-12-06 Tommy Widenflycht <tommyw@google.com>
+
+ Speech Recognition API: Change the error code to a string on SpeechRecognitionError
+ https://bugs.webkit.org/show_bug.cgi?id=104254
+
+ Reviewed by Adam Barth.
+
+ Changes the mock error function to take a string instead of an int.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::setMockSpeechRecognitionError):
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
+ (WebTestRunner::ErrorTask::ErrorTask):
+ (MockWebSpeechRecognizer::setError):
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
+ (MockWebSpeechRecognizer):
+
+2012-12-06 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt][Mac] Fix libxslt and libxml2 config tests
+ https://bugs.webkit.org/show_bug.cgi?id=104164
+
+ Reviewed by Simon Hausmann.
+
+ We should not use pkg-config on Mac instead use direct include
+ paths and add needed libraries to the linker options to detect
+ libxslt and libxml2 provided by the system.
+ Previously we would always fall back to qtxmlpatterns.
+
+ * qmake/config.tests/libxml2/libxml2.pro:
+ * qmake/config.tests/libxslt/libxslt.pro:
+
+2012-12-06 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Fix the build if the path contains "+" character
+ https://bugs.webkit.org/show_bug.cgi?id=104120
+
+ Reviewed by Tor Arne Vestbø.
+
+ The second parameter of qmake's replace() is regular expression, so
+ we have to escape special characters in paths passed to replace().
+
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/default_pre.prf:
+ * qmake/mkspecs/features/functions.prf:
+
+2012-12-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r136825.
+ http://trac.webkit.org/changeset/136825
+ https://bugs.webkit.org/show_bug.cgi?id=104251
+
+ It made 100+ test fail on Qt-WK2 pixel bot, and 1800+ test
+ flakey on Qt-WK2 non-pixel bot (Requested by Ossy on #webkit).
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2012-12-06 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL] [WK2] fast/dom/vertical-scrollbar-in-rtl.html makes fast/regions tests flaky
+ https://bugs.webkit.org/show_bug.cgi?id=104139
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Resize the window back to 800x600 between tests.
+ This should be a no-op if the test did not resize the window.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2012-12-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r136784 and r136802.
+ http://trac.webkit.org/changeset/136784
+ http://trac.webkit.org/changeset/136802
+ https://bugs.webkit.org/show_bug.cgi?id=104231
+
+ breaks chromium canary (Requested by morrita on #webkit).
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest):
+
+2012-12-05 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add myself to watch changes in PerformanceTests/*.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-12-05 Shinya Kawanaka <shinyak@chromium.org>
+
+ [Chromium] DRT on Windows crashes when a testcase has a progress element in indeterminate state
+ https://bugs.webkit.org/show_bug.cgi?id=102459
+
+ Reviewed by Dimitri Glazkov.
+
+ Since WebThemeControlDRTWin::markState does not consider indeterminate state, DRT caused a crash.
+
+ * DumpRenderTree/chromium/WebThemeControlDRTWin.cpp:
+ (WebThemeControlDRTWin::markState):
+
+2012-12-05 Filip Pizlo <fpizlo@apple.com>
+
+ DFG profiler should be able to display where a code block was inlined into, and what it inlined
+ https://bugs.webkit.org/show_bug.cgi?id=104216
+
+ Reviewed by Oliver Hunt.
+
+ Added an "inlines" command that shows the inline stacks that a code block participated
+ in. Also cleaned up some of the ways we print compilation units.
+
+ * Scripts/display-profiler-output:
+
+2012-12-05 Halton Huo <halton.huo@intel.com>
+
+ [CMake] Unify coding style for CMake files
+ https://bugs.webkit.org/show_bug.cgi?id=103605
+
+ Reviewed by Laszlo Gombos.
+
+ Update cmake files(.cmake, CMakeLists.txt) with following style rules:
+ 1. Indentation
+ 1.1 Use spaces, not tabs.
+ 1.2 Four spaces as indent.
+ 2. Spacing
+ 2.1 Place one space between control statements and their parentheses.
+ For eg, if (), else (), elseif (), endif (), foreach (),
+ endforeach (), while (), endwhile (), break ().
+ 2.2 Do not place spaces between function and macro statements and
+ their parentheses. For eg, macro(), endmacro(), function(),
+ endfunction().
+ 2.3 Do not place spaces between a command or function or macro and its
+ parentheses, or between a parenthesis and its content. For eg,
+ message("testing") not message( "testing") or message ("testing" )
+ 2.4 No space at line ending.
+ 3. Lowercase when call commands macros and functions. For eg,
+ add_executable() not ADD_EXECUTABLE(), set() not SET().
+
+ * CMakeLists.txt:
+ * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+ * DumpRenderTree/efl/CMakeLists.txt:
+ * EWebLauncher/CMakeLists.txt:
+ * EWebLauncher/ControlTheme/CMakeLists.txt:
+ * MiniBrowser/efl/CMakeLists.txt:
+ * TestWebKitAPI/CMakeLists.txt:
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * WebKitTestRunner/CMakeLists.txt:
+ * WebKitTestRunner/PlatformEfl.cmake:
+ * WinCELauncher/CMakeLists.txt:
+ * clang/ReportMemoryUsagePlugin/CMakeLists.txt:
+
+2012-12-05 Scott Violet <sky@chromium.org>
+
+ [chromium] Remove linux theme related files and switch to default
+ https://bugs.webkit.org/show_bug.cgi?id=103897
+
+ Reviewed by Tony Chang.
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest): linux->default
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: run_webkit_tests_integrationtest.py depends on being able to share a port w/ between master and worker
+ https://bugs.webkit.org/show_bug.cgi?id=78168
+
+ Reviewed by Ojan Vafai.
+
+ This patch adds a single ordered list to ResultSummary that contains
+ the results of every test run in order of result received, and
+ modifies the TestResults class to contain the list of references used
+ for each test as well as the pid of the driver; this allows us to stop
+ having to override the test drivers to record the tests, and makes the
+ integration tests that test rdering, retries, restarts, etc. black-box
+ tests.
+
+ * Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
+ (SingleTestRunner._run_rebaseline):
+ (SingleTestRunner._compare_output):
+ (SingleTestRunner._run_reftest):
+ (SingleTestRunner._compare_output_with_reference):
+ * Scripts/webkitpy/layout_tests/models/result_summary.py:
+ (ResultSummary.__init__):
+ (ResultSummary.add):
+ * Scripts/webkitpy/layout_tests/models/test_results.py:
+ (TestResult.__init__):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (DriverOutput.__init__):
+ (Driver.run_test):
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ (TestDriver):
+ (TestDriver.__init__):
+ (TestDriver.run_test):
+ (TestDriver.stop):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (get_tests_run):
+ (get_test_batches):
+ (get_test_results):
+ (MainTest.test_batch_size):
+ (MainTest.test_dryrun):
+ (MainTest.test_natural_order):
+ (MainTest.test_natural_order_test_specified_multiple_times):
+ (MainTest.test_random_order):
+ (MainTest.test_random_order_test_specified_multiple_times):
+ (MainTest.test_no_order):
+ (MainTest.test_no_order_test_specified_multiple_times):
+ (MainTest.test_no_order_with_directory_entries_in_natural_order):
+ (MainTest.test_repeat_each):
+ (MainTest.test_ignore_flag):
+ (MainTest.test_skipped_flag):
+ (MainTest.test_iterations):
+ (MainTest.test_run_chunk):
+ (MainTest.test_run_part):
+ (MainTest.test_run_singly):
+ (MainTest.test_skip_failing_tests):
+ (MainTest.test_single_file):
+ (MainTest.test_single_file_with_prefix):
+ (MainTest.test_single_skipped_file):
+ (MainTest.test_test_list):
+ (MainTest.test_test_list_with_prefix):
+ (MainTest.test_exit_after_n_failures):
+ (MainTest.test_exit_after_n_crashes):
+ (MainTest.test_run_order__inline):
+ (MainTest.test_reftest_run):
+ (MainTest.test_reftest_run_reftests_if_pixel_tests_are_disabled):
+ (MainTest.test_reftest_skip_reftests_if_no_ref_tests):
+ (MainTest.test_reftest_expected_html_should_be_ignored):
+ (MainTest.test_reftest_driver_should_run_expected_html):
+ (MainTest.test_reftest_driver_should_run_expected_mismatch_html):
+ (MainTest.test_no_http_tests):
+ (MainTest.test_platform_tests_are_found):
+
+2012-12-05 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Make WebCompositorOutputSurface an empty class when USE_CC_OUTPUT_SURFACE is defined.
+ https://bugs.webkit.org/show_bug.cgi?id=103967
+
+ Reviewed by James Robinson.
+
+ Use the WebCompositorSupport methods to create an OutputSurface. If they
+ fail, then fall back to the WebViewHost methods.
+
+ Once the chromium side lands, the WebCompositorSupport methods will stop
+ failing, and will replace the WebViewHost ones.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::createOutputSurface):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: split all of the buildbot-specific output into its own file
+ https://bugs.webkit.org/show_bug.cgi?id=104165
+
+ Reviewed by Ojan Vafai.
+
+ Now that we have the RunDetails object we can move all of the
+ buildbot-specific knowledge out of the core test-running code
+ and into the outermost run_webkit_tests layer.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (run):
+ (main):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (passing_run):
+ (logging_run):
+ (run_and_capture):
+ (MainTest.test_all):
+ (MainTest.test_max_locked_shards):
+ (MainTest.test_child_processes_2):
+ (MainTest.test_child_processes_min):
+ (MainTest.test_full_results_html):
+ (MainTest.test_hung_thread):
+ (MainTest.test_keyboard_interrupt):
+ (MainTest.test_no_tests_found):
+ (MainTest.test_no_tests_found_2):
+ (MainTest.test_repeat_each_iterations_num_tests):
+ (MainTest.test_run_singly_actually_runs_tests):
+ (MainTest.test_test_list):
+ (MainTest.test_unexpected_failures):
+ (MainTest.test_missing_and_unexpected_results):
+ (MainTest.test_pixel_test_directories):
+ (MainTest.test_missing_and_unexpected_results_with_custom_exit_code):
+ (MainTest.test_crash_with_stderr):
+ (MainTest.test_no_image_failure_with_image_diff):
+ (MainTest.test_crash_log):
+ (MainTest.test_web_process_crash_log):
+ (MainTest.test_exit_after_n_failures_upload):
+ (MainTest.test_results_directory_absolute):
+ (MainTest.test_results_directory_default):
+ (MainTest.test_results_directory_relative):
+ (MainTest.test_retrying_and_flaky_tests):
+ (MainTest.test_reftest_should_not_use_naming_convention_if_not_listed_in_reftestlist):
+ (MainTest.test_output_diffs):
+ (MainTest.test_unsupported_platform):
+ (MainTest.test_verbose_in_child_processes):
+ (EndToEndTest.test_end_to_end):
+ (EndToEndTest.test_reftest_with_two_notrefs):
+ (RebaselineTest.test_reset_results):
+ (RebaselineTest.test_missing_results):
+ (RebaselineTest.test_new_baseline):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results.py: Added.
+ (BuildBotPrinter):
+ (BuildBotPrinter.__init__):
+ (BuildBotPrinter.print_results):
+ (BuildBotPrinter._print):
+ (BuildBotPrinter.print_result_summary):
+ (BuildBotPrinter._print_result_summary_entry):
+ (BuildBotPrinter.print_unexpected_results):
+ (BuildBotPrinter.print_unexpected_results.add_to_dict_of_lists):
+ (BuildBotPrinter.print_unexpected_results.add_result):
+ * Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py: Added.
+ (BuildBotPrinterTests):
+ (BuildBotPrinterTests.assertEmpty):
+ (BuildBotPrinterTests.assertNotEmpty):
+ (BuildBotPrinterTests.get_printer):
+ (BuildBotPrinterTests.get_result):
+ (BuildBotPrinterTests.get_result_summary):
+ (BuildBotPrinterTests.test_print_unexpected_results):
+ (BuildBotPrinterTests.test_print_unexpected_results.get_unexpected_results):
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer):
+ (Printer.__init__):
+ (Printer.print_results):
+ (Printer._print_statistics_for_test_timings):
+ (Printer._print_baseline):
+ (Printer._print_debug):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.get_printer):
+ (Testprinter.get_result):
+ (Testprinter.test_configure_and_cleanup):
+ (Testprinter.test_print_config):
+ (Testprinter.test_print_one_line_summary):
+ (Testprinter.test_test_status_line):
+ (Testprinter.test_details):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: collect all of the information about a run into a new RunDetails class
+ https://bugs.webkit.org/show_bug.cgi?id=104158
+
+ Reviewed by Ojan Vafai.
+
+ This patch collects the information from both test passes (the
+ main one and the retries) as well as the summarized results and
+ the exit code into a RunDetails class, so that the integration
+ tests can more easily tell what happened.
+
+ Also, change the way the --lint-test-files works slightly so that
+ we don't need to create a printer object (and hence we need to
+ rework the tests that are testing logging).
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (RunDetails):
+ (RunDetails.__init__):
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (run):
+ (main):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (passing_run):
+ (run_and_capture):
+ (LintTest.test_lint_test_files):
+ (LintTest.test_lint_test_files__errors):
+ (MainTest.test_verbose_in_child_processes):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: remove --no-record-results
+ https://bugs.webkit.org/show_bug.cgi?id=104072
+
+ Reviewed by Ojan Vafai.
+
+ The command line flag was only being used in the unit tests and
+ wasn't really needed once we started using a mock filesystem.
+
+ Also, reformat a bunch of long lines ...
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (parse_args):
+ (passing_run):
+ (logging_run):
+ (MainTest.test_repeat_each_iterations_num_tests):
+ (MainTest.test_test_list):
+ (MainTest.test_missing_and_unexpected_results):
+ (MainTest.test_pixel_test_directories):
+ (MainTest.test_missing_and_unexpected_results_with_custom_exit_code):
+ (MainTest.test_crash_with_stderr):
+ (MainTest.test_no_image_failure_with_image_diff):
+ (MainTest.test_crash_log):
+ (MainTest.test_web_process_crash_log):
+ (MainTest.test_exit_after_n_failures_upload):
+ (MainTest.test_results_directory_absolute):
+ (MainTest.test_results_directory_relative):
+ (MainTest.test_reftest_should_not_use_naming_convention_if_not_listed_in_reftestlist):
+ (MainTest.test_additional_expectations):
+ (MainTest.test_output_diffs):
+ (EndToEndTest.test_end_to_end):
+ (EndToEndTest.test_reftest_with_two_notrefs):
+ (RebaselineTest.test_reset_results):
+ (RebaselineTest.test_missing_results):
+ (RebaselineTest.test_new_baseline):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: only summarize the results one way
+ https://bugs.webkit.org/show_bug.cgi?id=104064
+
+ Reviewed by Ojan Vafai.
+
+ Change manager.summarize_results so that we always (and only)
+ include both expected and unexpected results. Previously we
+ would summarize the results twice, once with expected results
+ and once without. This made the code much more confusing than
+ it needed to be.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (summarize_results):
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ResultSummaryTest.summarized_results):
+ (ResultSummaryTest.test_no_svn_revision):
+ (ResultSummaryTest.test_svn_revision):
+ (ResultSummaryTest.test_summarized_results_wontfix):
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.print_results):
+ (Printer._print_unexpected_results):
+ (Printer._print_unexpected_results.add_result):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.test_print_unexpected_results.get_unexpected_results):
+ (Testprinter):
+
+2012-12-05 Filip Pizlo <fpizlo@apple.com>
+
+ DFG profiler should display more information
+ https://bugs.webkit.org/show_bug.cgi?id=104163
+
+ Reviewed by Gavin Barraclough.
+
+ Added the following:
+
+ - Distinguish between source counts and bytecode counts.
+
+ - Add a "full" summary view that shows both kinds of counts, plus inline counts.
+
+ - Add a "source" command to see the source.
+
+ - Add a "bytecode" command to see the bytecode and counts.
+
+ * Scripts/display-profiler-output:
+
+2012-12-05 Yong Li <yoli@rim.com>
+
+ [BlackBerry] Build with libjpegturbo
+ https://bugs.webkit.org/show_bug.cgi?id=104152
+
+ Reviewed by Rob Buis.
+
+ RIM PR# 196975.
+ Make sure the right include path for libjpeg is included.
+
+ * Scripts/webkitdirs.pm:
+ (blackberryCMakeArguments):
+
+2012-12-05 Joseph Pecoraro <pecoraro@apple.com>
+
+ Remove stale check in check-for-webkit-framework-include-consistency
+ https://bugs.webkit.org/show_bug.cgi?id=103775
+
+ Reviewed by David Kilzer.
+
+ The underlying issue was fixed in r81173.
+
+ * Scripts/check-for-webkit-framework-include-consistency:
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: simplify the finding of tests to retry
+ https://bugs.webkit.org/show_bug.cgi?id=104067
+
+ Reviewed by Ryosuke Niwa.
+
+ I think this makes the code a little clearer; note that
+ we were no longer using the include_missing flag.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.run):
+ (Manager._failed_test_names):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: remove two unused parameters from a function
+ https://bugs.webkit.org/show_bug.cgi?id=104059
+
+ Reviewed by Ryosuke Niwa.
+
+ Also remove an old, stale FIXME.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (interpret_test_failures):
+ (summarize_results):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ResultSummaryTest.test_interpret_test_failures):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: return result_summaries from LayoutTestRunner.run_tests()
+ https://bugs.webkit.org/show_bug.cgi?id=104051
+
+ Reviewed by Ojan Vafai.
+
+ This patch completes the refactoring that makes the result summary
+ an object returned from the layout test runner, rather than having
+ it passed in and modified. This makes the split of duties between
+ the manager and runner clearer and makes the data flow more
+ functionally.
+
+ Also clean up some minor lint issues.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.__init__):
+ (LayoutTestRunner.run_tests):
+ (LayoutTestRunner._mark_interrupted_tests_as_skipped):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (FakePrinter.print_expected):
+ (LockCheckingRunner.__init__):
+ (LayoutTestRunnerTests._runner):
+ (LayoutTestRunnerTests._run_tests):
+ (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.__init__):
+ (Manager.run):
+ (Manager._run_tests):
+
+2012-12-05 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: move creation of the resultsummary objects into Manager._run_tests()
+ https://bugs.webkit.org/show_bug.cgi?id=104048
+
+ Reviewed by Ojan Vafai.
+
+ This is a preparatory step to making the resultsummary just get
+ returned from the layout_test_runner; this does most of manager-side
+ changes.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._prepare_lists):
+ (Manager.run):
+ (Manager._run_tests):
+
+2012-12-05 Leo Yang <leoyang@rim.com>
+
+ [BlackBerry] Enable CSS_IMAGE_RESOLUTION
+ https://bugs.webkit.org/show_bug.cgi?id=104132
+
+ Reviewed by Yong Li.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-05 Filip Pizlo <fpizlo@apple.com>
+
+ JSC profiler should not count executions of op_call_put_result because doing so changes DFG codegen
+ https://bugs.webkit.org/show_bug.cgi?id=104102
+
+ Reviewed by Oliver Hunt.
+
+ Modify the profiler to not output counts for op_call_put_result, since there
+ won't be any. Also fix a few weird bugs, like providing better error reporting
+ when you type something incorrectly and not reporting counts for slow paths
+ in the old JIT since those counts are actually not what you think they are
+ (we don't actually count slow path executions separately).
+
+ * Scripts/display-profiler-output:
+
+2012-12-05 Andras Becsi <andras.becsi@digia.com>
+
+ Fix compilation for Qt5.0.0 stable branch.
+ https://bugs.webkit.org/show_bug.cgi?id=103870
+
+ Reviewed by Simon Hausmann.
+
+ Fix the use of renamed QWindow functions.
+ Patch by Andras Becsi <andras.becsi@digia.com>
+
+ * MiniBrowser/qt/BrowserWindow.cpp:
+ (BrowserWindow::BrowserWindow):
+ (BrowserWindow::onTitleChanged):
+ * MiniBrowser/qt/raw/View.cpp:
+ (View::View):
+
+2012-12-05 Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+ [WK2] InjectedBundle should check Intent url for null
+ https://bugs.webkit.org/show_bug.cgi?id=104117
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ WKIntentServiceInfoCopyHref() can return null, we need to check
+ for that in InjectedBundlePage::registerIntentServiceForFrame()
+ to avoid crashing.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::registerIntentServiceForFrame):
+
+2012-12-04 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ Change email address of Jonathan Dong
+ https://bugs.webkit.org/show_bug.cgi?id=103976
+
+ Unreviewed, change my email address from jonathan.dong@torchmobile.com.cn
+ to jonathan.dong.webkit@gmail.com in committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-04 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - Tests under "dumpAsText" directory should be dumped as text
+ https://bugs.webkit.org/show_bug.cgi?id=103986
+
+ Reviewed by Rob Buis.
+
+ Also move declaration of webSettingTransaction to before any WebSettings
+ ::setXXX() calls so that it works as expected (commit only once in the
+ function scope).
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (shouldDumpAsText):
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+
+2012-12-04 Filip Pizlo <fpizlo@apple.com>
+
+ display-profiler-output should be able to show source code
+ https://bugs.webkit.org/show_bug.cgi?id=104073
+
+ Reviewed by Oliver Hunt.
+
+ Display source code in the summary, using a one-line shortening.
+
+ * Scripts/display-profiler-output:
+
+2012-12-04 Filip Pizlo <fpizlo@apple.com>
+
+ display-profiler-output should not use reflective infocation to resolve command names
+
+ Rubber stamped by Mark Hahnenberg.
+
+ Reflection is amazing, but here it was just kind of a bit much.
+
+ * Scripts/display-profiler-output:
+
+2012-12-02 Filip Pizlo <fpizlo@apple.com>
+
+ JSC should be able to report profiling data associated with the IR dumps and disassembly
+ https://bugs.webkit.org/show_bug.cgi?id=102999
+
+ Reviewed by Gavin Barraclough.
+
+ Added a tool that allows you to grok the output from JSC's new profiler. Currently,
+ this still gets confused a bit about the execution counts of a method running
+ standalone versus a method running inlined, but other than that, it's pretty cool.
+ See the attached "sampling profiling session" attached to the bug to see it in
+ action.
+
+ Also had to feed EFL's build system.
+
+ * DumpRenderTree/efl/CMakeLists.txt:
+ * Scripts/display-profiler-output: Added.
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: fix total number of tests computed in the result summary
+ https://bugs.webkit.org/show_bug.cgi?id=104061
+
+ Unreviewed, build fix.
+
+ One of the recent changes to the resultsummary refactoring caused
+ us to not include the number of skipped tests in the total number
+ of tests, throwing off the totals printed in print_one_line_summary().
+
+ Unfortunately, given the current state of the code it is difficult
+ to construct an accurate unit test for this. I have verified the
+ fix by hand, and will write a test once the remaining refactoring
+ patches land, at which point it will be trivial to test it.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._prepare_lists):
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt is not returning the exit status properly
+ https://bugs.webkit.org/show_bug.cgi?id=103830
+
+ Unreviewed, build fix.
+
+ The fix in r136474 wasn't quite right either, and would return
+ the correct exceptional status, but not the correct failing status.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: make paths and test_names passed arguments in Manager._prepare_lists et al
+ https://bugs.webkit.org/show_bug.cgi?id=104047
+
+ Reviewed by Eric Seidel.
+
+ The code becomes cleaner if we are just passing values around rather
+ than hanging them off the manager object, helps move _prepare_lists()
+ to a pure function, and is needed to eventually make the
+ result_summary object something returned from runner.run_tests()
+ (note that two more patches are needed for that to happen).
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.__init__):
+ (Manager._http_tests):
+ (Manager._prepare_lists):
+ (Manager.needs_servers):
+ (Manager._set_up_run):
+ (Manager.run):
+ (Manager._run_tests):
+ (Manager._upload_json_files):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ManagerTest.test_needs_servers.get_manager):
+ (ManagerTest.test_needs_servers):
+ (ManagerTest.integration_test_needs_servers.get_manager):
+ (ManagerTest.integration_test_needs_servers):
+ (ManagerTest.test_look_for_new_crash_logs.get_manager):
+ (ManagerTest):
+ (ManagerTest.test_look_for_new_crash_logs):
+ * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
+ (JSONLayoutResultsGenerator.__init__):
+ (JSONLayoutResultsGenerator._get_modifier_char):
+
+2012-12-04 Adam Barth <abarth@webkit.org>
+
+ commit-queue can get stuck with a local commit
+ https://bugs.webkit.org/show_bug.cgi?id=104032
+
+ Reviewed by Dirk Pranke.
+
+ Previously the commit-queue would only clean down to HEAD. If the
+ commit-queue gets interrupted in the middle of a commit (e.g., after
+ the local commit but before the dcommit), then it can end up with a
+ patch locally committed. That patch will then prevent the commit-queue
+ from functioning.
+
+ This patch teaches the commit-queue to clean down to the merge base,
+ which will remove any local commits.
+
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git.working_directory_is_clean):
+ (Git.clean_working_directory):
+ * Scripts/webkitpy/tool/commands/roll_unittest.py:
+ * Scripts/webkitpy/tool/steps/commit.py:
+ (Commit._commit_warning):
+ (Commit.run):
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: store only the total number of tests in the result summary
+ https://bugs.webkit.org/show_bug.cgi?id=103963
+
+ Reviewed by Ryosuke Niwa.
+
+ The result summary only needs the total number of tests that will
+ be run (including repetitions) in order to provide the correct stats;
+ it doesn't actually need to know how many unique tests there are, or
+ or how many repetitions there are.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (LayoutTestRunnerTests._result_summary):
+ (LayoutTestRunnerTests.test_update_summary_with_result):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._prepare_lists):
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ManagerTest.test_look_for_new_crash_logs):
+ (ResultSummaryTest.get_result_summary):
+ * Scripts/webkitpy/layout_tests/models/result_summary.py:
+ (ResultSummary.__init__):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.get_result_summary):
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: do less work when ctrl-c'ed
+ https://bugs.webkit.org/show_bug.cgi?id=103961
+
+ Reviewed by Ryosuke Niwa.
+
+ Do less work when we are ctrl-c'ed, because the statistics aren't
+ that useful anyway. While we're at it, modify summarize_results
+ to be aware that we don't always retry results (instead of pretending
+ that the retry produced the same results the initial run did).
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (summarize_results):
+ (Manager.run):
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: result summaries should not require a list of tests to skip
+ https://bugs.webkit.org/show_bug.cgi?id=103951
+
+ Reviewed by Ryosuke Niwa.
+
+ We shouldn't really be passing a list of tests to skip to the
+ ResultSummary objects; they should be handled like any other
+ test result as much as possible.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (LayoutTestRunnerTests._result_summary):
+ (LayoutTestRunnerTests.test_update_summary_with_result):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._prepare_lists):
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ManagerTest.test_look_for_new_crash_logs):
+ (ResultSummaryTest.get_result_summary):
+ * Scripts/webkitpy/layout_tests/models/result_summary.py:
+ (ResultSummary.__init__):
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.get_result_summary):
+
+2012-12-04 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: derive per-thread, per-worker stats from result summaries
+ https://bugs.webkit.org/show_bug.cgi?id=103943
+
+ Reviewed by Ojan Vafai.
+
+ This patch changes the manager and printing code to pull more
+ information from the ResultSummary object rather than tracking
+ additional statistics on the side. This allows us to consolidate
+ a bunch of logic and remove a bunch of free-floating lists and dicts of
+ of values. We add the shard_name and worker_name to each TestResult,
+ and then modify print_timing_statistics() and upload_json_files()
+ to just need the result summaries.
+
+ Note that this patch also changes the timing statistics slightly
+ so that the individual test times are the times to run just the
+ tests themselves (TestResult.test_run_time) and do not include the
+ times taken to run the ref tests, compute diffs, etc. The aggregated
+ per-worker and per-shard statistics still use the total time to
+ process each test (TestResult.total_run_time).
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.__init__):
+ (LayoutTestRunner.run_tests):
+ (LayoutTestRunner._handle_finished_test_list):
+ (LayoutTestRunner._handle_finished_test):
+ (Worker.handle):
+ (Worker._run_test):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (summarize_results):
+ (Manager.run):
+ (Manager._upload_json_files):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ResultSummaryTest.summarized_results):
+ * Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
+ (JSONLayoutResultsGenerator.__init__):
+ (JSONLayoutResultsGenerator._get_test_timing):
+ * Scripts/webkitpy/layout_tests/models/test_results.py:
+ (TestResult.__init__):
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.print_results):
+ (Printer._print_timing_statistics):
+ (Printer):
+ (Printer._print_worker_statistics):
+ (Printer._print_aggregate_test_statistics):
+ (Printer._print_individual_test_times):
+ (Printer._print_directory_timings):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.test_print_unexpected_results.get_unexpected_results):
+ (Testprinter):
+
+2012-12-04 Adam Barth <abarth@webkit.org>
+
+ Remove obsolete code from webkitpy
+ https://bugs.webkit.org/show_bug.cgi?id=104029
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+ (CommitQueueTask.run):
+ * Scripts/webkitpy/tool/steps/commit.py:
+ (Commit.options):
+ * Scripts/webkitpy/tool/steps/options.py:
+ (Options):
+
+2012-12-04 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move WebPreferences and methods for modifying them to the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=103841
+
+ Reviewed by Darin Fisher.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebPreferences.h: Renamed from Tools/DumpRenderTree/chromium/WebPreferences.h.
+ (WebKit):
+ (WebTestRunner):
+ (WebPreferences):
+ (WebTestRunner::WebPreferences::WebPreferences):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner):
+ (WebTestDelegate):
+ (WebTestRunner::WebTestDelegate::localFileToDataURL):
+ (WebTestRunner::WebTestDelegate::rewriteLayoutTestsURL):
+ (WebTestRunner::WebTestDelegate::preferences):
+ (WebTestRunner::WebTestDelegate::applyPreferences):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner::TestRunner::setUserStyleSheetEnabled):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setUserStyleSheetLocation):
+ (WebTestRunner::TestRunner::setAuthorAndUserStylesEnabled):
+ (WebTestRunner::TestRunner::setPopupBlockingEnabled):
+ (WebTestRunner::TestRunner::setJavaScriptCanAccessClipboard):
+ (WebTestRunner::TestRunner::setXSSAuditorEnabled):
+ (WebTestRunner::TestRunner::setAllowUniversalAccessFromFileURLs):
+ (WebTestRunner::TestRunner::setAllowFileAccessFromFileURLs):
+ (WebTestRunner::TestRunner::overridePreference):
+ (WebTestRunner::TestRunner::setPluginsEnabled):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/WebPreferences.cpp: Renamed from Tools/DumpRenderTree/chromium/WebPreferences.cpp.
+ (WebTestRunner::WebPreferences::reset):
+ (WebTestRunner):
+ (WebTestRunner::WebPreferences::applyTo):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::preferences):
+ (TestShell):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::localFileToDataURL):
+ (WebViewHost::rewriteLayoutTestsURL):
+ (WebViewHost::preferences):
+ (WebViewHost::applyPreferences):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-12-04 Zan Dobersek <zandobersek@gmail.com>
+
+ Many webkitpy unit tests can be run standalone, are executable
+ https://bugs.webkit.org/show_bug.cgi?id=103900
+
+ Reviewed by Eric Seidel.
+
+ There's no need anymore to run unit tests in standalone mode as they
+ are now handled by test-webkitpy in a formidable fashion. This makes
+ it possible for this patch to remove the following unnecessary bits:
+ - remove shebang lines from unit test files,
+ - remove calls to unittest.main(),
+ - make unit test files non-executable.
+
+ * Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
+ (DiffParserTest.test_git_mnemonicprefix):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (GitTestWithMock.test_push_local_commits_to_server_without_username_and_with_password):
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest.test_should_build):
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_chromium_xvfb_port):
+ * Scripts/webkitpy/common/find_files_unittest.py:
+ (TestWinNormalize.test_win):
+ * Scripts/webkitpy/common/lru_cache_unittest.py:
+ (LRUCacheTest.test_set_again):
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ (test_results_zip_url):
+ * Scripts/webkitpy/common/net/credentials_unittest.py:
+ (test_keyring_without_git_repo_nor_keychain):
+ * Scripts/webkitpy/common/net/omahaproxy_unittest.py:
+ (OmahaProxyTest.test_get_revisions):
+ * Scripts/webkitpy/common/net/unittestresults_unittest.py:
+ * Scripts/webkitpy/common/newstringio_unittest.py:
+ (NewStringIOTest.test_with):
+ * Scripts/webkitpy/common/read_checksum_from_png_unittest.py:
+ (ReadChecksumFromPngTest.test_read_checksum):
+ * Scripts/webkitpy/common/system/file_lock_integrationtest.py:
+ * Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
+ (MockFileSystemTest.test_normpath):
+ * Scripts/webkitpy/common/system/filesystem_unittest.py:
+ (RealFileSystemTest.test_sep):
+ * Scripts/webkitpy/common/system/platforminfo_unittest.py:
+ (TestPlatformInfo.test_total_bytes_memory):
+ * Scripts/webkitpy/common/system/zipfileset_unittest.py:
+ (ZipFileSetTest.test_namelist):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ * Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
+ (TestResultWriterTest.test_reftest_diff_image):
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py:
+ (JSONGeneratorTest.test_test_timings_trie):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (TestExpectationSerializationTests.test_string_whitespace_stripping):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (KeyCompareTest.test_test_key):
+ * Scripts/webkitpy/layout_tests/port/builders_unittest.py:
+ (BuildersTest.test_path_from_name):
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ (ChromiumAndroidTwoPortsTest.test_options_with_two_ports):
+ * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py:
+ (ChromiumLinuxPortTest.test_path_to_image_diff):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_path_to_image_diff):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortLoggingTest.test_check_sys_deps):
+ * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+ (ChromiumPortLoggingTest.test_check_sys_deps):
+ * Scripts/webkitpy/layout_tests/port/config_unittest.py:
+ (ConfigTest.test_default_configuration__scripterror):
+ * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+ (DriverTest.test_start_actually_starts):
+ * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+ (FactoryTest.test_get_from_builder_name):
+ * Scripts/webkitpy/layout_tests/port/http_lock_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/image_diff_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ * Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (PortTest.disabled_test_mac_lion):
+ * Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py:
+ * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
+ (VerboseTest.test_log_args):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (test_details):
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPerfTestFactory.test_inspector_test):
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (test_parse_args):
+ * Scripts/webkitpy/style/checker_unittest.py:
+ * Scripts/webkitpy/style/checkers/changelog_unittest.py:
+ (ChangeLogCheckerTest.test_no_error):
+ * Scripts/webkitpy/style/checkers/common_unittest.py:
+ (TabCheckerTest.test_tab):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppCheckerTest.test_ne):
+ * Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:
+ * Scripts/webkitpy/style/checkers/png_unittest.py:
+ (PNGCheckerTest.test_check):
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+ * Scripts/webkitpy/style/checkers/text_unittest.py:
+ (TextCheckerTest.test_init):
+ * Scripts/webkitpy/style/checkers/watchlist_unittest.py:
+ * Scripts/webkitpy/style/checkers/xcodeproj_unittest.py:
+ (XcodeProjectFileCheckerTest.test_detect_development_region):
+ * Scripts/webkitpy/style/checkers/xml_unittest.py:
+ (XMLCheckerTest.test_no_error):
+ * Scripts/webkitpy/style/patchreader_unittest.py:
+ * Scripts/webkitpy/test/finder_unittest.py:
+ (FinderTest.test_paths):
+ * Scripts/webkitpy/test/runner_unittest.py:
+ (RunnerTest.test_run):
+ * Scripts/webkitpy/test/skip_unittest.py:
+ (SkipTest.test_skip_if_true):
+ * Scripts/webkitpy/thirdparty/__init___unittest.py:
+ (ThirdpartyTest.test_imports):
+ * Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py:
+ (TestTranslation.test_include_rewriting):
+ * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
+ (QueueEngineTest.tearDown):
+ * Scripts/webkitpy/tool/grammar_unittest.py:
+ (GrammarTest.test_join_with_separators):
+ * Scripts/webkitpy/tool/mocktool_unittest.py:
+ (MockOptionsTest.test_kwarg__set):
+ * Scripts/webkitpy/tool/multicommandtool_unittest.py:
+ (test_command_help):
+
+2012-12-04 Zan Dobersek <zandobersek@gmail.com>
+
+ Many webkitpy module files are executable, have shebang line
+ https://bugs.webkit.org/show_bug.cgi?id=103985
+
+ Reviewed by Dirk Pranke.
+
+ Remove the executable bit from webkitpy module files that are
+ unnecessarily executable. Remove the shebang line from webkitpy
+ module files, they are of no use. Only non-third-party files are
+ changed.
+
+ * Scripts/webkitpy/bindings/main.py:
+ * Scripts/webkitpy/common/config/watchlist:
+ * Scripts/webkitpy/common/find_files.py:
+ * Scripts/webkitpy/common/lru_cache.py:
+ * Scripts/webkitpy/common/multiprocessing_bootstrap.py:
+ * Scripts/webkitpy/common/net/file_uploader.py:
+ * Scripts/webkitpy/common/newstringio.py:
+ * Scripts/webkitpy/common/read_checksum_from_png.py:
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ * Scripts/webkitpy/common/system/file_lock.py:
+ * Scripts/webkitpy/common/system/file_lock_mock.py:
+ * Scripts/webkitpy/common/version_check.py:
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ * Scripts/webkitpy/layout_tests/models/test_failures.py:
+ * Scripts/webkitpy/layout_tests/models/test_input.py:
+ * Scripts/webkitpy/layout_tests/port/__init__.py:
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ * Scripts/webkitpy/layout_tests/port/config.py:
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ * Scripts/webkitpy/layout_tests/port/http_lock.py:
+ * Scripts/webkitpy/layout_tests/port/image_diff.py:
+ * Scripts/webkitpy/layout_tests/port/mock_drt.py:
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
+ * Scripts/webkitpy/layout_tests/servers/http_server.py:
+ * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
+ * Scripts/webkitpy/layout_tests/servers/websocket_server.py:
+ * Scripts/webkitpy/layout_tests/views/metered_stream.py:
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ * Scripts/webkitpy/style/checkers/changelog.py:
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ * Scripts/webkitpy/style/checkers/xcodeproj.py:
+ * Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py:
+ (main): There's no need to run this module in standalone because
+ it's wrapped by the Tools/Scripts/update-webgl-conformance-tests script.
+ * Scripts/webkitpy/tool/commands/upload.py:
+ * Scripts/webkitpy/tool/comments.py:
+ * Scripts/webkitpy/tool/main.py:
+
+2012-12-04 Ryosuke Niwa <rniwa@webkit.org>
+
+ Add a Chromium Android Release (Perf) to the list of perf. bots.
+
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2012-12-04 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Insert the jhbuild wrapper command at the beginning of the command list
+ https://bugs.webkit.org/show_bug.cgi?id=103991
+
+ Reviewed by Martin Robinson.
+
+ Insert the Tools/gtk/run-with-jhbuild wrapper at the beginning of the
+ command that's being formed in multiprocessing bootstrap. The wrapper is
+ an executable Python script while the command being wrapped perhaps isn't
+ and therefore requires the Python interpreter to be listed at the beginning
+ of the command sublist that is then executed by the wrapper.
+
+ Specifically, the webkitpy/layout_tests/run_webkit_tests.py module file
+ is about to lose the executable bit and the Python-signaling shebang line.
+ The Jhbuild wrapper simply executes the command that's passed, but that errs
+ in this case unless the Python executable is executed and the module file
+ is passed to it as an argument.
+
+ * Scripts/webkitpy/common/multiprocessing_bootstrap.py:
+ (run):
+
+2012-12-04 Peter Beverloo <peter@chromium.org>
+
+ Add the Chromium Android Release (Perf) bot
+ https://bugs.webkit.org/show_bug.cgi?id=103891
+
+ Reviewed by Eric Seidel.
+
+ Add configuration for the bot itself. It will be triggered by the Chromium
+ Android Release builder. When running for Android, the DownloadAndPerfTest
+ factory will also add the OutputAndroidDeviceStatus step.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (DownloadAndPerfTestFactory.__init__):
+
+2012-12-04 Peter Beverloo <peter@chromium.org>
+
+ [Chromium] The ChromiumAndroidDriver constructor should not rely on adb being available
+ https://bugs.webkit.org/show_bug.cgi?id=103758
+
+ Reviewed by Eric Seidel.
+
+ Lazily initialize the adb command parameters rather than initializing it in the
+ constructor now that there is an assert if adb is not available on the system and
+ we're not in a Chromium Android checkout.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver._push_file_if_needed):
+ (ChromiumAndroidDriver._run_adb_command):
+ (ChromiumAndroidDriver.cmd_line):
+ (ChromiumAndroidDriver._start_once):
+ (ChromiumAndroidDriver._read_prompt):
+ (ChromiumAndroidDriver):
+ (ChromiumAndroidDriver._adb_command):
+
+2012-12-03 Ryosuke Niwa <rniwa@webkit.org>
+
+ Dromaeo should report individual test result
+ https://bugs.webkit.org/show_bug.cgi?id=99800
+
+ Reviewed by Eric Seidel.
+
+ Ignore subtest results spit out by Dromaeo tests.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest): Added a line to ignore.
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (MainTest.test_parse_output_with_subtests): Added.
+
+2012-12-03 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed, functionality fix after r136437.
+
+ Calling sys.exit actually raises a SystemExit exception that
+ is then handled in the second block and causes the script to
+ return an 'exceptional' exit code rather than the code presenting
+ the number of failed tests.
+
+ This is just a temporary fix to get the faultless bots green while
+ they are unnecessarily red at the moment. The problem and a proper
+ fix will be properly addressed.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+
+2012-12-03 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r136460.
+ http://trac.webkit.org/changeset/136460
+ https://bugs.webkit.org/show_bug.cgi?id=103958
+
+ This patch caused compile error when building DumpRenderTree
+ (Requested by tasak on #webkit).
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest):
+
+2012-12-03 Scott Violet <sky@chromium.org>
+
+ [chromium] Remove linux theme related files and switch to default
+ https://bugs.webkit.org/show_bug.cgi?id=103897
+
+ Reviewed by Darin Fisher.
+
+ * Scripts/webkitpy/common/config/build_unittest.py:
+ (ShouldBuildTest): linux->default
+
+2012-12-03 Roger Fong <roger_fong@apple.com>
+
+ Disable WebKit2 API tests on Apple Windows port.
+ https://bugs.webkit.org/show_bug.cgi?id=103929.
+
+ Reviewed by Timothy Horton.
+
+ * Scripts/run-api-tests:
+ (runTestsBySuite):
+
+2012-12-03 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy's run_webkit_tests should initialize the printer earlier on
+ https://bugs.webkit.org/show_bug.cgi?id=103661
+
+ Reviewed by Eric Seidel.
+
+ Initialize the printer before computing the derived options
+ from the command line arguments, so that we can safely log from
+ port methods.
+
+ Also clean up a few miscellaneous lint warnings.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort.path_to_adb):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.default_child_processes):
+ (MacPort.sample_process):
+ (MacPort.start_helper):
+ (MacPort.stop_helper):
+ (MacPort.nm_command):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (test_default_child_processes):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (run):
+ (_set_up_derived_options):
+
+2012-12-03 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: autoinstaller is failing on windows
+ https://bugs.webkit.org/show_bug.cgi?id=103699
+
+ Reviewed by Tony Chang.
+
+ Attempt to fix the python autoinstaller to work for pylint on win32
+ again ... it turns out one of the dependent packages contains
+ a write-protected test file and windows will choke when it tries to move
+ it into place. Fortunately we can just delete the file prior to
+ installing it in the final location, but we have to jump through
+ a couple of hoops to do so.
+
+ Also, make sure that we're flattening nested module names like
+ "logilab/common" into either safe basenames (logilab_common) or
+ host-specific subdirs (logilab\common) as needed.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._url_downloaded_path):
+ (AutoInstaller._install):
+ (AutoInstaller.install):
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook._install_pylint):
+
+2012-12-03 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: clean up exception propagation / handling for interrupts and early exits
+ https://bugs.webkit.org/show_bug.cgi?id=103830
+
+ Reviewed by Ojan Vafai.
+
+ The code for propagating early exits out of the test run was
+ convoluted and hard to follow. By adjusting the WorkerException to
+ derive from BaseException rather than Exception (which is a fair
+ way of representing an error that was really unexpected/unrecoverable
+ anyway) and pushing the TestRunInterruptedException into the
+ ResultSummary (which is also fair since it was more of a result
+ than an exception) this allows us to consolidate and clean up
+ a bunch of the try/catch logic and pass fewer state flags around.
+
+ There are no real functional changes to this patch; there's an
+ API change in that we stop exporting TestRunInterruptedException
+ and WorkerException out of the Manager, and the existence of the
+ MessagePool is now completely hidden.
+
+ * Scripts/webkitpy/common/message_pool.py:
+ (WorkerException):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.run_tests):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (summarize_results):
+ (Manager.run):
+ * Scripts/webkitpy/layout_tests/controllers/manager_unittest.py:
+ (ResultSummaryTest.summarized_results):
+ * Scripts/webkitpy/layout_tests/models/result_summary.py:
+ (ResultSummary.__init__):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (run):
+ (main):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_exception_raised.of):
+ (MainTest.test_exception_raised):
+ (MainTest.test_run_force):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.test_print_unexpected_results.get_unexpected_results):
+ (Testprinter):
+
+2012-12-03 Julien BRIANCEAU <jbrianceau@nds.com>
+
+ Add Qt/SH4 build slave to build.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=103384
+
+ Reviewed by Csaba Osztrogonác.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2012-12-03 Alexis Menard <alexis@webkit.org>
+
+ Enable CSS3 background-position offset by default
+ https://bugs.webkit.org/show_bug.cgi?id=103917
+
+ Reviewed by Benjamin Poulain.
+
+ Even though each port may enable or not the feature we still need
+ to pass it at configure time otherwise it will be disabled.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-12-03 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ Unreviewed. Adding myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-12-03 Laszlo Gombos <l.gombos@samsung.com>
+
+ [CMake] Enable building WebKit2-only build for the EFL port
+ https://bugs.webkit.org/show_bug.cgi?id=103820
+
+ Reviewed by Gyuyoung Kim.
+
+ Set ENABLE_WEBKIT2 to OFF if build-webkit was run with --no-webkit2.
+ Never set ENABLE_WEBKIT in build-webkit. This will simplyfy invoking
+ cmake directly. Initialize $cmakeArgs to avoid potential
+ warnings when running the script.
+
+ * Scripts/build-webkit:
+
+2012-12-03 Tommy Widenflycht <tommyw@google.com>
+
+ Speech Recognition API: Update SpeechRecognitionEvent to match the specification
+ https://bugs.webkit.org/show_bug.cgi?id=103407
+
+ Reviewed by Kentaro Hara.
+
+ Changing the mock to use the new results delivery API.
+
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
+
+2012-12-03 Alexis Menard <alexis@webkit.org>
+
+ [Qt] Enable CSS3 background-position offsets by default.
+ https://bugs.webkit.org/show_bug.cgi?id=103877
+
+ Reviewed by Tor Arne Vestbø.
+
+ Enable by default CSS3 background-position offsets.
+
+ * qmake/mkspecs/features/features.pri:
+
+2012-12-03 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL][WK2] Use float variable for zoom levels for MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=103863
+
+ Reviewed by Gyuyoung Kim.
+
+ Use float instead of int for zoomLevels variables for a clearer expression
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+
+2012-12-02 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL][WK2] Add support for a zoom level setting to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=99285
+
+ Reviewed by Gyuyoung Kim.
+
+ Add support for a zoom level setting to MiniBrowser.
+ Shortcuts for setting operations are same as common browsers:
+ Ctrl + '+' to zoom in, Ctrl + '-' to zoom out and Ctrl + '0' to zoom to default.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+
+2012-12-02 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL][WK2] ECORE_GETOPT_VALUE_BOOL need to be used for Eina_Bool
+ https://bugs.webkit.org/show_bug.cgi?id=103835
+
+ Reviewed by Kentaro Hara.
+
+ Because legacy_behavior_enabled is Eina_Bool, ECORE_GETOPT_VALUE_BOOL need to be used
+
+ * MiniBrowser/efl/main.c:
+ (elm_main):
+
+2012-12-02 Mike West <mkwst@chromium.org>
+
+ Garden-o-matic shouldn't die when blank JSON results are received.
+ https://bugs.webkit.org/show_bug.cgi?id=103838
+
+ Reviewed by Adam Barth.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
+ If the JSONP string doesn't contain '(' or ')', return an empty object.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:
+ Check that this behavior stays in place.
+
+2012-12-02 Eric Seidel <eric@webkit.org>
+
+ run-perf-tests --profile should use iprofiler instead of instruments on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=103765
+
+ Unreviewed. Updating the unittests after my previous change.
+
+ * Scripts/webkitpy/common/system/profiler_unittest.py:
+ (ProfilerFactoryTest.test_basic):
+
+2012-12-02 Julie Parent <jparent@chromium.org>
+
+ Remove dead code in flakiness dashboard for obsolete buildDir option
+ https://bugs.webkit.org/show_bug.cgi?id=103792
+
+ Reviewed by Dirk Pranke.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (initBuilders):
+
+2012-12-02 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: clean up logic for retrying failed tests a bit
+ https://bugs.webkit.org/show_bug.cgi?id=103829
+
+ Reviewed by Ojan Vafai.
+
+ The code for determining when to retry test failures and
+ show the results.html file was awkward and could stand some
+ cleaning up. This patch should have no functional changes.
+
+ The routine called _get_failures() returned a dict of test names
+ to failure types, but we only ever used the names, so I've converted
+ it to return a list (and renamed it); also, the show_results_html()
+ file was calling that routine to figure out if anything failed, when
+ the information was already in the result_summary (as either
+ unexpected_results or total_failures), so we were doing unnecessary work.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager.__init__):
+ (Manager.run):
+ (Manager._run_tests):
+ (Manager._failed_test_names):
+ (Manager._copy_results_html_file):
+
+2012-12-02 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: remove unused methods in manager.py
+ https://bugs.webkit.org/show_bug.cgi?id=103828
+
+ Reviewed by Eric Seidel.
+
+ These two methods weren't being called by anything and were no
+ longer needed.
+
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._get_failures):
+ (Manager._upload_json_files):
+
+2012-12-02 Laszlo Gombos <l.gombos@samsung.com>
+
+ Correct the spelling of the cmakeargs argument
+ https://bugs.webkit.org/show_bug.cgi?id=103814
+
+ Reviewed by Darin Adler.
+
+ The script expects cmakeargs (plural), so lets get the
+ documentation of the script report the same.
+
+ * Scripts/build-webkit:
+
+2012-12-02 Mike West <mkwst@chromium.org>
+
+ [gtk] Enable the CSP_NEXT runtime flag.
+ https://bugs.webkit.org/show_bug.cgi?id=103810
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (resetDefaultsToConsistentValues):
+ Turn on the CSP_NEXT runtime flag when running tests under GTK.
+
+2012-12-02 Eric Seidel <eric@webkit.org>
+
+ run-perf-tests --profile should use iprofiler instead of instruments on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=103765
+
+ Reviewed by Ryosuke Niwa.
+
+ Stephanie pointed out that iprofiler is the newer command-line interface
+ to replace /usr/bin/instruments in Instruments 4 (which according to the
+ interblags is supported on everything since 10.6.6), so I've moved --profile
+ to use iprofiler on Mac.
+
+ I also made the IProfiler class wait for iprofiler to complete so that
+ iprofiler won't continue running after run-perf-tests is complete (and
+ spam over the top of your shell output).
+
+ There are a couple of "got-chas" to this approach:
+ 1. iprofiler will ask for your password the first time you run it, which may
+ cause your first test to fail. /usr/bin/instruments doesn't seem to do that.
+ 2. iprofiler has nice (but kinda awkward for our purposes) support for separate
+ directory and basename arguments, making IProfiler a somewhat awkward
+ baseclass of SingleFileOutputProfiler
+
+ I suspect we'll iterate from here. It does seem slightly faster than
+ /usr/bin/instruments was.
+
+ * Scripts/webkitpy/common/system/profiler.py:
+ (ProfilerFactory.create_profiler):
+ (IProfiler):
+ (IProfiler.__init__):
+ (IProfiler.attach_to_pid):
+
+2012-12-02 Yongjun Zhang <yongjun_zhang@apple.com>
+
+ Need a method to close all idle localstorage databases immediately.
+ https://bugs.webkit.org/show_bug.cgi?id=103469
+
+ Reviewed by David Kilzer.
+
+ Add an JS method to TestRunner, to enable testing closing idle local storage databases in
+ DumpRenderTree layout tests.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (closeIdleLocalStorageDatabasesCallback):
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::closeIdleLocalStorageDatabases):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::closeIdleLocalStorageDatabases):
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::closeIdleLocalStorageDatabases):
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::closeIdleLocalStorageDatabases):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ (TestRunner::closeIdleLocalStorageDatabases):
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ (TestRunner::closeIdleLocalStorageDatabases):
+
+2012-12-02 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL][WK2] MiniBrowser should have a legacy mode
+ https://bugs.webkit.org/show_bug.cgi?id=103679
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add an option to start MiniBrowser in legacy mode.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+
+2012-12-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r136236.
+ http://trac.webkit.org/changeset/136236
+ https://bugs.webkit.org/show_bug.cgi?id=103833
+
+ [chromium] Flakey crashes in SpeechRecognitionEvent::emma
+ during GC. (Requested by mkwst on #webkit).
+
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
+
+2012-12-01 Zan Dobersek <zandobersek@gmail.com>
+
+ [XvfbDriver] XvfbDriverTest.test_next_free_display is flaky on builders using XvfbDriver
+ https://bugs.webkit.org/show_bug.cgi?id=103806
+
+ Reviewed by Dirk Pranke.
+
+ There are occasional mishaps on builders where XvfbDriver doesn't properly
+ clean up the Xvfb instance it was managing so the related guard lock files
+ are still existing when the webkitpy unit tests are run. This can cause failures
+ in XvfbDriverTest.test_next_free_display as the test tries to acquire displays
+ with a specific number but is unable to due to the stale locks.
+
+ The solution to this is to use MockFileLock when inside unit test. This is achievable
+ by creating a file lock through the SystemHost instance connected to the Port object,
+ the latter available to the Driver.
+
+ * Scripts/webkitpy/common/system/file_lock_mock.py:
+ (MockFileLock.acquire_lock): Return True to signal lock acquiring succeeded.
+ (MockFileLock.release_lock): Return True to signal lock releasing succeeded.
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
+ (XvfbDriver._next_free_display): Create the file lock through a mockable way.
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+ (XvfbDriverTest.test_next_free_display): Enable back the unit test.
+
+2012-12-01 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] A11y tests in WK2 report badly-formatted AX roles
+ https://bugs.webkit.org/show_bug.cgi?id=102947
+
+ Reviewed by Xan Lopez.
+
+ As in DRT, convert the ATK accessibility roles to corresponding AXRoles.
+ These are expected in both tests and their baselines.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::roleToString):
+ (WTR):
+ (WTR::AccessibilityUIElement::role):
+
+2012-11-30 Mike West <mkwst@chromium.org>
+
+ CSP 1.1: Make the CSP_NEXT flag runtime enabled.
+ https://bugs.webkit.org/show_bug.cgi?id=103652
+
+ Reviewed by Adam Barth.
+
+ Ensures that the new SecurityPolicy runtime flag is enabled for Chromium's tests.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2012-11-30 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Removed temporary debugging change from DRT (r136300).
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+
+2012-11-30 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Temporary change to DRT for debugging purposes.
+
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (dump):
+
+2012-11-29 Tommy Widenflycht <tommyw@google.com>
+
+ Speech Recognition API: Update SpeechRecognitionEvent to match the specification
+ https://bugs.webkit.org/show_bug.cgi?id=103407
+
+ Reviewed by Adam Barth.
+
+ Changing the mock to use the new results delivery API.
+
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
+
+2012-11-30 Simon Hausmann <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
+
+ [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
+ https://bugs.webkit.org/show_bug.cgi?id=99314
+
+ Reviewed by Tor Arne Vestbø.
+
+ This big change separates QtWebKit into QtWebKit and QtWebKitWidgets as
+ shared libraries.
+
+ It's a big refactoring that mostly involves moving WebCore dependent
+ code into QtWebKit and accessing it through exported QWebFrameAdapter
+ and QWebPageAdapter classes.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::dump): Adapt to internal API changes.
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * Scripts/webkitpy/style/checker.py: Adapt Qt exceptions to new paths.
+ * Scripts/webkitpy/style/checker_unittest.py:
+ (GlobalVariablesTest.test_path_rules_specifier):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/webkit_modules.prf:
+ * qmake/mkspecs/modules/webkitwidgets.prf: Removed.
+
+2012-11-30 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed trivial fix.
+
+ Add empty.cpp back, it was removed accidentally by r129092.
+
+ * qmake/config.tests/gccdepends/empty.cpp: Added.
+
+2012-11-30 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Add support for prepare_docs and generate_docs
+
+ Follow-up to changes in Qt in how documentation is built.
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-11-30 Zan Dobersek <zandobersek@gmail.com>
+
+ Finally remove webkitpy.common.system.deprecated_logging
+ https://bugs.webkit.org/show_bug.cgi?id=103624
+
+ Reviewed by Adam Barth.
+
+ Remove the deprecated logging module and its unit tests now that such logging is not
+ used anymore in webkitpy.
+
+ The tee and OutputTee classes are moved into a new module, webkitpy.common.system.outputtee.
+ The tee class is renamed to Tee to conform with the usual guidelines.
+
+ Only unit test for the Tee class is currently provided as the OutputTee is not currently
+ using the webkitpy Filesystem abstraction that would make its functionality testable.
+
+ * Scripts/webkitpy/common/system/executive.py: tee (now Tee) is now in a new module.
+ (Executive.run_and_throw_if_fail):
+ * Scripts/webkitpy/common/system/outputtee.py: Renamed from Tools/Scripts/webkitpy/common/system/deprecated_logging.py.
+ (Tee):
+ (Tee.__init__):
+ (Tee.write):
+ (OutputTee):
+ (OutputTee.__init__):
+ (OutputTee.add_log):
+ (OutputTee.remove_log):
+ (OutputTee._open_log_file):
+ (OutputTee._tee_outputs_to_files):
+ * Scripts/webkitpy/common/system/outputtee_unittest.py: Renamed from Tools/Scripts/webkitpy/common/system/deprecated_logging_unittest.py.
+ (SimpleTeeTest):
+ (SimpleTeeTest.test_simple_tee):
+ * Scripts/webkitpy/tool/bot/queueengine.py: OutputTee is now in a new module.
+ * Scripts/webkitpy/webkitpy.pyproj: Remove the deprecated_logging module and related unit test file.
+
+2012-11-30 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Add support for PlatformWebView::simulateRightClick() in TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=103634
+
+ Reviewed by Gyuyoung Kim.
+
+ Add support for PlatformWebView::simulateRightClick() and enable
+ WebKit2 API test HitTestResultNodeHandle.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::PlatformWebView::simulateRightClick):
+ (TestWebKitAPI):
+
+2012-11-30 Mihai Maerean <mmaerean@adobe.com>
+
+ [CSSRegions] when WebKit uses V8, there should be a single variable to store if the CSS Regions feature is enabled
+ https://bugs.webkit.org/show_bug.cgi?id=101192
+
+ Reviewed by Hajime Morita.
+
+ Removed the CSS Regions flag in Settings and switched to using the new flag I have added in RuntimeEnabledFeatures.
+
+ Tests: No new tests because there is no functional change.
+
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::applyTo):
+
+2012-11-29 Rafael Weinstein <rafaelw@chromium.org>
+
+ [HTMLTemplateElement] Add feature flag
+ https://bugs.webkit.org/show_bug.cgi?id=103694
+
+ Reviewed by Adam Barth.
+
+ This flag will guard the implementation of the HTMLTemplateElement.
+ http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/templates/index.html
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-29 Dirk Pranke <dpranke@chromium.org>
+
+ Ignore errors when removing directories on win32 during autoinstall
+ https://bugs.webkit.org/show_bug.cgi?id=103699
+
+ Unreviewed, build fix.
+
+ I think this will work on win32; if not, I'll have to actually
+ reproduce this :). The problem is that the logilab files
+ appear to contain a write-protected file, and deleting those
+ is problematic on windows.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._install):
+ (AutoInstaller.install):
+
+2012-11-29 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: autoinstaller is failing on windows
+ https://bugs.webkit.org/show_bug.cgi?id=103699
+
+ Unreviewed, build fix.
+
+ We're attempting to create directories with forward slashes in them;
+ this is a no-no on windows.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._create_scratch_directory_inner):
+
+2012-11-29 Dirk Pranke <dpranke@chromium.org>
+
+ Fix python unit tests after r136158 (android port tests failing)
+ https://bugs.webkit.org/show_bug.cgi?id=103581
+
+ Unreviewed, build fix.
+
+ The unit tests apparently weren't ran for this patch; we failed
+ to update the mock executive calls out to adb to determine various
+ aspects of the environment, and were failing to create drivers.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ (MockRunCommand.mock_run_command_fn):
+
+2012-11-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r136175 and r136177.
+ http://trac.webkit.org/changeset/136175
+ http://trac.webkit.org/changeset/136177
+ https://bugs.webkit.org/show_bug.cgi?id=103683
+
+ Changes did not correct Windows build. (Requested by bfulgham
+ on #webkit).
+
+ * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
+
+2012-11-29 Brent Fulgham <bfulgham@webkit.org>
+
+ [Windows, WinCairo] Unreviewed build correction. Correct debug
+ build case on build machine.
+
+ * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
+
+2012-11-29 Brent Fulgham <bfulgham@webkit.org>
+
+ [Windows, WinCairo] Unreviewed build correction. Hide the
+ unexported 'notSolidColor' symbol when testing against
+ the BitmapImage class to avoid having to deal with a
+ debug-only symbol in the Windows export definition file.
+
+ * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
+
+2012-11-29 Peter Beverloo <peter@chromium.org>
+
+ run-perf-tests --chromium-android should not require adb in my path
+ https://bugs.webkit.org/show_bug.cgi?id=103581
+
+ Reviewed by Eric Seidel.
+
+ Remove the need to have "adb" available in the path for Layout and Performance
+ tests. We'll determine the versions of the "adb" version in path (if any) and
+ the one provided in the Chromium Android checkout. Unless the "adb" available
+ in the path is newer, the provided version will be used.
+
+ Some other minor nits addressed:
+ - The path_to_forwarder/path_to_md5sum should not be in the "private overrides"
+ section, as they're not overriding anything and are used by the driver.
+ - Make _restart_adb_as_root slightly more robust by waiting for the device
+ to come back online regardless of the output.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort.__init__):
+ (ChromiumAndroidPort.check_build):
+ (ChromiumAndroidPort.path_to_adb):
+ (ChromiumAndroidPort):
+ (ChromiumAndroidPort.path_to_forwarder):
+ (ChromiumAndroidPort.path_to_md5sum):
+ (ChromiumAndroidPort._path_to_helper):
+ (ChromiumAndroidPort._determine_adb_version):
+ (ChromiumAndroidPort._get_devices):
+ (ChromiumAndroidDriver.__init__):
+ (ChromiumAndroidDriver._setup_md5sum_and_push_data_if_needed):
+ (ChromiumAndroidDriver._push_executable):
+ (ChromiumAndroidDriver._restart_adb_as_root):
+
+2012-11-29 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK] [WebKit2] Embed the HTTP authentication dialog into the WebView
+ https://bugs.webkit.org/show_bug.cgi?id=103277
+
+ Reviewed by Carlos Garcia Campos.
+
+ Skip the new WebKit2GtkAuthenticationDialog files so that they are not processed
+ during gtkdoc generation.
+
+ * gtk/generate-gtkdoc:
+ (get_webkit2_options):
+
+2012-11-29 Eric Seidel <eric@webkit.org>
+
+ run-perf-tests --chromium-android fails due to Skia INFO logging
+ https://bugs.webkit.org/show_bug.cgi?id=103585
+
+ Reviewed by Adam Barth.
+
+ Ignore all INFO logging from Chromium code.
+ Also added some basic testing of the ignored-stderr lines code.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest):
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (MainTest.test_ignored_stderr_lines):
+
+2012-11-29 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Add support for PlatformWebView::simulateMouseMove() in TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=103252
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add support for PlatformWebView::simulateMouseMove() and enable
+ WebKit2 API test MouseMoveAfterCrash.
+
+ * TestWebKitAPI/PlatformEfl.cmake: Enable MouseMoveAfterCrash API
+ test.
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::onWebProcessCrashed): Handle 'webprocess,crashed' signal
+ to prevent loading an error page since the test case is reloading actual
+ page after web process has terminated and recovered.
+ (TestWebKitAPI):
+ (TestWebKitAPI::PlatformWebView::PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::simulateMouseMove): Implemented.
+
+2012-11-29 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Fix installation of QtWebProcess binary
+ https://bugs.webkit.org/show_bug.cgi?id=101735
+
+ Reviewed by Simon Hausmann.
+
+ Add config test to detect the availability of support
+ for "program executables" in Qt (libexec).
+
+ This test can be removed after the Qt5 release.
+
+ * Tools.pro:
+ * qmake/mkspecs/features/features.prf:
+ * qmake/config.tests/libexecdir/libexecdir.cpp:
+ * qmake/config.tests/libexecdir/libexecdir.pro:
+
+2012-11-29 Eric Seidel <eric@webkit.org>
+
+ run-perf-tests does not work when the layout test directory does not exist
+ https://bugs.webkit.org/show_bug.cgi?id=103572
+
+ Reviewed by Ryosuke Niwa.
+
+ Make sure that Profiler() calls maybe_make_directory for the output_dir
+ before ever using it. It's a little awkward to create the directory
+ from the constructor, but its simplest that way as the various subclasses
+ all use the directory at different times.
+
+ Since this required having a filesystem in Profiler (and I didn't want
+ to grab inside Workspace to get one), I just made Profiler expect a
+ SystemHost instead of a separate filesystem, executive and workspace.
+
+ * Scripts/webkitpy/common/system/profiler.py:
+ (ProfilerFactory.create_profiler):
+ (Profiler.__init__):
+ (SingleFileOutputProfiler.__init__):
+ (GooglePProf.__init__):
+ (GooglePProf.profile_after_exit):
+ (Instruments.__init__):
+ (Instruments.attach_to_pid):
+ * Scripts/webkitpy/common/system/profiler_unittest.py:
+ (ProfilerFactoryTest.test_basic):
+
+2012-11-28 Vivek Galatage <vivek.vg@samsung.com>
+
+ Adding secondary email id
+ https://bugs.webkit.org/show_bug.cgi?id=103594
+
+ Unreviewed. Adding secondary email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-28 Kent Tamura <tkent@chromium.org>
+
+ garden-o-matic: Use indeterminate <progress> in the status area
+ https://bugs.webkit.org/show_bug.cgi?id=103494
+
+ Reviewed by Adam Barth.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui.js:
+ Wrap the "Processing..." message with an indeterminate progress bar.
+ We keep the message as a fallback content.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui_unittests.js:
+ Follow the above change.
+
+2012-11-28 Nima Ghanavatian <nghanavatian@rim.com>
+
+ Adding Nima Ghanavatian to committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=103533
+
+ Reviewed by Rob Buis.
+
+ Adding myself to committers.py as a Committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-28 peavo@outlook.com <peavo@outlook.com>
+
+ [WinCairo] Crash when requesting favicon.
+ https://bugs.webkit.org/show_bug.cgi?id=102689
+
+ Reviewed by Brent Fulgham.
+
+ * TestWebKitAPI/Tests/WebCore/win: Added.
+ * TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp: Added.
+ (TestWebKitAPI::BitmapImageTest::BitmapImageTest): Allocate frame in constructor.
+ (TestWebKitAPI::BitmapImageTest::frameCount): Override frameCount() method.
+ (TestWebKitAPI::TEST): Added new test.
+ * TestWebKitAPI/config.h: Make sure defines are correct for WinCairo.
+ * TestWebKitAPI/win/TestWebKitAPI.vcproj: Added new test.
+
+2012-11-28 Eric Seidel <eric@webkit.org>
+
+ run-perf-tests should have a --profile option for easy profiling
+ https://bugs.webkit.org/show_bug.cgi?id=99517
+
+ Reviewed by Adam Barth.
+
+ This is a very basic implementation which works on Mac and Linux
+ and makes it trivial for anyone to profile a PerformanceTest.
+
+ Currently it's not "hard" to profile a PerformanceTest
+ but lowering the barriers to entry here allows all of us to focus
+ less on the tools and more on the code.
+
+ This also paves the way for adding easy mobile-profiling (e.g. chromium-android)
+ which is actually "hard", and this option will make much easier.
+
+ * Scripts/webkitpy/common/system/profiler.py: Added.
+ (ProfilerFactory):
+ (ProfilerFactory.create_profiler):
+ (Profiler):
+ (Profiler.__init__):
+ (Profiler.adjusted_environment):
+ (Profiler.attach_to_pid):
+ (Profiler.did_stop):
+ (SingleFileOutputProfiler):
+ (SingleFileOutputProfiler.__init__):
+ (GooglePProf):
+ (GooglePProf.__init__):
+ (GooglePProf.adjusted_environment):
+ (GooglePProf.did_stop):
+ (Instruments):
+ (Instruments.__init__):
+ (Instruments.attach_to_pid):
+ * Scripts/webkitpy/common/system/profiler_unittest.py: Added.
+ (ProfilerFactoryTest):
+ (ProfilerFactoryTest.test_basic):
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (Driver.__init__):
+ (Driver._start):
+ (Driver.stop):
+ (Driver.cmd_line):
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest.parse_output):
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (MainTest.test_parse_output):
+ (MainTest.test_parse_output_with_failing_line):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner._parse_args):
+ (PerfTestsRunner.run):
+
+2012-11-28 Zan Dobersek <zandobersek@gmail.com>
+
+ Remove deprecated logging usage from QueueEngine
+ https://bugs.webkit.org/show_bug.cgi?id=103532
+
+ Reviewed by Dirk Pranke.
+
+ Replace usage of deprecated logging in webkitpy.tool.bot.queueengine with
+ logging through the Logger object. The unit test is modified to reflect
+ these changes.
+
+ After these changes the deprecated logging (i.e. logging to stderr) is not
+ used anymore through webkitpy and can be removed.
+
+ * Scripts/webkitpy/tool/bot/queueengine.py:
+ (QueueEngine.exit_after_handled_error):
+ (QueueEngine.run):
+ (QueueEngine._stopping):
+ (QueueEngine._sleep):
+ * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
+ (QueueEngineTest._run_engine):
+
+2012-11-28 Nate Chapin <japhet@chromium.org>
+
+ Move empty loading to DocumentLoader, simplify FrameLoader::init()
+ https://bugs.webkit.org/show_bug.cgi?id=101512
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::updateForCommittedLoad): This function doesn't play nicely with empty urls and incorrectly
+ interprets them as a non-empty load. This change is required for
+ http/tests/navigation/new-window-redirect-history.html to continue to pass in chromium.
+ * TestWebKitAPI/Tests/WebKit2/AboutBlankLoad.cpp: This test relies on a callback that no longer
+ is sent for about:blank loads. Hook into didFinishLoadForFrame() instead.
+ (TestWebKitAPI::didFinishLoadForFrame):
+ (TestWebKitAPI::TEST):
+
+2012-11-28 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Allow plugins to opt-in to receive synthetic mouse events out of touch events.
+ https://bugs.webkit.org/show_bug.cgi?id=103092
+
+ Reviewed by Tony Chang.
+
+ Update the test web-plugin to be able to opt-in to receive synthesized mouse events created
+ from touch events.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (parseTouchEventRequestType):
+ (TestWebPlugin::TestWebPlugin):
+ (TestWebPlugin::initialize):
+ * DumpRenderTree/chromium/TestWebPlugin.h:
+ (TestWebPlugin):
+
+2012-11-28 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Add support for PlatformWebView::simulateSpacebarKeyPress() in TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=103123
+
+ Reviewed by Laszlo Gombos.
+
+ Add support for PlatformWebView::simulateSpacebarKeyPress().
+ This functionality is needed by WebKit2 API test MouseMoveAfterCrash
+ which is going to be unskipped in bug #103252.
+
+ * TestWebKitAPI/efl/PlatformUtilities.cpp:
+ (TestWebKitAPI::Util::sleep):
+ * TestWebKitAPI/efl/PlatformWebView.cpp: Use usleep() instead of
+ sleep().
+ (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
+ (TestWebKitAPI):
+
+2012-11-28 Yael Aharon <yael.aharon@intel.com>
+
+ Minor cleanup in TestInvocation
+ https://bugs.webkit.org/show_bug.cgi?id=103512
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Remove a function declaration that is not defined and not used.
+ Fix spelling error in m_webProcessIsUnresponsive.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::TestInvocation):
+ (WTR::TestInvocation::invoke):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-11-28 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ Unreviewed. Use my personal email as bugzilla email.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-28 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ Unreviewed. Adding myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-26 Andrey Adaikin <aandrey@chromium.org>
+
+ Unreviewed. Adding myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-28 Tommy Widenflycht <tommyw@google.com>
+
+ Add basic implementation for MediaStreamAudioDestinationNode
+ https://bugs.webkit.org/show_bug.cgi?id=101815
+
+ Reviewed by Chris Rogers.
+
+ Adds a bit of code that exercises the WebKit API.
+
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
+ (MockWebMediaStreamSourceConsumer):
+ (MockWebMediaStreamSourceConsumer::~MockWebMediaStreamSourceConsumer):
+ (MockWebMediaStreamCenter::didCreateMediaStream):
+
+2012-11-28 Matt Falkenhagen <falken@chromium.org>
+
+ Unreviewed. Adding myself to committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-27 Li Yin <li.yin@intel.com>
+
+ Unreviewed. Adding myself to committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-27 Christophe Dumez <christophe.dumez@intel.com>
+
+ Unreviewed. Adding myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-27 Vivek Galatage <vivek.vg@samsung.com>
+
+ Unreviewd. Adding myself to committers list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-27 Tony Chang <tony@chromium.org>
+
+ Bring back partytime!
+ https://bugs.webkit.org/show_bug.cgi?id=103466
+
+ Reviewed by Adam Barth.
+
+ "code 404, message Unknown function images/partytime_gif" since we didn't
+ allow .gif or .png files to be served.
+
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPRequestHandler):
+
+2012-11-27 Adam Barth <abarth@webkit.org>
+
+ run-perf-tests fails on Android because of stderr output
+ https://bugs.webkit.org/show_bug.cgi?id=103462
+
+ Reviewed by Ryosuke Niwa.
+
+ The chromium-android port produces some stderr output that causes
+ run-perf-tests to get sad and not record the results of the performance
+ test. This patch teaches run-perf-test to ignore this output much in
+ the same way that it currently ignores some stdout messages.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTest.run):
+ (PerfTest._should_ignore_line):
+ (PerfTest):
+ (PerfTest._should_ignore_line_in_stderr):
+ (PerfTest._filter_stderr):
+ (PerfTest._should_ignore_line_in_parser_test_result):
+
+2012-11-27 Tony Chang <tony@chromium.org>
+
+ Fix garden-o-matic for non-chromium ports
+ https://bugs.webkit.org/show_bug.cgi?id=103458
+
+ Reviewed by Adam Barth.
+
+ I was getting a 403 error when trying to select any non-chromium port.
+
+ * Scripts/webkitpy/tool/servers/reflectionhandler.py:
+ (ReflectionHandler._handle_request): Use the path without query params.
+
+2012-11-27 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL][WK2] 3D pixel tests are failing
+ https://bugs.webkit.org/show_bug.cgi?id=102833
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Generate a snapshot of the view in the UI process instead of the web process.
+ We have to use Texture Mapper in order to correctly paint 3D transforms etc.
+
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
+ (WTR::writeFunction):
+ (WTR::paintRepaintRectOverlay):
+ (WTR):
+ (WTR::TestInvocation::forceRepaintDoneCallback):
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::windowSnapshotImage):
+
+2012-11-27 Adam Barth <abarth@webkit.org>
+
+ Make it possible to run performance tests on Chromium Android
+ https://bugs.webkit.org/show_bug.cgi?id=103268
+
+ Reviewed by Ryosuke Niwa.
+
+ Based on a patch by Peter Beverloo.
+
+ This patch (almost) makes it possible to run WebKit performance tests
+ on the Chromium port for Android. There are a few things I had to do
+ in order to make this happen:
+
+ 1) The worker number when creating a driver for a port is zero-based
+ for layout tests and elsewhere. Android uses this to determine
+ which device it has to run on, so make it zero based for performance
+ tests as well.
+
+ 2) Tests aren't available on the Android device, so we start an HTTP
+ server that serves the tests to the device or emulator.
+
+ The one shortcoming of this patch is that chromium-android produces
+ some stderr output that confuses run-perf-tests. I'll address that
+ issue in a subsequent CL. This patch also depends on
+ https://codereview.chromium.org/11416182 in order to work.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort.start_http_server):
+ (ChromiumAndroidDriver._command_from_driver_input):
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (ReplayPerfTest.prepare):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.__init__):
+ (PerfTestsRunner._parse_args):
+ (PerfTestsRunner._start_servers):
+ (PerfTestsRunner):
+ (PerfTestsRunner._stop_servers):
+ (PerfTestsRunner.run):
+ (PerfTestsRunner._run_tests_set):
+
+2012-11-27 Zan Dobersek <zandobersek@gmail.com>
+
+ Remove use of deprecated logging from webkitpy.common and webkitpy.layout_tests
+ https://bugs.webkit.org/show_bug.cgi?id=103408
+
+ Reviewed by Dirk Pranke.
+
+ Remove the use of the deprecated log and error methods by replacing them with
+ logging through Python's logging.Logger objects.
+
+ This patch covers such changes in webkitpy.common and webkitpy.layout_tests and also
+ updates any affected unit test.
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLogEntry._parse_entry):
+ * Scripts/webkitpy/common/checkout/checkout.py:
+ * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+ (CheckoutTest.test_apply_patch):
+ * Scripts/webkitpy/common/checkout/deps_mock.py:
+ (MockDEPS.write_variable):
+ * Scripts/webkitpy/common/checkout/scm/detection.py:
+ (SCMDetector.default_scm):
+ * Scripts/webkitpy/common/checkout/scm/detection_unittest.py:
+ (SCMDetectorTest.test_detect_scm_system):
+ * Scripts/webkitpy/common/checkout/scm/git.py:
+ (Git._check_git_architecture):
+ (Git._commit_on_branch):
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.ensure_clean_working_directory):
+ (SCM.ensure_no_local_commits):
+ (SCM.will.commit_locally_with_message):
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN.apply_reverse_diff):
+ * Scripts/webkitpy/common/net/bugzilla/attachment.py:
+ (Attachment._validate_flag_value):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
+ (Bugzilla._fetch_bug_page):
+ (Bugzilla.bug_id_for_attachment_id):
+ (Bugzilla.authenticate):
+ (Bugzilla._commit_queue_flag):
+ (Bugzilla.add_attachment_to_bug):
+ (Bugzilla.add_patch_to_bug):
+ (Bugzilla.create_bug):
+ (Bugzilla.clear_attachment_flags):
+ (Bugzilla.set_flag_on_attachment):
+ (Bugzilla.obsolete_attachment):
+ (Bugzilla.add_cc_to_bug):
+ (Bugzilla.post_comment_to_bug):
+ (Bugzilla.close_bug_as_fixed):
+ (Bugzilla.reassign_bug):
+ (reopen_bug):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
+ (MockBugzilla.create_bug):
+ (MockBugzilla.reassign_bug):
+ (MockBugzilla.set_flag_on_attachment):
+ (MockBugzilla.post_comment_to_bug):
+ (MockBugzilla.add_attachment_to_bug):
+ (MockBugzilla.add_patch_to_bug):
+ (MockBugzilla.reopen_bug):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+ (test_add_cc_to_bug):
+ (_assert_reopen):
+ (test_reopen_bug):
+ * Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
+ (MockBuilder.force_build):
+ * Scripts/webkitpy/common/net/credentials.py:
+ (Credentials._run_security_tool):
+ * Scripts/webkitpy/common/net/credentials_unittest.py:
+ (_assert_security_call):
+ * Scripts/webkitpy/common/net/irc/irc_mock.py:
+ (MockIRC.post):
+ (MockIRC.disconnect):
+ * Scripts/webkitpy/common/net/irc/ircproxy.py:
+ (IRCProxy.__init__):
+ (IRCProxy.disconnect):
+ * Scripts/webkitpy/common/net/irc/ircproxy_unittest.py:
+ (IRCProxyTest.test_trivial):
+ * Scripts/webkitpy/common/net/layouttestresults.py:
+ (ORWTResultsHTMLParser._failures_from_fail_row):
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+ (test_failures_from_fail_row):
+ * Scripts/webkitpy/common/net/networktransaction.py:
+ * Scripts/webkitpy/common/net/resultsjsonparser.py:
+ (JSONTestResult._tokenize):
+ (JSONTestResult._failure_types_from_actual_result):
+ * Scripts/webkitpy/common/net/statusserver.py:
+ (StatusServer.update_status):
+ (StatusServer.update_svn_revision):
+ * Scripts/webkitpy/common/net/statusserver_mock.py:
+ (MockStatusServer.release_work_item):
+ (MockStatusServer.update_work_items):
+ (MockStatusServer.submit_to_ews):
+ (MockStatusServer.update_status):
+ * Scripts/webkitpy/common/net/unittestresults.py:
+ (UnitTestResults.results_from_string):
+ * Scripts/webkitpy/common/system/executive_mock.py:
+ (MockExecutive.running_pids):
+ (MockExecutive.run_and_throw_if_fail):
+ (MockExecutive.run_command):
+ (MockExecutive.popen):
+ * Scripts/webkitpy/common/system/user_mock.py:
+ (MockUser.confirm):
+ (MockUser.open_url):
+ * Scripts/webkitpy/common/system/workspace_unittest.py:
+ (WorkspaceTest.test_create_zip):
+ (WorkspaceTest.test_create_zip_exception):
+ * Scripts/webkitpy/common/watchlist/watchlist_mock.py:
+ (MockWatchList.determine_cc_and_messages):
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ (ChromiumWinTest.test_setup_environ_for_server_register_cygwin):
+ * Scripts/webkitpy/layout_tests/port/efl_unittest.py:
+ (EflPortTest.test_show_results_html_file):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_show_results_html_file):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (test_show_results_html_file):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (test_build_driver):
+ * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+ (QtPortTest.test_show_results_html_file):
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest.test_show_results_html_file):
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+ (XvfbDriverTest.assertDriverStartSuccessful):
+ (XvfbDriverTest.test_start_no_pixel_tests):
+ (XvfbDriverTest.test_start_pixel_tests):
+ (XvfbDriverTest.test_start_arbitrary_worker_number):
+ (XvfbDriverTest.test_start_next_worker):
+ (XvfbDriverTest.test_stop):
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py:
+ (TestLayoutTestApacheHttpd.test_start_cmd):
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (test_run_test_pause_before_testing):
+ (test_run_memory_test):
+ (_test_run_with_json_output):
+ (test_run_respects_no_results):
+ (test_run_generates_and_show_results_page):
+ (test_run_respects_no_show_results):
+ * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+ (FeedersTest.test_commit_queue_feeder):
+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+ (FlakyTestReporterTest.test_create_bug_for_flaky_test):
+ (test_report_flaky_tests_creating_bug):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_rollout_updates_working_copy):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_exception_during_command):
+ (IRCBotTest.test_hi):
+ (IRCBotTest.test_help):
+ (IRCBotTest.test_restart):
+ (IRCBotTest.test_rollout):
+ (IRCBotTest.test_revert):
+ (IRCBotTest.test_roll_chromium_deps):
+ (IRCBotTest.test_roll_chromium_deps_to_lkgr):
+ (IRCBotTest.test_multi_rollout):
+ (IRCBotTest.test_rollout_with_r_in_svn_revision):
+ (IRCBotTest.test_multi_rollout_with_r_in_svn_revision):
+ (IRCBotTest.test_rollout_bananas):
+ (IRCBotTest.test_rollout_invalidate_revision):
+ (IRCBotTest.test_rollout_invalidate_reason):
+ (test_multi_rollout_invalidate_reason):
+ (test_rollout_no_reason):
+ (test_multi_rollout_no_reason):
+ * Scripts/webkitpy/tool/bot/sheriff_unittest.py:
+ (SheriffTest.test_post_blame_comment_on_bug):
+ * Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
+ (ApplyWatchListLocalTest.test_args_parsing):
+ (test_args_parsing_with_bug):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ (test_land_cowboy):
+ (test_check_style):
+ (test_create_rollout):
+ (test_create_rollout_resolved):
+ (test_rollout):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (AbstractEarlyWarningSystemTest.test_failing_tests_message):
+ (EarlyWarningSytemTest._default_expected_logs):
+ (EarlyWarningSytemTest._test_builder_ews):
+ (EarlyWarningSytemTest._test_testing_ews):
+ * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
+ (OpenBugsTest.test_args_parsing):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (QueryCommandsTest.test_bugs_to_commit):
+ (QueryCommandsTest.test_patches_in_commit_queue):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (FeederQueueTest.test_feeder_queue):
+ (AbstractPatchQueueTest.test_next_patch):
+ (AbstractPatchQueueTest.test_upload_results_archive_for_patch):
+ (CommitQueueTest.test_commit_queue):
+ (test_commit_queue_failure):
+ (test_commit_queue_failure_with_failing_tests):
+ (test_rollout):
+ (test_rollout_lands):
+ (test_auto_retry):
+ (test_manual_reject_during_processing):
+ (test_report_flaky_tests):
+ (StyleQueueTest.test_style_queue_with_style_exception):
+ (test_style_queue_with_watch_list_exception):
+ * Scripts/webkitpy/tool/commands/queuestest.py:
+ (QueuesTest._default_begin_work_queue_logs):
+ * Scripts/webkitpy/tool/commands/roll_unittest.py:
+ (RollCommandsTest.test_update_chromium_deps):
+ * Scripts/webkitpy/tool/commands/upload_unittest.py:
+ (UploadCommandsTest.test_assign_to_committer):
+ (test_post):
+ (test_attach_to_bug):
+ (test_attach_to_bug_no_description_or_comment):
+ (test_land_safely):
+ (test_prepare):
+ (test_upload):
+ (test_mark_bug_fixed):
+ * Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
+ (ApplyWatchListTest.test_apply_watch_list_local):
+ * Scripts/webkitpy/tool/steps/commit_unittest.py:
+ (CommitTest._test_check_test_expectations):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+ (RunTestsTest.test_webkit_run_unit_tests):
+ * Scripts/webkitpy/tool/steps/steps_unittest.py:
+ (StepsTest._assert_step_output_with_bug):
+ (StepsTest._assert_post_diff_output_for_bug):
+ (StepsTest.test_post_diff):
+ (StepsTest.test_post_diff_for_commit):
+ (StepsTest.test_ensure_bug_is_open_and_assigned):
+ (StepsTest.test_runtests_args):
+ * Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py:
+ (SuggestReviewersTest.test_basic):
+ * Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py:
+ (ValidateChangeLogsTest._assert_start_line_produces_output):
+
+2012-11-27 Pratik Solanki <psolanki@apple.com>
+
+ objc/objc-runtime.h does not exist on all PLATFORM(MAC)
+ https://bugs.webkit.org/show_bug.cgi?id=101780
+
+ Reviewed by Brent Fulgham.
+
+ Clean up header includes so we don't include objc/objc-runtime.h.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ * DumpRenderTree/mac/ObjCPlugin.m:
+ * TestWebKitAPI/mac/InstanceMethodSwizzler.h:
+ * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
+
+2012-11-27 Marja Hölttä <marja@chromium.org>
+
+ Add callbacks to the FrameLoaderClient when a resource is requested
+ https://bugs.webkit.org/show_bug.cgi?id=92761
+
+ Reviewed by Adam Barth.
+
+ In Chromium, when an extension script cancels a network
+ request (which happens out of process), we'd like to
+ notify content scripts running on the current page about
+ which elements failed to load because the requests were
+ cancelled (as opposed to e.g. the network request just
+ didn't work). Since the resource request itself does not
+ carry any information what DOM element is was made for,
+ currently a content script has to search the DOM tree and
+ guess which requests will be cancelled by its counter
+ part. By adding these callbacks, the embedder can make
+ this connection explictly.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::dumpResourceRequestCallbacks):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ (DRTTestRunner::setShouldDumpResourceRequestCallbacks):
+ (DRTTestRunner::shouldDumpResourceRequestCallbacks):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::shouldDumpResourceRequestCallbacks):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::willRequestResource):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-11-27 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
+
+ [GStreamer] Verify if GStreamer was previously initialized
+ https://bugs.webkit.org/show_bug.cgi?id=103151
+
+ Reviewed by Philippe Normand.
+
+ This patch adds the gst_init() in GtkLauncher, so we can add the
+ GStreamer options in the command line through
+ gst_init_get_option_group().
+
+ This approach is not valid for MiniBrowser because it uses WebKit2,
+ where the GStreamer backend lives in the web process, which is
+ different from the UI process.
+
+ * GNUmakefile.am:
+ * GtkLauncher/main.c:
+ (main):
+
+2012-11-27 Andras Becsi <andras.becsi@digia.com>
+
+ [Qt] Fix the build with new Qt5 hash
+ https://bugs.webkit.org/show_bug.cgi?id=103406
+
+ Reviewed by Csaba Osztrogonác.
+
+ Remove references to deprecated QApplication::GuiServer which
+ has been removed, and use QStyleFactory::create instead of
+ instantiating a QWindowsStyle directly since it is about to
+ become an internal class.
+
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::LauncherApplication):
+ * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
+ (WTR::InjectedBundle::platformInitialize):
+
+2012-11-27 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [style] Add a style-check for enum-member names
+ https://bugs.webkit.org/show_bug.cgi?id=103157
+
+ Reviewed by Daniel Bates.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (_EnumState):
+ (_EnumState.__init__):
+ (_EnumState.process_clean_line):
+ (check_enum_casing):
+ (check_style):
+ (process_line):
+ (_process_lines):
+ (CppChecker):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (NoNonVirtualDestructorsTest.test_enum_casing):
+ (NoNonVirtualDestructorsTest.test_internal_braces.Foo):
+
+2012-11-26 Ryuan Choi <ryuan.choi@gmail.com>
+
+ [EFL][jhbuild] Disable unnecessary options of elementary module
+ https://bugs.webkit.org/show_bug.cgi?id=103360
+
+ Reviewed by Gyuyoung Kim.
+
+ When jhbuild configures elementary, unnecessary options may be enabled by
+ user installed modules and it causes build break.
+
+ * efl/jhbuild.modules:
+ Added --disable-emap --disable-ethumb --disable-eweather to elementary.
+
+2012-11-26 Varun Jain <varunjain@chromium.org>
+
+ LongPress and LongTap gestures should start drag/drop and open context menu respectively.
+ https://bugs.webkit.org/show_bug.cgi?id=101545
+
+ Reviewed by Antonio Gomes.
+
+ For LongPress, we simulate drag by sending a mouse down and mouse drag
+ events. If a drag is not started (because maybe there is no draggable
+ element), then we show context menu instead (which is the current
+ behavior for LongPress). For LongTap, we use the existing functions that
+ LongPress uses to summon the context menu. LongPress initiated drag and
+ drop can be enabled/disabled by the platform using the Setting
+ touchDragDropEnabled which is disabled by default.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::gestureLongTap):
+ (WebTestRunner::EventSender::gestureEvent):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::setTouchDragDropEnabled):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (TestRunner):
+
+2012-11-26 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add setting to enable / disable HTML5 local storage functionality
+ https://bugs.webkit.org/show_bug.cgi?id=103224
+
+ Reviewed by Laszlo Gombos.
+
+ Add --local-storage command line argument to MiniBrowser to
+ explicitely disable HTML5 local storage functionality. This
+ is useful for testing purposes.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+
+2012-11-26 Zan Dobersek <zandobersek@gmail.com>
+
+ Remove use of deprecated logging from most of webkitpy.tool
+ https://bugs.webkit.org/show_bug.cgi?id=103180
+
+ Reviewed by Dirk Pranke.
+
+ Remove calls to log and error methods of the deprecated_logging module, replacing them
+ by using Python's Logger objects. This patch covers the switch in all of webkitpy.tool
+ except the QueueEngine.
+
+ Unit tests are adjusted for these changes, moving output from expected stderr to expected logs.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ (MockCommitQueue.run_command):
+ (MockCommitQueue.command_passed):
+ (MockCommitQueue.command_failed):
+ (MockCommitQueue.report_flaky_tests):
+ (MockCommitQueue.archive_last_test_results):
+ (CommitQueueTaskTest._run_through_task):
+ (CommitQueueTaskTest.test_success_case):
+ (test_fast_success_case):
+ (test_clean_failure):
+ (test_update_failure):
+ (test_apply_failure):
+ (test_validate_changelog_failure):
+ (test_build_failure):
+ (test_red_build_failure):
+ (test_flaky_test_failure):
+ (test_failed_archive):
+ (test_double_flaky_test_failure):
+ (test_test_failure):
+ (test_red_test_failure):
+ (test_very_red_tree_retry):
+ (test_red_tree_patch_rejection):
+ (test_land_failure):
+ * Scripts/webkitpy/tool/bot/feeders.py:
+ (CommitQueueFeeder._update_work_items):
+ (EWSFeeder.feed):
+ * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader.py:
+ (LayoutTestResultsReader.archive):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+ (test_archive_last_layout_test_results):
+ * Scripts/webkitpy/tool/bot/sheriff.py:
+ * Scripts/webkitpy/tool/commands/abstractsequencedcommand.py:
+ (AbstractSequencedCommand.execute):
+ * Scripts/webkitpy/tool/commands/commandtest.py:
+ (CommandsTest.assert_execute_outputs):
+ * Scripts/webkitpy/tool/commands/download.py:
+ (AbstractPatchProcessingCommand._process_patch.execute):
+ (ProcessBugsMixin._fetch_list_of_patches_to_process):
+ (ProcessURLsMixin._fetch_list_of_patches_to_process):
+ (AbstractRolloutPrepCommand._commit_info):
+ * Scripts/webkitpy/tool/commands/download_unittest.py:
+ (AbstractRolloutPrepCommandTest.test_commit_info):
+ (DownloadCommandsTest.test_build):
+ (DownloadCommandsTest.test_build_and_test):
+ (test_apply_attachment):
+ (test_apply_from_bug):
+ (test_apply_watch_list):
+ (test_land):
+ (test_land_red_builders):
+ (test_check_style):
+ (test_build_attachment):
+ (test_land_attachment):
+ (test_land_from_bug):
+ (test_land_from_url):
+ (test_prepare_rollout):
+ (test_create_rollout):
+ (test_create_rollout_resolved):
+ (test_rollout):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem.handle_script_error.does):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
+ (EarlyWarningSytemTest._default_expected_stderr):
+ (EarlyWarningSytemTest._default_expected_logs):
+ (EarlyWarningSytemTest._test_testing_ews):
+ * Scripts/webkitpy/tool/commands/openbugs.py:
+ (OpenBugs.execute):
+ * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
+ (OpenBugsTest.test_args_parsing):
+ * Scripts/webkitpy/tool/commands/perfalizer.py:
+ (Perfalizer.handle_unexpected_error):
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (PatchesInCommitQueue.execute):
+ (PatchesToCommitQueue._needs_commit_queue):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (QueryCommandsTest.test_bugs_to_commit):
+ (QueryCommandsTest.test_patches_in_commit_queue):
+ (QueryCommandsTest.test_patches_to_commit_queue):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (AbstractQueue._cc_watchers):
+ (AbstractQueue.begin_work_queue):
+ (FeederQueue.handle_unexpected_error):
+ (CommitQueue.handle_script_error):
+ (AbstractReviewQueue.handle_unexpected_error):
+ (AbstractReviewQueue.handle_script_error):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (test_auto_retry):
+ * Scripts/webkitpy/tool/commands/queuestest.py:
+ (QueuesTest.assert_outputs):
+ (QueuesTest._default_begin_work_queue_stderr):
+ (QueuesTest):
+ (QueuesTest._default_begin_work_queue_logs):
+ (QueuesTest.assert_queue_outputs):
+ * Scripts/webkitpy/tool/commands/roll_unittest.py:
+ (RollCommandsTest.test_update_chromium_deps):
+ (test_update_chromium_deps_older_revision):
+ * Scripts/webkitpy/tool/commands/sheriffbot.py:
+ (SheriffBot.handle_unexpected_error):
+ * Scripts/webkitpy/tool/commands/stepsequence.py:
+ (StepSequence.run_and_handle_errors):
+ * Scripts/webkitpy/tool/commands/upload.py:
+ (AssignToCommitter._assign_bug_to_last_patch_attacher):
+ (AbstractPatchUploadingCommand._prepare_state):
+ (PostCommits.execute):
+ (MarkBugFixed._determine_bug_id_and_svn_revision):
+ (MarkBugFixed.execute):
+ (CreateBug.create_bug_from_commit):
+ (CreateBug.execute):
+ * Scripts/webkitpy/tool/commands/upload_unittest.py:
+ (test_obsolete_attachments):
+ (test_land_safely):
+ (test_mark_bug_fixed):
+ * Scripts/webkitpy/tool/multicommandtool.py:
+ (Command.check_arguments_and_execute):
+ (MultiCommandTool.main):
+ * Scripts/webkitpy/tool/multicommandtool_unittest.py:
+ (CommandTest.test_required_arguments):
+ * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng.py:
+ (AddSvnMimetypeForPng.run):
+ * Scripts/webkitpy/tool/steps/applypatch.py:
+ (ApplyPatch.run):
+ * Scripts/webkitpy/tool/steps/build.py:
+ (Build.run):
+ * Scripts/webkitpy/tool/steps/checkstyle.py:
+ * Scripts/webkitpy/tool/steps/closebug.py:
+ (CloseBug.run):
+ * Scripts/webkitpy/tool/steps/closebugforlanddiff.py:
+ (CloseBugForLandDiff.run):
+ * Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py:
+ (CloseBugForLandDiffTest.test_empty_state):
+ * Scripts/webkitpy/tool/steps/commit.py:
+ (Commit.run):
+ * Scripts/webkitpy/tool/steps/commit_unittest.py:
+ (CommitTest._test_check_test_expectations):
+ * Scripts/webkitpy/tool/steps/ensurelocalcommitifneeded.py:
+ (EnsureLocalCommitIfNeeded.run):
+ * Scripts/webkitpy/tool/steps/obsoletepatches.py:
+ (ObsoletePatches.run):
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog.run):
+ * Scripts/webkitpy/tool/steps/reopenbugafterrollout.py:
+ (ReopenBugAfterRollout.run):
+ * Scripts/webkitpy/tool/steps/runtests.py:
+ (RunTests.run):
+ * Scripts/webkitpy/tool/steps/runtests_unittest.py:
+ (RunTestsTest.test_webkit_run_unit_tests):
+ * Scripts/webkitpy/tool/steps/steps_unittest.py:
+ (StepsTest.test_update_step):
+ (StepsTest.test_runtests_args):
+ * Scripts/webkitpy/tool/steps/update.py:
+ (Update.run):
+ * Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py:
+ (UpdateChangeLogsWithReviewerTest.test_guess_reviewer_from_bug):
+ (UpdateChangeLogsWithReviewerTest.test_guess_reviewer_from_multipatch_bug):
+ * Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py:
+ (UpdateChangeLogsWithReviewer._guess_reviewer_from_bug):
+ (UpdateChangeLogsWithReviewer.run):
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps.py:
+ (UpdateChromiumDEPS._validate_revisions):
+ (UpdateChromiumDEPS.run):
+ * Scripts/webkitpy/tool/steps/validatechangelogs.py:
+ (ValidateChangeLogs._check_changelog_diff):
+ (ValidateChangeLogs.run):
+ * Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py:
+ (ValidateChangeLogsTest._assert_start_line_produces_output):
+ * Scripts/webkitpy/tool/steps/validatereviewer.py:
+ (ValidateReviewer.run):
+
+2012-11-26 Zan Dobersek <zandobersek@gmail.com>
+
+ Coverage testing in webkitpy should omit some paths
+ https://bugs.webkit.org/show_bug.cgi?id=103267
+
+ Reviewed by Dirk Pranke.
+
+ Omit testing coverage of any file under /usr directory and any file
+ that is of third party origin and was autoinstalled.
+
+ * Scripts/webkitpy/test/main.py:
+ (Tester._run_tests):
+
+2012-11-26 Jaehun Lim <ljaehun.lim@samsung.com>
+
+ Text Autosizing: Add Text Autosizing APIs for WK2
+ https://bugs.webkit.org/show_bug.cgi?id=100633
+
+ Reviewed by Sam Weinig.
+
+ Add test cases for Text Autosizing in WKPreferences.
+
+ * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
+ (TestWebKitAPI::TEST):
+
+2012-11-26 Pierre Rossi <pierre.rossi@gmail.com>
+
+ [Qt] REGRESSION(r135575): It made all tests assert
+ https://bugs.webkit.org/show_bug.cgi?id=103169
+
+ Reviewed by Simon Hausmann.
+
+ This fixes another regression introduced in r135515:
+ initializeWebKitQt shouldn't implicitely call initializeWebCoreQt
+ since it can be called from WebKit2 to initialize QStyle for testing.
+ This would then lead to things such as PlatformStrategies being
+ initialized twice.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp: Also propagate the change to DRT this time.
+ (WebCore::DumpRenderTree::DumpRenderTree):
+
+2012-11-24 Zan Dobersek <zandobersek@gmail.com>
+
+ Add the --order option to NRWT
+ https://bugs.webkit.org/show_bug.cgi?id=102229
+
+ Reviewed by Dirk Pranke.
+
+ The --order option controls in what order the gathered tests will be run.
+ There are 3 options:
+ - natural, the tests are sorted in natural order,
+ - random, the tests are sorted in random order,
+ - none, the tests are kept in the order in which they were specified through
+ arguments or the test list.
+
+ The natural option is the default one and maintains the current behavior.
+
+ The none option is primarily intended to be used with the --test-list option,
+ with the test list file expected to list specific test names.
+ When a directory is specified as one of the paths from under which tests should
+ be gathered and the none option is used, that path will expand to all the tests
+ under it, with these tests sorted in the natural order.
+
+ Using --order=random duplicated the behavior of the --randomize-order option, so
+ the latter is removed.
+
+ This patch also incorporates the change with which makes it is possible to specify
+ a test via arguments or the test list multiple tests and then have the test run
+ that many times.
+
+ * Scripts/webkitpy/common/find_files.py:
+ (find): Accept an optional sorting key that is used to sort files found in the directories
+ that the given paths specify.
+ (_normalized_find): Both paths that are then searched for the tests and the tests that
+ were found are now kept in lists. This makes it possible to run a test multiple times
+ by specifying it multiple times through arguments or the test list file.
+ (_normalized_find.sort_by_directory_key):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
+ (LayoutTestFinder.find_tests): Keep the paths where we should search for tests in a list.
+ (LayoutTestFinder.skip_tests): Subtracting from a set of paths is necessary.
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.__init__): The Sharder class no longer needs a test path separator.
+ (Sharder.__init__): Ditto.
+ (Sharder._resize_shards):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (SharderTests.get_shards): Modify the Shader initializing as required.
+ (SharderTests.test_multiple_locked_shards): The natural sorting and test name key unit tests
+ are now moved to the base Port unit tests.
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._prepare_lists): Keep the test names in a list. Order that list as specified by
+ the new --order option.
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.tests): This method should now return a list of all the tests found in the specified
+ paths.
+ (Port._real_tests): A list is required, so no conversion to a set is made.
+ (Port):
+ (Port.test_key): Place this method here for now, but it should really move into a separate
+ module.
+ (Port._natural_sort_key): Ditto.
+ (Port._natural_sort_key.tryint):
+ (Port._virtual_tests): A list is required, so the function now operates on that rather than
+ on a set.
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_find_with_skipped_directories_2): Adjust the test case to check for an empty
+ list rather than an empty set.
+ (PortTest.test_dont_require_http_server):
+ (NaturalCompareTest): The natural sorting unit tests are placed here for now.
+ (NaturalCompareTest.assert_cmp):
+ (NaturalCompareTest.test_natural_compare):
+ (KeyCompareTest): The test name key unit tests are placed here for now.
+ (KeyCompareTest.assert_cmp):
+ (KeyCompareTest.test_test_key):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args): Remove the --randomize-order option, it's now possible to replicate its behavior
+ by using --order=random.
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py: Add unit tests covering
+ various aspects of this change.
+ (MainTest.test_natural_order):
+ (MainTest):
+ (MainTest.test_natural_order_test_specified_multiple_times):
+ (MainTest.test_random_order):
+ (MainTest.test_random_order_test_specified_multiple_times):
+ (MainTest.test_no_order):
+ (MainTest.test_no_order_test_specified_multiple_times):
+ (MainTest.test_no_order_with_directory_entries_in_natural_order):
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (PrintExpectations.execute): Operate on a set of tests when printing out expectations.
+
+2012-11-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r135600.
+ http://trac.webkit.org/changeset/135600
+ https://bugs.webkit.org/show_bug.cgi?id=103173
+
+ It made EFL API test is failed (Requested by gyuyoung_mbp on
+ #webkit).
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/efl/PlatformUtilities.cpp:
+ (TestWebKitAPI::Util::sleep):
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+
+2012-11-23 Alexis Menard <alexis@webkit.org>
+
+ [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing.
+ https://bugs.webkit.org/show_bug.cgi?id=102104
+
+ Reviewed by Julien Chaffraix.
+
+ Protect the new feature behind a feature flag.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-11-23 Mario Sanchez Prada <mario@webkit.org>
+
+ Unreviewed. Update my e-mail address.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-23 Mateusz Leszko <m.leszko@samsung.com>
+
+ [EFL][GTK] Adapt accessibility feature to WebKitTestRunner.
+ https://bugs.webkit.org/show_bug.cgi?id=100757
+
+ Reviewed by Laszlo Gombos.
+
+ Allow to build accessibility feature in WebkitTestRunner for EFL Platform.
+ Updating CMake files due to changes from Bug 99011.
+
+ * WebKitTestRunner/InjectedBundle/AccessibilityController.cpp:
+ (WTR::AccessibilityController::AccessibilityController):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/AccessibilityController.h:
+ (AccessibilityController):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
+ (AccessibilityUIElement):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: - Removed gtk/gtk.h dependency.
+ * WebKitTestRunner/PlatformEfl.cmake: - Adding atk includes.
+
+2012-11-16 Yury Semikhatsky <yurys@chromium.org>
+
+ Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
+ https://bugs.webkit.org/show_bug.cgi?id=102510
+
+ Reviewed by Pavel Feldman.
+
+ Added missing includes.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-11-23 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Add support for PlatformWebView::simulateSpacebarKeyPress() in TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=103123
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add support for PlatformWebView::simulateSpacebarKeyPress() and enable
+ WebKit2 API test ResponsivenessTimerDoesntFireEarly.
+
+ * TestWebKitAPI/PlatformEfl.cmake: Enable ResponsivenessTimerDoesntFireEarly
+ test.
+ * TestWebKitAPI/efl/PlatformUtilities.cpp:
+ (TestWebKitAPI::Util::sleep): Use usleep() instead of sleep since the
+ test case is passing 0.5 seconds to sleep.
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress): Implemented.
+ (TestWebKitAPI):
+
+2012-11-23 Wojciech Bielawski <w.bielawski@samsung.com>
+
+ [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick()
+ https://bugs.webkit.org/show_bug.cgi?id=86881
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ eventSender object extended with contextClick() method in WebKitTestRunner.
+ contextClick() method returns an array of menu items objects with field 'title' containing title of single
+ context menu entry. According to some tests menu items objects shall also support 'click()' method, but it's not
+ delivered in this patch.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
+ * WebKitTestRunner/InjectedBundle/EventSendingController.cpp:
+ (WTR::EventSendingController::contextClick):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/EventSendingController.h:
+ (EventSendingController):
+
+2012-11-23 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Compiling against QtWebkit API requires QT_DLL to be defined
+ https://bugs.webkit.org/show_bug.cgi?id=102942
+
+ Reviewed by Tor Arne Vestbø.
+
+ Remove the requirement of having QT_DLL defined in order for the QWEBKIT_EXPORT
+ macro to be defined as Q_DECL_IMPORT. Instead unify the export macro definition
+ to follow the same rules as other Qt 5 modules, with the exception that instead of
+ QT_BUILD_WEBKIT_LIB we continue to use BUILDING_WEBKIT, because that's used also
+ in other cross-platform header files to determine the correct meaning of export
+ macros.
+
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/win32/default_post.prf:
+
+2012-11-23 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] QWebPage::shouldInterruptJavaScript should be virtual in Qt 5
+ https://bugs.webkit.org/show_bug.cgi?id=103111
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ This function was added as a slot during Qt 4.x times because adding
+ virtual functions breaks binary compatibility. This constraint is gone
+ with the initial release of WebKit with Qt 5, and therefore we can
+ make it virtual now.
+
+ The change is fully source compatible as existing "re-implementations"
+ as slots will now be called through it being a virtual function. They
+ become unused slots.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (WebCore::WebPage::shouldInterruptJavaScript):
+ (WebPage):
+ * QtTestBrowser/webpage.h:
+ (WebPage):
+
+2012-11-22 Peter Beverloo <peter@chromium.org>
+
+ [Chromium] Return an accurate exit code when running Android suites, and wait after restarting adb as root
+ https://bugs.webkit.org/show_bug.cgi?id=103065
+
+ Reviewed by Dirk Pranke.
+
+ This addresses two further reliability issues in the Android test running
+ scripts. Firstly, the run_tests.py script needs to have the --exit_code
+ argument passed in order to return non-zero codes, which we need for the
+ build master to distinguish failures from successful runs.
+
+ Secondly, it modifies the layout test runner to briefly wait (through
+ the wait-for-device command) after requesting a device to switch to root
+ mode. Without this waiting period, commands might get lost and thereby
+ unexpectedly fail.
+
+ * Scripts/run-api-tests:
+ * Scripts/run-chromium-webkit-unit-tests:
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._setup_test):
+ (ChromiumAndroidDriver._restart_adb_as_root):
+
+2012-11-22 Simon Hausmann <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
+
+ [Qt] Separate QWidget dependant code into separate WebKitWidgets static library
+ https://bugs.webkit.org/show_bug.cgi?id=102800
+
+ Reviewed by Tor Arne Vestbø.
+
+ This patch separates code that needs to use QWidget related APIs in
+ WebKit/qt/WebCoreSupport and Api from code that doesn't. This means for
+ example FrameLoaderClientQt.cpp remains in the WebKit1 static library,
+ while qwebpage.cpp and qwebframe.cpp become part of the WebKitWidgets
+ static library. WebKit1 is compiled without QT += widgets and therefore
+ any widget related dependency has been moved "up" and out of WebKit1 into
+ the WebKitWidgets library.
+
+ Between the code in WebKit.a and WebKitWidgets.a new adapters and
+ interfaces have been introduced, such as QWebPageAdapter and
+ QWebFrameAdapter. QWebPageAdapter, when used from WebKit1, is a way to
+ call out into the API layer, implemented by QWebPage (QWebPagePrivate).
+ The other way around if QWebPage wants to access WebCore or
+ WebCoreSupport related functionality, it will go through
+ QWebPageAdapater (as base class). The separation in the direction up
+ into the API layer is complete with this patch, no code in WebKit1
+ depends on QtWidgets. The separation the other way around, code in the
+ API layer not using any WebCore types, is not complete yet.
+
+ Some classes such as QWebSettings, QWebElement or
+ DumpRenderTreeSupportQt remain in WebKit1. While they are API layer,
+ they do not depend on widget related Qt APIs and they make much more
+ use of WebCore internal APIs and therefore are easier to keep in
+ WebKit1.
+
+ In the future we plan to place a real shared library boundary between
+ WebKit1 and WebKitWidgets, by keeping the WebKit1 static library as
+ part of the QtWebKit shared library and by turning the WebKitWidgets
+ static library into a shared one.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::WebPage::resetSettings):
+ (WebCore::WebPage::createWindow):
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ (WebCore::DumpRenderTree::initJSObjects):
+ (WebCore::DumpRenderTree::dumpFrameScrollPosition):
+ (WebCore::DumpRenderTree::dumpFramesAsText):
+ (WebCore::DumpRenderTree::dump):
+ (WebCore::DumpRenderTree::createWindow):
+ (WebCore::DumpRenderTree::pageAdapter):
+ (WebCore):
+ (WebCore::DumpRenderTree::mainFrameAdapter):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (DumpRenderTree):
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::contextClick):
+ (EventSender::scalePageBy):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::reset):
+ (TestRunner::display):
+ (TestRunner::closeWebInspector):
+ (TestRunner::showWebInspector):
+ (TestRunner::evaluateInWebInspector):
+ (TestRunner::setFrameFlatteningEnabled):
+ (TestRunner::goBack):
+ (TestRunner::setDefersLoading):
+ (TestRunner::pauseAnimationAtTimeOnElementWithId):
+ (TestRunner::pauseTransitionAtTimeOnElementWithId):
+ (TestRunner::numberOfActiveAnimations):
+ (TestRunner::setCaretBrowsingEnabled):
+ (TestRunner::setAuthorAndUserStylesEnabled):
+ (TestRunner::callShouldCloseOnWebView):
+ (TestRunner::setSmartInsertDeleteEnabled):
+ (TestRunner::setSelectTrailingWhitespaceEnabled):
+ (TestRunner::execCommand):
+ (TestRunner::isCommandEnabled):
+ (TestRunner::findString):
+ (TestRunner::elementDoesAutoCompleteForElementWithId):
+ (TestRunner::setMockDeviceOrientation):
+ (TestRunner::setGeolocationPermission):
+ (TestRunner::numberOfPendingGeolocationPermissionRequests):
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ (TestRunner::setMockGeolocationPosition):
+ (TestRunner::evaluateScriptInIsolatedWorld):
+ (TestRunner::addUserStyleSheet):
+ (TestRunner::setMinimumTimerInterval):
+ * DumpRenderTree/qt/TextInputControllerQt.cpp:
+ (TextInputController::selectedRange):
+ (TextInputController::firstRectForCharacterRange):
+ (TextInputController::unmarkText):
+ * DumpRenderTree/qt/WorkQueueItemQt.cpp:
+ (LoadAlternateHTMLStringItem::invoke):
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/production_build.prf:
+ * qmake/mkspecs/features/webkit_modules.prf:
+ * qmake/mkspecs/modules/webkitwidgets.prf: Added.
+
+2012-11-22 Christophe Dumez <christophe.dumez@intel.com>
+
+ WebKitTestRunner needs layoutTestController.setCacheModel
+ https://bugs.webkit.org/show_bug.cgi?id=42684
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add support for testRunner.setCacheModel to WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setCacheModel):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-11-22 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WTR] TestController::platformRunUntil should not do busy waiting
+ https://bugs.webkit.org/show_bug.cgi?id=101327
+
+ Reviewed by Simon Hausmann.
+
+ Avoid busy waiting for events in platformRunUntil while making
+ sure we don't change the behavior of modal event loops.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::~TestController):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+ * WebKitTestRunner/efl/TestControllerEfl.cpp:
+ (WTR::TestController::platformDestroy):
+ (WTR):
+ * WebKitTestRunner/gtk/TestControllerGtk.cpp:
+ (WTR::TestController::platformDestroy):
+ (WTR):
+ * WebKitTestRunner/mac/TestControllerMac.mm:
+ (WTR::TestController::platformDestroy):
+ (WTR):
+ * WebKitTestRunner/qt/TestControllerQt.cpp:
+ (TestController::RunLoop): Helper class to handle
+ the event loop logic
+ (WTR):
+ (WTR::TestController::RunLoop::RunLoop):
+ (WTR::TestController::RunLoop::runUntil): Use QEventLoop to implement
+ the run loop. This is the appropriate API to push the WaitForMoreEvents
+ flag to QCoreApplication::processEvents and also being able to exit the
+ loop if we have timed out.
+ (WTR::TestController::RunLoop::notifyDone):
+ (WTR::TestController::RunLoop::timerFired):
+ (WTR::TestController::RunLoop::runModal):
+ (WTR::TestController::notifyDone):
+ (WTR::TestController::platformInitialize):
+ (WTR::TestController::platformDestroy):
+ (WTR::TestController::platformRunUntil):
+ (WTR::TestController::runModal):
+ * WebKitTestRunner/win/TestControllerWin.cpp:
+ (WTR::TestController::platformDestroy):
+ (WTR):
+
+2012-11-22 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] Enable WKPreferences and AboutBlankLoad API tests
+ https://bugs.webkit.org/show_bug.cgi?id=102926
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add missing bits needed by WKPreferences and AboutBlankLoad API
+ tests in the test harness and enable these tests on EFL port.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/efl/PlatformUtilities.cpp:
+ (TestWebKitAPI::Util::MIMETypeForWKURLResponse):
+ (Util):
+
+2012-11-21 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK][WTR] Implement AccessibilityUIElement::stringValue
+ https://bugs.webkit.org/show_bug.cgi?id=102951
+
+ Reviewed by Martin Robinson.
+
+ Implement AccessibilityUIElement::stringValue in the ATK backend
+ in the same manner it is implemented in DumpRenderTree.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+ (WTR::replaceCharactersForResults):
+ (WTR):
+ (WTR::AccessibilityUIElement::stringValue):
+
+2012-11-21 Vineet Chaudhary <rgf748@motorola.com>
+
+ Unreviewed. Adding myself to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-21 Tien-Ren Chen <trchen@chromium.org>
+
+ [chromium] Device scale factor should be no-op when applyDeviceScaleFactorInCompositor == 0
+ https://bugs.webkit.org/show_bug.cgi?id=100061
+
+ Reviewed by Adam Barth.
+
+ On Android we're using a different pixel scaling implementation
+ (WebCore::Settings::applyDefaultDeviceScaleFactorInCompositor() == 0) than other
+ platforms. In this mode, we don't make use of device-independent pixels. Device
+ scale factor is provided to WebKit and get merged into page scale factor. Other
+ than that device scale factor should have no effects on rendering.
+
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::applyTo):
+
+2012-11-21 Fady Samuel <fsamuel@chromium.org>
+
+ Clear MousePressed state on context menu to avoid initiating a drag
+ https://bugs.webkit.org/show_bug.cgi?id=101786
+
+ Reviewed by Ojan Vafai.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::EventSender):
+ (WebTestRunner::EventSender::contextClick):
+ Only send a MouseUp on Windows. Keep the current mouse pressed state when
+ calling up a context menu.
+
+2012-11-21 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] KURL unit test crashing when tiled backing store is enabled on Release Bots
+ https://bugs.webkit.org/show_bug.cgi?id=102895
+
+ Reviewed by Gyuyoung Kim.
+
+ Change the link order so it wont override the new operator on gtest.
+ Looks like it was crashing because an allocator mismatch (using libc's
+ new and later fastMalloc delete. Thanks to Kangil Han for hinting on
+ the fastMalloc issue.
+
+ * TestWebKitAPI/CMakeLists.txt:
+
+2012-11-21 Kentaro Hara <haraken@chromium.org>
+
+ Unreviewed, rolling out r135340.
+ http://trac.webkit.org/changeset/135340
+ https://bugs.webkit.org/show_bug.cgi?id=102492
+
+ It broke Safari's internal build
+
+ * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
+ (new):
+ (GenerateModule):
+ (GenerateInterface):
+ (finish):
+
+2012-11-21 Yael Aharon <yael.aharon@intel.com>, Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
+ https://bugs.webkit.org/show_bug.cgi?id=101526
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Turn on WTF_USE_TILED_BACKING_STORE for EFL port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * TestWebKitAPI/CMakeLists.txt: No include KURL.cpp because of API test crash.
+
+2012-11-21 Jongseok Yang <js45.yang@samsung.com>
+
+ [EFL][WK2] Rename ewk_view_setting_encoding_custom_XXX to ewk_view_custom_encoding_XXX
+ https://bugs.webkit.org/show_bug.cgi?id=102867
+
+ Reviewed by Gyuyoung Kim.
+
+ Rename ewk_view_setting_encoding_custom_XXX to ewk_view_custom_encoding_XXX.
+
+ ewk_view_setting_encoding_custom_XXX APIs might be misunderstanded as the "setting" word
+ because ewk_view_setting_encoding_custom_set triggers the "reload" operation.
+ And ewk_view_setting_XXX is not correct because there is ewk_settings object for settings.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+
+2012-11-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r133859.
+ http://trac.webkit.org/changeset/133859
+ https://bugs.webkit.org/show_bug.cgi?id=102875
+
+ This patch makes API test broken (Requested by gyuyoung on
+ #webkit).
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-20 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] Add Ewk_Window_Features API and related UI callbacks
+ https://bugs.webkit.org/show_bug.cgi?id=99114
+
+ Reviewed by Gyuyoung Kim.
+
+ Implemented window_create and window_close smartcallback functions.
+
+ * MiniBrowser/efl/main.c:
+ (on_window_create):
+ (on_window_close):
+ (window_create):
+
+2012-11-20 Ojan Vafai <ojan@chromium.org>
+
+ Simplify builder filters now that we have lists of which builders run which tests
+ https://bugs.webkit.org/show_bug.cgi?id=102849
+
+ Reviewed by Dirk Pranke.
+
+ We only need filters when we load the same master for multiple groups in the
+ same test type, i.e. when we need to only include some of the builders that run
+ a given test suite on a given master.
+
+ Also, get rid of the DEFAULT_BUILDER enum. We were always using the first builder anyways.
+ Now just make it a method on BuilderGroup.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (BuilderGroup.prototype.append):
+ (BuilderGroup.prototype.setup):
+ (BuilderGroup.prototype._defaultBuilder):
+ (BuilderGroup.prototype.master):
+ (requestBuilderList):
+ (isChromiumWebkitTipOfTreeTestRunner):
+ (isChromiumWebkitDepsTestRunner):
+ (loadBuildersList):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (test):
+
+2012-11-20 Ojan Vafai <ojan@chromium.org>
+
+ Remove perfav master for webkit_unit_tests and test_shell_tests.
+ There are no bots on this master that run these tests.
+ * TestResultServer/static-dashboards/builders.js:
+
+2012-11-20 Ojan Vafai <ojan@chromium.org>
+
+ Remove special case for layout tests when builders fail to load
+ https://bugs.webkit.org/show_bug.cgi?id=102842
+
+ Reviewed by Tony Chang.
+
+ Now that we load only builders that actually run the given test
+ type, we can reliably show errors to the users because it
+ represents a broken bot.
+ * TestResultServer/static-dashboards/loader.js:
+
+2012-11-15 Ojan Vafai <ojan@chromium.org>
+
+ Generate a list of builders/test suites from the buildbot json
+ https://bugs.webkit.org/show_bug.cgi?id=102443
+
+ Reviewed by Dirk Pranke.
+
+ Instead of the cludgy things we do now to track which bots run which tests,
+ we generate all that data from the buildbots' json files.
+ This is the minimal amount to keep everything working. Once this lands,
+ we can also do a bunch of followup cleanup.
+
+ For now we commit the generated data. In theory, in the future, we could
+ have the test results server generate the data on the fly.
+
+ For the sake of easily understanding what changes when we run the generate script,
+ also checkin a pretty printed version of the output. The pretty printed version
+ is too large to serve as part of the flakiness dashboard though.
+
+ This also has the benefit of making the dashboard load much faster since
+ we no longer ever need to block on requests to buildbot.
+
+ * TestResultServer/generate_builders_json.py: Added.
+ (master_json_url):
+ (builder_json_url):
+ (cached_build_json_url):
+ (fetch_json):
+ (insert_builder_and_test_data):
+ (main):
+ * TestResultServer/generate_builders_json_unittest.py: Added.
+ (GenerateBuildersJsonTest):
+ (GenerateBuildersJsonTest.test_master_json_url):
+ (GenerateBuildersJsonTest.test_builder_json_url):
+ (GenerateBuildersJsonTest.test_cached_build_json_url):
+ (GenerateBuildersJsonTest.test_generate_json_data):
+ (GenerateBuildersJsonTest.test_generate_json_data.dummy_fetch_json):
+ * TestResultServer/static-dashboards/builders-pretty.jsonp: Added.
+ * TestResultServer/static-dashboards/builders.js:
+ (LOAD_BUILDBOT_DATA):
+ (BuilderGroup):
+ (BuilderGroup.prototype.append):
+ (BuilderGroup.prototype.master):
+ (requestBuilderList):
+ * TestResultServer/static-dashboards/builders.jsonp: Added.
+ * TestResultServer/static-dashboards/builders_unittests.js: Added.
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+ (showPopupForBuild):
+ (htmlForTestResults):
+ (htmlForIndividualTestOnAllBuildersWithResultsLinks):
+ (loadExpectationsLayoutTests):
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+ (resetGlobals):
+ (test):
+ * TestResultServer/static-dashboards/loader.js:
+ * TestResultServer/static-dashboards/loader_unittests.js:
+ * TestResultServer/static-dashboards/run-embedded-unittests.html:
+ * TestResultServer/static-dashboards/run-unittests.html:
+ * TestResultServer/static-dashboards/timeline_explorer.html:
+
+2012-11-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [WTR][Qt] Enable fixedLayout when needed by the test
+ https://bugs.webkit.org/show_bug.cgi?id=102811
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Create a flickable view for CSS Device Adaptation tests. This is
+ crucial for testing them since they will change the size of the
+ viewport.
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::viewSupportsOptions):
+ (WTR):
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-20 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [WTR] WebKitTestRunner should be able to run tests using fixed layout
+ https://bugs.webkit.org/show_bug.cgi?id=102517
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ WTR will now request the creation of a view that has a page using
+ fixed layout for CSS Device Adaptation tests, but this feature might
+ be used in the future by any other test that requires a mobile-like type
+ of viewport (i.e. Viewport META tests should be ported).
+
+ The viewport type of the other tests remains unchanged and is restored
+ when the runner leaves the device-adapt/ folder.
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR):
+ (WTR::shouldUseFixedLayout):
+ (WTR::updateLayoutType):
+ (WTR::TestInvocation::invoke):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::viewSupportsOptions):
+ (WTR):
+
+2012-11-20 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] REGRESSION(r128174): Fast build path doesn't work now
+ https://bugs.webkit.org/show_bug.cgi?id=100360
+
+ Reviewed by Tor Arne Vestbø.
+
+ Use a separated .builtRevisions.cache file instead of .qmake.cache to cache built SVN revisions.
+
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-11-20 Mateusz Leszko <m.leszko@samsung.com>
+
+ [EFL][GTK]Sharing accessibility support in WebKitTestRunner.
+ https://bugs.webkit.org/show_bug.cgi?id=99011
+
+ Reviewed by Martin Robinson.
+
+ Accessibility files from gtk folder are moved to atk folder due to common implementation. Event Type naming changed to default, from Gtk to ATK.
+
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/gtk/AccessibilityControllerGtk.cpp.
+ (WTR::AccessibilityController::logAccessibilityEvents):
+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: Renamed from Tools/WebKitTestRunner/InjectedBundle/gtk/AccessibilityUIElementGtk.cpp.
+
+2012-11-20 Zan Dobersek <zandobersek@gmail.com>
+
+ webkitpy unit tests should run serially when checking code coverage
+ https://bugs.webkit.org/show_bug.cgi?id=102693
+
+ Reviewed by Dirk Pranke.
+
+ When checking code coverage, the unit tests should not be run in parallel
+ as this causes the tracing functions (set via sys.settrace in the coverage
+ module) being overriden, resulting in incorrect coverage reports.
+
+ * Scripts/webkitpy/test/main.py:
+ (Tester._run_tests):
+
+2012-11-19 Viatcheslav Ostapenko <v.ostapenko@samsung.com>
+
+ [EFL] Add fallback for WebkitTestRunner if opengl is not available.
+ https://bugs.webkit.org/show_bug.cgi?id=102704
+
+ Reviewed by Laszlo Gombos.
+
+ Add fallback to non-opengl evas engine in WebkitTestRunner if opengl is not available.
+
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::initEcoreEvas):
+
+2012-11-19 Dimitri Glazkov <dglazkov@chromium.org>
+
+ [garden-o-matic] Switch frontend to use the gardeningserver.
+ https://bugs.webkit.org/show_bug.cgi?id=102712
+
+ Reviewed by Dirk Pranke.
+
+ Instead of serving garden-o-matic frontend as file, we now serve it from the gardening server. This enables
+ using garden-o-matic in a Chrome OS device, with a separate machine as a headless server.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html: Changed CSP policy to use 'self'.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout.js: Removed now-unnecessary references to kLocalServerURL.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js: Tweaked the test expectation.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js: Removed kLocalServerURL.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/controllers.js: Spuriously updated the name of the webkit-patch command.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js: Removed kLocalServerURL.
+ * Scripts/webkitpy/tool/servers/gardeningserver.py: Changed to use the new launch URL.
+
+2012-11-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r135172.
+ http://trac.webkit.org/changeset/135172
+ https://bugs.webkit.org/show_bug.cgi?id=102710
+
+ Broke some WebKit2 api tests :( (Requested by japhet on
+ #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::updateForCommittedLoad):
+
+2012-11-19 Dimitri Glazkov <dglazkov@chromium.org>
+
+ [garden-o-matic] Enable serving garden-o-matic with gardeningserver.
+ https://bugs.webkit.org/show_bug.cgi?id=102703
+
+ Reviewed by Ojan Vafai.
+
+ To enable gardening from a Chrome OS device, we need the ability to serve garden-o-matic
+ from the same origin as the gardening server. This change gently massages the current
+ logic to adapt an extension-sniffing-based approach of identifying static files,
+ rather than requiring an explicit list.
+
+ * Scripts/webkitpy/tool/servers/reflectionhandler.py:
+ (ReflectionHandler): Replaced STATIC_FILE_NAMES with STATIC_FILE_EXTENSIONS.
+ (ReflectionHandler._handle_request): Changed the logic to smell for extensions, rather than specific files.
+ * Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py: Added.
+
+2012-11-19 Ojan Vafai <ojan@chromium.org>
+
+ Add DOM and HTML watchlists and add myself to a bunch of lists
+ https://bugs.webkit.org/show_bug.cgi?id=102707
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-11-19 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move methods that only use the WebKit API from DRTTestRunner to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=102676
+
+ Reviewed by Tony Chang.
+
+ In addition, I've replaced parsePageNumber with the more commonly used
+ cppVariantToInt32, moved abortModal to the list of stubbed out methods,
+ and removed setAutomaticLinkDetectionEnabled which wasn't used
+ anywhere.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ (DRTTestRunner::overridePreference):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner::TestRunner::reset):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::setTabKeyCyclesThroughElements):
+ (WebTestRunner::TestRunner::setAsynchronousSpellCheckingEnabled):
+ (WebTestRunner::TestRunner::execCommand):
+ (WebTestRunner::TestRunner::isCommandEnabled):
+ (WebTestRunner::TestRunner::pauseAnimationAtTimeOnElementWithId):
+ (WebTestRunner::TestRunner::pauseTransitionAtTimeOnElementWithId):
+ (WebTestRunner::TestRunner::elementDoesAutoCompleteForElementWithId):
+ (WebTestRunner::TestRunner::numberOfActiveAnimations):
+ (WebTestRunner::TestRunner::callShouldCloseOnWebView):
+ (WebTestRunner::TestRunner::setDomainRelaxationForbiddenForURLScheme):
+ (WebTestRunner::TestRunner::evaluateScriptInIsolatedWorldAndReturnValue):
+ (WebTestRunner::TestRunner::evaluateScriptInIsolatedWorld):
+ (WebTestRunner::TestRunner::setIsolatedWorldSecurityOrigin):
+ (WebTestRunner::TestRunner::setIsolatedWorldContentSecurityPolicy):
+ (WebTestRunner::TestRunner::addOriginAccessWhitelistEntry):
+ (WebTestRunner::TestRunner::removeOriginAccessWhitelistEntry):
+ (WebTestRunner::TestRunner::hasCustomPageSizeStyle):
+ (WebTestRunner::TestRunner::forceRedSelectionColors):
+ (WebTestRunner::TestRunner::addUserScript):
+ (WebTestRunner::TestRunner::addUserStyleSheet):
+ (WebTestRunner::TestRunner::startSpeechInput):
+ (WebTestRunner::TestRunner::loseCompositorContext):
+ (WebTestRunner::TestRunner::markerTextForListItem):
+ (WebTestRunner::TestRunner::findString):
+ (WebTestRunner::TestRunner::setMinimumTimerInterval):
+ (WebTestRunner::TestRunner::setAutofilled):
+ (WebTestRunner::TestRunner::setValueForUser):
+ (WebTestRunner::TestRunner::enableFixedLayoutMode):
+ (WebTestRunner::TestRunner::setFixedLayoutSize):
+ (WebTestRunner::TestRunner::selectionAsMarkup):
+ (WebTestRunner::TestRunner::setTextSubpixelPositioning):
+ (WebTestRunner::TestRunner::resetPageVisibility):
+ (WebTestRunner::TestRunner::setPageVisibility):
+ (WebTestRunner::TestRunner::setTextDirection):
+ (WebTestRunner::TestRunner::textSurroundingNode):
+ (WebTestRunner::TestRunner::workerThreadCount):
+ (WebTestRunner::TestRunner::cppVariantToBool):
+ (WebTestRunner::TestRunner::cppVariantToInt32):
+ (WebTestRunner::TestRunner::cppVariantToWebString):
+ (WebTestRunner::TestRunner::cppVariantToWebStringArray):
+ (WebTestRunner::TestRunner::printErrorMessage): formerly logErrorToConsole
+ (WebTestRunner::TestRunner::fallbackMethod):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebKit):
+ (WebTestRunner::TestRunner::setWebView):
+ (TestRunner):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createMainWindow):
+ (TestShell::~TestShell):
+
+2012-11-19 Yusuke Sato <yusukes@chromium.org>
+
+ [Chromium] Flash cannot receive scroll events when threaded compositing is in use
+ https://bugs.webkit.org/show_bug.cgi?id=101423
+
+ Reviewed by James Robinson.
+
+ Call setWantsWheelEvents(true) in initialize() so that gesture-events and transformed-events tests in
+ LayoutTests/platform/chromium/plugins/ will not fail even if a buildbot introduces threaded compositing
+ in the future.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::initialize):
+
+2012-11-19 Nate Chapin <japhet@chromium.org>
+
+ Move empty loading to DocumentLoader, simplify FrameLoader::init()
+ https://bugs.webkit.org/show_bug.cgi?id=101512
+
+ Reviewed by Adam Barth.
+
+ Chromium DRT has some code that doesn't play nicely with empty urls and incorrectly
+ interprets them as a non-empty load. This ensures
+ http/tests/navigation/new-window-redirect-history.html continues to pass
+ in chromium.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::updateForCommittedLoad):
+
+2012-11-19 Vincent Scheib <scheib@chromium.org>
+
+ [Chromium] Remove WebKit::WebRuntimeFeatures::enablePointerLock.
+ https://bugs.webkit.org/show_bug.cgi?id=96946
+
+ Reviewed by Adam Barth.
+
+ The runtime flag functionality has already been removed.
+ Now that Chromium no longer has a compile dependency on this
+ API, it can be removed as well.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2012-11-19 Kihong Kwon <kihong.kwon@samsung.com>
+
+ Add PROXIMITY_EVENTS feature
+ https://bugs.webkit.org/show_bug.cgi?id=102658
+
+ Reviewed by Kentaro Hara.
+
+ Add PROXIMITY_EVENTS feature to FeatureList and qmake.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-11-19 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WTR] Memory leak in TestController::initialize()
+ https://bugs.webkit.org/show_bug.cgi?id=102616
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Remove call to WKStringCreateWithUTF8CString() to construct
+ the icon database path which was leaking memory since the
+ returned WKStringRef was not adopted. The code now uses
+ WTF::String instead of std::string and converts it to a
+ WKStringRef using toWK().
+
+ * WebKitTestRunner/StringFunctions.h:
+ (WTR::toWK): Overload toWK() to take a WTF::String in
+ argument.
+ (WTR):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+
+2012-11-19 Kentaro Hara <haraken@chromium.org>
+
+ Remove IDLStructure.pm
+ https://bugs.webkit.org/show_bug.cgi?id=102642
+
+ Reviewed by Adam Barth.
+
+ Previously IDLStructure.pm was full of regular expressions to
+ parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
+ just contains several data structures for the IDL parser. We can
+ move them to IDLParser.pm and thus remove IDLStructure.pm.
+
+ No tests. No change in generated code.
+
+ * WebKitTestRunner/DerivedSources.make:
+ * WebKitTestRunner/GNUmakefile.am:
+ * WebKitTestRunner/InjectedBundle/DerivedSources.pri:
+
+2012-11-18 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL] Not to include "ewk_view_private.h" in Tools
+ https://bugs.webkit.org/show_bug.cgi?id=102644
+
+ Reviewed by Gyuyoung Kim.
+
+ Include ewk_view.h instead of ewk_view_private.h in Tools
+
+ * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
+
+2012-11-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r135104.
+ http://trac.webkit.org/changeset/135104
+ https://bugs.webkit.org/show_bug.cgi?id=102638
+
+ Should not use commit queue to add people to committer list.
+ (Requested by ap_ on #webkit).
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-18 Vivek Galatage <vivek.vg@samsung.com>
+
+ Add myself to committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=102636
+
+ Reviewed by Laszlo Gombos.
+
+ Add myself to committers.py
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-18 Genevieve Mak <gmak@rim.com>
+
+ [BlackBerry] Enable Touch Sliders
+ https://bugs.webkit.org/show_bug.cgi?id=102516
+
+ Reviewed by Rob Buis.
+
+ Enabled for BlackBerry only
+ PR #242781
+ PR #176014
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-17 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Remove unused code I wrote a long time ago from gardeningserver.py
+ https://bugs.webkit.org/show_bug.cgi?id=102605
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/servers/gardeningserver.py: Removed.
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py: Removed.
+
+2012-11-16 Tony Chang <tony@chromium.org>
+
+ Remove ENABLE_CSS_HIERARCHIES since it's no longer in use
+ https://bugs.webkit.org/show_bug.cgi?id=102554
+
+ Reviewed by Andreas Kling.
+
+ As mentioned in https://bugs.webkit.org/show_bug.cgi?id=79939#c41 ,
+ we're going to revist this feature once additional vendor support is
+ achieved.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move stubs from DRTTestRunner to TestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=102489
+
+ Reviewed by Adam Barth.
+
+ This is part of moving all methods from DRTTestRunner to TestRunner.
+ Instead of keeping one stub per method, I'm using a shared stub to
+ clean up the code.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner::TestRunner::TestRunner):
+ (WebTestRunner):
+ (WebTestRunner::TestRunner::fallbackMethod):
+ (WebTestRunner::TestRunner::notImplemented):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner):
+ (TestRunner):
+ (WebTestRunner::TestRunner::setDelegate):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createMainWindow):
+ (TestShell::~TestShell):
+
+2012-11-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] fake drag drop operations in the WebTestProxyBase instead of the WebViewHost
+ https://bugs.webkit.org/show_bug.cgi?id=102495
+
+ Reviewed by Adam Barth.
+
+ When a drag operation is initiated in a layout test, we need to
+ simulate a corresponding drop event, otherwise the WebViewImpl will sit
+ there waiting for it. Instead of having the embedder taking care of
+ this, move this into the TestRunner library.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::startDragging):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::startDragging):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-11-16 Tien-Ren Chen <trchen@chromium.org>
+
+ Rename applyDefaultDeviceScaleFactorInCompositor to setApplyDeviceScaleFactorInCompositor
+ https://bugs.webkit.org/show_bug.cgi?id=102462
+
+ Reviewed by James Robinson.
+
+ As we no longer have this "default" device scale factor.
+
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::applyTo):
+
+2012-11-15 Takashi Sakamoto <tasak@google.com>
+
+ [Win] key event's location does not work on Windows platform.
+ https://bugs.webkit.org/show_bug.cgi?id=89742
+
+ Reviewed by Brent Fulgham.
+
+ Modified keyDownCallback to use lparam to specify left-hand keys or
+ right-hand keys.
+
+ * DumpRenderTree/win/EventSender.cpp:
+ (makeKeyDataForScanCode):
+ Given a virtual keycode, generate scancode and extended key bit of
+ lparam.
+ (keyDownCallback):
+ Use lparam for left-hand and right-hand keys, because Windows doesn't
+ directly provide a virtual keycode which distinguishes between
+ left-hand and right-hand. For example, when control key is pressed,
+ wparam has VK_CONTROL, neither VK_RCONTROL nor VK_LCONTROL.
+
+2012-11-16 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
+ https://bugs.webkit.org/show_bug.cgi?id=102386
+
+ Reviewed by Adam Barth.
+
+ Adding mock data channel functionality.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::openDataChannel):
+
+2012-11-16 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] delete unused testRunner methods
+ https://bugs.webkit.org/show_bug.cgi?id=102479
+
+ Reviewed by Adam Barth.
+
+ These methods aren't used by any layout test. Remove them to avoid bit rot
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::reset):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::shouldBeginEditing):
+ (WebViewHost::shouldEndEditing):
+ (WebViewHost::shouldInsertNode):
+ (WebViewHost::shouldInsertText):
+ (WebViewHost::shouldChangeSelectedRange):
+ (WebViewHost::shouldDeleteRange):
+ (WebViewHost::shouldApplyStyle):
+ (WebViewHost::startDragging):
+ (WebViewHost::enterFullScreenNow):
+ (WebViewHost::exitFullScreenNow):
+
+2012-11-15 Alexey Proskuryakov <ap@apple.com>
+
+ Private Browsing is a per-page setting that sets a global value
+ https://bugs.webkit.org/show_bug.cgi?id=67870
+
+ Reviewed by Sam Weinig.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
+ Call _switchNetworkLoaderToNewTestingSession before making other settings, so that
+ they would actually apply to the testing session.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::initialize):
+ (WTR::InjectedBundle::beginTesting):
+ Only call WKBundleSwitchNetworkLoaderToNewTestingSession once per process, matching
+ WebKit1. I'm not fully sure what is going wrong, but apparently creating mutiple
+ sessions with the same identifier doesn't quite work.
+
+2012-11-16 Yael Aharon <yael.aharon@intel.com>
+
+ Unreviewed. Help bugzilla find me.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-16 Peter Beverloo <peter@chromium.org>
+
+ Running TestWebKitAPI and webkit_unit_tests for Chromium Android should defer to the Chromium-sided test runner
+ https://bugs.webkit.org/show_bug.cgi?id=102245
+
+ Reviewed by Tony Chang.
+
+ When running TestWebKitAPI and webkit_unit_test for Chromium Android, defer
+ the actual running part to the test runner which lives on the Chromium side.
+ Re-implementing or even generalizing the device-interaction part in WebKit
+ is error prone and not worth the effort.
+
+ * Scripts/run-api-tests:
+ * Scripts/run-chromium-webkit-unit-tests:
+
+2012-11-15 Yury Semikhatsky <yurys@chromium.org>
+
+ Memory instrumentation: add code for reporting stack traces of unknown instrumented objects
+ https://bugs.webkit.org/show_bug.cgi?id=102384
+
+ Reviewed by Pavel Feldman.
+
+ Updated return type in accord with the changes in MemoryInstrumentationClient.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-11-15 Gustavo Noronha Silva <gns@gnome.org>
+
+ [GTK] Split WebCore/platform into a separate library
+ https://bugs.webkit.org/show_bug.cgi?id=94435
+
+ Reviewed by Martin Robinson.
+
+ More people have been reporting problems when linking WebCore because
+ the command line limit is being exceeded. Splitting WebCore a bit more
+ is in order.
+
+ * GNUmakefile.am: link libWebCorePlatform into DRT
+
+2012-11-15 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Stop using the WebCompositorSupport methods for changing settings
+ https://bugs.webkit.org/show_bug.cgi?id=101968
+
+ Reviewed by James Robinson.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setPerTilePaintingEnabled):
+ (TestShell::setAcceleratedAnimationEnabled):
+
+2012-11-15 Tony Chang <tony@chromium.org>
+
+ Generate Settings from a .in file
+ https://bugs.webkit.org/show_bug.cgi?id=100393
+
+ Reviewed by Adam Barth.
+
+ Add the generated WebCore files to the include dir.
+
+ * TestWebKitAPI/CMakeLists.txt:
+ * WebKitTestRunner/CMakeLists.txt:
+
+2012-11-15 Roger Fong <roger_fong@apple.com>
+
+ Make old-run-webkit-tests handle setting the results directory properly.
+ https://bugs.webkit.org/show_bug.cgi?id=102273
+ <rdar://problem/11571607>
+
+ Reviewed by Timothy Horton.
+
+ A call to chdirWebkit in old-run-webkit-tests set the current working directory to the OpenSource folder.
+ Thus setting --results-directory to OpenSource/layout-test-results would create OpenSource/layout-test-results inside the main OpenSource folder.
+ This caused many other problems including failure to upload test results and failed future test runs.
+ The solution is to save the current working directory before calling chdirWebKit and then reconstructing the full path to the results directory
+ using the saved directory when setting $testResultsDirectory.
+
+ * Scripts/old-run-webkit-tests:
+
+2012-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r134800 and r134805.
+ http://trac.webkit.org/changeset/134800
+ http://trac.webkit.org/changeset/134805
+ https://bugs.webkit.org/show_bug.cgi?id=102417
+
+ This patch broke chromium port (Requested by jianli on
+ #webkit).
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::openDataChannel):
+
+2012-11-15 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
+ https://bugs.webkit.org/show_bug.cgi?id=102386
+
+ Reviewed by Adam Barth.
+
+ Adding mock data channel functionality.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::openDataChannel):
+
+2012-11-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r134649 and r134665.
+ http://trac.webkit.org/changeset/134649
+ http://trac.webkit.org/changeset/134665
+ https://bugs.webkit.org/show_bug.cgi?id=102413
+
+ Broke a ton of downstream chromium tests (Requested by japhet
+ on #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::updateForCommittedLoad):
+
+2012-11-15 Andreas Kling <akling@apple.com>
+
+ Update my e-mail address.
+
+ Rubber-stamped by Anders Koivisto.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-15 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ [EFL] Bump Harfbuzz to allow fixing bug 101009 on EFL
+ https://bugs.webkit.org/show_bug.cgi?id=101323
+
+ Reviewed by Martin Robinson.
+
+ Bumping Harfbuzz to newer version so that we can remove the
+ ifdef round the fix for bug 101009 for EFL, too.
+ We're using the zip snapshot since jhbuild can fallback to the previously
+ downloaded blob in case of network failures which leads to better
+ buildbot robustness. This zip snapshot currently needs to be locally
+ patched to fix ICU detection on systems that don't have icu pkg-config files.
+ The patch is suggested for merging into HarfBuzz. We can remove it locally
+ once it's accepted into HarfBuzz upstream.
+
+ * efl/patches/harfbuzz-icu-detection-fix.patch: Applied after retrieving source to fix harfbuzz detection on systems that don't have pkg-config files for it.
+ * efl/jhbuild.modules: Bumping harfbuzz version.
+
+2012-11-15 Alexey Proskuryakov <ap@apple.com>
+
+ [Mac] Implement WTR --no-timeout-at-all option
+ https://bugs.webkit.org/show_bug.cgi?id=102251
+
+ Reviewed by Eric Carlson.
+
+ * WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformRunUntil):
+ Just do it, and convert to Objective C on the way for simplicity.
+
+2012-11-14 Ryuan Choi <ryuan.choi@gmail.com>
+
+ [EFL] Port tiled backing store
+ https://bugs.webkit.org/show_bug.cgi?id=71352
+
+ Reviewed by Gyuyoung Kim.
+
+ * EWebLauncher/main.c: Added option to test the WebCore's tiled backing store.
+ (_User_Arguments):
+ (windowCreate):
+ (parseUserArguments):
+
+2012-11-14 Andy Estes <aestes@apple.com>
+
+ Fix the build.
+
+ * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h:
+
+2012-11-14 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: consolidate webkit-base-finding code
+ https://bugs.webkit.org/show_bug.cgi?id=102007
+
+ Reviewed by Eric Seidel.
+
+ This patch creates a new "WebKitFinder" class that other
+ modules can use to find the top of the WebKit tree and
+ commonly used subdirectories. This logic was in the
+ webkitpy.layout_test.port classes but wasn't specific to those
+ classes and now can be used by other modules without needing a port
+ (e.g., by the check-webkit-style python linter).
+
+ This code is somewhat redundant with the code for find_checkout_root()
+ in the scm modules, but it does not rely on the presence of a version
+ control system to work. This is a requirement for some uses of the
+ tree (e.g., Chromium tester checkouts).
+
+ This patch removes most of the logic from the layout_tests.port.config
+ module and makes that as private as possible. Now we just need to move
+ the default_configuration and flag_from_configuration logic into
+ DeprecatedPort (or someplace else appropriate) and we can finish
+ getting rid of the Config class (but that is a separate patch).
+
+ * Scripts/webkitpy/common/webkit_finder.py: Added.
+ (WebKitFinder):
+ (WebKitFinder.__init__):
+ (WebKitFinder.webkit_base):
+ (WebKitFinder.path_from_webkit_base):
+ (WebKitFinder.path_to_script):
+ (WebKitFinder.layout_tests_dir):
+ (WebKitFinder.perf_tests_dir):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.__init__):
+ (Port):
+ (Port.webkit_base):
+ (Port.path_from_webkit_base):
+ (Port.path_to_script):
+ (Port.layout_tests_dir):
+ (Port.perf_tests_dir):
+ (Port.set_option_default):
+ (Port._run_script):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_diff_text):
+ * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+ (ChromiumLinuxPort._determine_driver_path_statically):
+ * Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
+ * Scripts/webkitpy/layout_tests/port/config.py:
+ (Config.__init__):
+ (Config.build_directory):
+ (Config.default_configuration):
+ (Config._read_configuration):
+ * Scripts/webkitpy/layout_tests/port/config_mock.py: Removed.
+ * Scripts/webkitpy/layout_tests/port/config_unittest.py:
+ (ConfigTest.test_default_configuration__standalone):
+ (ConfigTest.test_default_configuration__scripterror):
+ * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+ (DriverTest.make_port):
+ (DriverTest.test_no_timeout):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.setup_environ_for_server):
+ * Scripts/webkitpy/layout_tests/port/mac.py:
+ (MacPort.show_results_html_file):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (TestWebKitPort.__init__):
+ (PortTestCase.make_port):
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+ (XvfbDriverTest.make_driver):
+ (XvfbDriverTest.test_stop):
+ * Scripts/webkitpy/style/checkers/python.py:
+ (Pylinter.__init__):
+
+2012-11-14 Dana Jansens <danakj@chromium.org>
+
+ [chromium] WebPreferences reset() should set perTilePainting and acceleratedAnimation settings to false.
+ https://bugs.webkit.org/show_bug.cgi?id=102296
+
+ Reviewed by James Robinson.
+
+ These settings are always set by TestShell anyhow, but we should be
+ setting them to false here along with everything else.
+
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+
+2012-11-08 Andy Estes <aestes@apple.com>
+
+ [WebKit2] Need API in UIProcess to enable loading of custom protocols
+ https://bugs.webkit.org/show_bug.cgi?id=101674
+
+ Reviewed by Brady Eidson.
+
+ Add an API test that implements a custom protocol and attempts to load
+ a resource requiring that protocol in a WKView. The test passes only if
+ didFinishLoadForFrame: fires.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm: Added.
+ (+[TestProtocol canInitWithRequest:]):
+ (+[TestProtocol canonicalRequestForRequest:]):
+ (+[TestProtocol requestIsCacheEquivalent:toRequest:]):
+ (-[TestProtocol startLoading]):
+ (-[TestProtocol stopLoading]):
+ * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
+ * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.h: Copied from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h.
+ * TestWebKitAPI/mac/TestBrowsingContextLoadDelegate.mm: Copied from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextControllerInternal.h.
+ (-[TestBrowsingContextLoadDelegate initWithBlockToRunOnLoad:]):
+ (-[TestBrowsingContextLoadDelegate browsingContextControllerDidFinishLoad:]):
+
+2012-11-14 Ojan Vafai <ojan@chromium.org>
+
+ Fix some defuct flakiness dashboard unittests.
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+
+2012-11-14 Glenn Adams <glenn@skynav.com>
+
+ webkitpy: print-expectations - add --paths option to print only paths of test expectation files
+ https://bugs.webkit.org/show_bug.cgi?id=102269
+
+ Reviewed by Dirk Pranke.
+
+ Add --paths option to print-expectations command in order to obtain list of applicable
+ test expectation file paths.
+
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (PrintExpectations.__init__):
+ (PrintExpectations.execute):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (PrintExpectationsTest.run_test):
+ (PrintExpectationsTest.test_paths):
+
+2012-11-14 James Robinson <jamesr@chromium.org>
+
+ webgl-background-color.html started failing
+ https://bugs.webkit.org/show_bug.cgi?id=102247
+
+ Reviewed by Adrienne Walker.
+
+ The compositor thread should outlive the WebView.
+
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
+2012-11-14 Nate Chapin <japhet@chromium.org>
+
+ Move empty loading to DocumentLoader, simplify FrameLoader::init()
+ https://bugs.webkit.org/show_bug.cgi?id=101512
+
+ Reviewed by Adam Barth.
+
+ Chromium DRT has some code that doesn't play nicely with empty urls and incorrectly
+ interprets them as a non-empty load. This ensures
+ http/tests/navigation/new-window-redirect-history.html continues to pass
+ in chromium.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::updateForCommittedLoad):
+
+2012-11-14 Zan Dobersek <zandobersek@gmail.com>
+
+ Remove uses of deprecated unittest.TestCase aliases
+ https://bugs.webkit.org/show_bug.cgi?id=102253
+
+ Reviewed by Dirk Pranke.
+
+ Replace the deprecated unittest.TestCase methods with the corresponding methods
+ everywhere inside the Tools directory. The following replacements are done:
+ - assertEquals -> assertEqual
+ - assert_ -> assertTrue
+ - failUnlessRaises -> assertRaises
+
+ * BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
+ (SVNMirrorTest.test_CheckOutSource):
+ * QueueStatusServer/model/queuepropertymixin_unittest.py:
+ (QueuePropertyMixinTest.test_queue_property):
+ * QueueStatusServer/model/queues_unittest.py:
+ (QueueTest._assert_short_name):
+ (QueueTest._assert_display_name):
+ (QueueTest._assert_name_with_underscores):
+ * QueueStatusServer/model/workitems_unittest.py:
+ (WorkItemsTest.test_display_position_for_attachment):
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_parse_log_entries_from_changelog):
+ (test_parse_log_entries_from_annotated_file):
+ (_assert_parse_reviewer_text_and_list):
+ (_assert_parse_reviewer_text_list):
+ (_assert_fuzzy_reviewer_match):
+ (_assert_parse_authors):
+ (test_latest_entry_parse):
+ (test_latest_entry_parse_single_entry):
+ (test_set_reviewer):
+ (test_set_short_description_and_bug_url):
+ * Scripts/webkitpy/common/checkout/diff_parser_unittest.py:
+ (DiffParserTest.test_diff_parser):
+ * Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
+ (GitSVNTest.test_revisions_changing_files_with_local_commit):
+ (GitSVNTest.test_upstream_branch):
+ (GitSVNTest.test_create_patch_with_rm_and_changed_files):
+ (GitTestWithMock.test_push_local_commits_to_server_with_username_and_password):
+ * Scripts/webkitpy/common/config/ports_unittest.py:
+ (DeprecatedPortTest.test_mac_port):
+ (DeprecatedPortTest.test_gtk_port):
+ (DeprecatedPortTest.test_efl_port):
+ (DeprecatedPortTest.test_qt_port):
+ (DeprecatedPortTest.test_chromium_port):
+ (DeprecatedPortTest.test_chromium_android_port):
+ (DeprecatedPortTest.test_chromium_xvfb_port):
+ * Scripts/webkitpy/common/config/urls_unittest.py:
+ (URLsTest.test_parse_bug_id):
+ (URLsTest.test_parse_attachment_id):
+ * Scripts/webkitpy/common/find_files_unittest.py:
+ (TestWinNormalize.assert_filesystem_normalizes):
+ * Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
+ (test_url_creation):
+ (test_parse_bug_id):
+ (_assert_dictionaries_equal):
+ (test_parse_bugs_from_xml):
+ (test_attachment_detail_bug_parsing):
+ (_assert_result_count):
+ (test_request_page_parsing):
+ (test_quip_page_parsing):
+ (EditUsersParserTest._assert_login_userid_pairs):
+ * Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py:
+ (test_status_parsing):
+ (test_latest_cached_build):
+ (test_results_zip_url):
+ * Scripts/webkitpy/common/net/credentials_unittest.py:
+ (test_credentials_from_environment):
+ * Scripts/webkitpy/common/net/failuremap_unittest.py:
+ (FailureMapTest.test_failing_revisions):
+ (FailureMapTest.test_new_failures):
+ (FailureMapTest.test_new_failures_with_old_revisions):
+ (FailureMapTest.test_new_failures_with_more_old_revisions):
+ (FailureMapTest.test_tests_failing_for):
+ (FailureMapTest.test_failing_tests):
+ * Scripts/webkitpy/common/net/layouttestresults_unittest.py:
+ (LayoutTestResultsTest.test_set_failure_limit_count):
+ * Scripts/webkitpy/common/net/unittestresults_unittest.py:
+ (UnitTestResultsTest.test_nostring):
+ (UnitTestResultsTest.test_emptystring):
+ * Scripts/webkitpy/common/read_checksum_from_png_unittest.py:
+ (ReadChecksumFromPngTest.test_read_checksum):
+ * Scripts/webkitpy/common/system/deprecated_logging_unittest.py:
+ (LoggingTest.assert_log_equals):
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+ (ScriptErrorTest.test_string_from_args):
+ (ScriptErrorTest.test_message_with_output):
+ (ExecutiveTest.test_run_command_with_bad_command):
+ (ExecutiveTest.test_run_command_with_unicode):
+ (ExecutiveTest.serial_test_run_in_parallel):
+ * Scripts/webkitpy/common/system/filesystem_mock_unittest.py:
+ (MockFileSystemTest.quick_check):
+ * Scripts/webkitpy/common/system/filesystem_unittest.py:
+ (GenericFileSystemTests.test_glob__trailing_asterisk):
+ (GenericFileSystemTests.test_glob__leading_asterisk):
+ (GenericFileSystemTests.test_glob__middle_asterisk):
+ (GenericFileSystemTests.test_glob__period_is_escaped):
+ (RealFileSystemTest.test_chdir):
+ (RealFileSystemTest.test_remove_file_with_retry):
+ (RealFileSystemTest.test_sep):
+ * Scripts/webkitpy/common/system/logtesting.py:
+ (TestLogStream.assertMessages):
+ * Scripts/webkitpy/common/system/logutils_unittest.py:
+ (GetLoggerTest.test_get_logger_in_webkitpy):
+ (GetLoggerTest.test_get_logger_not_in_webkitpy):
+ * Scripts/webkitpy/common/system/outputcapture.py:
+ (OutputCaptureTestCaseBase.assertStdout):
+ (OutputCaptureTestCaseBase.assertStderr):
+ * Scripts/webkitpy/common/system/path_unittest.py:
+ (AbspathTest.test_abspath_to_uri_cygwin):
+ (AbspathTest.test_abspath_to_uri_unixy):
+ (AbspathTest.test_abspath_to_uri_win):
+ (AbspathTest.test_abspath_to_uri_escaping_unixy):
+ (AbspathTest.test_abspath_to_uri_escaping_cygwin):
+ * Scripts/webkitpy/common/system/platforminfo_unittest.py:
+ (TestPlatformInfo.test_real_code):
+ (TestPlatformInfo.test_os_name_and_wrappers):
+ (TestPlatformInfo.test_os_version):
+ (TestPlatformInfo.test_total_bytes_memory):
+ * Scripts/webkitpy/common/system/user_unittest.py:
+ (UserTest.test_confirm.mock_raw_input):
+ (UserTest.test_confirm):
+ * Scripts/webkitpy/common/system/zipfileset_unittest.py:
+ (ZipFileSetTest.test_open):
+ (ZipFileSetTest.test_read):
+ * Scripts/webkitpy/common/watchlist/watchlist_unittest.py:
+ (WatchListTest.test_filename_definition_no_matches):
+ (WatchListTest.test_filename_definition):
+ (WatchListTest.test_cc_rules_simple):
+ (WatchListTest.test_cc_rules_complex):
+ (WatchListTest.test_cc_and_message_rules_complex):
+ (WatchListTest.test_cc_and_message_rules_no_matches):
+ (WatchListTest.test_added_match):
+ (WatchListTest.test_deleted_match):
+ (WatchListTest.test_more_and_less_match):
+ (WatchListTest.test_complex_match):
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
+ (LockCheckingRunner.handle_finished_list):
+ (LayoutTestRunnerTests.test_interrupt_if_at_failure_limits):
+ (LayoutTestRunnerTests.test_update_summary_with_result):
+ (LayoutTestRunnerTests.test_servers_started):
+ (SharderTests.assert_shards):
+ (SharderTests.test_shard_in_two_has_no_locked_shards):
+ (SharderTests.test_shard_in_two_has_no_unlocked_shards):
+ (NaturalCompareTest.assert_cmp):
+ (KeyCompareTest.assert_cmp):
+ * Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py:
+ (TestConfigurationTest.test_items):
+ (TestConfigurationTest.test_keys):
+ (TestConfigurationTest.test_str):
+ (TestConfigurationTest.test_repr):
+ (TestConfigurationTest.test_hash):
+ (TestConfigurationTest.test_eq):
+ (TestConfigurationTest.test_values):
+ (SpecifierSorterTest.test_init):
+ (SpecifierSorterTest.test_add_specifier):
+ (SpecifierSorterTest.test_add_macros):
+ (SpecifierSorterTest.test_category_priority):
+ (SpecifierSorterTest.test_specifier_priority):
+ (SpecifierSorterTest.test_sort_specifiers):
+ (TestConfigurationConverterTest.test_symmetric_difference):
+ (TestConfigurationConverterTest.test_to_config_set):
+ (TestConfigurationConverterTest.test_macro_expansion):
+ (TestConfigurationConverterTest.test_to_specifier_lists):
+ (TestConfigurationConverterTest.test_macro_collapsing):
+ (TestConfigurationConverterTest.test_converter_macro_collapsing):
+ (TestConfigurationConverterTest.test_specifier_converter_access):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (assert_exp):
+ (MiscTests.test_result_was_expected):
+ (MiscTests.test_remove_pixel_failures):
+ (MiscTests.test_suffixes_for_expectations):
+ (MiscTests.test_get_expectations_string):
+ (SkippedTests.check):
+ (ExpectationSyntaxTests.assert_tokenize_exp):
+ (SemanticTests.test_bad_bugid):
+ (SemanticTests.test_missing_bugid):
+ (TestExpectationSerializationTests.test_reconstitute_only_these):
+ * Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
+ (TestFailuresTest.test_crashes):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_nonexistant_expectations):
+ (PortTest.test_additional_expectations):
+ * Scripts/webkitpy/layout_tests/port/builders_unittest.py:
+ (BuildersTest.test_path_from_name):
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ (ChromiumAndroidPortTest.test_attributes):
+ (ChromiumAndroidPortTest.test_default_timeout_ms):
+ (ChromiumAndroidPortTest.test_get_devices_one_device):
+ (ChromiumAndroidPortTest.test_get_devices_two_devices):
+ (ChromiumAndroidPortTest.test_get_device_serial_one_device):
+ (ChromiumAndroidPortTest.test_get_device_serial_two_devices):
+ (ChromiumAndroidPortTest.test_must_require_http_server):
+ (ChromiumAndroidDriverTest.test_get_last_stacktrace):
+ (ChromiumAndroidDriverTest.test_get_crash_log):
+ (ChromiumAndroidDriverTest.test_cmd_line):
+ (ChromiumAndroidDriverTest.test_read_prompt):
+ (ChromiumAndroidDriverTest.test_command_from_driver_input):
+ (ChromiumAndroidDriverTwoDriversTest.test_two_drivers):
+ (ChromiumAndroidTwoPortsTest.test_options_with_two_ports):
+ * Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py:
+ (ChromiumLinuxPortTest.assert_architecture):
+ (ChromiumLinuxPortTest.test_determine_architecture_fails):
+ (ChromiumLinuxPortTest.test_path_to_image_diff):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.assert_name):
+ (ChromiumMacPortTest.test_baseline_path):
+ (ChromiumMacPortTest.test_path_to_image_diff):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.test_default_max_locked_shards):
+ (ChromiumPortTestCase.test_default_timeout_ms):
+ (ChromiumPortTestCase.test_default_pixel_tests):
+ (ChromiumPortTestCase.test_all_test_configurations):
+ (ChromiumPortTestCase.test_default_configuration):
+ (ChromiumPortTestCase.test_diff_image):
+ (ChromiumPortTestCase.test_diff_image_crashed):
+ (ChromiumPortTestCase.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
+ (ChromiumWinTest.test_setup_environ_for_server_cygpath):
+ (ChromiumWinTest.assert_name):
+ (ChromiumWinTest.test_baseline_path):
+ (ChromiumWinTest.test_path_to_image_diff):
+ * Scripts/webkitpy/layout_tests/port/driver_unittest.py:
+ (DriverTest.test_read_block):
+ (DriverTest.test_read_binary_block):
+ (DriverTest.test_read_base64_block):
+ (DriverTest.test_no_timeout):
+ (DriverTest.test_check_for_driver_crash.assert_crash):
+ (DriverTest.test_creating_a_port_does_not_write_to_the_filesystem):
+ * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+ (FactoryTest.test_get_from_builder_name):
+ * Scripts/webkitpy/layout_tests/port/gtk_unittest.py:
+ (GtkPortTest.test_default_timeout_ms):
+ * Scripts/webkitpy/layout_tests/port/http_lock_unittest.py:
+ (HttpLockTest.test_current_lock_pid):
+ * Scripts/webkitpy/layout_tests/port/image_diff_unittest.py:
+ (TestImageDiffer.test_diff_image_failed):
+ (TestImageDiffer.test_diff_image_passed):
+ * Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py:
+ (LeakDetectorTest.test_leaks_args):
+ (test_parse_leaks_output):
+ (test_leaks_files_in_directory):
+ (test_count_total_leaks):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (MacTest.test_default_timeout_ms):
+ (assert_name):
+ (test_setup_environ_for_server):
+ (_assert_search_path):
+ (test_32bit):
+ (test_64bit):
+ * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
+ (MockTestShellTest.test_pixeltest__fails):
+ (MockTestShellTest.test_test_shell_parse_options):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_default_max_locked_shards):
+ (PortTestCase.test_default_timeout_ms):
+ (PortTestCase.test_default_pixel_tests):
+ (PortTestCase.test_diff_image):
+ (PortTestCase.test_diff_image_crashed):
+ (PortTestCase.test_get_crash_log):
+ (PortTestCase.assert_build_path):
+ (PortTestCase.test_expectations_ordering):
+ (_assert_config_file_for_platform):
+ (test_path_to_apache_config_file):
+ (test_additional_platform_directory):
+ * Scripts/webkitpy/layout_tests/port/qt_unittest.py:
+ (QtPortTest._assert_search_path):
+ (QtPortTest._assert_expectations_files):
+ (QtPortTest.test_setup_environ_for_server):
+ * Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
+ (TestServerProcess.test_basic):
+ (TestServerProcess.test_broken_pipe):
+ * Scripts/webkitpy/layout_tests/port/win_unittest.py:
+ (WinPortTest._assert_search_path):
+ (WinPortTest._assert_version):
+ (WinPortTest.test_runtime_feature_list):
+ (WinPortTest.test_expectations_files):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (LintTest.test_all_configurations):
+ (MainTest.test_all):
+ (MainTest.test_repeat_each):
+ (MainTest.test_skipped_flag):
+ (MainTest.test_iterations):
+ (MainTest.test_run_chunk):
+ (MainTest.test_run_part):
+ (MainTest.test_run_singly):
+ (MainTest.test_run_singly_actually_runs_tests):
+ (MainTest.test_single_file):
+ (MainTest.test_single_file_with_prefix):
+ (MainTest.test_single_skipped_file):
+ (MainTest.test_stderr_is_saved):
+ (MainTest.test_test_list):
+ (MainTest.test_test_list_with_prefix):
+ (MainTest.test_missing_and_unexpected_results):
+ (MainTest.test_pixel_test_directories):
+ (MainTest.test_missing_and_unexpected_results_with_custom_exit_code):
+ (MainTest.test_crash_log):
+ (MainTest.test_web_process_crash_log):
+ (MainTest.test_exit_after_n_failures_upload):
+ (MainTest.test_exit_after_n_failures):
+ (MainTest.test_exit_after_n_crashes):
+ (MainTest.test_retrying_and_flaky_tests):
+ (MainTest.test_run_order__inline):
+ (MainTest.test_reftest_run):
+ (MainTest.test_reftest_run_reftests_if_pixel_tests_are_disabled):
+ (MainTest.test_reftest_skip_reftests_if_no_ref_tests):
+ (MainTest.test_reftest_expected_html_should_be_ignored):
+ (MainTest.test_reftest_driver_should_run_expected_html):
+ (MainTest.test_reftest_driver_should_run_expected_mismatch_html):
+ (MainTest.test_output_diffs):
+ (MainTest.test_unsupported_platform):
+ (EndToEndTest.test_end_to_end):
+ (RebaselineTest.test_reset_results):
+ (RebaselineTest.test_missing_results):
+ (RebaselineTest.test_new_baseline):
+ * Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py:
+ (BaseTest.integration_test_server__normal):
+ (BaseTest.integration_test_server__fails):
+ (BaseTest.integration_test_port_and_root):
+ * Scripts/webkitpy/layout_tests/servers/http_server_unittest.py:
+ (TestHttpServer.test_start_cmd):
+ * Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
+ (RegularTest.test_logging_not_included):
+ (RegularTest._basic):
+ (RegularTest.test_basic):
+ (RegularTest.test_log_after_update):
+ (RegularTest.test_log_args):
+ (TtyTest.test_basic):
+ (TtyTest.test_log_after_update):
+ (VerboseTest.test_basic):
+ (VerboseTest.test_log_after_update):
+ (VerboseTest.test_log_args):
+ * Scripts/webkitpy/layout_tests/views/printing_unittest.py:
+ (Testprinter.assertWritten):
+ (test_test_status_line):
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (MainTest.assertWritten):
+ * Scripts/webkitpy/style/checker_unittest.py:
+ (GlobalVariablesTest.test_webkit_base_filter_rules):
+ (CheckerDispatcherSkipTest._assert_should_skip_without_warning):
+ (CheckerDispatcherCarriageReturnTest.test_should_check_and_strip_carriage_returns):
+ (CheckerDispatcherDispatchTest.assert_checker):
+ (CheckerDispatcherDispatchTest.test_changelog_paths):
+ (CheckerDispatcherDispatchTest.test_cpp_paths):
+ (CheckerDispatcherDispatchTest.test_json_paths):
+ (CheckerDispatcherDispatchTest.test_python_paths):
+ (CheckerDispatcherDispatchTest.test_text_paths):
+ (CheckerDispatcherDispatchTest.test_xml_paths):
+ (StyleProcessorConfigurationTest.test_init):
+ (StyleProcessorConfigurationTest.test_write_style_error_emacs):
+ (StyleProcessorConfigurationTest.test_write_style_error_vs7):
+ (StyleProcessor_EndToEndTest.test_init):
+ (StyleProcessor_EndToEndTest.test_process):
+ (StyleProcessor_CodeCoverageTest.test_process__checker_dispatched):
+ * Scripts/webkitpy/style/checkers/changelog_unittest.py:
+ (ChangeLogCheckerTest.assert_error.handle_style_error):
+ (ChangeLogCheckerTest.test_init):
+ * Scripts/webkitpy/style/checkers/common_unittest.py:
+ (CarriageReturnCheckerTest.assert_carriage_return):
+ (TabCheckerTest.assert_tab):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (CppFunctionsTest.test_convert_to_lower_with_underscores):
+ (CppFunctionsTest.test_create_acronym):
+ (CppFunctionsTest.test_parameter):
+ (CppFunctionsTest.test_single_line_view):
+ (CppFunctionsTest.test_create_skeleton_parameters):
+ (CppFunctionsTest.test_find_parameter_name_index):
+ (CppFunctionsTest.test_parameter_list):
+ (CppFunctionsTest.test_check_parameter_against_text):
+ (CppStyleTestBase.perform_lint):
+ (CppStyleTestBase.assert_lint):
+ (CppStyleTestBase.assert_lint_one_of_many_errors_re):
+ (CppStyleTestBase.assert_multi_line_lint):
+ (CppStyleTestBase.assert_language_rules_check):
+ (CppStyleTestBase.assert_include_what_you_use):
+ (CppStyleTestBase.assert_blank_lines_check):
+ (CppStyleTestBase.assert_positions_equal):
+ (FunctionDetectionTest.perform_function_detection):
+ (CppStyleTest.test_get_line_width):
+ (CppStyleTest.test_find_next_multi_line_comment_start):
+ (CppStyleTest.test_find_next_multi_line_comment_end):
+ (CppStyleTest.test_remove_multi_line_comments_from_range):
+ (CppStyleTest.test_position):
+ (CppStyleTest.test_rfind_in_lines):
+ (CppStyleTest.test_close_expression):
+ (CppStyleTest.test_include_what_you_use_no_implementation_files):
+ (CppStyleTest.test_include_what_you_use):
+ (CppStyleTest.test_files_belong_to_same_module):
+ (CppStyleTest.test_cleanse_line):
+ (CppStyleTest.test_multiline_strings):
+ (CppStyleTest.test_newline_at_eof.do_test):
+ (CppStyleTest.test_invalid_utf8.do_test):
+ (CppStyleTest.test_is_blank_line):
+ (CppStyleTest.test_allow_blank_line_before_closing_namespace):
+ (CppStyleTest.test_allow_blank_line_before_if_else_chain):
+ (CppStyleTest.test_else_on_same_line_as_closing_braces):
+ (CppStyleTest.test_build_header_guard):
+ (CppStyleTest.test_legal_copyright):
+ (CleansedLinesTest.test_init):
+ (CleansedLinesTest.test_init_empty):
+ (CleansedLinesTest.test_collapse_strings):
+ (CheckForFunctionLengthsTest.assert_function_lengths_check):
+ (PassPtrTest.assert_pass_ptr_check):
+ (LeakyPatternTest.assert_leaky_pattern_check):
+ (WebKitStyleTest.test_parameter_names):
+ (WebKitStyleTest.test_webkit_export_check):
+ (CppCheckerTest.test_init):
+ * Scripts/webkitpy/style/checkers/jsonchecker_unittest.py:
+ (JSONCheckerTest.assert_error.handle_style_error):
+ (JSONCheckerTest.test_init):
+ * Scripts/webkitpy/style/checkers/png_unittest.py:
+ (PNGCheckerTest.test_init):
+ (PNGCheckerTest.test_check):
+ * Scripts/webkitpy/style/checkers/python_unittest.py:
+ (PythonCheckerTest.test_init):
+ (PythonCheckerTest.test_check):
+ * Scripts/webkitpy/style/checkers/test_expectations_unittest.py:
+ (TestExpectationsTestCase._expect_port_for_expectations_path):
+ (TestExpectationsTestCase.assert_lines_lint):
+ * Scripts/webkitpy/style/checkers/text_unittest.py:
+ (TextStyleTestCase.assertNoError):
+ (TextStyleTestCase.assertError.error_for_test):
+ (TextStyleTestCase.assertError):
+ (TextCheckerTest.test_init):
+ * Scripts/webkitpy/style/checkers/watchlist_unittest.py:
+ (WatchListTest.test_basic_error_message.handle_style_error):
+ (WatchListTest):
+ * Scripts/webkitpy/style/checkers/xcodeproj_unittest.py:
+ (XcodeProjectFileCheckerTest.assert_error):
+ * Scripts/webkitpy/style/checkers/xml_unittest.py:
+ (XMLCheckerTest.assert_error.handle_style_error):
+ (XMLCheckerTest.test_init):
+ * Scripts/webkitpy/style/error_handlers_unittest.py:
+ (DefaultStyleErrorHandlerTest._check_initialized):
+ (DefaultStyleErrorHandlerTest.test_non_reportable_error):
+ (DefaultStyleErrorHandlerTest.test_max_reports_per_category):
+ (DefaultStyleErrorHandlerTest.test_line_numbers):
+ * Scripts/webkitpy/style/filereader_unittest.py:
+ (TextFileReaderTest._assert_file_reader):
+ (TextFileReaderTest.test_process_file__does_not_exist):
+ (TextFileReaderTest.test_count_delete_only_file):
+ * Scripts/webkitpy/style/filter_unittest.py:
+ (CategoryFilterTest.test_init):
+ (CategoryFilterTest.test_init_default_arguments):
+ (CategoryFilterTest.test_str):
+ (FilterConfigurationTest.test_init):
+ (FilterConfigurationTest.test_default_arguments):
+ * Scripts/webkitpy/style/main_unittest.py:
+ (ChangeDirectoryTest._assert_result):
+ * Scripts/webkitpy/style/optparser_unittest.py:
+ (ArgumentPrinterTest.test_to_flag_string):
+ (ArgumentParserTest.test_parse_default_arguments):
+ (ArgumentParserTest.test_parse_explicit_arguments):
+ (ArgumentParserTest.test_parse_files):
+ (CommandOptionValuesTest.test_init):
+ * Scripts/webkitpy/style/patchreader_unittest.py:
+ (PatchReaderTest._assert_checked):
+ * Scripts/webkitpy/test/finder_unittest.py:
+ (FinderTest.test_additional_system_paths):
+ (FinderTest.test_to_module):
+ (FinderTest.check_names):
+ * Scripts/webkitpy/test/main_unittest.py:
+ (TesterTest.test_individual_names_are_not_run_twice):
+ (TesterTest.test_integration_tests_are_not_found_by_default):
+ (TesterTest.test_integration_tests_are_found):
+ (TesterTest.integration_test_coverage_works):
+ * Scripts/webkitpy/test/runner_unittest.py:
+ (RunnerTest.test_run):
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ (_expect_validate):
+ * Scripts/webkitpy/tool/bot/expectedfailures_unittest.py:
+ (ExpectedFailuresTest._assert_can_trust):
+ (ExpectedFailuresTest.test_unexpected_failures_observed):
+ (ExpectedFailuresTest.test_unexpected_failures_observed_when_tree_is_hosed):
+ * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+ (test_patches_with_acceptable_review_flag):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_whois):
+ (IRCCommandTest.test_create_bug):
+ (IRCCommandTest.test_roll_chromium_deps):
+ (IRCCommandTest.test_rollout):
+ * Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py:
+ (LayoutTestResultsReaderTest.test_missing_layout_test_results):
+ (test_missing_unit_test_results_path):
+ (test_layout_test_results):
+ * Scripts/webkitpy/tool/bot/queueengine_unittest.py:
+ (LoggingDelegate.process_work_item):
+ (LoggingDelegate.handle_unexpected_error):
+ (QueueEngineTest.test_trivial):
+ (QueueEngineTest.test_unexpected_error):
+ (QueueEngineTest.test_handled_error):
+ (QueueEngineTest._test_terminating_queue):
+ * Scripts/webkitpy/tool/commands/openbugs_unittest.py:
+ (OpenBugsTest.test_find_bugs_in_string):
+ * Scripts/webkitpy/tool/commands/queries_unittest.py:
+ (FailureReasonTest.test_blame_line_for_revision):
+ (PrintExpectationsTest.run_test):
+ (PrintBaselinesTest.test_basic):
+ (PrintBaselinesTest.test_multiple):
+ (PrintBaselinesTest.test_csv):
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+ (AbstractQueueTest.test_log_directory):
+ (AbstractPatchQueueTest.test_next_patch):
+ (test_auto_retry):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (test_rebaseline_updates_expectations_file):
+ (test_rebaseline_does_not_include_overrides):
+ (test_rebaseline_test):
+ (test_rebaseline_test_with_results_directory):
+ (test_rebaseline_test_and_print_scm_changes):
+ (test_rebaseline_and_copy_test):
+ (test_rebaseline_and_copy_test_no_existing_result):
+ (test_rebaseline_and_copy_test_with_lion_result):
+ (test_rebaseline_and_copy_no_overwrite_test):
+ (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
+ (TestRebaselineJson.test_rebaseline_all):
+ (TestRebaselineJson.test_rebaseline_debug):
+ (TestRebaselineJson.test_move_overwritten):
+ (TestRebaselineJson.test_no_optimize):
+ (TestRebaselineJson.test_results_directory):
+ (TestRebaseline.test_rebaseline):
+ (TestRebaselineExpectations.test_rebaseline_expectations_noop):
+ (TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):
+ (TestAnalyzeBaselines.test_default):
+ (TestAnalyzeBaselines.test_missing_baselines):
+ * Scripts/webkitpy/tool/commands/roll_unittest.py:
+ (PostRollCommandsTest.test_prepare_state):
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ (BuildCoverageExtrapolatorTest.test_extrapolate):
+ * Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py:
+ (AddSvnMimetypeForPngTest.test_run):
+ * Scripts/webkitpy/tool/steps/preparechangelog_unittest.py:
+ (PrepareChangeLogTest.test_ensure_bug_url):
+ * Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py:
+ (_assert_message_for_revert_output):
+ * TestResultServer/model/jsonresults_unittest.py:
+ (JsonResultsTest._test_merge):
+ (JsonResultsTest._test_get_test_list):
+
+2012-11-14 János Badics <jbadics@inf.u-szeged.hu>
+
+ [Qt][ARM] Fix 'nullptr' is a keyword in C++11 [-Wc++0x-compat] warning
+ https://bugs.webkit.org/show_bug.cgi?id=102083
+
+ Reviewed by Csaba Osztrogonác.
+
+ Modified compiler name regex in condition that tests if -std=c++0x, c++11,
+ gnu++0x or gnu++11 are enabled in order to match linux-arm-gnueabi-g++ too,
+ thus enabling -Wno-c++0x-compat also on ARM compiler.
+
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2012-11-14 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ REGRESSION(r133757): Causing webkitpy unit tests to fail
+ https://bugs.webkit.org/show_bug.cgi?id=101444
+
+ Reviewed by Csaba Osztrogonác.
+
+ Updated the bot name on the unit tests.
+
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineTest.test_baseline_directory):
+
+2012-11-14 Byungwoo Lee <bw80.lee@samsung.com>
+
+ [EFL][WK2] Rename variables, structures and functions of the MiniBrowser.
+ https://bugs.webkit.org/show_bug.cgi?id=101517
+
+ Reviewed by Gyuyoung Kim.
+
+ Rename variables, structures and functions of the MiniBrowser
+ for the naming consistency.
+
+ 1) Browser_Window* {app_data|browser_window|window} -> window
+
+ 2) Browser_Window::webview -> Browser_Window::ewk_view
+ The webkit API functions are ewk_view_xxx not webview_xxx.
+ So using ewk_view will be better than webview.
+
+ 3) Browser_Window::window -> Browser_Window::elm_window
+ The name is changed to be distinguished with 'Browser_Window *window'
+
+ 4) browser_{window|view}_find() -> window_find_with_{elm_window|ewk_view}()
+ This is changed because the name of the function can be confused.
+ Currently, browser_window_find() returns Browser_Window*. And
+ browser_view_find() also returns Browser_Window*.
+
+ 5) FileSelectorData -> File_Selector_Data / AuthData -> Auth_Data
+ The type definition is moved to the top of the source file
+ and the name is changed to follow EFL style.
+
+ * MiniBrowser/efl/main.c:
+ (miniBrowserViewSmartClass):
+ (_Browser_Window):
+ (_File_Selector_Data):
+ (_Auth_Data):
+ (window_find_with_ewk_view):
+ (window_free):
+ (on_key_down):
+ (view_focus_set):
+ (on_mouse_down):
+ (title_set):
+ (on_title_changed):
+ (on_url_changed):
+ (on_back_forward_list_changed):
+ (on_new_window):
+ (on_close_window):
+ (on_progress):
+ (on_error):
+ (on_download_request):
+ (close_file_picker):
+ (on_filepicker_parent_deletion):
+ (on_filepicker_deletion):
+ (on_fileselector_done):
+ (on_file_chooser_request):
+ (on_download_finished):
+ (on_download_failed):
+ (on_favicon_received):
+ (on_view_icon_changed):
+ (on_url_bar_activated):
+ (on_url_bar_clicked):
+ (on_back_button_clicked):
+ (on_forward_button_clicked):
+ (on_refresh_button_clicked):
+ (on_javascript_alert):
+ (on_javascript_confirm):
+ (on_javascript_prompt):
+ (on_window_geometry_get):
+ (on_window_geometry_set):
+ (on_fullscreen_deny):
+ (on_fullscreen_enter):
+ (on_fullscreen_exit):
+ (auth_popup_close):
+ (on_auth_cancel):
+ (on_auth_ok):
+ (on_authentication_request):
+ (on_tooltip_text_set):
+ (on_tooltip_text_unset):
+ (on_home_button_clicked):
+ (on_window_deletion):
+ (window_create):
+
+2012-11-14 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ webkitpy: Update the EFL list of bots
+ https://bugs.webkit.org/show_bug.cgi?id=102121
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Update the EFL bots so we can use garden-o-matic.
+
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+
+2012-11-13 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL][WK2] New window size should consult the window attributes
+ https://bugs.webkit.org/show_bug.cgi?id=102122
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Take into account the size that was specified in window.open
+ when creating a new window. This avoids ugly flashing on the screen.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_new_window):
+ (window_create):
+ (elm_main):
+
+2012-11-13 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Plumb WebCompositorSupport settings through WebLayerTreeSettings as well, in preparation for removing the settings from WebCompositorSupport
+ https://bugs.webkit.org/show_bug.cgi?id=102146
+
+ Reviewed by James Robinson.
+
+ Pass settings that go through WebCompositorSupport also through
+ WebLayerTreeSettings. When the compositor starts using those instead,
+ we can remove the callers to the WebCompositorSupport setters.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ (TestShell::setPerTilePaintingEnabled):
+ (TestShell::setAcceleratedAnimationEnabled):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+
+2012-11-13 Kentaro Hara <haraken@chromium.org>
+
+ Unreviewed, rolling out r134503.
+ http://trac.webkit.org/changeset/134503
+
+ Roll out a patch that was landed just to investigate svn
+ trouble
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-13 Kentaro Hara <haraken@chromium.org>
+
+ Unreviewed. Investigating svn trouble. Test commit.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r134446.
+ http://trac.webkit.org/changeset/134446
+ https://bugs.webkit.org/show_bug.cgi?id=101968
+
+ Need to try a different strategy for landing a two-sided patch
+ (3/3).
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ (TestShell::setPerTilePaintingEnabled):
+ (TestShell::setAcceleratedAnimationEnabled):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+
+2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r134449.
+ http://trac.webkit.org/changeset/134449
+ https://bugs.webkit.org/show_bug.cgi?id=102076
+
+ Re-rolling in the patch, it was innocent.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2012-11-13 Dimitri Glazkov <dglazkov@chromium.org>
+
+ Unreviewed, rolling out r134424.
+ http://trac.webkit.org/changeset/134424
+ https://bugs.webkit.org/show_bug.cgi?id=102076
+
+ Made fast/dom/Window/open-window-min-size.html crash.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2012-11-12 Dana Jansens <danakj@chromium.org>
+
+ [chromium] Remove the WebCompositorSupport methods for changing settings, plumb everything through WebLayerTreeSettings
+ https://bugs.webkit.org/show_bug.cgi?id=101968
+
+ Reviewed by James Robinson.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setPerTilePaintingEnabled):
+ (TestShell::setAcceleratedAnimationEnabled):
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+
+2012-11-13 Dirk Pranke <dpranke@chromium.org>
+
+ Fix webkitpy issues arising from a partially-installed pylint.
+ Unreviewed, build fix.
+
+ This patch ensures that we will re-install the pylint and logilab
+ packages if any of them are missing, not just the pylint package.
+
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook._install_pylint):
+
+2012-11-13 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Unreviewed, adding my new email address to committers.py and watchlist.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-11-13 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [CMake] Incorrect dependency calculation when generating forwarding headers
+ https://bugs.webkit.org/show_bug.cgi?id=102076
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Explicitly call generate-forwarding-headers.pl on ${WEBKIT2_DIR} as
+ well, since some dependencies pulled in via the WebKit2/WebKit2_C.h
+ include in config.h are only generated from there.
+
+ This is a bit redundant since this is also done in WebKit2's
+ PlatformEfl.cmake, however the WTF and WebCore API tests do not depend
+ on WebKit2 so the script may not have been called when these tests are
+ being built.
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+
+2012-11-13 Zeno Albisser <zeno@webkit.org>
+
+ Unreviewed: Adding watchlist definition for CoordinatedGraphics.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-11-13 Hugo Parente Lima <hugo.lima@openbossa.org>
+
+ [cmake] Do not use GLOB to add WTR IDL files to buildsystem.
+ https://bugs.webkit.org/show_bug.cgi?id=101785
+
+ Reviewed by Caio Marcelo de Oliveira Filho.
+
+ Using *.idl makes impossible to add IDL files depending on compiler flags,
+ like a possible GamepadController.idl file found on Chromium.
+
+ * WebKitTestRunner/CMakeLists.txt:
+
+2012-11-13 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] TestRunner should depend on webkit_wtf_support instead of compiling the files itself
+ https://bugs.webkit.org/show_bug.cgi?id=102075
+
+ Reviewed by Pavel Feldman.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-11-13 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][DRT] Remove extra layoutFrame() call when preparing to send an event via EventSender.
+ https://bugs.webkit.org/show_bug.cgi?id=102074
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * DumpRenderTree/efl/EventSender.cpp:
+ (feedMouseEvent): Do not call DumpRenderTreeSupportEfl::layoutFrame()
+ when sending an event, as it causes additional repaints that create
+ wrong pixel results for tests such as
+ fast/repaint/overflow-auto-in-overflow-auto-scrolled.html.
+
+2012-11-13 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Enable Mutation observer
+ https://bugs.webkit.org/show_bug.cgi?id=102066
+
+ Reviewed by Pavel Feldman.
+
+ * qmake/mkspecs/features/features.pri:
+
+2012-11-13 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - platform/blackberry/editing/text-iterator/findString-markers.html failed
+ https://bugs.webkit.org/show_bug.cgi?id=102056
+
+ Reviewed by Rob Buis.
+
+ RIM PR 235836
+
+ TestRunner::findString() was changed to call Page::findString() instead
+ of WebPage::findNextString(). Page::findString() doesn't update
+ TextMatch markers.
+ Work-around by calling both Page::findString() and WebPage::findNextString().
+
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::findString):
+
+2012-11-12 Jochen Eisinger <jochen@chromium.org>
+
+ Add the TestRunner public API to the ChromiumPublicApi watchlist, and introduce an entry for ChromiumTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=101957
+
+ Reviewed by Adam Barth.
+
+ Chromium now also depends on the TestRunner public API, and as such, similar rules as for the Chromium WebKit API should apply.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-11-13 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move tracking of damaged regions from WebViewHost to WebTestProxy
+ https://bugs.webkit.org/show_bug.cgi?id=101927
+
+ Reviewed by Adam Barth.
+
+ This will allow for sharing the code with content_shell
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::display):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h:
+ (WebKit):
+ (WebTestProxyBase):
+ (WebTestRunner::WebTestProxy::didInvalidateRect):
+ (WebTestRunner::WebTestProxy::didScrollRect):
+ (WebTestRunner::WebTestProxy::scheduleComposite):
+ (WebTestRunner::WebTestProxy::scheduleAnimation):
+ (WebTestRunner::WebTestProxy::setWindowRect):
+ (WebTestRunner::WebTestProxy::show):
+ (WebTestRunner::WebTestProxy::didAutoResize):
+ (WebTestRunner::WebTestProxy::postAccessibilityNotification):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp:
+ (WebTestRunner::WebTestProxyBase::setPaintRect):
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::paintRect):
+ (WebTestRunner::WebTestProxyBase::didInvalidateRect):
+ (WebTestRunner::WebTestProxyBase::didScrollRect):
+ (WebTestRunner::WebTestProxyBase::scheduleComposite):
+ (WebTestRunner::WebTestProxyBase::scheduleAnimation):
+ (WebTestRunner::WebTestProxyBase::show):
+ (WebTestRunner::WebTestProxyBase::setWindowRect):
+ (WebTestRunner::WebTestProxyBase::didAutoResize):
+ (WebTestRunner::WebTestProxyBase::postAccessibilityNotification):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::scheduleAnimation):
+ (WebViewHost::show):
+ (WebViewHost::setWindowRect):
+ (WebViewHost::WebViewHost):
+ (WebViewHost::proxy):
+ (WebViewHost::setProxy):
+ (WebViewHost::reset):
+ (WebViewHost::paintInvalidatedRegion):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-11-12 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: clean up lint errors, part 1
+ https://bugs.webkit.org/show_bug.cgi?id=102024
+
+ Reviewed by Adam Barth.
+
+ This patch cleans up a lot of miscellaneous minor lint errors that
+ apparently aren't caught by unit tests, and suppresses a few
+ false positives.
+
+ Also, this patch removes the garden-o-matic "rollout" entry point
+ since it's no longer being used by the frontend (rather than
+ fix it to not generate lint errors).
+
+ * Scripts/webkitpy/common/system/executive_mock.py:
+ (MockExecutive2.run_command):
+ * Scripts/webkitpy/common/system/filesystem_mock.py:
+ (MockFileSystem.copyfile):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._http_tests):
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.reference_files):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._teardown_performance):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.TestAndroidPort.__init__):
+ (ChromiumPortTestCase.test_default_configuration):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase):
+ (PortTestCase.test_driver_cmd_line):
+ (PortTestCase.test_expectations_ordering):
+ * Scripts/webkitpy/layout_tests/servers/http_server_base.py:
+ (HttpServerBase._check_that_all_ports_are_available):
+ * Scripts/webkitpy/style/checkers/python.py:
+ (Pylinter):
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ (GardenOMatic.__init__):
+ * Scripts/webkitpy/tool/commands/queues.py:
+ (CommitQueue):
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPRequestHandler):
+ (GardeningHTTPRequestHandler.localresult):
+
+2012-11-12 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: clean up lint errors, part 2
+ https://bugs.webkit.org/show_bug.cgi?id=102029
+
+ Reviewed by Adam Barth.
+
+ This cleans up the remaining lint errors in webkitpy with four exceptions:
+ 1) we don't lint thirdparty/ autoinstalled code, obviously
+ 2) there's an intentional error in the unit tests for pylint itself
+ 3) the implementation of webkit-patch optimize-expectations has
+ an error but I think we can and should just remove that command as well.
+ 4) I have not yet linted the test code
+
+ * Scripts/webkitpy/common/newstringio.py:
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM.find_checkout_root):
+ (SCM.will.remote_merge_base):
+ * Scripts/webkitpy/common/checkout/scm/scm_mock.py:
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVNRepository.has_authorization_for_realm):
+ (SVN.__init__):
+ * Scripts/webkitpy/common/config/contributionareas.py:
+ (ContributionAreas.names):
+ * Scripts/webkitpy/common/config/ports.py:
+ (DeprecatedPort):
+ * Scripts/webkitpy/common/net/buildbot/buildbot.py:
+ (Builder.force_build):
+ * Scripts/webkitpy/common/net/buildbot/buildbot_mock.py:
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_posix_threading):
+ (check_spacing):
+ * Scripts/webkitpy/style/optparser.py:
+ (ArgumentParser._create_option_parser):
+ * Scripts/webkitpy/tool/commands/abstractlocalservercommand.py:
+ (AbstractLocalServerCommand.execute):
+ * Scripts/webkitpy/tool/commands/download.py:
+ (AbstractPatchProcessingCommand):
+ (AbstractPatchProcessingCommand._process_patch):
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (AbstractEarlyWarningSystem):
+
+2012-11-12 Dirk Pranke <dpranke@chromium.org>
+
+ remove 'webkit-patch optimize-expectations'
+ https://bugs.webkit.org/show_bug.cgi?id=102032
+
+ Reviewed by Adam Barth.
+
+ Removing this command because it is totally broken (probably
+ broke when I added support for multiple files in a cascade)
+ and doesn't seem to do anything much useful. It certainly
+ didn't actually optimize things.
+
+ * Scripts/webkitpy/tool/commands/expectations.py: Removed.
+
+2012-11-12 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - Update Pixel Dump Support for OpenGL renderer
+ https://bugs.webkit.org/show_bug.cgi?id=101894
+
+ Reviewed by Rob Buis.
+
+ RIM PR 241686
+ Also remove an un-needed pixel lock, and fix a klocwork error in SKIA
+ code path.
+
+ * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
+ (readPixelsUserInterfaceThread):
+ (createBitmapContextFromWebView):
+
+2012-11-12 Daniel Bates <dbates@webkit.org>
+
+ Perl errors from Tools/Scripts/copy-webkitlibraries-to-product-directory
+ https://bugs.webkit.org/show_bug.cgi?id=101980
+
+ Reviewed by Mark Rowe.
+
+ Remove library libWebKitSystemInterfaceLeopard.a and libWebKitSystemInterfaceSnowLeopard.a
+ from the list of libraries to copy to the specified built products directory
+ as these libraries were removed from the repository in <http://trac.webkit.org/changeset/133670>.
+
+ * Scripts/copy-webkitlibraries-to-product-directory:
+
+2012-11-12 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: integrate pylint into check-webkit-style, part I
+ https://bugs.webkit.org/show_bug.cgi?id=101285
+
+ Reviewed by Ojan Vafai.
+
+ This patch re-works lint-webkitpy so that the logic is pushed
+ into check-webkit-style (mostly); we don't yet control which
+ messages are displayed using the rules in webkitpy/style/checker.py
+ (we're still using the pylintrc to suppress messages instead),
+ but otherwise things work. For now we will only report pylint
+ "errors", not warnings.
+
+ * Scripts/lint-webkitpy:
+ * Scripts/webkitpy/style/checker.py:
+ * Scripts/webkitpy/style/checkers/python.py:
+ (PythonChecker):
+ (PythonChecker.check):
+ (PythonChecker._check_pep8):
+ (PythonChecker._check_pylint):
+ (Pylinter):
+ (Pylinter.__init__):
+ (Pylinter.run):
+ (_FilteredStringIO):
+ (_FilteredStringIO.__init__):
+ (_FilteredStringIO.write):
+ (_FilteredStringIO._filter):
+ * Scripts/webkitpy/style/checkers/python_unittest.py:
+ (PythonCheckerTest.test_check):
+ * Scripts/webkitpy/style/checkers/python_unittest_input.py:
+
+2012-11-12 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: remove a bunch of broken chromium-specific flags
+ https://bugs.webkit.org/show_bug.cgi?id=101979
+
+ Reviewed by Tony Chang.
+
+ There were a bunch of chromium-specific flags that used to be
+ supported by NRWT (and handled and passed on to DRT) but have
+ probably been broken for a long time and are currently ignored.
+
+ This patch removes all of those flags; the rule of thumb going forward
+ is that we should only add flags that affect how the python code functions.
+ If a flag is just passed verbatim to DRT, the user can use --additional-drt-flag
+ for that.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.setUp):
+
+2012-11-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Add --device-pixel-ratio command line option to EFL MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=101930
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added --device-pixel-ratio command line option to EFL MiniBrowser which sets
+ the ratio between the CSS units and device pixels when the content is unscaled.
+ Option is applied for all the views created by mini browser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+
+2012-11-12 Dirk Pranke <dpranke@chromium.org>
+
+ remove the chromium-mac-mountainlion TestExpectations file
+ https://bugs.webkit.org/show_bug.cgi?id=101789
+
+ Reviewed by Ojan Vafai.
+
+ Nearly all of the tests have been updated for 10.8 and the remaining
+ failures have been merged into the main TestExpectations file. We
+ don't need this hook any more.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort.operating_system):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_path_to_image_diff):
+
+2012-11-12 Peter Beverloo <peter@chromium.org>
+
+ [Chromium-Android] Restart the device's shell in root before pushing data
+ https://bugs.webkit.org/show_bug.cgi?id=101944
+
+ Reviewed by Adam Barth.
+
+ Setting up md5sum and pushing the executable, fonts and test resources was
+ unintentionally being done prior to executing the "adb root" command,
+ which restarts the device's shell to be root. Since test data is still
+ being pushed to /data/local/tmp, writing to which requires root access,
+ devices not running as root would throw a ScriptError.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidDriver._setup_test):
+
+2012-11-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Support ResourceRequest's setTimeoutInterval
+ https://bugs.webkit.org/show_bug.cgi?id=101731
+
+ Reviewed by Simon Hausmann.
+
+ Enable XHR_TIMEOUT now that we support the necessary feature.
+
+ * qmake/mkspecs/features/features.pri:
+
+2012-11-12 Gustavo Noronha Silva <gns@gnome.org>
+
+ Unreviewed. Removing myself from the list of address to CC on EWS
+ build failure; the CC turned out to just be too noisy so I'm
+ tracking those in a different way.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (GtkEWS):
+
+2012-11-12 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Can not load MHTML documents
+ https://bugs.webkit.org/show_bug.cgi?id=101765
+
+ Reviewed by Simon Hausmann.
+
+ Enable MHTML feature.
+
+ * qmake/mkspecs/features/features.pri:
+
+2012-11-12 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Schedule the RTCDataChannel events to be triggered at idle state
+ https://bugs.webkit.org/show_bug.cgi?id=101751
+
+ Reviewed by Adam Barth.
+
+ Makes the data channel mocks to be synchronous instead of asynchronous to be able to
+ properly test RTCDataChannel event handling.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::sendStringData):
+ (MockWebRTCPeerConnectionHandler::sendRawData):
+
+2012-11-12 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move TestRunner implementation into WebTestRunner namespace
+ https://bugs.webkit.org/show_bug.cgi?id=101837
+
+ Reviewed by Adam Barth.
+
+ That way, we don't get collisions when linking e.g. against chromium's
+ net test support library.
+
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (WebTestRunner):
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (WebTestRunner):
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.h:
+ (WebTestRunner):
+
+2012-11-12 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] MiniBrowser should not strongly depend on QtTestSupport.
+ https://bugs.webkit.org/show_bug.cgi?id=101775
+
+ Introducing HAVE(QTTESTSUPPORT) to allow building
+ MiniBrowser without QtTestSupport.
+ This is necessary when using a production build.
+
+ Reviewed by Tor Arne Vestbø.
+
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::handleUserOptions):
+ * qmake/mkspecs/features/configure.prf:
+ * qmake/mkspecs/features/features.prf:
+
+2012-11-11 Kangil Han <kangil.han@samsung.com>
+
+ Change build congratulation message in EFL
+ https://bugs.webkit.org/show_bug.cgi?id=101833
+
+ Reviewed by Gyuyoung Kim.
+
+ EFL port is currently supporting both WK1 and WK2.
+ But, build congratulation message still shows WK1(EWebLauncher) only.
+ Therefore, this patch adopts WK2 reference execution(MiniBrowser) in its message.
+
+ From 'To run EWebLauncher with this newly-built code, use the'
+ to 'To run EWebLauncher/MiniBrowser with this newly-built code, use the'.
+
+ * Scripts/build-webkit:
+ (writeCongrats):
+ * Scripts/webkitdirs.pm:
+ (launcherName):
+
+2012-11-09 Ryosuke Niwa <rniwa@webkit.org>
+
+ People with dichromacy can't tell crashes and passes on flakiness dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=101711
+
+ Reviewed by Ojan Vafai.
+
+ Lower the brightness of orange, and raise the brightness of green so that
+ people with color blindnes can still distinguish passes and crashes easily.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard_tests.css:
+ (.P):
+ (.C):
+
+2012-11-09 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Deleting all files relating to the deprecated PeerConnection00
+ https://bugs.webkit.org/show_bug.cgi?id=101730
+
+ Reviewed by Adam Barth.
+
+ Since RTCPeerConenction has superseeded PeerConnection00 this patch removes all
+ files relating to the old API.
+
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp:
+ * DumpRenderTree/chromium/MockWebMediaStreamCenter.h:
+ (MockWebMediaStreamCenter):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2012-11-09 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL] Give the view a size in TestWebKitAPI
+ https://bugs.webkit.org/show_bug.cgi?id=101770
+
+ Reviewed by Laszlo Gombos.
+
+ 2 tests are currently failing, because they expect us to paint, but we don't paint if the view size is empty.
+
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::PlatformWebView::PlatformWebView):
+ (TestWebKitAPI::PlatformWebView::~PlatformWebView):
+ (TestWebKitAPI):
+ (TestWebKitAPI::PlatformWebView::resizeTo):
+
+2012-11-09 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r134068.
+ http://trac.webkit.org/changeset/134068
+ https://bugs.webkit.org/show_bug.cgi?id=101766
+
+ Caused crashes on the bots. (Requested by rakuco on #webkit).
+
+ * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-11-09 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Bump the jhbuild Cairo version to 1.12.8
+ https://bugs.webkit.org/show_bug.cgi?id=101721
+
+ Bump the Cairo version in Jhbuild moduleset to 1.12.8. This version
+ should fix multiple failures in canvas tests and also contains
+ fixes for X-related crashes that occurred from the 1.12.4 version onwards.
+
+ * gtk/jhbuild.modules:
+
+2012-11-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [WTR][Cairo] Do not call paintRepaintRectOverlay() when there is no repaint rect.
+ https://bugs.webkit.org/show_bug.cgi?id=101759
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Improve
+ the check for an empty repaintRect -- we need to check if the
+ WKArrayRef has any items. `if (repaintRect)' will return true
+ regardless of whether the array is empty or not.
+
+
+2012-11-09 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Stop watchlist from triggering QtBuildSystem rule on DerivedSources
+
+ Having DerivedSources.pri in the watchlist regexp was creating too much
+ noise.
+
+ Reviewed by Ossy.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-11-09 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ webkitpy/layouttests integration test fails if high shards/processes environment variables are used
+ https://bugs.webkit.org/show_bug.cgi?id=101455
+
+ Reviewed by Dirk Pranke.
+
+ Updating test to disregard WEBKIT_TEST_MAX_LOCKED_SHARDS environment variable.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_max_locked_shards):
+
+2012-11-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][DRT] Force a repaint before tracking repaint rects.
+ https://bugs.webkit.org/show_bug.cgi?id=101743
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Do like other ports and force a repaint before we start tracking
+ repaints so that the pixel results generated look more in line
+ with what's expected.
+
+ * DumpRenderTree/efl/DumpRenderTree.cpp:
+ (displayWebView): Call DRTSupport::forceLayout() before start
+ tracking repaints.
+
+2012-11-09 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] DRT - eventSender.keyDown() needs to support pageUp, pageDown, home, end key
+ https://bugs.webkit.org/show_bug.cgi?id=100937
+
+ Reviewed by Rob Buis.
+
+ 1. Translate these keys to their corresponding BlackBerry key code.
+ 2. Break down a KeyChar event to a KeyDown/KeyUp pair. This is required
+ because we only handle scrolling on a KeyDown event in WebPage::keyEvent()
+ , and internally a KeyChar event is interpreted as a KeyDown event + a
+ KeyUp event in InputHandler::handleKeyboardInput().
+
+ Tests fixed:
+ 1. editing/input/scroll-viewport-page-up-down.html
+ 2. editing/selection/move-begin-end.html
+ 3. fast/forms/select-popup-pagekeys.html
+
+ * DumpRenderTree/blackberry/EventSender.cpp:
+ (keyDownCallback):
+
+2012-11-09 Simon Hausmann <simon.hausmann@digia.com>
+
+ Unreviewed prospective Qt/Windows build bot fix:
+
+ Make determination of qmake mkspec work with older versions of Qt that
+ still create a "mkspecs/default" directory.
+
+ * Scripts/webkitdirs.pm:
+ (qtMakeCommand):
+
+2012-11-09 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Introduce a WebTestProxy to override methods in WebViewClient for layout tests
+ https://bugs.webkit.org/show_bug.cgi?id=101452
+
+ Reviewed by Adam Barth.
+
+ The WebTestProxy is template, so it can derive from an implementation
+ of the WebViewClient interface. That way, WebTestProxy can hook into
+ individual methods of the WebViewClient and forward all the rest to the
+ actual implementation.
+
+ To demonstrate how I want to use this, I moved the
+ postAccessibilityNotification method from WebViewHost to WebTestProxy.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h: Added.
+ (WebKit):
+ (WebTestRunner):
+ (WebTestProxyBase):
+ (WebTestProxy):
+ (WebTestRunner::WebTestProxy::WebTestProxy):
+ (WebTestRunner::WebTestProxy::~WebTestProxy):
+ (WebTestRunner::WebTestProxy::postAccessibilityNotification):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp: Added.
+ (WebTestRunner):
+ (WebTestRunner::WebTestProxyBase::WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::~WebTestProxyBase):
+ (WebTestRunner::WebTestProxyBase::setInterfaces):
+ (WebTestRunner::WebTestProxyBase::setDelegate):
+ (WebTestRunner::WebTestProxyBase::doPostAccessibilityNotification):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createNewWindow):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-11-09 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Build with MSVC fails to use nmake instead of make
+ https://bugs.webkit.org/show_bug.cgi?id=98645
+
+ Reviewed by Tor Arne Vestbø.
+
+ Don't rely on the "default" mkspec but instead query the target
+ mkspec variable from qmake to find the right qmake.conf.
+
+ * Scripts/webkitdirs.pm:
+ (qtMakeCommand):
+
+2012-11-08 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL] about:blank should display the blank page
+ https://bugs.webkit.org/show_bug.cgi?id=101566
+
+ Reviewed by Laszlo Gombos.
+
+ Add a check to return early without prepending http:// scheme, if the
+ URL is 'about:blank'.
+
+ * EWebLauncher/url_utils.c:
+ (url_from_user_input):
+
+2012-11-08 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add proper support for fullscreen API to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=101615
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement fullscreen API support in MiniBrowser. When entering
+ fullscreen a popup is shown to notify the user that something
+ is displayed in fullscreen and to advertise that the Escape
+ key can be used to exit fullscreen. This behavior is according
+ to specification.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_fullscreen_accept):
+ (on_fullscreen_deny):
+ (on_fullscreen_enter):
+ (on_fullscreen_exit):
+ (window_create):
+
+2012-11-08 Slavomir Kaslev <skaslev@google.com>
+
+ [Chromium] DumpRenderTree fix for canvas in software compositing
+ https://bugs.webkit.org/show_bug.cgi?id=101509
+
+ Reviewed by Adrienne Walker.
+
+ Don't use accelerated canvas 2d when in software compositing mode.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::runFileTest):
+
+2012-11-08 Jakob Petsovits <jpetsovits@rim.com>
+
+ [BlackBerry] Rework the API to use document coordinates
+ https://bugs.webkit.org/show_bug.cgi?id=101608
+ RIM PR 173292
+
+ Reviewed by Adam Treat.
+
+ Adapt to changed WebPage API.
+ See Source/WebKit/blackberry/ChangeLog for details.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::DumpRenderTree):
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+
+2012-11-08 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
+ https://bugs.webkit.org/show_bug.cgi?id=101526
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Turn on WTF_USE_TILED_BACKING_STORE for EFL port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-08 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix build with MSVC 2012 and Angle
+ https://bugs.webkit.org/show_bug.cgi?id=101588
+
+ Reviewed by Tor Arne Vestbø.
+
+ Angle includes STL's <memory> header file, which with MSVC 2012 includes stdint.h. MSVC 2012
+ does ship stdint.h, but it's lacking other headers such as inttypes.h.
+
+ So for the rest of WebKit we have to continue to use our own versions of these files from
+ JavaScriptCore/os-win32. But for Angle we are just including a shipped STL header file (memory)
+ and so it's up to the compiler to make that work, i.e. using the stdint.h it ships.
+
+ This patch moves the addition of JavaScriptCore/os-win32 out of default_post.prf, so that it
+ doesn't apply to each and every target anymore. In particular it won't apply to Angle anymore,
+ because its presence causes a build issue where due to the addition of os-win32/ we end up
+ including our own stdint.h but are lacking WTF/ to be in the include search path (which our own
+ stdint.h requires). So out of default_post.prf and into WTF.pri, our own wrappers are now only
+ used where WTF is also needed, and since os-win32/stdint.h depends on wtf/Platform.h, it seems
+ like a logical location.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-11-08 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ Unreviewed, rolling out r133859.
+ http://trac.webkit.org/changeset/133859
+ https://bugs.webkit.org/show_bug.cgi?id=101526
+
+ Breaks EFL bots test execution.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-08 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Reduce the number of clean builds
+ https://bugs.webkit.org/show_bug.cgi?id=100844
+
+ Reviewed by Tor Arne Vestbø.
+
+ A change in any Qt project file shouldn't trigger clean
+ build always, but only if the incremental build failed.
+
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-11-08 Kangil Han <kangil.han@samsung.com>
+
+ [EFL][MiniBrowser] Add encoding detector option.
+ https://bugs.webkit.org/show_bug.cgi?id=100931
+
+ Reviewed by Gyuyoung Kim.
+
+ Add a runtime option to enable/disable encoding detector.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (elm_main):
+
+2012-11-08 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] DumpRenderTree does not honor the shouldDumpPixels boolean argument of dumpAsText
+ https://bugs.webkit.org/show_bug.cgi?id=101485
+
+ Reviewed by Csaba Osztrogonác.
+
+ [Qt] DumpRenderTree does not honor the shouldDumpPixels boolean argument of dumpAsText
+
+ Support dumpAsText(true) which means we should not dump a render tree
+ but should dump pixels. All other platforms already support it.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::reset):
+ (TestRunner::dumpAsText):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner::shouldDumpPixels):
+ (TestRunner):
+
+2012-11-08 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL] Turn on WTF_USE_TILED_BACKING_STORE by default
+ https://bugs.webkit.org/show_bug.cgi?id=101526
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Turn on WTF_USE_TILED_BACKING_STORE for EFL port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-11-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ Make wait-for-SVN-server.py accept empty string as revision
+ https://bugs.webkit.org/show_bug.cgi?id=98014
+
+ Reviewed by Dirk Pranke.
+
+ * BuildSlaveSupport/wait-for-SVN-server.py:
+ (waitForSVNRevision):
+
+2012-11-07 Dirk Pranke <dpranke@chromium.org>
+
+ garden-o-matic should handle concurrent requests
+ https://bugs.webkit.org/show_bug.cgi?id=101407
+
+ Reviewed by Ojan Vafai.
+
+ Garden-o-Matic is implemented on top of the BaseHttpServer
+ python library, which implements a single-threaded (one request at
+ a time) server. This means that we can only rebaseline one test at
+ a time, and when using a local results file, even fetching the results
+ for diffs is single-threaded.
+
+ Mixing in the ThreadingMixin enables concurrent requests (subject
+ to the global python interpreter lock). Given that we're doing all
+ of the work in webkit-patch subprocesses, I think this is safe.
+
+ Of course, it may not be safe to do some of the subprocesses in
+ parallel (e.g., rollout), but I think as long as we don't issue
+ commands that touch overlapping sets of files things should be fine.
+ The file locking over modifying testexpectations should keep that
+ from being corrupted.
+
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPServer):
+ (GardeningHTTPRequestHandler):
+
+2012-11-07 Andreas Kling <akling@apple.com>
+
+ Remove build-webkit dependency on Java SDK for Apple Mac WebKit.
+ <http://webkit.org/b/101492>
+
+ Reviewed by Anders Carlsson.
+
+ Don't check for a Java SDK before building the Apple Mac port. It's no longer needed for
+ the build after the Java bridge was removed.
+
+ * Scripts/build-webkit:
+ (cMakeArgsFromFeatures):
+
+2012-11-07 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Allow client to override setWindowFrame() / getWindowFrame()
+ https://bugs.webkit.org/show_bug.cgi?id=101496
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Provide implementation for on_window_geometry_get() / on_window_geometry_set()
+ smart functions that interact with the elm_win widget.
+
+ * MiniBrowser/efl/main.c:
+ (on_window_geometry_get):
+ (on_window_geometry_set):
+ (window_create):
+
+2012-11-07 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL][WK2][AC] API tests crash
+ https://bugs.webkit.org/show_bug.cgi?id=101480
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ When AC is enabled, 8 API tests are crashing. We need to properly set the evas engine for these tests.
+
+ * TestWebKitAPI/efl/PlatformWebView.cpp:
+ (TestWebKitAPI::initEcoreEvas):
+
+2012-11-07 Peter Beverloo <peter@chromium.org>
+
+ Don't show the Android tester in garden-o-matic yet
+ https://bugs.webkit.org/show_bug.cgi?id=101476
+
+ Reviewed by Adam Barth.
+
+ The Android tester just started running layout tests, and doesn't upload its
+ results yet. Don't show it for now. This exception will be removed once it
+ has a baseline of greenness.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ (.):
+
+2012-11-07 Balazs Kelemen <kbalazs@webkit.org>
+
+ WebKitTestRunner flakily hangs when running pixel tests on Qt
+ https://bugs.webkit.org/show_bug.cgi?id=100686
+
+ Reviewed by Csaba Osztrogonác.
+
+ Make WebKitTestRunner harden against the situation when the coordinated
+ graphics rendering synchronisation fails. If we time out when waiting
+ for the forced repaint to finish it usually a symptom of the synchronisation
+ has been broken. In this case all other tests will fail with the same error.
+ The underlying problem is not yet known. Ths patch make us report this situation
+ as web process unresponsiveness, so the test harness will kill us and launch
+ a new instance. This will make our pixel test bot usable while it should not limit
+ us debugging the underlying bug.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::run):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::TestInvocation):
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::dumpWebProcessUnresponsiveness):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation): Introduce new members to hold our state
+ that was local to invoke() so far.
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-11-07 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Open link in this window action
+ https://bugs.webkit.org/show_bug.cgi?id=101226
+
+ Reviewed by Simon Hausmann.
+
+ Populates the context-menu with the new action when the default action is to open in a new window.
+
+ * QtTestBrowser/webview.cpp:
+ (createContextMenu):
+
+2012-11-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Add ewk_settings_preferred_minimum_contents_width_get/set API
+ https://bugs.webkit.org/show_bug.cgi?id=101467
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added ewk_settings_preferred_minimum_contents_width_get/set API which is used for setting/getting
+ of default minimum contents width for non viewport meta element sites.
+ Set default minimum contents width to '0' for MiniBrowser as it should behave like desktop browser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+
+2012-11-07 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] Add EFL to garden-o-matic
+ https://bugs.webkit.org/show_bug.cgi?id=101444
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added the EFL bots running layout tests to the garden-o-matic report
+ page. We are skipping here the bot that just builds WebKit EFL to make
+ the data fetching faster.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ (.):
+
+2012-11-07 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Make EWK classes Ewk_Objects
+ https://bugs.webkit.org/show_bug.cgi?id=101057
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Now all the existing EWK classes share common Ewk_Object ref/unref API.
+
+ * MiniBrowser/efl/main.c:
+ (close_file_picker):
+ (on_file_chooser_request):
+
+2012-11-07 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Unreviewed. Add Qt EWS bots to the watchers list.
+
+ * Scripts/webkitpy/tool/commands/earlywarningsystem.py:
+ (QtEWS):
+ (QtWK2EWS):
+
+2012-11-07 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
+ https://bugs.webkit.org/show_bug.cgi?id=93611
+
+ Reviewed by Gyuyoung Kim.
+
+ WebKitTestRunner enables spelling feature to pass the layout tests from editing/spelling.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ Enables spelling by WebKit2 C API.
+
+2012-11-07 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ [EFL] Switch the efl-linux-slave-2 to Wk2 Release
+ https://bugs.webkit.org/show_bug.cgi?id=101345
+
+ Reviewed by Gyuyoung Kim.
+
+ Switching efl-linux-slave-2 to Wk2 Release.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2012-11-07 Christophe Dumez <christophe.dumez@intel.com>
+
+ Add replaceWithLiteral() method to WTF::String
+ https://bugs.webkit.org/show_bug.cgi?id=101257
+
+ Reviewed by Benjamin Poulain.
+
+ Add API tests for String::replaceWithLiteral() and corresponding
+ StringImpl methods.
+
+ * TestWebKitAPI/CMakeLists.txt: Add WTFString API tests to CMake.
+ * TestWebKitAPI/Tests/WTF/StringImpl.cpp:
+ (TestWebKitAPI::TEST):
+ (TestWebKitAPI):
+ * TestWebKitAPI/Tests/WTF/WTFString.cpp:
+ (TestWebKitAPI::TEST):
+
+2012-11-07 Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
+
+ [Qt] Fix build of modules depending on QtWebKit when using prefix
+ https://bugs.webkit.org/show_bug.cgi?id=101437
+
+ Reviewed by Simon Hausmann.
+
+ Remove setting of MODULE_QMAKE_OUTDIR from here, it's been moved to .qmake.conf.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-11-06 Dan Beam <dbeam@chromium.org>
+
+ Enable REQUEST_AUTOCOMPLETE for chromium port
+ https://bugs.webkit.org/show_bug.cgi?id=101376
+
+ Reviewed by Adam Barth.
+
+ This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
+ HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+ Enables the requestAutocomplete runtime feature flag during tests.
+
+2012-11-06 KyungTae Kim <ktf.kim@samsung.com>
+
+ [WK2][EFL] Add shortcut for setting a pagination mode on Minibrowser
+ https://bugs.webkit.org/show_bug.cgi?id=100301
+
+ Reviewed by Gyuyoung Kim.
+
+ Setting pagination modes is for a paginated view - left to right / right to left / top to bottom / bottom to top.
+ Assign a shortcut "F7" to set pagination modes for tests.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+
+2012-11-06 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL][EWebLauncher] Use Ctrl +/- to zoom in EWebLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=100207
+
+ Reviewed by Gyuyoung Kim.
+
+ Use "Ctrl -" instead of "F7" to zoom out, and use "Ctrl +" instead of "F8" to zoom in,
+ and use "Ctrl 0" to set to default zoom level.
+ They are more common shortcuts on usual browsers.
+
+ * EWebLauncher/main.c:
+ (on_key_down):
+
+2012-11-06 Oliver Hunt <oliver@apple.com>
+
+ Don't warn about RefPtr* parameters
+ https://bugs.webkit.org/show_bug.cgi?id=101403
+
+ Reviewed by Gavin Barraclough.
+
+ RefPtr<>* is a valid parameter type.
+
+ * Scripts/webkitpy/style/checkers/cpp.py:
+ (check_function_definition_and_pass_ptr):
+ * Scripts/webkitpy/style/checkers/cpp_unittest.py:
+ (PassPtrTest.test_ref_ptr_parameter_value):
+
+2012-11-06 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [WTR] Reset EventSender before running each test.
+ https://bugs.webkit.org/show_bug.cgi?id=101353
+
+ Reviewed by Simon Fraser.
+
+ Contrary to what was done to at least some ports in DumpRenderTree,
+ EventSender did not currently reset its values in WTR. This caused
+ flakiness if a test such as editing/selection/fake-doubleclick.html was
+ run twice in a row, since the click count was not reset across each
+ run.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController): Do not create m_eventSenderProxy
+ in the constructor anymore, it is created in
+ resetStateToConsistentValues now.
+ (WTR::TestController::resetStateToConsistentValues): Recreate
+ m_eventSenderProxy every time this method is run.
+ * WebKitTestRunner/TestController.h: Make m_eventSenderProxy an OwnPtr
+ and guard it with a platform #ifdef.
+ * WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
+ (WTR::EventSenderProxy::~EventSenderProxy): Add an empty
+ implementation.
+ * WebKitTestRunner/mac/EventSenderProxy.mm:
+ (WTR::EventSenderProxy::~EventSenderProxy): Ditto.
+ * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
+ (WTR::EventSenderProxy::~EventSenderProxy): Ditto.
+
+2012-11-06 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Refactor Ewk_Auth_Request, Ewk_Url_Scheme_Request and Ewk_Download_Job to be Ewk_Objects
+ https://bugs.webkit.org/show_bug.cgi?id=101383
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Ewk_Auth_Request, Ewk_Url_Scheme_Request and Ewk_Download_Job are Ewk_Objects now.
+
+ * MiniBrowser/efl/main.c:
+ (auth_popup_close):
+ (on_authentication_request):
+
+2012-11-06 Tommy Widenflycht <tommyw@google.com>
+
+ [chromium] MediaStream API: Remove the valgrind issue with MockWebRTCPeerConnectionHandler
+ https://bugs.webkit.org/show_bug.cgi?id=101336
+
+ Reviewed by Andreas Kling.
+
+ This patch changes the delete to delete [] to match the new[].
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+
+2012-11-06 Mihai Balan <mibalan@adobe.com>
+
+ Add Adobe's bug tracker to committers.py
+ https://bugs.webkit.org/show_bug.cgi?id=101338
+
+ Reviewed by Kentaro Hara.
+
+ Adding Adobe's bug tracker mailing list to committers.py
+ to enable its inclusion in the autocomplete list.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-06 Sami Kyostila <skyostil@chromium.org>
+
+ [chromium] Enable fixed position compositing on Android DRT
+ https://bugs.webkit.org/show_bug.cgi?id=100263
+
+ Reviewed by James Robinson.
+
+ Chrome on Android forces composited mode for every page and creates
+ stacking contexts and graphics layers for fixed positioned elements.
+ Change the DumpRenderTree settings to match this.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setAcceleratedCompositingForFixedPositionEnabled):
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort.additional_drt_flag):
+
+2012-11-06 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][WTR] EventSender: Get rid of the WTRMouseButton enum.
+ https://bugs.webkit.org/show_bug.cgi?id=101340
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Get rid of an enum which was basically a duplicate of the
+ WKEventMouseButton one in the shared API.
+
+ The only difference is that it also had a case for a 4th mouse
+ button that we treat in a special way in evasMouseButton() now.
+
+ * WebKitTestRunner/EventSenderProxy.h:
+ (EventSenderProxy):
+ * WebKitTestRunner/efl/EventSenderProxyEfl.cpp:
+ (WTR::evasMouseButton):
+ (WTR::EventSenderProxy::EventSenderProxy):
+ (WTR::EventSenderProxy::mouseUp):
+ (WTR::EventSenderProxy::mouseMoveTo):
+ (WTR::EventSenderProxy::mouseScrollBy):
+ (WTR::EventSenderProxy::leapForward):
+
+2012-11-06 Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+ [EFL][WK2] Minibrowser forgets http variables when url includes ampersand
+ https://bugs.webkit.org/show_bug.cgi?id=101061
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Elementary entry only returns 'markup' text, meaning ampersands
+ in a url will become "&amp;". Use elm_entry_markup_to_utf8() and
+ elm_entry_utf8_to_markup() when interacting with the entry.
+
+ * MiniBrowser/efl/main.c:
+ (on_url_changed):
+ (on_url_bar_activated):
+
+2012-11-06 Balazs Kelemen <kbalazs@webkit.org>
+
+ DumpRenderTree should have --pixel-tests option again
+ https://bugs.webkit.org/show_bug.cgi?id=98648
+
+ Reviewed by Dirk Pranke.
+
+ Add back the --pixel-tests command line option to DumpRenderTree.
+ It was removed r124581 because tools don't use it after that patch.
+ However, it turned out that it is useful for debugging and working
+ with pixel tests.
+
+ * DumpRenderTree/efl/DumpRenderTree.cpp:
+ (parseCommandLineOptions):
+ (runTest):
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (initializeGlobalsFromCommandLineOptions):
+ (runTest):
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (initializeGlobalsFromCommandLineOptions):
+ (runTest):
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (isOption):
+ (printUsage):
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::processLine):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (WebCore::DumpRenderTree::setShouldDumpPixelsForAllTests):
+ (DumpRenderTree):
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (runTest):
+ (dllLauncherEntryPoint):
+ * DumpRenderTree/wx/DumpRenderTreeWx.cpp:
+ (runTest):
+ (MyApp::OnInit):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController):
+ (WTR::TestController::initialize):
+ (WTR::TestController::runTest):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline*: fix typo for --results-directory
+ https://bugs.webkit.org/show_bug.cgi?id=101295
+
+ Reviewed by Ojan Vafai.
+
+ Had --results_directory instead of --results-directory in both the
+ code and the unit test.
+
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractParallelRebaselineCommand._rebaseline_commands):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineJson.test_results_directory):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline*: fix handling of local file urls
+ https://bugs.webkit.org/show_bug.cgi?id=101296
+
+ Reviewed by Ojan Vafai.
+
+ When using --results-directory, we need to make sure we're converting
+ paths to file:/// urls for urllib to work correctly. Also, this
+ patch reworks the unit tests to get better coverage (of the execute()
+ command) and reduce copy/pasting of mock options.
+
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._rebaseline_test_and_update_expectations):
+ (RebaselineTest.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineTest.setUp):
+ (test_rebaseline_updates_expectations_file):
+ (test_rebaseline_does_not_include_overrides):
+ (test_rebaseline_test_with_results_directory):
+ (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
+
+2012-11-05 Kenneth Russell <kbr@google.com>
+
+ Added secondary email address and IRC nick.
+ https://bugs.webkit.org/show_bug.cgi?id=101290
+
+ Unreviewed change to committers.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-05 Glenn Adams <glenn@skynav.com>
+
+ Add IRC alias for Glenn Adams
+ https://bugs.webkit.org/show_bug.cgi?id=101262
+
+ Reviewed by Eric Seidel.
+
+ Add IRC alias for Glenn Adams.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-05 Dima Gorbik <dgorbik@apple.com>
+
+ Back out controversial changes from Bug 98665.
+ https://bugs.webkit.org/show_bug.cgi?id=101244
+
+ Reviewed by David Kilzer.
+
+ Backing out changes from Bug 98665 until further discussions take place on rules for including Platform.h in Assertions.h.
+
+ * DumpRenderTree/mac/MockGeolocationProvider.mm:
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: lint, clean up rebaseline.py
+ https://bugs.webkit.org/show_bug.cgi?id=101240
+
+ Reviewed by Ojan Vafai.
+
+ Miscellaneous cleanup of lint errors and warnings.
+
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (RebaselineTest._test_root):
+ (OptimizeBaselines._optimize_baseline):
+ (OptimizeBaselines.execute):
+ (AnalyzeBaselines.__init__):
+ (AbstractParallelRebaselineCommand):
+ (AbstractParallelRebaselineCommand._builders_to_fetch_from):
+ (AbstractParallelRebaselineCommand._files_to_add):
+ (AbstractParallelRebaselineCommand._rebaseline):
+ (RebaselineExpectations.__init__):
+ (Rebaseline.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (_BaseTestCase.setUp):
+ (TestAnalyzeBaselines.setUp):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch optimize-baselines should take a --platform arg
+ https://bugs.webkit.org/show_bug.cgi?id=97623
+
+ Reviewed by Ojan Vafai.
+
+ So that we can optionally limit/control which platforms' results
+ are affected.
+
+ This patch adds --platform to analyze-baselines as well.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ (_baseline_search_hypergraph):
+ (BaselineOptimizer.__init__):
+ * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+ (TestBaselineOptimizer.__init__):
+ (BaselineOptimizerTest.test_move_baselines):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (OptimizeBaselines.__init__):
+ (OptimizeBaselines.execute):
+ (AnalyzeBaselines.__init__):
+ (AnalyzeBaselines.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestAnalyzeBaselines.test_default):
+ (TestAnalyzeBaselines.test_missing_baselines):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline-expectations should take a --platform arg
+ https://bugs.webkit.org/show_bug.cgi?id=97621
+
+ Reviewed by Ojan Vafai.
+
+ So that we can limit which platforms we attempt to rebaseline;
+ this can reduce the noise the command produces if some ports
+ have errors or warnings in their TestExpectations files and/or
+ help produce more predictable results.
+
+ In testing this patch, I realized that the rebaseline-in-parallel
+ commands (rebaseline-json, rebaseline-expectations, etc.) can
+ cause multiple rebaseline-test-internal commands to attempt to
+ modify the TestExpectations files concurrently, and that we needed
+ to lock the files to prevent corruption; it would be nice if
+ we can split the updating-the-expectations-files out separately
+ from updating the filesystem (much like we do with the scm updates)
+ to avoid this concurrency.
+
+ * Scripts/webkitpy/common/system/file_lock_mock.py: Added.
+ (MockFileLock):
+ (MockFileLock.__init__):
+ (MockFileLock.acquire_lock):
+ (MockFileLock.release_lock):
+ * Scripts/webkitpy/common/system/systemhost.py:
+ (SystemHost.copy_current_environment):
+ (SystemHost):
+ (SystemHost.make_file_lock):
+ * Scripts/webkitpy/common/system/systemhost_mock.py:
+ (MockSystemHost.copy_current_environment):
+ (MockSystemHost):
+ (MockSystemHost.make_file_lock):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._update_expectations_file):
+ (RebaselineExpectations.__init__):
+ (RebaselineExpectations._add_tests_to_rebaseline_for_port):
+ (RebaselineExpectations.execute):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: clean up options for specifying multiple platforms at once
+ https://bugs.webkit.org/show_bug.cgi?id=101140
+
+ Reviewed by Ojan Vafai.
+
+ This patch reworks how we display the help strings for --platform
+ options and how we filter out platforms matching a glob. This will
+ be useful as I add patches to ensure that all the webkit-patch
+ commands are using --platform consistently to filter ports.
+
+ There should be no functional changes resulting from this patch.
+
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (platform_options):
+ (PortFactory.all_port_names):
+ (PortFactory.get_from_builder_name):
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (PrintExpectations.__init__):
+ (PrintBaselines.__init__):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (RebaselineJson.__init__):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineExpectations.setUp):
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+
+2012-11-05 Peter Beverloo <peter@chromium.org>
+
+ The layout test runner shouldn't wait for data if stdout/stderr have been closed
+ https://bugs.webkit.org/show_bug.cgi?id=101233
+
+ Reviewed by Dirk Pranke.
+
+ Trying to read the file descriptor for the stdout or stderr pipes when DumpRenderTree
+ has crashed during a Chromium Android layout test-run, which uses FIFOs for
+ communication, causes the File.fileno() method to raise a ValueError. Return early
+ if either of the pipes has already been closed.
+
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ (ServerProcess._wait_for_data_and_update_buffers_using_select):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline is broken
+ https://bugs.webkit.org/show_bug.cgi?id=101235
+
+ Reviewed by Ojan Vafai.
+
+ It didn't get updated to handle the change in parsing --suffixes
+ properly, and the unit test didn't get updated either, masking the
+ problem.
+
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (Rebaseline._tests_to_update):
+ (Rebaseline.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaseline.test_rebaseline):
+
+2012-11-05 Dirk Pranke <dpranke@chromium.org>
+
+ lint-webkitpy doesn't autoinstall pylint properly.
+ https://bugs.webkit.org/show_bug.cgi?id=101106
+
+ Reviewed by Ojan Vafai.
+
+ Re-land r133381 with fix; ironically, lint-webkitpy would've
+ complained about the problem. Also modify pylintrc and clean up
+ any other lint errors in the modified files.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._set_up_target_dir):
+ (AutoInstaller):
+ (AutoInstaller._make_package):
+ (AutoInstaller._create_scratch_directory):
+ (AutoInstaller._install):
+ (AutoInstaller.install):
+ * Scripts/webkitpy/pylintrc:
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook._ensure_autoinstalled_dir_is_in_sys_path):
+ (AutoinstallImportHook):
+ (AutoinstallImportHook.find_module):
+ (AutoinstallImportHook._install_pylint):
+ (AutoinstallImportHook._install_coverage):
+ (AutoinstallImportHook._install_eliza):
+ (AutoinstallImportHook._install_webpagereplay):
+ (AutoinstallImportHook._install):
+ * Scripts/webkitpy/thirdparty/__init___unittest.py:
+ (ThirdpartyTest.test_import_hook.MockImportHook.__init__):
+ (ThirdpartyTest.test_import_hook):
+ (ThirdpartyTest.test_imports):
+
+2012-11-05 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL] Fix build warning in EWebLauncher/main.c
+ https://bugs.webkit.org/show_bug.cgi?id=101197
+
+ Reviewed by Kentaro Hara.
+
+ Because the strp of _Ecore_Getopt_Value is char** (Ecore_Getopt.h),
+ The parameter of ECORE_GETOPT_VALUE_STR should be char*
+
+ * EWebLauncher/main.c:
+ (_User_Arguments):
+
+2012-11-05 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [EFL][WK2] Add --window-size command line option to EFL MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=100942
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added window-size (-s) command line option to EFL MiniBrowser.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+ (parse_window_size):
+ (elm_main):
+
+2012-11-05 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] The icon database path should be set by the client
+ https://bugs.webkit.org/show_bug.cgi?id=101182
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enable favicon database functionality in MiniBrowser since
+ it is used and it is no longer enabled by default.
+
+ * MiniBrowser/efl/main.c:
+ (elm_main):
+
+2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WK2] setPlatformStrategies always asserts after r132744
+ https://bugs.webkit.org/show_bug.cgi?id=100838
+
+ Reviewed by Simon Hausmann.
+
+ Reland with build fixes.
+
+ Turned test runners to use the new QtTestSupport.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/qt/QtInitializeTestFonts.h: Removed.
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize): Removed the comment from here
+ because it was just lying, apparently two times. First, it is not incorrect
+ to reinitialize our font set and clear font caches, it is what the tests
+ expect. Second, the use of QRawFont has nothing to do with the font cache.
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-04 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r133381.
+ http://trac.webkit.org/changeset/133381
+ https://bugs.webkit.org/show_bug.cgi?id=101161
+
+ It made webkit-patch useless (Requested by Ossy_weekend on
+ #webkit).
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._create_scratch_directory):
+ (AutoInstaller._install):
+ (AutoInstaller.install):
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook.__init__):
+ (AutoinstallImportHook._install_pylint):
+ (AutoinstallImportHook._install_coverage):
+ (AutoinstallImportHook._install_eliza):
+ (AutoinstallImportHook._install):
+ * Scripts/webkitpy/thirdparty/__init___unittest.py:
+ (ThirdpartyTest.test_import_hook.MockImportHook.__init__):
+ (ThirdpartyTest.test_import_hook):
+
+2012-11-03 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r133403, r133404, and r133409.
+ http://trac.webkit.org/changeset/133403
+ http://trac.webkit.org/changeset/133404
+ http://trac.webkit.org/changeset/133409
+ https://bugs.webkit.org/show_bug.cgi?id=101158
+
+ "Broke tests" (Requested by kbalazs on #webkit).
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/qt/QtInitializeTestFonts.cpp: Renamed from Source/WebCore/platform/qt/QtTestSupport.cpp.
+ (WebKit):
+ (WebKit::initializeTestFonts):
+ * DumpRenderTree/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ (WebKit):
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::handleUserOptions):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize):
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WK2] setPlatformStrategies always asserts after r132744
+ https://bugs.webkit.org/show_bug.cgi?id=100838
+
+ 2nd unreviewed buildfix.
+
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+
+2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WK2] setPlatformStrategies always asserts after r132744
+ https://bugs.webkit.org/show_bug.cgi?id=100838
+
+ Unreviewed buildfix.
+
+ * WebKitTestRunner/Target.pri:
+
+2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WK2] setPlatformStrategies always asserts after r132744
+ https://bugs.webkit.org/show_bug.cgi?id=100838
+
+ Reviewed by Simon Hausmann.
+
+ Reland with build fix.
+
+ Turned test runners to use the new QtTestSupport.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/qt/QtInitializeTestFonts.h: Removed.
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize): Removed the comment from here
+ because it was just lying, apparently two times. First, it is not incorrect
+ to reinitialize our font set and clear font caches, it is what the tests
+ expect. Second, the use of QRawFont has nothing to do with the font cache.
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-03 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r133397.
+ http://trac.webkit.org/changeset/133397
+ https://bugs.webkit.org/show_bug.cgi?id=101155
+
+ "Broke Qt. No way to force the damn bots to do a clean build.
+ I'm giving up." (Requested by kbalazs on #webkit).
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/qt/QtInitializeTestFonts.cpp: Renamed from Source/WebCore/platform/qt/QtTestSupport.cpp.
+ (WebKit):
+ (WebKit::initializeTestFonts):
+ * DumpRenderTree/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ (WebKit):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize):
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-03 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WK2] setPlatformStrategies always asserts after r132744
+ https://bugs.webkit.org/show_bug.cgi?id=100838
+
+ Reviewed by Simon Hausmann.
+
+ Turned test runners to use the new QtTestSupport.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize): Removed the comment from here
+ because it was just lying, apparently two times. First, it is not incorrect
+ to reinitialize our font set and clear font caches, it is what the tests
+ expect. Second, the use of QRawFont has nothing to do with the font cache.
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-02 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline is broken
+ https://bugs.webkit.org/show_bug.cgi?id=101081
+
+ Reviewed by Ojan Vafai.
+
+ I broke this in r133061 and the unit tests weren't covering this
+ code path. Fixed the issue and the tests. --results-directory
+ doesn't make sense for either 'webkit-patch rebaseline' or
+ 'webkit-patch rebaseline-expectations', so we don't want to expose
+ that as a command line option, but they all call a common
+ _rebaseline() routine that references options.results_directory,
+ so we need to set a default value.
+
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineExpectations.execute):
+ (Rebaseline.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaseline):
+ (TestRebaseline.test_rebaseline):
+
+2012-11-02 Dirk Pranke <dpranke@chromium.org>
+
+ lint-webkitpy doesn't autoinstall pylint properly
+ https://bugs.webkit.org/show_bug.cgi?id=101106
+
+ Reviewed by Ojan Vafai.
+
+ Turns out the autoinstalling code for pylint didn't install
+ pylint's dependencies, and the autoinstaller code didn't work
+ using nested directories (e.g., "logilab/astng"). Fix those issues,
+ clean up the autoinstaller code, and add tests to make sure everything
+ imports successfully.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller._create_scratch_directory):
+ (AutoInstaller._install):
+ (AutoInstaller.install):
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook._ensure_autoinstalled_dir_is_in_sys_path):
+ (AutoinstallImportHook._install_pylint):
+ (AutoinstallImportHook._install_coverage):
+ (AutoinstallImportHook._install_eliza):
+ (AutoinstallImportHook._install):
+ * Scripts/webkitpy/thirdparty/__init___unittest.py:
+ (ThirdpartyTest.test_import_hook.MockImportHook.__init__):
+ (ThirdpartyTest.test_import_hook):
+ (ThirdpartyTest.test_imports):
+
+2012-11-02 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt prints an awkward result message for missing results
+ https://bugs.webkit.org/show_bug.cgi?id=100915
+
+ Reviewed by Ojan Vafai.
+
+ Completely rework how we print out the description of
+ each tests's result - we now will print either "passed" or "failed",
+ followed by " unexpectedly" if we weren't expecting the result,
+ followed by a short description of each type of failure that happened
+ (in parentheses). Also reworked the description of each type of
+ failure slightly to be clearer.
+
+ Also rework the tests to make sure we have coverage of all of the
+ messages. Examples of the new output are posted as an attachment to
+ the bug.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations):
+ * Scripts/webkitpy/layout_tests/models/test_failures.py:
+ (FailureTimeout.message):
+ (FailureMissingResult.message):
+ (FailureTextMismatch.message):
+ (FailureMissingImageHash.message):
+ (FailureMissingImage.message):
+ (FailureImageHashMismatch.message):
+ (FailureImageHashIncorrect.message):
+ (FailureReftestMismatch.message):
+ (FailureReftestMismatchDidNotOccur.message):
+ (FailureReftestNoImagesGenerated.message):
+ (FailureMissingAudio.message):
+ (FailureAudioMismatch.message):
+ (FailureEarlyExit.message):
+ * Scripts/webkitpy/layout_tests/port/test.py:
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_run_singly_actually_runs_tests):
+ (MainTest.test_missing_and_unexpected_results):
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer._print_result_summary_entry):
+ (Printer.print_finished_test):
+ (Printer._result_message):
+ (Printer._print_unexpected_results):
+ * Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
+ * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
+2012-11-02 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: clean up logging in common.system.autoinstall
+ https://bugs.webkit.org/show_bug.cgi?id=101090
+
+ Reviewed by Ojan Vafai.
+
+ This module logged way too much, much of which was logging that
+ was either really redundant or useful only during initial development.
+ This patch deletes a lot of code and tweaks the remaining log messages
+ to be more useful now.
+
+ Also, clean up a bunch of lint errors and warnings.
+
+ * Scripts/webkitpy/common/system/autoinstall.py:
+ (AutoInstaller.__init__):
+ (AutoInstaller._write_file):
+ (AutoInstaller._set_up_target_dir):
+ (AutoInstaller._create_scratch_directory):
+ (AutoInstaller._url_downloaded_path):
+ (AutoInstaller._is_downloaded):
+ (AutoInstaller._record_url_downloaded):
+ (AutoInstaller._extract_targz):
+ (AutoInstaller._extract_all):
+ (AutoInstaller._unzip):
+ (AutoInstaller._download_to_stream):
+ (AutoInstaller._download):
+ (AutoInstaller._install):
+ (AutoInstaller.install):
+
+2012-11-02 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch analyze-baselines output is weak
+ https://bugs.webkit.org/show_bug.cgi?id=100998
+
+ Reviewed by Ojan Vafai.
+
+ Currently analyze-baselines prints a list of baselines that have
+ the same checksum per line, but the format is hard to read;
+ this patch cleans up the output to print by directory instead
+ and use the same format I recently added for debugging optimize-baselines,
+ then refactors the code so that we share and adds tests for
+ analyze-baselines (which was untested).
+
+ Also, I got rid of a couple of unnecessarily-hardcoded port names,
+ and modified the baseline optimizer to log the current world when
+ optimize fails.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ (BaselineOptimizer.read_results_by_directory):
+ (BaselineOptimizer.write_by_directory):
+ (BaselineOptimizer.optimize):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (OptimizeBaselines.execute):
+ (AnalyzeBaselines.__init__):
+ (AnalyzeBaselines._write):
+ (AnalyzeBaselines._analyze_baseline):
+ (AnalyzeBaselines.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (_FakeOptimizer):
+ (_FakeOptimizer.read_results_by_directory):
+ (TestAnalyzeBaselines):
+ (TestAnalyzeBaselines.setUp):
+ (TestAnalyzeBaselines.test_default):
+ (TestAnalyzeBaselines.test_missing_baselines):
+
+2012-11-02 Adam Barth <abarth@webkit.org>
+
+ ENABLE(UNDO_MANAGER) is disabled everywhere and is not under active development
+ https://bugs.webkit.org/show_bug.cgi?id=100711
+
+ Reviewed by Eric Seidel.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-11-02 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r133303.
+ http://trac.webkit.org/changeset/133303
+ https://bugs.webkit.org/show_bug.cgi?id=101068
+
+ "Broke qt wk2 build (seems like bots fails to rerun qmake if
+ needed)" (Requested by kbalazs on #webkit).
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/qt/QtInitializeTestFonts.cpp: Renamed from Source/WebCore/platform/qt/QtTestSupport.cpp.
+ (WebKit):
+ (WebKit::initializeTestFonts):
+ * DumpRenderTree/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ (WebKit):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Copied from Tools/WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp.
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize):
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-02 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WK2] setPlatformStrategies always asserts after r132744
+ https://bugs.webkit.org/show_bug.cgi?id=100838
+
+ Reviewed by Simon Hausmann.
+
+ Turned test runners to use the new QtTestSupport.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (main):
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::open):
+ * QtTestBrowser/QtTestBrowser.pro:
+ * QtTestBrowser/qttestbrowser.cpp:
+ (LauncherApplication::handleUserOptions):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/ActivateFontsQt.cpp:
+ (WTR::activateFonts):
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Removed.
+ * WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp:
+ * WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp:
+ (WTR::TestRunner::platformInitialize): Removed the comment from here
+ because it was just lying, apparently two times. First, it is not incorrect
+ to reinitialize our font set and clear font caches, it is what the tests
+ expect. Second, the use of QRawFont has nothing to do with the font cache.
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/qt/main.cpp:
+ (main):
+
+2012-11-02 Peter Beverloo <peter@chromium.org>
+
+ Output Android's device status before running tests on the bots
+ https://bugs.webkit.org/show_bug.cgi?id=100944
+
+ Reviewed by Dirk Pranke.
+
+ This adds a new step to the build master which will be run prior to the
+ actual tests-suites on the Chromium Android tester, and soon the Chromium
+ Android Perf bot. For each attached device, it outputs the build
+ information, battery level, battery temperature and username.
+
+ The Android tester currently is very flaky, and this will help tremendously
+ in being able to figure out what's wrong with the bot.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ (OutputAndroidDeviceStatus):
+ (TestFactory.__init__):
+ * BuildSlaveSupport/chromium/output-android-device-status: Added.
+ (GetAttachedDevices):
+ (AndroidDeviceStatus):
+ (AndroidDeviceStatus.__init__):
+ (AndroidDeviceStatus._run_adb_command):
+ (AndroidDeviceStatus.device_type):
+ (AndroidDeviceStatus.device_build):
+ (AndroidDeviceStatus.device_fingerprint):
+ (AndroidDeviceStatus.battery_level):
+ (AndroidDeviceStatus.battery_temperature):
+ (AndroidDeviceStatus.username):
+ (main):
+
+2012-11-02 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] WTR: Make sure that eventSender.mouseDown sends a press event for the second press
+ https://bugs.webkit.org/show_bug.cgi?id=101033
+
+ Reviewed by Simon Hausmann.
+
+ eventSender.mouseDown doesn't work properly since r133153 where
+ MouseButtonDblClick events aren't interpreted as Press events anymore.
+ The problem is that mouseDown sends a DblClick event instead of a Press,
+ while the correct way is to send both events.
+
+ Since QQuickWebView isn't doing anything with DblClick events anymore,
+ simply send Press events all the time and let WebCore figure out
+ where the double clicks are.
+
+ * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
+ (WTR::EventSenderProxy::updateClickCountForButton):
+ (WTR::EventSenderProxy::mouseDown):
+
+2012-11-02 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add HTTP authentication support to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=100953
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add HTTP authentication support to MiniBrowser. An authentication
+ dialog now pops up to ask the user for credentials whenever
+ a Web site requires authentication.
+
+ * MiniBrowser/efl/main.c:
+ (auth_popup_close):
+ (on_auth_cancel):
+ (on_auth_ok):
+ (on_authentication_request):
+ (window_create):
+
+2012-11-01 Yury Semikhatsky <yurys@chromium.org>
+
+ Memory instrumentation: do not call checkCountedObject with wrong pointers
+ https://bugs.webkit.org/show_bug.cgi?id=100958
+
+ Reviewed by Alexander Pavlov.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: test that if there
+ if there is class A derived from classes B and C and we have pointer B* to an
+ object of class A then MemoryInstrumentationClient::checkoutCountedObject won't
+ be called for B* but only for A*
+
+ Also MemoryInstrumentation implementation used in the test was refactored to
+ allow passing client as a parameter. The client implementation was extracted into
+ a top-level class MemoryInstrumentationTestClient.
+
+2012-11-01 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Make File Chooser dialog modal in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=100962
+
+ Reviewed by Gyuyoung Kim.
+
+ Make File Chooser dialog modal in MiniBrowser and make
+ sure it is closed and freed when its parent window is
+ closed.
+
+ * MiniBrowser/efl/main.c:
+ (close_file_picker):
+ (on_filepicker_parent_deletion):
+ (on_file_chooser_request):
+
+2012-11-01 Seonae Kim <sunaeluv.kim@samsung.com>
+
+ [EFL][DRT] Support Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=97427
+
+ Reviewed by Gyuyoung Kim.
+
+ Implement methods to use GeolocationClientMock in DumpRenderTree.
+ This client attaches to the page whenever a view is created.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::createView):
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ (TestRunner::setMockGeolocationPositionUnavailableError):
+ (TestRunner::setGeolocationPermission):
+ (TestRunner::numberOfPendingGeolocationPermissionRequests):
+
+2012-11-01 Ryosuke Niwa <rniwa@webkit.org>
+
+ Remove tests no longer needed after r133229.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+ (TestPerfTestFactory.test_inspector_test):
+ * Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py:
+ (test_collect_tests_with_skipped_list):
+
+2012-11-01 Nico Weber <thakis@chromium.org>
+
+ [chromium] Try to find ninja if it's not in the path already
+ https://bugs.webkit.org/show_bug.cgi?id=100988
+
+ Reviewed by Ryosuke Niwa.
+
+ Similar to the gclient detection logic in update-webkit-chromium
+
+ * Scripts/webkitdirs.pm:
+ (buildChromiumNinja):
+
+2012-11-01 Eric Seidel <eric@webkit.org>
+
+ Add Glenn Adams to the Contributor list
+ https://bugs.webkit.org/show_bug.cgi?id=100982
+
+ Reviewed by Adam Barth.
+
+ I CC him enough on bugs it would help me to have him listed here.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-01 Jer Noble <jer.noble@apple.com>
+
+ Add Python-LLDB support for WTF::Vector types.
+ https://bugs.webkit.org/show_bug.cgi?id=100980
+
+ Reviewed by Anders Carlsson.
+
+ Add a synthetic child provider for WTF::Vector types.
+
+ * lldb/lldb_webkit.py:
+ (__lldb_init_module): Add both the summary and synthetic providers for WTF::Vector
+ (WTFVector_SummaryProvider): Wrapper around WTFVectorProvider
+ (WTFVectorProvider):
+ (WTFVectorProvider.__init__):
+ (WTFVectorProvider.num_children): Return m_size+2 children to account for synthesized children.
+ (WTFVectorProvider.get_child_index): Synthesize child indexes for each entry in the Vector.
+ (WTFVectorProvider.get_child_at_index): Synthesize children for each entry in the Vector.
+ (WTFVectorProvider.update): Retrieve state from the underlying Vector.
+ (WTFVectorProvider.has_children): Vectors always have children.
+
+2012-11-01 Zoltan Horvath <zoltan@webkit.org>
+
+ Remove PageLoad directory entry from PerformanceTests pattern_map
+ https://bugs.webkit.org/show_bug.cgi?id=100989
+
+ Reviewed by Ryosuke Niwa.
+
+ Since we removed PageLoad directory from PerformanceTests we don't need this entry in pattern_map.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PerfTestFactory):
+
+2012-11-01 Jer Noble <jer.noble@apple.com>
+
+ Add LLDB-Python scripts to support WebKit data types.
+ https://bugs.webkit.org/show_bug.cgi?id=100898
+
+ Reviewed by Anders Carlsson.
+
+ Add Summary providers for common WebKit string types.
+
+ * lldb/lldb_webkit.py: Added.
+ (__lldb_init_module): Register these providers with the debugger.
+ (WTFString_SummaryProvider): Wrapper around WTFStringProvider.
+ (WTFStringImpl_SummaryProvider): Wrapper around WTFStringImplProvider.
+ (WTFAtomicString_SummaryProvider): Ditto.
+ (guess_string_length): Walk through the string looking for a null-byte(s).
+ (ustring_to_string): Walk through the string, extracting two-byte values, and concatenate them.
+ (lstring_to_string): Walk through the string, extracting byte values, and concatenate them.
+ (WTFStringImplProvider):
+ (WTFStringImplProvider.__init__):
+ (WTFStringImplProvider.get_length): Extract the m_length variable.
+ (WTFStringImplProvider.get_data8): Extract the m_data8 variable.
+ (WTFStringImplProvider.get_data16): Extract the m_data16 variable.
+ (WTFStringImplProvider.to_string): Pass the appropriate data variable to {u,l}string_to_string.
+ (WTFStringImplProvider.is_8bit): Check the m_hashAndFlags variable.
+ (WTFStringProvider):
+ (WTFStringProvider.__init__):
+ (WTFStringProvider.stringimpl): Extract the m_impl variable.
+ (WTFStringProvider.get_length): Pass through to WTFStringImplProvider.
+ (WTFStringProvider.to_string): Ditto.
+
+2012-11-01 Peter Beverloo <peter@chromium.org>
+
+ [Chromium-Android] Apache doesn't properly clean up ipc semaphores after a layout test run
+ https://bugs.webkit.org/show_bug.cgi?id=100950
+
+ Reviewed by Dirk Pranke.
+
+ When a test run would fail to complete due to an exception in one of
+ the workers, the HTTP server wouldn't get a chance to gracefully shut
+ down. This caused too much IPC semaphores to be left on the server,
+ causing Apache to fail to start in subsequent runs.
+
+ By unifying the Android-specific code with other ports, we no longer
+ fail to call the ChromiumPort/Base setup_test_run() and clean_up_test_run()
+ methods either. Furthermore, the number_of_servers argument for starting
+ the HTTP server is now available as well.
+
+ Because not all tests require an HTTP server, it's not guaranteed that
+ it will be started. Android depends on this, so add a new method to Port
+ and override it for Android: requires_http_server().
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
+ (LayoutTestRunner.run_tests):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (Manager._run_tests):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.to.requires_http_server):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_dont_require_http_server):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort.requires_http_server):
+ (ChromiumAndroidPort.start_http_server):
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ (ChromiumAndroidPortTest.test_must_require_http_server):
+
+2012-11-01 Adam Roben <aroben@webkit.org>
+
+ Crash beneath WKRelease after failed load in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=100954
+
+ Reviewed by Sam Weinig.
+
+ There were just some simple retain/release bugs.
+
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController updateTextFieldFromURL:]):
+ (-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
+ Don't try to release null URLs.
+
+ (-[WK2BrowserWindowController updateCommittedURLForFrame:]): Don't
+ release a URL for which we don't have ownership.
+
+2012-10-31 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Fix editing/text-iterator/findString-expected.html fail
+ https://bugs.webkit.org/show_bug.cgi?id=100902
+
+ Reviewed by Yong Li.
+
+ PR 210039
+
+ Fix the test my using the Page::findString method instead of our own in-page searcher.
+ This also syncs some of the changes we did regarding String usage.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::dumpFramesAsText):
+ (BlackBerry::WebKit::dumpHistoryItem):
+ (BlackBerry::WebKit::dumpBackForwardListForWebView):
+ (BlackBerry::WebKit::DumpRenderTree::dump):
+ (BlackBerry::WebKit::DumpRenderTree::didFinishDocumentLoadForFrame):
+ (BlackBerry::WebKit::DumpRenderTree::didReceiveTitleForFrame):
+ (BlackBerry::WebKit::DumpRenderTree::runJavaScriptAlert):
+ * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
+ (DumpRenderTree):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::setMockGeolocationError):
+ (TestRunner::layerTreeAsText):
+ (TestRunner::findString):
+ (TestRunner::setStorageDatabaseIdleInterval):
+
+2012-11-01 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add File Chooser dialog support to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=100822
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add very basic file picker dialog to MiniBrowser so that
+ the user can select a file from the file system when
+ clicking an input element of type "file".
+
+ * MiniBrowser/efl/main.c:
+ (close_file_picker):
+ (on_filepicker_deletion):
+ (on_fileselector_done):
+ (on_file_chooser_request):
+ (window_create):
+
+2012-11-01 Yael Aharon <yael.aharon@intel.com>
+
+ Unreviewed. Change my email address.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-11-01 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Double clicks/taps aren't passed down to the page
+ https://bugs.webkit.org/show_bug.cgi?id=100949
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Touch mocking shouldn't transform double click events as well,
+ this adds an extra touch update between clicks which prevents
+ double-tap detection from triggering on web pages.
+
+ Tested on the mobile version of Google maps.
+
+ * MiniBrowser/qt/MiniBrowserApplication.cpp:
+ (MiniBrowserApplication::notify):
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ NRWT: lint warnings don't show up by default
+ https://bugs.webkit.org/show_bug.cgi?id=100914
+
+ Reviewed by Ryosuke Niwa.
+
+ NRWT wasn't printing any warnings if you had errors in your
+ TestExpectations files; this means you would only notice this
+ with --lint-test-files, which is probably bad. I'm not sure
+ when this requested, but perhaps when we changed the
+ warnings to not be fatal if you weren't linting the files.
+
+ Now they're still not fatal, but at least we print them.
+
+ Also fix one warning message where we were printing the test name twice.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectationsModel._already_seen_better_match):
+ (TestExpectations._report_warnings):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (MiscTests.test_parse_warnings_are_logged_if_not_in_lint_mode(self): Added.
+
+2012-10-31 Terry Anderson <tdanderson@chromium.org>
+
+ Missing stderr output when using run-webkit-tests
+ https://bugs.webkit.org/show_bug.cgi?id=100709
+
+ Reviewed by Dirk Pranke.
+
+ Appends #EOF to the end of the stderr output only at the end of a test,
+ not possibly part-way through. This will allow all of the stderr output
+ to appear on the results page after running run-webkit-tests.
+
+ * DumpRenderTree/chromium/TestEventPrinter.cpp:
+ (TestEventPrinter::handleTextFooter):
+ (TestEventPrinter::handleTestFooter):
+
+2012-10-30 Mark Lam <mark.lam@apple.com>
+
+ A JSC printf (support for %J+s and %b).
+ https://bugs.webkit.org/show_bug.cgi?id=100566.
+
+ Reviewed by Michael Saboff.
+
+ Added regression tests for VMInspector::fprintf() sprintf() and snprintf().
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/JavaScriptCore: Added.
+ * TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp: Added.
+
+2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ Added viewport at-rule to the CSS parser and tokenizer
+ https://bugs.webkit.org/show_bug.cgi?id=95961
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enable CSS Device Adaptation by default on EFL.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-10-31 Terry Anderson <tdanderson@chromium.org>
+
+ [touchadjustment] touch-links-two-finger-tap test pass incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=100619
+
+ Reviewed by Antonio Gomes.
+
+ Store the touch area when sending a GestureTwoFingerTap event.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::gestureEvent):
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt is not killing stuck DRTs on chromium win
+ https://bugs.webkit.org/show_bug.cgi?id=100886
+
+ Unreviewed, build fix.
+
+ In the original implementation of NRWT for Chromium, we used
+ to assume that DRT would always manage to exit on its own and
+ so NRWT wouldn't attempt to kill DRT if it was stuck (this was the
+ "hung worker" problem, and meant that if DRT hung, NRWT would hang).
+
+ Eventually, we merged the chromium code with the other ports and
+ now will always try to shut down DRTs if a test times out, but as
+ part of that merge we left in a code path where we wouldn't
+ shut the driver down on windows. This was resulting in stray
+ DRTs being left around, and NRWT sometimes not exiting cleanly as
+ a result.
+
+ No unit tests added because this was a windows-only code path (hence
+ hard to test) and that is now gone.
+
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ (ServerProcess.stop):
+
+2012-10-31 Ami Fischman <fischman@chromium.org>
+
+ [chromium] DRT and WTR should clear the cache between tests
+ https://bugs.webkit.org/show_bug.cgi?id=93195
+
+ Reviewed by Tony Chang.
+
+ This change makes chromium DRT match the GTK+, Qt, and EFL ports.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::resetTestController): added a WebCache::clear() call to achieve the goal of the bug.
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ Fix typos introduced in r133061.
+ Unreviewed, build fix.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
+ * Scripts/webkitpy/tool/servers/reflectionhandler.py:
+ (ReflectionHandler._serve_file):
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ garden-o-matic should work for local results
+ https://bugs.webkit.org/show_bug.cgi?id=100805
+
+ Reviewed by Adam Barth.
+
+ This is the next step in making garden-o-matic replace
+ 'webkit-patch rebaseline-server' and be able to deal with local
+ results. garden-o-matic now accepts a '--results-directory' option
+ that will point to a layout-test-results directory. At the moment
+ this will only work if you are also filtering to a single bot/
+ platform at a time (we can't handle multiple bots' worth of local
+ results, but that is a logical next step).
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ (GardenOMatic.__init__):
+ (GardenOMatic.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (RebaselineTest.__init__):
+ (RebaselineTest._rebaseline_test):
+ (RebaselineTest._rebaseline_test_and_update_expectations):
+ (RebaselineTest.execute):
+ (AbstractParallelRebaselineCommand._rebaseline_commands):
+ (AbstractParallelRebaselineCommand._rebaseline):
+ (RebaselineJson.__init__):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (_BaseTestCase):
+ (test_rebaseline_updates_expectations_file):
+ (test_rebaseline_does_not_include_overrides):
+ (test_rebaseline_test):
+ (test_rebaseline_test_and_print_scm_changes):
+ (test_rebaseline_and_copy_test):
+ (test_rebaseline_and_copy_test_no_existing_result):
+ (test_rebaseline_and_copy_test_with_lion_result):
+ (test_rebaseline_and_copy_no_overwrite_test):
+ (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
+ (TestRebaselineJson.test_rebaseline_all):
+ (TestRebaselineJson.test_rebaseline_debug):
+ (TestRebaselineJson.test_move_overwritten):
+ (TestRebaselineJson.test_no_optimize):
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPRequestHandler.rebaselineall):
+ (GardeningHTTPRequestHandler):
+ (GardeningHTTPRequestHandler.localresult):
+ * Scripts/webkitpy/tool/servers/reflectionhandler.py:
+ (ReflectionHandler.do_POST):
+ (ReflectionHandler):
+ (ReflectionHandler.do_HEAD):
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ garden-o-matic should support gardening a single port and specifying how to deal with overwritten baselines
+ https://bugs.webkit.org/show_bug.cgi?id=100563
+
+ Reviewed by Ojan Vafai.
+
+ This patch starts the process of making garden-o-matic more useful for
+ bringing up a single new port in two ways. The goal is to fully
+ obsolete webkit-patch rebaseline-server.
+
+ First, it adds support for the --platform arguments to garden-o-matic
+ (so that the UI will default to the right cluster of bots), and if the platform arg
+ specifies a single bot, filters the results down to just that bot.
+
+ Second, it adds support for --move-overwritten-baselines and changes
+ the implementation of the move_overwritten_baselines setting in builders.py
+ so that it is only used if this flag is provided.
+
+ Future patches will make it possible to use local copies of the build
+ results (rather than going to the bots) and other optimizations to make
+ it faster to review lots of changes on a single bot.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ (.):
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ (GardenOMatic):
+ (GardenOMatic.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (AbstractRebaseliningCommand.__init__):
+ (RebaselineTest):
+ (OptimizeBaselines):
+ (AnalyzeBaselines):
+ (AbstractParallelRebaselineCommand):
+ (AbstractParallelRebaselineCommand._rebaseline_commands):
+ (AbstractParallelRebaselineCommand._rebaseline):
+ (Rebaseline.__init__):
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPServer.url):
+ (GardeningHTTPRequestHandler.rebaselineall):
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ test-webkitpy: fix running modules and classes on the command line
+ https://bugs.webkit.org/show_bug.cgi?id=100787
+
+ Reviewed by Eric Seidel.
+
+ Handling modules and classes are arguments on the command line
+ was broken due to the way we were parsing test names looking for
+ parallel and serial tests.
+
+ * Scripts/webkitpy/test/main.py:
+ (Tester._test_names):
+ (_Loader):
+ * Scripts/webkitpy/test/main_unittest.py:
+ (TestStubs.integration_test_empty):
+ (TestStubs):
+ (TestStubs.serial_test_empty):
+ (TestStubs.serial_integration_test_empty):
+ (TesterTest._find_test_names):
+ (TesterTest):
+ (TesterTest.test_individual_names_are_not_run_twice):
+ (TesterTest.test_integration_tests_are_not_found_by_default):
+ (TesterTest.test_integration_tests_are_found):
+
+2012-10-31 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: refactor common command line arguments for --platform, rebaseline commands
+ https://bugs.webkit.org/show_bug.cgi?id=100800
+
+ Reviewed by Ojan Vafai.
+
+ This change shuffles around how we share command-line options
+ between NRWT and the various webkit-patch rebaselining commands.
+
+ There are no functional changes in this patch but it should make
+ things clearer and will be useful in a couple of upcoming patches.
+
+ * Scripts/webkitpy/layout_tests/port/__init__.py:
+ * Scripts/webkitpy/layout_tests/port/factory.py:
+ (platform_options):
+ (configuration_options):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/tool/commands/queries.py:
+ (PrintExpectations.__init__):
+ (PrintBaselines.__init__):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (AbstractRebaseliningCommand):
+ (AbstractRebaseliningCommand.__init__):
+ (RebaselineTest.__init__):
+ (OptimizeBaselines.__init__):
+ (AnalyzeBaselines.__init__):
+ (AbstractParallelRebaselineCommand):
+ (RebaselineJson.__init__):
+ (RebaselineExpectations.__init__):
+ (Rebaseline.__init__):
+
+2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [NRWT] Xvfb driver is leaking application cache files
+ https://bugs.webkit.org/show_bug.cgi?id=100864
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Application Cache looks for XDG_CACHE_HOME which is now
+ prepended with DUMPRENDERTREE_TEMP and cleaned up when
+ the test worker finishes his job.
+
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
+ (XvfbDriver._start):
+
+2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] DRT doesn't clean up after itself
+ https://bugs.webkit.org/show_bug.cgi?id=100346
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ The test driver exports an environment variable DUMPRENDERTREE_TEMP
+ which is used by both DRT and WTR as the folder for storing icons,
+ databases, application cache, etc, overriding the default XDG_* path.
+
+ We don't need to create these folders because in fact, they are never
+ used and also never cleaned. Things created inside DUMPRENDERTREE_TEMP
+ are automatically removed after the test run.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.setup_environ_for_server):
+
+2012-10-31 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [WTR] WebKitTestRunner is not cleaning up the icon database
+ https://bugs.webkit.org/show_bug.cgi?id=100678
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ The icon database was not being set to the temporary folder created for
+ the test runner by the test driver, which is removed automatically
+ after the run.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+
+2012-10-31 Mike West <mkwst@chromium.org>
+
+ Script run from an isolated world should bypass a page's CSP.
+ https://bugs.webkit.org/show_bug.cgi?id=97398
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ (DRTTestRunner::setIsolatedWorldContentSecurityPolicy):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ Adding a mechanism to set the Content Security Policy for an
+ isolated world to Chromium's testRunner.
+
+2012-10-31 Michał Pakuła vel Rutka <m.pakula@samsung.com>
+
+ [EFL][DRT] EventSender requires contextClick implementation
+ https://bugs.webkit.org/show_bug.cgi?id=86091
+
+ Reviewed by Gyuyoung Kim.
+
+ Add contextClick for DumpRenderTreeEventSender basing on WebKit GTK
+ implementation.
+
+ * DumpRenderTree/efl/EventSender.cpp:
+ (getMenuItemTitleCallback):
+ (setMenuItemTitleCallback):
+ (menuItemClickCallback):
+ (contextClickCallback):
+
+2012-10-30 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [WTR] Memory leaks in TestWebKitAPI::didReceiveMessageFromInjectedBundle()
+ https://bugs.webkit.org/show_bug.cgi?id=100770
+
+ Reviewed by Sam Weinig.
+
+ Adopt strings returned by WKStringCreateWithUTF8CString() in
+ didReceiveMessageFromInjectedBundle() to avoid memory leaks.
+
+ * TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent.cpp:
+ (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
+
+2012-10-30 Kangil Han <kangil.han@samsung.com>
+
+ Fix broken python unit test
+ https://bugs.webkit.org/show_bug.cgi?id=100810
+
+ Reviewed by Dirk Pranke.
+
+ BUG 100755 has broken python unit test, e.g. assertion fail, since it modified baseline path.
+ Therefore, this patch fixes it.
+
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaselineTest.test_baseline_directory):
+
+2012-10-30 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline*: add more helpful logging
+ https://bugs.webkit.org/show_bug.cgi?id=100562
+
+ Reviewed by Ojan Vafai.
+
+ This change rewires the garden-o-matic and rebaseline* commands
+ in webkit-patch so that --verbose propagates through all the
+ subcommand invocations properly, and cleans up the logging so
+ that you can actually tell what is happening. For now, we
+ leave all of the logging at the logging.DEBUG level, which
+ means that it gets mixed in will all the other debug logging noise
+ and is harder to read, but we'll fix that in subsequent patches.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ (BaselineOptimizer._platform):
+ (BaselineOptimizer._move_baselines):
+ (BaselineOptimizer.optimize):
+ * Scripts/webkitpy/tool/commands/gardenomatic.py:
+ (GardenOMatic.execute):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest._copy_existing_baseline):
+ (RebaselineTest._rebaseline_test):
+ (OptimizeBaselines._optimize_baseline):
+ (OptimizeBaselines.execute):
+ (AbstractParallelRebaselineCommand._run_webkit_patch):
+ (AbstractParallelRebaselineCommand._rebaseline_commands):
+ (AbstractParallelRebaselineCommand._files_to_add):
+ (AbstractParallelRebaselineCommand._optimize_baselines):
+ (AbstractParallelRebaselineCommand._rebaseline):
+ (RebaselineExpectations._add_tests_to_rebaseline_for_port):
+ (Rebaseline.execute):
+ * Scripts/webkitpy/tool/servers/gardeningserver.py:
+ (GardeningHTTPServer.__init__):
+ (GardeningHTTPRequestHandler):
+ (GardeningHTTPRequestHandler._run_webkit_patch):
+ (GardeningHTTPRequestHandler.rebaselineall):
+
+2012-10-30 Dirk Pranke <dpranke@chromium.org>
+
+ clean up tests for webkit-patch rebaseline* commands
+ https://bugs.webkit.org/show_bug.cgi?id=100793
+
+ Reviewed by Ojan Vafai.
+
+ The tests in rebaseline_unittest.py had a lot of code cloning,
+ and many of the tests tested whether things passed or failed by
+ looking at what was logged instead of what was actually done;
+ as a result the tests were kinda hard to understand and harder to
+ maintain.
+
+ This patch adds hooks to MockWeb() and MockExecutive() so we can
+ directly see which URLs were fetched and calls invoked, and
+ then reworks all of the unit tests to be easier to follow and
+ maintain and not sensitive to the logging. Also there were a
+ couple of tests that were redundant.
+
+ There are no functional changes in this patch, and I verified that
+ the coverage remains the same.
+
+ * Scripts/webkitpy/common/net/web_mock.py:
+ (MockWeb.__init__):
+ (MockWeb.get_binary):
+ * Scripts/webkitpy/common/system/executive_mock.py:
+ (MockExecutive.__init__):
+ (MockExecutive.run_command):
+ (MockExecutive.kill_all):
+ (MockExecutive):
+ (MockExecutive.kill_process):
+ (MockExecutive.popen):
+ (MockExecutive.run_in_parallel):
+ (MockExecutive2):
+ (MockExecutive2.__init__):
+ (MockExecutive2.run_command):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (_BaseTestCase):
+ (_BaseTestCase.setUp):
+ (_BaseTestCase._expand):
+ (_BaseTestCase._read):
+ (_BaseTestCase._write):
+ (_BaseTestCase._zero_out_test_expectations):
+ (TestRebaselineTest):
+ (TestRebaselineTest.test_baseline_directory):
+ (TestRebaselineTest.test_rebaseline_updates_expectations_file_noop):
+ (test_rebaseline_updates_expectations_file):
+ (test_rebaseline_does_not_include_overrides):
+ (test_rebaseline_test):
+ (test_rebaseline_test_and_print_scm_changes):
+ (test_rebaseline_and_copy_test):
+ (test_rebaseline_and_copy_test_no_existing_result):
+ (test_rebaseline_and_copy_test_with_lion_result):
+ (test_rebaseline_and_copy_no_overwrite_test):
+ (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
+ (TestRebaselineJson):
+ (TestRebaselineJson.setUp):
+ (TestRebaselineJson.tearDown):
+ (TestRebaselineJson.test_rebaseline_all):
+ (TestRebaselineJson.test_rebaseline_debug):
+ (TestRebaseline):
+ (TestRebaseline.test_tests_to_update):
+ (TestRebaseline.test_rebaseline):
+ (TestRebaseline.test_rebaseline.rebaseline_stub):
+ (TestRebaselineExpectations):
+ (TestRebaselineExpectations.setUp):
+ (TestRebaselineExpectations.test_rebaseline_expectations):
+ (TestRebaselineExpectations.test_rebaseline_expectations_noop):
+ (TestRebaselineExpectations.disabled_test_overrides_are_included_correctly):
+
+2012-10-30 Dirk Pranke <dpranke@chromium.org>
+
+ test-webkitpy: fix import of coverage so that it works in a clean install
+ https://bugs.webkit.org/show_bug.cgi?id=100780
+
+ Reviewed by Tony Chang.
+
+ The coverage module is written so that the parent directory needs
+ to be in PYTHONPATH; work around that ...
+
+ * Scripts/webkitpy/test/main_unittest.py:
+ (TestStubs.test_empty):
+ (TesterTest.test_individual_names_are_not_run_twice):
+ (TesterTest):
+ (TesterTest.integration_test_coverage_works):
+ * Scripts/webkitpy/thirdparty/__init__.py:
+ (AutoinstallImportHook._install_coverage):
+
+2012-10-30 Anders Carlsson <andersca@apple.com>
+
+ Another build fix.
+
+ * TestWebKitAPI/Tests/WebKit2/WebArchive.cpp:
+ (TestWebKitAPI::didReceiveMessageFromInjectedBundle):
+
+2012-10-30 Anders Carlsson <andersca@apple.com>
+
+ Build fix.
+
+ * WebKitTestRunner/mac/EventSenderProxy.mm:
+ (WTR::EventSenderProxy::mouseScrollBy):
+
+2012-10-30 Rick Byers <rbyers@chromium.org>
+
+ [touchadjustment] touch-links-longpress tests passes incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=96810
+
+ Reviewed by Antonio Gomes.
+
+ Add support for suppling width/height information for longpress
+ gesture (as for other gestures like tapDown) for the purposes
+ of touch adjustment.
+
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::gestureEvent):
+
+2012-10-29 Anders Carlsson <andersca@apple.com>
+
+ Build WebKit as C++11 on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=100720
+
+ Reviewed by Daniel Bates.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ * MiniBrowser/Configurations/Base.xcconfig:
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ Add CLANG_CXX_LANGUAGE_STANDARD=gnu++0x.
+
+2012-10-30 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][JHBUILD] Update EFL libraries to v1.7.1 stable release
+ https://bugs.webkit.org/show_bug.cgi?id=100759
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Update Bump EFL libraries to the new stable release (v1.7.1)
+ in JHBuild to pull the latest bug fixes.
+
+ * efl/jhbuild.modules:
+
+2012-10-29 Anders Carlsson <andersca@apple.com>
+
+ String::createCFString should return a RetainPtr
+ https://bugs.webkit.org/show_bug.cgi?id=100419
+
+ Reviewed by Andreas Kling.
+
+ Update callers of String::createCFString.
+
+ * WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm:
+ (WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame):
+
+2012-10-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs testRunner.queueLoadHTMLString
+ https://bugs.webkit.org/show_bug.cgi?id=100747
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added testRunner.queueLoadHTMLString implementation.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::queueLoadHTMLString):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::queueLoadHTMLString):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/WorkQueueManager.cpp:
+ (WTR::WorkQueueManager::queueLoadHTMLString):
+ (WTR):
+ * WebKitTestRunner/WorkQueueManager.h:
+ (WorkQueueManager):
+
+2012-10-30 Kangil Han <kangil.han@samsung.com>
+
+ [EFL] Baseline search path should consider both WK1 and WK2 on layout test.
+ https://bugs.webkit.org/show_bug.cgi?id=100755
+
+ Reviewed by Gyuyoung Kim.
+
+ Current implementation doesn't consider WK1 case in baseline search path.
+ Therefore, this patch fixes it.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.default_baseline_search_path):
+
+2012-10-30 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [QT][DRT] Remove unneeded testRunner.setMediaType() implementation
+ https://bugs.webkit.org/show_bug.cgi?id=100740
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Removed unneeded testRunner.setMediaType() implementation, as tests use
+ cross-platform window.internals.settings.setMediaTypeOverride instead.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+
+2012-10-30 Kangil Han <kangil.han@samsung.com>
+
+ [EFL][DRT] Bitmap should show whole view area.
+ https://bugs.webkit.org/show_bug.cgi?id=100642
+
+ Reviewed by Gyuyoung Kim.
+
+ css sticky position test cases haven't been passed even though implementation has been landed by BUG 95182.
+ This is because current create bitmap implementation refers to geometry position that considers scroll movement even though
+ paint does it. Therefore, this patch always reflects current view size and remove duplicated graphic operation to dump correct bitmap image.
+
+ * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
+ (createBitmapContextFromWebView):
+
+2012-10-30 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL] Refactor tooltip callback signal in WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=100571
+
+ Reviewed by Gyuyoung Kim.
+
+ Separate tooltip callback signal into 'tooltip,text,set'
+ and 'tooltip,text,unset' to be consistent with WebKit2.
+
+ * EWebLauncher/main.c:
+ (on_tooltip_text_set):
+ (on_tooltip_text_unset):
+ (browserCreate):
+
+2012-10-29 Csaba Osztrogonác <ossy@webkit.org>
+
+ Unreviewed, rolling out r132819.
+ http://trac.webkit.org/changeset/132819
+ https://bugs.webkit.org/show_bug.cgi?id=100388
+
+ It made layout testing 40% slower and storage tests assert
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (DumpRenderTree):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::reset):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+
+2012-10-29 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] TestRunner needs to compile ChromiumCurrentTime and ChromiumThreading in components build
+ https://bugs.webkit.org/show_bug.cgi?id=100658
+
+ Reviewed by Tony Chang.
+
+ Before, this was compiled into DumpRenderTree. I also dropped the
+ include_dirs and dependencies block as TestRunner already has them.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-10-29 Takashi Sakamoto <tasak@google.com>
+
+ Unreviewed. Adding myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-28 Mark Rowe <mrowe@apple.com>
+
+ Simplify Xcode configuration settings that used to vary between OS versions.
+
+ Reviewed by Dan Bernstein.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
+ * MiniBrowser/Configurations/Base.xcconfig:
+ * MiniBrowser/Configurations/DebugRelease.xcconfig:
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+
+2012-10-28 Mark Rowe <mrowe@apple.com>
+
+ Remove references to unsupported OS and Xcode versions.
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ * DumpRenderTree/mac/Configurations/CompilerVersion.xcconfig: Removed.
+ * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
+ * MiniBrowser/Configurations/Base.xcconfig:
+ * MiniBrowser/Configurations/CompilerVersion.xcconfig: Removed.
+ * MiniBrowser/Configurations/DebugRelease.xcconfig:
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ * TestWebKitAPI/Configurations/CompilerVersion.xcconfig: Removed.
+ * TestWebKitAPI/Configurations/DebugRelease.xcconfig:
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/CompilerVersion.xcconfig: Removed.
+ * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+
+2012-10-26 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: change non-verbose log format for webkit-patch
+ https://bugs.webkit.org/show_bug.cgi?id=100561
+
+ Reviewed by Ojan Vafai.
+
+ Logging the module name and the log level is annoying and nearly useless.
+ For starters, this change removes that unless you are doing verbose/
+ debug logging. In the future we should split out the concepts of
+ verbose and debug logging (like we did in test-webkitpy and
+ run-webkit-tests) so that you could get this in debug logging.
+
+ * Scripts/webkitpy/common/system/logutils.py:
+ (_default_handlers):
+ (configure_logging):
+ * Scripts/webkitpy/common/system/logutils_unittest.py:
+ (ConfigureLoggingTest.test_info_message):
+ (ConfigureLoggingTest):
+ (ConfigureLoggingTest.test_debug_message):
+ (ConfigureLoggingTest.test_two_messages):
+ (ConfigureLoggingVerboseTest):
+ (ConfigureLoggingVerboseTest._logging_level):
+ (ConfigureLoggingVerboseTest.test_info_message):
+ (ConfigureLoggingVerboseTest.test_debug_message):
+ (ConfigureLoggingCustomLevelTest.test_logged_message):
+
+2012-10-29 Christophe Dumez <christophe.dumez@intel.com>
+
+ [CMAKE] Add TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp to CMakeLists.txt
+ https://bugs.webkit.org/show_bug.cgi?id=100681
+
+ Reviewed by Anders Carlsson.
+
+ Add TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp to CMake since
+ it is needed by plugins/npruntime/npruntime-calls-with-null-npp.html
+ layout test.
+
+ * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+
+2012-10-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Flaky security tests
+ https://bugs.webkit.org/show_bug.cgi?id=100388
+
+ Reviewed by Jocelyn Turcotte.
+
+ Disable text dumping and load a blank URL to ensure the documentLoader is cleared
+ before we start dumping text for the new page. Otherwise messages from the old page
+ may end up in the text output of the new test.
+
+ This matches what WebKitTestRunner does, and reuses the Qt code for waiting for flag.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ (WebCore::runUntil):
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ (WebCore::DumpRenderTree::finishedResetting):
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/DumpRenderTreeQt.h:
+ (DumpRenderTree):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::resetDumping):
+ (TestRunner::reset):
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+
+2012-10-29 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] Enable Shadow DOM at runtime if compiled with SHADOW_DOM support
+ https://bugs.webkit.org/show_bug.cgi?id=100668
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enable Shadow DOM functionality at run time in WebKitTestRunner
+ if compiled with SHADOW_DOM flag set. This is needed to run
+ the Shadow DOM layout tests.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+
+2012-10-29 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL][AC] Fix bugs preventing us from running layout tests with AC turned on
+ https://bugs.webkit.org/show_bug.cgi?id=100598
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Make sure to use opengl_x11 engine when AC is turned on and X11 is in use.
+ We cannot create a gl context otherwise.
+
+ * MiniBrowser/efl/main.c:
+ (elm_main):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::initEcoreEvas):
+ * DumpRenderTree/efl/DumpRenderTree.cpp:
+ (initEcoreEvas):
+ * EWebLauncher/efl/main.c:
+ (windowCreate):
+
+2012-10-29 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][WK2] REGRESSION(r132342): fast/events/frame-tab-focus.html fails
+ https://bugs.webkit.org/show_bug.cgi?id=100646
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::focus): Improve the check we perform to
+ decide whether the focus should be taken out of the view before
+ focusing it again so that we do not unnecessarily unfocus it and
+ cause blur/focus events to be triggered. Instead of just verifying
+ if the Evas_Object representing the view has focus, use the WK C
+ API to check that the currently focused frame is not the main
+ frame.
+
+2012-10-29 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132782.
+ http://trac.webkit.org/changeset/132782
+ https://bugs.webkit.org/show_bug.cgi?id=100653
+
+ It made 400+ tests fail and 180 tests flakey on Qt (Requested
+ by Ossy on #webkit).
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+
+2012-10-29 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Flaky security tests
+ https://bugs.webkit.org/show_bug.cgi?id=100388
+
+ Reviewed by Jocelyn Turcotte.
+
+ Disable text output and load a blank URL to ensure the documentLoader is cleared
+ before we start dumping text for the new page. Otherwise messages from the old page
+ may end up in the text output of the new test.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
+
+2012-10-29 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove remaining usages of webkit_support from the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=100344
+
+ Reviewed by Adam Barth.
+
+ The most important part is to not rely on calling out to gdk/X11 to
+ translate keycodes to hardware keycodes, as this is not possible inside
+ the sandbox.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (WebKit):
+ (webkit_support):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::doDragDrop):
+ (WebTestRunner::EventSender::updateClickCountForButton):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::handleMouseWheel):
+ (WebTestRunner::EventSender::gestureEvent):
+ (WebTestRunner::EventSender::gestureFlingCancel):
+ (WebTestRunner::EventSender::gestureFlingStart):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Added.
+ (WebTestRunner):
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::getCurrentTimeInMillisecond):
+ (WebTestRunner):
+ (WebTestRunner::WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::getCurrentTimeInMillisecond):
+ (WebViewHost::getAbsoluteWebStringFromUTF8Path):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-29 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ Unreviewed. Add jonathan.dong@torchmobile.com.cn as a committer.
+ https://bugs.webkit.org/show_bug.cgi?id=100629
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-27 Dan Bernstein <mitz@apple.com>
+
+ REAL_PLATFORM_NAME build setting is no longer needed
+ https://bugs.webkit.org/show_bug.cgi?id=100587
+
+ Reviewed by Mark Rowe.
+
+ Removed the definition of REAL_PLATFORM_NAME and replaced references to it with references
+ to PLATFORM_NAME.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ * DumpRenderTree/mac/Configurations/CompilerVersion.xcconfig:
+ * DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
+ * MiniBrowser/Configurations/Base.xcconfig:
+ * MiniBrowser/Configurations/CompilerVersion.xcconfig:
+ * TestWebKitAPI/Configurations/Base.xcconfig:
+ * TestWebKitAPI/Configurations/CompilerVersion.xcconfig:
+ * WebKitTestRunner/Configurations/Base.xcconfig:
+ * WebKitTestRunner/Configurations/CompilerVersion.xcconfig:
+ * WebKitTestRunner/Configurations/DebugRelease.xcconfig:
+
+2012-10-26 Anders Carlsson <andersca@apple.com>
+
+ Crash when making NPRuntime calls with a null NPP pointer
+ https://bugs.webkit.org/show_bug.cgi?id=100569
+
+ Reviewed by Darin Adler.
+
+ Add new NPRuntimeCallsWithNullNPP plug-in test.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
+ (PluginTest::NPN_ReleaseVariantValue):
+ (PluginTest::netscapeFuncs):
+ * DumpRenderTree/TestNetscapePlugIn/PluginTest.h:
+ (PluginTest):
+ * DumpRenderTree/TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp: Added.
+ (NPRuntimeCallsWithNullNPP):
+ (NPRuntimeCallsWithNullNPP::NPRuntimeCallsWithNullNPP):
+ (NPRuntimeCallsWithNullNPP::NPP_New):
+ * DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj:
+ * DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro:
+ * GNUmakefile.am:
+
+2012-10-26 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: Notification should be sent when accessibilityIsIgnored changes
+ https://bugs.webkit.org/show_bug.cgi?id=99547
+
+ Reviewed by Chris Fleizach.
+
+ Add additional accessibility notifications.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::postAccessibilityNotification):
+
+2012-10-25 Roger Fong <roger_fong@apple.com>
+
+ Get rid of (<X%) failing output for old-run-webkit-tests.
+ https://bugs.webkit.org/show_bug.cgi?id=100447
+
+ Reviewed by Jessie Berlin.
+
+ Not a particularly useful piece of information. It's pretty much never above 1%.
+ new-run-webkit-tests does not output this either.
+
+ * Scripts/old-run-webkit-tests:
+ (printResults):
+
+2012-10-26 Xianzhu Wang <wangxianzhu@chromium.org>
+
+ Build bot gives incorrect link to EWS build failure
+ https://bugs.webkit.org/show_bug.cgi?id=100436
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ (MockCommitQueue.__init__):
+ (MockCommitQueue.command_failed): Return incremental failure_status_id
+ (CommitQueueTaskTest.test_red_tree_patch_rejection): Check failure_status_id
+ * Scripts/webkitpy/tool/bot/patchanalysistask.py:
+ (PatchAnalysisTask._test_patch): Use the failure_status_id of test with patch when test without patch fails and test with patch has unexpected failures.
+
+2012-10-26 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ webkitpy: Pass the `Listen' Apache directive from webkitpy, not the httpd.conf files.
+ https://bugs.webkit.org/show_bug.cgi?id=98602
+
+ Reviewed by Dirk Pranke.
+
+ Unify all the different `Listen' directives present in the several
+ httpd.conf files we have in LayoutTests/http/conf. For one, we
+ were already passing `Listen 127.0.0.1:8000' via webkitpy before,
+ and opening the other ports from the conf files.
+
+ The configuration files differed mostly in the way they handled
+ IPV6 ports. Some of them did not listen to IPV6 ports because the
+ systems which used them sometimes did not have IPV6 support. The
+ `http_server_supports_ipv6' method has been added to Port to
+ address that. cygwin, on its turn, still seems to use Apache 1.3,
+ which does not support IPV6 at all; the newly-added method has a
+ special case for that. Plus, perform a socket.getaddrinfo() call
+ the same way Apache itself does so we are sure we only enable IPV6
+ when setting that up in the httpd server is not going to fail.
+
+ * Scripts/webkitpy/common/system/platforminfo_mock.py:
+ (MockPlatformInfo.is_cygwin):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.baseline_version_dir):
+ (Port.to.start_websocket_server):
+ (Port.to):
+ (Port.to.http_server_supports_ipv6):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_http_server_supports_ipv6):
+ (PortTest.test_build_path):
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
+ (LayoutTestApacheHttpd):
+ (LayoutTestApacheHttpd.__init__):
+
+2012-10-26 David Barton <dbarton@mathscribe.com>
+
+ Unreviewed. Update my IRC nickname to a registered one.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-26 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix the LLInt build on Windows
+ https://bugs.webkit.org/show_bug.cgi?id=97648
+
+ Reviewed by Tor Arne Vestbø.
+
+ Added BIN_EXTENSION variable - similar to automake - that expands to .exe as suffix for
+ executable programs on Windows. Empty otherwise. Also added support for force_build_all
+ to allow overriding us disabling build_all for TEMPLATE = app.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-10-26 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] Support pixel tests for BlackBerry DRT
+ https://bugs.webkit.org/show_bug.cgi?id=100210
+
+ Reviewed by Rob Buis.
+
+ (The following 2 files are missed in previous patch(r132582), adding them
+ again.)
+
+ * DumpRenderTree/blackberry/build: Added.
+ * DumpRenderTree/blackberry/src.pro: Added.
+ Adds 2 files for building ImageDiff, by Christopher Wells.
+
+2012-10-26 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ Add feature flags for CSS Device Adaptation
+ https://bugs.webkit.org/show_bug.cgi?id=95960
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-10-26 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132552.
+ http://trac.webkit.org/changeset/132552
+ https://bugs.webkit.org/show_bug.cgi?id=100486
+
+ Makes typeahead tests crash in debug. (Requested by pfeldman
+ on #webkit).
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::doDragDrop):
+ (WebTestRunner::EventSender::updateClickCountForButton):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::handleMouseWheel):
+ (WebTestRunner::EventSender::gestureEvent):
+ (WebTestRunner::EventSender::gestureFlingCancel):
+ (WebTestRunner::EventSender::gestureFlingStart):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Removed.
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ (WebKit):
+ (webkit_support):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-26 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] Support pixel tests for BlackBerry DRT
+ https://bugs.webkit.org/show_bug.cgi?id=100210
+
+ Reviewed by Rob Buis.
+
+ The implementation is based on the patch from Christopher Wells.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::DumpRenderTree):
+ (BlackBerry::WebKit::DumpRenderTree::runTest):
+ (BlackBerry::WebKit::DumpRenderTree::runCurrentTest):
+ (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
+ (BlackBerry::WebKit::DumpRenderTree::runTests):
+ (BlackBerry::WebKit::DumpRenderTree::dump):
+ * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
+ (DumpRenderTree):
+
+ * DumpRenderTree/blackberry/PNGImageEncoder.cpp:
+ (BGRAtoRGBA):
+ (encodeBitmapToPNG):
+ * DumpRenderTree/blackberry/PNGImageEncoder.h:
+ The changes to PNGImageEncoder files are from master_40, patched by Tyler
+ Abbott and Rob Buis.
+
+ * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp:
+ (createBitmapContextFromWebView):
+ (computeMD5HashStringForBitmapContext):
+ (printPNG):
+ (dumpBitmap):
+ * DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.h:
+ (BitmapContext::createByAdoptingData):
+ (BitmapContext::~BitmapContext):
+ (BitmapContext):
+ (BitmapContext::BitmapContext):
+
+ * DumpRenderTree/blackberry/build: Added.
+ * DumpRenderTree/blackberry/src.pro: Added.
+ Adds 2 files for building ImageDiff, by Christopher Wells.
+
+2012-10-25 Min Qin <qinmin@chromium.org>
+
+ Fix a layout test crash if a TestWebkitPlugin is put inside an iframe
+ https://bugs.webkit.org/show_bug.cgi?id=100406
+
+ Reviewed by Adam Barth.
+
+ Resize the context with an empty rect will cause a gl_error in gles2_cmd_decoder.cc.
+ Don't paint the plugin if m_rect is empty.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::updateGeometry):
+
+2012-10-25 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] Display tooltip in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=99322
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Display tooltip in MiniBrowser using elm_object_tooltip_text_set().
+
+ * MiniBrowser/efl/main.c:
+ (on_tooltip_text_set):
+ (on_tooltip_text_unset):
+ (window_create):
+
+2012-10-25 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove remaining usages of webkit_support from the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=100344
+
+ Reviewed by Adam Barth.
+
+ The most important part is to not rely on calling out to gdk/X11 to
+ translate keycodes to hardware keycodes, as this is not possible inside
+ the sandbox.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (WebKit):
+ (webkit_support):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h:
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::doDragDrop):
+ (WebTestRunner::EventSender::updateClickCountForButton):
+ (WebTestRunner::EventSender::mouseDown):
+ (WebTestRunner::EventSender::mouseUp):
+ (WebTestRunner::EventSender::mouseMoveTo):
+ (WebTestRunner::EventSender::keyDown):
+ (WebTestRunner::EventSender::replaySavedEvents):
+ (WebTestRunner::EventSender::contextClick):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ (WebTestRunner::EventSender::sendCurrentTouchEvent):
+ (WebTestRunner::EventSender::handleMouseWheel):
+ (WebTestRunner::EventSender::gestureEvent):
+ (WebTestRunner::EventSender::gestureFlingCancel):
+ (WebTestRunner::EventSender::gestureFlingStart):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp: Added.
+ (WebTestRunner):
+ (WebTestRunner::NativeKeyCodeForWindowsKeyCode):
+ * DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::getCurrentTimeInMillisecond):
+ (WebTestRunner):
+ (WebTestRunner::WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::getCurrentTimeInMillisecond):
+ (WebViewHost::getAbsoluteWebStringFromUTF8Path):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132514.
+ http://trac.webkit.org/changeset/132514
+ https://bugs.webkit.org/show_bug.cgi?id=100440
+
+ "Broke chromium content_browsertests AccessibilityAriaMenu
+ AccessibilityInputRange AccessibilityListMarkers" (Requested
+ by scheib on #webkit).
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::postAccessibilityNotification):
+
+2012-10-25 Dirk Pranke <dpranke@chromium.org>
+
+ rwt --lint-test-files doesn't handle the cascade properly
+ https://bugs.webkit.org/show_bug.cgi?id=100315
+
+ Reviewed by Ojan Vafai.
+
+ We were only linting the first file in each port's list of
+ expectations.
+
+ This change pushes more of the logic for linting files into
+ the TestExpectations classes themselves, but it's still a bit of
+ a hack. A better solution will require splitting out the actual
+ parsing of the files from the TestExpectations constructor.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations):
+ (TestExpectations.__init__):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (parse_exp):
+ (SkippedTests.check):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (lint):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (LintTest.test_all_configurations.FakePort.__init__):
+ (LintTest.test_all_configurations):
+ (LintTest.test_lint_test_files__errors):
+ * Scripts/webkitpy/style/checkers/test_expectations.py:
+ (TestExpectationsChecker.check_test_expectations):
+
+2012-10-25 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed GTK gardening.
+
+ Skipping the atspi-basic-hierarchy test case in the TestWebKitAccessibility
+ WebKit2 API test since the test is currently failing.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-10-25 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: Notification should be sent when accessibilityIsIgnored changes
+ https://bugs.webkit.org/show_bug.cgi?id=99547
+
+ Reviewed by Chris Fleizach.
+
+ Add additional accessibility notifications.
+
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::postAccessibilityNotification):
+
+2012-10-25 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ Conditionalize XHR timeout support
+ https://bugs.webkit.org/show_bug.cgi?id=100356
+
+ Reviewed by Adam Barth.
+
+ Adding XHR_TIMEOUT feature in perl and qmake files.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-10-25 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Unreviewed. Update my contact info.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-25 Terry Anderson <tdanderson@chromium.org>
+
+ Unreviewed. Adding myself as a committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-25 Zeno Albisser <zeno@webkit.org>
+
+ [Qt] Adjust library name in webkitdirs.pm after r131300.
+ https://bugs.webkit.org/show_bug.cgi?id=100376
+
+ The library was renamed from QtWebKit to QtWebKitWidgets.
+ run-launcher was still looking for QtWebKit.
+
+ Reviewed by Simon Hausmann.
+
+ * Scripts/webkitdirs.pm:
+ (builtDylibPathForName):
+
+2012-10-22 Mikhail Naganov <mnaganov@chromium.org>
+
+ [Chromium] Add supportMultipleWindows setting, needed for Android
+ https://bugs.webkit.org/show_bug.cgi?id=99716
+
+ Reviewed by Adam Barth.
+
+ Add supportMultipleWindows settings for reusing the same view when
+ opening popups. This is required for emulating the behavior of
+ Android WebView. Adding into WebCore, as other ports might want to
+ use this setting in the future.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::overridePreference):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+
+2012-10-25 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] JavaScript popups are not focused when opened
+ https://bugs.webkit.org/show_bug.cgi?id=100354
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Move focus to the JavaScript popups when opened so that the key events
+ are forwarded to the popups instead of web view.
+
+ * MiniBrowser/efl/main.c:
+ (on_javascript_alert):
+ (on_javascript_confirm):
+ (on_javascript_prompt):
+
+2012-10-25 Eugene Klyuchnikov <eustas.bug@gmail.com>
+
+ Web Inspector: Fix "check-inspector-strings" script and fix localized strings.
+ https://bugs.webkit.org/show_bug.cgi?id=100090
+
+ Reviewed by Vsevolod Vlasov.
+
+ Script "check-inspector-strings" seems to be broken.
+ Fixed it, refined search algorithm.
+
+ * Scripts/check-inspector-strings: Fixed and refined.
+
+2012-10-24 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: fix a couple of minor crashing issues under cygwin
+ https://bugs.webkit.org/show_bug.cgi?id=100309
+
+ Reviewed by Ojan Vafai.
+
+ Cygwin was crashing on a null object reference and then
+ an oserror in kill().
+
+ * Scripts/webkitpy/common/system/executive.py:
+ (Executive.kill_process):
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ (ServerProcess.stop):
+
+2012-10-24 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: truncate meter lines properly on windows
+ https://bugs.webkit.org/show_bug.cgi?id=100062
+
+ Reviewed by Tony Chang.
+
+ This change adds the code to figure out the terminal width
+ on windows (it was already there for Unixen) and moves it
+ to a platform-specific object.
+
+ * Scripts/webkitpy/common/system/platforminfo.py:
+ (PlatformInfo.terminal_width):
+ * Scripts/webkitpy/common/system/platforminfo_mock.py:
+ (MockPlatformInfo.total_bytes_memory):
+ (MockPlatformInfo):
+ (MockPlatformInfo.terminal_width):
+ * Scripts/webkitpy/layout_tests/views/metered_stream.py:
+ (MeteredStream.__init__):
+ (MeteredStream.number_of_columns):
+ (MeteredStream.flush):
+ * Scripts/webkitpy/layout_tests/views/printing.py:
+ (Printer.__init__):
+ (Printer._test_status_line):
+
+2012-10-24 Dirk Pranke <dpranke@chromium.org>
+
+ tweak debug logging in webkit-patch optimize-baselines
+ https://bugs.webkit.org/show_bug.cgi?id=100294
+
+ Reviewed by Ojan Vafai.
+
+ This changes the logging to print out the baselines found
+ (and their checksums) even when we don't do anything.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer.py:
+ (BaselineOptimizer.optimize):
+
+2012-10-24 Sailesh Agrawal <sail@chromium.org>
+
+ Incorrect keycodes for numpad /, -, +, .
+ https://bugs.webkit.org/show_bug.cgi?id=99188
+
+ Reviewed by Tony Chang.
+
+ Add key mappings for all numpad keys.
+
+ * DumpRenderTree/mac/EventSendingController.mm:
+ (KeyMappingEntry):
+ (-[EventSendingController keyDown:withModifiers:withLocation:]): Added all numpad keys.
+
+2012-10-24 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: clean up references to Skipped files
+ https://bugs.webkit.org/show_bug.cgi?id=100045
+
+ Reviewed by Ojan Vafai.
+
+ Since they are no longer used or needed ...
+
+ * Scripts/webkitpy/layout_tests/port/apple.py:
+ (ApplePort._generate_all_test_configurations):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.skipped_layout_tests):
+ (Port.expectations_files):
+ (Port._wk2_port_name):
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort):
+ * Scripts/webkitpy/layout_tests/port/mac_unittest.py:
+ (MacTest.test_default_timeout_ms):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (test_expectations_files):
+ (test_expectations_files.platform_dirs):
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort.__init__):
+
+2012-10-24 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Use include paths relative to Source/ in the TestRunner's public API
+ https://bugs.webkit.org/show_bug.cgi?id=100079
+
+ Reviewed by Adam Barth.
+
+ For a inside-chromium build, we usually don't add the WebKit API paths
+ as include paths, so including files by name only does not work.
+
+ Eventually we might want to move to a model where all includes are
+ relative to Source/, so we're using that here already now.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/chromium/TestRunner/public/WebEventSender.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+
+2012-10-24 Ojan Vafai <ojan@chromium.org>
+
+ Show an error when there are no completed builds in the past 20 runs
+ https://bugs.webkit.org/show_bug.cgi?id=100266
+
+ Reviewed by Dimitri Glazkov.
+
+ Right now we get a cryptic JS error in the console when loading the gtk port. This at least gives an error in
+ the notification stream. We should probably tweak this UI to make it so we can make
+ errors in the notification stream stick out (e.g. make the text red).
+
+ We should also consider making the number of runs to load dynamic (e.g. if 20 runs don't work,
+ try 40).
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/garden-o-matic.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results_unittests.js:
+
+2012-10-24 Ian Vollick <vollick@chromium.org>
+
+ [chromium] Explicitly disable accelerated animations in DRT
+ https://bugs.webkit.org/show_bug.cgi?id=100241
+
+ Reviewed by Adrienne Walker.
+
+ Disable accelerated animations by default in DRT.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::setAcceleratedAnimationEnabled):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+
+2012-10-24 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Move the QQuickWebViewExperimental pointer to QQuickWebViewPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=100253
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::WrapperWindow::handleStatusChanged):
+ Use QQuickWebView::experimental rather than creating a new instance.
+
+2012-10-24 Thiago Marcos P. Santos <thiago.santos@intel.com>
+
+ [EFL] run-webkit-tests writes garbage on stderr when running on Xvfb
+ https://bugs.webkit.org/show_bug.cgi?id=100243
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ These errors generate noise on the reports and in some cases, like when
+ running perf tests, makes the test fail. By using Xext, we can add a
+ dummy handler to ignore these errors.
+
+ We could have added this handler on the top level EWK API, but that
+ would be intrusive and could override handlers defined by the user.
+
+ * WebKitTestRunner/PlatformEfl.cmake:
+ * WebKitTestRunner/efl/main.cpp:
+ (dummyExtensionErrorHandler):
+ (main):
+
+2012-10-24 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Unreviewed. Fix the GTK+ build.
+
+ * TestWebKitAPI/GNUmakefile.am: Add GTK_FLAGS to
+ libTestWebKitAPIMain and webcore cflags to TestGtk.
+
+2012-10-24 Zeno Albisser <zeno@webkit.org>
+
+ Implement GraphicsSurface for Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=98147
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * qmake/mkspecs/features/features.prf:
+ Activate GraphicsSurface on windows in case opengles2 (ANGLE)
+ is available in QT_CONFIG.
+
+2012-10-24 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][WK2] fast/repaint/delete-into-nested-block.html and fast/repaint/4776765.html are flaky
+ https://bugs.webkit.org/show_bug.cgi?id=100010
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Force the main view to receive focus even if Evas already
+ considers it to be focused.
+
+ It might happen that a different frame is focused by a page and
+ the focus change notification does not reach Evas. When another
+ test is run, the main frame is then not considered to be focused
+ by WebCore, and things such as focus rings are not drawn as
+ expected.
+
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::focus):
+
+2012-10-24 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132333.
+ http://trac.webkit.org/changeset/132333
+ https://bugs.webkit.org/show_bug.cgi?id=100234
+
+ Crashes many tests on the EFL-WK2 bot. (Requested by rakuco on
+ #webkit).
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ * WebKitTestRunner/efl/TestControllerEfl.cpp:
+ (WTR::TestController::platformInitializeContext):
+
+2012-10-24 Dongwoo Joshua Im <dw.im@samsung.com>
+
+ [GTK] Fix build break - undefined reference to 'gtk_init'
+ https://bugs.webkit.org/show_bug.cgi?id=100221
+
+ Unreviewed build fix.
+
+ GTK_LIBS is needed for TestWTF.
+
+ * TestWebKitAPI/GNUmakefile.am:
+
+2012-10-24 Grzegorz Czajkowski <g.czajkowski@samsung.com>
+
+ WebKitTestRunner needs to turn on 'setContinuousSpellCheckingEnabled'
+ https://bugs.webkit.org/show_bug.cgi?id=93611
+
+ Reviewed by Hajime Morita.
+
+ WebKitTestRunner enables spelling feature to pass the layout tests from editing/spelling.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ Enables spelling by WebKit2 C API.
+
+ * WebKitTestRunner/efl/TestControllerEfl.cpp:
+ (WTR::TestController::platformInitializeContext):
+ Attaches WKTextChecker's client and sets default language for WebKit2-EFL port.
+
+2012-10-24 Mario Sanchez Prada <mario@webkit.org>
+
+ [WK2] [GTK] TestWebKitAccessibility is not being run
+ https://bugs.webkit.org/show_bug.cgi?id=100102
+
+ Reviewed by Carlos Garcia Campos.
+
+ Removed wrong early return in _start_accessibility_daemons().
+
+ * Scripts/run-gtk-tests:
+ (TestRunner._lookup_atspi2_binary): Removed wrong line.
+
+2012-10-24 Noel Gordon <noel.gordon@gmail.com>
+
+ [chromium] Plumb DRT WebkitShouldRespectImageOrientation through to page settings
+ https://bugs.webkit.org/show_bug.cgi?id=100197
+
+ Reviewed by Kent Tamura.
+
+ fast/images/exif-orientation.html and fast/images/exif-orientation-css.html require a DRT
+ WebkitShouldRespectImageOrientation preference. Add the chromium implementation for this
+ preference and plumb it through to page settings.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::overridePreference): Update the tests WebkitShouldRespectImageOrientation
+ setting in DRT prefs.
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset): Disable the preference before and after each test.
+ (WebPreferences::applyTo): Apply the preference to the page settings of each test.
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+
+2012-10-23 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ [GTK] TestWebKitAPI/TestWebKit2 and TestWebKitAPI/TestGtk link to the installed libs
+ https://bugs.webkit.org/show_bug.cgi?id=100134
+
+ Reviewed by Martin Robinson.
+
+ Do not share the LDADD variable among TestWTF, TestWebKit2 and
+ TestGtk.
+
+ * TestWebKitAPI/GNUmakefile.am:
+
+2012-10-23 Kihong Kwon <kihong.kwon@samsung.com>
+
+ Unreviewed. Adding myself as committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-23 Dan Bernstein <mitz@apple.com>
+
+ Tools changes for <rdar://problem/2966974> [mac] Kerning and ligatures are not enabled by default
+ https://bugs.webkit.org/show_bug.cgi?id=100188
+
+ Reviewed by Sam Weinig.
+
+ Disable kerning and ligatures by default when running the tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetDefaultsToConsistentValues): Set a value of NO for the
+ WebKitKerningAndLigaturesEnabledByDefault user default.
+ * WebKitTestRunner/mac/main.mm:
+ (main): Register a value of NO for the WebKitKerningAndLigaturesEnabledByDefault user
+ default.
+
+2012-10-23 Simon Fraser <simon.fraser@apple.com>
+
+ Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText()
+ https://bugs.webkit.org/show_bug.cgi?id=100159
+
+ Reviewed by Tim Horton.
+
+ Make WebKitTestRunner use a WKView with a tile cache for tests run in a directory
+ whose path includes "tiled-drawing". It does this by passing around a WKDictionary
+ of options, and if the current PlatformWebView doesn't support those options, it will
+ create a new one.
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView): Add a WKDictionaryRef options dictionary argument.
+ (WTR::PlatformWebView::viewSupportsOptions): Returns true if the view
+ supports the options in the WKDictionaryRef.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize): Call createWebViewWithOptions() with
+ no options in the normal case.
+ (WTR::TestController::createWebViewWithOptions): Moved code into this fuction
+ so we can call it in two places.
+ (WTR::TestController::ensureViewSupportsOptions): If the current view
+ doesn't support the given options, throw it away and makea new one that does.
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::shouldUseTiledDrawing): Return true if the directory contains "tiled-drawing".
+ (WTR::updateTiledDrawingForCurrentTest): Tell the TestController to check whether
+ the view supports the given options. No-op for non-Mac platforms.
+ (WTR::TestInvocation::invoke): Call updateTiledDrawingForCurrentTest().
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:useTiledDrawing:]):
+ (-[TestRunnerWKView _shouldUseTiledDrawingArea]): Subclass the WKView so we can return
+ a custom value from this method.
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::viewSupportsOptions):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+ * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+
+2012-10-23 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r132276.
+ http://trac.webkit.org/changeset/132276
+ https://bugs.webkit.org/show_bug.cgi?id=100189
+
+ It broke the Qt-WK2 build intentionally (Requested by
+ Ossy_night on #webkit).
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR):
+ (WTR::TestInvocation::invoke):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+ * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+ (WTR::PlatformWebView::PlatformWebView):
+
+2012-10-23 Martin Robinson <mrobinson@igalia.com>
+
+ [GTK][Soup] Implement the default authentication dialog via WebCoreSupport
+ https://bugs.webkit.org/show_bug.cgi?id=99351
+
+ Reviewed by Carlos Garcia Campos.
+
+ We no longer need to turn off the soup authentication dialog soup feature,
+ because it's not installed.
+
+ * DumpRenderTree/gtk/DumpRenderTree.cpp:
+ (setDefaultsToConsistentStateValuesForTesting): Don't turn off the feature any longer.
+
+2012-10-23 Simon Fraser <simon.fraser@apple.com>
+
+ Allow tests to run with a tile cache, and optionally dump the tile cache via layerTreeAsText()
+ https://bugs.webkit.org/show_bug.cgi?id=100159
+
+ Reviewed by Tim Horton.
+
+ Make WebKitTestRunner use a WKView with a tile cache for tests run in a directory
+ whose path includes "tiled-drawing". It does this by passing around a WKDictionary
+ of options, and if the current PlatformWebView doesn't support those options, it will
+ create a new one.
+
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView): Add a WKDictionaryRef options dictionary argument.
+ (WTR::PlatformWebView::viewSupportsOptions): Returns true if the view
+ supports the options in the WKDictionaryRef.
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize): Call createWebViewWithOptions() with
+ no options in the normal case.
+ (WTR::TestController::createWebViewWithOptions): Moved code into this fuction
+ so we can call it in two places.
+ (WTR::TestController::ensureViewSupportsOptions): If the current view
+ doesn't support the given options, throw it away and makea new one that does.
+ * WebKitTestRunner/TestController.h:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::shouldUseTiledDrawing): Return true if the directory contains "tiled-drawing".
+ (WTR::updateTiledDrawingForCurrentTest): Tell the TestController to check whether
+ the view supports the given options. No-op for non-Mac platforms.
+ (WTR::TestInvocation::invoke): Call updateTiledDrawingForCurrentTest().
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+ * WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+ * WebKitTestRunner/mac/PlatformWebViewMac.mm:
+ (-[TestRunnerWKView initWithFrame:contextRef:pageGroupRef:useTiledDrawing:]):
+ (-[TestRunnerWKView _shouldUseTiledDrawingArea]): Subclass the WKView so we can return
+ a custom value from this method.
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::viewSupportsOptions):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+ * WebKitTestRunner/win/PlatformWebViewWin.cpp:
+ (WTR::PlatformWebView::PlatformWebView): New constructor parameter.
+
+2012-10-23 David Barton <dbarton@mathscribe.com>
+
+ [MathML] Symbol font uses greek letters for roman ones on linux and Windows
+ https://bugs.webkit.org/show_bug.cgi?id=99921
+
+ Reviewed by Eric Seidel.
+
+ Enable the STIXSizeOneSym font for testing.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (allowedFontFamilySet):
+ * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
+ (WTR::allowedFontFamilySet):
+
+2012-10-23 Tony Chang <tony@chromium.org>
+
+ [chromium] Chromium window build system does not rebuild correctly when enabling/disabling a feature
+ https://bugs.webkit.org/show_bug.cgi?id=38926
+
+ Reviewed by Eric Seidel.
+
+ Remove hack for clobbering build when features.gypi changes. Now that
+ Chromium requires VS2010 or newer, this bug has gone away.
+
+ * Scripts/update-webkit:
+
+2012-10-23 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] remove the const qualifier from WebTestDelegate::printMessage
+ https://bugs.webkit.org/show_bug.cgi?id=100082
+
+ Reviewed by Adam Barth.
+
+ There's no reason the method should be const, and indeed for
+ content_shell we want to send an IPC which is a non-const operation.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::printMessage):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::printMessage):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-23 Kenneth Rohde Christiansen <kenneth@webkit.org>
+
+ Add support for resolution media query
+ https://bugs.webkit.org/show_bug.cgi?id=99077
+
+ Reviewed by Antti Koivisto.
+
+ Add support for the RESOLUTION_MEDIA_QUERY feature flag.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-10-23 Bruno de Oliveira Abinader <bruno.abinader@basyskom.com>
+
+ Adding myself to commiters.py
+ https://bugs.webkit.org/show_bug.cgi?id=100122
+
+ Unreviewed update to commiters.py.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-23 Timothy Hatcher <timothy@apple.com>
+
+ Unreviewed watchlist change to monitor Inspector IDLs.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-23 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2] [WTR] WebKitTestRunner needs testRunner.queueForwardNavigation
+ https://bugs.webkit.org/show_bug.cgi?id=99700
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implemented testRunner.queueForwardNavigation, made little refactoring in Work Queue
+ to obviate code duplication.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::queueBackNavigation):
+ (WTR):
+ (WTR::InjectedBundle::queueForwardNavigation):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::queueForwardNavigation):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/WorkQueueManager.cpp:
+ (NavigationItem):
+ (WTR::NavigationItem::NavigationItem):
+ (WTR::NavigationItem::invoke):
+ (WTR):
+ (WTR::WorkQueueManager::queueBackNavigation):
+ (WTR::WorkQueueManager::queueForwardNavigation):
+ * WebKitTestRunner/WorkQueueManager.h:
+ (WorkQueueManager):
+
+2012-10-23 Simon Hausmann <simon.hausmann@digia.com>
+
+ Unreviewed trivial Qt build fix: Fix build without USE_3D_GRAPHICS
+
+ Disable USE_GRAPHICS_SURFACE if we don't have USE_3D_GRAPHICS because
+ GraphicsSurface.h needs GraphicsContext3D.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-10-23 Simon Pena <spena@igalia.com>
+
+ Unreviewed. Adding myself as committer.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-22 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Move the call to RegisterIsolatedFileSystem to the WebTestDelegate interface
+ https://bugs.webkit.org/show_bug.cgi?id=100048
+
+ Reviewed by Adam Barth.
+
+ The call needs to be done outside of the sandbox.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::beginDragWithFiles):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::registerIsolatedFileSystem):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::registerIsolatedFileSystem):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-22 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: remove unneeded debug messages from find_files()
+ https://bugs.webkit.org/show_bug.cgi?id=100041
+
+ Reviewed by Adam Barth.
+
+ This routine gets called all the time when loading the virtual
+ suites, and the debug messages were spamming me.
+
+ * Scripts/webkitpy/common/find_files.py:
+ (_normalized_find):
+
+2012-10-22 Tony Chang <tony@chromium.org>
+
+ [chromium] Add Mac 10.7 Debug bot since it's on the waterfall
+ https://bugs.webkit.org/show_bug.cgi?id=100028
+
+ Reviewed by Eric Seidel.
+
+ garden-o-matic can't baseline without this entry.
+
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+
+2012-10-22 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] introduce WebTask to the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=99964
+
+ Reviewed by Adam Barth.
+
+ I'm also removing the dependency on webkit_support, and instead go
+ through the WebTestDelegate interface.
+
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTDevToolsAgent.cpp:
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h:
+ (DRTDevToolsAgent::taskList):
+ * DumpRenderTree/chromium/DRTDevToolsClient.cpp:
+ * DumpRenderTree/chromium/DRTDevToolsClient.h:
+ (DRTDevToolsClient::taskList):
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (InvokeCallbackTask::InvokeCallbackTask):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner::taskList):
+ (DRTTestRunner::WorkQueue::taskList):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (RTCSessionDescriptionRequestSuccededTask::RTCSessionDescriptionRequestSuccededTask):
+ (RTCSessionDescriptionRequestFailedTask::RTCSessionDescriptionRequestFailedTask):
+ (RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
+ (RTCVoidRequestTask::RTCVoidRequestTask):
+ (StringDataTask::StringDataTask):
+ (CharPtrDataTask::CharPtrDataTask):
+ (DataChannelReadyStateTask::DataChannelReadyStateTask):
+ (RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ (MockWebRTCPeerConnectionHandler):
+ (MockWebRTCPeerConnectionHandler::taskList):
+ * DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
+ (MockWebSpeechInputController::SpeechTask::SpeechTask):
+ * DumpRenderTree/chromium/MockWebSpeechInputController.h:
+ (MockWebSpeechInputController::taskList):
+ (MockWebSpeechInputController):
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp:
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
+ (MockWebSpeechRecognizer::taskList):
+ (MockWebSpeechRecognizer):
+ (MockWebSpeechRecognizer::StepTask::StepTask):
+ * DumpRenderTree/chromium/Task.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/Task.cpp.
+ (WebTestRunner):
+ (WebTestRunner::invokeTask):
+ (TaskWrapper):
+ (WebTestRunner::TaskWrapper::TaskWrapper):
+ (WebTestRunner::TaskWrapper::~TaskWrapper):
+ (WebTestRunner::TaskWrapper::Run):
+ (postTask):
+ (postDelayedTask):
+ * DumpRenderTree/chromium/Task.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h.
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/public/WebTask.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/Task.h.
+ (WebTestRunner):
+ (WebTask):
+ (WebTaskList):
+ (WebMethodTask):
+ (WebTestRunner::WebMethodTask::WebMethodTask):
+ (WebTestRunner::WebMethodTask::~WebMethodTask):
+ (WebTestRunner::WebMethodTask::run):
+ (WebTestRunner::WebMethodTask::cancel):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestRunner):
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::scheduleAsynchronousClick):
+ (WebTestRunner::KeyDownTask::KeyDownTask):
+ (WebTestRunner::EventSender::scheduleAsynchronousKeyDown):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebTestRunner::EventSender::taskList):
+ (EventSender):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (WebTestRunner):
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/src/WebTask.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/src/Task.cpp.
+ (WebTestRunner):
+ (WebTestRunner::WebTask::WebTask):
+ (WebTestRunner::WebTask::~WebTask):
+ (WebTestRunner::WebTaskList::WebTaskList):
+ (WebTestRunner::WebTaskList::~WebTaskList):
+ (WebTestRunner::WebTaskList::registerTask):
+ (WebTestRunner::WebTaskList::unregisterTask):
+ (WebTestRunner::WebTaskList::revokeAll):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::postTask):
+ (WebTestRunner):
+ (WebTestRunner::WebTestInterfaces::Internal::postDelayedTask):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/WebUserMediaClientMock.cpp:
+ (UserMediaRequestTask::UserMediaRequestTask):
+ * DumpRenderTree/chromium/WebUserMediaClientMock.h:
+ (WebUserMediaClientMock::taskList):
+ (WebUserMediaClientMock):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::postTask):
+ (WebViewHost::postDelayedTask):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+ (WebViewHost::taskList):
+ (WebViewHost::HostMethodTask::HostMethodTask):
+
+2012-10-22 Ojan Vafai <ojan@chromium.org>
+
+ Update flakiness dashboard to match the state of the builders.
+ * TestResultServer/static-dashboards/builders.js:
+ (isChromiumDepsGTestRunner):
+ Broaden the filter since Chromium naming scheme is not consistent.
+ (loadBuildersList):
+ The main Chromium master now only runs builders, no tests.
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ Remove test suites that no longer run on any of these masters.
+
+2012-10-22 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] add a method for printing message to the WebTestDelegate
+ https://bugs.webkit.org/show_bug.cgi?id=99960
+
+ Reviewed by Adam Barth.
+
+ When using the TestRunner library from the content_shell, we can't print
+ message directly but need to send them to the browser process.
+
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h:
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
+ (WebTestRunner::AccessibilityController::fallbackCallback):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
+ (WebTestRunner::AccessibilityController::setDelegate):
+ (AccessibilityController):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::EventSender::dumpFilenameBeingDragged):
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp:
+ (GamepadController::connect):
+ (GamepadController::disconnect):
+ (GamepadController::setId):
+ (GamepadController::setButtonCount):
+ (GamepadController::setButtonData):
+ (GamepadController::setAxisCount):
+ (GamepadController::setAxisData):
+ (GamepadController::fallbackCallback):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ (TestInterfaces::~TestInterfaces):
+ (TestInterfaces::setDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp:
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::printMessage):
+ (WebTestRunner):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didBeginEditing):
+ (WebViewHost::lastContextMenuData):
+ (WebViewHost::clearContextMenuData):
+ (WebViewHost::setEditCommand):
+ (WebViewHost::clearEditCommand):
+ (WebViewHost::fillSpellingSuggestionList):
+ (WebViewHost::setGamepadData):
+ (WebViewHost::printMessage):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ I now only watch Selectors instead of all of CSS.
+
+ Unreviewed update of watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-22 Yury Semikhatsky <yurys@chromium.org>
+
+ Make sure base and derived class pointers are different in MemoryInstrumentationTest.instrumentedWithMultipleAncestors
+ https://bugs.webkit.org/show_bug.cgi?id=99987
+
+ Reviewed by Alexander Pavlov.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: changed first parent
+ class in the list so that it has virtual table as well as the second one. This
+ way we may be sure that pointer to the second ancestor class will differ from
+ the pointer to the derived class.
+
+2012-10-22 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Fix compilation after r132059.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-22 Dominik Röttsches <dominik.rottsches@intel.com>
+
+ Adding Cairo and Harfbuzz watchlist entries
+
+ Unreviewed watchlist update.
+
+ Added myself to these new ones and SVG.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-22 Yury Semikhatsky <yurys@chromium.org>
+
+ Web Inspector: do not double count memory of objects with multiple ancestors
+ https://bugs.webkit.org/show_bug.cgi?id=99958
+
+ Reviewed by Alexander Pavlov.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: Test that there
+ is no double counting in case of multiple inheritance.
+
+2012-10-22 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] Basic gesture event handling
+ https://bugs.webkit.org/show_bug.cgi?id=66173
+
+ Reviewed by Simon Hausmann.
+
+ Add support for eventSender.gestureLongPress.
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::EventSender):
+ (EventSender::gestureLongPress):
+ * DumpRenderTree/qt/EventSenderQt.h:
+ (EventSender):
+
+2012-10-22 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [WTR] Properly initialize TestRunner::m_dumpSelectionRect.
+ https://bugs.webkit.org/show_bug.cgi?id=99970
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Follow-up to r131476: actually initialize m_dumpSelectionRect to
+ some value to avoid some flakyness in the tests.
+
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::TestRunner):
+
+2012-10-22 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Don't build any of the tools in production_build
+
+ Reviewed by Simon Hausmann.
+
+ * Tools.pro:
+ * qmake/mkspecs/features/configure.prf:
+
+2012-10-22 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Move OBJECTS_DIR and friends to default_pre.prf
+
+ The introduction of load(qt_build_config) in .qmake.conf meant
+ that we started loading qtmodule.pri, which in turn set both
+ MOC_DIR, RCC_DIR, and OBJECTS_DIR.
+
+ We were setting OBJECTS_DIR in default_post under a isEmpty() guard
+ so that project files could override the objects dir. Instead of
+ using the isEmpty() check we move it to defaul_pre, which will
+ override the qtmodule.pri settings, but still allow project files
+ to override it.
+
+ Reviewed by Ossy.
+
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-10-22 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ WebKitTestRunner needs testRunner.queueLoadingScript and testRunner.queueNonLoadingScript
+ https://bugs.webkit.org/show_bug.cgi?id=42675
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added implementation of testRunner.queueLoadingScript and testRunner.queueNonLoadingScript.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::queueLoadingScript):
+ (WTR):
+ (WTR::InjectedBundle::queueNonLoadingScript):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::queueLoadingScript):
+ (WTR):
+ (WTR::TestRunner::queueNonLoadingScript):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/WorkQueueManager.cpp:
+ (WTR):
+ (WTR::runJavaScriptFunction):
+ (ScriptItem):
+ (WTR::ScriptItem::ScriptItem):
+ (WTR::ScriptItem::invoke):
+ (WTR::WorkQueueManager::queueBackNavigation):
+ (WTR::WorkQueueManager::queueLoadingScript):
+ (WTR::WorkQueueManager::queueNonLoadingScript):
+ * WebKitTestRunner/WorkQueueManager.h:
+ (WorkQueueManager):
+
+2012-10-22 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed, a follow-up to r132034 where I forgot to address
+ Ojan's review comment about the race condition in handleLocationChange.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (handleLocationChange):
+
+2012-10-22 Zan Dobersek <zandobersek@gmail.com>
+
+ [TestResultServer] Move the resource loading into a dedicated class
+ https://bugs.webkit.org/show_bug.cgi?id=99246
+
+ Reviewed by Ojan Vafai.
+
+ A new 'loader' namespace is created, containing the request method (previously located in dashboard_base.js)
+ and the new Loader object, which handles the loading of all the necessary data the dashboard might require.
+
+ * TestResultServer/static-dashboards/aggregate_results.html: Include the loader.js source file.
+ * TestResultServer/static-dashboards/builders.js:
+ (requestBuilderList): Use the request method located in the loader namespace instead of the removed doXHR method.
+ (onBuilderListLoad): Now parses the response text of the passed-in XHR. When all the builder lists are loaded the
+ resource loader object is notified appropriately.
+ (onErrorLoadingBuilderList): The partial function that calls this function also adds an XHR parameter.
+ * TestResultServer/static-dashboards/dashboard_base.js: Much of the resource loading-related code is moved to loader.js.
+ The Loader object is now used to load all the required resources.
+ (parseParameters): Don't push the 'builder' parameter into the current state if the unit tests are being run.
+ (resourceLoadingComplete): This method gets called when all the resources are loaded and the dashboard should
+ proceed with generating the page.
+ (handleLocationChange):
+ * TestResultServer/static-dashboards/flakiness_dashboard.html: Include the loader.js source file.
+ * TestResultServer/static-dashboards/flakiness_dashboard.js: The request method has been relocated to the loader namespace.
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js: The affected test cases are modified appropriately.
+ (test):
+ * TestResultServer/static-dashboards/loader.js: Added.
+ (.): A new namespace is introduced, publicly exporting the request method that performs an XHR operation and a Loader object
+ which oversees resource loading. The loading is done in steps, first loading the builders list, after that the results files
+ the current dashboard needs, and lastly the TestExpectations files if they are required by the dashboard. When done the loader
+ calls the resourceLoadingComplete method located in dashboard_base.js. This signals the dashboard all resources are available
+ and it can proceed with generating the dashboard page.
+ * TestResultServer/static-dashboards/loader_unittests.js: Added. Contains unit tests for the Loader object, covering the
+ incremental loading and the loading of results files and TestExpectations files. The builders list loading is currently not
+ tested as the unit tests page overrides related methods that possibly affect other tests' behavior.
+ * TestResultServer/static-dashboards/run-unittests.html: Now includes the loader.js and loader_unittests.js source file.
+ Refactors the code a bit due to changes in how onBuilderListLoad behaves.
+ * TestResultServer/static-dashboards/timeline_explorer.html: Now includes the loader.js source file.
+ * TestResultServer/static-dashboards/treemap.html: Ditto. Also refactors the code to take into account
+ that all the test files are now loaded before generating the dashboard page.
+
+2012-10-21 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] introduce a public API for the TestRunner library
+ https://bugs.webkit.org/show_bug.cgi?id=99904
+
+ Reviewed by Adam Barth.
+
+ The API decouples the public API from the underlying implementation, so
+ embedders can depend on it. I'm also changing DRT to consume the
+ TestRunner API through the public API, except for DRTTestRunner and all
+ places that require Task.h. These two will be migrated in later changes.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTDevToolsAgent.h:
+ * DumpRenderTree/chromium/DRTDevToolsClient.h:
+ * DumpRenderTree/chromium/MockSpellCheck.cpp:
+ (MockSpellCheck::fillSuggestionList):
+ * DumpRenderTree/chromium/MockSpellCheck.h:
+ (MockSpellCheck):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ * DumpRenderTree/chromium/MockWebSpeechInputController.h:
+ * DumpRenderTree/chromium/MockWebSpeechRecognizer.h:
+ * DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
+ (WebKit):
+ (WebTestRunner):
+ (WebAccessibilityController):
+ * DumpRenderTree/chromium/TestRunner/public/WebEventSender.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
+ (WebKit):
+ (WebTestRunner):
+ (WebEventSender):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
+ (WebKit):
+ (WebTestRunner):
+ (WebTestDelegate):
+ * DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h.
+ (WebKit):
+ (WebTestRunner):
+ (WebTestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp:
+ (WebTestRunner):
+ (WebTestRunner::makeMenuItemStringsFor):
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h:
+ (WebTestRunner):
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h:
+ (TestDelegate):
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h:
+ (TestInterfaces):
+ * DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
+ (WebTestRunner):
+ (WebTestRunner::WebAccessibilityController::WebAccessibilityController):
+ (WebTestRunner::WebAccessibilityController::setFocusedElement):
+ (WebTestRunner::WebAccessibilityController::notificationReceived):
+ (WebTestRunner::WebAccessibilityController::shouldLogAccessibilityEvents):
+ * DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp: Copied from Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h.
+ (WebTestRunner):
+ (WebTestRunner::WebEventSender::WebEventSender):
+ (WebTestRunner::WebEventSender::doDragDrop):
+ * DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp: Added.
+ (WebTestRunner):
+ (WebTestInterfaces::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::testInterfaces):
+ (WebTestRunner::WebTestInterfaces::Internal::accessibilityController):
+ (WebTestRunner::WebTestInterfaces::Internal::eventSender):
+ (WebTestRunner::WebTestInterfaces::Internal::Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::~Internal):
+ (WebTestRunner::WebTestInterfaces::Internal::setDelegate):
+ (WebTestRunner::WebTestInterfaces::Internal::clearContextMenuData):
+ (WebTestRunner::WebTestInterfaces::Internal::clearEditCommand):
+ (WebTestRunner::WebTestInterfaces::Internal::fillSpellingSuggestionList):
+ (WebTestRunner::WebTestInterfaces::Internal::setEditCommand):
+ (WebTestRunner::WebTestInterfaces::Internal::lastContextMenuData):
+ (WebTestRunner::WebTestInterfaces::Internal::setGamepadData):
+ (WebTestRunner::WebTestInterfaces::WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::~WebTestInterfaces):
+ (WebTestRunner::WebTestInterfaces::setWebView):
+ (WebTestRunner::WebTestInterfaces::setDelegate):
+ (WebTestRunner::WebTestInterfaces::bindTo):
+ (WebTestRunner::WebTestInterfaces::resetAll):
+ (WebTestRunner::WebTestInterfaces::accessibilityController):
+ (WebTestRunner::WebTestInterfaces::eventSender):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::initialize):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::eventSender):
+ (TestShell::accessibilityController):
+ (TestShell):
+ * DumpRenderTree/chromium/WebUserMediaClientMock.h:
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::finishLastTextCheck):
+ (WebViewHost::fillSpellingSuggestionList):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ (WebViewHost):
+
+2012-10-21 Viatcheslav Ostapenko <v.ostapenko@samsung.com>
+
+ Unreviewed. Updating my emails.
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-20 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][DRT] Implement tracking and painting repaint rectangles.
+ https://bugs.webkit.org/show_bug.cgi?id=99838
+
+ Reviewed by Gyuyoung Kim.
+
+ Implement displayWebView() and start tracking/painting the repaint
+ rectangles for the repaint tests that rely on it.
+
+ * DumpRenderTree/efl/DumpRenderTree.cpp:
+ (displayWebView):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+ * DumpRenderTree/efl/PixelDumpSupportEfl.cpp:
+ (createBitmapContextFromWebView):
+
+2012-10-19 Dan Bernstein <mitz@apple.com>
+
+ Add bundle API for hit-testing
+ https://bugs.webkit.org/show_bug.cgi?id=99907
+
+ Reviewed by Sam Weinig.
+
+ Added an API test for WKBundleFrameCreateHitTest().
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Added InjectedBundleFrameHitTest.cpp,
+ InjectedBundleFrameHitTest_bundle.cpp, and link-with-title.html.
+
+ * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest.cpp: Added.
+ (TestWebKitAPI::didReceiveMessageFromInjectedBundle): Checks that the message contains the
+ title of the link in link-with-title.html.
+ (TestWebKitAPI::setInjectedBundleClient):
+ (TestWebKitAPI::TEST):
+ * TestWebKitAPI/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp: Added.
+ (TestWebKitAPI::InjectedBundleFrameHitTestTest::InjectedBundleFrameHitTestTest):
+ (TestWebKitAPI::didFinishLoadForFrameCallback): Hit tests at (50, 50) and sends the link title
+ from the result back to the UI process.
+ (TestWebKitAPI::InjectedBundleFrameHitTestTest::didCreatePage):
+ (TestWebKitAPI::InjectedBundleFrameHitTestTest::frameLoadFinished):
+ * TestWebKitAPI/Tests/WebKit2/link-with-title.html: Added.
+
+2012-10-19 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131944.
+ http://trac.webkit.org/changeset/131944
+ https://bugs.webkit.org/show_bug.cgi?id=99891
+
+ On second thoughts, not such a great idea (Requested by jamesr
+ on #webkit).
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createNewWindow):
+
+2012-10-19 Alexandre Elias <aelias@chromium.org>
+
+ [chromium] API to pass impl thread via WebLayerTreeView
+ https://bugs.webkit.org/show_bug.cgi?id=99863
+
+ Reviewed by James Robinson.
+
+ This adds an API to pass the compositor impl thread via WebView and
+ WebLayerTreeView. This is currently a no-op change, but in the future
+ this codepath will supercede WebCompositor. The goal is to avoid statics
+ in compositor initialization.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::createNewWindow):
+
+2012-10-19 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [Cairo][WTR] Implement the painting of repaint rectangles.
+ https://bugs.webkit.org/show_bug.cgi?id=99839
+
+ Reviewed by Martin Robinson.
+
+ Implement the required code to paint the gray overlay with
+ transparent regions for the repaint rectangles, as other ports
+ already do and as is already done in most WK1 ports.
+
+ * WebKitTestRunner/cairo/TestInvocationCairo.cpp:
+ (WTR::paintRepaintRectOverlay):
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-09-08 Alpha Lam <hclam@chromium.org>
+
+ [chromium] Implement deferred image decoding
+ https://bugs.webkit.org/show_bug.cgi?id=94240
+
+ Reviewed by Stephen White.
+
+ Add --enable-deferred-image-decoding to DRT.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setDeferredImageDecodingEnabled):
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.virtual_test_suites):
+
+2012-10-19 Dongwoo Joshua Im <dw.im@samsung.com>
+
+ Rename ENABLE_CSS3_TEXT_DECORATION to ENABLE_CSS3_TEXT
+ https://bugs.webkit.org/show_bug.cgi?id=99804
+
+ Reviewed by Julien Chaffraix.
+
+ CSS3 text related properties will be implemented under this flag,
+ including text decoration, text-align-last, and text-justify.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+
+2012-10-19 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WTR] renderToOffscreenBuffer should not be set if the real render loop is active
+ https://bugs.webkit.org/show_bug.cgi?id=99831
+
+ Reviewed by Jocelyn Turcotte.
+
+ Do not set renderToOffscreenBuffer if we have called setRenderWithoutShowing.
+ We do not need it in this case and these things are actually conflicting.
+
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::WrapperWindow::handleStatusChanged):
+ (WTR::PlatformWebView::PlatformWebView):
+ (WTR::PlatformWebView::windowShapshotEnabled): Added a comment
+ describing why this workaround is needed.
+
+2012-10-19 Zan Dobersek <zandobersek@gmail.com>
+
+ [WK2][GTK] Fullscreen tests timing out in bots
+ https://bugs.webkit.org/show_bug.cgi?id=93973
+
+ Reviewed by Philippe Normand.
+
+ Add webcore_cppflags to the CPPFLAGS for WebKitTestRunner and the
+ injected bundle library. webcore_cppflags contains all the feature
+ defines' macros so the ENABE(*) compilation guards should now work
+ properly (i.e. enable the code behind them when the feature is enabled).
+
+ * WebKitTestRunner/GNUmakefile.am:
+
+2012-10-19 Simon Hausmann <simon.hausmann@digia.com>
+
+ Unreviewed, rolling out r131734.
+ http://trac.webkit.org/changeset/131734
+
+ Broke ANGLE build where we end up with @echo foo && @echo -n
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-10-19 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ REGRESSION (r130640 - r130644): TestCookieManager API test is failing
+ https://bugs.webkit.org/show_bug.cgi?id=98738
+
+ Reviewed by Philippe Normand.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner): Unskip /webkit2/WebKitCookieManager/accept-policy.
+
+2012-10-19 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Update the RuntimeEnabledFeatures flags
+ https://bugs.webkit.org/show_bug.cgi?id=99714
+
+ Reviewed by Adam Barth.
+
+ Enabling the DeprecatedPeerConnection so that all tests still run.
+
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+
+2012-10-18 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: labelForElement is slow when there are a lot of DOM elements
+ https://bugs.webkit.org/show_bug.cgi?id=97825
+
+ Reviewed by Ryosuke Niwa.
+
+ Implement titleUIElement in the chromium port of DRT, and
+ fix getAccessibleElementById so that it ensures the backing store
+ is up-to-date.
+
+ * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
+ (AccessibilityController::getAccessibleElementById):
+ * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
+ (AccessibilityUIElement::titleUIElementCallback):
+
+2012-10-17 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: NMI provide data for mixing with tcmalloc heap dumps.
+ https://bugs.webkit.org/show_bug.cgi?id=99457
+
+ Reviewed by Yury Semikhatsky.
+
+ countObjectSize now requires pointer to object as the first argument.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-18 Dirk Pranke <dpranke@chromium.org>
+
+ make move_overwritten_baselines_to work again while rebaselining
+ https://bugs.webkit.org/show_bug.cgi?id=99793
+
+ Reviewed by Ojan Vafai.
+
+ We used to have code that would help when rebaselining results
+ for new ports (e.g., when moving from Lion to Mountain Lion) but
+ it appears that code bitrotted during all the refactoring since
+ the last time we needed this. This patch makes things work
+ again, adds more tests that will hopefully make clearer what
+ is supposed to work, and renames various parameters to be
+ consistent.
+
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ (move_overwritten_baselines_to):
+ (builder_path_for_port_name):
+ * Scripts/webkitpy/tool/commands/rebaseline.py:
+ (RebaselineTest.__init__):
+ (RebaselineTest._copy_existing_baseline):
+ (RebaselineTest._rebaseline_test):
+ (RebaselineTest.execute):
+ (AbstractParallelRebaselineCommand._rebaseline_commands):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (test_rebaseline_json_with_move_overwritten_baselines_to):
+ (test_rebaseline_test_internal_with_move_overwritten_baselines_to):
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ (GardeningServerTest.test_rebaselineall):
+
+2012-10-18 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Skip really old flaky failing jscore date test.
+ There's a bug tracking it here: https://bugs.webkit.org/show_bug.cgi?id=53712.
+
+ * Scripts/run-javascriptcore-tests:
+
+2012-10-18 Byungwoo Lee <bw80.lee@samsung.com>
+
+ Fix build warning.
+ https://bugs.webkit.org/show_bug.cgi?id=99788
+
+ Reviewed by Kentaro Hara.
+
+ Use return value of mktemp() for removing -Wunused-result.
+
+ * MiniBrowser/efl/main.c:
+ (on_download_request):
+
+2012-10-18 Benjamin Poulain <bpoulain@apple.com>
+
+ [WK2] WebKit2 does not build without PLUGIN_PROCESS on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=99771
+
+ Reviewed by Anders Carlsson.
+
+ * DumpRenderTree/mac/MockWebNotificationProvider.mm: The file was not including config.h,
+ effectively breaking feature flags.
+
+2012-10-18 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [EFL][DRT] Make textareas resizable by default.
+ https://bugs.webkit.org/show_bug.cgi?id=99719
+
+ Reviewed by Gyuyoung Kim.
+
+ Enable painting the textarea resizer at the corner by default,
+ just as it already is the case for WK2. This eases the work needed
+ to get the pixel tests in shape and run by the bots, as both the
+ WK1 and WK2 ports will have more similar results.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::resetDefaultsToConsistentValues):
+
+2012-10-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Add a webkit_test_support target that WebTestingSupport
+ https://bugs.webkit.org/show_bug.cgi?id=99772
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-10-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] move TestRunner files into a src/ sub directory
+ https://bugs.webkit.org/show_bug.cgi?id=99776
+
+ Reviewed by Adam Barth.
+
+ This is in preparation of adding a public API to the TestRunner library.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * DumpRenderTree/DumpRenderTree.gypi:
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.h.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.h.
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.h.
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppVariant.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/CppVariant.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/CppVariant.h.
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/EventSender.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/EventSender.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/EventSender.h.
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/GamepadController.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/GamepadController.h.
+ * DumpRenderTree/chromium/TestRunner/src/Task.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/Task.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/Task.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/Task.h.
+ * DumpRenderTree/chromium/TestRunner/src/TestDelegate.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestDelegate.h.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestInterfaces.h.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestRunner.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/TestRunner.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TestRunner.h.
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TextInputController.cpp.
+ * DumpRenderTree/chromium/TestRunner/src/TextInputController.h: Renamed from Tools/DumpRenderTree/chromium/TestRunner/TextInputController.h.
+
+2012-10-18 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] garden-o-matic should ignore the 10.8 Tests bot
+ https://bugs.webkit.org/show_bug.cgi?id=99765
+
+ Reviewed by Adam Barth.
+
+ It's really more of an FYI bot at this point and can be safely
+ ignored like the Content Shell bots.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ (.):
+
+2012-10-18 Jochen Eisinger <jochen@chromium.org>
+
+ [chromium] Simplify TestInterfaces, as this class won't be directly exposed in the TestRunner library's interface
+ https://bugs.webkit.org/show_bug.cgi?id=99766
+
+ Reviewed by Adam Barth.
+
+ This reverts http://trac.webkit.org/changeset/123240
+
+ * DumpRenderTree/chromium/TestRunner/TestInterfaces.cpp:
+ (TestInterfaces::TestInterfaces):
+ (TestInterfaces::~TestInterfaces):
+ (TestInterfaces::setWebView):
+ (TestInterfaces::setDelegate):
+ (TestInterfaces::bindTo):
+ (TestInterfaces::resetAll):
+ (TestInterfaces::accessibilityController):
+ (TestInterfaces::eventSender):
+ * DumpRenderTree/chromium/TestRunner/TestInterfaces.h:
+ (TestInterfaces):
+
+2012-10-18 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131810.
+ http://trac.webkit.org/changeset/131810
+ https://bugs.webkit.org/show_bug.cgi?id=99762
+
+ Broke linux debug webkit_unit_tests (Requested by
+ danakj|gardening on #webkit).
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.virtual_test_suites):
+
+2012-10-18 Alpha Lam <hclam@chromium.org>
+
+ [chromium] Implement deferred image decoding
+ https://bugs.webkit.org/show_bug.cgi?id=94240
+
+ Reviewed by Stephen White.
+
+ Add --enable-deferred-image-decoding to DRT.
+
+ * DumpRenderTree/chromium/DumpRenderTree.cpp:
+ (main):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::TestShell):
+ (TestShell::resetWebSettings):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::setDeferredImageDecodingEnabled):
+ (TestShell):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (WebPreferences::reset):
+ (WebPreferences::applyTo):
+ * DumpRenderTree/chromium/WebPreferences.h:
+ (WebPreferences):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.virtual_test_suites):
+
+2012-10-18 Dirk Pranke <dpranke@chromium.org>
+
+ webkitpy: fix chromium bot configs in builders.py
+ https://bugs.webkit.org/show_bug.cgi?id=99638
+
+ Reviewed by Ojan Vafai.
+
+ Updating after the great bot-renaming and deleting a test case
+ that is no longer needed.
+
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ (BuildCoverageExtrapolatorTest.test_extrapolate):
+
+2012-10-18 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] Add 10.8 bot into fallback path, make work with garden-o-matic
+ https://bugs.webkit.org/show_bug.cgi?id=99748
+
+ Reviewed by Ryosuke Niwa.
+
+ Subject pretty much says it all ...
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_versions):
+ (ChromiumMacPortTest.test_baseline_path):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaseline.test_baseline_directory):
+ (test_rebaseline_and_copy_test_with_lion_result):
+ (test_rebaseline_expectations):
+
+2012-10-18 Timothy Hatcher <timothy@apple.com>
+
+ Teach prepare-ChangeLog how to handle non-function properties in JavaScript prototypes.
+
+ https://bugs.webkit.org/show_bug.cgi?id=99747
+
+ Reviewed by Joseph Pecoraro.
+
+ * Scripts/prepare-ChangeLog:
+ (get_function_line_ranges_for_javascript): Clear currentIdentifiers when comma is encountered
+ so it does not tack those identifiers onto the next changed function.
+
+2012-10-18 James Simonsen <simonjam@chromium.org>
+
+ Add a script for exporting http/tests/w3c/webperf/submission to W3C
+ https://bugs.webkit.org/show_bug.cgi?id=99675
+
+ Reviewed by Tony Gentilcore.
+
+ This does the inverse of Scripts/import-w3c-performance-wg-tests.
+
+ * Scripts/export-w3c-performance-wg-tests: Added.
+
+2012-10-18 Pablo Flouret <pablof@motorola.com>
+
+ Implement css3-conditional's @supports rule
+ https://bugs.webkit.org/show_bug.cgi?id=86146
+
+ Reviewed by Antti Koivisto.
+
+ * Scripts/webkitperl/FeatureList.pm:
+ * qmake/mkspecs/features/features.pri:
+ Add an ENABLE_CSS3_CONDITIONAL_RULES flag.
+
+2012-10-18 Xiaobo Wang <xbwang@torchmobile.com.cn>
+
+ [BlackBerry] Dump DRT output to stdout if test is passed as command line argument
+ https://bugs.webkit.org/show_bug.cgi?id=99150
+
+ Reviewed by Rob Buis.
+
+ Fixed some code style errors as well.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::runTest):
+ (BlackBerry::WebKit::DumpRenderTree::runRemainingTests):
+ (BlackBerry::WebKit::DumpRenderTree::runTests):
+ (BlackBerry::WebKit::DumpRenderTree::isHTTPTest):
+ (BlackBerry::WebKit::DumpRenderTree::dump):
+ (BlackBerry::WebKit::DumpRenderTree::addMessageToConsole):
+ * DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h:
+ (DumpRenderTree):
+
+2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Improved support for silent builds
+
+ Reviewed by Tor Arne Vestbø.
+
+ Silence our extra compilers when CONFIG+=silent is set.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Reduce memory pressure at link time with less compromise on speed of linking
+
+ Reviewed by Csaba Osztrogonác.
+
+ Revert r131718 that made us pass -fno-keep-memory to the linker for any
+ i386 builds. The downside of passing that option is that it slows down
+ the process of linking and as Ossy determined, release builds do _not_
+ take as much memory (2.x GB) for linking but much less (~350MB).
+
+ However there is one condition where even release builds do take up too
+ much memory, and that is when Qt is configured with
+ -separate-debug-info, because it adds a -g next to -O2. The recent
+ introduction of loading qt_build_config enabled us to read qmodule.pri,
+ which adds the -g if Qt is configured with -separate-debug-info. So
+ instead of playing with -fno-keep-memory (which is a last resort
+ measure for debug builds) we should tweak our existing mechanism of
+ dealing with the debug info:
+
+ production_build.prf tries to ensure that we use -g only in static
+ libraries that contain API facing code, so that we get nice backtraces
+ at least into the API layer. For other static libraries such as WebCore
+ we skip -g via CONFIG += no_debug_info. One of the conditions for
+ enabling this tweak is CONFIG(debug, debug|release). This patch adds
+ contains(QT_CONFIG,separate_debug_info) to the conditions.
+
+ The patch also extend the CONFIG += no_debug_info part with the removal
+ of no_separate_debug_info. There is no point in running an extra
+ build step to strip out debug info into a separate file if at the same
+ time we tell the compiler to not generate any debug info altogether.
+
+ * qmake/mkspecs/features/production_build.prf:
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2012-10-18 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] OpenGL rendering is not possible on bots using Xvfb
+ https://bugs.webkit.org/show_bug.cgi?id=99463
+
+ Reviewed by Jocelyn Turcotte.
+
+ Added a workaround to be able to disallow UI side OpenGL rendering
+ if the environment is not suitable because it can be extremely slow
+ with a software backend.
+
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort.setup_environ_for_server): Let the environment variable
+ QT_WEBKIT_DISABLE_UIPROCESS_DUMPPIXELS reach the driver. This variable
+ should be defined on bots that don't have a suitable OpenGL environment.
+ * WebKitTestRunner/PlatformWebView.h:
+ (PlatformWebView):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::WrapperWindow::handleStatusChanged): Don't try to create an OpenGL
+ surface and set the setRenderWithoutShowing flag on the window if the
+ variable is set.
+ (WTR::PlatformWebView::windowSnapshotImage):
+ (WTR::PlatformWebView::windowShapshotEnabled):
+ (WTR):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected): Use the old method
+ of evaluating pixel results if the snapshot is not supported, that is to check
+ the image we got from the web process. This is necessary for the bots to be able
+ to run ref tests.
+
+2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Implement pixel snapshot generation in WTR
+ https://bugs.webkit.org/show_bug.cgi?id=95992
+
+ Reviewed by Jocelyn Turcotte.
+
+ Switch the Qt implementation of the PlatformWebView to use
+ QQuickWindow::grabWindow to generate the pixel results. This way
+ we will go through the scenegraph and test the actual rendering backend.
+ We use QQuickWindowPrivate::setRenderWithoutShowing to avoid the need of
+ showing the window.
+
+ * WebKitTestRunner/Target.pri: Had to added a bunch
+ of modules to be able to use QQuickWindowPrivate.
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::WrapperWindow::handleStatusChanged):
+ (WTR::PlatformWebView::windowSnapshotImage):
+
+2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WTR] Do a forced repaint before generating pixel results
+ https://bugs.webkit.org/show_bug.cgi?id=98654
+
+ Reviewed by Jocelyn Turcotte.
+
+ Do a forced repaint before grabbing the pixel snapshot. This extra
+ synchronisation is necessary with the CoordinatedGraphics rendering
+ backend because it has a fully asynchronous nature. This patch make
+ us using the window snapshot for pixel results which is necessary to
+ capture animations and other dynamic content. The actual grabbing of
+ the window has not been implemented in this patch. It will come in
+ a follow-up.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::dump): Store results in member variables.
+ Don't close output channels yet.
+ (WTR::TestInvocation::dumpResults): Added. This is where we dump
+ the results if no error happened.
+ (WTR):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::windowSnapshotImage):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::forceRepaintDoneCallback):
+ (WTR):
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Clean up variables controlling Qt module creation/handling
+
+ Reviewed by Tor Arne Vestbø.
+
+ We now depend on a Qt 5 version that is new enough to allow us to
+ clean this up. Qt's default_pre.prf uses MODULE_QMAKE_OUTDIR, but
+ the other MODULE_BASE_* variables are onl used in qmodule.prf.
+
+ * qmake/mkspecs/features/default_pre.prf:
+
+2012-10-18 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Reduce memory pressure during link time
+
+ Reviewed by Tor Arne Vestbø.
+
+ If possible always pass -fkeep-memory to the linker on i386. The
+ library has grown so big that we need this not only for i386 debug
+ builds but at least also for release.
+
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2012-10-17 Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Modularize documentation for QtWebKit
+
+ Running 'make docs' would fail unless 'make qmake_all' was ran first,
+ but qmake_all involved generating all the derived sources, which seems
+ overly complex just for building documentation.
+
+ We solve this by preventing all subdirs except QtWebKit from having a
+ docs target. This would normally work fine on its own, but since we
+ use CONFIG += ordered, there's now a missing doc target for the
+ immediate dependency of the QtWebKit subdir. We solve this by adding
+ a dummy-target ourselves.
+
+ Finally, we clean up the qdocconf file to match the rest of the Qt
+ documentation modularization efforts.
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/default_post.prf:
+
+2012-10-17 Zoltan Horvath <zoltan@webkit.org>
+
+ Remove the JSHeap memory measurement of the PageLoad performacetests since it creates bogus JSGlobalDatas
+ https://bugs.webkit.org/show_bug.cgi?id=99609
+
+ Reviewed by Ryosuke Niwa.
+
+ Remove the implementation since it creates bogus JSGlobalDatas in the layout tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump):
+
+2012-10-17 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] stop falling back to platform/mac for LayoutTest results
+ https://bugs.webkit.org/show_bug.cgi?id=99666
+
+ Reviewed by James Robinson.
+
+ Previously the Chromium ports would fall back to results in
+ platform/mac if a result was not found in platform/chromium-*.
+ This allowed us to share a lot of results w/ the Apple Mac port,
+ but often surprised people (especially at Apple ;) when changing
+ something in that directory would break a Chromium build.
+
+ The tests that are deleted in baselineoptimizer were for cases
+ that are no longer relevant or possible in the current fallback
+ graph.
+
+ * Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py:
+ (BaselineOptimizerTest.test_move_baselines):
+ (BaselineOptimizerTest.test_chromium_covers_mac_win_linux):
+ * Scripts/webkitpy/layout_tests/port/chromium_android.py:
+ (ChromiumAndroidPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
+ (ChromiumLinuxPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort):
+ * Scripts/webkitpy/layout_tests/port/chromium_win.py:
+ (ChromiumWinPort):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js:
+
+2012-10-17 Shashi Shekhar <shashishekhar@google.com>
+
+ Remove redundant sdk_build parameter.
+ https://bugs.webkit.org/show_bug.cgi?id=99648
+
+ Reviewed by Adam Barth.
+
+ sdk_build parameter is no longer needed.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+ * TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:
+
+2012-10-17 Joanmarie Diggs <jdiggs@igalia.com>
+
+ [GTK] AccessibilityUIElement::role() should be consistent across platforms wherever possible
+ https://bugs.webkit.org/show_bug.cgi?id=99640
+
+ Reviewed by Chris Fleizach.
+
+ Convert AtkRole instances to the Mac/Safari-style AXRole string.
+
+ * DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp:
+ (roleToString): New method to convert AtkRole instances to the Mac/Safari-style AXRole string
+ (AccessibilityUIElement::role): Output the Mac/Safair-style AXRole string rather than the AtkRole's name
+
+2012-10-17 Anders Carlsson <andersca@apple.com>
+
+ Clean up Vector.h
+ https://bugs.webkit.org/show_bug.cgi?id=99622
+
+ Reviewed by Benjamin Poulain.
+
+ Remove ReversedProxy test.
+
+ * TestWebKitAPI/Tests/WTF/Vector.cpp:
+
+2012-10-17 Scott Graham <scottmg@chromium.org>
+
+ Integer overflows/underflows in all Gamepad controller api calls.
+ https://bugs.webkit.org/show_bug.cgi?id=97262
+
+ Reviewed by Abhishek Arya.
+
+ Range check controller inputs. This code is not exposed to the web,
+ but makes fuzzers try less hard to break uninteresting code.
+
+ * DumpRenderTree/chromium/TestRunner/GamepadController.cpp:
+ (GamepadController::setButtonCount):
+ (GamepadController::setButtonData):
+ (GamepadController::setAxisCount):
+ (GamepadController::setAxisData):
+
+2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
+
+ Unreviewed watchlist email change.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Dan Carney <dcarney@google.com>
+
+ Bind isolatedWorldSecurityOrigin to world
+ https://bugs.webkit.org/show_bug.cgi?id=99582
+
+ Reviewed by Adam Barth.
+
+ Added ability to unset isolatedWorldSecurityOrigin.
+
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::setIsolatedWorldSecurityOrigin):
+
+2012-10-17 Joseph Pecoraro <pecoraro@apple.com>
+
+ Unreviewed watchlist addition.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ plugins: Allow a plugin to dictate whether it can receive drag events or not.
+ https://bugs.webkit.org/show_bug.cgi?id=99355
+
+ Reviewed by Tony Chang.
+
+ Update the TestWebPlugin to implement the new |canProcessDrag| interface.
+
+ * DumpRenderTree/chromium/TestWebPlugin.h:
+ (TestWebPlugin::canProcessDrag):
+
+2012-10-17 Dominic Mazzoni <dmazzoni@google.com>
+
+ Unreviewed. Create an accessibility watchlist.
+
+ * Scripts/webkitpy/common/config/committers.py:
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Jochen Eisinger <jochen@chromium.org>
+
+ [gyp] fix bundle resources for DumpRenderTree on mac
+ https://bugs.webkit.org/show_bug.cgi?id=99558
+
+ Reviewed by Adam Barth.
+
+ mac_bundle_resources doesn't propagate to targets that depend on it,
+ so I'm wrapping it in an all_dependent_settings block.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-10-17 Harald Alvestrand <hta@google.com>
+
+ Add myself to the MediaStream watchlist
+ https://bugs.webkit.org/show_bug.cgi?id=99589
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] InjectedBundlePage::decidePolicyForNavigationAction() should print only filename part of local URLs
+ https://bugs.webkit.org/show_bug.cgi?id=99581
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Now InjectedBundlePage::decidePolicyForNavigationAction() prints only filename part of local URLs (URLs where scheme
+ equals to 'file').
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::decidePolicyForNavigationAction):
+
+2012-10-17 Harald Alvestrand <hta@google.com>
+
+ Implement the Selector argument to RTCPeerConnection.getStats
+ https://bugs.webkit.org/show_bug.cgi?id=99460
+
+ Reviewed by Adam Barth.
+
+ The MockWebRTCPeerConnectionHandler will return one object only
+ when it gets a selector, and an even number when there is no selector.
+ This allows to verify that the argument is passed, but not its value.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::getStats):
+
+2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ WebKitTestRunner needs layoutTestController.queueReload
+ https://bugs.webkit.org/show_bug.cgi?id=42672
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added implementation of testRunner.queueReload().
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::queueReload):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::queueReload):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/WorkQueueManager.cpp:
+ (WTR::WorkQueueManager::queueReload):
+ (WTR):
+ * WebKitTestRunner/WorkQueueManager.h:
+ (WorkQueueManager):
+
+2012-10-17 Mark Rowe <mrowe@apple.com>
+
+ Fix the build with a newer version of clang.
+
+ Reviewed by Dan Bernstein.
+
+ Update to accommodate the renamed methods in WebCoreStatistics.
+
+ * DumpRenderTree/mac/PixelDumpSupportMac.mm:
+ (createPagedBitmapContext):
+
+2012-10-17 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ WebKitTestRunner needs testRunner.queueLoad
+ https://bugs.webkit.org/show_bug.cgi?id=42674
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added testRunner.queueLoad() and testRunner.queueBackNavigation() implementation to WTR including
+ Work Queue implementation. Work Queue is managed by WorkQueueManager which belongs to UI process
+ (as the needed functionality, like loading initiation, has to be invoked from UI process) and
+ exchanges messages with Injected bundle.
+
+ * WebKitTestRunner/CMakeLists.txt:
+ * WebKitTestRunner/GNUmakefile.am:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::InjectedBundle):
+ (WTR::InjectedBundle::didReceiveMessage):
+ (WTR::InjectedBundle::done):
+ (WTR::InjectedBundle::shouldProcessWorkQueue):
+ (WTR):
+ (WTR::InjectedBundle::processWorkQueue):
+ (WTR::InjectedBundle::queueBackNavigation):
+ (WTR::InjectedBundle::queueLoad):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame):
+ (WTR::InjectedBundlePage::didFinishLoadForFrame):
+ (WTR::InjectedBundlePage::didFailLoadWithErrorForFrame):
+ (WTR::InjectedBundlePage::locationChangeForFrame):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
+ (InjectedBundlePage):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::queueBackNavigation):
+ (WTR):
+ (WTR::TestRunner::queueLoad):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+ * WebKitTestRunner/TestController.h:
+ (WTR::TestController::workQueueManager):
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
+ * WebKitTestRunner/WorkQueueManager.cpp: Added.
+ (WTR):
+ (WTR::mainPage):
+ (WTR::goToItemAtIndex):
+ (WTR::WorkQueueManager::WorkQueueManager):
+ (WTR::WorkQueueManager::clearWorkQueue):
+ (WTR::WorkQueueManager::processWorkQueue):
+ (WTR::WorkQueueManager::queueLoad):
+ (WTR::WorkQueueManager::queueBackNavigation):
+ (WTR::WorkQueueManager::enqueue):
+ * WebKitTestRunner/WorkQueueManager.h: Added.
+ (WTR):
+ (WorkQueueManager):
+ (WTR::WorkQueueManager::isWorkQueueEmpty):
+ (WorkQueueItem):
+ (WTR::WorkQueueManager::WorkQueueItem::~WorkQueueItem):
+ * WebKitTestRunner/win/WebKitTestRunner.vcproj:
+
+2012-10-16 Andy Estes <aestes@apple.com>
+
+ [WebKit2] Create Objective-C API for adding and removing user scripts
+ https://bugs.webkit.org/show_bug.cgi?id=99528
+
+ Reviewed by Anders Carlsson.
+
+ Add three new API tests.
+
+ * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
+ (expectScriptValueIsString):
+ (expectScriptValueIsBoolean):
+ (expectScriptValueIsUndefined):
+
+2012-10-16 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] add Mountain Lion baselines
+ https://bugs.webkit.org/show_bug.cgi?id=99505
+
+ Reviewed by Ojan Vafai.
+
+ This change adds a temporary 10.8/MountainLion-specific
+ expectations file for Chromium so that the bot can be green
+ while we are updating all the baselines and triaging failures.
+
+ * Scripts/webkitpy/layout_tests/port/chromium_mac.py:
+ (ChromiumMacPort.expectations_files):
+ * Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py:
+ (ChromiumMacPortTest.test_ml_expectations):
+
+2012-10-16 Dima Gorbik <dgorbik@apple.com>
+
+ Remove Platform.h include from the header files.
+ https://bugs.webkit.org/show_bug.cgi?id=98665
+
+ Reviewed by Eric Seidel.
+
+ We don't want other clients that include WebKit headers to know about Platform.h.
+
+ * DumpRenderTree/mac/MockGeolocationProvider.mm:
+
+2012-10-16 Tommy Widenflycht <tommyw@google.com>
+
+ MediaStream API: Add the chromium API for RTCDataChannel
+ https://bugs.webkit.org/show_bug.cgi?id=99435
+
+ Reviewed by Adam Barth.
+
+ Adding mock support for WebRTCDataChannel.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (StringDataTask):
+ (StringDataTask::StringDataTask):
+ (CharPtrDataTask):
+ (CharPtrDataTask::CharPtrDataTask):
+ (DataChannelReadyStateTask):
+ (DataChannelReadyStateTask::DataChannelReadyStateTask):
+ (RTCPeerConnectionReadyStateTask):
+ (RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
+ (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
+ (MockWebRTCPeerConnectionHandler::initialize):
+ (MockWebRTCPeerConnectionHandler::stop):
+ (MockWebRTCPeerConnectionHandler::openDataChannel):
+ (MockWebRTCPeerConnectionHandler::closeDataChannel):
+ (MockWebRTCPeerConnectionHandler::sendStringData):
+ (MockWebRTCPeerConnectionHandler::sendRawData):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ (MockWebRTCPeerConnectionHandler):
+
+2012-10-16 Chris Rogers <crogers@google.com>
+
+ Rename some AudioNodes
+ https://bugs.webkit.org/show_bug.cgi?id=99358
+
+ Reviewed by Daniel Bates.
+
+ * Scripts/do-webcore-rename:
+
+2012-10-16 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Implement testRunner.dumpSelectionRect() in WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=69545
+
+ Reviewed by Simon Fraser.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::dump): Set the
+ kWKSnapshotOptionsPaintSelectionRectangle option if
+ testRunner.dumpSelectionRect() is called.
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (WTR::TestRunner::dumpSelectionRect):
+ (WTR::TestRunner::shouldDumpSelectionRect):
+ (TestRunner):
+
+2012-10-16 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131461.
+ http://trac.webkit.org/changeset/131461
+ https://bugs.webkit.org/show_bug.cgi?id=99474
+
+ Broke win7 bots (Requested by danakj|gardening on #webkit).
+
+ * DumpRenderTree/chromium/TestEventPrinter.cpp:
+ * DumpRenderTree/chromium/TestEventPrinter.h:
+ (TestEventPrinter):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump):
+
+2012-10-16 Zoltan Horvath <zoltan@webkit.org>
+
+ [chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
+ https://bugs.webkit.org/show_bug.cgi?id=99288
+
+ Reviewed by Ryosuke Niwa.
+
+ Provide used JSHeap size as we did it for the Apple port.
+
+ * DumpRenderTree/chromium/TestEventPrinter.cpp:
+ (TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
+ * DumpRenderTree/chromium/TestEventPrinter.h:
+ (TestEventPrinter): handleDumpMemoryHeader declaration.
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump): Dump JSHeap value.
+
+2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix nmake wipeclean on Windows
+
+ Reviewed by Tor Arne Vestbø.
+
+ Delete all subdirectories and no files instead of ".".
+
+ * qmake/mkspecs/features/configure.prf:
+
+2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix wipeclean on Windows
+
+ Reviewed by Csaba Osztrogonác.
+
+ Make sure to close the .qmake.cache file after opening it, otherwise it cannot be deleted on
+ a clean build because this process (build-webkit) is still using it due to Windows' exclusive
+ way of opening files.
+
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Fix determination of changed files from SVN revisions
+
+ Reviewed by Csaba Osztrogonác.
+
+ isSVN() doesn't work from within the build directory, so change to the source directory before
+ doing any VCS operations.
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
+
+ Fix build-webkit bailing out of !isSVN() and !isGit()
+
+ Reviewed by Tor Arne Vestbø.
+
+ Added missing else case with early return.
+
+ * Scripts/VCSUtils.pm:
+
+2012-10-16 Simon Hausmann <simon.hausmann@digia.com>, Tor Arne Vestbø <tor.arne.vestbo@digia.com>
+
+ [Qt] Add logic for triggering clean builds on changes to build system files
+
+ Reviewed by Csaba Osztrogonác.
+
+ Re-use the existing logic that gives us a range between old and new SVN revision and
+ parse the summarized output of diff to see if any of the changed files include files
+ that are part of the Qt build system. If they change we likely need a clean build and
+ trigger it just to be on the safe side and reduce the amount of manual intervention
+ needed on the Qt build bots.
+
+ * Scripts/VCSUtils.pm:
+ * Scripts/webkitdirs.pm:
+ (buildQMakeProjects):
+
+2012-10-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ Fix the paths for QtGraphics related WebKit2 files.
+
+ Unreviewed update of watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-16 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ CSS and TouchAdjustment - I am watching you!
+
+ Unreviewed update of watchlist.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-16 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Silence C++11 warnings with older versions of clang
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ Some clang versions support -Wno-c++11-extensions and some use -Wno-c++0x-extensions.
+ We cater both :)
+
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2012-10-16 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2] Provide WKURL API for resolving the relative URL with the given base URL
+ https://bugs.webkit.org/show_bug.cgi?id=99317
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added API test for newly added WKURLCreateWithBaseURL().
+
+ * TestWebKitAPI/PlatformEfl.cmake:
+ * TestWebKitAPI/Tests/WebKit2/WKURL.cpp: Added.
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2012-10-16 Zan Dobersek <zandobersek@gmail.com>
+
+ [GTK] Decrease the Cario jhbuild dep version back to 1.10.2
+ https://bugs.webkit.org/show_bug.cgi?id=99443
+
+ Reviewed by Philippe Normand.
+
+ Crashes started to occur after the Cairo version in the JHBuild dependencies
+ was bumped up to 1.12.4. This change brings it back down to 1.10.2, which
+ worked fine.
+
+ * gtk/jhbuild.modules:
+
+2012-10-16 Szilard Ledan <szledan@inf.u-szeged.hu>
+
+ Separate WebKit2 instances use the same local storage
+ https://bugs.webkit.org/show_bug.cgi?id=89666
+
+ Reviewed by Simon Hausmann.
+
+ TestController has been modified to get the local storage from
+ DUMPRENDERTREE_TEMP environment variable. If it's undefined
+ then it works with the default directory. The aim is for the parallelly
+ started WTRs to use separate directories. It was implemented for WK1
+ long time ago and it works fine.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+
+2012-10-15 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Display page favicons in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=99265
+
+ Reviewed by Gyuyoung Kim.
+
+ Display current page favicon in the URL bar.
+ This uses the new favicon database API in
+ EFL WebKit2.
+
+ * MiniBrowser/efl/main.c:
+ (on_favicon_received):
+ (on_view_icon_changed):
+ (window_create):
+
+2012-10-15 Simon Fraser <simon.fraser@apple.com>
+
+ Update the url bar in MiniBrowser when getting the committed URL
+ https://bugs.webkit.org/show_bug.cgi?id=99388
+
+ Reviewed by Sam Weinig.
+
+ Fix both WK1 and WK2 window controllers to update the URL in the
+ text field when transitioning to the committed URL. This fixes
+ the URL when dragging local files into the window.
+
+ * MiniBrowser/mac/WK1BrowserWindowController.m:
+ (-[WK1BrowserWindowController webView:didCommitLoadForFrame:]):
+ * MiniBrowser/mac/WK2BrowserWindowController.m:
+ (-[WK2BrowserWindowController updateTextFieldFromURL:]):
+ (-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
+ (-[WK2BrowserWindowController updateCommittedURLForFrame:]):
+ (-[WK2BrowserWindowController didCommitLoadForFrame:]):
+
+2012-10-15 Ojan Vafai <ojan@chromium.org>
+
+ Don't show the content shell and android test bots for webkit ToT
+ https://bugs.webkit.org/show_bug.cgi?id=99380
+
+ Reviewed by Dirk Pranke.
+
+ Content shell used to coincidentally be skipped because it spelled WebKit correctly.
+ Now skip it explicitly. The Android bot is up and running, but only has a stub for
+ running tests. Skip it so we don't show a false error.
+ * TestResultServer/static-dashboards/builders.js:
+ (isChromiumWebkitTipOfTreeTestRunner):
+
+2012-10-15 Zoltan Horvath <zoltan@webkit.org>
+
+ Add MountainLion Performance-bot to the Performance bots waterfall link
+ https://bugs.webkit.org/show_bug.cgi?id=99378
+
+ Reviewed by Dirk Pranke.
+
+ Add MountainLion Performance-bot to the Performance bots waterfall link on the buildbots frontpage.
+
+ * BuildSlaveSupport/build.webkit.org-config/templates/root.html:
+
+2012-10-15 Yael Aharon <yael.aharon@intel.com>
+
+ [EFL][WK2] Cannot set evas engine from command line
+ https://bugs.webkit.org/show_bug.cgi?id=99286
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ If an engine name is passed on the command line, pass it along to evas.
+
+ * MiniBrowser/efl/main.c:
+ (elm_main):
+
+2012-10-15 Ojan Vafai <ojan@chromium.org>
+
+ Lower the minimum time required to keep a test in the test results json
+ https://bugs.webkit.org/show_bug.cgi?id=99346
+
+ Reviewed by Eric Seidel.
+
+ On the run-webkit-tests side, we floor the time. So, 5 seconds is too close to
+ the 6 second timeout. Lower the time so that we can get a better sense of tests
+ that are close to timing out.
+
+ * TestResultServer/model/jsonresults.py:
+ * TestResultServer/model/jsonresults_unittest.py:
+ (JsonResultsTest.test_merge_keep_test_with_all_pass_but_slow_time):
+
+2012-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131306 and r131307.
+ http://trac.webkit.org/changeset/131306
+ http://trac.webkit.org/changeset/131307
+ https://bugs.webkit.org/show_bug.cgi?id=99354
+
+ It made layout testing extremely slow again (Requested by
+ Ossy_night on #webkit).
+
+ * WebKitTestRunner/Target.pri:
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::WrapperWindow::handleStatusChanged):
+ (WTR::PlatformWebView::windowSnapshotImage):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131327.
+ http://trac.webkit.org/changeset/131327
+ https://bugs.webkit.org/show_bug.cgi?id=99353
+
+ broke the build (Requested by danakj|gardening on #webkit).
+
+ * DumpRenderTree/chromium/TestEventPrinter.cpp:
+ * DumpRenderTree/chromium/TestEventPrinter.h:
+ (TestEventPrinter):
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump):
+
+2012-10-15 Kenichi Ishibashi <bashi@chromium.org>
+
+ [WebSocket] Update pywebsocket to 0.7.8
+ https://bugs.webkit.org/show_bug.cgi?id=99293
+
+ Reviewed by Yuta Kitamura.
+
+ Version 0.7.8 supports WebSocket frames and messages compression
+ with blocks in which BFINAL bit is set to 1.
+ We need this feature to add a test case of compression extension.
+
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py:
+ (DeflateFrameExtensionProcessor.__init__):
+ (DeflateFrameExtensionProcessor.set_bfinal):
+ (DeflateFrameExtensionProcessor._outgoing_filter):
+ (DeflateMessageProcessor.__init__):
+ (DeflateMessageProcessor.set_bfinal):
+ (DeflateMessageProcessor._process_outgoing_message):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py:
+ (_Deflater.compress_and_finish):
+ (_RFC1979Deflater.filter):
+
+2012-10-15 Zan Dobersek <zandobersek@gmail.com>
+
+ [TestResultServer] TestExpectations should only be loaded for the flakiness dashboard
+ https://bugs.webkit.org/show_bug.cgi?id=99245
+
+ Reviewed by Ojan Vafai.
+
+ Only load the TestExpectations when using the flakiness dashboard. Other dashboards
+ don't need them so there's no reason to load them.
+
+ * TestResultServer/static-dashboards/dashboard_base.js:
+ (isFlakinessDashboard):
+ (appendJSONScriptElements):
+
+2012-10-15 Zoltan Horvath <zoltan@webkit.org>
+
+ [chromium] Provide used JSHeap size in chromium's DRT for pageloadtest memory measurements
+ https://bugs.webkit.org/show_bug.cgi?id=99288
+
+ Reviewed by Ryosuke Niwa.
+
+ Provide used JSHeap size as we did it for the Apple port.
+
+ * DumpRenderTree/chromium/TestEventPrinter.cpp:
+ (TestEventPrinter::handleDumpMemoryHeader): Add new function to print the JSHeap memory result.
+ * DumpRenderTree/chromium/TestEventPrinter.h:
+ (TestEventPrinter): handleDumpMemoryHeader declaration.
+ * DumpRenderTree/chromium/TestShell.cpp:
+ (TestShell::dump): Dump JSHeap value.
+
+2012-10-15 George Staikos <staikos@webkit.org>
+
+ [BlackBerry] Adapt to Platform API changes in string handling
+ https://bugs.webkit.org/show_bug.cgi?id=99248
+
+ Reviewed by Yong Li.
+
+ Convert usage of WebString, char* and std::string to BlackBerry::Platform::String.
+
+ * DumpRenderTree/blackberry/DumpRenderTree.cpp:
+ (BlackBerry::WebKit::DumpRenderTree::runTest):
+ * DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp:
+ (LoadHTMLStringItem::invoke):
+ (ScriptItem::invoke):
+
+2012-10-15 Kangil Han <kangil.han@samsung.com>
+
+ [EFL][EWebLauncher] Add encoding detector option.
+ https://bugs.webkit.org/show_bug.cgi?id=98726
+
+ Reviewed by Gyuyoung Kim.
+
+ Added an option to test WebCore's encoding detector functionality on EWebLauncher.
+ With this patch, EWebLauncher would display text correctly even if web page wouldn't specify charset information.
+
+ * EWebLauncher/main.c:
+ (_User_Arguments):
+ (windowCreate):
+ (parseUserArguments):
+
+2012-10-15 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Build fix for Mac debug build.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Implement pixel snapshot generation in WTR
+ https://bugs.webkit.org/show_bug.cgi?id=95992
+
+ Reviewed by Jocelyn Turcotte.
+
+ Switch the Qt implementation of the PlatformWebView to use
+ QQuickWindow::grabWindow to generate the pixel results. This way
+ we will go through the scenegraph and test the actual rendering backend.
+ We use QQuickWindowPrivate::setRenderWithoutShowing to avoid the need of
+ showing the window.
+
+ * WebKitTestRunner/Target.pri: Had to added a bunch
+ of modules to be able to use QQuickWindowPrivate.
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::WrapperWindow::handleStatusChanged):
+ (WTR::PlatformWebView::windowSnapshotImage):
+
+2012-10-15 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WTR] Do a forced repaint before generating pixel results
+ https://bugs.webkit.org/show_bug.cgi?id=98654
+
+ Reviewed by Jocelyn Turcotte.
+
+ Do a forced repaint before grabbing the pixel snapshot. This extra
+ synchronisation is necessary with the CoordinatedGraphics rendering
+ backend because it has a fully asynchronous nature. This patch make
+ us using the window snapshot for pixel results which is necessary to
+ capture animations and other dynamic content. The actual grabbing of
+ the window has not been implemented in this patch. It will come in
+ a follow-up.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::dump): Store results in member variables.
+ Don't close output channels yet.
+ (WTR::TestInvocation::dumpResults): Added. This is where we dump
+ the results if no error happened.
+ (WTR):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::windowSnapshotImage):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::forceRepaintDoneCallback):
+ (WTR):
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-15 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Separate Qt WebKit into Qt WebKit and Qt WebKit Widgets
+ https://bugs.webkit.org/show_bug.cgi?id=88162
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Rename the QtWebKit module to QtWebKitWidgets.
+
+ * DumpRenderTree/qt/DumpRenderTree.pro:
+ * MiniBrowser/qt/MiniBrowser.pro:
+ * MiniBrowser/qt/raw/Target.pri:
+ * QtTestBrowser/QtTestBrowser.pro:
+ * Scripts/webkitpy/layout_tests/port/qt.py:
+ (QtPort._path_to_webcore_library):
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/Target.pri:
+ * qmake/mkspecs/features/default_post.prf:
+ * qmake/mkspecs/features/webkit_modules.prf:
+ * qmake/mkspecs/features/win32/default_post.prf:
+
+2012-10-11 Kinuko Yasuda <kinuko@chromium.org>
+
+ [chromium] Removes unnecessary dependencies in DumpRenderTree.gyp
+ https://bugs.webkit.org/show_bug.cgi?id=99132
+
+ Reviewed by Kent Tamura.
+
+ Removing webkit_support:blob dependency for DumpRenderTree target as it doesn't seem necessary.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-10-15 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt][WK2] Buildfix for newer Qt5.
+ https://bugs.webkit.org/show_bug.cgi?id=99303
+
+ Reviewed by Simon Hausmann.
+
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::resizeTo):
+
+2012-10-14 Jon Lee <jonlee@apple.com>
+
+ Allow notification origin permission request when no js callback is provided
+ https://bugs.webkit.org/show_bug.cgi?id=63615
+ <rdar://problem/11059590>
+
+ Reviewed by Sam Weinig.
+
+ Teach DRT to look at the existing entries in the permission hash map when permission is requested.
+
+ * DumpRenderTree/mac/MockWebNotificationProvider.h: Expose policyForOrigin.
+ * DumpRenderTree/mac/MockWebNotificationProvider.mm:
+ (-[MockWebNotificationProvider setWebNotificationOrigin:permission:]):
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:decidePolicyForNotificationRequestFromOrigin:listener:]): Look at whether a
+ policy for the origin already exists. If so, accept or deny the request as appropriate. Otherwise,
+ accept by default.
+
+2012-10-13 Zan Dobersek <zandobersek@gmail.com>
+
+ [TestResultServer] Unit tests require an update after r131239
+ https://bugs.webkit.org/show_bug.cgi?id=99236
+
+ Reviewed by Ojan Vafai.
+
+ Replacing 'Webkit' with 'WebKit' in builder names througout the unit tests
+ after the Chromium builders have been renamed recently.
+
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
+
+2012-10-12 Zan Dobersek <zandobersek@gmail.com>
+
+ [TestResultServer] Add support for non-Chromium TestExpectations files
+ https://bugs.webkit.org/show_bug.cgi?id=98422
+
+ Reviewed by Ojan Vafai.
+
+ Loads TestExpectations files for several other non-Chromium ports, parses them and
+ properly distributes them per various platforms.
+
+ * TestResultServer/static-dashboards/dashboard_base.js: g_expectations is replaced by
+ g_expectationsByPlatform, an object that holds raw TestExpectations file contents for
+ various platforms.
+ (requestExpectationsFiles): First traverses through the platforms tree to gather all
+ the TestExpectations files that should be loaded, then loads them in parallel.
+ (appendJSONScriptElements):
+ * TestResultServer/static-dashboards/flakiness_dashboard.js: The platforms tree is reorganized
+ to describe each platform and possible subplatforms plainly yet in detail. The PLATFORM_FALLBACKS
+ object is removed as it's not used anywhere. g_allTestsByPlatformAndBuildType is now filled by
+ traversing the platforms tree.
+ (traversePlatformsTree.traverse):
+ (traversePlatformsTree): A helper function that traverses the platforms tree, invoking
+ callback on each leaf node.
+ (determineWKPlatform): A helper function to determine whether the builder is running WebKit1 or
+ WebKit2 layer of a given platform.
+ (chromiumPlatform): Chromium-specific platforms are now properly prefixed with 'CHROMIUM_'.
+ (TestTrie): A new class that holds all the tests in a trie. The trie is constructed by iterating
+ through the tests for each builder, adding each test to the trie.
+ (TestTrie.prototype.forEach.traverse):
+ (TestTrie.prototype.forEach): A helper function that traverses the tests trie, invoking callback on each leaf.
+ (TestTrie.prototype._addTest): Aligns the test into the specified trie based on the test's path.
+ (getAllTestsTrie): Instead of in list, the problematic tests from each builder are now stored in a trie.
+ (individualTestsForSubstringList): Modified to traverse the trie instead of iterating the list.
+ (allTestsWithResult): Ditto.
+ (platformObjectForName): Splits the platform name by underscores and finds the appropriate platform object.
+ (getParsedExpectations): Now operates on the passed-in parameter rather than on a global variable.
+ (addTestToAllExpectationsForPlatform): Links expectations and modifiers to the test on the specified platform
+ and any build type the modifiers might apply to (or all build types if there are no such modifiers).
+ (processExpectationsForPlatform): Determines if the expectation should actually be processed for the given
+ platform by checking if any platform's fallback platforms support platform modifier unions and if any modifiers
+ represent such an union. If so, the expectation is then only processed if the given platform is in the union
+ the modifier presents or there are no such modifiers.
+ (processExpectations): Processes all acquired expectations by traversing the platforms tree and taking into
+ account possible fallback platforms.
+ (processTestRunsForBuilder):
+ (realModifiers.return.modifiers.filter):
+ (realModifiers): Modifiers other than build configurations and bug handles are now filtered out only if they
+ are present in the platform's platform modifier unions or represent subplatforms of a platform that supports
+ platform modifier unions.
+ * TestResultServer/static-dashboards/flakiness_dashboard_unittests.js: The test cases are updated and expanded
+ where necessary to cover the changes.
+ (resetGlobals):
+ (test): Added a TestTrie test.
+
+2012-10-12 Dirk Pranke <dpranke@chromium.org>
+
+ Update chromium bot names in garden-o-matic.
+
+ Unreviewed, build fix.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+
+2012-10-12 Ojan Vafai <ojan@chromium.org>
+
+ Fix bot name filters now that the Chromium bots have been renamed.
+ * TestResultServer/static-dashboards/builders.js:
+ (isChromiumWebkitTipOfTreeTestRunner):
+ (isChromiumWebkitDepsTestRunner):
+ (isChromiumTipOfTreeGTestRunner):
+
+2012-10-12 Dirk Pranke <dpranke@chromium.org>
+
+ [chromium] add ML bot and update bot names
+ https://bugs.webkit.org/show_bug.cgi?id=99209
+
+ Reviewed by Eric Seidel.
+
+ This change adds proper baseline support for Mac10.8 (Mountain
+ Lion or ML) to chromium and updates the bot names from "Webkit"
+ to "WebKit" and ensures that all the bots have the OS version in
+ the name on Mac and Win.
+
+ We don't yet include a ML bot in garden-o-matic since it isn't
+ green yet.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders_unittests.js:
+ (.):
+ * Scripts/webkitpy/layout_tests/port/builders.py:
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort):
+ * Scripts/webkitpy/layout_tests/port/factory_unittest.py:
+ (FactoryTest.test_get_from_builder_name):
+ * Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
+ (TestRebaseline.test_baseline_directory):
+ (TestRebaseline.test_rebaseline_updates_expectations_file_noop):
+ (test_rebaseline_updates_expectations_file):
+ (test_rebaseline_does_not_include_overrides):
+ (test_rebaseline_test):
+ (test_rebaseline_test_and_print_scm_changes):
+ (test_rebaseline_and_copy_test):
+ (test_rebaseline_and_copy_test_with_lion_result):
+ (test_rebaseline_and_copy_no_overwrite_test):
+ (test_rebaseline_expectations):
+ * Scripts/webkitpy/tool/servers/gardeningserver_unittest.py:
+ (BuildCoverageExtrapolatorTest.test_extrapolate):
+
+2012-10-12 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [Qt][WK2] REGRESSION(r131057): It made plugins/plugin-document-back-forward.html timeout
+ https://bugs.webkit.org/show_bug.cgi?id=99152
+
+ Reviewed by Simon Fraser.
+
+ Even though Response was already checked in WTR WKBundlePagePolicyClient decidePolicyForResponse callback,
+ this check did not take plugins into consideration when deciding whether we can show the given MIME type or not
+ so added another check in WTR UI process which also includes plugins.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::decidePolicyForResponse):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+
+2012-10-12 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Add tests of WebSocketEnabled preference
+ https://bugs.webkit.org/show_bug.cgi?id=84982
+
+ Reviewed by Yong Li.
+
+ PR 209265.
+
+ Allow WebSocketsEnabled preference setting.
+
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::overridePreference):
+
+2012-10-12 Tommy Widenflycht <tommyw@google.com>
+
+ Creating a MediaStream subscription in watchlist
+ https://bugs.webkit.org/show_bug.cgi?id=99172
+
+ Reviewed by Yuta Kitamura.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-12 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131160.
+ http://trac.webkit.org/changeset/131160
+ https://bugs.webkit.org/show_bug.cgi?id=99163
+
+ "It should not be landed without it's follow-up because it
+ break pixal and ref tests without it." (Requested by kbalazs
+ on #webkit).
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::windowSnapshotImage):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-12 Jochen Eisinger <jochen@chromium.org>
+
+ Create a separate gyp target for dependencies of DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=99023
+
+ Reviewed by Tony Chang.
+
+ This allows for pulling in the fonts and helpers required to run layout
+ tests in the content_shell without depending on DumpRenderTree.
+
+ * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
+
+2012-10-12 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt][WTR] Do a forced repaint before generating pixel results
+ https://bugs.webkit.org/show_bug.cgi?id=98654
+
+ Reviewed by Jocelyn Turcotte.
+
+ Do a forced repaint before grabbing the pixel snapshot. This extra
+ synchronisation is necessary with the CoordinatedGraphics rendering
+ backend because it has a fully asynchronous nature. This patch make
+ us using the window snapshot for pixel results which is necessary to
+ capture animations and other dynamic content. The actual grabbing of
+ the window has not been implemented in this patch. It will come in
+ a follow-up.
+
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::invoke):
+ (WTR::TestInvocation::dump): Store results in member variables.
+ Don't close output channels yet.
+ (WTR::TestInvocation::dumpResults): Added. This is where we dump
+ the results if no error happened.
+ (WTR):
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+ * WebKitTestRunner/TestInvocation.h:
+ (TestInvocation):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ (WTR::PlatformWebView::windowSnapshotImage):
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::forceRepaintDoneCallback):
+ (WTR):
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-12 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed compile error fix for chromium windows bot.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-12 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Another unreviewed fix for clang builders.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-12 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Unreviewed compile error fix for clang builders.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-11 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: NMI move instrumentation tests from chromium test set to the cross platform test set.
+ https://bugs.webkit.org/show_bug.cgi?id=99046
+
+ Reviewed by Yury Semikhatsky.
+
+ * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
+
+2012-10-11 Takashi Sakamoto <tasak@google.com>
+
+ [WebKit IDL] remove all module from idl files.
+ https://bugs.webkit.org/show_bug.cgi?id=99007
+
+ Reviewed by Kentaro Hara.
+
+ Since current WebIDL spec doesn't support "module", remove
+ module from all idl files.
+
+ No new tests. I ran run-bindings-tests and no error was reported.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/GCController.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl:
+ Removed "module".
+
+2012-10-11 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r131107.
+ http://trac.webkit.org/changeset/131107
+ https://bugs.webkit.org/show_bug.cgi?id=99126
+
+ Causes an ASSERT (Requested by abarth|gardening on #webkit).
+
+ * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
+ (AccessibilityController::getAccessibleElementById):
+ * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
+ (AccessibilityUIElement::titleUIElementCallback):
+
+2012-10-11 Seokju Kwon <seokju.kwon@samsung.com>
+
+ [EFL][WK2] Add support for Inspector
+ https://bugs.webkit.org/show_bug.cgi?id=98639
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Enable developer extensions when browser is created.
+ And Inspector can be opened by pressing Ctrl+i on browser.
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (window_create):
+
+2012-10-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ [EFL] Remove "web" word in web inspector
+ https://bugs.webkit.org/show_bug.cgi?id=98724
+
+ Reviewed by Laszlo Gombos.
+
+ *web* word is redundant in web inspector. Beside r130494 and r130479 removed *web* from EFL WK2.
+
+ * DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
+ (DumpRenderTreeChrome::createInspectorView):
+ (DumpRenderTreeChrome::removeInspectorView):
+ (DumpRenderTreeChrome::waitInspectorLoadFinished):
+ (DumpRenderTreeChrome::onInspectorViewCreate):
+ (DumpRenderTreeChrome::onInspectorViewClose):
+ (DumpRenderTreeChrome::onInspectorFrameLoadFinished):
+ * DumpRenderTree/efl/DumpRenderTreeChrome.h:
+ (DumpRenderTreeChrome):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::showWebInspector):
+ (TestRunner::closeWebInspector):
+ * EWebLauncher/main.c:
+ (on_inspector_ecore_evas_resize):
+ (on_key_down):
+ (on_inspector_view_create):
+ (on_inspector_view_close):
+ (on_inspector_view_destroyed):
+ (browserCreate):
+ (webInspectorCreate):
+ (closeWindow):
+ (main_signal_exit):
+
+2012-10-11 Timothy Hatcher <timothy@apple.com>
+
+ Unreviewed watch list addition for Inspector.json.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-11 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: labelForElement is slow when there are a lot of DOM elements
+ https://bugs.webkit.org/show_bug.cgi?id=97825
+
+ Reviewed by Ryosuke Niwa.
+
+ Implement titleUIElement in the chromium port of DRT, and
+ fix getAccessibleElementById so that it ensures the backing store
+ is up-to-date.
+
+ * DumpRenderTree/chromium/TestRunner/AccessibilityControllerChromium.cpp:
+ (AccessibilityController::getAccessibleElementById):
+ * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
+ (AccessibilityUIElement::titleUIElementCallback):
+
+2012-10-11 Dirk Pranke <dpranke@chromium.org>
+
+ test-webkitpy runs individual tests twice
+ https://bugs.webkit.org/show_bug.cgi?id=99098
+
+ Reviewed by Adam Barth.
+
+ If you were to run 'test-webkitpy webkitpy.test.main_unittests.TesterTests.test_no_tests_found',
+ it would actually run the test twice. This fixes that.
+
+ * Scripts/webkitpy/test/main.py:
+ (Tester._parse_args):
+ (Tester._test_names):
+ * Scripts/webkitpy/test/main_unittest.py:
+ (TesterTest.test_no_tests_found):
+ (TesterTest):
+ (TesterTest.test_individual_names_are_not_run_twice):
+
+2012-10-11 Xianzhu Wang <wangxianzhu@chromium.org>
+
+ [Chromium-Android] Exception when the layout test driver is stopped
+ https://bugs.webkit.org/show_bug.cgi?id=99084
+
+ Reviewed by Dirk Pranke.
+
+ On chromium-android, the process is killed directly in ServerProcess.stop() as the pipes are closed first.
+ Should not try to read data from the pipes after the process is killed.
+
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ (ServerProcess.stop): Don't read data after the process is killed.
+
+2012-10-11 Mario Sanchez Prada <msanchez@igalia.com>
+
+ [GTK] REGRESSION(r131033): Favicons don't work in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=99019
+
+ Reviewed by Carlos Garcia Campos.
+
+ Enable the favicons database by specifying the default path for
+ the directory where the actual data will be stored.
+
+ * MiniBrowser/gtk/main.c:
+ (main): Set the default directory for the favicon database calling
+ webkit_web_context_set_favicon_database_directory().
+
+2012-10-11 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [EFL][WK2] NWTR should launch MiniBrowser instead of EWebLauncher after test run
+ https://bugs.webkit.org/show_bug.cgi?id=99075
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Pass the '-2' flag when executing run-launcher script after
+ testing with WebKitTestRunner.
+
+ * Scripts/webkitpy/layout_tests/port/efl.py:
+ (EflPort.show_results_html_file):
+
+2012-10-11 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add support for Javascript popup boxes to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=99021
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add support for JavaScript popups (alert, confirm, prompt)
+ to MiniBrowser.
+
+ * MiniBrowser/efl/main.c:
+ (miniBrowserViewSmartClass):
+ (browser_view_find):
+ (quit_event_loop):
+ (on_ok_clicked):
+ (on_javascript_alert):
+ (on_javascript_confirm):
+ (on_javascript_prompt):
+ (window_create):
+ (elm_main):
+
+2012-10-11 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL][jhbuild] Disable elm-web in elementary
+ https://bugs.webkit.org/show_bug.cgi?id=99005
+
+ Reviewed by Laszlo Gombos.
+
+ * efl/jhbuild.modules: Added --disable-web to elementary.
+
+2012-10-11 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ REGRESSION (r129478-r129480): http/tests/loading/text-content-type-with-binary-extension.html failing on Apple MountainLion Debug WK2 (Tests)
+ https://bugs.webkit.org/show_bug.cgi?id=98527
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added decidePolicyForResponse callback for WTR PagePolicyClient.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::initialize):
+ (WTR::TestController::decidePolicyForResponse):
+ (WTR):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+
+2012-10-11 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] Make sure that -Wno-c++0x-compat is set even with production_build
+
+ Reviewed by Simon Hausmann.
+
+ This makes sure that QtWebKit can be built inside Qt without nullptr
+ and narrowing warnings producing noise during compilation.
+
+ * qmake/mkspecs/features/unix/default_post.prf:
+
+2012-10-11 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] Revisit setting API names and documentation
+ https://bugs.webkit.org/show_bug.cgi?id=98793
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Make frame flattening setting APIs to be consistent with others.
+
+ * MiniBrowser/efl/main.c:
+ (window_create):
+
+2012-10-11 Vivek Galatage <vivekgalatage@gmail.com>
+
+ Fix committers.py for the names of contributors to appear on webkit.org/team.html
+ https://bugs.webkit.org/show_bug.cgi?id=99004
+
+ Reviewed by Yuta Kitamura
+
+ Some of the nicknames in the committers.py file are using the single quotes (')
+ but while parsing these, JSON throws an error: Single quotes (') are not allowed in JSON
+ Hence coverting these single quotes to (") so as the contributor names appear properly
+ on http://www.webkit.org/team.html
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-10 Lucas Forschler <lforschler@apple.com>
+
+ Remove Apple Mac Snow Leopard bots.
+
+ * BuildSlaveSupport/build.webkit.org-config/config.json:
+
+2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add toolbar buttons to MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98883
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add toolbar buttons to MiniBrowser to support
+ navigation back / forward, refresh and go
+ to home page.
+
+ * MiniBrowser/efl/main.c:
+ (_Browser_Window):
+ (on_back_forward_list_changed):
+ (on_back_button_clicked):
+ (on_forward_button_clicked):
+ (on_refresh_button_clicked):
+ (on_home_button_clicked):
+ (create_toolbar_button):
+ (window_create):
+
+2012-10-10 Andy Estes <aestes@apple.com>
+
+ Fix the Lion build after r130948.
+
+ * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm:
+
+2012-10-10 Andy Estes <aestes@apple.com>
+
+ Speculative build fix for Snow Leopard after r130948.
+
+ * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: Pull the
+ declaration of backgroundColorQuery out of a block to appease GCC.
+
+2012-10-10 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com>
+
+ [WK2][WTR] WebKitTestRunner UI process should be aware of Custom Policy Delegate
+ https://bugs.webkit.org/show_bug.cgi?id=95974
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added TestController::decidePolicyForNavigationAction() function as a 'decidePolicyForNavigationAction' WKPagePolicyClient callback
+ for WTR UI process. WTR bundle client notifies UI process about Custom Policy Delegate via newly added message,
+ so that TestController is aware of whether Custom Policy Delegate as enabled and
+ permissive. This data is used then in TestController::decidePolicyForNavigationAction for making policy decision.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::setCustomPolicyDelegate):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setCustomPolicyDelegate):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::TestController):
+ (WTR::TestController::initialize):
+ (WTR::TestController::resetStateToConsistentValues):
+ (WTR::TestController::setCustomPolicyDelegate):
+ (WTR):
+ (WTR::TestController::decidePolicyForNavigationAction):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+
+2012-10-10 Zoltan Horvath <zoltan@webkit.org>
+
+ Pageload tests should measure memory usage
+ https://bugs.webkit.org/show_bug.cgi?id=93958
+
+ Reviewed by Ryosuke Niwa.
+
+ Add JS Heap and Heap memory measurement to PageLoad tests.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (dump): Print memory results with DRT.
+ * Scripts/old-run-webkit-tests:
+ (readFromDumpToolWithTimer): Hadle memory results.
+ * Scripts/webkitpy/layout_tests/port/driver.py:
+ (DriverOutput.__init__): Add new parameter for the results.
+ (Driver.__init__): Initialize the new parameter.
+ (Driver.run_test):
+ (Driver._read_first_block): Add support for the new headers.
+ (Driver._process_stdout_line):
+ (ContentBlock.__init__):
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PageLoadingPerfTest.calculate_statistics): Move statistics calculation into a function.
+ (PageLoadingPerfTest.run): Handle the new memory results.
+ (PageLoadingPerfTest.run.in):
+ (PageLoadingPerfTest):
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py: Add test for memory results of pageloadtests.
+ (TestPageLoadingPerfTest.MockDriver.__init__):
+ (TestPageLoadingPerfTest.MockDriver.run_test):
+ (TestPageLoadingPerfTest.test_run_with_memory_output):
+
+2012-10-04 Andy Estes <aestes@apple.com>
+
+ [WebKit2] Create an API for adding and removing user stylesheets from a page group
+ https://bugs.webkit.org/show_bug.cgi?id=98432
+
+ Reviewed by Sam Weinig.
+
+ Add three new API tests:
+
+ - Test adding a user stylesheet before a page is created. This tests
+ the code path where the sheet is sent to the web process as part of
+ the new page's WebPageCreationParameters.
+ - Test adding a user stylesheet after a page is created. This tests the
+ code patch where the sheet is sent as a separate message to all
+ processes containing the given page group.
+ - Test removing all user stylesheets.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2ObjC/UserContentTest.mm: Added.
+ (-[UserContentTestLoadDelegate initWithBlockToRunOnLoad:]):
+ (-[UserContentTestLoadDelegate browsingContextControllerDidFinishLoad:]):
+ (expectScriptValue):
+ * TestWebKitAPI/Tests/WebKit2ObjC/WKBrowsingContextGroupTest.mm:
+
+2012-10-10 Dan Bernstein <mitz@apple.com>
+
+ Changed debug-safari, debug-minibrowser and debug-test-runner to use LLDB by default when
+ using Xcode 4.5 or later.
+
+ Reviewed by Anders Carlsson.
+
+ * Scripts/webkitdirs.pm:
+ (determineDebugger): Changed the default debugger from GDB to LLDB when the Xcode version
+ is 4.5 or later. Added a --use-gdb switch for overriding this.
+ (printHelpAndExitForRunAndDebugWebKitAppIfNeeded): Updated to mention --use-gdb and the
+ how the default debugger choice depends on the Xcode version. Also changed the description
+ of --no-saved-state to use the same terminology Xcode’s scheme editor uses to describe this
+ option, and clarified to which OS X versions it applies.
+
+2012-10-10 Antonio Gomes <agomes@rim.com>
+
+ Unreviewed watch list addition.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-10 Dirk Pranke <dpranke@chromium.org>
+
+ NRWT crashes on too many timeouts
+ https://bugs.webkit.org/show_bug.cgi?id=97047
+
+ Reviewed by Tony Chang.
+
+ Apparently if you kill a subprocess directly python doesn't
+ auto-close the file descriptors.
+
+ * Scripts/webkitpy/layout_tests/port/server_process.py:
+ (ServerProcess._reset):
+ * Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
+
+2012-10-10 Zan Dobersek <zandobersek@gmail.com>
+
+ [TestResultServer] Enable CORS for test files
+ https://bugs.webkit.org/show_bug.cgi?id=98918
+
+ Reviewed by Dirk Pranke.
+
+ Serve the JSON test files with the Access-Control-Allow-Origin
+ response header to enable cross-origin sharing of these files.
+ This eases up hacking on TestResultServer.
+
+ * TestResultServer/handlers/testfilehandler.py:
+ (GetFile._serve_json):
+
+2012-10-10 Andreas Kling <kling@webkit.org>
+
+ Future-proof the WTF.DoubleHashCollisions test.
+ <http://webkit.org/b/98853>
+
+ Reviewed by Anders Carlsson.
+
+ Add a check that the two keys that are supposed to clobber each other actually end up
+ in the same bucket with the DefaultHash<double> hash function.
+
+ * TestWebKitAPI/Tests/WTF/HashMap.cpp:
+ (TestWebKitAPI::bucketForKey):
+ (TestWebKitAPI):
+ (TestWebKitAPI::TEST):
+
+2012-10-10 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Test drivers should handle repaint rects
+ https://bugs.webkit.org/show_bug.cgi?id=68870
+
+ Reviewed by Zoltan Herczeg.
+
+ Implemented masking the area not covered by repaint rects.
+ This is equivalent with the implementation for Mac.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::dump):
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::display):
+ * WebKitTestRunner/qt/PlatformWebViewQt.cpp:
+ * WebKitTestRunner/qt/TestInvocationQt.cpp:
+ (WTR::TestInvocation::dumpPixelsAndCompareWithExpected):
+
+2012-10-10 Vivek Galatage <vivekgalatage@gmail.com>
+
+ [Qt]QtTestBrowser should have default url(google.com) when no command line args
+ https://bugs.webkit.org/show_bug.cgi?id=98880
+
+ Reviewed by Simon Hausmann.
+
+ Making QtTestBrowser use www.google.com as default url when no arguments are passed
+
+ * QtTestBrowser/qttestbrowser.cpp:
+ (main):
+
+2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Port MiniBrowser to Elementary
+ https://bugs.webkit.org/show_bug.cgi?id=98748
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Port MiniBrowser to Elementary to simplify the
+ code and make future improvements easier. The
+ URL bar is now an Elementary Entry widget and
+ supports additional functionality like copy /
+ paste.
+
+ * CMakeLists.txt:
+ * EWebLauncher/url_bar.c:
+ (on_urlbar_key_down): Remove WK2-specific code
+ now that this file is no longer used by MiniBrowser.
+ * MiniBrowser/efl/CMakeLists.txt:
+ * MiniBrowser/efl/main.c:
+ (_Browser_Window):
+ (window_free):
+ (window_close):
+ (view_focus_set):
+ (on_mouse_down):
+ (title_set):
+ (on_title_changed):
+ (on_url_changed):
+ (on_close_window):
+ (on_progress):
+ (quit):
+ (on_url_bar_activated):
+ (on_url_bar_clicked):
+ (on_window_deletion):
+ (window_create):
+ (elm_main):
+ * efl/jhbuild.modules: Add Elementary to jhbuild and bump
+ EFL dependencies to 1.7.
+
+2012-10-10 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][SOUP] ResourceError.isCancellation() is not carried over IPC
+ https://bugs.webkit.org/show_bug.cgi?id=98882
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Do not display the error page in MiniBrowser if the loading
+ error corresponds to a cancellation.
+
+ * MiniBrowser/efl/main.c:
+ (on_error):
+
+2012-10-09 Jocelyn Turcotte <jocelyn.turcotte@digia.com>
+
+ [Qt] WTR: Fix an assert triggered by EventSenderProxy::touchEnd
+ https://bugs.webkit.org/show_bug.cgi?id=98735
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ ASSERT: "itemForTouchPointId.isEmpty()" in file qt5/qtdeclarative/src/quick/items/qquickwindow.cpp, line 1563
+ This assert is caused by QQuickWindow not registering our TouchPointReleased
+ since it expects QTouchEvent::touchPointStates() to be filled by the event's sender.
+
+ This patch calculates the touchPointStates like QQuickWindowPrivate::touchEventWithPoints does.
+
+ * WebKitTestRunner/qt/EventSenderProxyQt.cpp:
+ (WTR::EventSenderProxy::sendTouchEvent):
+
+2012-10-10 Allan Sandfeld Jensen <allan.jensen@digia.com>
+
+ [Qt] DumpRenderTree needs a beginDragWithFiles implementation
+ https://bugs.webkit.org/show_bug.cgi?id=50902
+
+ Reviewed by Simon Hausmann.
+
+ Implement support for beginDragWithFiles. This function similates dragging without going
+ though regular event handling. Which allows us to test effects of dropping files on
+ different elements.
+
+ * DumpRenderTree/qt/EventSenderQt.cpp:
+ (EventSender::EventSender):
+ (EventSender::mouseUp):
+ (EventSender::mouseMoveTo):
+ (EventSender::beginDragWithFiles):
+ * DumpRenderTree/qt/EventSenderQt.h:
+ (EventSender):
+
+2012-10-10 KwangYong Choi <ky0.choi@samsung.com>
+
+ [EFL][WTR][CMake] Add a missing TestNetscapePlugin file
+ https://bugs.webkit.org/show_bug.cgi?id=98637
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ PluginScriptableObjectOverridesAllProperties.cpp is used during
+ plugins/npruntime/overrides-all-properties.html test introduced by r123936.
+
+ * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
+
+2012-10-10 Kenichi Ishibashi <bashi@chromium.org>
+
+ Update pywebsocket to 0.7.7
+ https://bugs.webkit.org/show_bug.cgi?id=98872
+
+ Reviewed by Yuta Kitamura.
+
+ This version contains server-side permessage-compress extension support.
+ We need this version to add tests for permessage-compress extension.
+
+ I confirmed all tests under http/tests/websocket passed.
+
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/__init__.py:
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hixie75.py:
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py:
+ (parse_frame):
+ (FragmentedFrameBuilder.__init__):
+ (FragmentedFrameBuilder.build):
+ (create_closing_handshake_body):
+ (StreamOptions.__init__):
+ (Stream.__init__):
+ (Stream._receive_frame._receive_bytes):
+ (Stream._receive_frame):
+ (Stream.receive_filtered_frame):
+ (Stream.send_message):
+ (Stream._get_message_from_frame):
+ (Stream):
+ (Stream._process_close_message):
+ (Stream._process_ping_message):
+ (Stream._process_pong_message):
+ (Stream.receive_message):
+ (Stream._send_closing_handshake):
+ (Stream.get_last_received_opcode):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py:
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py:
+ (Dispatcher.transfer_data):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py:
+ (ExtensionProcessorInterface.name):
+ (DeflateStreamExtensionProcessor):
+ (DeflateStreamExtensionProcessor.name):
+ (_log_compression_ratio):
+ (_log_decompression_ratio):
+ (DeflateFrameExtensionProcessor):
+ (DeflateFrameExtensionProcessor.name):
+ (DeflateFrameExtensionProcessor._outgoing_filter):
+ (DeflateFrameExtensionProcessor._incoming_filter):
+ (CompressionExtensionProcessorBase):
+ (CompressionExtensionProcessorBase.for):
+ (CompressionExtensionProcessorBase.__init__):
+ (CompressionExtensionProcessorBase.name):
+ (CompressionExtensionProcessorBase._get_compression_processor_response):
+ (CompressionExtensionProcessorBase.set_compression_processor_hook):
+ (PerFrameCompressionExtensionProcessor):
+ (PerFrameCompressionExtensionProcessor.__init__):
+ (PerFrameCompressionExtensionProcessor.name):
+ (PerFrameCompressionExtensionProcessor._lookup_compression_processor):
+ (DeflateMessageProcessor):
+ (DeflateMessageProcessor.__init__):
+ (DeflateMessageProcessor.name):
+ (DeflateMessageProcessor.get_extension_response):
+ (DeflateMessageProcessor.setup_stream_options):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingMessageFilter):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingMessageFilter.__init__):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingMessageFilter.filter):
+ (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter):
+ (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter.__init__):
+ (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter.decompress_next_message):
+ (DeflateMessageProcessor.setup_stream_options._IncomingMessageFilter.filter):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter.__init__):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter.set_compression_bit):
+ (DeflateMessageProcessor.setup_stream_options._OutgoingFrameFilter.filter):
+ (DeflateMessageProcessor.setup_stream_options._IncomingFrameFilter):
+ (DeflateMessageProcessor.setup_stream_options._IncomingFrameFilter.__init__):
+ (DeflateMessageProcessor.setup_stream_options._IncomingFrameFilter.filter):
+ (DeflateMessageProcessor.set_c2s_max_window_bits):
+ (DeflateMessageProcessor.set_c2s_no_context_takeover):
+ (DeflateMessageProcessor.enable_outgoing_compression):
+ (DeflateMessageProcessor.disable_outgoing_compression):
+ (DeflateMessageProcessor._process_incoming_message):
+ (DeflateMessageProcessor._process_outgoing_message):
+ (DeflateMessageProcessor._process_incoming_frame):
+ (DeflateMessageProcessor._process_outgoing_frame):
+ (PerMessageCompressionExtensionProcessor):
+ (PerMessageCompressionExtensionProcessor.__init__):
+ (PerMessageCompressionExtensionProcessor.name):
+ (PerMessageCompressionExtensionProcessor._lookup_compression_processor):
+ (MuxExtensionProcessor):
+ (MuxExtensionProcessor.__init__):
+ (MuxExtensionProcessor.name):
+ (MuxExtensionProcessor.get_extension_response):
+ (MuxExtensionProcessor.setup_stream_options):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/__init__.py:
+ (do_handshake):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py:
+ (validate_subprotocol):
+ (check_request_line):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/draft75.py: Removed.
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py:
+ (Handshaker.do_handshake):
+ (Handshaker._set_protocol):
+ (Handshaker._create_stream):
+ (Handshaker):
+ (Handshaker._create_handshake_response):
+ (Handshaker._send_handshake):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py:
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/msgutil.py:
+ (send_message):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py: Added.
+ (MuxUnexpectedException):
+ (MuxNotImplementedException):
+ (LogicalConnectionClosedException):
+ (PhysicalConnectionError):
+ (PhysicalConnectionError.__init__):
+ (LogicalChannelError):
+ (LogicalChannelError.__init__):
+ (_encode_channel_id):
+ (_encode_number):
+ (_create_add_channel_response):
+ (_create_drop_channel):
+ (_create_flow_control):
+ (_create_new_channel_slot):
+ (_create_fallback_new_channel_slot):
+ (_parse_request_text):
+ (_ControlBlock):
+ (_ControlBlock.__init__):
+ (_MuxFramePayloadParser):
+ (_MuxFramePayloadParser.that):
+ (_MuxFramePayloadParser.__init__):
+ (_MuxFramePayloadParser.read_channel_id):
+ (_MuxFramePayloadParser.read_inner_frame):
+ (_MuxFramePayloadParser._read_number):
+ (_MuxFramePayloadParser._read_size_and_contents):
+ (_MuxFramePayloadParser._read_add_channel_request):
+ (_MuxFramePayloadParser._read_add_channel_response):
+ (_MuxFramePayloadParser._read_flow_control):
+ (_MuxFramePayloadParser._read_drop_channel):
+ (_MuxFramePayloadParser._read_new_channel_slot):
+ (_MuxFramePayloadParser.read_control_blocks):
+ (_MuxFramePayloadParser.remaining_data):
+ (_LogicalRequest):
+ (_LogicalRequest.__init__):
+ (_LogicalRequest.is_https):
+ (_LogicalConnection):
+ (_LogicalConnection.__init__):
+ (_LogicalConnection.get_local_addr):
+ (_LogicalConnection.get_remote_addr):
+ (_LogicalConnection.get_memorized_lines):
+ (_LogicalConnection.write):
+ (_LogicalConnection.write_control_data):
+ (_LogicalConnection.notify_write_done):
+ (_LogicalConnection.append_frame_data):
+ (_LogicalConnection.read):
+ (_LogicalConnection.set_read_state):
+ (_LogicalStream):
+ (_LogicalStream.interprets):
+ (_LogicalStream.__init__):
+ (_LogicalStream._create_inner_frame):
+ (_LogicalStream._write_inner_frame):
+ (_LogicalStream.replenish_send_quota):
+ (_LogicalStream.consume_receive_quota):
+ (_LogicalStream.send_message):
+ (_LogicalStream._receive_frame):
+ (_LogicalStream.receive_message):
+ (_LogicalStream._send_closing_handshake):
+ (_LogicalStream.send_ping):
+ (_LogicalStream._send_pong):
+ (_LogicalStream.close_connection):
+ (_LogicalStream._drain_received_data):
+ (_OutgoingData):
+ (_OutgoingData.__init__):
+ (_PhysicalConnectionWriter):
+ (_PhysicalConnectionWriter.__init__):
+ (_PhysicalConnectionWriter.put_outgoing_data):
+ (_PhysicalConnectionWriter._write_data):
+ (_PhysicalConnectionWriter.run):
+ (_PhysicalConnectionWriter.stop):
+ (_PhysicalConnectionReader):
+ (_PhysicalConnectionReader.__init__):
+ (_PhysicalConnectionReader.run):
+ (_Worker):
+ (_Worker.__init__):
+ (_Worker.run):
+ (_MuxHandshaker):
+ (_MuxHandshaker.__init__):
+ (_MuxHandshaker._create_stream):
+ (_MuxHandshaker._create_handshake_response):
+ (_MuxHandshaker._send_handshake):
+ (_LogicalChannelData):
+ (_LogicalChannelData.__init__):
+ (_HandshakeDeltaBase):
+ (_HandshakeDeltaBase.that):
+ (_HandshakeDeltaBase.__init__):
+ (_HandshakeDeltaBase.create_headers):
+ (_MuxHandler):
+ (_MuxHandler.are):
+ (_MuxHandler.__init__):
+ (_MuxHandler.start):
+ (_MuxHandler.add_channel_slots):
+ (_MuxHandler.wait_until_done):
+ (_MuxHandler.notify_write_done):
+ (_MuxHandler.send_control_data):
+ (_MuxHandler.send_data):
+ (_MuxHandler._send_drop_channel):
+ (_MuxHandler._send_error_add_channel_response):
+ (_MuxHandler._create_logical_request):
+ (_MuxHandler._do_handshake_for_logical_request):
+ (_MuxHandler._add_logical_channel):
+ (_MuxHandler._process_add_channel_request):
+ (_MuxHandler._process_flow_control):
+ (_MuxHandler._process_drop_channel):
+ (_MuxHandler._process_control_blocks):
+ (_MuxHandler._process_logical_frame):
+ (_MuxHandler.dispatch_message):
+ (_MuxHandler.notify_worker_done):
+ (_MuxHandler.notify_reader_done):
+ (_MuxHandler.fail_physical_connection):
+ (_MuxHandler.fail_logical_channel):
+ (use_mux):
+ (start):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py:
+ (_StandaloneRequest.get_protocol):
+ (_StandaloneRequest):
+ (_alias_handlers):
+ (WebSocketServer.__init__):
+ (WebSocketServer._create_sockets):
+ (WebSocketServer.server_bind):
+ (WebSocketServer.server_activate):
+ (WebSocketRequestHandler.parse_request):
+ (_configure_logging):
+ (_build_option_parser):
+ (_main):
+ (_main.if):
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/stream.py:
+ * Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py:
+ (_Deflater.compress):
+ (_RFC1979Deflater.filter):
+
+2012-10-09 Damian Kaleta <dkaleta@apple.com>
+
+ extract-localizable-strings script should be able to handle paths to files containing whitespaces.
+ https://bugs.webkit.org/show_bug.cgi?id=98844
+
+ Reviewed by Dan Bernstein.
+
+ * Scripts/extract-localizable-strings: Added ability to handle whitespace.
+
+2012-10-09 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [Cairo] Bump Cairo to fix more canvas/philip tests
+ https://bugs.webkit.org/show_bug.cgi?id=97658
+
+ Reviewed by Martin Robinson.
+
+ Bumping cairo to version 1.12.4 which fixes more canvas/philip tests.
+
+ * efl/jhbuild.modules:
+ * gtk/jhbuild.modules:
+
+2012-10-09 Julien Chaffraix <jchaffraix@webkit.org>
+
+ Unreviewed Chromium Windows build fix after r130823.
+
+ * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
+ (roleToString): Re-added the 'default' label as some cases are not handled.
+
+2012-10-09 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Add drop event for plugins.
+ https://bugs.webkit.org/show_bug.cgi?id=98827
+
+ Reviewed by Adam Barth.
+
+ Update the test plugin to receive drop events.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::handleDragStatusUpdate):
+
+2012-10-09 Dominic Mazzoni <dmazzoni@google.com>
+
+ AX: 5 accessibility tests just need minor tweaks to pass on chromium
+ https://bugs.webkit.org/show_bug.cgi?id=98311
+
+ Reviewed by Chris Fleizach.
+
+ Update roleToString on Chromium to include all missing roles,
+ which enables some layout tests to pass.
+
+ * DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
+ (roleToString):
+
+2012-10-09 Dirk Pranke <dpranke@chromium.org>
+
+ webkit-patch rebaseline-expectations doesn't work w/o failures specified
+ https://bugs.webkit.org/show_bug.cgi?id=98810
+
+ Reviewed by Ojan Vafai.
+
+ If you try to mark a test as foo.html [ Rebaseline ] it wasn't
+ getting picked up for rebaselining; we needed to think the test
+ was failing.
+
+ * Scripts/webkitpy/layout_tests/models/test_expectations.py:
+ (TestExpectations.get_rebaselining_failures):
+ * Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
+ (RebaseliningTest.test_get_rebaselining_failures):
+
+2012-10-09 Daniel Bates <dbates@webkit.org>
+
+ VCSUtils.pm doesn't support SVN 1.7 diff files
+ <https://bugs.webkit.org/show_bug.cgi?id=80762>
+
+ Reviewed by Eric Seidel.
+
+ Implement support for the SVN 1.7 diff format.
+
+ * Scripts/VCSUtils.pm:
+ (parseChunkRange): Modified to support parsing an SVN 1.7 chunk range
+ that begins and ends with "##" (e.g. ## -0,0 +1,7 ##). For comparison,
+ earlier versions of SVN parsed chunk ranges of the form "@@ -0,0 +1,7 @@".
+
+ (parseSvnDiffHeader): Modified to parse an SVN 1.7 binary diff; SVN 1.7
+ has an unusual display format for a binary diff. It repeats the first
+ two lines of the diff header.
+
+ (parseSvnProperty): Modified to ignore both an SVN 1.7 chunk range and
+ lines of the form "\ No newline at end of property". SVN 1.7 emits the latter
+ message after a property value that doesn't end in a newline.
+
+ (parseSvnPropertyValue): Stop parsing an SVN property value when we encounter
+ a line of the form "\ No newline at end of property" (emitted by svn diff as of
+ SVN 1.7).
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseChunkRange.pl:
+ - Added the following unit tests:
+ "Line count is 0"
+ "New line count is 1"
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffFooter.pl:
+ - Added the following unit tests:
+ "svn:executable followed by custom property using SVN 1.7 syntax"
+ "svn:executable followed by custom property without newline using SVN 1.7 syntax"
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl:
+ - Updated test results for test "binary file".
+ - Added unit test "binary file using SVN 1.7 syntax".
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl:
+ - Added the following unit tests:
+ "simple: add svn:executable using SVN 1.7 syntax"
+ "simple: delete svn:executable using SVN 1.7 syntax"
+ "add svn:mime-type and add svn:executable using SVN 1.7 syntax"
+
+ * Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl:
+ - Added the following unit tests:
+ "singe-line '+' change using SVN 1.7 syntax"
+ "single-line '-' change using SVN 1.7 syntax"
+
+2012-10-09 James Robinson <jamesr@chromium.org>
+
+ Unreviewed, rolling out r128488.
+ http://trac.webkit.org/changeset/128488
+ https://bugs.webkit.org/show_bug.cgi?id=96678
+
+ The bot is fixed now
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
+ (.):
+
+2012-10-09 Zan Dobersek <zandobersek@gmail.com>
+
+ XvfbDriver unit test is flaky on Linux builders
+ https://bugs.webkit.org/show_bug.cgi?id=98346
+
+ Reviewed by Adam Barth.
+
+ Temporarily skip the XvfbDriver test case that tests
+ the display number of the next free display. The test
+ is flaky on Linux builders.
+
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+ (XvfbDriverTest.disabled_test_next_free_display):
+
+2012-10-09 Ojan Vafai <ojan@chromium.org>
+
+ Don't duplicated build numbers when merging flakiness dashboard JSON
+ https://bugs.webkit.org/show_bug.cgi?id=98812
+
+ Reviewed by Dirk Pranke.
+
+ In general, build numbers are not unique, but we should basically never
+ get the same build number uploaded twice in a row. This is a workaround
+ for https://bugs.webkit.org/show_bug.cgi?id=97643, which frequently hits this
+ because we update results_small.json and timeout updating results.json and then
+ we retry the whole request.
+
+ * TestResultServer/model/jsonresults.py:
+ (JsonResults.merge):
+ * TestResultServer/model/jsonresults_unittest.py:
+ (JsonResultsTest.test_merge_duplicate_build_number):
+
+2012-10-09 Alexis Menard <alexis@webkit.org>
+
+ [GTK] Shadow builds are not working anymore.
+ https://bugs.webkit.org/show_bug.cgi?id=98785
+
+ Reviewed by Martin Robinson.
+
+ When setting WEBKITOUTPUTDIR the build was failing with a python
+ error : the os.execve expect three arguments. Also the condition
+ to check whether we build the GTK port with jhbuild or not was buggy
+ as it was always assuming an in source build. We can use now jhbuildutils
+ which has a convenient function to locate the directory where
+ the dependencies built with jhbuild are and take into account WEBKITOUTPUTDIR.
+ If the Dependencies path does not exist then the build was not done using
+ jhbuild so we can fallback to a regular build against system libraries.
+
+ * gtk/run-with-jhbuild:
+
+2012-10-08 Simon Fraser <simon.fraser@apple.com>
+
+ Remove DRT/WTR implementations of layerTreeAsText
+ https://bugs.webkit.org/show_bug.cgi?id=98697
+
+ Reviewed by Tim Horton, James Robinson, Alexey Proskuryakov.
+
+ Remove code related to layerTreeAsText(), which is now on window.internals.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (TestRunner::staticFunctions):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ * DumpRenderTree/chromium/DRTTestRunner.cpp:
+ (DRTTestRunner::DRTTestRunner):
+ * DumpRenderTree/chromium/DRTTestRunner.h:
+ (DRTTestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ * DumpRenderTree/qt/TestRunnerQt.h:
+ (TestRunner):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
+2012-10-09 Zoltan Horvath <zoltan@webkit.org>
+
+ Unreviewed. Remove myself from QtWebKit2 subscriptions.
+
+ * Scripts/webkitpy/common/config/watchlist:
+
+2012-10-09 Harald Alvestrand <hta@google.com>
+
+ Change PeerConnection getStats function to single value local / remote
+ elements in RTCStatsReport.
+ https://bugs.webkit.org/show_bug.cgi?id=98753
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::getStats):
+
+2012-10-09 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Make sure events are transformed correctly for plugins.
+ https://bugs.webkit.org/show_bug.cgi?id=89250
+
+ Reviewed by Tony Chang.
+
+ Update the test plugin to print event details for mouse and gesture events.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (printEventDetails):
+
+2012-10-09 Simon Hausmann <simon.hausmann@digia.com>
+
+ Unreviewed trivial Qt build fix: Remove stray closing braces from r130758.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-10-09 Simon Hausmann <simon.hausmann@digia.com>
+
+ [Qt] Clean up Qt module detection
+
+ Reviewed by Tor Arne Vestbø.
+
+ Replace the use of MOBILITY_CONFIG (not supported anymore) with modern use of haveQtModule.
+
+ * qmake/mkspecs/features/features.prf:
+
+2012-10-09 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [GTK] Respect WEBKITOUTPUTDIR in run-with-jhbuild.
+ https://bugs.webkit.org/show_bug.cgi?id=98732
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Follow-up to r113066: if the WEBKITOUTPUTDIR environment variable
+ was used when running update-webkitgtk-libs,
+ WebKitBuild/Dependencies will not exist, so we now check its
+ contents first and then fall back to WebKitBuild/.
+
+ * gtk/run-with-jhbuild:
+
+2012-10-09 Zan Dobersek <zandobersek@gmail.com>
+
+ Unreviewed GTK gardening.
+
+ Skipping the accept-policy test in TestCookieManager API test that's
+ currently failing. The test failure is covered by
+ https://bugs.webkit.org/show_bug.cgi?id=98738.
+
+ * Scripts/run-gtk-tests:
+ (TestRunner):
+
+2012-10-09 Laszlo Gombos <l.gombos@samsung.com>
+
+ [Qt] Remove redundant JAVASCRIPTCORE_JIT variable
+ https://bugs.webkit.org/show_bug.cgi?id=50000
+
+ Reviewed by Simon Hausmann.
+
+ Use ENABLE_JIT instead.
+
+ * qmake/mkspecs/features/valgrind.prf:
+
+2012-10-08 Kiran Muppala <cmuppala@apple.com>
+
+ Throttle DOM timers on hidden pages.
+ https://bugs.webkit.org/show_bug.cgi?id=98474
+
+ Reviewed by Maciej Stachowiak.
+
+ Implement testRunner.setPageVisibility on mac for testing throttling
+ of timers on hidden pages using DumpRenderTree.
+
+ * DumpRenderTree/mac/Configurations/Base.xcconfig:
+ Fix build error on mac-ews bot. Add JSC copy of ICU headers to search path.
+
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::resetPageVisibility):
+ (TestRunner::setPageVisibility):
+
+2012-10-08 Dirk Pranke <dpranke@chromium.org>
+
+ results.html and garden-o-matic are ignoring IMAGE failures when expected to FAIL
+ https://bugs.webkit.org/show_bug.cgi?id=98706
+
+ Reviewed by Ojan Vafai.
+
+ FAIL is supposed to map onto Failure which is supposed to map
+ onto the old [ TEXT, IMAGE_PLUS_TEXT, AUDIO ] mapping.
+ results.html was including IMAGE in this and garden-o-matic was
+ including CRASH and TIMEOUT as well :(.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/results_unittests.js:
+
+2012-10-08 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL] Build ControlTheme only when necessary
+ https://bugs.webkit.org/show_bug.cgi?id=98519
+
+ Reviewed by Eric Seidel.
+
+ * EWebLauncher/ControlTheme/CMakeLists.txt:
+ Added custom command keyword not to build ControlTheme every time.
+ In addition, removed `ALL` keyword because targets, which use ControlTheme,
+ already have dependency.
+
+2012-10-08 Peter Rybin <peter.rybin@gmail.com>
+
+ Do not swallow fatal messages in qt/DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=98211
+
+ Reviewed by Eric Seidel.
+
+ Fix condition in message type filtering.
+
+ * DumpRenderTree/qt/DumpRenderTreeMain.cpp:
+ (messageHandler):
+
+2012-10-08 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Unreviewed. Moving myself from Committer to Reviewer list.
+ http://lists.webkit.org/pipermail/webkit-dev/2012-October/022460.html
+
+ * Scripts/webkitpy/common/config/committers.py:
+
+2012-10-08 Dirk Pranke <dpranke@chromium.org>
+
+ nrwt: [chromium] run http tests in parallel on bigger machines
+ https://bugs.webkit.org/show_bug.cgi?id=98562
+
+ Reviewed by Eric Seidel.
+
+ The "locked tests" shard (which includes the http tests and the
+ perf tests) is the long pole on machines where we have 4 or more
+ workers, so we should start making sure that
+ we can run http tests in parallel, following the normal sharding
+ rules (all tests in the same directory are in the same shard by
+ default). We should still probably limit the number of workers
+ hitting the web server in parallel where we can; a heuristic of
+ no more than 25% of them seems okay for a start. This will
+ likely only affect developer workstations and a couple of bots
+ at first, so should be low risk and a good reward.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/chromium.py:
+ (ChromiumPort.default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py:
+ (ChromiumPortTestCase.test_default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/port/port_testcase.py:
+ (PortTestCase.test_default_max_locked_shards):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (_set_up_derived_options):
+ (parse_args):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_max_locked_shards):
+
+2012-10-08 Zan Dobersek <zandobersek@gmail.com>
+
+ GTK port should warn if bug modifier is missing in TestExpectations
+ https://bugs.webkit.org/show_bug.cgi?id=98678
+
+ Reviewed by Dirk Pranke.
+
+ Reimplement the warn_if_bug_missing_in_test_expectations method in
+ GtkPort, returning True for producing a warning in such cases.
+
+ * Scripts/webkitpy/layout_tests/port/gtk.py:
+ (GtkPort.warn_if_bug_missing_in_test_expectations):
+
+2012-10-08 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL][DRT] Switch default backing store to single
+ https://bugs.webkit.org/show_bug.cgi?id=98591
+
+ Reviewed by Eric Seidel.
+
+ There are two backing stores for WebKit/Efl, Single Backing Store(SBS) and
+ Tiled Backing Store(TBS), and DRT/Efl has used TBS.
+ But, TBS is not suitable to run pixel tests because it does not have a good way
+ to render mock scrollbars well.
+
+ So, this patch changes the default backing store to SBS.
+ In addition, this changes the environment variable from DRT_USE_SINGLE_BACKING_STORE
+ to DRT_USE_TILED_BACKING_STORE.
+
+ * DumpRenderTree/efl/DumpRenderTreeView.cpp:
+ (shouldUseTiledBackingStore):
+ (chooseAndInitializeAppropriateSmartClass):
+
+2012-10-08 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs testRunner.dispatchPendingLoadRequests
+ https://bugs.webkit.org/show_bug.cgi?id=98638
+
+ Reviewed by Eric Seidel.
+
+ Add implementation for testRunner.dispatchPendingLoadRequests in
+ WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::dispatchPendingLoadRequests):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add support for window.close in Minibrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98667
+
+ Reviewed by Laszlo Gombos.
+
+ When calling window.close() from JavaScript, MiniBrowser
+ now closes the given window.
+
+ * MiniBrowser/efl/main.c:
+ (window_close):
+ (on_ecore_evas_delete):
+ (on_close_window):
+ (window_create):
+
+2012-10-08 Ojan Vafai <ojan@chromium.org>
+
+ Properly strip new tests from the test results json if they are pass/nodata/skip.
+ https://bugs.webkit.org/show_bug.cgi?id=98669
+
+ Reviewed by Eric Seidel.
+
+ In _merge_json, we had a codepath that didn't call _normalize_results_json
+ for tests that aren't already in the aggregated results.
+ Instead, now do all the merging first and then normalize the aggregated results.
+
+ * TestResultServer/model/jsonresults.py:
+ (JsonResults._merge_json):
+ (JsonResults._merge_tests):
+ (JsonResults._normalize_results):
+ (JsonResults):
+ (JsonResults._should_delete_leaf):
+ * TestResultServer/model/jsonresults_unittest.py:
+ Removed test_merge_build_directory_hierarchy_old_version since there is
+ no longer any version 3 json to support.
+ (JsonResultsTest.test_merge_remove_new_test):
+ (JsonResultsTest.test_merge_prune_extra_results_with_new_result_of_same_type):
+
+2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Simplify frame flattening support in MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98657
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Simplify frame flattening support code in MiniBrowser to
+ avoid passing the setting around to window_create()
+ function().
+
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+ (on_new_window):
+ (window_create):
+ (main):
+
+2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Use Ctrl+n shortcut to create a new window in MiniBrowser / EWebLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=98655
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Use "Ctrl+n" shortcut instead of "F9" to open a new window in
+ MiniBrowser and EWebLauncher. This is the shortcut that is
+ commonly used for this action.
+
+ * EWebLauncher/main.c:
+ (on_key_down):
+ * MiniBrowser/efl/main.c:
+ (on_key_down):
+
+2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add support for window.create in Minibrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98649
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Calling window.create() from JavaScript now creates a
+ new window in Minibrowser, as directed.
+
+ * MiniBrowser/efl/main.c:
+ (on_new_window):
+ (window_create):
+
+2012-10-08 Andreas Kling <kling@webkit.org>
+
+ Using float/double as WTF hash table key is unreliable.
+ <http://webkit.org/b/98627>
+
+ Reviewed by Geoffrey Garen.
+
+ Add a test case checking that using double as the hash table key type won't
+ have problems distinguishing between keys that are considered equal by operator==
+ but have different binary representations.
+
+ * TestWebKitAPI/Tests/WTF/HashMap.cpp:
+ (TestDoubleHashTraits):
+
+2012-10-08 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Use URL instead of URI in the API
+ https://bugs.webkit.org/show_bug.cgi?id=98643
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Update Minibrowser to reflect API changes. We now
+ use URL instead of URI in WK2 EFL API.
+
+ * EWebLauncher/url_bar.c:
+ (on_urlbar_key_down):
+ * MiniBrowser/efl/CMakeLists.txt:
+ * MiniBrowser/efl/main.c:
+ (on_url_changed):
+ (window_create):
+
+2012-10-08 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Reenable plugin tests
+ https://bugs.webkit.org/show_bug.cgi?id=98528
+
+ Reviewed by Csaba Osztrogonác.
+
+ Uncomment this function so we can pick up the test plugin.
+ It was commented out because of https://bugs.webkit.org/show_bug.cgi?id=86620
+ and that bug seems to be fixed now.
+
+ * WebKitTestRunner/qt/TestControllerQt.cpp:
+ (WTR::TestController::initializeTestPluginDirectory):
+
+2012-10-08 Jinwoo Song <jinwoo7.song@samsung.com>
+
+ [EFL][WK2] Support multiple window creation for MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=97884
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement the multiple window creation for MiniBrowser and bind the 'F9' key for opening a new window.
+ Also, refactored MiniBrowser codes according to EFL coding style.
+
+ * MiniBrowser/efl/main.c:
+ (_Browser_Window):
+ (window_free):
+ (main_signal_exit):
+ (on_ecore_evas_delete):
+ (on_ecore_evas_resize):
+ (on_key_down):
+ (on_title_changed):
+ (on_url_changed):
+ (on_progress):
+ (window_create):
+ (main):
+
+2012-10-07 Seokju Kwon <seokju.kwon@samsung.com>
+
+ [EFL] Add Web Inspector to EWebLauncher
+ https://bugs.webkit.org/show_bug.cgi?id=91718
+
+ Reviewed by Gyuyoung Kim.
+
+ Implementation of Web Inspector in EWebLauncher.
+ The Web Inspector can be opened or closed by pressing ctrl+i on web page.
+
+ * EWebLauncher/main.c:
+ (on_browser_ecore_evas_resize):
+ (on_web_inspector_ecore_evas_resize):
+ (on_key_down):
+ (on_web_inspector_view_create):
+ (on_web_inspector_view_close):
+ (on_web_inspector_view_destroyed):
+ (browserCreate):
+ (webInspectorCreate):
+ (windowCreate):
+ (closeWindow):
+ (main_signal_exit):
+ (parseUserArguments):
+
+2012-10-07 Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
+
+ Rename first/second to key/value in HashMap iterators
+ https://bugs.webkit.org/show_bug.cgi?id=82784
+
+ Reviewed by Eric Seidel.
+
+ * DumpRenderTree/chromium/MockWebSpeechInputController.cpp:
+ (MockWebSpeechInputController::addMockRecognitionResult):
+ * DumpRenderTree/chromium/NotificationPresenter.cpp:
+ (NotificationPresenter::simulateClick):
+ (NotificationPresenter::show):
+ * DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp:
+ (CppBoundClass::~CppBoundClass):
+ (CppBoundClass::invoke):
+ (CppBoundClass::getProperty):
+ (CppBoundClass::setProperty):
+ (CppBoundClass::bindCallback):
+ (CppBoundClass::bindProperty):
+ * DumpRenderTree/chromium/WebPreferences.cpp:
+ (applyFontMap):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::printResourceDescription):
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (worldIDForWorld):
+ (TestRunner::evaluateScriptInIsolatedWorld):
+ * DumpRenderTree/win/AccessibilityControllerWin.cpp:
+ (AccessibilityController::~AccessibilityController):
+ (AccessibilityController::winNotificationReceived):
+ * DumpRenderTree/win/ResourceLoadDelegate.cpp:
+ (ResourceLoadDelegate::descriptionSuitableForTestResult):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ (worldIDForWorld):
+ (TestRunner::evaluateScriptInIsolatedWorld):
+ * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp:
+ (TestWebKitAPI::DOMWindowExtensionBasic::willDestroyPage):
+ * TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp:
+ (TestWebKitAPI::DOMWindowExtensionNoCache::willDestroyPage):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::worldIDForWorld):
+ (WTR::TestRunner::evaluateScriptInIsolatedWorld):
+
+2012-10-07 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Unreviewed, rolling out r130596.
+ http://trac.webkit.org/changeset/130596
+ https://bugs.webkit.org/show_bug.cgi?id=98616
+
+ Broke build bots without IPV6 support
+
+ * Scripts/webkitpy/common/system/platforminfo_mock.py:
+ (MockPlatformInfo.is_cygwin):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.baseline_version_dir):
+ (Port.to.start_websocket_server):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_operating_system):
+ (PortTest.test_build_path):
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
+ (LayoutTestApacheHttpd):
+ (LayoutTestApacheHttpd.__init__):
+
+2012-10-07 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ webkitpy: Pass the `Listen' Apache directive from Apache, not the httpd.conf files.
+ https://bugs.webkit.org/show_bug.cgi?id=98602
+
+ Reviewed by Eric Seidel.
+
+ Unify all the different `Listen' directives present in the several
+ httpd.conf files we have in LayoutTests/http/conf. For one, we
+ were already passing `Listen 127.0.0.1:8000' via webkitpy before,
+ and opening the other ports from the conf files.
+
+ The configuration files differed mostly in the way they handled
+ IPV6 ports. Some of them did not listen to IPV6 ports because the
+ systems which used them sometimes did not have IPV6 support. The
+ `http_server_supports_ipv6' method has been added to Port to
+ address that. cygwin, on its turn, still seems to use Apache 1.3,
+ which does not support IPV6 at all; the newly-added method has a
+ special case for that.
+
+ * Scripts/webkitpy/common/system/platforminfo_mock.py:
+ (MockPlatformInfo.is_cygwin):
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.baseline_version_dir):
+ (Port.to.start_websocket_server):
+ (Port.to):
+ (Port.to.http_server_supports_ipv6):
+ * Scripts/webkitpy/layout_tests/port/base_unittest.py:
+ (PortTest.test_http_server_supports_ipv6):
+ (PortTest.test_build_path):
+ * Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
+ (LayoutTestApacheHttpd):
+ (LayoutTestApacheHttpd.__init__):
+
+2012-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ Attempt to fix the SnowLeopard build to making the implementation of
+ -isPaginated come before its use.
+
+ * MiniBrowser/mac/WK1BrowserWindowController.m:
+ (-[WK1BrowserWindowController reload:]):
+ (-[WK1BrowserWindowController forceRepaint:]):
+ (-[WK1BrowserWindowController goBack:]):
+ (-[WK1BrowserWindowController goForward:]):
+ (-[WK1BrowserWindowController isPaginated]):
+
+2012-10-05 Simon Fraser <simon.fraser@apple.com>
+
+ Provide a way to run WebKit1
+ https://bugs.webkit.org/show_bug.cgi?id=98568
+
+ Reviewed by Tim Horton.
+
+ Make it possible to create both WebKit1 and WebKit2 windows in MiniBrowser.
+
+ Turn BrowserWindowController into a base class; subclassed by
+ WK1BrowserWindowController and WK2BrowserWindowController, each of
+ which implement the BrowserController protocol.
+
+ Use Command-N to get a WebKit1 window, and Command-Option-N to
+ get a WK2 window. Also add "Open Location" to focus the URL bar,
+ and code to add an http:// if missing.
+
+ Hook up window title callbacks; append " [WK1/2]" to window title
+ as appropriate.
+
+ * MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
+ * MiniBrowser/mac/AppDelegate.m:
+ (-[BrowserAppDelegate newWindow:]):
+ (-[BrowserAppDelegate openPanelDidEnd:returnCode:contextInfo:]):
+ * MiniBrowser/mac/BrowserWindowController.h:
+ * MiniBrowser/mac/BrowserWindowController.m:
+ (-[BrowserWindowController initWithWindow:]):
+ (-[BrowserWindowController windowDidLoad]):
+ (-[BrowserWindowController openLocation:]):
+ (-[BrowserWindowController loadURLString:]):
+ (-[BrowserWindowController applicationTerminating]):
+ (-[BrowserWindowController addProtocolIfNecessary:]):
+ * MiniBrowser/mac/MainMenu.xib:
+ * MiniBrowser/mac/WK1BrowserWindowController.h: Copied from Tools/MiniBrowser/mac/BrowserWindowController.h.
+ (WebView):
+ * MiniBrowser/mac/WK1BrowserWindowController.m: Added.
+ (-[WK1BrowserWindowController awakeFromNib]):
+ (-[WK1BrowserWindowController dealloc]):
+ (-[WK1BrowserWindowController loadURLString:]):
+ (-[WK1BrowserWindowController fetch:]):
+ (-[WK1BrowserWindowController showHideWebView:]):
+ (-[WK1BrowserWindowController removeReinsertWebView:]):
+ (-[WK1BrowserWindowController validateMenuItem:]):
+ (-[WK1BrowserWindowController reload:]):
+ (-[WK1BrowserWindowController forceRepaint:]):
+ (-[WK1BrowserWindowController goBack:]):
+ (-[WK1BrowserWindowController goForward:]):
+ (-[WK1BrowserWindowController validateUserInterfaceItem:]):
+ (-[WK1BrowserWindowController validateToolbar]):
+ (-[WK1BrowserWindowController windowShouldClose:]):
+ (-[WK1BrowserWindowController windowWillClose:]):
+ (-[WK1BrowserWindowController applicationTerminating]):
+ (-[WK1BrowserWindowController currentZoomFactor]):
+ (-[WK1BrowserWindowController canZoomIn]):
+ (-[WK1BrowserWindowController zoomIn:]):
+ (-[WK1BrowserWindowController canZoomOut]):
+ (-[WK1BrowserWindowController zoomOut:]):
+ (-[WK1BrowserWindowController canResetZoom]):
+ (-[WK1BrowserWindowController resetZoom:]):
+ (-[WK1BrowserWindowController toggleZoomMode:]):
+ (-[WK1BrowserWindowController isPaginated]):
+ (-[WK1BrowserWindowController togglePaginationMode:]):
+ (-[WK1BrowserWindowController find:]):
+ (-[WK1BrowserWindowController dumpSourceToConsole:]):
+ (-[WK1BrowserWindowController webView:didStartProvisionalLoadForFrame:]):
+ (-[WK1BrowserWindowController webView:didReceiveTitle:forFrame:]):
+ * MiniBrowser/mac/WK2BrowserWindowController.h: Copied from Tools/MiniBrowser/mac/BrowserWindowController.h.
+ * MiniBrowser/mac/WK2BrowserWindowController.m: Copied from Tools/MiniBrowser/mac/BrowserWindowController.m.
+ (-[WK2BrowserWindowController initWithContext:pageGroup:]):
+ (-[WK2BrowserWindowController dealloc]):
+ (-[WK2BrowserWindowController fetch:]):
+ (-[WK2BrowserWindowController showHideWebView:]):
+ (-[WK2BrowserWindowController removeReinsertWebView:]):
+ (-[WK2BrowserWindowController validateMenuItem:]):
+ (-[WK2BrowserWindowController reload:]):
+ (-[WK2BrowserWindowController forceRepaint:]):
+ (-[WK2BrowserWindowController goBack:]):
+ (-[WK2BrowserWindowController goForward:]):
+ (-[WK2BrowserWindowController validateUserInterfaceItem:]):
+ (-[WK2BrowserWindowController validateToolbar]):
+ (-[WK2BrowserWindowController windowShouldClose:]):
+ (-[WK2BrowserWindowController windowWillClose:]):
+ (-[WK2BrowserWindowController applicationTerminating]):
+ (-[WK2BrowserWindowController currentZoomFactor]):
+ (-[WK2BrowserWindowController setCurrentZoomFactor:]):
+ (-[WK2BrowserWindowController canZoomIn]):
+ (-[WK2BrowserWindowController zoomIn:]):
+ (-[WK2BrowserWindowController canZoomOut]):
+ (-[WK2BrowserWindowController zoomOut:]):
+ (-[WK2BrowserWindowController canResetZoom]):
+ (-[WK2BrowserWindowController resetZoom:]):
+ (-[WK2BrowserWindowController toggleZoomMode:]):
+ (-[WK2BrowserWindowController isPaginated]):
+ (-[WK2BrowserWindowController togglePaginationMode:]):
+ (-[WK2BrowserWindowController dumpSourceToConsole:]):
+ (didStartProvisionalLoadForFrame):
+ (didReceiveServerRedirectForProvisionalLoadForFrame):
+ (didFailProvisionalLoadWithErrorForFrame):
+ (didCommitLoadForFrame):
+ (didFinishDocumentLoadForFrame):
+ (didFinishLoadForFrame):
+ (didFailLoadWithErrorForFrame):
+ (didSameDocumentNavigationForFrame):
+ (didReceiveTitleForFrame):
+ (didFirstLayoutForFrame):
+ (didFirstVisuallyNonEmptyLayoutForFrame):
+ (didRemoveFrameFromHierarchy):
+ (didDisplayInsecureContentForFrame):
+ (didRunInsecureContentForFrame):
+ (didDetectXSSForFrame):
+ (didStartProgress):
+ (didChangeProgress):
+ (didFinishProgress):
+ (didBecomeUnresponsive):
+ (didBecomeResponsive):
+ (processDidExit):
+ (didChangeBackForwardList):
+ (decidePolicyForNavigationAction):
+ (decidePolicyForNewWindowAction):
+ (decidePolicyForResponse):
+ (createNewPage):
+ (showPage):
+ (closePage):
+ (runJavaScriptAlert):
+ (runJavaScriptConfirm):
+ (runJavaScriptPrompt):
+ (setStatusText):
+ (mouseDidMoveOverElement):
+ (getWindowFrame):
+ (setWindowFrame):
+ (runBeforeUnloadConfirmPanel):
+ (runOpenPanel):
+ (-[WK2BrowserWindowController awakeFromNib]):
+ (-[WK2BrowserWindowController didStartProgress]):
+ (-[WK2BrowserWindowController didChangeProgress:]):
+ (-[WK2BrowserWindowController didFinishProgress]):
+ (-[WK2BrowserWindowController updateProvisionalURLForFrame:]):
+ (-[WK2BrowserWindowController didStartProvisionalLoadForFrame:]):
+ (-[WK2BrowserWindowController didReceiveServerRedirectForProvisionalLoadForFrame:]):
+ (-[WK2BrowserWindowController didFailProvisionalLoadWithErrorForFrame:]):
+ (-[WK2BrowserWindowController didFailLoadWithErrorForFrame:]):
+ (-[WK2BrowserWindowController didSameDocumentNavigationForFrame:]):
+ (-[WK2BrowserWindowController didCommitLoadForFrame:]):
+ (-[WK2BrowserWindowController loadURLString:]):
+ (-[WK2BrowserWindowController performFindPanelAction:]):
+ (-[WK2BrowserWindowController find:]):
+
+2012-10-05 Sudarsana Nagineni <sudarsana.nagineni@intel.com>
+
+ [WK2][WTR] WebKitTestRunner needs testRunner.setSerializeHTTPLoads
+ https://bugs.webkit.org/show_bug.cgi?id=98524
+
+ Reviewed by Alexey Proskuryakov.
+
+ Add implementation for testRunner.setSerializeHTTPLoads in
+ WebKitTestRunner.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setSerializeHTTPLoads):
+ (WTR):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+
+2012-10-05 Richard Larocque <rlarocque@chromium.org>
+
+ TestResultsServer does not display sync_integration_tests results
+ https://bugs.webkit.org/show_bug.cgi?id=98551
+
+ Reviewed by Ojan Vafai.
+
+ Allow builders whose name contains "Sync" to pass through the
+ isChromiumWebkitDepsTestRunner filter.
+
+ The test expectations in flakiness_dashboard_unittests.js have been
+ updated to match the new behaviour.
+
+ * TestResultServer/static-dashboards/builders.js:
+ (isChromiumDepsGTestRunner):
+
+2012-10-05 Roger Fong <roger_fong@apple.com>
+
+ Tests in webkitpy involving child processes are flaky.
+ Skipping run_webkit_tests_integrationtest.py.
+ https://bugs.webkit.org/show_bug.cgi?id=98559
+
+ Reviewed by Dirk Pranke.
+
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_verbose_in_child_processes):
+
+2012-10-05 Zan Dobersek <zandobersek@gmail.com>
+
+ [Gtk] fast/xsl/xslt-missing-namespace-in-xslt.xml is failing on the 64-bit Debug builder
+ https://bugs.webkit.org/show_bug.cgi?id=91009
+
+ Reviewed by Martin Robinson.
+
+ Include libxml2 into the jhbuild module. Version 2.8.0 introduces
+ a more correct (but not completely correct) behavior in the
+ fast/xsl/xslt-missing-namespace-in-xslt.html test.
+
+ * gtk/jhbuild.modules:
+
+2012-10-05 Rob Buis <rbuis@rim.com>
+
+ [BlackBerry] Implement TestRunner.setMockDeviceOrientation
+ https://bugs.webkit.org/show_bug.cgi?id=98542
+
+ Reviewed by Antonio Gomes.
+
+ PR 120681
+
+ This fixes tests in fast/dom/DeviceOrientation.
+
+ * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+ (TestRunner::setMockDeviceOrientation):
+
+2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] Implement UIClient focus callbacks in WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=98256
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement UIClient's focus callbacks for the main page in
+ WebKitTestRunner.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::focus):
+ (WTR::TestController::initialize):
+
+2012-10-05 Mark Hahnenberg <mhahnenberg@apple.com>
+
+ JSC should have a way to gather and log Heap memory use and pause times
+ https://bugs.webkit.org/show_bug.cgi?id=98431
+
+ Reviewed by Geoffrey Garen.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (main): Added a check as to whether we should dump our JSC Heap statistics on exit.
+
+2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Fix mktemp() compilation warning in Minibrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98493
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fix wrong mktemp usage causing a compilation warning
+ in MiniBrowser.
+
+ * MiniBrowser/efl/main.c:
+ (on_download_request):
+
+2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] Avoid duplication of UIClient callbacks for main page and other pages
+ https://bugs.webkit.org/show_bug.cgi?id=98503
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Avoid the need for duplicating UIClient callbacks for main page
+ and other pages by passing the view as clientInfo
+ for those callbacks.
+
+ Previously, callbacks for the main page were passed the
+ TestController as clientInfo while the callbacks for other pages
+ were passed the PlatformWebView as clientInfo. This was error prone
+ and leads to useless code duplication.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::getWindowFrame):
+ (WTR::setWindowFrame):
+ (WTR::runBeforeUnloadConfirmPanel):
+ (WTR::TestController::createOtherPage):
+ (WTR::TestController::initialize):
+ (WTR::TestController::decidePolicyForNotificationPermissionRequest):
+
+2012-10-05 Sadrul Habib Chowdhury <sadrul@chromium.org>
+
+ [chromium] Allow dragging into plugins.
+ https://bugs.webkit.org/show_bug.cgi?id=98277
+
+ Reviewed by Tony Chang.
+
+ Update the TestWebPlugin to receive drag events and print them out.
+
+ * DumpRenderTree/chromium/TestWebPlugin.cpp:
+ (TestWebPlugin::handleDragStatusUpdate):
+ * DumpRenderTree/chromium/TestWebPlugin.h:
+ (TestWebPlugin):
+
+2012-10-05 Jongseok Yang <js45.yang@samsung.com>
+
+ [EFL][WK2] Remove "web" word from ewk_web_error APIs
+ https://bugs.webkit.org/show_bug.cgi?id=97886
+
+ Reviewed by Gyuyoung Kim.
+
+ Remove "web" word from ewk_web_error APIs.
+ "web" word was redundant because "ewk" means "EFL WebKit" and WK APIs for error does not have "web" word.
+
+ * MiniBrowser/efl/main.c:
+ (on_error):
+
+2012-10-05 Csaba Osztrogonác <ossy@webkit.org>
+
+ [Qt] Enable CSS compositing by default
+ https://bugs.webkit.org/show_bug.cgi?id=98490
+
+ Reviewed by Simon Hausmann.
+
+ * qmake/mkspecs/features/features.pri:
+
+2012-10-05 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r130466.
+ http://trac.webkit.org/changeset/130466
+ https://bugs.webkit.org/show_bug.cgi?id=98495
+
+ It made 12 tests crash on Qt-WK2 (Requested by Ossy on
+ #webkit).
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::focus):
+ (WTR::TestController::initialize):
+
+2012-10-05 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Fix window resizing / moving in WK1 and WKTR
+ https://bugs.webkit.org/show_bug.cgi?id=98486
+
+ Reviewed by Gyuyoung Kim.
+
+ Fix PlatformWebView::windowFrame() and
+ PlatformWebView::setWindowFrame() in EFL's WKTR so
+ that it resizes / moves the window, not the view.
+
+ The new code matches the implementation in EwkView's
+ UIClient.
+
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::PlatformWebView::windowFrame):
+ (WTR::PlatformWebView::setWindowFrame):
+
+2012-10-04 KyungTae Kim <ktf.kim@samsung.com>
+
+ [EFL][WK2] Fix destination path when download with suggested filename on the Minibrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98334
+
+ Reviewed by Gyuyoung Kim.
+
+ Add callback functions for download requests to Minibrowser to set the destination path for download.
+ Set the destination path with suggested file name as (destination folder) + (suggested file name).
+ The 'destination folder' should be a specific folder user selected, but is set to '/tmp' for now.
+
+ Additionally, for printing out the download status,
+ use the info macro and set the verbose variable to 1 to enable it.
+
+ * MiniBrowser/efl/main.c:
+ (on_download_request):
+ (on_download_finished):
+ (on_download_failed):
+ (browserCreate):
+
+2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] Implement UIClient focus callbacks in WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=98256
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Implement UIClient's focus callbacks in WebKitTestRunner.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::focus):
+ (WTR::TestController::initialize):
+
+2012-10-04 Rik Cabanier <cabanier@adobe.com>
+
+ Turn Compositing on by default in WebKit build
+ https://bugs.webkit.org/show_bug.cgi?id=98315
+
+ Reviewed by Simon Fraser.
+
+ enable -webkit-blend-mode on trunk.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-10-04 Ryuan Choi <ryuan.choi@samsung.com>
+
+ [EFL][WK2] Add APIs to get/set the frame flattening.
+ https://bugs.webkit.org/show_bug.cgi?id=95982
+
+ Reviewed by Gyuyoung Kim.
+
+ * MiniBrowser/efl/main.c: Added frame flattening option to test.
+ (browserCreate):
+ (main):
+
+2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Add libxml 2.8.0 to jhbuild
+ https://bugs.webkit.org/show_bug.cgi?id=98418
+
+ Reviewed by Laszlo Gombos.
+
+ Add libxml 2.8.0 to EFL's jhbuild for consistency.
+
+ * efl/jhbuild.modules:
+
+2012-10-03 Benjamin Poulain <bpoulain@apple.com>
+
+ [WK2] Support all attributes of GeolocationPosition
+ https://bugs.webkit.org/show_bug.cgi?id=98212
+
+ Reviewed by Sam Weinig.
+
+ Expand WebKitTestRunner and DumpRenderTree to test all the attributes
+ of GeolocationPosition.
+
+ * DumpRenderTree/TestRunner.cpp:
+ (setMockGeolocationPositionCallback):
+ * DumpRenderTree/TestRunner.h:
+ (TestRunner):
+ * DumpRenderTree/efl/TestRunnerEfl.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ * DumpRenderTree/mac/TestRunnerMac.mm:
+ (TestRunner::setMockGeolocationPosition):
+ * DumpRenderTree/win/TestRunnerWin.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ * DumpRenderTree/wx/TestRunnerWx.cpp:
+ (TestRunner::setMockGeolocationPosition):
+ * WebKitTestRunner/GeolocationProviderMock.cpp:
+ (WTR::GeolocationProviderMock::setPosition):
+ * WebKitTestRunner/GeolocationProviderMock.h:
+ (GeolocationProviderMock):
+ * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
+ (_platformTypeVariableDeclaration):
+ Use a proper constructor for the JSValueRef, it is an opaque type, we are not supposed
+ to build the pointer outself.
+ This is necessary to support optional JSValueRef properly.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::setMockGeolocationPosition):
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+ (InjectedBundle):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setMockGeolocationPosition):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::setMockGeolocationPosition):
+ * WebKitTestRunner/TestController.h:
+ (TestController):
+ * WebKitTestRunner/TestInvocation.cpp:
+ (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+
+2012-10-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Make the Xvfb driver recognize `X' as a valid X server binary.
+ https://bugs.webkit.org/show_bug.cgi?id=98434
+
+ Reviewed by Dirk Pranke.
+
+ The X server binary can also be called `X', so account for that
+ possibility in the _next_free_display regexp.
+
+ Additionally, make the regular expression require at least one
+ space character after the `ps comm' part.
+
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
+ (XvfbDriver._next_free_display):
+ * Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
+ (XvfbDriverTest.test_next_free_display):
+
+2012-10-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ webkitpy: Accept WEBKITOUTPUTDIR in Port._setup_environ_for_server.
+ https://bugs.webkit.org/show_bug.cgi?id=98436
+
+ Reviewed by Dirk Pranke.
+
+ The Xvfb driver (ab)uses Port._setup_environ_for_server() to set
+ the environment for the server process, and the WEBKITOUTPUTDIR
+ environment variable was not being passed through, causing the
+ build directory to be wrongfully set to WebKitBuild/ all the time.
+
+ * Scripts/webkitpy/layout_tests/port/base.py:
+ (Port.to.setup_environ_for_server):
+
+2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL][WK2] Add setting to allow file access from file:// URLs
+ https://bugs.webkit.org/show_bug.cgi?id=98121
+
+ Reviewed by Laszlo Gombos.
+
+ Allow file access from file:// URLs by default in Minibrowser
+ to facilitate testing.
+
+ * MiniBrowser/efl/main.c:
+ (browserCreate):
+
+2012-10-04 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Run unit tests with Xvfb
+ https://bugs.webkit.org/show_bug.cgi?id=98389
+
+ Reviewed by Laszlo Gombos.
+
+ Run EFL unit tests with Xvfb, similarly to GTK port.
+
+ * Scripts/run-efl-tests:
+
+2012-10-04 Adrian Perez de Castro <aperez@igalia.com>
+
+ [GTK] Enable inspector by default in GtkLauncher/MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98333
+
+ Reviewed by Xan Lopez.
+
+ Both MiniBrowser and GtkLauncher are tools for testing, so in
+ the end every time we want to test the inspector we have to
+ manually enable enable the “developer extras” setting when using
+ them. It make sense to have this setting enabled by default.
+
+ * GtkLauncher/main.c:
+ (main):
+ * MiniBrowser/gtk/main.c:
+ (main):
+
+2012-10-04 Harald Alvestrand <hta@google.com>
+
+ Change RTCPeerConnection GetStats to use Date timestamp format
+ https://bugs.webkit.org/show_bug.cgi?id=98263
+
+ Reviewed by Yury Semikhatsky.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::getStats):
+
+2012-10-04 Dirk Pranke <dpranke@chromium.org>
+
+ [NRWT] --skipped option is ignored when --test-list is used
+ https://bugs.webkit.org/show_bug.cgi?id=98260
+
+ Reviewed by Ojan Vafai.
+
+ Adds a --skipped=always flag that will skip any tests listed in
+ TestExpectations even if they're listed explicitly on the
+ command line.
+
+ This is most useful if you are using --test-list to specify a
+ long list of files but you still want to skip some of them
+ depending on what's in TestExpectations.
+
+ * Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py:
+ (LayoutTestFinder.skip_tests):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
+ (parse_args):
+ * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+ (MainTest.test_skipped_flag):
+
+2012-10-04 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r130377.
+ http://trac.webkit.org/changeset/130377
+ https://bugs.webkit.org/show_bug.cgi?id=98392
+
+ Chromium Win compilation is broken (Requested by yurys on
+ #webkit).
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::getStats):
+
+2012-10-04 Harald Alvestrand <hta@google.com>
+
+ Change RTCPeerConnection GetStats to use Date timestamp format
+ https://bugs.webkit.org/show_bug.cgi?id=98263
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (MockWebRTCPeerConnectionHandler::getStats):
+
+2012-10-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ Unreviewed, remove unused $legacyWebKitBlobBuilderSupport variable after r130343.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-10-03 Philip Rogers <pdr@google.com>
+
+ Force GC between PageLoad tests.
+ https://bugs.webkit.org/show_bug.cgi?id=98203
+
+ Reviewed by Ryosuke Niwa.
+
+ Previously, our PageLoad PerfTests had multi-modal distributions,
+ typically with a small cluster at 1-2x the median. This turned out
+ to be caused by not garbage collecting between tests!
+
+ This patch adds a new file, force-gc.html, and loads this file between
+ PageLoad tests to force a GC. I manually verified that this cleans up
+ our perf test outliers.
+
+ * Scripts/webkitpy/performance_tests/perftest.py:
+ (PageLoadingPerfTest.__init__):
+ (PageLoadingPerfTest):
+ (PageLoadingPerfTest.run_single):
+
+ This function now loads two pages: one to force a gc and
+ then the test to run.
+
+ * Scripts/webkitpy/performance_tests/perftest_unittest.py:
+
+ Modified several existing tests to show that the force-gc file
+ is loaded.
+
+ (MockPort):
+ (MockPort.__init__):
+ (MockPort.perf_tests_dir):
+ (TestPageLoadingPerfTest.MockDriver.__init__):
+ (TestPageLoadingPerfTest.MockDriver.run_test):
+ (TestPageLoadingPerfTest.test_run):
+ (TestPageLoadingPerfTest.test_run_with_bad_output):
+ (TestReplayPerfTest.ReplayTestPort):
+ (TestReplayPerfTest.ReplayTestPort.__init__):
+ (TestReplayPerfTest.test_run_single.run_test):
+ (TestReplayPerfTest.test_run_single):
+ (TestReplayPerfTest.test_run_single_fails_when_output_has_error):
+ (TestPerfTestFactory.test_regular_test):
+ (TestPerfTestFactory.test_inspector_test):
+ (TestPerfTestFactory.test_page_loading_test):
+
+2012-10-03 Christophe Dumez <christophe.dumez@intel.com>
+
+ [EFL] Enable use of X11 in DumpRenderTree / WebKitTestRunner
+ https://bugs.webkit.org/show_bug.cgi?id=98231
+
+ Reviewed by Gyuyoung Kim.
+
+ Enable use of X11 in DumpRenderTree / WebKitTestRunner.
+ Call ecore_evas_new() instead of ecore_evas_buffer_new()
+ in EFL's DumpRenderTree and WebKitTestRunner.
+ It is safe to do this now that we are using XvfbDriver
+ for the layout tests.
+
+ * DumpRenderTree/efl/DumpRenderTree.cpp:
+ (parseCommandLineOptions):
+ (initEcoreEvas):
+ * WebKitTestRunner/efl/PlatformWebViewEfl.cpp:
+ (WTR::initEcoreEvas):
+ * WebKitTestRunner/efl/main.cpp:
+ (main):
+
+2012-10-03 Dirk Pranke <dpranke@chromium.org>
+
+ run-webkit-tests tests on win32 after r127302
+ https://bugs.webkit.org/show_bug.cgi?id=98323
+
+ Reviewed by Eric Seidel.
+
+ run-webkit-tests tests on win32 after r127302
+ https://bugs.webkit.org/show_bug.cgi?id=98323
+
+ Reviewed by Eric Seidel.
+
+ Looks like when we converted the json-building logic to use scm
+ to try and get the svn revision, we missed a win32-ism and
+ didn't check to make sure had initialized the scm subsystem.
+
+ This change fixes that and renames _initialize_scm to be a public method.
+
+ * Scripts/webkitpy/common/host.py:
+ (Host.initialize_scm):
+ * Scripts/webkitpy/common/host_mock.py:
+ (MockHost.__init__):
+ (MockHost.initialize_scm):
+ * Scripts/webkitpy/layout_tests/controllers/manager.py:
+ (summarize_results):
+ * Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
+ (JSONResultsGeneratorBase.get_json):
+ (JSONResultsGeneratorBase._get_result_char):
+ (JSONResultsGeneratorBase._get_svn_revision):
+ * Scripts/webkitpy/performance_tests/perftestsrunner.py:
+ (PerfTestsRunner.__init__):
+ * Scripts/webkitpy/style/checkers/test_expectations.py:
+ (TestExpectationsChecker.__init__):
+ * Scripts/webkitpy/style/main.py:
+ (CheckWebKitStyle.main):
+ * Scripts/webkitpy/tool/main.py:
+ (WebKitPatch.handle_global_options):
+ * Scripts/webkitpy/tool/servers/rebaselineserver.py:
+ (get_test_baselines):
+
+2012-10-03 Adrian Perez de Castro <aperez@igalia.com>
+
+ [GTK] Make inspector directly useable in GtkLauncher/MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98310
+
+ Reviewed by Martin Robinson.
+
+ Make MiniBrowser/GtkLauncher define the path to the inspector
+ resources by setting the WEBKIT_INSPECTOR_PATH environment
+ variable pointing to the copy of the inspector resources in
+ the build directory. If the environment variable is already
+ defined, its value is not overwritten. The path is derived
+ from the WEBKIT_EXEC_PATH macro defined in the makefiles.
+
+ * GNUmakefile.am:
+ * GtkLauncher/main.c:
+ (main):
+ * MiniBrowser/gtk/main.c:
+ (main):
+
+2012-10-03 Benjamin Poulain <bpoulain@apple.com>
+
+ Fix Geolocation/window-close-crash.html and harden WebKitTestRunner for Geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=97608
+
+ Reviewed by Sam Weinig.
+
+ The test fast/dom/Geolocation/window-close-crash.html was crashing because
+ handleGeolocationPermissionRequest() was executed on the wrong pointer. Depending on how
+ the page was created, the void* clientInfo can either be a PlatformWebView or
+ a TestController.
+
+ Using the global TestController fixes the issue.
+
+ * WebKitTestRunner/GeolocationProviderMock.cpp:
+ (WTR::GeolocationProviderMock::setPosition):
+ (WTR::GeolocationProviderMock::setPositionUnavailableError):
+ To be reliable, the test fast/dom/Geolocation/maximum-age.html needs the setting the position
+ to clear the error and vice versa.
+ This is the same behavior as GeolocationClientMock and MockGeolocationProvider of WebKit1.
+
+ (WTR::GeolocationProviderMock::sendPositionIfNeeded):
+ (WTR::GeolocationProviderMock::sendErrorIfNeeded):
+ Some tests expect the position/error cant be sent multiple time,
+ just keep the position after sending.
+
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::decidePolicyForGeolocationPermissionRequest):
+ (WTR::TestController::decidePolicyForGeolocationPermissionRequestIfPossible):
+ * WebKitTestRunner/TestController.h:
+ Let's play as if we did not know what is in GeolocationPermissionRequestManagerProxy like a real
+ client would have to do.
+
+2012-10-03 Otto Derek Cheung <otcheung@rim.com>
+
+ [BlackBerry] Implementing the NetworkInfo API for BB port
+ https://bugs.webkit.org/show_bug.cgi?id=98273
+
+ Reviewed by Rob Buis.
+
+ Enabling NetworkInfo API for the BlackBerry port.
+
+ * Scripts/webkitperl/FeatureList.pm:
+
+2012-10-03 Anders Carlsson <andersca@apple.com>
+
+ Exception thrown when running accessibility/container-node-delete-causes-crash.html test
+ https://bugs.webkit.org/show_bug.cgi?id=98291
+
+ Reviewed by Andreas Kling.
+
+ The accessibility/container-node-delete-causes-crash.html test will cause a full accessibility tree
+ to be created by trying to look up an element with a non-existent ID. This caused an exception to be thrown
+ when trying to access the children of an element that didn't have any children. Fix this by adding
+ BEGIN_AX_OBJC_EXCEPTIONS/END_AX_OBJC_EXCEPTIONS around the call to get the children.
+
+ * DumpRenderTree/mac/AccessibilityControllerMac.mm:
+ (findAccessibleObjectById):
+
+2012-10-03 Ojan Vafai <ojan@chromium.org>
+
+ Make partytime work when loading garden-o-matic from trac.webkit.org
+ https://bugs.webkit.org/show_bug.cgi?id=98283
+
+ Reviewed by Adam Barth.
+
+ CSP was blocking the reqest for partytime.gif because 'self' wasn't on the img-src directive.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
+
+2012-10-03 Roger Fong <roger_fong@apple.com>
+
+ Unreviewed. Adding sys.platform check to skip a failing assert on the Apple Windows platform.
+ https://bugs.webkit.org/show_bug.cgi?id=98288
+
+ * Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py:
+ (ChromiumAndroidDriverTest.test_command_from_driver_input):
+
+2012-10-03 Ojan Vafai <ojan@chromium.org>
+
+ Get rid of warning about non-existant platform name when loading garden-o-matic
+ https://bugs.webkit.org/show_bug.cgi?id=98282
+
+ Reviewed by Adam Barth.
+
+ If you loaded without a platform query parameter we'd return "null" as the platform name
+ instead of null.
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base.js:
+ * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/base_unittests.js:
+
+2012-10-03 Balazs Kelemen <kbalazs@webkit.org>
+
+ [Qt] Enable mock scrollbars
+ https://bugs.webkit.org/show_bug.cgi?id=98011
+
+ Reviewed by Csaba Osztrogonác.
+
+ Enable mock scrollbars for the Qt port. This patch will require a huge rebaseline.
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::DumpRenderTree::DumpRenderTree):
+ * WebKitTestRunner/TestController.cpp:
+ (WTR::TestController::resetStateToConsistentValues):
+
+2012-10-03 Alberto Garcia <agarcia@igalia.com>
+
+ [GTK] [WK2] Add favicon support to the MiniBrowser
+ https://bugs.webkit.org/show_bug.cgi?id=98063
+
+ Reviewed by Carlos Garcia Campos.
+
+ Set the icon in the URI text entry using the favicon property of
+ the WebKitWebView.
+
+ * MiniBrowser/gtk/BrowserWindow.c:
+ (_BrowserWindow):
+ (updateUriEntryIcon):
+ (uriEntryTextChanged):
+ (faviconChanged):
+ (browserWindowFinalize):
+ (browser_window_init):
+ (browserWindowConstructed):
+
+2012-10-03 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+
+ [Qt][DRT] Add support for overriding the "WebKitDisplayImagesKey" preference.
+ https://bugs.webkit.org/show_bug.cgi?id=98200
+
+ Reviewed by Csaba Osztrogonác.
+
+ * DumpRenderTree/qt/TestRunnerQt.cpp:
+ (TestRunner::overridePreference):
+
+2012-10-03 Zoltan Arvai <zarvai@inf.u-szeged.hu>
+
+ [Qt][WRT] Fix build error with MSVC on Windows.
+ https://bugs.webkit.org/show_bug.cgi?id=97697
+
+ Reviewed by Simon Hausmann.
+
+ WTR build is failing when WebKit directory is located on a longer path.
+ This seems to caused by source files that has the same name in
+ WTR and DRT directories. The solution is removing referencies
+ from Target.pri to DRT directory and adding an alternate version of
+ the required files to WTR. Those files simply include the real ones from DRT.
+
+ * WebKitTestRunner/InjectedBundle/Target.pri:
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.cpp: Added.
+ * WebKitTestRunner/InjectedBundle/qt/QtInitializeTestFonts.h: Added.
+
+2012-10-03 Christophe Dumez <christophe.dumez@intel.com>
+
+ [WK2][WKTR] TestRunner.setAlwaysAcceptCookies() causes flakiness
+ https://bugs.webkit.org/show_bug.cgi?id=98238
+
+ Reviewed by Csaba Osztrogonác.
+
+ Reset AlwaysAcceptCookies setting between tests to avoid
+ flakiness due to TestRunner.setAlwaysAcceptCookies().
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+
+2012-10-03 Harald Alvestrand <hta@google.com>
+
+ Add data passing to the GetStats interface of RTCPeerConnection
+ https://bugs.webkit.org/show_bug.cgi?id=98003
+
+ Reviewed by Adam Barth.
+
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
+ (RTCStatsRequestSucceededTask::RTCStatsRequestSucceededTask):
+ (MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
+ (MockWebRTCPeerConnectionHandler::addStream):
+ (MockWebRTCPeerConnectionHandler::removeStream):
+ (MockWebRTCPeerConnectionHandler::getStats):
+ * DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
+ (MockWebRTCPeerConnectionHandler):
+
+== Rolled over to ChangeLog-2012-10-02 ==
diff --git a/Tools/CodeCoverage/README b/Tools/CodeCoverage/README
deleted file mode 100644
index 7a855270f..000000000
--- a/Tools/CodeCoverage/README
+++ /dev/null
@@ -1,22 +0,0 @@
-Generate coverage on Mac
-
-call Tools/Script/generate-coverage-data
-
-or by hand
-
-
-# delete
-find . -name '*.gcda' -delete
-
-# build, -framework CoreFoundation might suffice as well
-Tools/Scripts/build-webkit GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES EXTRA_LINK=" -ftest-coverage -fprofile-arcs" OTHER_CFLAGS=" -MD " OTHER_LDFLAGS=" -ftest-coverage -fprofile-arcs -framework AppKit"
-Tools/Scripts/run-webkit-tests
-Tools/Scripts/run-javascriptcore-tests GCC_GENERATE_TEST_COVERAGE_FILES=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES EXTRA_LINK=" -ftest-coverage -fprofile-arcs" OTHER_CFLAGS=" -MD " OTHER_LDFLAGS=" -ftest-coverage -fprofile-arcs -framework AppKit"
-
-
-# Collect files
-Tools/CodeCoverage/run-generate-coverage-data <RUN_ID> ../coverage-results/
-
-
-# Generate graph
-Tools/CodeCoverage/regenerate-coverage-display ../coverage-results/ ../coverage-results/html
diff --git a/Tools/CodeCoverage/amber.png b/Tools/CodeCoverage/amber.png
deleted file mode 100644
index ee5d920d2..000000000
--- a/Tools/CodeCoverage/amber.png
+++ /dev/null
Binary files differ
diff --git a/Tools/CodeCoverage/cov.py b/Tools/CodeCoverage/cov.py
deleted file mode 100644
index 443e6016f..000000000
--- a/Tools/CodeCoverage/cov.py
+++ /dev/null
@@ -1,201 +0,0 @@
-# Copyright (C) 2004, 2005, 2006 Nathaniel Smith
-# Copyright (C) 2006, 2007 Holger Hans Peter Freyther
-#
-# 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 csv
-import time
-import os.path
-import shutil
-
-def analyze_coverage(possible_gcov_files, source_files, runid, data_dir, base):
-
- if not os.path.exists(data_dir):
- os.makedirs(data_dir)
-
- output = open(os.path.join(data_dir, runid + ".csv"), "w")
- w = csv.writer(output)
- # First row: id and time
- w.writerow([runid, time.time()])
-
- results = scan_gcov_files(possible_gcov_files, source_files)
- annotated_dir = os.path.join(data_dir, runid + ".annotated")
- if os.path.exists(annotated_dir):
- shutil.rmtree(annotated_dir)
-
- keys = results.keys()
- keys.sort()
- for path in keys:
- (total, covered, annotated_data) = results[path]
- path = path[path.find(base)+len(base):]
- # Rest of the rows: filename, total_lines, covered_lines
- w.writerow([path, total, covered])
-
- if path[:1] == "/":
- path = path[1:]
- annotated_path = os.path.join(annotated_dir, path)
- try:
- os.makedirs(os.path.dirname(annotated_path))
- except OSError:
- pass
- a = open(annotated_path, "w")
- a.write(annotated_data)
- a.close()
-
-
-# zecke's rewrite
-STATE_NOT_CODE = -1
-STATE_NOT_SEEN = -2
-STATE_TEST_CODE = -3
-
-def find_gcov(f, possible_gcovs):
- """
- Find .gcov files that could be of interest for us
- """
- try:
- return possible_gcovs[f]
- except:
- return []
-
-
-def parse_source_file(file):
- """
- Parse one source file and return a list of lines
- """
- f_source_list = []
- init_state = STATE_NOT_SEEN
- in_test_code = False
- nesting = 0
-
- for line in open(file, "r"):
- code = line.split(":", 2)[-1]
- if not in_test_code and code.startswith("#ifdef BUILD_UNIT_TESTS"):
- in_test_code = 1
- if in_test_code and code.startswith("#if"):
- nesting += 1
- if in_test_code and code.startswith("#endif"):
- nesting -= 1
- if not nesting:
- in_test_code = True
- if in_test_code:
- init_state = STATE_TEST_CODE
- else:
- init_state = STATE_NOT_SEEN
- f_source_list.append([init_state, line.split(":", 1)[1]])
-
- return f_source_list
-
-# Runner-up, 3rd annual "write Python that looks like Perl" competition,
-# Well, not really. It doesn't even use regexps.
-# He is right so I'm cleaning it up (zecke)
-def scan_gcov_files(possible_gcov_files, source_files):
- """Takes a list of gcov filenames and a list of source filenames.
-
- The gcov files should have names of the form foo.o##foo.cc.gcov, as
- created by 'gcov -l'.
-
- Returns a dict mapping source filenames to tuples
- (total_lines, tested_lines, gcov_annotated_source)
- which are a number, a number, and a very long string, respectively.
-
- The fun bit is that we merge .gcov output generated by different object
- files; this way we can provide accurate information for header files and
- for monotone's current unit test system."""
- results = {}
- for f in source_files:
- possible_gcovs = find_gcov(f, possible_gcov_files)
- base_name = os.path.splitext(os.path.basename(f))[0]
- if len(possible_gcovs) == 0:
- print "No gcov files found for: '%s' but it was compiled" % f
- continue
-
- (garbage,extension) = os.path.splitext(f)
- if extension in [".cc", ".c", ".moc", ".cpp", ".cxx", ".m", ".mm"]:
- lines = open(f, "r").readlines()
- results[f] = (len(lines), 0, "".join(lines))
- continue
- elif len(possible_gcovs) > 1:
- print "More than one gcov file for %s %d" % (f,len(possible_gcovs))
- base_gcov_lines = parse_source_file(possible_gcovs[0])
-
- # Now we will try hard to merge the results with others
- # Our requirement is that we have the same amount of lines as
- # as the original file
- for cov_file in possible_gcovs:
- lines = open(cov_file, "r").readlines()
-
- # e.g. with phonon we have visualisation.h and we can not know
- # which header file (foldername) it is refering to. This is a gcov
- # limitation and i have no workaround yet. We just hope we will pick
- # the right header file...
- if len(lines) != len(base_gcov_lines):
- print "Error Base: %s and Target: %s have different amount of lines" % (possible_gcovs[0],cov_file)
- continue
-
- # now do the merging of the file. If it has the same basename
- # and the same number of lines things might work out
- # In the future take a look at the header of the file
- i = 0
- for line in lines:
- accumulator = base_gcov_lines[i]
- if accumulator[0] != STATE_TEST_CODE:
- info = line.split(":", 1)[0]
- if info.endswith("-"):
- if accumulator[0] == STATE_NOT_SEEN:
- accumulator[0] = STATE_NOT_CODE
- else:
- if info.endswith("#"):
- num = 0
- else:
- num = int(info)
- if accumulator[0] in (STATE_NOT_SEEN, STATE_NOT_CODE):
- accumulator[0] = 0
- accumulator[0] += num
- i += 1
-
- # post processing of ths file
- (total_lines, total_covered) = (0, 0)
- annotated_lines = []
- for state, line in base_gcov_lines:
- if state == STATE_NOT_SEEN:
- desc = "?????"
- elif state == STATE_TEST_CODE:
- desc = "+"
- elif state == STATE_NOT_CODE:
- desc = "-"
- elif state == 0:
- desc = "#####"
- total_lines += 1
- else:
- desc = str(state)
- total_lines += 1
- total_covered += 1
- annotated_lines.append(":".join([desc.rjust(9), line]))
- results[f] = (total_lines, total_covered, "".join(annotated_lines))
- return results
-
-
-
- return results
diff --git a/Tools/CodeCoverage/emerald.png b/Tools/CodeCoverage/emerald.png
deleted file mode 100644
index 0e60294e4..000000000
--- a/Tools/CodeCoverage/emerald.png
+++ /dev/null
Binary files differ
diff --git a/Tools/CodeCoverage/gcov.css b/Tools/CodeCoverage/gcov.css
deleted file mode 100644
index 71ca0806c..000000000
--- a/Tools/CodeCoverage/gcov.css
+++ /dev/null
@@ -1,116 +0,0 @@
-body {
- color: black; background-color: white;
- font-family: Helvetica,Arial,sans-serif;
- margin: 0; padding: 0em;
- text-align: center;
-}
-
-.title {
- text-align:center;
- font-weight:bold;
- font-style:italic;
- font-size:1.8em;
- padding:10px;
-}
-
-.ruler {
- height:3px;
- background-color:#638AD6;
- margin-left:10px;
- margin-right:10px;
-}
-
-.headerItem {
- text-align:right;
- font-weight:bold;
-}
-
-.headerValue {
- text-align:left;
- font-weight:bold;
- color:#638AD6;
-}
-
-.tableHead {
- text-align:center;
- font-weight:bold;
- background-color:#638AD6;
- color:white;
-
-}
-
-.coverFile {
- font-family: Courier;
- background-color:#DEE7FF;
- padding:3px;
- width:70%;
-}
-
-.coverBar {
- background-color:#DEE7FF;
- padding:3px;
- width:5%;
-}
-
-.coverBarOutline {
-}
-
-.coverPerHi {
- font-family: Times;
- text-align:center;
- font-weight:bold;
- background-color:lightgreen;
- padding:3px;
- width:5%;
-}
-
-.coverNumHi {
- font-family: Times;
- text-align:right;
- background-color:lightgreen;
- padding:3px;
- width:25%;
-}
-
-.coverPerMed {
- font-family: Times;
- text-align:center;
- font-weight:bold;
- background-color:yellow;
- padding:3px;
-}
-
-.coverNumMed {
- font-family: Times;
- text-align:right;
- background-color:yellow;
- padding:3px;
-}
-
-.coverPerLo {
- font-family: Times;
- text-align:center;
- font-weight:bold;
- background-color:red;
- padding:3px;
-}
-
-.coverNumLo {
- font-family: Times;
- text-align:right;
- background-color:red;
- padding:3px;
-}
-
-.lineNum {
- background-color:#EFE384;
-}
-
-.lineCov {
- background-color:#CED7FF;
-}
-
-.lineNoCov {
- background-color:#FF6131;
-}
-
diff --git a/Tools/CodeCoverage/glass.png b/Tools/CodeCoverage/glass.png
deleted file mode 100644
index a4ba37375..000000000
--- a/Tools/CodeCoverage/glass.png
+++ /dev/null
Binary files differ
diff --git a/Tools/CodeCoverage/regenerate-coverage-display b/Tools/CodeCoverage/regenerate-coverage-display
deleted file mode 100755
index c25b41284..000000000
--- a/Tools/CodeCoverage/regenerate-coverage-display
+++ /dev/null
@@ -1,382 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (C) 2004, 2005, 2006 Nathaniel Smith
-# Copyright (C) 2007 Holger Hans Peter Freyther
-#
-# 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
-
-#
-# HTML output inspired by the output of lcov as found on the GStreamer
-# site. I assume this is not copyrightable.
-#
-
-
-#
-# Read all CSV files and
-# Create an overview file
-#
-#
-
-
-import sys
-import csv
-import glob
-import time
-import os
-import os.path
-import datetime
-import shutil
-
-os.environ["TTFPATH"] = ":".join(["/usr/share/fonts/truetype/" + d
- for d in "ttf-bitstream-vera",
- "freefont",
- "msttcorefonts"])
-
-level_LOW = 10
-level_MEDIUM = 70
-
-def copy_files(dest_dir):
- """
- Copy the CSS and the png's to the destination directory
- """
- images = ["amber.png", "emerald.png", "glass.png", "ruby.png", "snow.png"]
- css = "gcov.css"
- (base_path, name) = os.path.split(__file__)
- base_path = os.path.abspath(base_path)
-
- shutil.copyfile(os.path.join(base_path,css), os.path.join(dest_dir,css))
- map(lambda x: shutil.copyfile(os.path.join(base_path,x), os.path.join(dest_dir,x)), images)
-
-def sumcov(cov):
- return "%.2f%% (%s/%s)" % (cov[1] * 100.0 / (cov[0] or 1), cov[1], cov[0])
-
-def create_page(dest_dir, name):
- index = open(os.path.join(dest_dir, name), "w")
- index.write("""<HTML>
- <HEAD>
- <TITLE>WebKit test coverage information</TITLE>
- <link rel="stylesheet" type="text/css" href="gcov.css">
- </HEAD>
- <BODY>
- """)
- return index
-
-def generate_header(file, last_time, total_lines, total_executed, path, image):
- product = "WebKit"
- date = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime(last_time))
- covered_lines = sumcov((total_lines, total_executed))
-
- file.write("""<table width="100%%" border=0 cellspacing=0 cellpadding=0>
- <tr><td class="title">GCOV code coverage report</td></tr>
- <tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
-
- <tr>
- <td width="100%%">
- <table cellpadding=1 border=0 width="100%%">
- <tr>
- <td class="headerItem" width="20%%">Current&nbsp;view:</td>
- <td class="headerValue" width="80%%" colspan=4>%(path)s</td>
- </tr>
- <tr>
- <td class="headerItem" width="20%%">Test:</td>
- <td class="headerValue" width="80%%" colspan=4>%(product)s</td>
- </tr>
- <tr>
- <td class="headerItem" width="20%%">Date:</td>
- <td class="headerValue" width="20%%">%(date)s</td>
- <td width="20%%"></td>
- <td class="headerItem" width="20%%">Instrumented&nbsp;lines:</td>
- <td class="headerValue" width="20%%">%(total_lines)s</td>
- </tr>
- <tr>
- <td class="headerItem" width="20%%">Code&nbsp;covered:</td>
- <td class="headerValue" width="20%%">%(covered_lines)s</td>
- <td width="20%%"></td>
- <td class="headerItem" width="20%%">Executed&nbsp;lines:</td>
- <td class="headerValue" width="20%%">%(total_executed)s</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr><td class="ruler"><img src="glass.png" width=3 height=3 alt=""></td></tr>
- </table>""" % vars())
- # disabled for now <tr><td><img src="%(image)s"></td></tr>
-
-def generate_table_item(file, name, total_lines, covered_lines):
- covered_precise = (covered_lines*100.0)/(total_lines or 1.0)
- covered = int(round(covered_precise))
- remainder = 100-covered
- (image,perClass,numClass) = coverage_icon(covered_precise)
- site = "%s.html" % name.replace(os.path.sep,'__')
- file.write("""
- <tr>
- <td class="coverFile"><a href="%(site)s">%(name)s</a></td>
- <td class="coverBar" align="center">
- <table border=0 cellspacing=0 cellpadding=1><tr><td class="coverBarOutline"><img src="%(image)s" width=%(covered)s height=10 alt="%(covered_precise).2f"><img src="snow.png" width=%(remainder)s height=10 alt="%(covered_precise).2f"></td></tr></table>
- </td>
- <td class="%(perClass)s">%(covered_precise).2f&nbsp;%%</td>
- <td class="%(numClass)s">%(covered_lines)s&nbsp;/&nbsp;%(total_lines)s&nbsp;lines</td>
- </tr>
- """ % vars())
-
-def generate_table_header_start(file):
- file.write("""<center>
- <table width="80%%" cellpadding=2 cellspacing=1 border=0>
-
- <tr>
- <td width="50%%"><br></td>
- <td width="15%%"></td>
- <td width="15%%"></td>
- <td width="20%%"></td>
- </tr>
-
- <tr>
- <td class="tableHead">Directory&nbsp;name</td>
- <td class="tableHead" colspan=3>Coverage</td>
- </tr>
- """)
-
-def coverage_icon(percent):
- if percent < level_LOW:
- return ("ruby.png", "coverPerLo", "coverNumLo")
- elif percent < level_MEDIUM:
- return ("amber.png", "coverPerMed", "coverNumMed")
- else:
- return ("emerald.png", "coverPerHi", "coverNumHi")
-
-def replace(text, *pairs):
- """
- From pydoc... almost identical at least
- """
- from string import split, join
- while pairs:
- (a,b) = pairs[0]
- text = join(split(text, a), b)
- pairs = pairs[1:]
- return text
-
-def escape(text):
- """
- Escape string to be conform HTML
- """
- return replace(text,
- ('&', '&amp;'),
- ('<', '&lt;' ),
- ('>', '&gt;' ) )
-
-def generate_table_header_end(file):
- file.write("""</table>
- </center>""")
-
-def write_title_page(dest_dir, last_time, last_tot_lines, last_tot_covered, dir_series):
- """
- Write the index.html with a overview of each directory
- """
- index= create_page(dest_dir, "index.html")
- generate_header(index, last_time, last_tot_lines, last_tot_covered, "directory", "images/Total.png")
- # Create the directory overview
- generate_table_header_start(index)
- dirs = dir_series.keys()
- dirs.sort()
- for dir in dirs:
- (dir_files, total_lines, covered_lines,_) = dir_series[dir][-1]
- generate_table_item(index, dir, total_lines, covered_lines)
- generate_table_header_end(index)
-
- index.write("""</BODY></HTML>""")
- index.close()
-
-def write_directory_site(dest_dir, dir_name, last_time, dir_series, file_series):
- escaped_dir = dir_name.replace(os.path.sep,'__')
- site = create_page(dest_dir, "%s.html" % escaped_dir)
- (_,tot_lines,tot_covered,files) = dir_series[dir_name][-1]
- generate_header(site, last_time, tot_lines, tot_covered, "directory - %s" % dir_name, "images/%s.png" % escaped_dir)
-
- files.sort()
-
- generate_table_header_start(site)
- for file in files:
- (lines,covered) = file_series[file][-1]
- generate_table_item(site, file, lines, covered)
-
- generate_table_header_end(site)
- site.write("""</BODY></HTML>""")
- site.close()
-
-def write_file_site(dest_dir, file_name, last_time, data_dir, last_id, file_series):
- escaped_name = file_name.replace(os.path.sep,'__')
- site = create_page(dest_dir, "%s.html" % escaped_name)
- (tot_lines,tot_covered) = file_series[file_name][-1]
- generate_header(site, last_time, tot_lines, tot_covered, "file - %s" % file_name, "images/%s.png" % escaped_name)
-
- path = "%s/%s.annotated%s" % (data_dir,last_id,file_name)
-
- # In contrast to the lcov we want to show files that have been compiled
- # but have not been tested at all. This means we have sourcefiles with 0
- # lines covered in the path but they are not lcov files.
- # To identify them we check the first line now. If we see that we can
- # continue
- # -: 0:Source:
- try:
- file = open(path, "r")
- except:
- return
- all_lines = file.read().split("\n")
-
- # Convert the gcov file to HTML if we have a chanche to do so
- # Scan each line and see if it was covered or not and escape the
- # text
- if len(all_lines) == 0 or not "-: 0:Source:" in all_lines[0]:
- site.write("<p>The file was not excercised</p>")
- else:
- site.write("""</br><table cellpadding=0 cellspacing=0 border=0>
- <tr>
- <td><br></td>
- </tr>
- <tr>
- <td><pre class="source">
- """)
- for line in all_lines:
- split_line = line.split(':',2)
- # e.g. at the EOF
- if len(split_line) == 1:
- continue
- line_number = split_line[1].strip()
- if line_number == "0":
- continue
- covered = 15*" "
- end = ""
- if "#####" in split_line[0]:
- covered = '<span class="lineNoCov">%15s' % "0"
- end = "</span>"
- elif split_line[0].strip() != "-":
- covered = '<span class="lineCov">%15s' % split_line[0].strip()
- end = "</span>"
-
- escaped_line = escape(split_line[2])
- str = '<span class="lineNum">%(line_number)10s </span>%(covered)s: %(escaped_line)s%(end)s\n' % vars()
- site.write(str)
- site.write("</pre></td></tr></table>")
- site.write("</BODY></HTML>")
- site.close()
-
-def main(progname, args):
- if len(args) != 2:
- sys.exit("Usage: %s DATADIR OUTDIR" % progname)
-
- branch = "WebKit from trunk"
- datadir, outdir = args
-
- # First, load in all data from the data directory.
- data = []
- for datapath in glob.glob(os.path.join(datadir, "*.csv")):
- data.append(read_csv(datapath))
- # Sort by time
- data.sort()
-
- # Calculate time series for each file.
- times = [sample[0] for sample in data]
- times = [datetime.datetime.utcfromtimestamp(t) for t in times]
-
- all_files = {}
- all_dirs = {}
- for sample in data:
- t, i, tot_line, tot_cover, per_file, per_dir = sample
- all_files.update(per_file)
- all_dirs.update(per_dir)
- total_series = []
- file_serieses = dict([[k, [(0, 0)] * len(times)] for k in all_files.keys()])
- dir_serieses = dict([[k, [(0, 0, 0, [])] * len(times)] for k in all_dirs.keys()])
- data_idx = 0
- for sample in data:
- t, i, tot_line, tot_cover, per_file, per_dir = sample
- total_series.append([tot_line, tot_cover])
- for f, covinfo in per_file.items():
- file_serieses[f][data_idx] = covinfo
- for f, covinfo in per_dir.items():
- dir_serieses[f][data_idx] = covinfo
- data_idx += 1
-
-
- # Okay, ready to start outputting. First make sure our directories
- # exist.
- if not os.path.exists(outdir):
- os.makedirs(outdir)
- rel_imgdir = "images"
- imgdir = os.path.join(outdir, rel_imgdir)
- if not os.path.exists(imgdir):
- os.makedirs(imgdir)
-
-
- # And look up the latest revision id, and coverage information
- last_time, last_id, last_tot_lines, last_tot_covered = data[-1][:4]
-
- # Now start generating our html file
- copy_files(outdir)
- write_title_page(outdir, last_time, last_tot_lines, last_tot_covered, dir_serieses)
-
- dir_keys = dir_serieses.keys()
- dir_keys.sort()
- for dir_name in dir_keys:
- write_directory_site(outdir, dir_name, last_time, dir_serieses, file_serieses)
-
- file_keys = file_serieses.keys()
- for file_name in file_keys:
- write_file_site(outdir, file_name, last_time, datadir, last_id, file_serieses)
-
-def read_csv(path):
- r = csv.reader(open(path, "r"))
- # First line is id, time
- for row in r:
- id, time_str = row
- break
- time = int(float(time_str))
- # Rest of lines are path, total_lines, covered_lines
- per_file = {}
- per_dir = {}
- grand_total_lines, grand_covered_lines = 0, 0
- for row in r:
- path, total_lines_str, covered_lines_str = row
- total_lines = int(total_lines_str)
- covered_lines = int(covered_lines_str)
- grand_total_lines += total_lines
- grand_covered_lines += covered_lines
- per_file[path] = [total_lines, covered_lines]
-
- # Update dir statistics
- dirname = os.path.dirname(path)
- if not dirname in per_dir:
- per_dir[dirname] = (0,0,0,[])
- (dir_files,dir_total_lines,dir_covered_lines, files) = per_dir[dirname]
- dir_files += 1
- dir_total_lines += total_lines
- dir_covered_lines += covered_lines
- files.append(path)
- per_dir[dirname] = (dir_files,dir_total_lines,dir_covered_lines,files)
- return [time, id, grand_total_lines, grand_covered_lines, per_file, per_dir]
-
-if __name__ == "__main__":
- import sys
- main(sys.argv[0], sys.argv[1:])
diff --git a/Tools/CodeCoverage/results-template.html b/Tools/CodeCoverage/results-template.html
new file mode 100644
index 000000000..42c5c2480
--- /dev/null
+++ b/Tools/CodeCoverage/results-template.html
@@ -0,0 +1,358 @@
+<!doctype html>
+<html>
+ <head>
+ <style type='text/css'>
+ table, tr, td
+ {
+ border-spacing: 1px;
+ padding: 0px;
+ }
+ td.textColumn
+ {
+ white-space: nowrap;
+ font-family: Courier, monospace;
+ }
+
+ #directories, #codeviewer
+ {
+ overflow: scroll;
+ background-color: white;
+ position: absolute;
+ width: 50%;
+ height: 100%;
+ }
+
+ #directories
+ {
+ left: 0%;
+ }
+
+ #codeviewer
+ {
+ left: 50%;
+ }
+
+ ul
+ {
+ padding: 1px 0px 1px 8px;
+ margin: 0px;
+ list-style-type: none;
+ }
+
+ li.file
+ {
+ /* 8px is to match the width of downArrow and rightArrow because files don't have an image before them. */
+ padding: 0px 0px 0px 8px;
+ }
+
+ div.graphsContainer
+ {
+ right: 0px;
+ width: 300px;
+ position: absolute;
+ display: inline-block;
+ }
+ div.codeCoverage
+ {
+ right: 0px;
+ width: 150px;
+ position: absolute;
+ display: inline-block;
+ }
+ div.branchCoverage
+ {
+ right: 150px;
+ width: 150px;
+ position: absolute;
+ display: inline-block;
+ }
+
+ </style>
+ <script type='text/javascript'>
+
+ // This is the contents of the images left of directories.
+ var downArrow = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QYHFioBcCRLNAAAAJhJREFUGNOFzrEKwjAURuHTJHUspekDZGmhdlawCEqoUDK19O1cnX0dFxcnQXyIOAhKSsUzXr4Lf3Q8nf3leuNXy8IgBmeRYh5IAYOziDxLsdv1LNo3K/IsRQAcdhu0TgKgdUJnG4A3ipVk7NoAjV2LkvKLAKrSUBcGgLowVKX5PASTe2eJF4re2XCcn3R/PKcnH3nvPX96AbbuOGLOrLT1AAAAAElFTkSuQmCC';
+ var rightArrow = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QYHFiojpUQK0AAAAKZJREFUGNNjmL1k/f+379//xweYlXXMGo6dvcDw/x8jg7y0OAMzMzMDOmBiYGBg+PP7P8OO/ccYOqctZLh2+x52RTDw9t0nhtlLNjDMWbqB4d2HD9gVwcDVW/cYumcsZXj56i0DAwMDAws2RdqqCgwBHo4MIiKCmIqEBPgYgrycGbTVFVE0sTAwMDCwMjMyONqYMbjYWjCwsmL6jmH24rX/37zBH04AHAxpneY+98AAAAAASUVORK5CYII=';
+
+ function getHeatBackgroundColor(hits, maxHits)
+ {
+ if (hits === -1)
+ return 'white'; // Non-code lines are white.
+ else if (hits === 0)
+ return 'orange'; // Unexecuted lines are orange.
+ else {
+ // Executed lines are between red and green.
+ var relativeHeat = Math.floor(hits / maxHits * 255);
+ return 'rgb(' + relativeHeat + ',' + (255 - relativeHeat) + ', 0)';
+ }
+ }
+
+ function getCoverageBackgroundColor(coverage)
+ {
+ var value = Math.floor(coverage * 255);
+ return 'rgb(' + (255 - value) + ',' + value + ', 0)';
+ }
+
+ function expandClicked(event)
+ {
+ var children = this.parentNode.lastChild;
+ if (children.style.display === '') {
+ children.style.display = 'none';
+ this.src = rightArrow;
+ } else {
+ children.style.display = '';
+ this.src = downArrow;
+ }
+ }
+
+ function processFile(fileData, contents)
+ {
+ var lines = contents.split('\n');
+ var hits = new Array();
+ var branchesNumerator = new Array();
+ var branchesDenominator = new Array();
+
+ for (var i = 0; i < lines.length; i++) {
+ hits[i] = -1;
+ branchesNumerator[i] = -1;
+ branchesDenominator[i] = -1;
+ }
+
+ for (var i = 0; i < fileData.hitLines.length; i++)
+ hits[fileData.hitLines[i] - 1] = fileData.hits[i];
+
+ for (var i = 0; i < fileData.branchLines.length; i++) {
+ branchesNumerator[fileData.branchLines[i] - 1] = fileData.branchesTaken[i];
+ branchesDenominator[fileData.branchLines[i] - 1] = fileData.branchesPossible[i];
+ }
+
+ var table = document.createElement('table');
+
+ for (var i = 0; i < lines.length; i++) {
+ var row = document.createElement('tr');
+
+ var branchesColumn = document.createElement('td');
+ if (branchesNumerator[i] != -1)
+ branchesColumn.appendChild(document.createTextNode('(' + branchesNumerator[i] + '/' + branchesDenominator[i] + ')'));
+
+ var hitsColumn = document.createElement('td');
+ if (hits[i] != -1)
+ hitsColumn.appendChild(document.createTextNode(hits[i]));
+
+ var textColumn = document.createElement('td');
+ textColumn.style.background = getHeatBackgroundColor(hits[i], fileData.maxHeat);
+ textColumn.style.className = 'textColumn';
+ textColumn.appendChild(document.createTextNode(lines[i]));
+
+ row.appendChild(branchesColumn);
+ row.appendChild(hitsColumn);
+ row.appendChild(textColumn);
+ table.appendChild(row);
+ }
+
+ return table;
+ }
+
+ function fileClicked(event)
+ {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = function()
+ {
+ if (xhr.readyState === XMLHttpRequest.DONE) {
+ var codeviewer = document.getElementById('codeviewer');
+ codeviewer.replaceChild(processFile(xhr.fileData, xhr.responseText), codeviewer.firstChild);
+ }
+ }
+ xhr.fileData = event.target.fileData;
+ xhr.open('GET', '../../' + event.target.fileData.filename.substring(1), true);
+ xhr.send();
+ event.stopPropagation();
+ }
+
+ function makeGraphs(dirOrFile)
+ {
+ var codeCoverage = document.createElement('div');
+ codeCoverage.className = 'codeCoverage';
+ var codeCoveragePercent = dirOrFile.totalLines ? Math.floor(dirOrFile.totalHitLines / dirOrFile.totalLines * 100) + '%' : '-';
+ var codeCoverageText = codeCoveragePercent + ' (' + dirOrFile.totalHitLines + '/' + dirOrFile.totalLines + ')';
+ codeCoverage.appendChild(document.createTextNode(codeCoverageText));
+ codeCoverage.style.backgroundColor = getCoverageBackgroundColor(dirOrFile.coverage);
+
+ var branchCoverage = document.createElement('div');
+ branchCoverage.className = 'branchCoverage';
+ var branchCoveragePercent = dirOrFile.totalBranchesPossible ? Math.floor(dirOrFile.totalBranchesTaken / dirOrFile.totalBranchesPossible * 100) + '%' : '-';
+ branchCoverage.appendChild(document.createTextNode(branchCoveragePercent + ' (' + dirOrFile.totalBranchesTaken + '/' + dirOrFile.totalBranchesPossible + ')'));
+ branchCoverage.style.backgroundColor = getCoverageBackgroundColor(dirOrFile.branchCoverage);
+
+ var graphsContainer = document.createElement('div');
+ graphsContainer.className = 'graphsContainer';
+ graphsContainer.appendChild(codeCoverage);
+ graphsContainer.appendChild(branchCoverage);
+ return graphsContainer;
+ }
+
+ function makeFileListItem(fileData, filename)
+ {
+ var li = document.createElement('li');
+ li.className = 'file';
+ var a = document.createElement('a');
+ a.appendChild(document.createTextNode(filename));
+ a.href = '#';
+ a.addEventListener('click', fileClicked.bind(a));
+ a.fileData = fileData;
+ li.appendChild(a);
+ li.appendChild(makeGraphs(fileData));
+ return li;
+ }
+
+ function makeDirectoryListItem(dir, dirName)
+ {
+ var li = document.createElement('li');
+ var children = document.createElement('ul');
+
+ // Recursively add all sorted subdirectories and files.
+ var fileNames = dir.files ? Object.keys(dir.files).sort() : [];
+ var subdirNames = dir.subdirs ? Object.keys(dir.subdirs).sort() : [];
+ for (var i = 0; i < subdirNames.length; i++) {
+ var subdir = subdirNames[i];
+ children.appendChild(makeDirectoryListItem(dir.subdirs[subdir], subdir));
+ }
+ for (var i = 0; i < fileNames.length; i++) {
+ var file = fileNames[i];
+ children.appendChild(makeFileListItem(dir.files[file], file, dir.maxHeat, dir.totalHeat));
+ }
+
+ var img = document.createElement('img');
+ img.addEventListener('click', expandClicked.bind(img));
+
+ // These four directories are expanded by default.
+ if (dirName === '' || dirName === 'Source' || dirName === 'Tools' || dirName === 'WebKitBuild') {
+ img.src = downArrow;
+ children.style.display = '';
+ } else {
+ img.src = rightArrow;
+ children.style.display = 'none';
+ }
+
+ li.appendChild(img);
+ li.appendChild(document.createTextNode(dirName));
+ li.appendChild(makeGraphs(dir));
+ li.appendChild(children);
+ return li;
+ }
+
+ // Collect total coverage for a directory and its subdirectories.
+ function collectDirectoryTotals(directory)
+ {
+ directory.totalBranchesPossible = 0;
+ directory.totalBranchesTaken = 0;
+ directory.totalHitLines = 0;
+ directory.totalLines = 0;
+ directory.totalHeat = 0;
+ directory.maxHeat = 0;
+ if (directory.subdirs) {
+ for (var subdirName in directory.subdirs) {
+ var subdir = directory.subdirs[subdirName];
+
+ collectDirectoryTotals(subdir);
+
+ directory.totalBranchesPossible += subdir.totalBranchesPossible;
+ directory.totalBranchesTaken += subdir.totalBranchesTaken;
+ directory.totalHitLines += subdir.totalHitLines;
+ directory.totalLines += subdir.totalLines;
+ directory.totalHeat += subdir.totalHeat;
+ directory.maxHeat = Math.max(directory.maxHeat, subdir.maxHeat);
+ }
+ }
+ if (directory.files) {
+ for (var fileName in directory.files) {
+ var file = directory.files[fileName];
+
+ file.totalBranchesPossible = 0;
+ file.totalBranchesTaken = 0;
+ file.totalHitLines = 0;
+ file.totalLines = file.hitLines.length;
+ file.totalHeat = 0;
+
+ for (var i = 0; i < file.branchesPossible.length; i++) {
+ file.totalBranchesPossible += file.branchesPossible[i];
+ file.totalBranchesTaken += file.branchesTaken[i];
+ }
+ for (var i = 0; i < file.hits.length; i++) {
+ file.totalHeat += file.hits[i];
+ if (file.hits[i])
+ file.totalHitLines++;
+ }
+
+ directory.totalBranchesPossible += file.totalBranchesPossible;
+ directory.totalBranchesTaken += file.totalBranchesTaken;
+ directory.totalHitLines += file.totalHitLines;
+ directory.totalLines += file.totalLines;
+ directory.totalHeat += file.totalHeat;
+ directory.maxHeat = Math.max(directory.maxHeat, file.maxHeat);
+ }
+ }
+ directory.coverage = directory.totalHitLines / directory.totalLines;
+ directory.branchCoverage = directory.totalBranchesPossible ? directory.totalBranchesTaken / directory.totalBranchesPossible : 1;
+ }
+
+ function addFileToDirectory(filename, filedata, directory)
+ {
+ var slashIndex = filename.indexOf('/', 1);
+ if (slashIndex === -1) {
+ if (!directory.files)
+ directory.files = {};
+ directory.files[filename.substring(1)] = filedata;
+ } else {
+ if (!directory.subdirs)
+ directory.subdirs = {};
+ var subdirName = filename.substring(1, slashIndex);
+ if (!directory.subdirs[subdirName])
+ directory.subdirs[subdirName] = {};
+ addFileToDirectory(filename.substring(slashIndex), filedata, directory.subdirs[subdirName]);
+ }
+ }
+
+ function updateReport(data)
+ {
+ var rootDirectory = {};
+ for (var i = 0; i < data.length; i++)
+ addFileToDirectory(data[i].filename, data[i], rootDirectory);
+
+ collectDirectoryTotals(rootDirectory);
+
+ var report = document.createElement('div');
+ var codeCoverageHeader = document.createElement('div');
+ codeCoverageHeader.className = 'codeCoverage';
+ codeCoverageHeader.appendChild(document.createTextNode('Code Coverage'));
+ var branchCoverageHeader = document.createElement('div');
+ branchCoverageHeader.className = 'branchCoverage';
+ branchCoverageHeader.appendChild(document.createTextNode('Branch Coverage'));
+ var ul = document.createElement('ul');
+ ul.appendChild(makeDirectoryListItem(rootDirectory, ''));
+
+ report.appendChild(codeCoverageHeader);
+ report.appendChild(branchCoverageHeader);
+ report.appendChild(document.createTextNode('Directories'));
+ report.appendChild(ul);
+
+ var directories = document.getElementById('directories');
+ directories.replaceChild(report, directories.firstChild);
+ }
+
+ function bodyLoaded()
+ {
+ updateReport(JSON.parse(document.getElementById('json').textContent));
+ }
+
+ </script>
+ </head>
+ <body onload='bodyLoaded();'>
+ <div id='directories'>
+ loading data...
+ </div>
+ <div id='codeviewer'>
+ </div>
+ <script id='json' type='application/json'>%CoverageDataJSON%</script>
+ </body>
+</html>
diff --git a/Tools/CodeCoverage/ruby.png b/Tools/CodeCoverage/ruby.png
deleted file mode 100644
index a582d3587..000000000
--- a/Tools/CodeCoverage/ruby.png
+++ /dev/null
Binary files differ
diff --git a/Tools/CodeCoverage/run-generate-coverage-data b/Tools/CodeCoverage/run-generate-coverage-data
deleted file mode 100755
index a87da1dcd..000000000
--- a/Tools/CodeCoverage/run-generate-coverage-data
+++ /dev/null
@@ -1,240 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2004, 2005, 2006 Nathaniel Smith
-# Copyright (C) 2007 Holger Hans Peter Freyther
-#
-# 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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, sys
-
-# from BitBake
-def mkdirhier(dir):
- """Create a directory like 'mkdir -p', but does not complain if
- directory already exists like os.makedirs
- """
- try:
- os.makedirs(dir)
- except OSError, e:
- if e.errno != 17: raise e
-
-def collect_base(src,match_array):
- """
- Collect all files that match the match_array.
- """
-
- sources = []
- for root, dirs, files in os.walk(src):
- if ".svn" in root:
- continue
-
- for file in files:
- base,ext = os.path.splitext(file)
- if ext in match_array:
- sources.append( os.path.join(root, file) )
-
- return sources
-
-def collect_depends(src):
- return collect_base(src, [".d"])
-
-def parse_dependency_file(src, base_dir, black_list):
- """
- Parse the .d files of the gcc
-
- Wow, the first time os.path.join is doing the right thing. We might
- have a relative path in the depends using os.path.join(dirname of .d, dep)
- we will end up in
- """
- file = open(src)
- file = file.read()
- file = file.replace('\\', '').replace('\n', '')
-
- # We now have object: dependencies splitted
- ar = file.split(':', 1)
- obj = ar[0].strip()
- dir = os.path.dirname(obj)
- deps = ar[1].split(' ')
-
- # Remove files outside WebKit, make path absolute
- deps = filter(lambda x: base_dir in x, deps)
- deps = map(lambda x: os.path.abspath(os.path.join(dir, x)), deps)
- return (obj, dir, deps)
-
-def collect_cov(base_path,targets):
- """
- Collect gcov files, collect_sources is not used as it also creates
- dirs and needs to do substituting.
- Actually we will build a mapping from source file to gcov files of
- interest. This is because we could have bytestream.h in many different
- subdirectories. And we would endup with bla.cpp##bytestream.h and we
- do not know which bytestream file was tested
- """
- def find_source_file(root,cov_file):
- """ Find a Source line or crash
-
- '#Users#ich#projekte#src#threadmessage.cpp###space#dports#include#qt3#qstring.h.gcov'
- '#Users#ich#projekte#src#threadmessage.cpp##..#^#src#threadmessage.cpp.gcov'
-
- ### is absolute path
- ##..#^# is relative path... well a gcov bug as well
- ## normal split file in the same directory
- """
- if '###' in cov_file:
- split = cov_file.split('###')
- if not len(split) == 2:
- raise "Unexpected split result"
- filepath = split[1][:-5].replace('#',os.path.sep)
- return os.path.join(os.path.sep,filepath)
- elif '##..#^#' in cov_file:
- split = cov_file.split('##..#^#')
- if not len(split) == 2:
- raise "Unexpected split result"
- filepath = split[1][:-5].replace('#',os.path.sep)
- return os.path.abspath(os.path.join(root,os.path.pardir,os.path.pardir,filepath))
- elif '##' in cov_file:
- split = cov_file.split('##')
- if not len(split) == 2:
- raise "Unexpected split result"
- filepath = split[1][:-5].replace('#',os.path.sep)
- return os.path.abspath(os.path.join(root,filepath))
- elif '#' in cov_file:
- # wow a not broken gcov on OSX
- basename=os.path.basename(cov_file).replace('#',os.path.sep)[:-5]
- return os.path.abspath(os.path.join(root,basename))
-
- else:
- raise "No source found %s" % cov_file
-
- def sanitize_path(path):
- """
- Well fix up paths once again /usr/lib/gcc/i486-linux-gnu/4.1.2/^/^/^/^/include/c++/4.1.2/bits/stl_pair.h
- according to gcov '^' is a relative path, we will now build one from this one. Somehow it depends
- on the gcov version if .. really gets replaced to ^....
- """
- import os
- split = path.split(os.path.sep)
- str = ""
- for part in split:
- if part == '':
- str = os.path.sep
- elif part == '^':
- str = "%s..%s" % (str,os.path.sep)
- else:
- str = "%s%s%s" % (str,part,os.path.sep)
- return os.path.abspath(str)
-
-
- gcov = {}
- for root, dirs, files in os.walk(base_path):
- if ".svn" in root:
- continue
- for file in files:
- base,ext = os.path.splitext(file)
- if ext in [".gcov"]:
- try:
- cov = os.path.join(root, file)
- src = find_source_file( root, cov )
- src = sanitize_path( src )
-
- if not src in gcov:
- gcov[src] = []
- gcov[src].append( cov )
- except Exception,e:
- print "Exception on ", e
- #import sys
- #sys.exit(0)
- pass
-
- #print gcov
- return gcov
-
-def generate_covs(candidates):
- """
- Generate gcov files in the right directory
-
- candidtaes contains the directories we have used when
- building. Each directory contains a set of files we will
- try to generate gcov files for.
- """
- print candidates.keys()
- for dir in candidates.keys():
- print "Trying in %s" % (dir)
- for dep in candidates[dir].keys():
- cmd = "cd %s; gcov -p -l %s" % (dir, dep)
- os.system("%s > /dev/null 2>&1 " % cmd)
-
-
-def analyze_coverage(sources,data,dirs,runid,base):
- """
- sources actual source files relative to src_dir e.g kdelibs/kdecore/klibloader.cpp
- data Where to put the stuff
- dirs Where to take a look for gcov files
- base The base directory for files. All files not inside base will be ignored
- """
- import cov
- print base
- gcov = collect_cov(base,dirs)
- result = cov.analyze_coverage(gcov, sources, runid, data, base)
- print result
-
-if __name__ == "__main__":
- #global targets
- if not len(sys.argv) == 3:
- print "This script needs three parameters"
- print "Call it with generate_cov RUNID ResultsDir"
- sys.exit(-1)
- runid = sys.argv[1]
- results = sys.argv[2]
-
- # create directories for out result
- mkdirhier(results)
-
- print "Collection Sources and preparing data tree"
- base_dir = os.path.abspath(os.path.curdir)
- depends = collect_depends(base_dir)
- candidates = map(lambda x: parse_dependency_file(x,base_dir,[]), depends)
-
- # Build a number of sources from the candidates. This is a Set for the poor
- # Two level dict. One for
- dirs = {}
- files = {}
- for (_,dir,deps) in candidates:
- if not dir in dirs:
- dirs[dir] = {}
- for dep in deps:
- if not dep in dirs[dir]:
- dirs[dir][dep] = dep
- if not dep in files:
- files[dep] = dep
-
- sources = files.keys()
-
- print "Found %d candidates" % (len(sources))
- print "Will run inefficient generation of gcov files now"
- generate_covs(dirs)
-
- print "Analyzing Gcov"
- analyze_coverage(sources, results, dirs.keys(), runid, base_dir)
- print "Done"
diff --git a/Tools/CodeCoverage/snow.png b/Tools/CodeCoverage/snow.png
deleted file mode 100644
index a4ba37375..000000000
--- a/Tools/CodeCoverage/snow.png
+++ /dev/null
Binary files differ
diff --git a/Tools/DumpRenderTree/AccessibilityController.cpp b/Tools/DumpRenderTree/AccessibilityController.cpp
index 49d453a84..80c689c68 100644
--- a/Tools/DumpRenderTree/AccessibilityController.cpp
+++ b/Tools/DumpRenderTree/AccessibilityController.cpp
@@ -24,6 +24,9 @@
*/
#include "config.h"
+
+#if HAVE(ACCESSIBILITY)
+
#include "AccessibilityController.h"
#include "AccessibilityUIElement.h"
@@ -162,3 +165,4 @@ void AccessibilityController::resetToConsistentState()
setLogScrollingStartEvents(false);
setLogAccessibilityEvents(false);
}
+#endif // HAVE(ACCESSIBILITY)
diff --git a/Tools/DumpRenderTree/AccessibilityController.h b/Tools/DumpRenderTree/AccessibilityController.h
index a6cdc4686..1bb066fa0 100644
--- a/Tools/DumpRenderTree/AccessibilityController.h
+++ b/Tools/DumpRenderTree/AccessibilityController.h
@@ -34,6 +34,9 @@
#if PLATFORM(WIN)
#include <windows.h>
#endif
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+#include <atk/atk.h>
+#endif
class AccessibilityController {
public:
@@ -65,6 +68,10 @@ public:
void winNotificationReceived(PlatformUIElement, const std::string& eventName);
#endif
+#if HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
+ AtkObject* childElementById(AtkObject* parent, const char* id);
+#endif
+
private:
static JSClassRef getJSClass();
diff --git a/Tools/DumpRenderTree/AccessibilityUIElement.cpp b/Tools/DumpRenderTree/AccessibilityUIElement.cpp
index b079d9a85..77d11a221 100644
--- a/Tools/DumpRenderTree/AccessibilityUIElement.cpp
+++ b/Tools/DumpRenderTree/AccessibilityUIElement.cpp
@@ -24,9 +24,14 @@
*/
#include "config.h"
+
+#if HAVE(ACCESSIBILITY)
+
#include "AccessibilityUIElement.h"
+#include <JavaScriptCore/JSObjectRef.h>
#include <JavaScriptCore/JSRetainPtr.h>
+#include <limits.h>
// Static Functions
@@ -201,22 +206,24 @@ static JSValueRef uiElementForSearchPredicateCallback(JSContextRef context, JSOb
{
AccessibilityUIElement* startElement = 0;
bool isDirectionNext = true;
- JSStringRef searchKey = 0;
+ bool visibleOnly = false;
+ JSValueRef searchKey = 0;
JSStringRef searchText = 0;
- if (argumentCount == 4) {
+ if (argumentCount == 5) {
JSObjectRef startElementObject = JSValueToObject(context, arguments[0], exception);
if (startElementObject)
startElement = toAXElement(startElementObject);
- isDirectionNext = JSValueToBoolean(context, arguments[1]);
- if (JSValueIsString(context, arguments[2]))
- searchKey = JSValueToStringCopy(context, arguments[2], exception);
+ isDirectionNext = JSValueToBoolean(context, arguments[1]);
+
+ searchKey = arguments[2];
+
if (JSValueIsString(context, arguments[3]))
searchText = JSValueToStringCopy(context, arguments[3], exception);
+
+ visibleOnly = JSValueToBoolean(context, arguments[4]);
}
-
- JSObjectRef resultObject = AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->uiElementForSearchPredicate(startElement, isDirectionNext, searchKey, searchText));
- if (searchKey)
- JSStringRelease(searchKey);
+ JSObjectRef resultObject = AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->uiElementForSearchPredicate(context, startElement, isDirectionNext, searchKey, searchText, visibleOnly));
+
if (searchText)
JSStringRelease(searchText);
@@ -233,6 +240,61 @@ static JSValueRef indexOfChildCallback(JSContextRef context, JSObjectRef functio
return JSValueMakeNumber(context, (double)toAXElement(thisObject)->indexOfChild(childElement));
}
+#if PLATFORM(IOS)
+
+static JSValueRef headerElementAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 1)
+ return 0;
+
+ unsigned index = JSValueToNumber(context, arguments[0], exception);
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->headerElementAtIndex(index));
+}
+
+static JSValueRef linkedElementCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ return AccessibilityUIElement::makeJSAccessibilityUIElement(context, toAXElement(thisObject)->linkedElement());
+}
+
+static JSValueRef elementsForRangeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount != 2)
+ return 0;
+
+ unsigned location = JSValueToNumber(context, arguments[0], exception);
+ unsigned length = JSValueToNumber(context, arguments[1], exception);
+
+ Vector<AccessibilityUIElement> elements;
+ toAXElement(thisObject)->elementsForRange(location, length, elements);
+
+ unsigned elementsSize = elements.size();
+ JSValueRef valueElements[elementsSize];
+ for (unsigned k = 0; k < elementsSize; ++k)
+ valueElements[k] = AccessibilityUIElement::makeJSAccessibilityUIElement(context, elements[k]);
+
+ return JSObjectMakeArray(context, elementsSize, valueElements, 0);
+}
+
+static JSValueRef increaseTextSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->increaseTextSelection();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef decreaseTextSelectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->decreaseTextSelection();
+ return JSValueMakeUndefined(context);
+}
+
+static JSValueRef assistiveTechnologySimulatedFocusCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->assistiveTechnologySimulatedFocus();
+ return JSValueMakeUndefined(context);
+}
+
+#endif
+
static JSValueRef childAtIndexCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
int indexNumber = -1;
@@ -361,16 +423,19 @@ static JSValueRef isAttributeSettableCallback(JSContextRef context, JSObjectRef
return result;
}
+static JSValueRef isPressActionSupportedCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isPressActionSupported());
+}
-static JSValueRef isActionSupportedCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef isIncrementActionSupportedCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
- JSStringRef action = 0;
- if (argumentCount == 1)
- action = JSValueToStringCopy(context, arguments[0], exception);
- JSValueRef result = JSValueMakeBoolean(context, toAXElement(thisObject)->isActionSupported(action));
- if (action)
- JSStringRelease(action);
- return result;
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isIncrementActionSupported());
+}
+
+static JSValueRef isDecrementActionSupportedCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->isDecrementActionSupported());
}
static JSValueRef boolAttributeValueCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
@@ -480,6 +545,12 @@ static JSValueRef pressCallback(JSContextRef context, JSObjectRef function, JSOb
return JSValueMakeUndefined(context);
}
+static JSValueRef scrollToMakeVisibleCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ toAXElement(thisObject)->scrollToMakeVisible();
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef takeFocusCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
toAXElement(thisObject)->takeFocus();
@@ -787,6 +858,12 @@ static JSValueRef getInsertionPointLineNumberCallback(JSContextRef context, JSOb
return JSValueMakeNumber(context, toAXElement(thisObject)->insertionPointLineNumber());
}
+static JSValueRef getPathDescriptionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> pathDescription(Adopt, toAXElement(thisObject)->pathDescription());
+ return JSValueMakeString(context, pathDescription.get());
+}
+
static JSValueRef getSelectedTextRangeCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
{
JSRetainPtr<JSStringRef> selectedTextRange(Adopt, toAXElement(thisObject)->selectedTextRange());
@@ -940,10 +1017,87 @@ static JSValueRef removeNotificationListenerCallback(JSContextRef context, JSObj
return JSValueMakeUndefined(context);
}
+#if PLATFORM(IOS)
+
+static JSValueRef stringForSelectionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> labelString(Adopt, toAXElement(thisObject)->stringForSelection());
+ return JSValueMakeString(context, labelString.get());
+}
+
+static JSValueRef getIPhoneLabelCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> labelString(Adopt, toAXElement(thisObject)->iphoneLabel());
+ return JSValueMakeString(context, labelString.get());
+}
+
+static JSValueRef getIPhoneHintCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> hintString(Adopt, toAXElement(thisObject)->iphoneHint());
+ return JSValueMakeString(context, hintString.get());
+}
+
+static JSValueRef getIPhoneValueCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->iphoneValue());
+ return JSValueMakeString(context, valueString.get());
+}
+
+static JSValueRef getIPhoneIdentifierCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->iphoneIdentifier());
+ return JSValueMakeString(context, valueString.get());
+}
+
+
+static JSValueRef getIPhoneTraitsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->iphoneTraits());
+ return JSValueMakeString(context, valueString.get());
+}
+
+static JSValueRef getIPhoneIsElementCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeBoolean(context, toAXElement(thisObject)->iphoneIsElement());
+}
+
+static JSValueRef getIPhoneElementTextPositionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->iphoneElementTextPosition());
+}
+
+static JSValueRef getIPhoneElementTextLengthCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ return JSValueMakeNumber(context, toAXElement(thisObject)->iphoneElementTextLength());
+}
+
+#endif // PLATFORM(IOS)
+
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+static JSValueRef supportedActionsCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->supportedActions());
+ return JSValueMakeString(context, valueString.get());
+}
+
+static JSValueRef mathPostscriptsDescriptionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->mathPostscriptsDescription());
+ return JSValueMakeString(context, valueString.get());
+}
+
+static JSValueRef mathPrescriptsDescriptionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+ JSRetainPtr<JSStringRef> valueString(Adopt, toAXElement(thisObject)->mathPrescriptsDescription());
+ return JSValueMakeString(context, valueString.get());
+}
+
+#endif
+
// Implementation
// Unsupported methods on various platforms.
-#if !PLATFORM(MAC)
+#if !PLATFORM(MAC) || PLATFORM(IOS)
JSStringRef AccessibilityUIElement::speak() { return 0; }
JSStringRef AccessibilityUIElement::rangeForLine(int line) { return 0; }
JSStringRef AccessibilityUIElement::rangeForPosition(int, int) { return 0; }
@@ -955,9 +1109,15 @@ AccessibilityUIElement AccessibilityUIElement::verticalScrollbar() const { retur
AccessibilityUIElement AccessibilityUIElement::uiElementAttributeValue(JSStringRef) const { return 0; }
#endif
+#if !PLATFORM(MAC) && !PLATFORM(IOS)
+JSStringRef AccessibilityUIElement::pathDescription() const { return 0; }
+#endif
+
#if !PLATFORM(WIN)
bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
{
+ if (!otherElement)
+ return false;
return platformUIElement() == otherElement->platformUIElement();
}
#endif
@@ -1071,6 +1231,7 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "intValue", getIntValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "minValue", getMinValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "maxValue", getMaxValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "pathDescription", getPathDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "childrenCount", getChildrenCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "rowCount", rowCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "columnCount", columnCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -1104,6 +1265,22 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "selectedChildrenCount", selectedChildrenCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "horizontalScrollbar", horizontalScrollbarCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "verticalScrollbar", verticalScrollbarCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+#if PLATFORM(IOS)
+ { "iphoneLabel", getIPhoneLabelCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneHint", getIPhoneHintCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneValue", getIPhoneValueCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneIdentifier", getIPhoneIdentifierCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneTraits", getIPhoneTraitsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneIsElement", getIPhoneIsElementCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneElementTextPosition", getIPhoneElementTextPositionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "iphoneElementTextLength", getIPhoneElementTextLengthCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "stringForSelection", stringForSelectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+#endif // PLATFORM(IOS)
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+ { "supportedActions", supportedActionsCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mathPostscriptsDescription", mathPostscriptsDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "mathPrescriptsDescription", mathPrescriptsDescriptionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+#endif
{ 0, 0, 0, 0 }
};
@@ -1143,7 +1320,9 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "boolAttributeValue", boolAttributeValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isAttributeSupported", isAttributeSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "isAttributeSettable", isAttributeSettableCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "isActionSupported", isActionSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isPressActionSupported", isPressActionSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isIncrementActionSupported", isIncrementActionSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "isDecrementActionSupported", isDecrementActionSupportedCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "parentElement", parentElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "disclosedByRow", disclosedByRowCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "increment", incrementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -1178,6 +1357,16 @@ JSClassRef AccessibilityUIElement::getJSClass()
{ "stringForTextMarkerRange", stringForTextMarkerRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setSelectedChild", setSelectedChildCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "selectedChildAtIndex", selectedChildAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "scrollToMakeVisible", scrollToMakeVisibleCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+#if PLATFORM(IOS)
+ { "linkedElement", linkedElementCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "headerElementAtIndex", headerElementAtIndexCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "elementsForRange", elementsForRangeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "increaseTextSelection", increaseTextSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "decreaseTextSelection", decreaseTextSelectionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "assistiveTechnologySimulatedFocus", assistiveTechnologySimulatedFocusCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+
+#endif
{ 0, 0, 0 }
};
@@ -1189,3 +1378,4 @@ JSClassRef AccessibilityUIElement::getJSClass()
static JSClassRef accessibilityUIElementClass = JSClassCreate(&classDefinition);
return accessibilityUIElementClass;
}
+#endif
diff --git a/Tools/DumpRenderTree/AccessibilityUIElement.h b/Tools/DumpRenderTree/AccessibilityUIElement.h
index b5b23d8bd..ebbf7f3d4 100644
--- a/Tools/DumpRenderTree/AccessibilityUIElement.h
+++ b/Tools/DumpRenderTree/AccessibilityUIElement.h
@@ -45,7 +45,7 @@ typedef struct objc_object* PlatformUIElement;
#include <oleacc.h>
typedef COMPtr<IAccessible> PlatformUIElement;
-#elif PLATFORM(GTK)
+#elif HAVE(ACCESSIBILITY) && (PLATFORM(GTK) || PLATFORM(EFL))
#include <atk/atk.h>
typedef AtkObject* PlatformUIElement;
#else
@@ -109,7 +109,9 @@ public:
bool boolAttributeValue(JSStringRef attribute);
bool isAttributeSupported(JSStringRef attribute);
bool isAttributeSettable(JSStringRef attribute);
- bool isActionSupported(JSStringRef action);
+ bool isPressActionSupported();
+ bool isIncrementActionSupported();
+ bool isDecrementActionSupported();
JSStringRef role();
JSStringRef subrole();
JSStringRef roleDescription();
@@ -127,6 +129,7 @@ public:
double intValue() const;
double minValue();
double maxValue();
+ JSStringRef pathDescription() const;
JSStringRef valueDescription();
int insertionPointLineNumber();
JSStringRef selectedTextRange();
@@ -197,8 +200,15 @@ public:
JSStringRef stringForRange(unsigned location, unsigned length);
JSStringRef attributedStringForRange(unsigned location, unsigned length);
bool attributedStringRangeIsMisspelled(unsigned location, unsigned length);
- AccessibilityUIElement uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText);
-
+ AccessibilityUIElement uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly);
+#if PLATFORM(IOS)
+ void elementsForRange(unsigned location, unsigned length, Vector<AccessibilityUIElement>& elements);
+ JSStringRef stringForSelection();
+ void increaseTextSelection();
+ void decreaseTextSelection();
+ AccessibilityUIElement linkedElement();
+#endif
+
// Table-specific
AccessibilityUIElement cellForColumnAndRow(unsigned column, unsigned row);
@@ -232,6 +242,29 @@ public:
// Make sure you call remove, because you can't rely on objects being deallocated in a timely fashion.
void removeNotificationListener();
+#if PLATFORM(IOS)
+ JSStringRef iphoneLabel();
+ JSStringRef iphoneValue();
+ JSStringRef iphoneTraits();
+ JSStringRef iphoneHint();
+ JSStringRef iphoneIdentifier();
+ bool iphoneIsElement();
+ int iphoneElementTextPosition();
+ int iphoneElementTextLength();
+ AccessibilityUIElement headerElementAtIndex(unsigned);
+ // This will simulate the accessibilityDidBecomeFocused API in UIKit.
+ void assistiveTechnologySimulatedFocus();
+#endif // PLATFORM(IOS)
+
+#if PLATFORM(MAC) && !PLATFORM(IOS)
+ // Returns an ordered list of supported actions for an element.
+ JSStringRef supportedActions();
+
+ // A general description of the elements making up multiscript pre/post objects.
+ JSStringRef mathPostscriptsDescription() const;
+ JSStringRef mathPrescriptsDescription() const;
+#endif
+
private:
static JSClassRef getJSClass();
PlatformUIElement m_element;
diff --git a/Tools/DumpRenderTree/DefaultPolicyDelegate.h b/Tools/DumpRenderTree/DefaultPolicyDelegate.h
new file mode 100644
index 000000000..6ff5becca
--- /dev/null
+++ b/Tools/DumpRenderTree/DefaultPolicyDelegate.h
@@ -0,0 +1,13 @@
+//
+// DefaultPolicyDelegate.h
+// DumpRenderTree
+//
+// Created by Anders Carlsson on 7/9/13.
+//
+//
+
+#import <WebKit/WebDefaultPolicyDelegate.h>
+
+@interface DefaultPolicyDelegate : WebDefaultPolicyDelegate
+
+@end
diff --git a/Tools/DumpRenderTree/DefaultPolicyDelegate.m b/Tools/DumpRenderTree/DefaultPolicyDelegate.m
new file mode 100644
index 000000000..4515bfb0e
--- /dev/null
+++ b/Tools/DumpRenderTree/DefaultPolicyDelegate.m
@@ -0,0 +1,34 @@
+//
+// DefaultPolicyDelegate.m
+// DumpRenderTree
+//
+// Created by Anders Carlsson on 7/9/13.
+//
+//
+
+#import "DefaultPolicyDelegate.h"
+
+#import <WebKit/WebPolicyDelegatePrivate.h>
+#import <WebKit/WebViewPrivate.h>
+
+@implementation DefaultPolicyDelegate
+
+- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id <WebPolicyDecisionListener>)listener
+{
+ if ([WebView _canHandleRequest:request]) {
+ [listener use];
+ return;
+ }
+
+ WebNavigationType navType = [[actionInformation objectForKey:WebActionNavigationTypeKey] intValue];
+ if (navType == WebNavigationTypePlugInRequest) {
+ [listener use];
+ return;
+ }
+
+ // The default WebKit policy delegate passes the URL along to -[NSWorkspace openURL:] here,
+ // but we don't want to do that so we just ignore the navigation completely.
+ [listener ignore];
+}
+
+@end
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp b/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
deleted file mode 100644
index cc8333209..000000000
--- a/Tools/DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp
+++ /dev/null
@@ -1,544 +0,0 @@
-#
-# Copyright (C) 2011 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.
-#
-
-{
- 'variables': {
- 'ahem_path': '../../DumpRenderTree/qt/fonts/AHEM____.TTF',
- 'tools_dir': '../..',
- 'source_dir': '../../../Source',
- 'conditions': [
- # Location of the chromium src directory and target type is different
- # if webkit is built inside chromium or as standalone project.
- ['inside_chromium_build==0', {
- # Webkit is being built outside of the full chromium project.
- # e.g. via build-webkit --chromium
- 'chromium_src_dir': '<(source_dir)/WebKit/chromium',
- },{
- # WebKit is checked out in src/chromium/third_party/WebKit
- 'chromium_src_dir': '<(tools_dir)/../../..',
- }],
- ],
- },
- 'includes': [
- '../DumpRenderTree.gypi',
- '../../../Source/WebKit/chromium/features.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'ImageDiff',
- 'type': 'executable',
- 'dependencies': [
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support_gfx',
- ],
- 'include_dirs': [
- '<(DEPTH)',
- ],
- 'sources': [
- '<(tools_dir)/DumpRenderTree/chromium/ImageDiff.cpp',
- ],
- 'conditions': [
- ['OS=="android" and android_build_type==0', {
- # The Chromium Android port will compare images on host rather
- # than target (a device or emulator) for performance reasons.
- 'toolsets': ['host'],
- }],
- ['OS=="android" and android_build_type!=0', {
- 'type': 'none',
- }],
- ],
- },
- {
- 'target_name': 'TestRunner',
- 'type': 'static_library',
- 'defines': [
- 'WEBTESTRUNNER_IMPLEMENTATION=1',
- ],
- 'dependencies': [
- 'TestRunner_resources',
- '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
- '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit_wtf_support',
- '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit_test_support',
- '<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
- ],
- 'include_dirs': [
- '<(chromium_src_dir)',
- '<(source_dir)/WebKit/chromium/public',
- '<(DEPTH)',
- '../chromium/TestRunner/public',
- '../chromium/TestRunner/src',
- '../../../Source',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../chromium/TestRunner/public',
- '../../../Source',
- ],
- },
- 'sources': [
- '<@(test_runner_files)',
- ],
- 'conditions': [
- ['toolkit_uses_gtk == 1', {
- 'defines': [
- 'WTF_USE_GTK=1',
- ],
- 'dependencies': [
- '<(chromium_src_dir)/build/linux/system.gyp:gtk',
- ],
- 'include_dirs': [
- '<(source_dir)/WebKit/chromium/public/gtk',
- ],
- }],
- ],
- },
- {
- 'target_name': 'TestRunner_resources',
- 'type': 'none',
- 'dependencies': [
- 'ImageDiff',
- 'copy_TestNetscapePlugIn',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'dependencies': [
- 'LayoutTestHelper',
- ],
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)',
- 'files': ['<(ahem_path)'],
- }],
- }],
- ['OS=="mac"', {
- 'dependencies': [
- 'LayoutTestHelper',
- ],
- 'all_dependent_settings': {
- 'mac_bundle_resources': [
- '<(ahem_path)',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
- '<(tools_dir)/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/missingImage.png',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
- ],
- },
- }],
- ['use_x11 == 1', {
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- '<(ahem_path)',
- '<(tools_dir)/DumpRenderTree/chromium/fonts.conf',
- ]
- }],
- }],
- ['OS=="android"', {
- 'dependencies!': [
- 'ImageDiff',
- 'copy_TestNetscapePlugIn',
- ],
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- '<(ahem_path)',
- '<(tools_dir)/DumpRenderTree/chromium/android_main_fonts.xml',
- '<(tools_dir)/DumpRenderTree/chromium/android_fallback_fonts.xml',
- ]
- }],
- }],
- ['OS=="android" and android_build_type==0', {
- 'dependencies': [
- 'ImageDiff#host',
- ],
- }],
- ],
- },
- {
- 'target_name': 'DumpRenderTree',
- 'type': 'executable',
- 'mac_bundle': 1,
- 'dependencies': [
- 'TestRunner',
- '<(source_dir)/WebKit/chromium/WebKit.gyp:inspector_resources',
- '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
- '<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
- '<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
- '<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
- '<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa',
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
- ],
- 'include_dirs': [
- '<(chromium_src_dir)',
- '<(source_dir)/WebKit/chromium/public',
- '<(tools_dir)/DumpRenderTree',
- '<(DEPTH)',
- ],
- 'defines': [
- # Technically not a unit test but require functions available only to
- # unit tests.
- 'UNIT_TEST',
- ],
- 'sources': [
- '<@(drt_files)',
- ],
- 'conditions': [
- ['OS=="mac" or OS=="win" or toolkit_uses_gtk==1', {
- # These platforms have their own implementations of
- # checkLayoutTestSystemDependencies() and openStartupDialog().
- 'sources/': [
- ['exclude', 'TestShellStub\\.cpp$'],
- ],
- }],
- ['OS=="win"', {
- 'dependencies': [
- '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:libEGL',
- '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:libGLESv2',
- ],
- 'resource_include_dirs': ['<(SHARED_INTERMEDIATE_DIR)/webkit'],
- 'sources': [
- '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.rc',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.rc',
- ],
- 'conditions': [
- ['inside_chromium_build==1', {
- 'configurations': {
- 'Debug_Base': {
- 'msvs_settings': {
- 'VCLinkerTool': {
- 'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
- },
- },
- },
- },
- }],
- ],
- },{ # OS!="win"
- 'sources/': [
- ['exclude', 'Win\\.cpp$'],
- ],
- 'actions': [
- {
- 'action_name': 'repack_locale',
- 'variables': {
- 'repack_path': '<(chromium_src_dir)/tools/grit/grit/format/repack.py',
- 'pak_inputs': [
- '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
- '<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
- '<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources_100_percent.pak',
- ]},
- 'inputs': [
- '<(repack_path)',
- '<@(pak_inputs)',
- ],
- 'outputs': [
- '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
- ],
- 'action': ['python', '<(repack_path)', '<@(_outputs)', '<@(pak_inputs)'],
- 'process_outputs_as_mac_bundle_resources': 1,
- },
- ], # actions
- }],
- ['OS=="mac"', {
- 'dependencies': [
- '<(source_dir)/WebKit/chromium/WebKit.gyp:copy_mesa',
- ],
- },{ # OS!="mac"
- 'sources/': [
- # .mm is already excluded by common.gypi
- ['exclude', 'Mac\\.cpp$'],
- ],
- }],
- ['os_posix!=1 or OS=="mac"', {
- 'sources/': [
- ['exclude', 'Posix\\.cpp$'],
- ],
- }],
- ['use_x11 == 1', {
- 'dependencies': [
- '<(chromium_src_dir)/build/linux/system.gyp:fontconfig',
- ],
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
- ]
- }],
- 'variables': {
- # FIXME: Enable warnings on other platforms.
- 'chromium_code': 1,
- },
- 'conditions': [
- ['linux_use_tcmalloc == 1', {
- 'dependencies': [
- '<(chromium_src_dir)/base/allocator/allocator.gyp:allocator',
- ],
- }],
- ],
- },{ # use_x11 != 1
- 'sources/': [
- ['exclude', 'X11\\.cpp$'],
- ]
- }],
- ['toolkit_uses_gtk == 1', {
- 'defines': [
- 'WTF_USE_GTK=1',
- ],
- 'dependencies': [
- '<(chromium_src_dir)/build/linux/system.gyp:gtk',
- ],
- 'include_dirs': [
- '<(source_dir)/WebKit/chromium/public/gtk',
- ],
- }],
- ['OS=="android"', {
- 'type': 'shared_library',
- 'dependencies': [
- '<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code',
- '<(chromium_src_dir)/tools/android/forwarder/forwarder.gyp:forwarder',
- '<(chromium_src_dir)/tools/android/md5sum/md5sum.gyp:md5sum',
- ],
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)',
- 'files': [
- '<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
- ]
- }],
- }, { # OS!="android"
- 'sources/': [
- ['exclude', 'Android\\.cpp$'],
- ],
- }],
- ['inside_chromium_build==0', {
- 'dependencies': [
- '<(chromium_src_dir)/webkit/support/setup_third_party.gyp:third_party_headers',
- ]
- }],
- ],
- },
- {
- 'target_name': 'TestNetscapePlugIn',
- 'type': 'loadable_module',
- 'sources': [ '<@(test_plugin_files)' ],
- 'dependencies': [
- '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
- ],
- 'include_dirs': [
- '<(chromium_src_dir)',
- '<(tools_dir)/DumpRenderTree/TestNetscapePlugIn',
- '<(tools_dir)/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders',
- ],
- 'conditions': [
- ['OS=="mac"', {
- 'mac_bundle': 1,
- 'product_extension': 'plugin',
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
- '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
- '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
- ]
- },
- 'xcode_settings': {
- 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
- 'INFOPLIST_FILE': '<(tools_dir)/DumpRenderTree/TestNetscapePlugIn/mac/Info.plist',
- },
- }],
- ['os_posix == 1 and OS != "mac"', {
- 'cflags': [
- '-fvisibility=default',
- ],
- }],
- ['OS=="win"', {
- 'defines': [
- # This seems like a hack, but this is what Safari Win does.
- 'snprintf=_snprintf',
- ],
- 'sources': [
- '<(tools_dir)/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def',
- '<(tools_dir)/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc',
- ],
- # The .rc file requires that the name of the dll is npTestNetscapePlugIn.dll.
- 'product_name': 'npTestNetscapePlugIn',
- }],
- ],
- },
- {
- 'target_name': 'copy_TestNetscapePlugIn',
- 'type': 'none',
- 'dependencies': [
- 'TestNetscapePlugIn',
- ],
- 'conditions': [
- ['OS=="win"', {
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)/plugins',
- 'files': ['<(PRODUCT_DIR)/npTestNetscapePlugIn.dll'],
- }],
- }],
- ['OS=="mac"', {
- 'dependencies': ['TestNetscapePlugIn'],
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)/plugins/',
- 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
- }],
- }],
- ['os_posix == 1 and OS != "mac"', {
- 'copies': [{
- 'destination': '<(PRODUCT_DIR)/plugins',
- 'files': ['<(PRODUCT_DIR)/libTestNetscapePlugIn.so'],
- }],
- }],
- ],
- },
- ], # targets
- 'conditions': [
- ['OS=="win"', {
- 'targets': [{
- 'target_name': 'LayoutTestHelper',
- 'type': 'executable',
- 'sources': ['<(tools_dir)/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'],
- }],
- }],
- ['OS=="mac"', {
- 'targets': [{
- 'target_name': 'LayoutTestHelper',
- 'type': 'executable',
- 'sources': ['<(tools_dir)/DumpRenderTree/chromium/LayoutTestHelper.mm'],
- 'link_settings': {
- 'libraries': [
- '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
- ],
- },
- }],
- }],
- ['os_posix==1 and OS!="mac" and gcc_version>=46', {
- 'target_defaults': {
- # Disable warnings about c++0x compatibility, as some names (such
- # as nullptr) conflict with upcoming c++0x types.
- 'cflags_cc': ['-Wno-c++0x-compat'],
- },
- }],
- ['OS=="android"', {
- # Wrap libDumpRenderTree.so into an android apk for execution.
- 'targets': [{
- 'target_name': 'DumpRenderTree_apk',
- 'type': 'none',
- 'dependencies': [
- '<(chromium_src_dir)/base/base.gyp:base',
- '<(chromium_src_dir)/media/media.gyp:media_java',
- '<(chromium_src_dir)/net/net.gyp:net',
- 'DumpRenderTree',
- ],
- 'variables': {
- 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)DumpRenderTree<(SHARED_LIB_SUFFIX)',
- 'input_jars_paths': [
- '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
- '<(PRODUCT_DIR)/lib.java/chromium_net.jar',
- '<(PRODUCT_DIR)/lib.java/chromium_media.jar',
- ],
- 'conditions': [
- ['inside_chromium_build==1', {
- 'ant_build_to_chromium_src': '<(ant_build_out)/../../',
- }, {
- 'ant_build_to_chromium_src': '<(chromium_src_dir)',
- }],
- ],
- },
- # Part of the following was copied from <(chromium_src_dir)/build/apk_test.gpyi.
- # Not including it because gyp include doesn't support variable in path or under
- # conditions. And we also have some different requirements.
- 'actions': [{
- 'action_name': 'apk_DumpRenderTree',
- 'message': 'Building DumpRenderTree test apk.',
- 'inputs': [
- '<(chromium_src_dir)/testing/android/AndroidManifest.xml',
- '<(chromium_src_dir)/testing/android/generate_native_test.py',
- '<(input_shlib_path)',
- '<@(input_jars_paths)',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/DumpRenderTree_apk/DumpRenderTree-debug.apk',
- ],
- 'action': [
- '<(chromium_src_dir)/testing/android/generate_native_test.py',
- '--native_library',
- '<(input_shlib_path)',
- '--jars',
- '"<@(input_jars_paths)"',
- '--output',
- '<(PRODUCT_DIR)/DumpRenderTree_apk',
- '--strip-binary=<(android_strip)',
- '--ant-args',
- '-DANDROID_SDK=<(android_sdk)',
- '--ant-args',
- '-DANDROID_SDK_ROOT=<(android_sdk_root)',
- '--ant-args',
- '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
- '--ant-args',
- '-DANDROID_SDK_VERSION=<(android_sdk_version)',
- '--ant-args',
- '-DANDROID_TOOLCHAIN=<(android_toolchain)',
- '--ant-args',
- '-DANDROID_GDBSERVER=<(android_gdbserver)',
- '--ant-args',
- '-DPRODUCT_DIR=<(ant_build_out)',
- '--ant-args',
- '-DCHROMIUM_SRC=<(ant_build_to_chromium_src)',
- '--app_abi',
- '<(android_app_abi)',
- ],
- }],
- }],
- }],
- ['clang==1', {
- 'target_defaults': {
- # FIXME: Add -Wglobal-constructors after fixing existing bugs.
- 'cflags': ['-Wunused-parameter'],
- 'xcode_settings': {
- 'WARNING_CFLAGS': ['-Wunused-parameter'],
- },
- },
- }],
- ], # conditions
-}
diff --git a/Tools/DumpRenderTree/DumpRenderTree.gypi b/Tools/DumpRenderTree/DumpRenderTree.gypi
deleted file mode 100644
index ac4d2a622..000000000
--- a/Tools/DumpRenderTree/DumpRenderTree.gypi
+++ /dev/null
@@ -1,128 +0,0 @@
-{
- 'variables': {
- 'drt_files': [
- 'DumpRenderTree.h',
- 'DumpRenderTreeCommon.cpp',
- 'chromium/DRTDevToolsAgent.cpp',
- 'chromium/DRTDevToolsAgent.h',
- 'chromium/DRTDevToolsClient.cpp',
- 'chromium/DRTDevToolsClient.h',
- 'chromium/DumpRenderTree.cpp',
- 'chromium/DRTTestRunner.cpp',
- 'chromium/DRTTestRunner.h',
- 'chromium/MockConstraints.cpp',
- 'chromium/MockConstraints.h',
- 'chromium/MockGrammarCheck.cpp',
- 'chromium/MockGrammarCheck.h',
- 'chromium/MockSpellCheck.cpp',
- 'chromium/MockSpellCheck.h',
- 'chromium/MockWebKitPlatformSupport.cpp',
- 'chromium/MockWebKitPlatformSupport.h',
- 'chromium/MockWebMediaStreamCenter.cpp',
- 'chromium/MockWebMediaStreamCenter.h',
- 'chromium/MockWebPrerenderingSupport.cpp',
- 'chromium/MockWebPrerenderingSupport.h',
- 'chromium/MockWebRTCPeerConnectionHandler.cpp',
- 'chromium/MockWebRTCPeerConnectionHandler.h',
- 'chromium/MockWebSpeechInputController.cpp',
- 'chromium/MockWebSpeechInputController.h',
- 'chromium/MockWebSpeechRecognizer.cpp',
- 'chromium/MockWebSpeechRecognizer.h',
- 'chromium/NotificationPresenter.h',
- 'chromium/NotificationPresenter.cpp',
- 'chromium/Task.h',
- 'chromium/Task.cpp',
- 'chromium/TestEventPrinter.h',
- 'chromium/TestEventPrinter.cpp',
- 'chromium/TestNavigationController.cpp',
- 'chromium/TestNavigationController.h',
- 'chromium/TestShell.cpp',
- 'chromium/TestShell.h',
- 'chromium/TestShellAndroid.cpp',
- 'chromium/TestShellMac.mm',
- 'chromium/TestShellPosix.cpp',
- 'chromium/TestShellStub.cpp',
- 'chromium/TestShellWin.cpp',
- 'chromium/TestShellX11.cpp',
- 'chromium/TestWebPlugin.cpp',
- 'chromium/TestWebPlugin.h',
- 'chromium/WebPermissions.cpp',
- 'chromium/WebPermissions.h',
- 'chromium/WebPreferences.cpp',
- 'chromium/WebPreferences.h',
- 'chromium/WebThemeControlDRTWin.cpp',
- 'chromium/WebThemeControlDRTWin.h',
- 'chromium/WebThemeEngineDRTMac.mm',
- 'chromium/WebThemeEngineDRTMac.h',
- 'chromium/WebThemeEngineDRTWin.cpp',
- 'chromium/WebThemeEngineDRTWin.h',
- 'chromium/WebUserMediaClientMock.cpp',
- 'chromium/WebUserMediaClientMock.h',
- 'chromium/WebViewHost.cpp',
- 'chromium/WebViewHost.h',
- 'chromium/WebViewHostOutputSurface.cpp',
- 'chromium/WebViewHostOutputSurface.h',
- 'chromium/WebViewHostSoftwareOutputDevice.cpp',
- 'chromium/WebViewHostSoftwareOutputDevice.h',
- ],
- 'test_runner_files': [
- 'chromium/TestRunner/public/WebAccessibilityController.h',
- 'chromium/TestRunner/public/WebTestDelegate.h',
- 'chromium/TestRunner/public/WebEventSender.h',
- 'chromium/TestRunner/public/WebTask.h',
- 'chromium/TestRunner/public/WebTestInterfaces.h',
- 'chromium/TestRunner/public/WebTestProxy.h',
- 'chromium/TestRunner/src/AccessibilityControllerChromium.cpp',
- 'chromium/TestRunner/src/AccessibilityControllerChromium.h',
- 'chromium/TestRunner/src/AccessibilityUIElementChromium.cpp',
- 'chromium/TestRunner/src/AccessibilityUIElementChromium.h',
- 'chromium/TestRunner/src/CppBoundClass.cpp',
- 'chromium/TestRunner/src/CppBoundClass.h',
- 'chromium/TestRunner/src/CppVariant.cpp',
- 'chromium/TestRunner/src/CppVariant.h',
- 'chromium/TestRunner/src/EventSender.cpp',
- 'chromium/TestRunner/src/EventSender.h',
- 'chromium/TestRunner/src/GamepadController.cpp',
- 'chromium/TestRunner/src/GamepadController.h',
- 'chromium/TestRunner/src/KeyCodeMapping.cpp',
- 'chromium/TestRunner/src/KeyCodeMapping.h',
- 'chromium/TestRunner/src/TestInterfaces.cpp',
- 'chromium/TestRunner/src/TestInterfaces.h',
- 'chromium/TestRunner/src/TextInputController.cpp',
- 'chromium/TestRunner/src/TextInputController.h',
- 'chromium/TestRunner/src/TestRunner.cpp',
- 'chromium/TestRunner/src/TestRunner.h',
- 'chromium/TestRunner/src/WebAccessibilityController.cpp',
- 'chromium/TestRunner/src/WebEventSender.cpp',
- 'chromium/TestRunner/src/WebTask.cpp',
- 'chromium/TestRunner/src/WebTestInterfaces.cpp',
- 'chromium/TestRunner/src/WebTestProxy.cpp',
- ],
- 'test_plugin_files': [
- 'TestNetscapePlugIn/PluginObject.cpp',
- 'TestNetscapePlugIn/PluginObject.h',
- 'TestNetscapePlugIn/PluginObjectMac.mm',
- 'TestNetscapePlugIn/PluginTest.cpp',
- 'TestNetscapePlugIn/PluginTest.h',
- 'TestNetscapePlugIn/TestObject.cpp',
- 'TestNetscapePlugIn/TestObject.h',
- 'TestNetscapePlugIn/Tests/DocumentOpenInDestroyStream.cpp',
- 'TestNetscapePlugIn/Tests/EvaluateJSAfterRemovingPluginElement.cpp',
- 'TestNetscapePlugIn/Tests/FormValue.cpp',
- 'TestNetscapePlugIn/Tests/GetURLNotifyWithURLThatFailsToLoad.cpp',
- 'TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp',
- 'TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp',
- 'TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp',
- 'TestNetscapePlugIn/Tests/NPPNewFails.cpp',
- 'TestNetscapePlugIn/Tests/NPRuntimeCallsWithNullNPP.cpp',
- 'TestNetscapePlugIn/Tests/NPRuntimeObjectFromDestroyedPlugin.cpp',
- 'TestNetscapePlugIn/Tests/NPRuntimeRemoveProperty.cpp',
- 'TestNetscapePlugIn/Tests/NullNPPGetValuePointer.cpp',
- 'TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp',
- 'TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp',
- 'TestNetscapePlugIn/Tests/PluginScriptableObjectOverridesAllProperties.cpp',
- 'TestNetscapePlugIn/Tests/PrivateBrowsing.cpp',
- 'TestNetscapePlugIn/main.cpp',
- ],
- }
-}
diff --git a/Tools/DumpRenderTree/DumpRenderTree.h b/Tools/DumpRenderTree/DumpRenderTree.h
index 4c6a47210..47f88e58f 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.h
+++ b/Tools/DumpRenderTree/DumpRenderTree.h
@@ -40,8 +40,6 @@
#include "DumpRenderTreeWin.h"
#elif PLATFORM(GTK)
#include "DumpRenderTreeGtk.h"
-#elif PLATFORM(WX)
-#include "DumpRenderTreeWx.h"
#elif PLATFORM(EFL)
#include "DumpRenderTreeEfl.h"
#elif PLATFORM(BLACKBERRY)
@@ -66,11 +64,12 @@ void dump();
void displayWebView();
struct TestCommand {
- TestCommand() : shouldDumpPixels(false) { }
+ TestCommand() : shouldDumpPixels(false), timeout(30000) { }
std::string pathOrURL;
bool shouldDumpPixels;
std::string expectedPixelHash;
+ int timeout; // in ms
};
TestCommand parseInputLine(const std::string&);
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln
new file mode 100644
index 000000000..285e25259
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln
@@ -0,0 +1,56 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestNetscapePlugin", "TestNetscapePlugin\TestNetscapePlugin.vcxproj", "{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiffLauncher", "ImageDiff\ImageDiffLauncher.vcxproj", "{DD7949B6-F2B4-47C2-9C42-E21E84CB1017}"
+ ProjectSection(ProjectDependencies) = postProject
+ {59CC0547-70AC-499C-9B19-EC01C6F61137} = {59CC0547-70AC-499C-9B19-EC01C6F61137}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ImageDiff", "ImageDiff\ImageDiff.vcxproj", "{59CC0547-70AC-499C-9B19-EC01C6F61137}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C} = {C0737398-3565-439E-A2B8-AB2BE4D5430C}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTree", "DumpRenderTree\DumpRenderTree.vcxproj", "{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {DD7949B6-F2B4-47C2-9C42-E21E84CB1017} = {DD7949B6-F2B4-47C2-9C42-E21E84CB1017}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DumpRenderTreeLauncher", "DumpRenderTree\DumpRenderTreeLauncher.vcxproj", "{2974EA02-840B-4995-8719-8920A61006F1}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1} = {6567DFD4-D6DE-4CD5-825D-17E353D160E1}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug|Win32.Build.0 = Debug|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {DD7949B6-F2B4-47C2-9C42-E21E84CB1017}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DD7949B6-F2B4-47C2-9C42-E21E84CB1017}.Debug|Win32.Build.0 = Debug|Win32
+ {DD7949B6-F2B4-47C2-9C42-E21E84CB1017}.Release|Win32.ActiveCfg = Release|Win32
+ {DD7949B6-F2B4-47C2-9C42-E21E84CB1017}.Release|Win32.Build.0 = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug|Win32.Build.0 = Debug|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
+ {2974EA02-840B-4995-8719-8920A61006F1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {2974EA02-840B-4995-8719-8920A61006F1}.Debug|Win32.Build.0 = Debug|Win32
+ {2974EA02-840B-4995-8719-8920A61006F1}.Release|Win32.ActiveCfg = Release|Win32
+ {2974EA02-840B-4995-8719-8920A61006F1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj
new file mode 100644
index 000000000..06dafbb07
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj
@@ -0,0 +1,282 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{6567DFD4-D6DE-4CD5-825D-17E353D160E1}</ProjectGuid>
+ <RootNamespace>DumpRenderTree</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\AccessibilityController.cpp" />
+ <ClCompile Include="..\..\AccessibilityTextMarker.cpp" />
+ <ClCompile Include="..\..\AccessibilityUIElement.cpp" />
+ <ClCompile Include="..\..\cairo\PixelDumpSupportCairo.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\cg\PixelDumpSupportCG.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\CyclicRedundancyCheck.cpp" />
+ <ClCompile Include="..\..\DumpRenderTreeCommon.cpp" />
+ <ClCompile Include="..\..\GCController.cpp" />
+ <ClCompile Include="..\..\JavaScriptThreading.cpp" />
+ <ClCompile Include="..\..\PixelDumpSupport.cpp" />
+ <ClCompile Include="..\..\TestRunner.cpp" />
+ <ClCompile Include="..\..\win\AccessibilityControllerWin.cpp" />
+ <ClCompile Include="..\..\win\AccessibilityUIElementWin.cpp" />
+ <ClCompile Include="..\..\win\DRTDataObject.cpp" />
+ <ClCompile Include="..\..\win\DRTDesktopNotificationPresenter.cpp" />
+ <ClCompile Include="..\..\win\DRTDropSource.cpp" />
+ <ClCompile Include="..\..\win\DumpRenderTree.cpp" />
+ <ClCompile Include="..\..\win\EditingDelegate.cpp" />
+ <ClCompile Include="..\..\win\EventSender.cpp" />
+ <ClCompile Include="..\..\win\FrameLoadDelegate.cpp" />
+ <ClCompile Include="..\..\win\GCControllerWin.cpp" />
+ <ClCompile Include="..\..\win\HistoryDelegate.cpp" />
+ <ClCompile Include="..\..\win\MD5.cpp" />
+ <ClCompile Include="..\..\win\PixelDumpSupportWin.cpp" />
+ <ClCompile Include="..\..\win\PolicyDelegate.cpp" />
+ <ClCompile Include="..\..\win\ResourceLoadDelegate.cpp" />
+ <ClCompile Include="..\..\win\TestRunnerWin.cpp" />
+ <ClCompile Include="..\..\win\TextInputController.cpp" />
+ <ClCompile Include="..\..\win\TextInputControllerWin.cpp" />
+ <ClCompile Include="..\..\win\UIDelegate.cpp" />
+ <ClCompile Include="..\..\win\WorkQueueItemWin.cpp" />
+ <ClCompile Include="..\..\WorkQueue.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\AccessibilityController.h" />
+ <ClInclude Include="..\..\AccessibilityTextMarker.h" />
+ <ClInclude Include="..\..\AccessibilityUIElement.h" />
+ <ClInclude Include="..\..\cairo\PixelDumpSupportCairo.h">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ </ClInclude>
+ <ClInclude Include="..\..\cg\PixelDumpSupportCG.h">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ </ClInclude>
+ <ClInclude Include="..\..\config.h" />
+ <ClInclude Include="..\..\CyclicRedundancyCheck.h" />
+ <ClInclude Include="..\..\DumpRenderTree.h" />
+ <ClInclude Include="..\..\DumpRenderTreePrefix.h" />
+ <ClInclude Include="..\..\GCController.h" />
+ <ClInclude Include="..\..\JavaScriptThreading.h" />
+ <ClInclude Include="..\..\PixelDumpSupport.h" />
+ <ClInclude Include="..\..\TestRunner.h" />
+ <ClInclude Include="..\..\win\DraggingInfo.h" />
+ <ClInclude Include="..\..\win\DRTDataObject.h" />
+ <ClInclude Include="..\..\win\DRTDesktopNotificationPresenter.h" />
+ <ClInclude Include="..\..\win\DRTDropSource.h" />
+ <ClInclude Include="..\..\win\DumpRenderTreeWin.h" />
+ <ClInclude Include="..\..\win\EditingDelegate.h" />
+ <ClInclude Include="..\..\win\EventSender.h" />
+ <ClInclude Include="..\..\win\FrameLoadDelegate.h" />
+ <ClInclude Include="..\..\win\HistoryDelegate.h" />
+ <ClInclude Include="..\..\win\MD5.h" />
+ <ClInclude Include="..\..\win\PolicyDelegate.h" />
+ <ClInclude Include="..\..\win\ResourceLoadDelegate.h" />
+ <ClInclude Include="..\..\win\TextInputController.h" />
+ <ClInclude Include="..\..\win\UIDelegate.h" />
+ <ClInclude Include="..\..\WorkQueue.h" />
+ <ClInclude Include="..\..\WorkQueueItem.h" />
+ <CustomBuildStep Include="MD5.h" />
+ <CustomBuildStep Include="..\cairo\PixelDumpSupportCairo.h">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ </CustomBuildStep>
+ <CustomBuildStep Include="..\cg\PixelDumpSupportCG.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="DumpRenderTreePostBuild.cmd" />
+ <None Include="DumpRenderTreePreBuild.cmd" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters
new file mode 100644
index 000000000..17161e70e
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Controllers">
+ <UniqueIdentifier>{f76f7e03-4f6a-46fd-a3e6-3cc4d2f7e918}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Delegates">
+ <UniqueIdentifier>{964367be-8e77-444f-9b05-7c906d89e35e}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Support">
+ <UniqueIdentifier>{59309c9f-8148-4c01-a552-888c6c065f73}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\AccessibilityController.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\GCController.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestRunner.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\AccessibilityControllerWin.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\DRTDataObject.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\DRTDropSource.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\EventSender.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\GCControllerWin.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\TestRunnerWin.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\TextInputController.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\TextInputControllerWin.cpp">
+ <Filter>Controllers</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\DRTDesktopNotificationPresenter.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\HistoryDelegate.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\PolicyDelegate.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\ResourceLoadDelegate.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\UIDelegate.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\EditingDelegate.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\FrameLoadDelegate.cpp">
+ <Filter>Delegates</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\AccessibilityTextMarker.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\AccessibilityUIElementWin.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\AccessibilityUIElement.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\CyclicRedundancyCheck.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\DumpRenderTreeCommon.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\DumpRenderTree.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\MD5.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\PixelDumpSupport.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\WorkQueueItemWin.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\cairo\PixelDumpSupportCairo.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\cg\PixelDumpSupportCG.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\win\PixelDumpSupportWin.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\WorkQueue.cpp">
+ <Filter>Support</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\JavaScriptThreading.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\AccessibilityController.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\GCController.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\TestRunner.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\DRTDataObject.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\DRTDropSource.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\EventSender.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\TextInputController.h">
+ <Filter>Controllers</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\DRTDesktopNotificationPresenter.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\HistoryDelegate.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\PolicyDelegate.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\ResourceLoadDelegate.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\UIDelegate.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\EditingDelegate.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\FrameLoadDelegate.h">
+ <Filter>Delegates</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\config.h" />
+ <ClInclude Include="..\..\AccessibilityTextMarker.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\AccessibilityUIElement.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\DumpRenderTreePrefix.h" />
+ <ClInclude Include="..\..\CyclicRedundancyCheck.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\DraggingInfo.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\DumpRenderTree.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\DumpRenderTreeWin.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\win\MD5.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\PixelDumpSupport.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\cairo\PixelDumpSupportCairo.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\cg\PixelDumpSupportCG.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\WorkQueue.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\WorkQueueItem.h">
+ <Filter>Support</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\JavaScriptThreading.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="DumpRenderTreePostBuild.cmd" />
+ <None Include="DumpRenderTreePreBuild.cmd" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props
new file mode 100644
index 000000000..b5045231e
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)\..\..\cg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>CoreGraphics$(DebugSuffix).lib;CoreFoundation$(DebugSuffix).lib;CFNetwork$(DebugSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props
new file mode 100644
index 000000000..fe840d2f6
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)\..\..;$(ProjectDir)\..\..\win;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\private;$(ConfigurationBuildDir)\Include\DumpRenderTree\ForwardingHeaders;$(ConfigurationBuildDir)\Include\JavaScriptCore;$(ConfigurationBuildDir)\Include\private\JavaScriptCore;$(ConfigurationBuildDir)\Include\WebCoreTestSupport;$(ConfigurationBuildDir)\Include\WebCore;$(WebKit_Libraries)\Include;$(WebKit_Libraries)\Include\private;$(WebKit_Libraries)\Include\WebCore;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <DisableSpecificWarnings>4146;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ <ForcedIncludeFiles>DumpRenderTreePrefix.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/NXCOMPAT %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>WTF$(DebugSuffix).lib;JavaScriptCore$(DebugSuffix).lib;WebKitGUID$(DebugSuffix).lib;WebKit$(DebugSuffix).lib;WebCoreTestSupport$(DebugSuffix).lib;gdi32.lib;ole32.lib;oleaut32.lib;user32.lib;shlwapi.lib;oleacc.lib;comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props
new file mode 100644
index 000000000..9c75bc73f
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="DumpRenderTreeCommon.props" />
+ <Import Project="DumpRenderTreeApple.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props
new file mode 100644
index 000000000..77fc5cc88
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefinesCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\WinCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\cURL.props" />
+ <Import Project="..\..\..\..\Source\WebKit\WebKit.vcxproj\WebKit\WebKitCFLite.props" />
+ <Import Project="DumpRenderTreeCommon.props" />
+ </ImportGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)\..\..\cairo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj
new file mode 100644
index 000000000..620391b42
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{2974EA02-840B-4995-8719-8920A61006F1}</ProjectGuid>
+ <RootNamespace>DumpRenderTreeLauncher</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="DumpRenderTreeLauncherDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'">
+ <Link>
+ <AdditionalOptions>/SAFESEH %(AdditionalOptions)</AdditionalOptions>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\win\DLLLauncher\DLLLauncherMain.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props
new file mode 100644
index 000000000..7a96a94db
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <TargetName>DumpRenderTree</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>USE_CONSOLE_ENTRY_POINT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)DumpRenderTree$(DebugSuffix).exe</OutputFile>
+ <SubSystem>Console</SubSystem>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName)Launcher.pdb</ProgramDatabaseFile>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props
new file mode 100644
index 000000000..d71530a4b
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="DumpRenderTreeLauncherCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props
new file mode 100644
index 000000000..bbac39e8e
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="DumpRenderTreeLauncherCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props
new file mode 100644
index 000000000..e0b4f3e74
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="DumpRenderTreeLauncherCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd
index 26707cac6..26707cac6 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPostBuild.cmd
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd
index c2f85c790..43c41c896 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTreePreBuild.cmd
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd
@@ -10,11 +10,11 @@ mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders"
mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\runtime"
mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
-xcopy /y /d "%PROJECTDIR%\..\ForwardingHeaders\wtf\*.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
-xcopy /y /d "%PROJECTDIR%\..\ForwardingHeaders\runtime\*.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\runtime"
+xcopy /y /d "%PROJECTDIR%\..\..\ForwardingHeaders\wtf\*.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
+xcopy /y /d "%PROJECTDIR%\..\..\ForwardingHeaders\runtime\*.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\runtime"
if "%CONFIGURATIONNAME%"=="Debug_Cairo_CFLite" xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
if "%CONFIGURATIONNAME%"=="Release_Cairo_CFLite" xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
-if "%CONFIGURATIONNAME%"=="Debug_Cairo" xcopy /y /d "%TARGETDIR%\..\include\WebCore\ForwardingHeaders\wtf\MD5.h"
-if "%CONFIGURATIONNAME%"=="Release_Cairo" xcopy /y /d "%TARGETDIR%\..\include\WebCore\ForwardingHeaders\wtf\MD5.h"
+if "%CONFIGURATIONNAME%"=="Debug_Cairo" xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
+if "%CONFIGURATIONNAME%"=="Release_Cairo" xcopy /y /d "%CONFIGURATIONBUILDDIR%\include\WebCore\ForwardingHeaders\wtf\MD5.h" "%CONFIGURATIONBUILDDIR%\include\DumpRenderTree\ForwardingHeaders\wtf"
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props
new file mode 100644
index 000000000..d019339ad
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="DumpRenderTreeApple.props" />
+ <Import Project="DumpRenderTreeCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props
new file mode 100644
index 000000000..8bcd226d6
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="DumpRenderTreeCommon.props" />
+ <Import Project="DumpRenderTreeApple.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props
new file mode 100644
index 000000000..d2e6434d8
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefinesCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\WinCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\cURL.props" />
+ <Import Project="..\..\..\..\Source\WebKit\WebKit.vcxproj\WebKit\WebKitCFLite.props" />
+ <Import Project="DumpRenderTreeCommon.props" />
+ </ImportGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)\..\..\cairo;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ClCompile>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj
new file mode 100644
index 000000000..fefaa7214
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{59CC0547-70AC-499C-9B19-EC01C6F61137}</ProjectGuid>
+ <RootNamespace>ImageDiff</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\cg\ImageDiffCG.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\win\ImageDiffCairo.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\..\win\ImageDiffWin.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="ImageDiffPostBuild.cmd" />
+ <None Include="ImageDiffPreBuild.cmd" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props
new file mode 100644
index 000000000..481dd6611
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/NXCOMPAT %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>WTF$(DebugSuffix).lib;JavaScriptCore$(DebugSuffix).lib;CoreGraphics$(DebugSuffix).lib;CoreFoundation$(DebugSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props
new file mode 100644
index 000000000..4a7b11db6
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ConfigurationBuildDir)\include;$(ConfigurationBuildDir)\include\private;$(ConfigurationBuildDir)\include\private\JavaScriptCore;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/NXCOMPAT %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>JavaScriptCore.lib;CFLite.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ </ItemDefinitionGroup>
+</Project>
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props
new file mode 100644
index 000000000..e1a01da8e
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="ImageDiffCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props
new file mode 100644
index 000000000..1ede8e67f
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\WinCairo.props" />
+ <Import Project="ImageDiffCommonWinCairo.props" />
+ </ImportGroup>
+</Project>
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj
new file mode 100644
index 000000000..3c6d90c3c
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{DD7949B6-F2B4-47C2-9C42-E21E84CB1017}</ProjectGuid>
+ <RootNamespace>ImageDiffLauncher</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="ImageDiffLauncherDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\..\win\DLLLauncher\DLLLauncherMain.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props
new file mode 100644
index 000000000..d2518ea56
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <TargetName>ImageDiff</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <PreprocessorDefinitions>USE_CONSOLE_ENTRY_POINT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)ImageDiff$(DebugSuffix).exe</OutputFile>
+ <SubSystem>Console</SubSystem>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName)Launcher.pdb</ProgramDatabaseFile>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props
new file mode 100644
index 000000000..caeb2c270
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="ImageDiffLauncherCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props
new file mode 100644
index 000000000..c927a95f3
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="ImageDiffLauncherCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props
new file mode 100644
index 000000000..a9b230b60
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="ImageDiffLauncherCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPostBuild.cmd
index 26707cac6..26707cac6 100644
--- a/Tools/DumpRenderTree/win/ImageDiffPostBuild.cmd
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPostBuild.cmd
diff --git a/Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd
index a77077674..a77077674 100644
--- a/Tools/DumpRenderTree/win/ImageDiffPreBuild.cmd
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props
new file mode 100644
index 000000000..731805d77
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="ImageDiffCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props
new file mode 100644
index 000000000..274a760b7
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="ImageDiffCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props
new file mode 100644
index 000000000..d3a08b48d
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\WinCairo.props" />
+ <Import Project="ImageDiffCommonWinCairo.props" />
+ </ImportGroup>
+</Project>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def
index ac41e7ede..a0ea7a984 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.def
@@ -1,6 +1,4 @@
-LIBRARY "npTestNetscapePlugin"
-
-EXPORTS
- NP_GetEntryPoints @1
- NP_Initialize @2
- NP_Shutdown @3
+EXPORTS
+ NP_GetEntryPoints @1
+ NP_Initialize @2
+ NP_Shutdown @3
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc
index c0b38ee5f..a9446c9f7 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.rc
@@ -1,102 +1,102 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "windows.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""windows.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,1
- PRODUCTVERSION 1,0,0,1
- FILEFLAGSMASK 0x17L
-#ifdef _DEBUG
- FILEFLAGS 0x1L
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS 0x4L
- FILETYPE 0x2L
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904e4"
- BEGIN
- VALUE "CompanyName", "Apple Inc."
- VALUE "FileDescription", "Simple Netscape plug-in that handles test content for WebKit"
- VALUE "FileExtents", "testnetscape|png"
- VALUE "FileOpenName", "test netscape content|PNG image"
- VALUE "LegalCopyright", "Copyright Apple Inc. 2007-2009"
- VALUE "MIMEType", "application/x-webkit-test-netscape|image/png"
- VALUE "OriginalFilename", "npTestNetscapePlugin.dll"
- VALUE "ProductName", "WebKit Test PlugIn"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "windows.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""windows.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904e4"
+ BEGIN
+ VALUE "CompanyName", "Apple Inc."
+ VALUE "FileDescription", "Simple Netscape plug-in that handles test content for WebKit"
+ VALUE "FileExtents", "testnetscape|png"
+ VALUE "FileOpenName", "test netscape content|PNG image"
+ VALUE "LegalCopyright", "Copyright Apple Inc. 2007-2009"
+ VALUE "MIMEType", "application/x-webkit-test-netscape|image/png"
+ VALUE "OriginalFilename", "npTestNetscapePlugin.dll"
+ VALUE "ProductName", "WebKit Test PlugIn"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1252
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj
new file mode 100644
index 000000000..cbba93b14
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\TestNetscapePlugIn\main.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\PluginObject.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\PluginTest.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\TestObject.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\DocumentOpenInDestroyStream.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\EvaluateJSAfterRemovingPluginElement.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\FormValue.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetURLNotifyWithURLThatFailsToLoad.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetURLWithJavaScriptURL.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetURLWithJavaScriptURLDestroyingPlugin.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetUserAgentWithNullNPPFromNPPNew.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\LogNPPSetWindow.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPDeallocateCalledBeforeNPShutdown.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPPNewFails.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPPSetWindowCalledDuringDestruction.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPRuntimeCallsWithNullNPP.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPRuntimeRemoveProperty.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NullNPPGetValuePointer.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PassDifferentNPPStruct.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PluginScriptableNPObjectInvokeDefault.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PluginScriptableObjectOverridesAllProperties.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PrivateBrowsing.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\ToStringAndValueOfObject.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\CallJSThatDestroysPlugin.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\DrawsGradient.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\DumpWindowRect.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\GetValueNetscapeWindow.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\NPNInvalidateRectInvalidatesWindow.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\WindowGeometryInitializedBeforeSetWindow.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\WindowlessPaintRectCoordinates.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\WindowRegionIsSetToClipRect.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\win\WindowedPluginTest.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\win\WindowGeometryTest.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\TestNetscapePlugIn\PluginObject.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\PluginTest.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\TestObject.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\win\WindowedPluginTest.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\win\WindowGeometryTest.h" />
+ <ClInclude Include="resource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="TestNetscapePlugin.def" />
+ <None Include="TestNetscapePluginPostBuild.cmd" />
+ <None Include="TestNetscapePluginPreBuild.cmd" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="TestNetscapePlugin.rc" />
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{C0737398-3565-439E-A2B8-AB2BE4D5430C}</ProjectGuid>
+ <RootNamespace>TestNetscapePlugin</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestNetscapePluginDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">
+ <Link />
+ </ItemDefinitionGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters
new file mode 100644
index 000000000..da42a5708
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="..\..\TestNetscapePlugIn\main.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\PluginObject.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\PluginTest.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\TestObject.cpp" />
+ <ClCompile Include="..\..\TestNetscapePlugIn\win\WindowedPluginTest.cpp">
+ <Filter>win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\win\WindowGeometryTest.cpp">
+ <Filter>win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\DocumentOpenInDestroyStream.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\EvaluateJSAfterRemovingPluginElement.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\FormValue.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetURLNotifyWithURLThatFailsToLoad.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetURLWithJavaScriptURL.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetURLWithJavaScriptURLDestroyingPlugin.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\GetUserAgentWithNullNPPFromNPPNew.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\LogNPPSetWindow.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPDeallocateCalledBeforeNPShutdown.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPPNewFails.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPPSetWindowCalledDuringDestruction.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPRuntimeCallsWithNullNPP.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NPRuntimeRemoveProperty.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\NullNPPGetValuePointer.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PassDifferentNPPStruct.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PluginScriptableNPObjectInvokeDefault.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PluginScriptableObjectOverridesAllProperties.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\PrivateBrowsing.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\ToStringAndValueOfObject.cpp">
+ <Filter>Tests</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\CallJSThatDestroysPlugin.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\DrawsGradient.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\DumpWindowRect.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\GetValueNetscapeWindow.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\NPNInvalidateRectInvalidatesWindow.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\WindowGeometryInitializedBeforeSetWindow.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\WindowlessPaintRectCoordinates.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\TestNetscapePlugIn\Tests\win\WindowRegionIsSetToClipRect.cpp">
+ <Filter>Tests\win</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\..\TestNetscapePlugIn\PluginObject.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\PluginTest.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\TestObject.h" />
+ <ClInclude Include="..\..\TestNetscapePlugIn\win\WindowedPluginTest.h">
+ <Filter>win</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\TestNetscapePlugIn\win\WindowGeometryTest.h">
+ <Filter>win</Filter>
+ </ClInclude>
+ <ClInclude Include="resource.h">
+ <Filter>Resources</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="win">
+ <UniqueIdentifier>{aa1f1b22-247a-4070-93ee-9c1bb139a200}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resources">
+ <UniqueIdentifier>{a13508d3-bda2-4026-bd33-320d54d4ae5a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Tests">
+ <UniqueIdentifier>{33b0adeb-c8af-4e7a-b827-3ea7ed8a095b}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Tests\win">
+ <UniqueIdentifier>{62e11b7d-49c8-463f-8897-fcc43d8f314c}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="TestNetscapePlugin.def">
+ <Filter>Resources</Filter>
+ </None>
+ <None Include="TestNetscapePluginPostBuild.cmd" />
+ <None Include="TestNetscapePluginPreBuild.cmd" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="TestNetscapePlugin.rc">
+ <Filter>Resources</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props
new file mode 100644
index 000000000..ff33e6f28
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <TargetName>np$(ProjectName)$(DebugSuffix)</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)..\..\TestNetscapePlugIn;$(ProjectDir)..\..\TestNetscapePlugIn\win;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\private;$(ConfigurationBuildDir)\Include\JavaScriptCore;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders;$(WebKit_Libraries)\include;$(WebKit_Libraries)\include\private;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>snprintf=_snprintf;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>Msimg32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <ModuleDefinitionFile>TestNetscapePlugin.def</ModuleDefinitionFile>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props
new file mode 100644
index 000000000..d56c0e6b4
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="TestNetscapePluginCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPostBuild.cmd
index 26707cac6..26707cac6 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIPostBuild.cmd
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPostBuild.cmd
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd
index a77077674..a77077674 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginPreBuild.cmd
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props
new file mode 100644
index 000000000..d367b0c63
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="TestNetscapePluginCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props
new file mode 100644
index 000000000..478ed3a84
--- /dev/null
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="TestNetscapePluginCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/resource.h
index b0ce34048..b0ce34048 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/resource.h
+++ b/Tools/DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/resource.h
diff --git a/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj b/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
index f35ebccdf..97672ab9f 100644
--- a/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
+++ b/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
@@ -39,8 +39,11 @@
1A215A8211F2609C008AD0F5 /* PluginTest.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A215A8011F2609C008AD0F5 /* PluginTest.h */; };
1A215BE711F27658008AD0F5 /* DocumentOpenInDestroyStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A215A7511F26072008AD0F5 /* DocumentOpenInDestroyStream.cpp */; };
1A24BAA9120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */; };
+ 1A2FB84E178C80930059FD96 /* DefaultPolicyDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2FB84C178C80920059FD96 /* DefaultPolicyDelegate.h */; };
+ 1A2FB84F178C80930059FD96 /* DefaultPolicyDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A2FB84D178C80930059FD96 /* DefaultPolicyDelegate.m */; };
1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A31EB3713466AC100017372 /* ConvertPoint.cpp */; };
1A3E28AA1311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3E28A91311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp */; };
+ 1A4CCD4F171375A300981040 /* ToStringAndValueOfObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4CCD4E171375A300981040 /* ToStringAndValueOfObject.cpp */; };
1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5CC1F3137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp */; };
1A66C35114576A920099A115 /* ContentsScaleFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A66C34F14576A920099A115 /* ContentsScaleFactor.cpp */; };
1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A8F024C0BB9B056008CFA34 /* TestObject.h */; };
@@ -57,6 +60,7 @@
29CFBA10122736E600BC30C0 /* AccessibilityTextMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 29CFBA0E122736E600BC30C0 /* AccessibilityTextMarker.h */; };
29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA0F122736E600BC30C0 /* AccessibilityTextMarker.cpp */; };
29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */; };
+ 2CE88FA217124D8C00734FC0 /* JavaScriptThreading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */; };
2D403F05150871F9005358D2 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
2D403F06150871F9005358D2 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A84F608908B136DA00E9745F /* Cocoa.framework */; };
2D403F08150871F9005358D2 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23BCB88F0EA57623003C6289 /* OpenGL.framework */; };
@@ -109,6 +113,8 @@
A8B91BFF0CF522B4008F91FF /* CheckedMalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */; };
A8D79CEA0FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.h in Headers */ = {isa = PBXBuildFile; fileRef = A8D79CE80FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.h */; };
A8D79CEB0FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m in Sources */ = {isa = PBXBuildFile; fileRef = A8D79CE90FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m */; };
+ AA5A15EF16E15CD000F7C561 /* AccessibilityControllerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA5A15ED16E15CD000F7C561 /* AccessibilityControllerIOS.mm */; };
+ AA5A15F016E15CD000F7C561 /* AccessibilityUIElementIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = AA5A15EE16E15CD000F7C561 /* AccessibilityUIElementIOS.mm */; };
AE8259F308D22463000507AB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
AE8259F408D22463000507AB /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE8257EF08D22389000507AB /* Carbon.framework */; };
B5A752A208AF5D1F00138E45 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B5A752A108AF5D1F00138E45 /* QuartzCore.framework */; };
@@ -119,7 +125,6 @@
BC0E26150E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */; };
BC0E26150E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */; };
BC47412A0D038A4C0072B006 /* JavaScriptThreading.h in Headers */ = {isa = PBXBuildFile; fileRef = BC4741290D038A4C0072B006 /* JavaScriptThreading.h */; };
- BC4741410D038A570072B006 /* JavaScriptThreadingPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4741400D038A570072B006 /* JavaScriptThreadingPthreads.cpp */; };
BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */; };
BC9D90250C97472E0099A4A3 /* WorkQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9D90220C97472E0099A4A3 /* WorkQueue.h */; };
BC9D90260C97472E0099A4A3 /* WorkQueueItem.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9D90230C97472E0099A4A3 /* WorkQueueItem.h */; };
@@ -222,8 +227,8 @@
dstPath = DumpRenderTree.resources;
dstSubfolderSpec = 7;
files = (
- 8CCDA82A151A72D10003F937 /* SampleFont.sfont in Copy Font Files */,
5DB9AC970F722C3600684641 /* AHEM____.TTF in Copy Font Files */,
+ 8CCDA82A151A72D10003F937 /* SampleFont.sfont in Copy Font Files */,
5DB9AC980F722C3600684641 /* WebKitWeightWatcher100.ttf in Copy Font Files */,
5DB9AC990F722C3600684641 /* WebKitWeightWatcher200.ttf in Copy Font Files */,
5DB9AC9A0F722C3600684641 /* WebKitWeightWatcher300.ttf in Copy Font Files */,
@@ -251,8 +256,11 @@
1A215A7F11F2609C008AD0F5 /* PluginTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginTest.cpp; sourceTree = "<group>"; };
1A215A8011F2609C008AD0F5 /* PluginTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginTest.h; sourceTree = "<group>"; };
1A24BAA8120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NPRuntimeObjectFromDestroyedPlugin.cpp; sourceTree = "<group>"; };
+ 1A2FB84C178C80920059FD96 /* DefaultPolicyDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DefaultPolicyDelegate.h; sourceTree = "<group>"; };
+ 1A2FB84D178C80930059FD96 /* DefaultPolicyDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DefaultPolicyDelegate.m; sourceTree = "<group>"; };
1A31EB3713466AC100017372 /* ConvertPoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConvertPoint.cpp; sourceTree = "<group>"; };
1A3E28A91311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetURLWithJavaScriptURLDestroyingPlugin.cpp; sourceTree = "<group>"; };
+ 1A4CCD4E171375A300981040 /* ToStringAndValueOfObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ToStringAndValueOfObject.cpp; sourceTree = "<group>"; };
1A5CC1F3137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetURLWithJavaScriptURL.cpp; sourceTree = "<group>"; };
1A66C34F14576A920099A115 /* ContentsScaleFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentsScaleFactor.cpp; sourceTree = "<group>"; };
1A8F024C0BB9B056008CFA34 /* TestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObject.h; sourceTree = "<group>"; };
@@ -269,6 +277,7 @@
29CFBA0E122736E600BC30C0 /* AccessibilityTextMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityTextMarker.h; sourceTree = "<group>"; };
29CFBA0F122736E600BC30C0 /* AccessibilityTextMarker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AccessibilityTextMarker.cpp; sourceTree = "<group>"; };
29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityTextMarkerMac.mm; path = mac/AccessibilityTextMarkerMac.mm; sourceTree = "<group>"; };
+ 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptThreading.cpp; sourceTree = "<group>"; };
2D403EA215087142005358D2 /* LayoutTestHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LayoutTestHelper.m; path = mac/LayoutTestHelper.m; sourceTree = "<group>"; };
2D403F19150871F9005358D2 /* LayoutTestHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LayoutTestHelper; sourceTree = BUILT_PRODUCTS_DIR; };
31117B3A15D9A56A00163BC8 /* MockWebNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockWebNotificationProvider.h; path = mac/MockWebNotificationProvider.h; sourceTree = "<group>"; };
@@ -319,6 +328,8 @@
A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CheckedMalloc.h; path = mac/CheckedMalloc.h; sourceTree = "<group>"; };
A8D79CE80FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DumpRenderTreeFileDraggingSource.h; sourceTree = "<group>"; };
A8D79CE90FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DumpRenderTreeFileDraggingSource.m; sourceTree = "<group>"; };
+ AA5A15ED16E15CD000F7C561 /* AccessibilityControllerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityControllerIOS.mm; path = ios/AccessibilityControllerIOS.mm; sourceTree = "<group>"; };
+ AA5A15EE16E15CD000F7C561 /* AccessibilityUIElementIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityUIElementIOS.mm; path = ios/AccessibilityUIElementIOS.mm; sourceTree = "<group>"; };
AA7F10C20CB3C1030003BDC9 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "qt/fonts/AHEM____.TTF"; sourceTree = "<group>"; };
AE8257EF08D22389000507AB /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
B5A7526708AF4A4A00138E45 /* ImageDiff */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ImageDiff; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -330,7 +341,6 @@
BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityUIElementMac.mm; path = mac/AccessibilityUIElementMac.mm; sourceTree = "<group>"; };
BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AccessibilityCommonMac.mm; path = mac/AccessibilityCommonMac.mm; sourceTree = "<group>"; };
BC4741290D038A4C0072B006 /* JavaScriptThreading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavaScriptThreading.h; sourceTree = "<group>"; };
- BC4741400D038A570072B006 /* JavaScriptThreadingPthreads.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JavaScriptThreadingPthreads.cpp; path = pthreads/JavaScriptThreadingPthreads.cpp; sourceTree = "<group>"; };
BC9D90210C97472D0099A4A3 /* WorkQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WorkQueue.cpp; sourceTree = "<group>"; };
BC9D90220C97472E0099A4A3 /* WorkQueue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WorkQueue.h; sourceTree = "<group>"; };
BC9D90230C97472E0099A4A3 /* WorkQueueItem.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WorkQueueItem.h; sourceTree = "<group>"; };
@@ -396,8 +406,8 @@
141BF439096A455900E0753C /* Carbon.framework in Frameworks */,
141BF436096A455900E0753C /* Cocoa.framework in Frameworks */,
141BF438096A455900E0753C /* JavaScriptCore.framework in Frameworks */,
- 141BF435096A455900E0753C /* WebKit.framework in Frameworks */,
0F37A4AA11E6629100275F54 /* QuartzCore.framework in Frameworks */,
+ 141BF435096A455900E0753C /* WebKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -415,10 +425,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 5DE8AE4413A2C15900D6A37D /* libWebCoreTestSupport.dylib in Frameworks */,
AE8259F308D22463000507AB /* Carbon.framework in Frameworks */,
A84F608A08B136DA00E9745F /* Cocoa.framework in Frameworks */,
A817090408B164D300CCB9FB /* JavaScriptCore.framework in Frameworks */,
+ 5DE8AE4413A2C15900D6A37D /* libWebCoreTestSupport.dylib in Frameworks */,
23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */,
9340995108540CAE007F3BC8 /* WebKit.framework in Frameworks */,
);
@@ -440,6 +450,8 @@
08FB7794FE84155DC02AAC07 /* DumpRenderTree */ = {
isa = PBXGroup;
children = (
+ 1A2FB84C178C80920059FD96 /* DefaultPolicyDelegate.h */,
+ 1A2FB84D178C80930059FD96 /* DefaultPolicyDelegate.m */,
9830F31E15C81181005AB206 /* DumpRenderTreeCommon.cpp */,
32A70AAB03705E1F00C91783 /* DumpRenderTreePrefix.h */,
1422A2750AF6F4BD00E1A883 /* Delegates */,
@@ -450,12 +462,12 @@
A8B91BF70CF522B4008F91FF /* CheckedMalloc.cpp */,
A8B91BF90CF522B4008F91FF /* CheckedMalloc.h */,
BC4741290D038A4C0072B006 /* JavaScriptThreading.h */,
- BC4741400D038A570072B006 /* JavaScriptThreadingPthreads.cpp */,
BCA18C0A0C9B59EF00114369 /* DumpRenderTreeMac.h */,
BCA18B730C9B08F100114369 /* DumpRenderTreeDraggingInfo.h */,
BCA18B740C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm */,
A8D79CE80FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.h */,
A8D79CE90FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m */,
+ 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */,
44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */,
44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */,
440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */,
@@ -482,8 +494,8 @@
141BF448096A45C800E0753C /* Info.plist */,
1AC6C77F0D07589B00CD3161 /* main.cpp */,
1AC6C7800D07589B00CD3161 /* PluginObject.cpp */,
- 0F37A4A611E6628700275F54 /* PluginObjectMac.mm */,
141BF447096A45C800E0753C /* PluginObject.h */,
+ 0F37A4A611E6628700275F54 /* PluginObjectMac.mm */,
1A215A7F11F2609C008AD0F5 /* PluginTest.cpp */,
1A215A8011F2609C008AD0F5 /* PluginTest.h */,
1AC6C7810D07589B00CD3161 /* TestObject.cpp */,
@@ -495,8 +507,10 @@
1422A2690AF6F45200E1A883 /* Controllers */ = {
isa = PBXGroup;
children = (
+ BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */,
BCD08B390E1057EF00A7D0C1 /* AccessibilityController.cpp */,
BCD08A580E10496B00A7D0C1 /* AccessibilityController.h */,
+ AA5A15ED16E15CD000F7C561 /* AccessibilityControllerIOS.mm */,
BCD08B700E1059D200A7D0C1 /* AccessibilityControllerMac.mm */,
80045AEB147718E7008290A8 /* AccessibilityNotificationHandler.h */,
80045AEC147718E7008290A8 /* AccessibilityNotificationHandler.mm */,
@@ -505,9 +519,8 @@
29CFBA2D12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm */,
BC0E24DF0E2D9451001B6BC2 /* AccessibilityUIElement.cpp */,
BC0E24DE0E2D9451001B6BC2 /* AccessibilityUIElement.h */,
+ AA5A15EE16E15CD000F7C561 /* AccessibilityUIElementIOS.mm */,
BC0E26140E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm */,
- BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */,
- BC0E26140E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm */,
BCA18B360C9B021900114369 /* AppleScriptController.h */,
BCA18B370C9B021900114369 /* AppleScriptController.m */,
BCA18B6B0C9B08DB00114369 /* EventSendingController.h */,
@@ -515,9 +528,6 @@
BCF6C64F0C98E9C000AC063E /* GCController.cpp */,
14770FE00A22ADF7009342EE /* GCController.h */,
BCA18B210C9B014B00114369 /* GCControllerMac.mm */,
- BC0131D80C9772010087317D /* TestRunner.cpp */,
- BC0131D90C9772010087317D /* TestRunner.h */,
- BCA18B220C9B014B00114369 /* TestRunnerMac.mm */,
E1B7808511AF1643007E1BC2 /* MockGeolocationProvider.h */,
E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */,
31117B3A15D9A56A00163BC8 /* MockWebNotificationProvider.h */,
@@ -526,6 +536,9 @@
BCA18B6E0C9B08DB00114369 /* NavigationController.m */,
BCA18B2F0C9B01B400114369 /* ObjCController.h */,
BCA18B300C9B01B400114369 /* ObjCController.m */,
+ BC0131D80C9772010087317D /* TestRunner.cpp */,
+ BC0131D90C9772010087317D /* TestRunner.h */,
+ BCA18B220C9B014B00114369 /* TestRunnerMac.mm */,
BCA18B3A0C9B024900114369 /* TextInputController.h */,
BCA18B480C9B02C400114369 /* TextInputController.m */,
);
@@ -546,10 +559,10 @@
BCA18B5C0C9B08C200114369 /* PolicyDelegate.mm */,
BCA18B5D0C9B08C200114369 /* ResourceLoadDelegate.h */,
BCA18B5E0C9B08C200114369 /* ResourceLoadDelegate.mm */,
- BCA18B5F0C9B08C200114369 /* UIDelegate.h */,
- BCA18B600C9B08C200114369 /* UIDelegate.mm */,
3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */,
3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */,
+ BCA18B5F0C9B08C200114369 /* UIDelegate.h */,
+ BCA18B600C9B08C200114369 /* UIDelegate.mm */,
);
name = Delegates;
sourceTree = "<group>";
@@ -580,6 +593,7 @@
515F429B15C07872007C8F90 /* PluginScriptableObjectOverridesAllProperties.cpp */,
1A1E4296141141C400388758 /* PrivateBrowsing.cpp */,
5106803D15CC7B10001A8A23 /* SlowNPPNew.cpp */,
+ 1A4CCD4E171375A300981040 /* ToStringAndValueOfObject.cpp */,
);
path = Tests;
sourceTree = "<group>";
@@ -587,9 +601,9 @@
1A31EB3613466AC100017372 /* mac */ = {
isa = PBXGroup;
children = (
+ 1A66C34F14576A920099A115 /* ContentsScaleFactor.cpp */,
1A31EB3713466AC100017372 /* ConvertPoint.cpp */,
1A14C8A31406DE0400B254F7 /* SupportsCarbonEventModel.cpp */,
- 1A66C34F14576A920099A115 /* ContentsScaleFactor.cpp */,
);
path = mac;
sourceTree = "<group>";
@@ -615,8 +629,8 @@
children = (
9340995408540CAF007F3BC8 /* DumpRenderTree */,
B5A7526708AF4A4A00138E45 /* ImageDiff */,
- 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */,
2D403F19150871F9005358D2 /* LayoutTestHelper */,
+ 141BF233096A44CF00E0753C /* TestNetscapePlugIn.plugin */,
);
name = Products;
sourceTree = "<group>";
@@ -625,6 +639,7 @@
isa = PBXGroup;
children = (
AA7F10C20CB3C1030003BDC9 /* AHEM____.TTF */,
+ 8CCDA81F151A56550003F937 /* SampleFont.sfont */,
375F09710DAC3CB600C8B4E5 /* WebKitWeightWatcher100.ttf */,
375F09720DAC3CB600C8B4E5 /* WebKitWeightWatcher200.ttf */,
375F09730DAC3CB600C8B4E5 /* WebKitWeightWatcher300.ttf */,
@@ -634,7 +649,6 @@
375F09770DAC3CB600C8B4E5 /* WebKitWeightWatcher700.ttf */,
375F09780DAC3CB600C8B4E5 /* WebKitWeightWatcher800.ttf */,
375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */,
- 8CCDA81F151A56550003F937 /* SampleFont.sfont */,
);
name = Resources;
sourceTree = "<group>";
@@ -642,11 +656,11 @@
A803FF6409CAACC1009B2A37 /* Frameworks */ = {
isa = PBXGroup;
children = (
- 5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */,
BCB284B20CFA82CB007E533E /* ApplicationServices.framework */,
AE8257EF08D22389000507AB /* Carbon.framework */,
A84F608908B136DA00E9745F /* Cocoa.framework */,
A817090308B164D300CCB9FB /* JavaScriptCore.framework */,
+ 5DE8AE4313A2C15800D6A37D /* libWebCoreTestSupport.dylib */,
23BCB88F0EA57623003C6289 /* OpenGL.framework */,
B5A752A108AF5D1F00138E45 /* QuartzCore.framework */,
9335435F03D75502008635CE /* WebKit.framework */,
@@ -712,8 +726,8 @@
buildActionMask = 2147483647;
files = (
141BF453096A45EB00E0753C /* PluginObject.h in Headers */,
- 1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */,
1A215A8211F2609C008AD0F5 /* PluginTest.h in Headers */,
+ 1A8F02E80BB9B4EC008CFA34 /* TestObject.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -721,6 +735,8 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
+ 80045AED147718E7008290A8 /* AccessibilityNotificationHandler.h in Headers */,
+ 29CFBA10122736E600BC30C0 /* AccessibilityTextMarker.h in Headers */,
BC0E24E00E2D9451001B6BC2 /* AccessibilityUIElement.h in Headers */,
BCA18B380C9B021900114369 /* AppleScriptController.h in Headers */,
A8B91BFF0CF522B4008F91FF /* CheckedMalloc.h in Headers */,
@@ -735,8 +751,10 @@
BCA18B6F0C9B08DB00114369 /* EventSendingController.h in Headers */,
BCA18B630C9B08C200114369 /* FrameLoadDelegate.h in Headers */,
14770FE20A22ADF7009342EE /* GCController.h in Headers */,
+ 5185F6B310714E12007AA393 /* HistoryDelegate.h in Headers */,
BC47412A0D038A4C0072B006 /* JavaScriptThreading.h in Headers */,
- BC0131DB0C9772010087317D /* TestRunner.h in Headers */,
+ E1B7816711AF31C3007E1BC2 /* MockGeolocationProvider.h in Headers */,
+ 31117B3C15D9A56A00163BC8 /* MockWebNotificationProvider.h in Headers */,
BCA18B710C9B08DB00114369 /* NavigationController.h in Headers */,
BCA18B310C9B01B400114369 /* ObjCController.h in Headers */,
BCA18B7D0C9B08F100114369 /* ObjCPlugin.h in Headers */,
@@ -744,19 +762,16 @@
BCB284C70CFA83C4007E533E /* PixelDumpSupport.h in Headers */,
BCB284D00CFA83CC007E533E /* PixelDumpSupportCG.h in Headers */,
BCA18B650C9B08C200114369 /* PolicyDelegate.h in Headers */,
+ 1A2FB84E178C80930059FD96 /* DefaultPolicyDelegate.h in Headers */,
BCA18B670C9B08C200114369 /* ResourceLoadDelegate.h in Headers */,
+ 3A5626CC131CA036002BE6D9 /* StorageTrackerDelegate.h in Headers */,
+ BC0131DB0C9772010087317D /* TestRunner.h in Headers */,
BCA18B3C0C9B024900114369 /* TextInputController.h in Headers */,
BCA18B690C9B08C200114369 /* UIDelegate.h in Headers */,
4437730F125CBC4D00AAE02C /* WebArchiveDumpSupport.h in Headers */,
+ 417DAA1D137B3E24007C57FB /* WebCoreTestSupport.h in Headers */,
BC9D90250C97472E0099A4A3 /* WorkQueue.h in Headers */,
BC9D90260C97472E0099A4A3 /* WorkQueueItem.h in Headers */,
- 5185F6B310714E12007AA393 /* HistoryDelegate.h in Headers */,
- E1B7816711AF31C3007E1BC2 /* MockGeolocationProvider.h in Headers */,
- 29CFBA10122736E600BC30C0 /* AccessibilityTextMarker.h in Headers */,
- 3A5626CC131CA036002BE6D9 /* StorageTrackerDelegate.h in Headers */,
- 417DAA1D137B3E24007C57FB /* WebCoreTestSupport.h in Headers */,
- 80045AED147718E7008290A8 /* AccessibilityNotificationHandler.h in Headers */,
- 31117B3C15D9A56A00163BC8 /* MockWebNotificationProvider.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -865,6 +880,8 @@
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ };
buildConfigurationList = 149C29C308902C6D008A9EFC /* Build configuration list for PBXProject "DumpRenderTree" */;
compatibilityVersion = "Xcode 2.4";
developmentRegion = English;
@@ -905,36 +922,37 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 1AC6C8490D07638600CD3161 /* main.cpp in Sources */,
- 1AC6C84A0D07638600CD3161 /* PluginObject.cpp in Sources */,
- 1AC6C84B0D07638600CD3161 /* TestObject.cpp in Sources */,
- 0F37A4A711E6628700275F54 /* PluginObjectMac.mm in Sources */,
- 1A215A8111F2609C008AD0F5 /* PluginTest.cpp in Sources */,
+ 1A66C35114576A920099A115 /* ContentsScaleFactor.cpp in Sources */,
+ 1A4CCD4F171375A300981040 /* ToStringAndValueOfObject.cpp in Sources */,
+ 1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */,
1A215BE711F27658008AD0F5 /* DocumentOpenInDestroyStream.cpp in Sources */,
- 1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */,
- 1AC77DCF120605B6005C19EF /* NPRuntimeRemoveProperty.cpp in Sources */,
- 1A24BAA9120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp in Sources */,
- C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */,
- C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */,
C0E720751281C828004EF533 /* EvaluateJSAfterRemovingPluginElement.cpp in Sources */,
- 1AD4CB2212A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp in Sources */,
+ 51CACBD815D96FD000EB53A2 /* EvaluateJSWithinNPP_New.cpp in Sources */,
+ 4AD6A11413C8124000EA9737 /* FormValue.cpp in Sources */,
+ 1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */,
+ 1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */,
1A3E28AA1311D73B00501349 /* GetURLWithJavaScriptURLDestroyingPlugin.cpp in Sources */,
+ 1AD4CB2212A6D1350027A7AF /* GetUserAgentWithNullNPPFromNPPNew.cpp in Sources */,
+ 51134C9916014FDC001AA513 /* InvokeDestroysPluginWithinNPP_New.cpp in Sources */,
+ 515C0CD015EE785700F5A613 /* LogNPPSetWindow.cpp in Sources */,
+ 1AC6C8490D07638600CD3161 /* main.cpp in Sources */,
1ACF898D132EF41C00E915D4 /* NPDeallocateCalledBeforeNPShutdown.cpp in Sources */,
- 1A31EB3813466AC100017372 /* ConvertPoint.cpp in Sources */,
+ 5113DE6715F6CBE5005EC8B3 /* NPPNewFails.cpp in Sources */,
C031182B134E4A2B00919757 /* NPPSetWindowCalledDuringDestruction.cpp in Sources */,
- 1A5CC1F5137DD2EC00A5D7E7 /* GetURLWithJavaScriptURL.cpp in Sources */,
- 1AFF66BC137DEFD200791696 /* GetURLNotifyWithURLThatFailsToLoad.cpp in Sources */,
- 4AD6A11413C8124000EA9737 /* FormValue.cpp in Sources */,
- 1A14C8A51406DE0400B254F7 /* SupportsCarbonEventModel.cpp in Sources */,
- 1A1E4298141141C400388758 /* PrivateBrowsing.cpp in Sources */,
- 1A66C35114576A920099A115 /* ContentsScaleFactor.cpp in Sources */,
+ 1AD8683F163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp in Sources */,
+ 1A24BAA9120734EE00FBB059 /* NPRuntimeObjectFromDestroyedPlugin.cpp in Sources */,
+ 1AC77DCF120605B6005C19EF /* NPRuntimeRemoveProperty.cpp in Sources */,
+ C0EC3C9C12787F0500939164 /* NullNPPGetValuePointer.cpp in Sources */,
+ C06F9ABC1267A7060058E1F6 /* PassDifferentNPPStruct.cpp in Sources */,
+ 1AC6C84A0D07638600CD3161 /* PluginObject.cpp in Sources */,
+ 0F37A4A711E6628700275F54 /* PluginObjectMac.mm in Sources */,
+ 1AD9D2FE12028409001A70D1 /* PluginScriptableNPObjectInvokeDefault.cpp in Sources */,
515F429C15C07872007C8F90 /* PluginScriptableObjectOverridesAllProperties.cpp in Sources */,
+ 1A215A8111F2609C008AD0F5 /* PluginTest.cpp in Sources */,
+ 1A1E4298141141C400388758 /* PrivateBrowsing.cpp in Sources */,
5106803E15CC7B10001A8A23 /* SlowNPPNew.cpp in Sources */,
- 51CACBD815D96FD000EB53A2 /* EvaluateJSWithinNPP_New.cpp in Sources */,
- 515C0CD015EE785700F5A613 /* LogNPPSetWindow.cpp in Sources */,
- 5113DE6715F6CBE5005EC8B3 /* NPPNewFails.cpp in Sources */,
- 51134C9916014FDC001AA513 /* InvokeDestroysPluginWithinNPP_New.cpp in Sources */,
- 1AD8683F163B2FD000A28583 /* NPRuntimeCallsWithNullNPP.cpp in Sources */,
+ 1A14C8A51406DE0400B254F7 /* SupportsCarbonEventModel.cpp in Sources */,
+ 1AC6C84B0D07638600CD3161 /* TestObject.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -950,15 +968,19 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ BC0E26150E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm in Sources */,
BCD08B3A0E1057EF00A7D0C1 /* AccessibilityController.cpp in Sources */,
BCD08B710E1059D200A7D0C1 /* AccessibilityControllerMac.mm in Sources */,
+ 80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */,
+ 29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */,
+ 29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */,
BC0E24E10E2D9451001B6BC2 /* AccessibilityUIElement.cpp in Sources */,
BC0E26150E2DA4C6001B6BC2 /* AccessibilityUIElementMac.mm in Sources */,
- BC0E26150E2DA4C6001B6BC3 /* AccessibilityCommonMac.mm in Sources */,
BCA18B390C9B021900114369 /* AppleScriptController.m in Sources */,
A8B91BFD0CF522B4008F91FF /* CheckedMalloc.cpp in Sources */,
53CBB832134E42F3001CE6A4 /* CyclicRedundancyCheck.cpp in Sources */,
BCA18C470C9B5B9400114369 /* DumpRenderTree.mm in Sources */,
+ 9830F31F15C81181005AB206 /* DumpRenderTreeCommon.cpp in Sources */,
BCA18B7B0C9B08F100114369 /* DumpRenderTreeDraggingInfo.mm in Sources */,
A8D79CEB0FC28B2C004AC8FE /* DumpRenderTreeFileDraggingSource.m in Sources */,
A8B91ADA0CF3B32F008F91FF /* DumpRenderTreePasteboard.m in Sources */,
@@ -968,9 +990,11 @@
BCA18B640C9B08C200114369 /* FrameLoadDelegate.mm in Sources */,
BCF6C6500C98E9C000AC063E /* GCController.cpp in Sources */,
BCA18B230C9B014B00114369 /* GCControllerMac.mm in Sources */,
- BC4741410D038A570072B006 /* JavaScriptThreadingPthreads.cpp in Sources */,
- BC0131DA0C9772010087317D /* TestRunner.cpp in Sources */,
- BCA18B240C9B014B00114369 /* TestRunnerMac.mm in Sources */,
+ AA5A15EF16E15CD000F7C561 /* AccessibilityControllerIOS.mm in Sources */,
+ 5185F6B210714E07007AA393 /* HistoryDelegate.mm in Sources */,
+ 2CE88FA217124D8C00734FC0 /* JavaScriptThreading.cpp in Sources */,
+ E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */,
+ 31117B3D15D9A56A00163BC8 /* MockWebNotificationProvider.mm in Sources */,
BCA18B720C9B08DB00114369 /* NavigationController.m in Sources */,
BCA18B320C9B01B400114369 /* ObjCController.m in Sources */,
BCA18B7E0C9B08F100114369 /* ObjCPlugin.m in Sources */,
@@ -979,21 +1003,18 @@
BCB284CD0CFA83C8007E533E /* PixelDumpSupportCG.cpp in Sources */,
BCB284D60CFA83D1007E533E /* PixelDumpSupportMac.mm in Sources */,
BCA18B660C9B08C200114369 /* PolicyDelegate.mm in Sources */,
+ AA5A15F016E15CD000F7C561 /* AccessibilityUIElementIOS.mm in Sources */,
BCA18B680C9B08C200114369 /* ResourceLoadDelegate.mm in Sources */,
+ 3A5626CB131CA02A002BE6D9 /* StorageTrackerDelegate.mm in Sources */,
+ BC0131DA0C9772010087317D /* TestRunner.cpp in Sources */,
+ BCA18B240C9B014B00114369 /* TestRunnerMac.mm in Sources */,
BCA18B490C9B02C400114369 /* TextInputController.m in Sources */,
+ 1A2FB84F178C80930059FD96 /* DefaultPolicyDelegate.m in Sources */,
BCA18B6A0C9B08C200114369 /* UIDelegate.mm in Sources */,
4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */,
440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */,
BC9D90240C97472E0099A4A3 /* WorkQueue.cpp in Sources */,
BCA18B260C9B015C00114369 /* WorkQueueItemMac.mm in Sources */,
- 5185F6B210714E07007AA393 /* HistoryDelegate.mm in Sources */,
- E1B7816511AF31B7007E1BC2 /* MockGeolocationProvider.mm in Sources */,
- 29CFBA11122736E600BC30C0 /* AccessibilityTextMarker.cpp in Sources */,
- 29CFBA2E12273A1000BC30C0 /* AccessibilityTextMarkerMac.mm in Sources */,
- 3A5626CB131CA02A002BE6D9 /* StorageTrackerDelegate.mm in Sources */,
- 80045AEE147718E7008290A8 /* AccessibilityNotificationHandler.mm in Sources */,
- 9830F31F15C81181005AB206 /* DumpRenderTreeCommon.cpp in Sources */,
- 31117B3D15D9A56A00163BC8 /* MockWebNotificationProvider.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp b/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp
index 48d832258..3cb97ebfd 100644
--- a/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp
+++ b/Tools/DumpRenderTree/DumpRenderTreeCommon.cpp
@@ -66,17 +66,20 @@ TestCommand parseInputLine(const std::string& inputLine)
if (!tokenizer.hasNext())
die(inputLine);
- result.pathOrURL = tokenizer.next();
- if (!tokenizer.hasNext())
- return result;
-
std::string arg = tokenizer.next();
- if (arg != std::string("-p") && arg != std::string("--pixel-test"))
- die(inputLine);
- result.shouldDumpPixels = true;
-
- if (tokenizer.hasNext())
- result.expectedPixelHash = tokenizer.next();
+ result.pathOrURL = arg;
+ while (tokenizer.hasNext()) {
+ arg = tokenizer.next();
+ if (arg == std::string("--timeout")) {
+ std::string timeoutToken = tokenizer.next();
+ result.timeout = atoi(timeoutToken.c_str());
+ } else if (arg == std::string("-p") || arg == std::string("--pixel-test")) {
+ result.shouldDumpPixels = true;
+ if (tokenizer.hasNext())
+ result.expectedPixelHash = tokenizer.next();
+ } else
+ die(inputLine);
+ }
return result;
}
diff --git a/Tools/DumpRenderTree/JavaScriptThreading.cpp b/Tools/DumpRenderTree/JavaScriptThreading.cpp
new file mode 100644
index 000000000..66de156c7
--- /dev/null
+++ b/Tools/DumpRenderTree/JavaScriptThreading.cpp
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
+ * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
+ * (C) 2007 Eric Seidel <eric@webkit.org>
+ * (C) 2012 Patrick Ganstere <paroga@paroga.com>
+ *
+ * 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
+ */
+
+#include "config.h"
+#include "JavaScriptThreading.h"
+
+#include <JavaScriptCore/JavaScriptCore.h>
+#include <stdlib.h>
+#include <wtf/Assertions.h>
+#include <wtf/HashSet.h>
+#include <wtf/Vector.h>
+
+static const size_t javaScriptThreadsCount = 4;
+static bool javaScriptThreadsShouldTerminate;
+static JSContextGroupRef javaScriptThreadsGroup;
+
+static Mutex& javaScriptThreadsMutex()
+{
+ DEFINE_STATIC_LOCAL(Mutex, staticMutex, ());
+ return staticMutex;
+}
+
+typedef HashSet<ThreadIdentifier> ThreadSet;
+static ThreadSet& javaScriptThreads()
+{
+ DEFINE_STATIC_LOCAL(ThreadSet, staticJavaScriptThreads, ());
+ ASSERT(!javaScriptThreadsMutex().tryLock());
+ return staticJavaScriptThreads;
+}
+
+// This function exercises JSC in a loop until javaScriptThreadsShouldTerminate
+// becomes true or it probabilistically decides to spawn a replacement thread and exit.
+void runJavaScriptThread(void*)
+{
+ static const char* const script =
+ "var array = [];"
+ "for (var i = 0; i < 1024; i++) {"
+ " array.push(String(i));"
+ "}";
+
+ JSGlobalContextRef ctx;
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ ctx = JSGlobalContextCreateInGroup(javaScriptThreadsGroup, 0);
+ }
+
+ JSStringRef scriptRef;
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ scriptRef = JSStringCreateWithUTF8CString(script);
+ }
+
+ while (true) {
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ JSValueRef exception = 0;
+ JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
+ ASSERT(!exception);
+ }
+
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ const size_t valuesCount = 1024;
+ JSValueRef values[valuesCount];
+ for (size_t i = 0; i < valuesCount; ++i)
+ values[i] = JSObjectMake(ctx, 0, 0);
+ }
+
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ if (javaScriptThreadsShouldTerminate)
+ break;
+ }
+
+ // Respawn probabilistically.
+ if (rand() % 5)
+ continue;
+
+ MutexLocker locker(javaScriptThreadsMutex());
+ ThreadIdentifier thread = currentThread();
+ detachThread(thread);
+ javaScriptThreads().remove(thread);
+ javaScriptThreads().add(createThread(&runJavaScriptThread, 0, 0));
+ break;
+ }
+
+ MutexLocker locker(javaScriptThreadsMutex());
+ JSStringRelease(scriptRef);
+ JSGarbageCollect(ctx);
+ JSGlobalContextRelease(ctx);
+}
+
+void startJavaScriptThreads()
+{
+ javaScriptThreadsGroup = JSContextGroupCreate();
+
+ MutexLocker locker(javaScriptThreadsMutex());
+
+ for (size_t i = 0; i < javaScriptThreadsCount; ++i)
+ javaScriptThreads().add(createThread(&runJavaScriptThread, 0, 0));
+}
+
+void stopJavaScriptThreads()
+{
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ javaScriptThreadsShouldTerminate = true;
+ }
+
+ Vector<ThreadIdentifier, javaScriptThreadsCount> threads;
+ {
+ MutexLocker locker(javaScriptThreadsMutex());
+ copyToVector(javaScriptThreads(), threads);
+ ASSERT(threads.size() == javaScriptThreadsCount);
+ }
+
+ for (size_t i = 0; i < javaScriptThreadsCount; ++i)
+ waitForThreadCompletion(threads[i]);
+
+ javaScriptThreads().clear();
+
+ JSContextGroupRelease(javaScriptThreadsGroup);
+}
diff --git a/Tools/DumpRenderTree/Makefile b/Tools/DumpRenderTree/Makefile
index 1f1dbbcb3..344ef480b 100644
--- a/Tools/DumpRenderTree/Makefile
+++ b/Tools/DumpRenderTree/Makefile
@@ -1,2 +1,9 @@
SCRIPTS_PATH = ../Scripts
+
+ifneq (,$(findstring iphoneos,$(SDKROOT)))
+ OTHER_OPTIONS += -target All-iOS
+else ifneq (,$(findstring iphonesimulator,$(SDKROOT)))
+ OTHER_OPTIONS += -target All-iOS
+endif
+
include ../../Makefile.shared
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt b/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
index 384b5bfb0..512032359 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
@@ -1,6 +1,6 @@
-SET(WEBKIT_TESTNETSCAPEPLUGIN_DIR "${TOOLS_DIR}/DumpRenderTree/TestNetscapePlugIn")
+set(WEBKIT_TESTNETSCAPEPLUGIN_DIR "${TOOLS_DIR}/DumpRenderTree/TestNetscapePlugIn")
-SET(WebKitTestNetscapePlugin_SOURCES
+set(WebKitTestNetscapePlugin_SOURCES
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/PluginObject.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/PluginTest.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/TestObject.cpp
@@ -13,6 +13,7 @@ SET(WebKitTestNetscapePlugin_SOURCES
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetURLWithJavaScriptURL.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp
+ ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/LogNPPSetWindow.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPDeallocateCalledBeforeNPShutdown.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPPNewFails.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/NPPSetWindowCalledDuringDestruction.cpp
@@ -24,15 +25,21 @@ SET(WebKitTestNetscapePlugin_SOURCES
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PluginScriptableNPObjectInvokeDefault.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PluginScriptableObjectOverridesAllProperties.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/PrivateBrowsing.cpp
+ ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/ToStringAndValueOfObject.cpp
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp
)
-SET(WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES
+set(WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}
${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/unix/ForwardingHeaders
${WEBCORE_DIR}
)
-INCLUDE_DIRECTORIES(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
+include_directories(${WebKitTestNetscapePlugin_INCLUDE_DIRECTORIES})
-ADD_LIBRARY(TestNetscapePlugin SHARED ${WebKitTestNetscapePlugin_SOURCES})
+set(WebKitTestNetscapePlugin_LIBRARIES
+ ${X11_LIBRARIES}
+)
+
+add_library(TestNetscapePlugin SHARED ${WebKitTestNetscapePlugin_SOURCES})
+target_link_libraries(TestNetscapePlugin ${WebKitTestNetscapePlugin_LIBRARIES})
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp
index c9af49c59..d78a29bae 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp
@@ -58,9 +58,11 @@ private:
if (error != NPERR_NO_ERROR) {
log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct failed with error %d", error);
+ notifyDone();
return NPERR_GENERIC_ERROR;
}
log("NPN_GetValue(NPNVprivateModeBool) with a different NPP struct succeeded");
+ notifyDone();
return NPERR_NO_ERROR;
}
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp
new file mode 100644
index 000000000..e46d1416b
--- /dev/null
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Cisco Systems, 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "PluginTest.h"
+
+#include <string.h>
+
+using namespace std;
+
+class ToStringAndValueOfObject : public PluginTest {
+public:
+ ToStringAndValueOfObject(NPP npp, const string& identifier)
+ : PluginTest(npp, identifier)
+ {
+ }
+
+private:
+ class ScriptableObject : public Object<ScriptableObject> {
+ public:
+ bool hasMethod(NPIdentifier methodName)
+ {
+ return identifierIs(methodName, "toString")
+ || identifierIs(methodName, "valueOf");
+ }
+
+ bool invoke(NPIdentifier methodName, const NPVariant*, uint32_t, NPVariant* result)
+ {
+ if (identifierIs(methodName, "toString")) {
+ // Return classname as string.
+ char* className = static_cast<char*>(pluginTest()->NPN_MemAlloc(11));
+ strcpy(className, "TestObject");
+ STRINGZ_TO_NPVARIANT(className, *result);
+ return true;
+ }
+ if (identifierIs(methodName, "valueOf")) {
+ // Return some number.
+ DOUBLE_TO_NPVARIANT(123456789, *result);
+ return true;
+ }
+ return false;
+ }
+
+ private:
+ ToStringAndValueOfObject* pluginTest() const { return static_cast<ToStringAndValueOfObject*>(Object<ScriptableObject>::pluginTest()); }
+ };
+
+ virtual NPError NPP_GetValue(NPPVariable variable, void* value)
+ {
+ if (variable != NPPVpluginScriptableNPObject)
+ return NPERR_GENERIC_ERROR;
+
+ *(NPObject**)value = ScriptableObject::create(this);
+
+ return NPERR_NO_ERROR;
+ }
+};
+
+static PluginTest::Register<ToStringAndValueOfObject> ToStringAndValueOfObject("to-string-and-value-of-object");
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp
index 0beb7de0a..1d851ead7 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac/ConvertPoint.cpp
@@ -69,7 +69,7 @@ public:
return true;
}
private:
- virtual NPError NPP_SetWindow(NPWindow*)
+ NPError NPP_New(NPMIMEType pluginType, uint16_t mode, int16_t argc, char *argn[], char *argv[], NPSavedData *saved)
{
if (testConvert())
executeScript("document.getElementById('result').innerHTML = 'SUCCESS!'");
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/CallJSThatDestroysPlugin.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win/CallJSThatDestroysPlugin.cpp
index 39c6365a6..39c6365a6 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/CallJSThatDestroysPlugin.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win/CallJSThatDestroysPlugin.cpp
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp b/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
index 97a4cf389..256acc003 100644
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
+++ b/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
@@ -351,6 +351,7 @@ NPError NPP_SetWindow(NPP instance, NPWindow *window)
if (obj->logSetWindow) {
pluginLog(instance, "NPP_SetWindow: %d %d", (int)window->width, (int)window->height);
obj->logSetWindow = FALSE;
+ executeScript(obj, "testRunner.notifyDone();");
}
if (obj->onSetWindow)
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
deleted file mode 100644
index 86414e21f..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.vcproj
+++ /dev/null
@@ -1,568 +0,0 @@
-<?xml version="1.0" encoding="windows-1251"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePlugin"
- ProjectGUID="{C0737398-3565-439E-A2B8-AB2BE4D5430C}"
- RootNamespace="TestNetscapePlugin"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\TestNetscapePluginDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\TestNetscapePluginRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\TestNetscapePluginDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\TestNetscapePluginDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\TestNetscapePluginProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\TestNetscapePluginReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Tests"
- >
- <File
- RelativePath=".\CallJSThatDestroysPlugin.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\DocumentOpenInDestroyStream.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\EvaluateJSAfterRemovingPluginElement.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\FormValue.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\GetURLNotifyWithURLThatFailsToLoad.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\GetURLWithJavaScriptURL.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\GetURLWithJavaScriptURLDestroyingPlugin.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\GetUserAgentWithNullNPPFromNPPNew.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NPDeallocateCalledBeforeNPShutdown.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NPPNewFails.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NPPSetWindowCalledDuringDestruction.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NPRuntimeCallsWithNullNPP.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NPRuntimeObjectFromDestroyedPlugin.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NPRuntimeRemoveProperty.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\NullNPPGetValuePointer.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\PassDifferentNPPStruct.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\PluginScriptableNPObjectInvokeDefault.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\PluginScriptableObjectOverridesAllProperties.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\PrivateBrowsing.cpp"
- >
- </File>
- <Filter
- Name="win"
- >
- <File
- RelativePath="..\Tests\win\DrawsGradient.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\win\DumpWindowRect.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\win\GetValueNetscapeWindow.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\win\NPNInvalidateRectInvalidatesWindow.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\win\WindowGeometryInitializedBeforeSetWindow.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\win\WindowlessPaintRectCoordinates.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\win\WindowRegionIsSetToClipRect.cpp"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="win"
- >
- <File
- RelativePath=".\WindowedPluginTest.cpp"
- >
- </File>
- <File
- RelativePath=".\WindowedPluginTest.h"
- >
- </File>
- <File
- RelativePath=".\WindowGeometryTest.cpp"
- >
- </File>
- <File
- RelativePath=".\WindowGeometryTest.h"
- >
- </File>
- </Filter>
- <File
- RelativePath="..\main.cpp"
- >
- </File>
- <File
- RelativePath="..\PluginObject.cpp"
- >
- </File>
- <File
- RelativePath="..\PluginObject.h"
- >
- </File>
- <File
- RelativePath="..\PluginTest.cpp"
- >
- </File>
- <File
- RelativePath="..\PluginTest.h"
- >
- </File>
- <File
- RelativePath=".\resource.h"
- >
- </File>
- <File
- RelativePath=".\TestNetscapePlugin.def"
- >
- </File>
- <File
- RelativePath=".\TestNetscapePlugin.rc"
- >
- </File>
- <File
- RelativePath=".\TestNetscapePlugin_debug.def"
- >
- </File>
- <File
- RelativePath="..\TestObject.cpp"
- >
- </File>
- <File
- RelativePath="..\TestObject.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops
deleted file mode 100644
index 6e8014d0d..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginCommon.vsprops
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;;&quot;$(ProjectDir)..&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;"
- PreprocessorDefinitions="_USRDLL;TESTNETSCAPEPLUGIN_EXPORTS;snprintf=_snprintf"
- DisableSpecificWarnings="4819"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Msimg32.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix)\np$(ProjectName)$(WebKitConfigSuffix).dll"
- ModuleDefinitionFile="TestNetscapePlugin$(WebKitConfigSuffix).def"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops
deleted file mode 100644
index c0e2d4ea0..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\TestNetscapePluginCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops
deleted file mode 100644
index 552f4bfbc..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\TestNetscapePluginCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops
deleted file mode 100644
index 901d0d368..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\TestNetscapePluginCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops
deleted file mode 100644
index fddc49b07..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\TestNetscapePluginCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops
deleted file mode 100644
index 73415e992..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\TestNetscapePluginCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops
deleted file mode 100644
index 404f863f0..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePluginReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestNetscapePluginReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\TestNetscapePluginCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin_debug.def b/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin_debug.def
deleted file mode 100644
index 158fb7c2b..000000000
--- a/Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin_debug.def
+++ /dev/null
@@ -1,6 +0,0 @@
-LIBRARY "npTestNetscapePlugin_debug"
-
-EXPORTS
- NP_GetEntryPoints @1
- NP_Initialize @2
- NP_Shutdown @3
diff --git a/Tools/DumpRenderTree/TestRunner.cpp b/Tools/DumpRenderTree/TestRunner.cpp
index fe28a2911..fdb3aaaf1 100644
--- a/Tools/DumpRenderTree/TestRunner.cpp
+++ b/Tools/DumpRenderTree/TestRunner.cpp
@@ -32,10 +32,11 @@
#include "WorkQueue.h"
#include "WorkQueueItem.h"
-#include <cstring>
#include <JavaScriptCore/JSContextRef.h>
+#include <JavaScriptCore/JSCTestRunnerUtils.h>
#include <JavaScriptCore/JSObjectRef.h>
#include <JavaScriptCore/JSRetainPtr.h>
+#include <cstring>
#include <locale.h>
#include <stdio.h>
#include <wtf/Assertions.h>
@@ -44,6 +45,16 @@
#include <wtf/OwnArrayPtr.h>
#include <wtf/RefPtr.h>
+#if PLATFORM(MAC)
+#include <Carbon/Carbon.h>
+#endif
+
+const unsigned TestRunner::viewWidth = 800;
+const unsigned TestRunner::viewHeight = 600;
+
+const unsigned TestRunner::w3cSVGViewWidth = 480;
+const unsigned TestRunner::w3cSVGViewHeight = 360;
+
TestRunner::TestRunner(const std::string& testPathOrURL, const std::string& expectedPixelHash)
: m_disallowIncreaseForApplicationCacheQuota(false)
, m_dumpApplicationCacheDelegateCallbacks(false)
@@ -548,15 +559,6 @@ static JSValueRef decodeHostNameCallback(JSContextRef context, JSObjectRef funct
return JSValueMakeString(context, decodedHostName.get());
}
-static JSValueRef disableImageLoadingCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- // Has mac implementation, needs windows implementation
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->disableImageLoading();
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef dispatchPendingLoadRequestsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac implementation, needs windows implementation
@@ -689,16 +691,6 @@ static JSValueRef keepWebHistoryCallback(JSContextRef context, JSObjectRef funct
return JSValueMakeUndefined(context);
}
-static JSValueRef computedStyleIncludingVisitedInfoCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 1)
- return JSValueMakeUndefined(context);
-
- // Has mac implementation
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- return controller->computedStyleIncludingVisitedInfo(context, arguments[0]);
-}
-
static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -875,7 +867,7 @@ static JSValueRef setAppCacheMaximumSizeCallback(JSContextRef context, JSObjectR
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
double size = JSValueToNumber(context, arguments[0], NULL);
- if (!isnan(size))
+ if (!std::isnan(size))
controller->setAppCacheMaximumSize(static_cast<unsigned long long>(size));
return JSValueMakeUndefined(context);
@@ -890,7 +882,7 @@ static JSValueRef setApplicationCacheOriginQuotaCallback(JSContextRef context, J
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
double size = JSValueToNumber(context, arguments[0], NULL);
- if (!isnan(size))
+ if (!std::isnan(size))
controller->setApplicationCacheOriginQuota(static_cast<unsigned long long>(size));
return JSValueMakeUndefined(context);
@@ -948,17 +940,6 @@ static JSValueRef setAuthorAndUserStylesEnabledCallback(JSContextRef context, JS
return JSValueMakeUndefined(context);
}
-static JSValueRef setAutofilledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 2 || !arguments[0])
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setAutofilled(context, arguments[0], JSValueToBoolean(context, arguments[1]));
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef setCacheModelCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has Mac implementation.
@@ -999,7 +980,7 @@ static JSValueRef setDatabaseQuotaCallback(JSContextRef context, JSObjectRef fun
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
double quota = JSValueToNumber(context, arguments[0], NULL);
- if (!isnan(quota))
+ if (!std::isnan(quota))
controller->setDatabaseQuota(static_cast<unsigned long long>(quota));
return JSValueMakeUndefined(context);
@@ -1308,18 +1289,6 @@ static JSValueRef setPrintingCallback(JSContextRef context, JSObjectRef function
}
-static JSValueRef setFrameFlatteningEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- // Has mac & windows implementation
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setFrameFlatteningEnabled(JSValueToBoolean(context, arguments[0]));
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef setAllowUniversalAccessFromFileURLsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac & windows implementation
@@ -1548,16 +1517,6 @@ static JSValueRef resetPageVisibilityCallback(JSContextRef context, JSObjectRef
return JSValueMakeUndefined(context);
}
-static JSValueRef setSmartInsertDeleteEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setSmartInsertDeleteEnabled(JSValueToBoolean(context, arguments[0]));
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef setAutomaticLinkDetectionEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
@@ -1568,16 +1527,6 @@ static JSValueRef setAutomaticLinkDetectionEnabledCallback(JSContextRef context,
return JSValueMakeUndefined(context);
}
-static JSValueRef setSelectTrailingWhitespaceEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setSelectTrailingWhitespaceEnabled(JSValueToBoolean(context, arguments[0]));
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -1585,16 +1534,6 @@ static JSValueRef setStopProvisionalFrameLoadsCallback(JSContextRef context, JSO
return JSValueMakeUndefined(context);
}
-static JSValueRef setAsynchronousSpellCheckingEnabledCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setAsynchronousSpellCheckingEnabled(JSValueToBoolean(context, arguments[0]));
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef showWebInspectorCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -1645,58 +1584,6 @@ static JSValueRef evaluateScriptInIsolatedWorldAndReturnValueCallback(JSContextR
return JSValueMakeUndefined(context);
}
-static JSValueRef elementDoesAutoCompleteForElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
-
- bool autoCompletes = controller->elementDoesAutoCompleteForElementWithId(elementId.get());
-
- return JSValueMakeBoolean(context, autoCompletes);
-}
-
-static JSValueRef pauseAnimationAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 3)
- return JSValueMakeUndefined(context);
-
- JSRetainPtr<JSStringRef> animationName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- double time = JSValueToNumber(context, arguments[1], exception);
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
- ASSERT(!*exception);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeBoolean(context, controller->pauseAnimationAtTimeOnElementWithId(animationName.get(), time, elementId.get()));
-}
-
-static JSValueRef pauseTransitionAtTimeOnElementWithIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 3)
- return JSValueMakeUndefined(context);
-
- JSRetainPtr<JSStringRef> propertyName(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- double time = JSValueToNumber(context, arguments[1], exception);
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[2], exception));
- ASSERT(!*exception);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeBoolean(context, controller->pauseTransitionAtTimeOnElementWithId(propertyName.get(), time, elementId.get()));
-}
-
-static JSValueRef numberOfActiveAnimationsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount != 0)
- return JSValueMakeUndefined(context);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeNumber(context, controller->numberOfActiveAnimations());
-}
-
static JSValueRef waitForPolicyDelegateCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t, const JSValueRef[], JSValueRef*)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -1831,39 +1718,6 @@ static JSValueRef setWebViewEditableCallback(JSContextRef context, JSObjectRef f
return JSValueMakeUndefined(context);
}
-static JSValueRef sendWebIntentResponseCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- JSRetainPtr<JSStringRef> response;
- if (argumentCount == 1) {
- response.adopt(JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- } else
- response.adopt(JSStringCreateWithUTF8CString(0));
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->sendWebIntentResponse(response.get());
-
- return JSValueMakeUndefined(context);
-}
-
-static JSValueRef deliverWebIntentCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount < 3)
- return JSValueMakeUndefined(context);
-
- JSRetainPtr<JSStringRef> action(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> type(Adopt, JSValueToStringCopy(context, arguments[1], exception));
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> data(Adopt, JSValueToStringCopy(context, arguments[2], exception));
- ASSERT(!*exception);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->deliverWebIntent(action.get(), type.get(), data.get());
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef abortModalCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -1871,14 +1725,6 @@ static JSValueRef abortModalCallback(JSContextRef context, JSObjectRef function,
return JSValueMakeUndefined(context);
}
-static JSValueRef markerTextForListItemCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
- return JSValueMakeString(context, controller->markerTextForListItem(context, arguments[0]).get());
-}
-
static JSValueRef authenticateSessionCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// authenticateSession(url, username, password)
@@ -1982,13 +1828,7 @@ static JSValueRef getWebHistoryItemCountCallback(JSContextRef context, JSObjectR
return JSValueMakeNumber(context, controller->webHistoryItemCount());
}
-static JSValueRef getWorkerThreadCountCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
-{
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- return JSValueMakeNumber(context, controller->workerThreadCount());
-}
-
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(EFL)
static JSValueRef getPlatformNameCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -1999,6 +1839,15 @@ static JSValueRef getPlatformNameCallback(JSContextRef context, JSObjectRef this
}
#endif
+static JSValueRef getSecureEventInputIsEnabledCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
+{
+#if PLATFORM(MAC)
+ return JSValueMakeBoolean(context, IsSecureEventInputEnabled());
+#else
+ return JSValueMakeBoolean(context, false);
+#endif
+}
+
static JSValueRef getTitleTextDirectionCallback(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
@@ -2028,20 +1877,6 @@ static JSValueRef simulateLegacyWebNotificationClickCallback(JSContextRef contex
return JSValueMakeUndefined(context);
}
-static JSValueRef setMinimumTimerIntervalCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount < 1)
- return JSValueMakeUndefined(context);
-
- double minimum = JSValueToNumber(context, arguments[0], exception);
- ASSERT(!*exception);
-
- TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
- controller->setMinimumTimerInterval(minimum);
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef setTextDirectionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount == 1) {
@@ -2079,6 +1914,14 @@ static JSValueRef setStorageDatabaseIdleIntervalCallback(JSContextRef context, J
return JSValueMakeUndefined(context);
}
+static JSValueRef closeIdleLocalStorageDatabasesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
+ controller->closeIdleLocalStorageDatabases();
+
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef grantWebNotificationPermissionCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
@@ -2132,6 +1975,22 @@ static JSValueRef simulateWebNotificationClickCallback(JSContextRef context, JSO
return JSValueMakeUndefined(context);
}
+static JSValueRef numberOfDFGCompiles(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ return JSC::numberOfDFGCompiles(context, arguments[0]);
+}
+
+static JSValueRef neverInlineFunction(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ if (argumentCount < 1)
+ return JSValueMakeUndefined(context);
+
+ return JSC::setNeverInline(context, arguments[0]);
+}
+
static void testRunnerObjectFinalize(JSObjectRef object)
{
TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(object));
@@ -2144,7 +2003,6 @@ void TestRunner::makeWindowObject(JSContextRef context, JSObjectRef windowObject
{
JSRetainPtr<JSStringRef> testRunnerStr(Adopt, JSStringCreateWithUTF8CString("testRunner"));
ref();
- ref();
JSClassRef classRef = getJSClass();
JSValueRef layoutTestContollerObject = JSObjectMake(context, classRef, this);
@@ -2170,10 +2028,10 @@ JSStaticValue* TestRunner::staticValues()
static JSStaticValue staticValues[] = {
{ "globalFlag", getGlobalFlagCallback, setGlobalFlagCallback, kJSPropertyAttributeNone },
{ "webHistoryItemCount", getWebHistoryItemCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "workerThreadCount", getWorkerThreadCountCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(EFL)
{ "platformName", getPlatformNameCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
#endif
+ { "secureEventInputIsEnabled", getSecureEventInputIsEnabledCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "titleTextDirection", getTitleTextDirectionCallback, 0, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0, 0 }
};
@@ -2198,10 +2056,7 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "clearPersistentUserStyleSheet", clearPersistentUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "closeWebInspector", closeWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "computedStyleIncludingVisitedInfo", computedStyleIncludingVisitedInfoCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "decodeHostName", decodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "deliverWebIntent", deliverWebIntentCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "disableImageLoading", disableImageLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "disallowIncreaseForApplicationCacheQuota", disallowIncreaseForApplicationCacheQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dispatchPendingLoadRequests", dispatchPendingLoadRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "display", displayCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2225,7 +2080,6 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "dumpTitleChanges", dumpTitleChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpIconChanges", dumpIconChangesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpWillCacheResponse", dumpWillCacheResponseCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "elementDoesAutoCompleteForElementWithId", elementDoesAutoCompleteForElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "encodeHostName", encodeHostNameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "evaluateInWebInspector", evaluateInWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "evaluateScriptInIsolatedWorldAndReturnValue", evaluateScriptInIsolatedWorldAndReturnValueCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2238,13 +2092,9 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "keepWebHistory", keepWebHistoryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "numberOfPendingGeolocationPermissionRequests", numberOfPendingGeolocationPermissionRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "markerTextForListItem", markerTextForListItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "numberOfActiveAnimations", numberOfActiveAnimationsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "pathToLocalResource", pathToLocalResourceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "pauseAnimationAtTimeOnElementWithId", pauseAnimationAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "pauseTransitionAtTimeOnElementWithId", pauseTransitionAtTimeOnElementWithIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "printToPDF", dumpAsPDFCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueBackNavigation", queueBackNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueForwardNavigation", queueForwardNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2257,7 +2107,6 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "removeOriginAccessWhitelistEntry", removeOriginAccessWhitelistEntryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "repaintSweepHorizontally", repaintSweepHorizontallyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "resetPageVisibility", resetPageVisibilityCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "sendWebIntentResponse", sendWebIntentResponseCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAcceptsEditing", setAcceptsEditingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAllowUniversalAccessFromFileURLs", setAllowUniversalAccessFromFileURLsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAllowFileAccessFromFileURLs", setAllowFileAccessFromFileURLsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2268,7 +2117,6 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "setAuthenticationPassword", setAuthenticationPasswordCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthenticationUsername", setAuthenticationUsernameCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAuthorAndUserStylesEnabled", setAuthorAndUserStylesEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setAutofilled", setAutofilledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setCacheModel", setCacheModelCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setCallCloseOnWebViews", setCallCloseOnWebViewsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setCanOpenWindows", setCanOpenWindowsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2279,13 +2127,11 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "setDefersLoading", setDefersLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setUseDeferredFrameLoading", setUseDeferredFrameLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setFrameFlatteningEnabled", setFrameFlatteningEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setHandlesAuthenticationChallenges", setHandlesAuthenticationChallengesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setIconDatabaseEnabled", setIconDatabaseEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setAutomaticLinkDetectionEnabled", setAutomaticLinkDetectionEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMainFrameIsFirstResponder", setMainFrameIsFirstResponderCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setMinimumTimerInterval", setMinimumTimerIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockDeviceOrientation", setMockDeviceOrientationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockGeolocationPositionUnavailableError", setMockGeolocationPositionUnavailableErrorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setMockGeolocationPosition", setMockGeolocationPositionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2299,9 +2145,7 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "setPluginsEnabled", setPluginsEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setPrinting", setPrintingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setPrivateBrowsingEnabled", setPrivateBrowsingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setSelectTrailingWhitespaceEnabled", setSelectTrailingWhitespaceEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setSerializeHTTPLoads", setSerializeHTTPLoadsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setSmartInsertDeleteEnabled", setSmartInsertDeleteEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setSpatialNavigationEnabled", setSpatialNavigationEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setStopProvisionalFrameLoads", setStopProvisionalFrameLoadsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setTabKeyCyclesThroughElements", setTabKeyCyclesThroughElementsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2317,7 +2161,6 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "setWindowIsKey", setWindowIsKeyCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setJavaScriptCanAccessClipboard", setJavaScriptCanAccessClipboardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setXSSAuditorEnabled", setXSSAuditorEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "setAsynchronousSpellCheckingEnabled", setAsynchronousSpellCheckingEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "showWebInspector", showWebInspectorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "simulateLegacyWebNotificationClick", simulateLegacyWebNotificationClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "testOnscreen", testOnscreenCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
@@ -2344,10 +2187,13 @@ JSStaticFunction* TestRunner::staticFunctions()
{ "preciseTime", preciseTimeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setHasCustomFullScreenBehavior", setHasCustomFullScreenBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "setStorageDatabaseIdleInterval", setStorageDatabaseIdleIntervalCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "closeIdleLocalStorageDatabases", closeIdleLocalStorageDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "grantWebNotificationPermission", grantWebNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "denyWebNotificationPermission", denyWebNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "removeAllWebNotificationPermissions", removeAllWebNotificationPermissionsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "simulateWebNotificationClick", simulateWebNotificationClickCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "numberOfDFGCompiles", numberOfDFGCompiles, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "neverInlineFunction", neverInlineFunction, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ 0, 0, 0 }
};
@@ -2429,6 +2275,3 @@ void TestRunner::setShouldPaintBrokenImage(bool shouldPaintBrokenImage)
{
m_shouldPaintBrokenImage = shouldPaintBrokenImage;
}
-
-const unsigned TestRunner::maxViewWidth = 800;
-const unsigned TestRunner::maxViewHeight = 600;
diff --git a/Tools/DumpRenderTree/TestRunner.h b/Tools/DumpRenderTree/TestRunner.h
index fa76c7642..f5133922b 100644
--- a/Tools/DumpRenderTree/TestRunner.h
+++ b/Tools/DumpRenderTree/TestRunner.h
@@ -41,6 +41,13 @@
class TestRunner : public RefCounted<TestRunner> {
public:
static PassRefPtr<TestRunner> create(const std::string& testPathOrURL, const std::string& expectedPixelHash);
+
+ static const unsigned viewWidth;
+ static const unsigned viewHeight;
+
+ static const unsigned w3cSVGViewWidth;
+ static const unsigned w3cSVGViewHeight;
+
~TestRunner();
void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
@@ -56,8 +63,6 @@ public:
bool callShouldCloseOnWebView();
JSStringRef copyDecodedHostName(JSStringRef name);
JSStringRef copyEncodedHostName(JSStringRef name);
- void deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data);
- void disableImageLoading();
void dispatchPendingLoadRequests();
void display();
void displayInvalidatedRegion();
@@ -68,7 +73,6 @@ public:
long long applicationCacheDiskUsageForOrigin(JSStringRef name);
bool isCommandEnabled(JSStringRef name);
void keepWebHistory();
- JSValueRef computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef);
void notifyDone();
int numberOfPendingGeolocationPermissionRequests();
void overridePreference(JSStringRef key, JSStringRef value);
@@ -82,14 +86,12 @@ public:
void queueNonLoadingScript(JSStringRef script);
void queueReload();
void removeAllVisitedLinks();
- void sendWebIntentResponse(JSStringRef response);
void setAcceptsEditing(bool);
void setAllowUniversalAccessFromFileURLs(bool);
void setAllowFileAccessFromFileURLs(bool);
void setAppCacheMaximumSize(unsigned long long quota);
void setApplicationCacheOriginQuota(unsigned long long);
void setAuthorAndUserStylesEnabled(bool);
- void setAutofilled(JSContextRef, JSValueRef nodeObject, bool autofilled);
void setCacheModel(int);
void setCustomPolicyDelegate(bool setDelegate, bool permissive);
void setDatabaseQuota(unsigned long long quota);
@@ -108,8 +110,6 @@ public:
void setPluginsEnabled(bool);
void setPopupBlockingEnabled(bool);
void setPrivateBrowsingEnabled(bool);
- void setSelectTrailingWhitespaceEnabled(bool);
- void setSmartInsertDeleteEnabled(bool);
void setTabKeyCyclesThroughElements(bool);
void setUseDashboardCompatibilityMode(bool flag);
void setUserStyleSheetEnabled(bool flag);
@@ -117,7 +117,6 @@ public:
void setValueForUser(JSContextRef, JSValueRef nodeObject, JSStringRef value);
void setViewModeMediaFeature(JSStringRef);
void setXSSAuditorEnabled(bool flag);
- void setFrameFlatteningEnabled(bool);
void setSpatialNavigationEnabled(bool);
void setScrollbarPolicy(JSStringRef orientation, JSStringRef policy);
void startSpeechInput(JSContextRef inputElement);
@@ -126,10 +125,9 @@ public:
void waitForPolicyDelegate();
size_t webHistoryItemCount();
- unsigned workerThreadCount() const;
int windowCount();
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN)
+#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WIN) || PLATFORM(EFL)
JSRetainPtr<JSStringRef> platformName() const;
#endif
@@ -142,8 +140,6 @@ public:
void removeAllWebNotificationPermissions();
void simulateWebNotificationClick(JSValueRef notification);
- bool elementDoesAutoCompleteForElementWithId(JSStringRef id);
-
bool dumpAsAudio() const { return m_dumpAsAudio; }
void setDumpAsAudio(bool dumpAsAudio) { m_dumpAsAudio = dumpAsAudio; }
@@ -288,10 +284,6 @@ public:
const std::string& encodedAudioData() const { return m_encodedAudioData; }
void setEncodedAudioData(const std::string& encodedAudioData) { m_encodedAudioData = encodedAudioData; }
-
- bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
- bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
- unsigned numberOfActiveAnimations() const;
void addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
@@ -304,7 +296,6 @@ public:
bool geolocationPermission() const { return m_geolocationPermission; }
void setDeveloperExtrasEnabled(bool);
- void setAsynchronousSpellCheckingEnabled(bool);
void showWebInspector();
void closeWebInspector();
void evaluateInWebInspector(long callId, JSStringRef script);
@@ -336,8 +327,6 @@ public:
// Simulate a request an embedding application could make, populating per-session credential storage.
void authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password);
- JSRetainPtr<JSStringRef> markerTextForListItem(JSContextRef, JSValueRef nodeObject) const;
-
JSValueRef originsWithLocalStorage(JSContextRef);
void deleteAllLocalStorage();
void deleteLocalStorageForOrigin(JSStringRef originIdentifier);
@@ -348,11 +337,6 @@ public:
void setShouldPaintBrokenImage(bool);
bool shouldPaintBrokenImage() const { return m_shouldPaintBrokenImage; }
- static const unsigned maxViewWidth;
- static const unsigned maxViewHeight;
-
- void setMinimumTimerInterval(double);
-
void setTextDirection(JSStringRef);
const std::string& titleTextDirection() const { return m_titleTextDirection; }
void setTitleTextDirection(const std::string& direction) { m_titleTextDirection = direction; }
@@ -362,6 +346,7 @@ public:
bool hasCustomFullScreenBehavior() const { return m_customFullScreenBehavior; }
void setStorageDatabaseIdleInterval(double);
+ void closeIdleLocalStorageDatabases();
bool hasPendingWebNotificationClick() const { return m_hasPendingWebNotificationClick; }
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h b/Tools/DumpRenderTree/atk/AccessibilityCallbacks.h
index 7225757e6..7225757e6 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h
+++ b/Tools/DumpRenderTree/atk/AccessibilityCallbacks.h
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp b/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp
index 8f2c802c9..1ea4f4aac 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp
+++ b/Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp
@@ -29,12 +29,22 @@
#include "config.h"
#include "AccessibilityCallbacks.h"
+#if HAVE(ACCESSIBILITY)
+
#include "AccessibilityController.h"
#include "DumpRenderTree.h"
+#include <atk/atk.h>
+#include <wtf/gobject/GOwnPtr.h>
+
+#if PLATFORM(GTK)
#include "WebCoreSupport/DumpRenderTreeSupportGtk.h"
-#include <gtk/gtk.h>
#include <webkit/webkit.h>
-#include <wtf/gobject/GOwnPtr.h>
+#endif
+
+#if PLATFORM(EFL)
+#include "DumpRenderTreeChrome.h"
+#include "WebCoreSupport/DumpRenderTreeSupportEfl.h"
+#endif
static guint stateChangeListenerId = 0;
static guint focusEventListenerId = 0;
@@ -61,14 +71,10 @@ static void printAccessibilityEvent(AtkObject* accessible, const gchar* signalNa
objectName = "(No name)";
GOwnPtr<gchar> signalNameAndValue(signalValue ? g_strdup_printf("%s = %s", signalName, signalValue) : g_strdup(signalName));
- printf("Accessibility object emitted \"%s\" / Name: \"%s\" / Role: %d\n",
- signalNameAndValue.get(), objectName, objectRole);
+ printf("Accessibility object emitted \"%s\" / Name: \"%s\" / Role: %d\n", signalNameAndValue.get(), objectName, objectRole);
}
-static gboolean axObjectEventListener(GSignalInvocationHint *signalHint,
- guint numParamValues,
- const GValue *paramValues,
- gpointer data)
+static gboolean axObjectEventListener(GSignalInvocationHint *signalHint, guint numParamValues, const GValue *paramValues, gpointer data)
{
// At least we should receive the instance emitting the signal.
if (numParamValues < 1)
@@ -78,25 +84,25 @@ static gboolean axObjectEventListener(GSignalInvocationHint *signalHint,
if (!accessible || !ATK_IS_OBJECT(accessible))
return TRUE;
- GSignalQuery signal_query;
+ GSignalQuery signalQuery;
GOwnPtr<gchar> signalName;
GOwnPtr<gchar> signalValue;
- g_signal_query(signalHint->signal_id, &signal_query);
+ g_signal_query(signalHint->signal_id, &signalQuery);
- if (!g_strcmp0(signal_query.signal_name, "state-change")) {
+ if (!g_strcmp0(signalQuery.signal_name, "state-change")) {
signalName.set(g_strdup_printf("state-change:%s", g_value_get_string(&paramValues[1])));
signalValue.set(g_strdup_printf("%d", g_value_get_boolean(&paramValues[2])));
- } else if (!g_strcmp0(signal_query.signal_name, "focus-event")) {
+ } else if (!g_strcmp0(signalQuery.signal_name, "focus-event")) {
signalName.set(g_strdup("focus-event"));
signalValue.set(g_strdup_printf("%d", g_value_get_boolean(&paramValues[1])));
- } else if (!g_strcmp0(signal_query.signal_name, "children-changed")) {
+ } else if (!g_strcmp0(signalQuery.signal_name, "children-changed")) {
signalName.set(g_strdup("children-changed"));
signalValue.set(g_strdup_printf("%d", g_value_get_uint(&paramValues[1])));
- } else if (!g_strcmp0(signal_query.signal_name, "property-change")) {
+ } else if (!g_strcmp0(signalQuery.signal_name, "property-change"))
signalName.set(g_strdup_printf("property-change:%s", g_quark_to_string(signalHint->detail)));
- } else
- signalName.set(g_strdup(signal_query.signal_name));
+ else
+ signalName.set(g_strdup(signalQuery.signal_name));
printAccessibilityEvent(accessible, signalName.get(), signalValue.get());
@@ -110,15 +116,19 @@ void connectAccessibilityCallbacks()
// Ensure that accessibility is initialized for the WebView by querying for
// the root accessible object, which will create the full hierarchy.
+#if PLATFORM(GTK)
DumpRenderTreeSupportGtk::getRootAccessibleElement(mainFrame);
+#elif PLATFORM(EFL)
+ DumpRenderTreeSupportEfl::rootAccessibleElement(browser->mainFrame());
+#endif
// Add global listeners for AtkObject's signals.
- stateChangeListenerId = atk_add_global_event_listener(axObjectEventListener, "Gtk:AtkObject:state-change");
- focusEventListenerId = atk_add_global_event_listener(axObjectEventListener, "Gtk:AtkObject:focus-event");
- activeDescendantChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "Gtk:AtkObject:active-descendant-changed");
- childrenChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "Gtk:AtkObject:children-changed");
- propertyChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "Gtk:AtkObject:property-change");
- visibleDataChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "Gtk:AtkObject:visible-data-changed");
+ stateChangeListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:state-change");
+ focusEventListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:focus-event");
+ activeDescendantChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:active-descendant-changed");
+ childrenChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:children-changed");
+ propertyChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:property-change");
+ visibleDataChangedListenerId = atk_add_global_event_listener(axObjectEventListener, "ATK:AtkObject:visible-data-changed");
// Ensure the Atk interface types are registered, otherwise
// the AtkDocument signal handlers below won't get registered.
@@ -157,3 +167,4 @@ void disconnectAccessibilityCallbacks()
}
}
+#endif
diff --git a/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp b/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp
new file mode 100644
index 000000000..ddeaf2834
--- /dev/null
+++ b/Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Jan Michael Alonzo
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityController.h"
+
+#if HAVE(ACCESSIBILITY)
+
+#include "AccessibilityCallbacks.h"
+#include "AccessibilityUIElement.h"
+#include "DumpRenderTree.h"
+
+#include <atk/atk.h>
+
+static bool loggingAccessibilityEvents = false;
+
+AccessibilityController::AccessibilityController()
+{
+}
+
+AccessibilityController::~AccessibilityController()
+{
+}
+
+AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
+{
+ // FIXME: implement
+ return 0;
+}
+
+
+void AccessibilityController::setLogFocusEvents(bool)
+{
+}
+
+void AccessibilityController::setLogScrollingStartEvents(bool)
+{
+}
+
+void AccessibilityController::setLogValueChangeEvents(bool)
+{
+}
+
+void AccessibilityController::setLogAccessibilityEvents(bool logAccessibilityEvents)
+{
+ if (logAccessibilityEvents == loggingAccessibilityEvents)
+ return;
+
+ if (!logAccessibilityEvents) {
+ disconnectAccessibilityCallbacks();
+ loggingAccessibilityEvents = false;
+ return;
+ }
+
+ connectAccessibilityCallbacks();
+ loggingAccessibilityEvents = true;
+}
+
+bool AccessibilityController::addNotificationListener(JSObjectRef)
+{
+ return false;
+}
+
+void AccessibilityController::removeNotificationListener()
+{
+}
+
+AtkObject* AccessibilityController::childElementById(AtkObject* parent, const char* id)
+{
+ if (!ATK_IS_OBJECT(parent))
+ return 0;
+
+ bool parentFound = false;
+ AtkAttributeSet* attributeSet(atk_object_get_attributes(parent));
+ for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
+ AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
+ if (!strcmp(attribute->name, "html-id")) {
+ if (!strcmp(attribute->value, id))
+ parentFound = true;
+ break;
+ }
+ }
+ atk_attribute_set_free(attributeSet);
+
+ if (parentFound)
+ return parent;
+
+ int childCount = atk_object_get_n_accessible_children(parent);
+ for (int i = 0; i < childCount; i++) {
+ AtkObject* result = childElementById(atk_object_ref_accessible_child(parent, i), id);
+ if (ATK_IS_OBJECT(result))
+ return result;
+ }
+
+ return 0;
+}
+
+#endif
diff --git a/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp b/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
new file mode 100644
index 000000000..009b8a8d8
--- /dev/null
+++ b/Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
@@ -0,0 +1,1070 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Jan Michael Alonzo
+ *
+ * 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.
+ */
+
+#include "config.h"
+#include "AccessibilityUIElement.h"
+
+#if HAVE(ACCESSIBILITY)
+
+#include <JavaScriptCore/JSStringRef.h>
+#include <atk/atk.h>
+#include <wtf/Assertions.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+#include <wtf/unicode/CharacterNames.h>
+
+static String coreAttributeToAtkAttribute(JSStringRef attribute)
+{
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(attribute);
+ GOwnPtr<gchar> buffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
+
+ String attributeString = String::fromUTF8(buffer.get());
+ if (attributeString == "AXPlaceholderValue")
+ return "placeholder-text";
+
+ return "";
+}
+
+static String getAttributeSetValueForId(AtkObject* accessible, const char* id)
+{
+ const char* attributeValue = 0;
+ AtkAttributeSet* attributeSet = atk_object_get_attributes(accessible);
+ for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
+ AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data);
+ if (!strcmp(atkAttribute->name, id)) {
+ attributeValue = atkAttribute->value;
+ break;
+ }
+ }
+
+ String atkAttributeValue = String::fromUTF8(attributeValue);
+ atk_attribute_set_free(attributeSet);
+
+ return atkAttributeValue;
+}
+
+static inline String roleToString(AtkRole role)
+{
+ switch (role) {
+ case ATK_ROLE_ALERT:
+ return "AXRole: AXAlert";
+ case ATK_ROLE_CANVAS:
+ return "AXRole: AXCanvas";
+ case ATK_ROLE_CHECK_BOX:
+ return "AXRole: AXCheckBox";
+ case ATK_ROLE_COLUMN_HEADER:
+ return "AXRole: AXColumnHeader";
+ case ATK_ROLE_COMBO_BOX:
+ return "AXRole: AXComboBox";
+ case ATK_ROLE_DOCUMENT_FRAME:
+ return "AXRole: AXWebArea";
+ case ATK_ROLE_ENTRY:
+ return "AXRole: AXTextField";
+ case ATK_ROLE_FOOTER:
+ return "AXRole: AXFooter";
+ case ATK_ROLE_FORM:
+ return "AXRole: AXForm";
+ case ATK_ROLE_GROUPING:
+ return "AXRole: AXGroup";
+ case ATK_ROLE_HEADING:
+ return "AXRole: AXHeading";
+ case ATK_ROLE_IMAGE:
+ return "AXRole: AXImage";
+ case ATK_ROLE_IMAGE_MAP:
+ return "AXRole: AXImageMap";
+ case ATK_ROLE_LABEL:
+ return "AXRole: AXLabel";
+ case ATK_ROLE_LINK:
+ return "AXRole: AXLink";
+ case ATK_ROLE_LIST:
+ return "AXRole: AXList";
+ case ATK_ROLE_LIST_BOX:
+ return "AXRole: AXListBox";
+ case ATK_ROLE_LIST_ITEM:
+ return "AXRole: AXListItem";
+ case ATK_ROLE_MENU:
+ return "AXRole: AXMenu";
+ case ATK_ROLE_MENU_BAR:
+ return "AXRole: AXMenuBar";
+ case ATK_ROLE_MENU_ITEM:
+ return "AXRole: AXMenuItem";
+ case ATK_ROLE_PAGE_TAB:
+ return "AXRole: AXTab";
+ case ATK_ROLE_PAGE_TAB_LIST:
+ return "AXRole: AXTabGroup";
+ case ATK_ROLE_PANEL:
+ return "AXRole: AXGroup";
+ case ATK_ROLE_PARAGRAPH:
+ return "AXRole: AXParagraph";
+ case ATK_ROLE_PASSWORD_TEXT:
+ return "AXRole: AXPasswordField";
+ case ATK_ROLE_PUSH_BUTTON:
+ return "AXRole: AXButton";
+ case ATK_ROLE_RADIO_BUTTON:
+ return "AXRole: AXRadioButton";
+ case ATK_ROLE_ROW_HEADER:
+ return "AXRole: AXRowHeader";
+ case ATK_ROLE_RULER:
+ return "AXRole: AXRuler";
+ case ATK_ROLE_SCROLL_BAR:
+ return "AXRole: AXScrollBar";
+ case ATK_ROLE_SCROLL_PANE:
+ return "AXRole: AXScrollArea";
+ case ATK_ROLE_SECTION:
+ return "AXRole: AXDiv";
+ case ATK_ROLE_SEPARATOR:
+ return "AXRole: AXHorizontalRule";
+ case ATK_ROLE_SLIDER:
+ return "AXRole: AXSlider";
+ case ATK_ROLE_SPIN_BUTTON:
+ return "AXRole: AXSpinButton";
+ case ATK_ROLE_TABLE:
+ return "AXRole: AXTable";
+ case ATK_ROLE_TABLE_CELL:
+ return "AXRole: AXCell";
+ case ATK_ROLE_TABLE_COLUMN_HEADER:
+ return "AXRole: AXColumnHeader";
+ case ATK_ROLE_TABLE_ROW:
+ return "AXRole: AXRow";
+ case ATK_ROLE_TABLE_ROW_HEADER:
+ return "AXRole: AXRowHeader";
+ case ATK_ROLE_TOGGLE_BUTTON:
+ return "AXRole: AXToggleButton";
+ case ATK_ROLE_TOOL_BAR:
+ return "AXRole: AXToolbar";
+ case ATK_ROLE_TOOL_TIP:
+ return "AXRole: AXUserInterfaceTooltip";
+ case ATK_ROLE_TREE:
+ return "AXRole: AXTree";
+ case ATK_ROLE_TREE_TABLE:
+ return "AXRole: AXTreeGrid";
+ case ATK_ROLE_TREE_ITEM:
+ return "AXRole: AXTreeItem";
+ case ATK_ROLE_WINDOW:
+ return "AXRole: AXWindow";
+ case ATK_ROLE_UNKNOWN:
+ return "AXRole: AXUnknown";
+ default:
+ // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
+ // our DRT isn't properly handling.
+ return "AXRole: FIXME not identified";
+ }
+}
+
+static inline gchar* replaceCharactersForResults(gchar* str)
+{
+ String uString = String::fromUTF8(str);
+
+ // The object replacement character is passed along to ATs so we need to be
+ // able to test for their presence and do so without causing test failures.
+ uString.replace(objectReplacementCharacter, "<obj>");
+
+ // The presence of newline characters in accessible text of a single object
+ // is appropriate, but it makes test results (especially the accessible tree)
+ // harder to read.
+ uString.replace("\n", "<\\n>");
+
+ return g_strdup(uString.utf8().data());
+}
+
+static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
+{
+ if (!ATK_IS_OBJECT(element))
+ return false;
+
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
+ return atk_state_set_contains_state(stateSet.get(), stateType);
+}
+
+AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
+ : m_element(element)
+{
+ if (m_element)
+ g_object_ref(m_element);
+}
+
+AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
+ : m_element(other.m_element)
+{
+ if (m_element)
+ g_object_ref(m_element);
+}
+
+AccessibilityUIElement::~AccessibilityUIElement()
+{
+ if (m_element)
+ g_object_unref(m_element);
+}
+
+void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>& elements)
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&)
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children)
+{
+ int count = childrenCount();
+ for (int i = 0; i < count; i++) {
+ AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
+ children.append(AccessibilityUIElement(child));
+ }
+}
+
+void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned start, unsigned end)
+{
+ for (unsigned i = start; i < end; i++) {
+ AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
+ elementVector.append(AccessibilityUIElement(child));
+ }
+}
+
+int AccessibilityUIElement::rowCount()
+{
+ if (!m_element)
+ return 0;
+
+ ASSERT(ATK_IS_TABLE(m_element));
+
+ return atk_table_get_n_rows(ATK_TABLE(m_element));
+}
+
+int AccessibilityUIElement::columnCount()
+{
+ if (!m_element)
+ return 0;
+
+ ASSERT(ATK_IS_TABLE(m_element));
+
+ return atk_table_get_n_columns(ATK_TABLE(m_element));
+}
+
+int AccessibilityUIElement::childrenCount()
+{
+ if (!m_element)
+ return 0;
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ return atk_object_get_n_accessible_children(ATK_OBJECT(m_element));
+}
+
+AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
+{
+ if (!m_element)
+ return 0;
+
+ return AccessibilityUIElement(atk_component_ref_accessible_at_point(ATK_COMPONENT(m_element), x, y, ATK_XY_WINDOW));
+}
+
+AccessibilityUIElement AccessibilityUIElement::linkedUIElementAtIndex(unsigned index)
+{
+ // FIXME: implement
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
+{
+ Vector<AccessibilityUIElement> children;
+ getChildrenWithRange(children, index, index + 1);
+
+ if (children.size() == 1)
+ return children.at(0);
+
+ return 0;
+}
+
+unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
+{
+ // FIXME: implement
+ return 0;
+}
+
+static char* getAtkAttributeSetAsString(AtkObject* accessible)
+{
+ GString* str = g_string_new(0);
+
+ AtkAttributeSet* attributeSet = atk_object_get_attributes(accessible);
+ for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
+ AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
+ GOwnPtr<gchar> attributeData(g_strconcat(attribute->name, ":", attribute->value, NULL));
+ g_string_append(str, attributeData.get());
+ if (attributes->next)
+ g_string_append(str, ", ");
+ }
+ atk_attribute_set_free(attributeSet);
+
+ return g_string_free(str, FALSE);
+}
+
+JSStringRef AccessibilityUIElement::allAttributes()
+{
+ if (!m_element || !ATK_IS_OBJECT(m_element))
+ return JSStringCreateWithCharacters(0, 0);
+
+ GOwnPtr<char> attributeData(getAtkAttributeSetAsString(ATK_OBJECT(m_element)));
+ return JSStringCreateWithUTF8CString(attributeData.get());
+}
+
+JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+AccessibilityUIElement AccessibilityUIElement::titleUIElement()
+{
+ if (!m_element)
+ return 0;
+
+ AtkRelationSet* set = atk_object_ref_relation_set(ATK_OBJECT(m_element));
+ if (!set)
+ return 0;
+
+ AtkObject* target = 0;
+ int count = atk_relation_set_get_n_relations(set);
+ for (int i = 0; i < count; i++) {
+ AtkRelation* relation = atk_relation_set_get_relation(set, i);
+ if (atk_relation_get_relation_type(relation) == ATK_RELATION_LABELLED_BY) {
+ GPtrArray* targetList = atk_relation_get_target(relation);
+ if (targetList->len)
+ target = static_cast<AtkObject*>(g_ptr_array_index(targetList, 0));
+ }
+ }
+
+ g_object_unref(set);
+ return target ? AccessibilityUIElement(target) : 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::parentElement()
+{
+ if (!m_element)
+ return 0;
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ AtkObject* parent = atk_object_get_parent(ATK_OBJECT(m_element));
+ return parent ? AccessibilityUIElement(parent) : 0;
+}
+
+JSStringRef AccessibilityUIElement::attributesOfChildren()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::role()
+{
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ if (!role)
+ return JSStringCreateWithCharacters(0, 0);
+
+ String roleString = roleToString(role);
+ return JSStringCreateWithUTF8CString(roleString.utf8().data());
+}
+
+JSStringRef AccessibilityUIElement::subrole()
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::roleDescription()
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::title()
+{
+ const gchar* name = atk_object_get_name(ATK_OBJECT(m_element));
+ GOwnPtr<gchar> axTitle(g_strdup_printf("AXTitle: %s", name ? name : ""));
+
+ return JSStringCreateWithUTF8CString(axTitle.get());
+}
+
+JSStringRef AccessibilityUIElement::description()
+{
+ const gchar* description = atk_object_get_description(ATK_OBJECT(m_element));
+
+ if (!description)
+ return JSStringCreateWithCharacters(0, 0);
+
+ GOwnPtr<gchar> axDesc(g_strdup_printf("AXDescription: %s", description));
+
+ return JSStringCreateWithUTF8CString(axDesc.get());
+}
+
+JSStringRef AccessibilityUIElement::stringValue()
+{
+ if (!m_element || !ATK_IS_TEXT(m_element))
+ return JSStringCreateWithCharacters(0, 0);
+
+ GOwnPtr<gchar> text(atk_text_get_text(ATK_TEXT(m_element), 0, -1));
+ GOwnPtr<gchar> textWithReplacedCharacters(replaceCharactersForResults(text.get()));
+ GOwnPtr<gchar> axValue(g_strdup_printf("AXValue: %s", textWithReplacedCharacters.get()));
+
+ return JSStringCreateWithUTF8CString(axValue.get());
+}
+
+JSStringRef AccessibilityUIElement::language()
+{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ const gchar* locale = atk_object_get_object_locale(ATK_OBJECT(m_element));
+ if (!locale)
+ return JSStringCreateWithCharacters(0, 0);
+
+ GOwnPtr<char> axValue(g_strdup_printf("AXLanguage: %s", locale));
+ return JSStringCreateWithUTF8CString(axValue.get());
+}
+
+double AccessibilityUIElement::x()
+{
+ int x, y;
+
+ atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
+
+ return x;
+}
+
+double AccessibilityUIElement::y()
+{
+ int x, y;
+
+ atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
+
+ return y;
+}
+
+double AccessibilityUIElement::width()
+{
+ int width, height;
+
+ atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
+
+ return width;
+}
+
+double AccessibilityUIElement::height()
+{
+ int width, height;
+
+ atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
+
+ return height;
+}
+
+double AccessibilityUIElement::clickPointX()
+{
+ // Note: This is not something we have in ATK.
+ return 0.f;
+}
+
+double AccessibilityUIElement::clickPointY()
+{
+ // Note: This is not something we have in ATK.
+ return 0.f;
+}
+
+JSStringRef AccessibilityUIElement::orientation() const
+{
+ if (!m_element || !ATK_IS_OBJECT(m_element))
+ return JSStringCreateWithCharacters(0, 0);
+
+ const char* axOrientation = 0;
+ if (checkElementState(m_element, ATK_STATE_HORIZONTAL))
+ axOrientation = "AXOrientation: AXHorizontalOrientation";
+ else if (checkElementState(m_element, ATK_STATE_VERTICAL))
+ axOrientation = "AXOrientation: AXVerticalOrientation";
+
+ if (!axOrientation)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(axOrientation);
+}
+
+double AccessibilityUIElement::intValue() const
+{
+ GValue value = { 0, { { 0 } } };
+
+ if (!ATK_IS_VALUE(m_element))
+ return 0.0f;
+
+ atk_value_get_current_value(ATK_VALUE(m_element), &value);
+ if (!G_VALUE_HOLDS_FLOAT(&value))
+ return 0.0f;
+ return g_value_get_float(&value);
+}
+
+double AccessibilityUIElement::minValue()
+{
+ GValue value = { 0, { { 0 } } };
+
+ if (!ATK_IS_VALUE(m_element))
+ return 0.0f;
+
+ atk_value_get_minimum_value(ATK_VALUE(m_element), &value);
+ if (!G_VALUE_HOLDS_FLOAT(&value))
+ return 0.0f;
+ return g_value_get_float(&value);
+}
+
+double AccessibilityUIElement::maxValue()
+{
+ GValue value = { 0, { { 0 } } };
+
+ if (!ATK_IS_VALUE(m_element))
+ return 0.0f;
+
+ atk_value_get_maximum_value(ATK_VALUE(m_element), &value);
+ if (!G_VALUE_HOLDS_FLOAT(&value))
+ return 0.0f;
+ return g_value_get_float(&value);
+}
+
+JSStringRef AccessibilityUIElement::valueDescription()
+{
+ // FIXME: implement after it has been implemented in ATK.
+ // See: https://bugzilla.gnome.org/show_bug.cgi?id=684576
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::isEnabled()
+{
+ return checkElementState(m_element, ATK_STATE_ENABLED);
+}
+
+int AccessibilityUIElement::insertionPointLineNumber()
+{
+ // FIXME: implement
+ return 0;
+}
+
+bool AccessibilityUIElement::isPressActionSupported()
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isIncrementActionSupported()
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isDecrementActionSupported()
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isRequired() const
+{
+ return checkElementState(m_element, ATK_STATE_REQUIRED);
+}
+
+bool AccessibilityUIElement::isFocused() const
+{
+ if (!ATK_IS_OBJECT(m_element))
+ return false;
+
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
+ gboolean isFocused = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSED);
+
+ return isFocused;
+}
+
+bool AccessibilityUIElement::isSelected() const
+{
+ return checkElementState(m_element, ATK_STATE_SELECTED);
+}
+
+int AccessibilityUIElement::hierarchicalLevel() const
+{
+ // FIXME: implement
+ return 0;
+}
+
+bool AccessibilityUIElement::ariaIsGrabbed() const
+{
+ return false;
+}
+
+JSStringRef AccessibilityUIElement::ariaDropEffects() const
+{
+ return 0;
+}
+
+bool AccessibilityUIElement::isExpanded() const
+{
+ if (!ATK_IS_OBJECT(m_element))
+ return false;
+
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
+ gboolean isExpanded = atk_state_set_contains_state(stateSet.get(), ATK_STATE_EXPANDED);
+
+ return isExpanded;
+}
+
+bool AccessibilityUIElement::isChecked() const
+{
+ if (!ATK_IS_OBJECT(m_element))
+ return false;
+
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
+ gboolean isChecked = atk_state_set_contains_state(stateSet.get(), ATK_STATE_CHECKED);
+
+ return isChecked;
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumns()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRows()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfHeader()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+int AccessibilityUIElement::indexInTable()
+{
+ // FIXME: implement
+ return 0;
+}
+
+static JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange)
+{
+ GOwnPtr<gchar> rangeString(g_strdup("{0, 0}"));
+
+ if (!element)
+ return JSStringCreateWithUTF8CString(rangeString.get());
+
+ ASSERT(ATK_IS_OBJECT(element));
+
+ AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element));
+ if (!axTable || !ATK_IS_TABLE(axTable))
+ return JSStringCreateWithUTF8CString(rangeString.get());
+
+ // Look for the cell in the table.
+ gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element));
+ if (indexInParent == -1)
+ return JSStringCreateWithUTF8CString(rangeString.get());
+
+ int row = -1;
+ int column = -1;
+ row = atk_table_get_row_at_index(ATK_TABLE(axTable), indexInParent);
+ column = atk_table_get_column_at_index(ATK_TABLE(axTable), indexInParent);
+
+ // Get the actual values, if row and columns are valid values.
+ if (row != -1 && column != -1) {
+ int base = 0;
+ int length = 0;
+ if (isRowRange) {
+ base = row;
+ length = atk_table_get_row_extent_at(ATK_TABLE(axTable), row, column);
+ } else {
+ base = column;
+ length = atk_table_get_column_extent_at(ATK_TABLE(axTable), row, column);
+ }
+ rangeString.set(g_strdup_printf("{%d, %d}", base, length));
+ }
+
+ return JSStringCreateWithUTF8CString(rangeString.get());
+}
+
+JSStringRef AccessibilityUIElement::rowIndexRange()
+{
+ // Range in table for rows.
+ return indexRangeInTable(m_element, true);
+}
+
+JSStringRef AccessibilityUIElement::columnIndexRange()
+{
+ // Range in table for columns.
+ return indexRangeInTable(m_element, false);
+}
+
+int AccessibilityUIElement::lineForIndex(int)
+{
+ // FIXME: implement
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::stringForRange(unsigned, unsigned)
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributedStringForRange(unsigned, unsigned)
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location, unsigned length)
+{
+ // FIXME: implement
+ return false;
+}
+
+AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly)
+{
+ // FIXME: implement
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row)
+{
+ if (!m_element)
+ return 0;
+
+ ASSERT(ATK_IS_TABLE(m_element));
+
+ // Adopt the AtkObject representing the cell because
+ // at_table_ref_at() transfers full ownership.
+ GRefPtr<AtkObject> foundCell = adoptGRef(atk_table_ref_at(ATK_TABLE(m_element), row, column));
+ return foundCell ? AccessibilityUIElement(foundCell.get()) : 0;
+}
+
+JSStringRef AccessibilityUIElement::selectedTextRange()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
+{
+ // FIXME: implement
+}
+
+JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
+{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ String atkAttributeName = coreAttributeToAtkAttribute(attribute);
+ if (atkAttributeName.isEmpty())
+ return JSStringCreateWithCharacters(0, 0);
+
+ String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element), atkAttributeName.utf8().data());
+ return JSStringCreateWithUTF8CString(attributeValue.utf8().data());
+}
+
+double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
+{
+ // FIXME: implement
+ return 0.0f;
+}
+
+bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
+{
+ return false;
+}
+
+static void alterCurrentValue(PlatformUIElement element, int factor)
+{
+ if (!element)
+ return;
+
+ ASSERT(ATK_IS_VALUE(element));
+
+ GValue currentValue = G_VALUE_INIT;
+ atk_value_get_current_value(ATK_VALUE(element), &currentValue);
+
+ GValue increment = G_VALUE_INIT;
+ atk_value_get_minimum_increment(ATK_VALUE(element), &increment);
+
+ GValue newValue = G_VALUE_INIT;
+ g_value_init(&newValue, G_TYPE_FLOAT);
+
+ g_value_set_float(&newValue, g_value_get_float(&currentValue) + factor * g_value_get_float(&increment));
+ atk_value_set_current_value(ATK_VALUE(element), &newValue);
+
+ g_value_unset(&newValue);
+ g_value_unset(&increment);
+ g_value_unset(&currentValue);
+}
+
+void AccessibilityUIElement::increment()
+{
+ alterCurrentValue(m_element, 1);
+}
+
+void AccessibilityUIElement::decrement()
+{
+ alterCurrentValue(m_element, -1);
+}
+
+void AccessibilityUIElement::press()
+{
+ if (!m_element)
+ return;
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ if (!ATK_IS_ACTION(m_element))
+ return;
+
+ // Only one action per object is supported so far.
+ atk_action_do_action(ATK_ACTION(m_element), 0);
+}
+
+void AccessibilityUIElement::showMenu()
+{
+ // FIXME: implement
+}
+
+AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::rowAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::disclosedByRow()
+{
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::accessibilityValue() const
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::documentEncoding()
+{
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ if (role != ATK_ROLE_DOCUMENT_FRAME)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "Encoding"));
+}
+
+JSStringRef AccessibilityUIElement::documentURI()
+{
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ if (role != ATK_ROLE_DOCUMENT_FRAME)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
+}
+
+JSStringRef AccessibilityUIElement::url()
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
+{
+ // FIXME: implement
+ return false;
+}
+
+void AccessibilityUIElement::removeNotificationListener()
+{
+ // FIXME: implement
+}
+
+bool AccessibilityUIElement::isFocusable() const
+{
+ if (!ATK_IS_OBJECT(m_element))
+ return false;
+
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
+ gboolean isFocusable = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSABLE);
+
+ return isFocusable;
+}
+
+bool AccessibilityUIElement::isSelectable() const
+{
+ return checkElementState(m_element, ATK_STATE_SELECTABLE);
+}
+
+bool AccessibilityUIElement::isMultiSelectable() const
+{
+ return checkElementState(m_element, ATK_STATE_MULTISELECTABLE);
+}
+
+bool AccessibilityUIElement::isSelectedOptionActive() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isVisible() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isOffScreen() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isCollapsed() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isIgnored() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::hasPopup() const
+{
+ if (!m_element || !ATK_IS_OBJECT(m_element))
+ return false;
+
+ return equalIgnoringCase(getAttributeSetValueForId(ATK_OBJECT(m_element), "aria-haspopup"), "true");
+}
+
+void AccessibilityUIElement::takeFocus()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::addSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::scrollToMakeVisible()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
+{
+ // FIXME: implement
+}
+
+#endif
diff --git a/Tools/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
index cdac14ff5..5b6b699f9 100644
--- a/Tools/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
+++ b/Tools/DumpRenderTree/blackberry/AccessibilityControllerBlackBerry.cpp
@@ -77,3 +77,8 @@ void AccessibilityController::removeNotificationListener()
{
}
+AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRef)
+{
+ notImplemented();
+ return 0;
+}
diff --git a/Tools/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
index 63fbd36c9..dc6635466 100644
--- a/Tools/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
+++ b/Tools/DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp
@@ -235,7 +235,19 @@ int AccessibilityUIElement::insertionPointLineNumber()
return 0;
}
-bool AccessibilityUIElement::isActionSupported(JSStringRef)
+bool AccessibilityUIElement::isPressActionSupported()
+{
+ notImplemented();
+ return 0;
+}
+
+bool AccessibilityUIElement::isIncrementActionSupported()
+{
+ notImplemented();
+ return 0;
+}
+
+bool AccessibilityUIElement::isDecrementActionSupported()
{
notImplemented();
return 0;
@@ -349,7 +361,7 @@ JSStringRef AccessibilityUIElement::stringForRange(unsigned, unsigned)
return 0;
}
-AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement*, bool, JSStringRef, JSStringRef)
+AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement*, bool, JSValueRef, JSStringRef)
{
notImplemented();
return 0;
@@ -544,6 +556,21 @@ bool AccessibilityUIElement::hasPopup() const
return false;
}
+void AccessibilityUIElement::scrollToMakeVisible()
+{
+ notImplemented();
+}
+
+void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int, int, int, int)
+{
+ notImplemented();
+}
+
+void AccessibilityUIElement::scrollToGlobalPoint(int, int)
+{
+ notImplemented();
+}
+
void AccessibilityUIElement::takeFocus()
{
notImplemented();
diff --git a/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp b/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
index d674ab5e7..4f803af04 100644
--- a/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
@@ -22,7 +22,7 @@
#include "APICast.h"
#include "AccessibilityController.h"
#include "BackForwardController.h"
-#include "BackForwardListImpl.h"
+#include "BackForwardListBlackBerry.h"
#include "Credential.h"
#include "DatabaseTracker.h"
#include "DocumentLoader.h"
@@ -37,9 +37,13 @@
#include "FrameLoaderTypes.h"
#include "FrameTree.h"
#include "FrameView.h"
+#include "HTTPParsers.h"
#include "HistoryItem.h"
+#include "HitTestResult.h"
#include "IntSize.h"
#include "JSDOMBinding.h"
+#include "MouseEvent.h"
+#include "Node.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PageGroup.h"
@@ -138,16 +142,36 @@ static bool shouldLogFrameLoadDelegates(const String& url)
return url.contains("loading/");
}
+static bool shouldDumpAsText(const String& url)
+{
+ return url.contains("dumpAsText/");
+}
+
namespace BlackBerry {
namespace WebKit {
DumpRenderTree* DumpRenderTree::s_currentInstance = 0;
-bool DumpRenderTree::s_selectTrailingWhitespaceEnabled = false;
static void createFile(const String& fileName)
{
FILE* fd = fopen(fileName.utf8().data(), "wb");
- fclose(fd);
+ if (fd)
+ fclose(fd);
+}
+
+static bool isFullUrl(const String& url)
+{
+ static Vector<String> *prefixes = 0;
+ if (!prefixes) {
+ prefixes = new Vector<String>();
+ prefixes->append("http://");
+ prefixes->append("file://");
+ }
+ for (unsigned i = 0; i < prefixes->size(); ++i) {
+ if (url.startsWith(prefixes->at(i), false))
+ return true;
+ }
+ return false;
}
DumpRenderTree::DumpRenderTree(BlackBerry::WebKit::WebPage* page)
@@ -158,6 +182,8 @@ DumpRenderTree::DumpRenderTree(BlackBerry::WebKit::WebPage* page)
, m_waitToDumpWatchdogTimer(this, &DumpRenderTree::waitToDumpWatchdogTimerFired)
, m_workTimer(this, &DumpRenderTree::processWork)
, m_acceptsEditing(true)
+ , m_policyDelegateEnabled(false)
+ , m_policyDelegateIsPermissive(false)
{
const char* workerNumber = getenv("WORKER_NUMBER") ? getenv("WORKER_NUMBER") : "0";
String sdcardPath = SDCARD_PATH;
@@ -193,9 +219,14 @@ void DumpRenderTree::runTest(const String& url, const String& imageHash)
freopen(stderrFile.utf8().data(), "wb", stderr);
}
FILE* current = fopen(m_currentTestFile.utf8().data(), "w");
- fwrite(m_currentTest->utf8().data(), 1, m_currentTest->utf8().length(), current);
- fclose(current);
- m_page->load(url, BlackBerry::Platform::String::emptyString(), false);
+ if (current) {
+ fwrite(m_currentTest->utf8().data(), 1, m_currentTest->utf8().length(), current);
+ fclose(current);
+ }
+ BlackBerry::Platform::NetworkRequest request;
+ STATIC_LOCAL_STRING(s_get, "GET");
+ request.setRequestUrl(url, s_get);
+ m_page->load(request);
}
void DumpRenderTree::doneDrt()
@@ -221,7 +252,9 @@ void DumpRenderTree::runCurrentTest()
m_currentHttpTest = m_currentTest->utf8().data();
m_currentHttpTest.remove(0, strlen(httpTestSyntax));
runTest(httpPrefixURL + m_currentHttpTest, imageHash);
- } else
+ } else if (isFullUrl(*m_currentTest))
+ runTest(*m_currentTest, imageHash);
+ else
runTest(kSDCLayoutTestsURI + *m_currentTest, imageHash);
}
@@ -255,19 +288,26 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting(const String& url, cons
{
gTestRunner = TestRunner::create(url.utf8().data(), imageHash.utf8().data());
+ if (shouldDumpAsText(url)) {
+ gTestRunner->setDumpAsText(true);
+ gTestRunner->setGeneratePixelResults(false);
+ }
gTestRunner->setIconDatabaseEnabled(false);
DumpRenderTreeSupport::resetGeolocationMock(m_page);
topLoadingFrame = 0;
m_loadFinished = false;
- s_selectTrailingWhitespaceEnabled = false;
-
+ m_policyDelegateEnabled = false;
+ m_policyDelegateIsPermissive = false;
+ waitForPolicy = false;
testDone = false;
WorkQueue::shared()->clear();
WorkQueue::shared()->setFrozen(false);
WebSettings* settings = m_page->settings();
+ // Apply new settings to current page, see more in the destructor of WebSettingsTransaction.
+ WebSettingsTransaction webSettingTransaction(settings);
settings->setTextReflowMode(WebSettings::TextReflowDisabled);
settings->setJavaScriptEnabled(true);
@@ -277,21 +317,24 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting(const String& url, cons
settings->setDefaultFontSize(16);
settings->setDefaultFixedFontSize(13);
settings->setMinimumFontSize(1);
- settings->setSerifFontFamily("Times");
- settings->setFixedFontFamily("Courier New");
- settings->setSansSerifFontFamily("Arial");
- settings->setStandardFontFamily("Times");
+ STATIC_LOCAL_STRING(s_arial, "Arial");
+ STATIC_LOCAL_STRING(s_courier, "Courier New");
+ STATIC_LOCAL_STRING(s_times, "Times");
+ settings->setSerifFontFamily(s_times);
+ settings->setFixedFontFamily(s_courier);
+ settings->setSansSerifFontFamily(s_arial);
+ settings->setStandardFontFamily(s_times);
settings->setXSSAuditorEnabled(false);
- settings->setFrameFlatteningEnabled(false);
settings->setMaximumPagesInCache(0);
settings->setPluginsEnabled(true);
- // Apply new settings to current page, see more in the destructor of WebSettingsTransaction.
- WebSettingsTransaction webSettingTransaction(settings);
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->clearBackForwardList(false);
setAcceptsEditing(true);
DumpRenderTreeSupport::setLinksIncludedInFocusChain(true);
+#if ENABLE(STYLE_SCOPED)
+ DumpRenderTreeSupport::setStyleScopedEnabled(true);
+#endif
m_page->setVirtualViewportSize(Platform::IntSize(800, 600));
m_page->resetVirtualViewportOnCommitted(false);
@@ -313,7 +356,7 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting(const String& url, cons
page->settings()->setUsePreHTML5ParserQuirks(false);
// FIXME: Other ports also clear history/backForwardList allong with visited links.
page->group().removeVisitedLinks();
- if (mainFrame = page->mainFrame()) {
+ if ((mainFrame = page->mainFrame())) {
mainFrame->tree()->clearName();
mainFrame->loader()->setOpener(0);
// [WebKit bug #86899] Reset JS state settings.
@@ -431,7 +474,7 @@ static String dumpHistoryItem(PassRefPtr<WebCore::HistoryItem> item, int indent,
start = 6;
}
for (int i = start; i < indent; i++)
- result = result + " ";
+ result = result + ' ';
String url = item->urlString();
if (url.contains("file://")) {
@@ -453,7 +496,7 @@ static String dumpHistoryItem(PassRefPtr<WebCore::HistoryItem> item, int indent,
if (item->isTargetItem())
result = result + " **nav target**";
- result = result + "\n";
+ result = result + '\n';
WebCore::HistoryItemVector children = item->children();
// Must sort to eliminate arbitrary result ordering which defeats reproducible testing.
@@ -471,7 +514,8 @@ static String dumpBackForwardListForWebView()
// FORMAT:
// " (file test):fast/loader/resources/click-fragment-link.html **nav target**"
// "curr-> (file test):fast/loader/resources/click-fragment-link.html#testfragment **nav target**"
- WebCore::BackForwardListImpl* bfList = static_cast<WebCore::BackForwardListImpl*>(mainFrame->page()->backForward()->client());
+ WebCore::BackForwardListBlackBerry* bfList = static_cast<WebCore::BackForwardListBlackBerry*>(mainFrame->page()->backForward()->client());
+
int maxItems = bfList->capacity();
WebCore::HistoryItemVector entries;
bfList->backListWithLimit(maxItems, entries);
@@ -514,9 +558,6 @@ void DumpRenderTree::dump()
dumpToFile(result);
if (!runFromCommandLine) {
- // signal end of text block
- fputs("#EOF\n", stdout);
-
// There are two scenarios for dumping pixels:
// 1. When the test case explicitly asks for it by calling dumpAsText(true) with that extra true passed as a parameter value, from JavaScript
bool explicitPixelResults = gTestRunner->dumpAsText() && gTestRunner->generatePixelResults();
@@ -525,8 +566,11 @@ void DumpRenderTree::dump()
// But only if m_enablePixelTests is set, to say that the user wants to run pixel tests at all.
bool generatePixelResults = m_enablePixelTests && (explicitPixelResults || implicitPixelResults);
- if (generatePixelResults)
+ if (generatePixelResults) {
+ // signal end of text block
+ fputs("#EOF\n", stdout);
dumpWebViewAsPixelsAndCompareWithExpected(gTestRunner->expectedPixelHash());
+ }
String crashFile = dumpFile + ".crash";
unlink(crashFile.utf8().data());
@@ -575,6 +619,16 @@ void DumpRenderTree::locationChangeForFrame(WebCore::Frame* frame)
}
// FrameLoadClient delegates.
+bool DumpRenderTree::willSendRequestForFrame(WebCore::Frame* frame, WebCore::ResourceRequest& request, const WebCore::ResourceResponse& redirectResponse)
+{
+ if (!testDone && (gTestRunner->willSendRequestReturnsNull() || (gTestRunner->willSendRequestReturnsNullOnRedirect() && !redirectResponse.isNull()))) {
+ request = WebCore::ResourceRequest();
+ return false;
+ }
+
+ return true;
+}
+
void DumpRenderTree::didStartProvisionalLoadForFrame(WebCore::Frame* frame)
{
if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
@@ -621,9 +675,10 @@ void DumpRenderTree::didFinishLoadForFrame(WebCore::Frame* frame)
if (!testDone && gTestRunner->dumpFrameLoadCallbacks())
printf("%s - didFinishLoadForFrame\n", drtFrameDescription(frame).utf8().data());
- if (frame == topLoadingFrame)
+ if (frame == topLoadingFrame) {
m_loadFinished = true;
- locationChangeForFrame(frame);
+ locationChangeForFrame(frame);
+ }
}
void DumpRenderTree::didFinishDocumentLoadForFrame(WebCore::Frame* frame)
@@ -669,7 +724,7 @@ void DumpRenderTree::didReceiveTitleForFrame(const String& title, WebCore::Frame
}
// ChromeClient delegates.
-void DumpRenderTree::addMessageToConsole(const String& message, unsigned lineNumber, const String& sourceID)
+void DumpRenderTree::addMessageToConsole(const String& message, unsigned lineNumber, const String&)
{
printf("CONSOLE MESSAGE: ");
if (lineNumber)
@@ -822,9 +877,9 @@ bool DumpRenderTree::shouldInsertText(const String& text, WebCore::Range* range,
return m_acceptsEditing;
}
-void DumpRenderTree::didDecidePolicyForNavigationAction(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request)
+void DumpRenderTree::didDecidePolicyForNavigationAction(const WebCore::NavigationAction& action, const WebCore::ResourceRequest& request, WebCore::Frame* frame)
{
- if (!waitForPolicy)
+ if (testDone || !m_policyDelegateEnabled)
return;
const char* typeDescription;
@@ -851,10 +906,34 @@ void DumpRenderTree::didDecidePolicyForNavigationAction(const WebCore::Navigatio
typeDescription = "illegal value";
}
- printf("Policy delegate: attempt to load %s with navigation type '%s'\n", request.url().string().utf8().data(), typeDescription);
- // FIXME: do originating part.
+ bool shouldWaitForResponse = !request.url().string().startsWith("mailto:");
+ printf("Policy delegate: attempt to load %s with navigation type '%s'", request.url().string().utf8().data(), typeDescription);
+ // Originating part, borrowed from Chromium.
+ RefPtr<WebCore::Node> node;
+ for (const WebCore::Event* event = action.event(); event; event = event->underlyingEvent()) {
+ if (event->isMouseEvent()) {
+ const WebCore::MouseEvent* mouseEvent = static_cast<const WebCore::MouseEvent*>(event);
+ node = frame->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false).innerNonSharedNode();
+ break;
+ }
+ }
+ if (node.get())
+ printf(" originating from %s\n", drtDumpPath(node.get()).utf8().data());
+ else
+ printf("\n");
+
+ if (waitForPolicy && !shouldWaitForResponse)
+ gTestRunner->notifyDone();
+}
- gTestRunner->notifyDone();
+void DumpRenderTree::didDecidePolicyForResponse(const WebCore::ResourceResponse& response)
+{
+ if (!testDone && m_policyDelegateEnabled) {
+ if (WebCore::contentDispositionType(response.httpHeaderField("Content-Disposition")) == WebCore::ContentDispositionAttachment)
+ printf("Policy delegate: resource is an attachment, suggested file name '%s'\n", response.suggestedFilename().utf8().data());
+ if (waitForPolicy)
+ gTestRunner->notifyDone();
+ }
}
void DumpRenderTree::didDispatchWillPerformClientRedirect()
@@ -869,7 +948,7 @@ void DumpRenderTree::didHandleOnloadEventsForFrame(WebCore::Frame* frame)
printf("%s - didHandleOnloadEventsForFrame\n", drtFrameDescription(frame).utf8().data());
}
-void DumpRenderTree::didReceiveResponseForFrame(WebCore::Frame* frame, const WebCore::ResourceResponse& response)
+void DumpRenderTree::didReceiveResponseForFrame(WebCore::Frame*, const WebCore::ResourceResponse& response)
{
if (!testDone && gTestRunner->dumpResourceResponseMIMETypes())
printf("%s has MIME type %s\n", response.url().lastPathComponent().utf8().data(), response.mimeType().utf8().data());
@@ -889,6 +968,11 @@ bool DumpRenderTree::didReceiveAuthenticationChallenge(WebCore::Credential& cred
return true;
}
+void DumpRenderTree::setCustomPolicyDelegate(bool setDelegate, bool permissive)
+{
+ m_policyDelegateEnabled = setDelegate;
+ m_policyDelegateIsPermissive = permissive;
+}
}
}
diff --git a/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h b/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
index daca112c9..6aa4a8a3d 100644
--- a/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
+++ b/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h
@@ -63,6 +63,7 @@ public:
bool loadFinished() const { return m_loadFinished; }
// FrameLoaderClient delegates
+ bool willSendRequestForFrame(WebCore::Frame*, WebCore::ResourceRequest&, const WebCore::ResourceResponse&);
void didStartProvisionalLoadForFrame(WebCore::Frame*);
void didCommitLoadForFrame(WebCore::Frame*);
void didFailProvisionalLoadForFrame(WebCore::Frame*);
@@ -71,10 +72,13 @@ public:
void didFinishDocumentLoadForFrame(WebCore::Frame*);
void didClearWindowObjectInWorld(WebCore::DOMWrapperWorld*, JSGlobalContextRef, JSObjectRef windowObject);
void didReceiveTitleForFrame(const String& title, WebCore::Frame*);
- void didDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&);
+ void didDecidePolicyForNavigationAction(const WebCore::NavigationAction&, const WebCore::ResourceRequest&, WebCore::Frame*);
+ void didDecidePolicyForResponse(const WebCore::ResourceResponse&);
void didDispatchWillPerformClientRedirect();
void didHandleOnloadEventsForFrame(WebCore::Frame*);
void didReceiveResponseForFrame(WebCore::Frame*, const WebCore::ResourceResponse&);
+ bool policyDelegateEnabled() const { return m_policyDelegateEnabled; }
+ bool policyDelegateIsPermissive() const { return m_policyDelegateIsPermissive; }
// ChromeClient delegates
void addMessageToConsole(const String& message, unsigned lineNumber, const String& sourceID);
@@ -101,12 +105,11 @@ public:
bool shouldInsertNode(WebCore::Node*, WebCore::Range*, int insertAction);
bool shouldInsertText(const String&, WebCore::Range*, int insertAction);
- bool isSelectTrailingWhitespaceEnabled() const { return s_selectTrailingWhitespaceEnabled; }
- void setSelectTrailingWhitespaceEnabled(bool enabled) { s_selectTrailingWhitespaceEnabled = enabled; }
bool didReceiveAuthenticationChallenge(WebCore::Credential&);
// BlackBerry::Platform::BlackBerryPlatformLayoutTestClient method
virtual void addTest(const char* testFile);
+ void setCustomPolicyDelegate(bool setDelegate, bool permissive);
private:
void runTest(const String& url, const String& imageHash);
void runTests();
@@ -146,7 +149,8 @@ private:
bool m_acceptsEditing;
bool m_loadFinished;
- static bool s_selectTrailingWhitespaceEnabled;
+ bool m_policyDelegateEnabled;
+ bool m_policyDelegateIsPermissive;
};
}
}
diff --git a/Tools/DumpRenderTree/blackberry/EventSender.cpp b/Tools/DumpRenderTree/blackberry/EventSender.cpp
index 0f76914a2..7fafb9eb0 100644
--- a/Tools/DumpRenderTree/blackberry/EventSender.cpp
+++ b/Tools/DumpRenderTree/blackberry/EventSender.cpp
@@ -26,6 +26,7 @@
#include "DumpRenderTreeSupport.h"
#include "IntPoint.h"
#include "NotImplemented.h"
+#include "WebKitThreadViewportAccessor.h"
#include "WebPage.h"
#include <BlackBerryPlatformKeyboardEvent.h>
@@ -46,45 +47,62 @@ void sendTouchEvent(BlackBerry::Platform::TouchEvent::Type);
// Callbacks
-static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef* exception)
+static JSValueRef getDragModeCallback(JSContextRef context, JSObjectRef, JSStringRef, JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static bool setDragModeCallback(JSContextRef context, JSObjectRef object, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
+static bool setDragModeCallback(JSContextRef context, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef mouseWheelToCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef contextClickCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+void setMouseEventDocumentPos(BlackBerry::Platform::MouseEvent &event, const BlackBerry::WebKit::WebPage* page)
+{
+ // We have added document viewport position and document content position as members of the mouse event, when we create the event, we should initialize them as well.
+ BlackBerry::Platform::ViewportAccessor* viewportAccessor = page->webkitThreadViewportAccessor();
+ IntPoint documentContentPos = viewportAccessor->roundToDocumentFromPixelContents(BlackBerry::Platform::FloatPoint(viewportAccessor->pixelContentsFromViewport(lastMousePosition)));
+ IntPoint documentViewportMousePos = viewportAccessor->roundToDocumentFromPixelContents(BlackBerry::Platform::FloatPoint(lastMousePosition));
+ event.populateDocumentPosition(documentViewportMousePos, documentContentPos);
+}
+
+static JSValueRef mouseDownCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
BlackBerry::WebKit::WebPage* page = BlackBerry::WebKit::DumpRenderTree::currentInstance()->page();
- page->mouseEvent(BlackBerry::Platform::MouseEvent(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, 0, lastMousePosition, IntPoint::zero(), 0, 0));
+ BlackBerry::Platform::MouseEvent event(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, 0, lastMousePosition, IntPoint::zero(), 0, 0, 0);
+
+ setMouseEventDocumentPos(event, page);
+
+ page->mouseEvent(event);
return JSValueMakeUndefined(context);
}
-static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef mouseUpCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
BlackBerry::WebKit::WebPage* page = BlackBerry::WebKit::DumpRenderTree::currentInstance()->page();
- page->mouseEvent(BlackBerry::Platform::MouseEvent(0, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0));
+ BlackBerry::Platform::MouseEvent event(0, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0, 0);
+
+ setMouseEventDocumentPos(event, page);
+
+ page->mouseEvent(event);
return JSValueMakeUndefined(context);
}
-static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 2)
return JSValueMakeUndefined(context);
@@ -96,32 +114,35 @@ static JSValueRef mouseMoveToCallback(JSContextRef context, JSObjectRef function
lastMousePosition = IntPoint(x, y);
BlackBerry::WebKit::WebPage* page = BlackBerry::WebKit::DumpRenderTree::currentInstance()->page();
- page->mouseEvent(BlackBerry::Platform::MouseEvent(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0));
+ BlackBerry::Platform::MouseEvent event(BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, BlackBerry::Platform::MouseEvent::ScreenLeftMouseButton, lastMousePosition, IntPoint::zero(), 0, 0, 0);
+ setMouseEventDocumentPos(event, page);
+
+ page->mouseEvent(event);
return JSValueMakeUndefined(context);
}
-static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef leapForwardCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef leapForwardCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
return JSValueMakeUndefined(context);
JSStringRef character = JSValueToStringCopy(context, arguments[0], exception);
ASSERT(!*exception);
- short charCode = 0;
+ unsigned charCode = 0;
bool needsShiftKeyModifier = false;
if (JSStringIsEqualToUTF8CString(character, "leftArrow"))
charCode = KEYCODE_LEFT;
@@ -187,31 +208,31 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
return JSValueMakeUndefined(context);
}
-static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef zoomPageInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef zoomPageInCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef zoomPageOutCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef addTouchPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef addTouchPointCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 2)
return JSValueMakeUndefined(context);
@@ -221,19 +242,23 @@ static JSValueRef addTouchPointCallback(JSContextRef context, JSObjectRef functi
int y = static_cast<int>(JSValueToNumber(context, arguments[1], exception));
ASSERT(!exception || !*exception);
- BlackBerry::Platform::TouchPoint touch;
- touch.m_id = touches.isEmpty() ? 0 : touches.last().m_id + 1;
+ int id = touches.isEmpty() ? 0 : touches.last().id() + 1;
+
+ // pixelViewportPosition is unused in the WebKit layer, so use this for screen position
IntPoint pos(x, y);
- touch.m_pos = pos;
- touch.m_screenPos = pos;
- touch.m_state = BlackBerry::Platform::TouchPoint::TouchPressed;
+
+ BlackBerry::Platform::TouchPoint touch(id, BlackBerry::Platform::TouchPoint::TouchPressed, pos, pos, 0);
+
+ // Unfortunately we don't know the scroll position at this point, so use pos for the content position too.
+ // This assumes scroll position is 0,0
+ touch.populateDocumentPosition(pos, pos);
touches.append(touch);
return JSValueMakeUndefined(context);
}
-static JSValueRef updateTouchPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef updateTouchPointCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 3)
return JSValueMakeUndefined(context);
@@ -249,21 +274,26 @@ static JSValueRef updateTouchPointCallback(JSContextRef context, JSObjectRef fun
return JSValueMakeUndefined(context);
BlackBerry::Platform::TouchPoint& touch = touches[index];
+
+ // pixelViewportPosition is unused in the WebKit layer
IntPoint pos(x, y);
- touch.m_pos = pos;
- touch.m_screenPos = pos;
- touch.m_state = BlackBerry::Platform::TouchPoint::TouchMoved;
+
+ // Unfortunately we don't know the scroll position at this point, so use pos for the content position too.
+ // This assumes scroll position is 0,0
+ touch.populateDocumentPosition(pos, pos);
+ touch.setScreenPosition(pos);
+ touch.updateState(BlackBerry::Platform::TouchPoint::TouchMoved);
return JSValueMakeUndefined(context);
}
-static JSValueRef setTouchModifierCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef setTouchModifierCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef touchStartCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef touchStartCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
if (!touchActive) {
sendTouchEvent(BlackBerry::Platform::TouchEvent::TouchStart);
@@ -273,22 +303,22 @@ static JSValueRef touchStartCallback(JSContextRef context, JSObjectRef function,
return JSValueMakeUndefined(context);
}
-static JSValueRef touchCancelCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef touchCancelCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef touchMoveCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef touchMoveCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
sendTouchEvent(BlackBerry::Platform::TouchEvent::TouchMove);
return JSValueMakeUndefined(context);
}
-static JSValueRef touchEndCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef touchEndCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
for (unsigned i = 0; i < touches.size(); ++i)
- if (touches[i].m_state != BlackBerry::Platform::TouchPoint::TouchReleased) {
+ if (touches[i].state() != BlackBerry::Platform::TouchPoint::TouchReleased) {
sendTouchEvent(BlackBerry::Platform::TouchEvent::TouchMove);
return JSValueMakeUndefined(context);
}
@@ -297,20 +327,20 @@ static JSValueRef touchEndCallback(JSContextRef context, JSObjectRef function, J
return JSValueMakeUndefined(context);
}
-static JSValueRef clearTouchPointsCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef clearTouchPointsCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
touches.clear();
touchActive = false;
return JSValueMakeUndefined(context);
}
-static JSValueRef cancelTouchPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef cancelTouchPointCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t, const JSValueRef[], JSValueRef*)
{
notImplemented();
return JSValueMakeUndefined(context);
}
-static JSValueRef releaseTouchPointCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef releaseTouchPointCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 1)
return JSValueMakeUndefined(context);
@@ -320,7 +350,7 @@ static JSValueRef releaseTouchPointCallback(JSContextRef context, JSObjectRef fu
if (index < 0 || index >= (int)touches.size())
return JSValueMakeUndefined(context);
- touches[index].m_state = BlackBerry::Platform::TouchPoint::TouchReleased;
+ touches[index].updateState(BlackBerry::Platform::TouchPoint::TouchReleased);
return JSValueMakeUndefined(context);
}
@@ -334,15 +364,15 @@ void sendTouchEvent(BlackBerry::Platform::TouchEvent::Type type)
Vector<BlackBerry::Platform::TouchPoint> t;
for (Vector<BlackBerry::Platform::TouchPoint>::iterator it = touches.begin(); it != touches.end(); ++it) {
- if (it->m_state != BlackBerry::Platform::TouchPoint::TouchReleased) {
- it->m_state = BlackBerry::Platform::TouchPoint::TouchStationary;
+ if (it->state() != BlackBerry::Platform::TouchPoint::TouchReleased) {
+ it->updateState(BlackBerry::Platform::TouchPoint::TouchStationary);
t.append(*it);
}
}
touches = t;
}
-static JSValueRef scalePageByCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+static JSValueRef scalePageByCallback(JSContextRef context, JSObjectRef, JSObjectRef, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
if (argumentCount < 3)
return JSValueMakeUndefined(context);
@@ -392,7 +422,7 @@ static JSStaticValue staticValues[] = {
{ 0, 0, 0, 0 }
};
-static JSClassRef getClass(JSContextRef context)
+static JSClassRef getClass(JSContextRef)
{
static JSClassRef eventSenderClass = 0;
diff --git a/Tools/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
index 5a1b89a4c..82b448d13 100644
--- a/Tools/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
+++ b/Tools/DumpRenderTree/blackberry/PixelDumpSupportBlackBerry.cpp
@@ -32,9 +32,6 @@
#include "WebPageClient.h"
#include <BlackBerryPlatformWindow.h>
-#if USE(SKIA)
-#include <SkDevice.h>
-#endif
#include <wtf/MD5.h>
#include <wtf/Vector.h>
@@ -62,31 +59,7 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool /*onscreen*/, bool
const Platform::IntSize& windowSize = window->viewportSize();
unsigned char* data = new unsigned char[windowSize.width() * windowSize.height() * 4];
- // We need to force a synchronous update to the window or we may get an empty bitmap.
- // For example, running DRT with one test case that finishes before the screen is updated.
- window->post(windowRect);
-
-#if USE(SKIA)
- SkBitmap bitmap;
- bitmap.setConfig(SkBitmap::kARGB_8888_Config, windowSize.width(), windowSize.height());
- bitmap.allocPixels();
- bitmap.eraseARGB(0, 0, 0, 0);
-
- SkCanvas canvas(bitmap);
- backingStore->drawContents(&canvas, windowRect, windowSize);
-
- // Read that SkBitmap rather than change it. So use false on accessBitmap.
- const SkBitmap& contentsBitmap = canvas.getDevice()->accessBitmap(false/*changePixels*/);
- contentsBitmap.lockPixels();
-
- const unsigned char* windowPixels = 0;
- if (!contentsBitmap.empty()) {
- windowPixels = static_cast<const unsigned char*>(contentsBitmap.getPixels());
- if (windowPixels)
- memcpy(data, windowPixels, windowSize.width() * windowSize.height() * 4);
- }
-#else
- BlackBerry::Platform::Graphics::Buffer* buffer = BlackBerry::Platform::Graphics::createBuffer(windowSize, BlackBerry::Platform::Graphics::TemporaryBuffer);
+ BlackBerry::Platform::Graphics::Buffer* buffer = BlackBerry::Platform::Graphics::createBuffer(windowSize, BlackBerry::Platform::Graphics::AlwaysBacked);
BlackBerry::Platform::Graphics::Drawable* drawable = BlackBerry::Platform::Graphics::lockBufferDrawable(buffer);
if (drawable) {
backingStore->drawContents(drawable, windowRect, windowSize);
@@ -95,7 +68,6 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool /*onscreen*/, bool
BlackBerry::Platform::Graphics::releaseBufferDrawable(buffer);
}
BlackBerry::Platform::Graphics::destroyBuffer(buffer);
-#endif
return BitmapContext::createByAdoptingData(data, windowSize.width(), windowSize.height());
}
diff --git a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
index f06f4a84c..04a215e75 100644
--- a/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
+++ b/Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
@@ -42,7 +42,6 @@
#include "Settings.h"
#include "WorkQueue.h"
#include "WorkQueueItem.h"
-#include "WorkerThread.h"
#include <JavaScriptCore/APICast.h>
#include <SharedPointer.h>
@@ -50,7 +49,6 @@
#include <WebSettings.h>
#include <wtf/OwnArrayPtr.h>
-#include <wtf/UnusedParam.h>
#include <wtf/text/CString.h>
using WebCore::toElement;
@@ -191,9 +189,7 @@ void TestRunner::setCacheModel(int)
void TestRunner::setCustomPolicyDelegate(bool setDelegate, bool permissive)
{
- UNUSED_PARAM(setDelegate);
- UNUSED_PARAM(permissive);
- notImplemented();
+ BlackBerry::WebKit::DumpRenderTree::currentInstance()->setCustomPolicyDelegate(setDelegate, permissive);
}
void TestRunner::clearApplicationCacheForOrigin(OpaqueJSString*)
@@ -263,17 +259,6 @@ void TestRunner::setXSSAuditorEnabled(bool flag)
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setXSSAuditorEnabled(flag);
}
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
-{
- BlackBerry::WebKit::DumpRenderTree::currentInstance()->setSelectTrailingWhitespaceEnabled(flag);
-}
-
-void TestRunner::setSmartInsertDeleteEnabled(bool flag)
-{
- UNUSED_PARAM(flag);
- notImplemented();
-}
-
void TestRunner::setTabKeyCyclesThroughElements(bool cycles)
{
if (!mainFrame)
@@ -297,11 +282,12 @@ void TestRunner::setUserStyleSheetEnabled(bool flag)
void TestRunner::setUserStyleSheetLocation(JSStringRef path)
{
String pathStr = jsStringRefToWebCoreString(path);
- BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setUserStyleSheetLocation(pathStr.utf8().data());
+ BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setUserStyleSheetLocation(pathStr);
}
void TestRunner::waitForPolicyDelegate()
{
+ setCustomPolicyDelegate(true, true);
setWaitToDump(true);
waitForPolicy = true;
}
@@ -319,13 +305,6 @@ int TestRunner::windowCount()
return 0;
}
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
- UNUSED_PARAM(id);
- notImplemented();
- return false;
-}
-
void TestRunner::setWaitToDump(bool waitToDump)
{
// Change from 30s to 35s because some test cases in multipart need 30 seconds,
@@ -342,85 +321,11 @@ void TestRunner::setWindowIsKey(bool windowIsKey)
notImplemented();
}
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
- if (!mainFrame)
- return false;
-
- int nameLen = JSStringGetMaximumUTF8CStringSize(animationName);
- int idLen = JSStringGetMaximumUTF8CStringSize(elementId);
- OwnArrayPtr<char> name = adoptArrayPtr(new char[nameLen]);
- OwnArrayPtr<char> eId = adoptArrayPtr(new char[idLen]);
-
- JSStringGetUTF8CString(animationName, name.get(), nameLen);
- JSStringGetUTF8CString(elementId, eId.get(), idLen);
-
- WebCore::AnimationController* animationController = mainFrame->animation();
- if (!animationController)
- return false;
-
- WebCore::Node* node = mainFrame->document()->getElementById(eId.get());
- if (!node || !node->renderer())
- return false;
-
- return animationController->pauseAnimationAtTime(node->renderer(), name.get(), time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- if (!mainFrame)
- return false;
-
- int nameLen = JSStringGetMaximumUTF8CStringSize(propertyName);
- int idLen = JSStringGetMaximumUTF8CStringSize(elementId);
- OwnArrayPtr<char> name = adoptArrayPtr(new char[nameLen]);
- OwnArrayPtr<char> eId = adoptArrayPtr(new char[idLen]);
-
- JSStringGetUTF8CString(propertyName, name.get(), nameLen);
- JSStringGetUTF8CString(elementId, eId.get(), idLen);
-
- WebCore::AnimationController* animationController = mainFrame->animation();
- if (!animationController)
- return false;
-
- WebCore::Node* node = mainFrame->document()->getElementById(eId.get());
- if (!node || !node->renderer())
- return false;
-
- return animationController->pauseTransitionAtTime(node->renderer(), name.get(), time);
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- if (!mainFrame)
- return false;
-
- WebCore::AnimationController* animationController = mainFrame->animation();
- if (!animationController)
- return false;
-
- return animationController->numberOfActiveAnimations(mainFrame->document());
-}
-
-unsigned TestRunner::workerThreadCount() const
-{
-#if ENABLE_WORKERS
- return WebCore::WorkerThread::workerThreadCount();
-#else
- return 0;
-#endif
-}
-
void TestRunner::removeAllVisitedLinks()
{
notImplemented();
}
-void TestRunner::disableImageLoading()
-{
- BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setLoadsImagesAutomatically(false);
-}
-
void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
{
if (!mainFrame)
@@ -439,6 +344,10 @@ void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
mainFrame->page()->settings()->setHyperlinkAuditingEnabled(valueStr == "true" || valueStr == "1");
else if (keyStr == "WebSocketsEnabled")
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setWebSocketsEnabled(valueStr == "true" || valueStr == "1");
+ else if (keyStr == "WebKitDefaultTextEncodingName")
+ BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setDefaultTextEncodingName(valueStr);
+ else if (keyStr == "WebKitDisplayImagesKey")
+ BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setLoadsImagesAutomatically(valueStr == "true" || valueStr == "1");
}
void TestRunner::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
@@ -447,15 +356,15 @@ void TestRunner::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
notImplemented();
}
-void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
+void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
{
- DumpRenderTreeSupport::setMockGeolocationPosition(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), latitude, longitude, accuracy);
+ DumpRenderTreeSupport::setMockGeolocationPosition(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed);
}
-void TestRunner::setMockGeolocationError(int code, JSStringRef message)
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
String messageStr = jsStringRefToWebCoreString(message);
- DumpRenderTreeSupport::setMockGeolocationError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), code, messageStr);
+ DumpRenderTreeSupport::setMockGeolocationPositionUnavailableError(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), messageStr);
}
void TestRunner::showWebInspector()
@@ -514,7 +423,7 @@ void TestRunner::setWebViewEditable(bool)
notImplemented();
}
-void TestRunner::authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password)
+void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
{
notImplemented();
}
@@ -525,12 +434,7 @@ bool TestRunner::callShouldCloseOnWebView()
return false;
}
-void TestRunner::setFrameFlatteningEnabled(bool enable)
-{
- BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setFrameFlatteningEnabled(enable);
-}
-
-void TestRunner::setSpatialNavigationEnabled(bool enable)
+void TestRunner::setSpatialNavigationEnabled(bool)
{
notImplemented();
}
@@ -567,7 +471,7 @@ void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
mainFrame->page()->settings()->setAllowUniversalAccessFromFileURLs(enabled);
}
-void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
+void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef, JSStringRef)
{
notImplemented();
}
@@ -582,28 +486,7 @@ void TestRunner::setJavaScriptCanAccessClipboard(bool flag)
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->setJavaScriptCanAccessClipboard(flag);
}
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
-{
- return DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(context, value);
-}
-
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
- notImplemented();
- return 0;
-}
-
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
-{
- WebCore::Element* element = toElement(toJS(toJS(context), nodeObject));
- if (!element)
- return 0;
-
- JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithUTF8CString(WebCore::markerTextForListItem(element).utf8().data()));
- return markerText;
-}
-
-void TestRunner::setPluginsEnabled(bool flag)
+void TestRunner::setPluginsEnabled(bool)
{
notImplemented();
}
@@ -618,7 +501,7 @@ void TestRunner::clearAllApplicationCaches()
notImplemented();
}
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
+void TestRunner::setApplicationCacheOriginQuota(unsigned long long)
{
notImplemented();
}
@@ -628,7 +511,7 @@ void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bo
DumpRenderTreeSupport::setMockDeviceOrientation(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
}
-void TestRunner::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
+void TestRunner::addMockSpeechInputResult(JSStringRef, double, JSStringRef)
{
notImplemented();
}
@@ -639,7 +522,7 @@ void TestRunner::setGeolocationPermission(bool allow)
DumpRenderTreeSupport::setMockGeolocationPermission(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page(), allow);
}
-void TestRunner::setViewModeMediaFeature(const JSStringRef mode)
+void TestRunner::setViewModeMediaFeature(const JSStringRef)
{
notImplemented();
}
@@ -650,11 +533,6 @@ void TestRunner::setSerializeHTTPLoads(bool)
notImplemented();
}
-void TestRunner::setMinimumTimerInterval(double)
-{
- notImplemented();
-}
-
void TestRunner::setTextDirection(JSStringRef)
{
notImplemented();
@@ -693,24 +571,6 @@ void TestRunner::deleteAllLocalStorage()
notImplemented();
}
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
- notImplemented();
-}
-
-void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
-{
- JSC::ExecState* exec = toJS(context);
- WebCore::Element* element = toElement(toJS(exec, nodeObject));
- if (!element)
- return;
- WebCore::HTMLInputElement* inputElement = element->toInputElement();
- if (!inputElement)
- return;
-
- inputElement->setAutofilled(autofilled);
-}
-
int TestRunner::numberOfPendingGeolocationPermissionRequests()
{
return DumpRenderTreeSupport::numberOfPendingGeolocationPermissionRequests(BlackBerry::WebKit::DumpRenderTree::currentInstance()->page());
@@ -757,12 +617,12 @@ bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRe
// Our layout tests assume find will wrap and highlight all matches.
BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->findNextString(nameStr.utf8().data(),
- !(options & WebCore::Backwards), !(options & WebCore::CaseInsensitive), true /* wrap */, true /* highlightAllMatches */);
+ !(options & WebCore::Backwards), !(options & WebCore::CaseInsensitive), true /* wrap */, true /* highlightAllMatches */, false /* selectActiveMatchOnClear */);
return mainFrame->page()->findString(nameStr, options);
}
-void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
+void TestRunner::deleteLocalStorageForOrigin(JSStringRef)
{
// FIXME: Implement.
}
@@ -780,7 +640,7 @@ void TestRunner::setValueForUser(JSContextRef context, JSValueRef nodeObject, JS
inputElement->setValueForUser(jsStringRefToWebCoreString(value));
}
-long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef origin)
+long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef)
{
// FIXME: Implement to support getting disk usage by all application caches for an origin.
return 0;
@@ -806,11 +666,11 @@ void TestRunner::setMockSpeechInputDumpRect(bool)
{
}
-void TestRunner::grantWebNotificationPermission(JSStringRef origin)
+void TestRunner::grantWebNotificationPermission(JSStringRef)
{
}
-void TestRunner::denyWebNotificationPermission(JSStringRef jsOrigin)
+void TestRunner::denyWebNotificationPermission(JSStringRef)
{
}
@@ -818,11 +678,11 @@ void TestRunner::removeAllWebNotificationPermissions()
{
}
-void TestRunner::simulateWebNotificationClick(JSValueRef jsNotification)
+void TestRunner::simulateWebNotificationClick(JSValueRef)
{
}
-void TestRunner::simulateLegacyWebNotificationClick(JSStringRef title)
+void TestRunner::simulateLegacyWebNotificationClick(JSStringRef)
{
}
@@ -841,18 +701,13 @@ void TestRunner::setAutomaticLinkDetectionEnabled(bool)
notImplemented();
}
-void TestRunner::sendWebIntentResponse(JSStringRef)
-{
- notImplemented();
-}
-
-void TestRunner::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
+void TestRunner::setStorageDatabaseIdleInterval(double)
{
+ // FIXME: Implement this.
notImplemented();
}
-void TestRunner::setStorageDatabaseIdleInterval(double)
+void TestRunner::closeIdleLocalStorageDatabases()
{
- // FIXME: Implement this.
notImplemented();
}
diff --git a/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
index 394e40832..827b5ebce 100644
--- a/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
+++ b/Tools/DumpRenderTree/blackberry/WorkQueueItemBlackBerry.cpp
@@ -21,6 +21,7 @@
#include "DumpRenderTreeBlackBerry.h"
#include "Frame.h"
+#include "FrameLoadRequest.h"
#include "KURL.h"
#include "WebPage.h"
#include <wtf/OwnArrayPtr.h>
@@ -46,7 +47,7 @@ bool LoadItem::invoke() const
return false;
KURL kurl = KURL(KURL(), url.get());
- frame->loader()->load(kurl, false);
+ frame->loader()->load(FrameLoadRequest(frame, ResourceRequest(kurl)));
return true;
}
@@ -61,7 +62,8 @@ bool LoadHTMLStringItem::invoke() const
JSStringGetUTF8CString(m_content.get(), content.get(), contentSize);
JSStringGetUTF8CString(m_baseURL.get(), baseURL.get(), baseURLSize);
JSStringGetUTF8CString(m_unreachableURL.get(), unreachableURL.get(), unreachableURLSize);
- BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->loadString(content.get(), baseURL.get(), "text/html", unreachableURLSize ? unreachableURL.get() : "");
+ STATIC_LOCAL_STRING(s_textHtml, "text/html");
+ BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->loadString(BlackBerry::Platform::String::fromUtf8(content.get()), BlackBerry::Platform::String::fromUtf8(baseURL.get()), s_textHtml, unreachableURLSize ? BlackBerry::Platform::String::fromUtf8(unreachableURL.get()) : BlackBerry::Platform::String::emptyString());
return true;
}
diff --git a/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp b/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
index 1f7f172ab..43936d65d 100644
--- a/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
+++ b/Tools/DumpRenderTree/cf/WebArchiveDumpSupport.cpp
@@ -26,17 +26,17 @@
#include "config.h"
#include "WebArchiveDumpSupport.h"
-#include <CoreFoundation/CoreFoundation.h>
#include <CFNetwork/CFNetwork.h>
+#include <CoreFoundation/CoreFoundation.h>
#include <wtf/RetainPtr.h>
extern "C" {
-CFURLRef CFURLResponseGetURL(CFURLResponseRef response);
-CFStringRef CFURLResponseGetMIMEType(CFURLResponseRef response);
-CFStringRef CFURLResponseGetTextEncodingName(CFURLResponseRef response);
-SInt64 CFURLResponseGetExpectedContentLength(CFURLResponseRef response);
-CFHTTPMessageRef CFURLResponseGetHTTPResponse(CFURLResponseRef response);
+CFURLRef CFURLResponseGetURL(CFURLResponseRef);
+CFStringRef CFURLResponseGetMIMEType(CFURLResponseRef);
+CFStringRef CFURLResponseGetTextEncodingName(CFURLResponseRef);
+SInt64 CFURLResponseGetExpectedContentLength(CFURLResponseRef);
+CFHTTPMessageRef CFURLResponseGetHTTPResponse(CFURLResponseRef);
CFTypeID CFURLResponseGetTypeID(void);
@@ -44,11 +44,6 @@ CFTypeID CFURLResponseGetTypeID(void);
static void convertMIMEType(CFMutableStringRef mimeType)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
- // Workaround for <rdar://problem/5539824> on Leopard
- if (CFStringCompare(mimeType, CFSTR("text/xml"), kCFCompareAnchored | kCFCompareCaseInsensitive) == kCFCompareEqualTo)
- CFStringReplaceAll(mimeType, CFSTR("application/xml"));
-#endif
// Workaround for <rdar://problem/6234318> with Dashcode 2.0
if (CFStringCompare(mimeType, CFSTR("application/x-javascript"), kCFCompareAnchored | kCFCompareCaseInsensitive) == kCFCompareEqualTo)
CFStringReplaceAll(mimeType, CFSTR("text/javascript"));
@@ -70,7 +65,7 @@ static void convertWebResourceDataToString(CFMutableDictionaryRef resource)
stringEncoding = kCFStringEncodingUTF8;
CFDataRef data = static_cast<CFDataRef>(CFDictionaryGetValue(resource, CFSTR("WebResourceData")));
- RetainPtr<CFStringRef> dataAsString(AdoptCF, CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, data, stringEncoding));
+ RetainPtr<CFStringRef> dataAsString = adoptCF(CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, data, stringEncoding));
if (dataAsString)
CFDictionarySetValue(resource, CFSTR("WebResourceData"), dataAsString.get());
}
@@ -109,17 +104,17 @@ static void convertWebResourceResponseToDictionary(CFMutableDictionaryRef proper
if (CFGetTypeID(responseData) != CFDataGetTypeID())
return;
- RetainPtr<CFURLResponseRef> response(AdoptCF, createCFURLResponseFromResponseData(responseData));
+ RetainPtr<CFURLResponseRef> response = adoptCF(createCFURLResponseFromResponseData(responseData));
if (!response)
return;
- RetainPtr<CFMutableDictionaryRef> responseDictionary(AdoptCF, CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+ RetainPtr<CFMutableDictionaryRef> responseDictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
- RetainPtr<CFMutableStringRef> urlString(AdoptCF, CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLGetString(CFURLResponseGetURL(response.get()))));
+ RetainPtr<CFMutableStringRef> urlString = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLGetString(CFURLResponseGetURL(response.get()))));
normalizeWebResourceURL(urlString.get());
CFDictionarySetValue(responseDictionary.get(), CFSTR("URL"), urlString.get());
- RetainPtr<CFMutableStringRef> mimeTypeString(AdoptCF, CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLResponseGetMIMEType(response.get())));
+ RetainPtr<CFMutableStringRef> mimeTypeString = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLResponseGetMIMEType(response.get())));
convertMIMEType(mimeTypeString.get());
CFDictionarySetValue(responseDictionary.get(), CFSTR("MIMEType"), mimeTypeString.get());
@@ -128,17 +123,17 @@ static void convertWebResourceResponseToDictionary(CFMutableDictionaryRef proper
CFDictionarySetValue(responseDictionary.get(), CFSTR("textEncodingName"), textEncodingName);
SInt64 expectedContentLength = CFURLResponseGetExpectedContentLength(response.get());
- RetainPtr<CFNumberRef> expectedContentLengthNumber(AdoptCF, CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &expectedContentLength));
+ RetainPtr<CFNumberRef> expectedContentLengthNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &expectedContentLength));
CFDictionarySetValue(responseDictionary.get(), CFSTR("expectedContentLength"), expectedContentLengthNumber.get());
if (CFHTTPMessageRef httpMessage = CFURLResponseGetHTTPResponse(response.get())) {
- RetainPtr<CFDictionaryRef> allHeaders(AdoptCF, CFHTTPMessageCopyAllHeaderFields(httpMessage));
- RetainPtr<CFMutableDictionaryRef> allHeaderFields(AdoptCF, CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, allHeaders.get()));
+ RetainPtr<CFDictionaryRef> allHeaders = adoptCF(CFHTTPMessageCopyAllHeaderFields(httpMessage));
+ RetainPtr<CFMutableDictionaryRef> allHeaderFields = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, allHeaders.get()));
normalizeHTTPResponseHeaderFields(allHeaderFields.get());
CFDictionarySetValue(responseDictionary.get(), CFSTR("allHeaderFields"), allHeaderFields.get());
CFIndex statusCode = CFHTTPMessageGetResponseStatusCode(httpMessage);
- RetainPtr<CFNumberRef> statusCodeNumber(AdoptCF, CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &statusCode));
+ RetainPtr<CFNumberRef> statusCodeNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &statusCode));
CFDictionarySetValue(responseDictionary.get(), CFSTR("statusCode"), statusCodeNumber.get());
}
@@ -149,7 +144,7 @@ static CFComparisonResult compareResourceURLs(const void *val1, const void *val2
{
CFStringRef url1 = static_cast<CFStringRef>(CFDictionaryGetValue(static_cast<CFDictionaryRef>(val1), CFSTR("WebResourceURL")));
CFStringRef url2 = static_cast<CFStringRef>(CFDictionaryGetValue(static_cast<CFDictionaryRef>(val2), CFSTR("WebResourceURL")));
-
+
return CFStringCompare(url1, url2, kCFCompareAnchored);
}
@@ -157,16 +152,7 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
{
CFErrorRef error = 0;
CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0;
-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
- CFIndex bytesCount = CFDataGetLength(webArchiveData);
- RetainPtr<CFReadStreamRef> readStream(AdoptCF, CFReadStreamCreateWithBytesNoCopy(kCFAllocatorDefault, CFDataGetBytePtr(webArchiveData), bytesCount, kCFAllocatorNull));
- CFReadStreamOpen(readStream.get());
- RetainPtr<CFMutableDictionaryRef> propertyList(AdoptCF, (CFMutableDictionaryRef)CFPropertyListCreateFromStream(kCFAllocatorDefault, readStream.get(), bytesCount, kCFPropertyListMutableContainersAndLeaves, &format, 0));
- CFReadStreamClose(readStream.get());
-#else
- RetainPtr<CFMutableDictionaryRef> propertyList(AdoptCF, (CFMutableDictionaryRef)CFPropertyListCreateWithData(kCFAllocatorDefault, webArchiveData, kCFPropertyListMutableContainersAndLeaves, &format, &error));
-#endif
+ RetainPtr<CFMutableDictionaryRef> propertyList = adoptCF((CFMutableDictionaryRef)CFPropertyListCreateWithData(kCFAllocatorDefault, webArchiveData, kCFPropertyListMutableContainersAndLeaves, &format, &error));
if (!propertyList) {
if (error)
@@ -174,7 +160,7 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
return static_cast<CFStringRef>(CFRetain(CFSTR("An unknown error occurred converting data to property list.")));
}
- RetainPtr<CFMutableArrayRef> resources(AdoptCF, CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
+ RetainPtr<CFMutableArrayRef> resources = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
CFArrayAppendValue(resources.get(), propertyList.get());
while (CFArrayGetCount(resources.get())) {
@@ -207,12 +193,7 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
}
error = 0;
-
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
- RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateXMLData(kCFAllocatorDefault, propertyList.get()));
-#else
- RetainPtr<CFDataRef> xmlData(AdoptCF, CFPropertyListCreateData(kCFAllocatorDefault, propertyList.get(), kCFPropertyListXMLFormat_v1_0, 0, &error));
-#endif
+ RetainPtr<CFDataRef> xmlData = adoptCF(CFPropertyListCreateData(kCFAllocatorDefault, propertyList.get(), kCFPropertyListXMLFormat_v1_0, 0, &error));
if (!xmlData) {
if (error)
@@ -220,8 +201,8 @@ CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
return static_cast<CFStringRef>(CFRetain(CFSTR("An unknown error occurred converting property list to data.")));
}
- RetainPtr<CFStringRef> xmlString(AdoptCF, CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, xmlData.get(), kCFStringEncodingUTF8));
- RetainPtr<CFMutableStringRef> string(AdoptCF, CFStringCreateMutableCopy(kCFAllocatorDefault, 0, xmlString.get()));
+ RetainPtr<CFStringRef> xmlString = adoptCF(CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, xmlData.get(), kCFStringEncodingUTF8));
+ RetainPtr<CFMutableStringRef> string = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, xmlString.get()));
// Replace "Apple Computer" with "Apple" in the DTD declaration.
CFStringFindAndReplace(string.get(), CFSTR("-//Apple Computer//"), CFSTR("-//Apple//"), CFRangeMake(0, CFStringGetLength(string.get())), 0);
diff --git a/Tools/DumpRenderTree/cg/ImageDiffCG.cpp b/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
index 7fa5110bb..900f1ba15 100644
--- a/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
+++ b/Tools/DumpRenderTree/cg/ImageDiffCG.cpp
@@ -75,7 +75,7 @@ static const CFStringRef kUTTypePNG = CFSTR("public.png");
static RetainPtr<CGImageRef> createImageFromStdin(int bytesRemaining)
{
unsigned char buffer[2048];
- RetainPtr<CFMutableDataRef> data(AdoptCF, CFDataCreateMutable(0, bytesRemaining));
+ RetainPtr<CFMutableDataRef> data = adoptCF(CFDataCreateMutable(0, bytesRemaining));
while (bytesRemaining > 0) {
size_t bytesToRead = min(bytesRemaining, 2048);
@@ -83,8 +83,8 @@ static RetainPtr<CGImageRef> createImageFromStdin(int bytesRemaining)
CFDataAppendBytes(data.get(), buffer, static_cast<CFIndex>(bytesRead));
bytesRemaining -= static_cast<int>(bytesRead);
}
- RetainPtr<CGDataProviderRef> dataProvider(AdoptCF, CGDataProviderCreateWithCFData(data.get()));
- return RetainPtr<CGImageRef>(AdoptCF, CGImageCreateWithPNGDataProvider(dataProvider.get(), 0, false, kCGRenderingIntentDefault));
+ RetainPtr<CGDataProviderRef> dataProvider = adoptCF(CGDataProviderCreateWithCFData(data.get()));
+ return adoptCF(CGImageCreateWithPNGDataProvider(dataProvider.get(), 0, false, kCGRenderingIntentDefault));
}
static void releaseMallocBuffer(void* info, const void* data, size_t size)
@@ -100,12 +100,12 @@ static RetainPtr<CGImageRef> createDifferenceImage(CGImageRef baseImage, CGImage
// Draw base image in bitmap context
void* baseBuffer = calloc(height, rowBytes);
- RetainPtr<CGContextRef> baseContext(AdoptCF, CGBitmapContextCreate(baseBuffer, width, height, 8, rowBytes, CGImageGetColorSpace(baseImage), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
+ RetainPtr<CGContextRef> baseContext = adoptCF(CGBitmapContextCreate(baseBuffer, width, height, 8, rowBytes, CGImageGetColorSpace(baseImage), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
CGContextDrawImage(baseContext.get(), CGRectMake(0, 0, width, height), baseImage);
// Draw test image in bitmap context
void* buffer = calloc(height, rowBytes);
- RetainPtr<CGContextRef> context(AdoptCF, CGBitmapContextCreate(buffer, width, height, 8, rowBytes, CGImageGetColorSpace(testImage), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
+ RetainPtr<CGContextRef> context = adoptCF(CGBitmapContextCreate(buffer, width, height, 8, rowBytes, CGImageGetColorSpace(testImage), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host));
CGContextDrawImage(context.get(), CGRectMake(0, 0, width, height), testImage);
// Compare the content of the 2 bitmaps
@@ -154,8 +154,8 @@ static RetainPtr<CGImageRef> createDifferenceImage(CGImageRef baseImage, CGImage
}
static CGColorSpaceRef diffColorspace = CGColorSpaceCreateDeviceGray();
- RetainPtr<CGDataProviderRef> provider(AdoptCF, CGDataProviderCreateWithData(0, diffBuffer, width * height, releaseMallocBuffer));
- diffImage.adoptCF(CGImageCreate(width, height, 8, 8, width, diffColorspace, 0, provider.get(), 0, false, kCGRenderingIntentDefault));
+ RetainPtr<CGDataProviderRef> provider = adoptCF(CGDataProviderCreateWithData(0, diffBuffer, width * height, releaseMallocBuffer));
+ diffImage = adoptCF(CGImageCreate(width, height, 8, 8, width, diffColorspace, 0, provider.get(), 0, false, kCGRenderingIntentDefault));
}
else
free(diffBuffer);
@@ -242,8 +242,8 @@ int main(int argc, const char* argv[])
if (difference > 0.0f) {
if (diffImage) {
- RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
- RetainPtr<CGImageDestinationRef> imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
+ RetainPtr<CFMutableDataRef> imageData = adoptCF(CFDataCreateMutable(0, 0));
+ RetainPtr<CGImageDestinationRef> imageDest = adoptCF(CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
CGImageDestinationAddImage(imageDest.get(), diffImage.get(), 0);
CGImageDestinationFinalize(imageDest.get());
printf("Content-Length: %lu\n", CFDataGetLength(imageData.get()));
diff --git a/Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp b/Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp
index bf59b03ec..3168d20a5 100644
--- a/Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp
+++ b/Tools/DumpRenderTree/cg/PixelDumpSupportCG.cpp
@@ -57,8 +57,8 @@ static const CFStringRef kUTTypePNG = CFSTR("public.png");
static void printPNG(CGImageRef image, const char* checksum)
{
- RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
- RetainPtr<CGImageDestinationRef> imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
+ RetainPtr<CFMutableDataRef> imageData = adoptCF(CFDataCreateMutable(0, 0));
+ RetainPtr<CGImageDestinationRef> imageDest = adoptCF(CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
CGImageDestinationAddImage(imageDest.get(), image, 0);
CGImageDestinationFinalize(imageDest.get());
@@ -108,6 +108,6 @@ void computeMD5HashStringForBitmapContext(BitmapContext* context, char hashStrin
void dumpBitmap(BitmapContext* context, const char* checksum)
{
- RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(context->cgContext()));
+ RetainPtr<CGImageRef> image = adoptCF(CGBitmapContextCreateImage(context->cgContext()));
printPNG(image.get(), checksum);
}
diff --git a/Tools/DumpRenderTree/cg/PixelDumpSupportCG.h b/Tools/DumpRenderTree/cg/PixelDumpSupportCG.h
index f0c974631..353a6b605 100644
--- a/Tools/DumpRenderTree/cg/PixelDumpSupportCG.h
+++ b/Tools/DumpRenderTree/cg/PixelDumpSupportCG.h
@@ -70,7 +70,7 @@ private:
BitmapContext(PlatformBitmapBuffer buffer, CGContextRef context)
: m_buffer(buffer)
- , m_context(AdoptCF, context)
+ , m_context(adoptCF(context))
{
}
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
deleted file mode 100644
index eb21b2c85..000000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "DRTDevToolsAgent.h"
-
-#include "DRTDevToolsClient.h"
-
-#include "Task.h"
-#include "platform/WebCString.h"
-#include "WebDevToolsAgent.h"
-#include "WebView.h"
-#include "webkit/support/webkit_support.h"
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-DRTDevToolsAgent::DRTDevToolsAgent()
- : m_drtDevToolsClient(0)
- , m_webView(0)
-{
- static int devToolsAgentCounter = 0;
-
- m_routingID = ++devToolsAgentCounter;
-}
-
-void DRTDevToolsAgent::reset()
-{
- m_taskList.revokeAll();
-}
-
-void DRTDevToolsAgent::setWebView(WebView* webView)
-{
- m_webView = webView;
-}
-
-void DRTDevToolsAgent::sendMessageToInspectorFrontend(const WebString& data)
-{
- if (m_drtDevToolsClient)
- m_drtDevToolsClient->asyncCall(data);
-}
-
-void DRTDevToolsAgent::runtimePropertyChanged(const WebString& name, const WebString& value)
-{
- // FIXME: Implement.
-}
-
-WebDevToolsAgentClient::WebKitClientMessageLoop* DRTDevToolsAgent::createClientMessageLoop()
-{
- return webkit_support::CreateDevToolsMessageLoop();
-}
-
-void DRTDevToolsAgent::asyncCall(const WebString& args)
-{
- postTask(new AsyncCallTask(this, args));
-}
-
-void DRTDevToolsAgent::call(const WebString& args)
-{
- WebDevToolsAgent* agent = webDevToolsAgent();
- if (agent)
- agent->dispatchOnInspectorBackend(args);
-}
-
-WebDevToolsAgent* DRTDevToolsAgent::webDevToolsAgent()
-{
- if (!m_webView)
- return 0;
- return m_webView->devToolsAgent();
-}
-
-void DRTDevToolsAgent::attach(DRTDevToolsClient* client)
-{
- ASSERT(!m_drtDevToolsClient);
- m_drtDevToolsClient = client;
- WebDevToolsAgent* agent = webDevToolsAgent();
- if (agent)
- agent->attach();
-}
-
-void DRTDevToolsAgent::detach()
-{
- ASSERT(m_drtDevToolsClient);
- WebDevToolsAgent* agent = webDevToolsAgent();
- if (agent)
- agent->detach();
- m_drtDevToolsClient = 0;
-}
-
-bool DRTDevToolsAgent::evaluateInWebInspector(long callID, const std::string& script)
-{
- WebDevToolsAgent* agent = webDevToolsAgent();
- if (!agent)
- return false;
- agent->evaluateInWebInspector(callID, WebString::fromUTF8(script));
- return true;
-}
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
deleted file mode 100644
index c13aef7fa..000000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsAgent.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef DRTDevToolsAgent_h
-#define DRTDevToolsAgent_h
-
-#include "WebDevToolsAgentClient.h"
-#include "WebTask.h"
-#include "platform/WebString.h"
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
-
-namespace WebKit {
-
-class WebCString;
-class WebDevToolsAgent;
-class WebView;
-struct WebDevToolsMessageData;
-
-} // namespace WebKit
-
-class DRTDevToolsClient;
-
-class DRTDevToolsAgent : public WebKit::WebDevToolsAgentClient {
- WTF_MAKE_NONCOPYABLE(DRTDevToolsAgent);
-public:
- DRTDevToolsAgent();
- virtual ~DRTDevToolsAgent() { }
- void reset();
-
- void setWebView(WebKit::WebView*);
-
- // WebDevToolsAgentClient implementation.
- virtual void sendMessageToInspectorFrontend(const WebKit::WebString&);
- virtual int hostIdentifier() { return m_routingID; }
- virtual void runtimePropertyChanged(const WebKit::WebString& name, const WebKit::WebString& value);
- virtual WebKitClientMessageLoop* createClientMessageLoop();
-
- void asyncCall(const WebKit::WebString& args);
-
- void attach(DRTDevToolsClient*);
- void detach();
-
- bool evaluateInWebInspector(long callID, const std::string& script);
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
-private:
- void call(const WebKit::WebString& args);
- WebKit::WebDevToolsAgent* webDevToolsAgent();
-
- class AsyncCallTask: public WebTestRunner::WebMethodTask<DRTDevToolsAgent> {
- public:
- AsyncCallTask(DRTDevToolsAgent* object, const WebKit::WebString& args)
- : WebTestRunner::WebMethodTask<DRTDevToolsAgent>(object), m_args(args) { }
- virtual void runIfValid() { m_object->call(m_args); }
-
- private:
- WebKit::WebString m_args;
- };
-
- WebTestRunner::WebTaskList m_taskList;
- DRTDevToolsClient* m_drtDevToolsClient;
- int m_routingID;
- WebKit::WebView* m_webView;
-};
-
-#endif // DRTDevToolsAgent_h
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp b/Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp
deleted file mode 100644
index 08df1d52a..000000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "DRTDevToolsClient.h"
-
-#include "DRTDevToolsAgent.h"
-#include "Task.h"
-#include "WebDevToolsAgent.h"
-#include "WebDevToolsFrontend.h"
-#include "WebFrame.h"
-#include "WebScriptSource.h"
-#include "WebView.h"
-#include "webkit/support/webkit_support.h"
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-DRTDevToolsClient::DRTDevToolsClient(DRTDevToolsAgent* agent, WebView* webView)
- : m_webView(webView)
- , m_drtDevToolsAgent(agent)
-{
- m_webDevToolsFrontend = adoptPtr(WebDevToolsFrontend::create(m_webView, this, WebString::fromUTF8("en-US")));
- m_drtDevToolsAgent->attach(this);
-}
-
-DRTDevToolsClient::~DRTDevToolsClient()
-{
- // There is a chance that the page will be destroyed at detach step of
- // m_drtDevToolsAgent and we should clean pending requests a bit earlier.
- m_taskList.revokeAll();
- if (m_drtDevToolsAgent)
- m_drtDevToolsAgent->detach();
-}
-
-void DRTDevToolsClient::reset()
-{
- m_taskList.revokeAll();
-}
-
-void DRTDevToolsClient::sendMessageToBackend(const WebString& data)
-{
- if (m_drtDevToolsAgent)
- m_drtDevToolsAgent->asyncCall(data);
-}
-
-void DRTDevToolsClient::activateWindow()
-{
- // Not implemented.
-}
-
-void DRTDevToolsClient::closeWindow()
-{
- // Not implemented.
-}
-
-void DRTDevToolsClient::dockWindow()
-{
- // Not implemented.
-}
-
-void DRTDevToolsClient::undockWindow()
-{
- // Not implemented.
-}
-
-void DRTDevToolsClient::asyncCall(const WebString& args)
-{
- postTask(new AsyncCallTask(this, args));
-}
-
-void DRTDevToolsClient::call(const WebString& args)
-{
- m_webDevToolsFrontend->dispatchOnInspectorFrontend(args);
-}
-
diff --git a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.h b/Tools/DumpRenderTree/chromium/DRTDevToolsClient.h
deleted file mode 100644
index 5f486ddd0..000000000
--- a/Tools/DumpRenderTree/chromium/DRTDevToolsClient.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef DRTDevToolsClient_h
-#define DRTDevToolsClient_h
-
-#include "WebDevToolsFrontendClient.h"
-#include "WebTask.h"
-#include "platform/WebString.h"
-#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
-namespace WebKit {
-
-class WebDevToolsFrontend;
-struct WebDevToolsMessageData;
-class WebView;
-
-} // namespace WebKit
-
-class DRTDevToolsAgent;
-
-class DRTDevToolsClient : public WebKit::WebDevToolsFrontendClient {
- WTF_MAKE_NONCOPYABLE(DRTDevToolsClient);
-public:
- DRTDevToolsClient(DRTDevToolsAgent*, WebKit::WebView*);
- virtual ~DRTDevToolsClient();
- void reset();
-
- // WebDevToolsFrontendClient implementation
- virtual void sendMessageToBackend(const WebKit::WebString&);
-
- virtual void activateWindow();
- virtual void closeWindow();
- virtual void dockWindow();
- virtual void undockWindow();
-
- void asyncCall(const WebKit::WebString& args);
-
- void allMessagesProcessed();
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
- private:
- void call(const WebKit::WebString& args);
- class AsyncCallTask: public WebTestRunner::WebMethodTask<DRTDevToolsClient> {
- public:
- AsyncCallTask(DRTDevToolsClient* object, const WebKit::WebString& args)
- : WebTestRunner::WebMethodTask<DRTDevToolsClient>(object), m_args(args) { }
- virtual void runIfValid() { m_object->call(m_args); }
-
- private:
- WebKit::WebString m_args;
- };
-
- WebTestRunner::WebTaskList m_taskList;
- WebKit::WebView* m_webView;
- DRTDevToolsAgent* m_drtDevToolsAgent;
- WTF::OwnPtr<WebKit::WebDevToolsFrontend> m_webDevToolsFrontend;
-};
-
-#endif // DRTDevToolsClient_h
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
deleted file mode 100644
index e2255c793..000000000
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
+++ /dev/null
@@ -1,1405 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
- * Copyright (C) 2012 Apple 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.
- */
-
-#include "config.h"
-#include "DRTTestRunner.h"
-
-#include "DRTDevToolsAgent.h"
-#include "MockWebSpeechInputController.h"
-#include "MockWebSpeechRecognizer.h"
-#include "Task.h"
-#include "TestShell.h"
-#include "WebAnimationController.h"
-#include "WebBindings.h"
-#include "WebConsoleMessage.h"
-#include "WebDeviceOrientation.h"
-#include "WebDeviceOrientationClientMock.h"
-#include "WebDocument.h"
-#include "WebElement.h"
-#include "WebFindOptions.h"
-#include "WebFrame.h"
-#include "WebGeolocationClientMock.h"
-#include "WebIDBFactory.h"
-#include "WebInputElement.h"
-#include "WebIntent.h"
-#include "WebIntentRequest.h"
-#include "WebKit.h"
-#include "WebNotificationPresenter.h"
-#include "WebPermissions.h"
-#include "WebPrintParams.h"
-#include "WebScriptSource.h"
-#include "WebSecurityPolicy.h"
-#include "WebSettings.h"
-#include "WebSurroundingText.h"
-#include "WebView.h"
-#include "WebViewHost.h"
-#include "WebWorkerInfo.h"
-#include "platform/WebData.h"
-#include "platform/WebSerializedScriptValue.h"
-#include "platform/WebSize.h"
-#include "platform/WebURL.h"
-#include "v8/include/v8.h"
-#include "webkit/support/webkit_support.h"
-#include <algorithm>
-#include <cctype>
-#include <clocale>
-#include <cstdlib>
-#include <limits>
-#include <sstream>
-#include <wtf/OwnArrayPtr.h>
-#include <wtf/text/WTFString.h>
-
-#if OS(LINUX) || OS(ANDROID)
-#include "linux/WebFontRendering.h"
-#endif
-
-using namespace WebCore;
-using namespace WebKit;
-using namespace WebTestRunner;
-using namespace std;
-
-class EmptyWebDeliveredIntentClient : public WebKit::WebDeliveredIntentClient {
-public:
- EmptyWebDeliveredIntentClient() { }
- ~EmptyWebDeliveredIntentClient() { }
-
- virtual void postResult(const WebSerializedScriptValue& data) const { }
- virtual void postFailure(const WebSerializedScriptValue& data) const { }
- virtual void destroy() { }
-};
-
-DRTTestRunner::DRTTestRunner(TestShell* shell)
- : m_shell(shell)
- , m_closeRemainingWindows(false)
- , m_deferMainResourceDataLoad(false)
- , m_showDebugLayerTree(false)
- , m_workQueue(this)
- , m_intentClient(adoptPtr(new EmptyWebDeliveredIntentClient))
- , m_shouldStayOnPageAfterHandlingBeforeUnload(false)
-{
-
- // Initialize the map that associates methods of this class with the names
- // they will use when called by JavaScript. The actual binding of those
- // names to their methods will be done by calling bindToJavaScript() (defined
- // by CppBoundClass, the parent to DRTTestRunner).
-#if ENABLE(INPUT_SPEECH)
- bindMethod("addMockSpeechInputResult", &DRTTestRunner::addMockSpeechInputResult);
- bindMethod("setMockSpeechInputDumpRect", &DRTTestRunner::setMockSpeechInputDumpRect);
-#endif
-#if ENABLE(SCRIPTED_SPEECH)
- bindMethod("addMockSpeechRecognitionResult", &DRTTestRunner::addMockSpeechRecognitionResult);
- bindMethod("setMockSpeechRecognitionError", &DRTTestRunner::setMockSpeechRecognitionError);
- bindMethod("wasMockSpeechRecognitionAborted", &DRTTestRunner::wasMockSpeechRecognitionAborted);
-#endif
- bindMethod("clearAllDatabases", &DRTTestRunner::clearAllDatabases);
- bindMethod("closeWebInspector", &DRTTestRunner::closeWebInspector);
-#if ENABLE(POINTER_LOCK)
- bindMethod("didAcquirePointerLock", &DRTTestRunner::didAcquirePointerLock);
- bindMethod("didLosePointerLock", &DRTTestRunner::didLosePointerLock);
- bindMethod("didNotAcquirePointerLock", &DRTTestRunner::didNotAcquirePointerLock);
-#endif
- bindMethod("disableAutoResizeMode", &DRTTestRunner::disableAutoResizeMode);
- bindMethod("display", &DRTTestRunner::display);
- bindMethod("displayInvalidatedRegion", &DRTTestRunner::displayInvalidatedRegion);
- bindMethod("dumpAsText", &DRTTestRunner::dumpAsText);
- bindMethod("dumpBackForwardList", &DRTTestRunner::dumpBackForwardList);
- bindMethod("dumpChildFramesAsText", &DRTTestRunner::dumpChildFramesAsText);
- bindMethod("dumpChildFrameScrollPositions", &DRTTestRunner::dumpChildFrameScrollPositions);
- bindMethod("dumpEditingCallbacks", &DRTTestRunner::dumpEditingCallbacks);
- bindMethod("dumpFrameLoadCallbacks", &DRTTestRunner::dumpFrameLoadCallbacks);
- bindMethod("dumpProgressFinishedCallback", &DRTTestRunner::dumpProgressFinishedCallback);
- bindMethod("dumpUserGestureInFrameLoadCallbacks", &DRTTestRunner::dumpUserGestureInFrameLoadCallbacks);
- bindMethod("dumpResourceLoadCallbacks", &DRTTestRunner::dumpResourceLoadCallbacks);
- bindMethod("dumpResourceRequestCallbacks", &DRTTestRunner::dumpResourceRequestCallbacks);
- bindMethod("dumpResourceResponseMIMETypes", &DRTTestRunner::dumpResourceResponseMIMETypes);
- bindMethod("dumpSelectionRect", &DRTTestRunner::dumpSelectionRect);
- bindMethod("dumpStatusCallbacks", &DRTTestRunner::dumpWindowStatusChanges);
- bindMethod("dumpTitleChanges", &DRTTestRunner::dumpTitleChanges);
- bindMethod("dumpPermissionClientCallbacks", &DRTTestRunner::dumpPermissionClientCallbacks);
- bindMethod("dumpCreateView", &DRTTestRunner::dumpCreateView);
- bindMethod("enableAutoResizeMode", &DRTTestRunner::enableAutoResizeMode);
- bindMethod("evaluateInWebInspector", &DRTTestRunner::evaluateInWebInspector);
-#if ENABLE(NOTIFICATIONS)
- bindMethod("grantWebNotificationPermission", &DRTTestRunner::grantWebNotificationPermission);
-#endif
- bindMethod("notifyDone", &DRTTestRunner::notifyDone);
- bindMethod("numberOfPendingGeolocationPermissionRequests", &DRTTestRunner:: numberOfPendingGeolocationPermissionRequests);
- bindMethod("overridePreference", &DRTTestRunner::overridePreference);
- bindMethod("pathToLocalResource", &DRTTestRunner::pathToLocalResource);
- bindMethod("queueBackNavigation", &DRTTestRunner::queueBackNavigation);
- bindMethod("queueForwardNavigation", &DRTTestRunner::queueForwardNavigation);
- bindMethod("queueLoadingScript", &DRTTestRunner::queueLoadingScript);
- bindMethod("queueLoad", &DRTTestRunner::queueLoad);
- bindMethod("queueLoadHTMLString", &DRTTestRunner::queueLoadHTMLString);
- bindMethod("queueNonLoadingScript", &DRTTestRunner::queueNonLoadingScript);
- bindMethod("queueReload", &DRTTestRunner::queueReload);
- bindMethod("repaintSweepHorizontally", &DRTTestRunner::repaintSweepHorizontally);
- bindMethod("setAllowDisplayOfInsecureContent", &DRTTestRunner::setAllowDisplayOfInsecureContent);
- bindMethod("setAllowFileAccessFromFileURLs", &DRTTestRunner::setAllowFileAccessFromFileURLs);
- bindMethod("setAllowRunningOfInsecureContent", &DRTTestRunner::setAllowRunningOfInsecureContent);
- bindMethod("setAllowUniversalAccessFromFileURLs", &DRTTestRunner::setAllowUniversalAccessFromFileURLs);
- bindMethod("setAlwaysAcceptCookies", &DRTTestRunner::setAlwaysAcceptCookies);
- bindMethod("setAuthorAndUserStylesEnabled", &DRTTestRunner::setAuthorAndUserStylesEnabled);
- bindMethod("setCanOpenWindows", &DRTTestRunner::setCanOpenWindows);
- bindMethod("setCloseRemainingWindowsWhenComplete", &DRTTestRunner::setCloseRemainingWindowsWhenComplete);
- bindMethod("setCustomPolicyDelegate", &DRTTestRunner::setCustomPolicyDelegate);
- bindMethod("setDatabaseQuota", &DRTTestRunner::setDatabaseQuota);
- bindMethod("setDeferMainResourceDataLoad", &DRTTestRunner::setDeferMainResourceDataLoad);
- bindMethod("setAudioData", &DRTTestRunner::setAudioData);
- bindMethod("setGeolocationPermission", &DRTTestRunner::setGeolocationPermission);
- bindMethod("setJavaScriptCanAccessClipboard", &DRTTestRunner::setJavaScriptCanAccessClipboard);
- bindMethod("setMockDeviceOrientation", &DRTTestRunner::setMockDeviceOrientation);
- bindMethod("setMockGeolocationPositionUnavailableError", &DRTTestRunner::setMockGeolocationPositionUnavailableError);
- bindMethod("setMockGeolocationPosition", &DRTTestRunner::setMockGeolocationPosition);
- bindMethod("setPluginsEnabled", &DRTTestRunner::setPluginsEnabled);
-#if ENABLE(POINTER_LOCK)
- bindMethod("setPointerLockWillRespondAsynchronously", &DRTTestRunner::setPointerLockWillRespondAsynchronously);
- bindMethod("setPointerLockWillFailSynchronously", &DRTTestRunner::setPointerLockWillFailSynchronously);
-#endif
- bindMethod("setPopupBlockingEnabled", &DRTTestRunner::setPopupBlockingEnabled);
- bindMethod("setPOSIXLocale", &DRTTestRunner::setPOSIXLocale);
- bindMethod("setPrinting", &DRTTestRunner::setPrinting);
- bindMethod("setSelectTrailingWhitespaceEnabled", &DRTTestRunner::setSelectTrailingWhitespaceEnabled);
- bindMethod("setBackingScaleFactor", &DRTTestRunner::setBackingScaleFactor);
- bindMethod("setSmartInsertDeleteEnabled", &DRTTestRunner::setSmartInsertDeleteEnabled);
- bindMethod("setStopProvisionalFrameLoads", &DRTTestRunner::setStopProvisionalFrameLoads);
- bindMethod("setUserStyleSheetEnabled", &DRTTestRunner::setUserStyleSheetEnabled);
- bindMethod("setUserStyleSheetLocation", &DRTTestRunner::setUserStyleSheetLocation);
- bindMethod("setWillSendRequestClearHeader", &DRTTestRunner::setWillSendRequestClearHeader);
- bindMethod("setWillSendRequestReturnsNull", &DRTTestRunner::setWillSendRequestReturnsNull);
- bindMethod("setWillSendRequestReturnsNullOnRedirect", &DRTTestRunner::setWillSendRequestReturnsNullOnRedirect);
- bindMethod("setWindowIsKey", &DRTTestRunner::setWindowIsKey);
- bindMethod("setXSSAuditorEnabled", &DRTTestRunner::setXSSAuditorEnabled);
- bindMethod("showWebInspector", &DRTTestRunner::showWebInspector);
-#if ENABLE(NOTIFICATIONS)
- bindMethod("simulateLegacyWebNotificationClick", &DRTTestRunner::simulateLegacyWebNotificationClick);
-#endif
- bindMethod("testRepaint", &DRTTestRunner::testRepaint);
- bindMethod("waitForPolicyDelegate", &DRTTestRunner::waitForPolicyDelegate);
- bindMethod("waitUntilDone", &DRTTestRunner::waitUntilDone);
- bindMethod("windowCount", &DRTTestRunner::windowCount);
- bindMethod("setImagesAllowed", &DRTTestRunner::setImagesAllowed);
- bindMethod("setScriptsAllowed", &DRTTestRunner::setScriptsAllowed);
- bindMethod("setStorageAllowed", &DRTTestRunner::setStorageAllowed);
- bindMethod("setPluginsAllowed", &DRTTestRunner::setPluginsAllowed);
-
- bindMethod("setShouldStayOnPageAfterHandlingBeforeUnload", &DRTTestRunner::setShouldStayOnPageAfterHandlingBeforeUnload);
-
- // Shared properties.
- // webHistoryItemCount is used by tests in LayoutTests\http\tests\history
- bindProperty("webHistoryItemCount", &m_webHistoryItemCount);
- bindProperty("titleTextDirection", &m_titleTextDirection);
- bindProperty("interceptPostMessage", &m_interceptPostMessage);
- bindMethod("sendWebIntentResponse", &DRTTestRunner::sendWebIntentResponse);
- bindMethod("deliverWebIntent", &DRTTestRunner::deliverWebIntent);
-}
-
-DRTTestRunner::~DRTTestRunner()
-{
-}
-
-DRTTestRunner::WorkQueue::~WorkQueue()
-{
- reset();
-}
-
-void DRTTestRunner::WorkQueue::processWorkSoon()
-{
- if (m_controller->m_shell->webViewHost()->topLoadingFrame())
- return;
-
- if (!m_queue.isEmpty()) {
- // We delay processing queued work to avoid recursion problems.
- postTask(new WorkQueueTask(this));
- } else if (!m_controller->m_waitUntilDone)
- m_controller->m_shell->testFinished();
-}
-
-void DRTTestRunner::WorkQueue::processWork()
-{
- TestShell* shell = m_controller->m_shell;
- // Quit doing work once a load is in progress.
- while (!m_queue.isEmpty()) {
- bool startedLoad = m_queue.first()->run(shell);
- delete m_queue.takeFirst();
- if (startedLoad)
- return;
- }
-
- if (!m_controller->m_waitUntilDone && !shell->webViewHost()->topLoadingFrame())
- shell->testFinished();
-}
-
-void DRTTestRunner::WorkQueue::reset()
-{
- m_frozen = false;
- while (!m_queue.isEmpty())
- delete m_queue.takeFirst();
-}
-
-void DRTTestRunner::WorkQueue::addWork(WorkItem* work)
-{
- if (m_frozen) {
- delete work;
- return;
- }
- m_queue.append(work);
-}
-
-void DRTTestRunner::dumpAsText(const CppArgumentList& arguments, CppVariant* result)
-{
- m_dumpAsText = true;
- m_generatePixelResults = false;
-
- // Optional paramater, describing whether it's allowed to dump pixel results in dumpAsText mode.
- if (arguments.size() > 0 && arguments[0].isBool())
- m_generatePixelResults = arguments[0].value.boolValue;
-
- result->setNull();
-}
-
-void DRTTestRunner::dumpEditingCallbacks(const CppArgumentList&, CppVariant* result)
-{
- m_dumpEditingCallbacks = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpBackForwardList(const CppArgumentList&, CppVariant* result)
-{
- m_dumpBackForwardList = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
-{
- m_dumpFrameLoadCallbacks = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpProgressFinishedCallback(const CppArgumentList&, CppVariant* result)
-{
- m_dumpProgressFinishedCallback = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
-{
- m_dumpUserGestureInFrameLoadCallbacks = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant* result)
-{
- m_dumpResourceLoadCallbacks = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpResourceRequestCallbacks(const CppArgumentList&, CppVariant* result)
-{
- m_dumpResourceRequestCallbacks = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpResourceResponseMIMETypes(const CppArgumentList&, CppVariant* result)
-{
- m_dumpResourceResponseMIMETypes = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant* result)
-{
- m_dumpChildFrameScrollPositions = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpChildFramesAsText(const CppArgumentList&, CppVariant* result)
-{
- m_dumpChildFramesAsText = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpWindowStatusChanges(const CppArgumentList&, CppVariant* result)
-{
- m_dumpWindowStatusChanges = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpTitleChanges(const CppArgumentList&, CppVariant* result)
-{
- m_dumpTitleChanges = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpPermissionClientCallbacks(const CppArgumentList&, CppVariant* result)
-{
- m_dumpPermissionClientCallbacks = true;
- result->setNull();
-}
-
-void DRTTestRunner::dumpCreateView(const CppArgumentList&, CppVariant* result)
-{
- m_dumpCreateView = true;
- result->setNull();
-}
-
-void DRTTestRunner::waitUntilDone(const CppArgumentList&, CppVariant* result)
-{
- if (!webkit_support::BeingDebugged())
- postDelayedTask(new NotifyDoneTimedOutTask(this), m_shell->layoutTestTimeout());
- m_waitUntilDone = true;
- result->setNull();
-}
-
-void DRTTestRunner::notifyDone(const CppArgumentList&, CppVariant* result)
-{
- // Test didn't timeout. Kill the timeout timer.
- m_taskList.revokeAll();
-
- completeNotifyDone(false);
- result->setNull();
-}
-
-void DRTTestRunner::completeNotifyDone(bool isTimeout)
-{
- if (m_waitUntilDone && !m_shell->webViewHost()->topLoadingFrame() && m_workQueue.isEmpty()) {
- if (isTimeout)
- m_shell->testTimedOut();
- else
- m_shell->testFinished();
- }
- m_waitUntilDone = false;
-}
-
-class WorkItemBackForward : public DRTTestRunner::WorkItem {
-public:
- WorkItemBackForward(int distance) : m_distance(distance) { }
- bool run(TestShell* shell)
- {
- shell->goToOffset(m_distance);
- return true; // FIXME: Did it really start a navigation?
- }
-
-private:
- int m_distance;
-};
-
-void DRTTestRunner::queueBackNavigation(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isNumber())
- m_workQueue.addWork(new WorkItemBackForward(-arguments[0].toInt32()));
- result->setNull();
-}
-
-void DRTTestRunner::queueForwardNavigation(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isNumber())
- m_workQueue.addWork(new WorkItemBackForward(arguments[0].toInt32()));
- result->setNull();
-}
-
-class WorkItemReload : public DRTTestRunner::WorkItem {
-public:
- bool run(TestShell* shell)
- {
- shell->reload();
- return true;
- }
-};
-
-void DRTTestRunner::queueReload(const CppArgumentList&, CppVariant* result)
-{
- m_workQueue.addWork(new WorkItemReload);
- result->setNull();
-}
-
-class WorkItemLoadingScript : public DRTTestRunner::WorkItem {
-public:
- WorkItemLoadingScript(const string& script) : m_script(script) { }
- bool run(TestShell* shell)
- {
- shell->webView()->mainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(m_script)));
- return true; // FIXME: Did it really start a navigation?
- }
-
-private:
- string m_script;
-};
-
-class WorkItemNonLoadingScript : public DRTTestRunner::WorkItem {
-public:
- WorkItemNonLoadingScript(const string& script) : m_script(script) { }
- bool run(TestShell* shell)
- {
- shell->webView()->mainFrame()->executeScript(WebScriptSource(WebString::fromUTF8(m_script)));
- return false;
- }
-
-private:
- string m_script;
-};
-
-void DRTTestRunner::queueLoadingScript(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString())
- m_workQueue.addWork(new WorkItemLoadingScript(arguments[0].toString()));
- result->setNull();
-}
-
-void DRTTestRunner::queueNonLoadingScript(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString())
- m_workQueue.addWork(new WorkItemNonLoadingScript(arguments[0].toString()));
- result->setNull();
-}
-
-class WorkItemLoad : public DRTTestRunner::WorkItem {
-public:
- WorkItemLoad(const WebURL& url, const WebString& target)
- : m_url(url)
- , m_target(target) { }
- bool run(TestShell* shell)
- {
- shell->webViewHost()->loadURLForFrame(m_url, m_target);
- return true; // FIXME: Did it really start a navigation?
- }
-
-private:
- WebURL m_url;
- WebString m_target;
-};
-
-void DRTTestRunner::queueLoad(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString()) {
- // FIXME: Implement WebURL::resolve() and avoid GURL.
- GURL currentURL = m_shell->webView()->mainFrame()->document().url();
- GURL fullURL = currentURL.Resolve(arguments[0].toString());
-
- string target = "";
- if (arguments.size() > 1 && arguments[1].isString())
- target = arguments[1].toString();
-
- m_workQueue.addWork(new WorkItemLoad(fullURL, WebString::fromUTF8(target)));
- }
- result->setNull();
-}
-
-class WorkItemLoadHTMLString : public DRTTestRunner::WorkItem {
-public:
- WorkItemLoadHTMLString(const std::string& html, const WebURL& baseURL)
- : m_html(html)
- , m_baseURL(baseURL) { }
- WorkItemLoadHTMLString(const std::string& html, const WebURL& baseURL, const WebURL& unreachableURL)
- : m_html(html)
- , m_baseURL(baseURL)
- , m_unreachableURL(unreachableURL) { }
- bool run(TestShell* shell)
- {
- shell->webView()->mainFrame()->loadHTMLString(
- WebKit::WebData(m_html.data(), m_html.length()), m_baseURL, m_unreachableURL);
- return true;
- }
-
-private:
- std::string m_html;
- WebURL m_baseURL;
- WebURL m_unreachableURL;
-};
-
-void DRTTestRunner::queueLoadHTMLString(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString()) {
- string html = arguments[0].toString();
- WebURL baseURL(GURL(""));
- if (arguments.size() > 1 && arguments[1].isString())
- baseURL = WebURL(GURL(arguments[1].toString()));
- if (arguments.size() > 2 && arguments[2].isString())
- m_workQueue.addWork(new WorkItemLoadHTMLString(html, baseURL, WebURL(GURL(arguments[2].toString()))));
- else
- m_workQueue.addWork(new WorkItemLoadHTMLString(html, baseURL));
- }
- result->setNull();
-}
-
-void DRTTestRunner::reset()
-{
- TestRunner::reset();
- if (m_shell)
- m_shell->webViewHost()->setDeviceScaleFactor(1);
- m_dumpAsText = false;
- m_dumpAsAudio = false;
- m_dumpCreateView = false;
- m_dumpEditingCallbacks = false;
- m_dumpFrameLoadCallbacks = false;
- m_dumpProgressFinishedCallback = false;
- m_dumpUserGestureInFrameLoadCallbacks = false;
- m_dumpResourceLoadCallbacks = false;
- m_dumpResourceRequestCallbacks = false;
- m_dumpResourceResponseMIMETypes = false;
- m_dumpBackForwardList = false;
- m_dumpChildFrameScrollPositions = false;
- m_dumpChildFramesAsText = false;
- m_dumpWindowStatusChanges = false;
- m_dumpSelectionRect = false;
- m_dumpTitleChanges = false;
- m_dumpPermissionClientCallbacks = false;
- m_generatePixelResults = true;
- m_waitUntilDone = false;
- m_canOpenWindows = false;
- m_testRepaint = false;
- m_sweepHorizontally = false;
- m_stopProvisionalFrameLoads = false;
- m_deferMainResourceDataLoad = true;
- m_webHistoryItemCount.set(0);
- m_titleTextDirection.set("ltr");
- m_interceptPostMessage.set(false);
- m_userStyleSheetLocation = WebURL();
- m_isPrinting = false;
-
- webkit_support::SetAcceptAllCookies(false);
-
- // Reset the default quota for each origin to 5MB
- webkit_support::SetDatabaseQuota(5 * 1024 * 1024);
-
- setlocale(LC_ALL, "");
-
- if (m_closeRemainingWindows)
- m_shell->closeRemainingWindows();
- else
- m_closeRemainingWindows = true;
- m_workQueue.reset();
- m_taskList.revokeAll();
- m_shouldStayOnPageAfterHandlingBeforeUnload = false;
-}
-
-void DRTTestRunner::locationChangeDone()
-{
- m_webHistoryItemCount.set(m_shell->navigationEntryCount());
-
- // No more new work after the first complete load.
- m_workQueue.setFrozen(true);
-
- if (!m_waitUntilDone)
- m_workQueue.processWorkSoon();
-}
-
-void DRTTestRunner::policyDelegateDone()
-{
- ASSERT(m_waitUntilDone);
- m_shell->testFinished();
- m_waitUntilDone = false;
-}
-
-void DRTTestRunner::setCanOpenWindows(const CppArgumentList&, CppVariant* result)
-{
- m_canOpenWindows = true;
- result->setNull();
-}
-
-void DRTTestRunner::windowCount(const CppArgumentList&, CppVariant* result)
-{
- result->set(static_cast<int>(m_shell->windowCount()));
-}
-
-void DRTTestRunner::setCloseRemainingWindowsWhenComplete(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_closeRemainingWindows = arguments[0].value.boolValue;
- result->setNull();
-}
-
-void DRTTestRunner::setAlwaysAcceptCookies(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0)
- webkit_support::SetAcceptAllCookies(cppVariantToBool(arguments[0]));
- result->setNull();
-}
-
-void DRTTestRunner::showWebInspector(const CppArgumentList&, CppVariant* result)
-{
- m_shell->showDevTools();
- result->setNull();
-}
-
-void DRTTestRunner::closeWebInspector(const CppArgumentList& args, CppVariant* result)
-{
- m_shell->closeDevTools();
- result->setNull();
-}
-
-void DRTTestRunner::setWindowIsKey(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->setFocus(m_shell->webView(), arguments[0].value.boolValue);
- result->setNull();
-}
-
-void DRTTestRunner::setUserStyleSheetEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->userStyleSheetLocation = arguments[0].value.boolValue ? m_userStyleSheetLocation : WebURL();
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setUserStyleSheetLocation(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString()) {
- m_userStyleSheetLocation = webkit_support::LocalFileToDataURL(
- webkit_support::RewriteLayoutTestsURL(arguments[0].toString()));
- m_shell->preferences()->userStyleSheetLocation = m_userStyleSheetLocation;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setAuthorAndUserStylesEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->authorAndUserStylesEnabled = arguments[0].value.boolValue;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setPopupBlockingEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- bool blockPopups = arguments[0].toBoolean();
- m_shell->preferences()->javaScriptCanOpenWindowsAutomatically = !blockPopups;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setImagesAllowed(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webPermissions()->setImagesAllowed(arguments[0].toBoolean());
- result->setNull();
-}
-
-void DRTTestRunner::setScriptsAllowed(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webPermissions()->setScriptsAllowed(arguments[0].toBoolean());
- result->setNull();
-}
-
-void DRTTestRunner::setStorageAllowed(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webPermissions()->setStorageAllowed(arguments[0].toBoolean());
- result->setNull();
-}
-
-void DRTTestRunner::setPluginsAllowed(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webPermissions()->setPluginsAllowed(arguments[0].toBoolean());
- result->setNull();
-}
-
-void DRTTestRunner::setCustomPolicyDelegate(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- bool enable = arguments[0].value.boolValue;
- bool permissive = false;
- if (arguments.size() > 1 && arguments[1].isBool())
- permissive = arguments[1].value.boolValue;
- m_shell->webViewHost()->setCustomPolicyDelegate(enable, permissive);
- }
- result->setNull();
-}
-
-void DRTTestRunner::waitForPolicyDelegate(const CppArgumentList&, CppVariant* result)
-{
- m_shell->webViewHost()->waitForPolicyDelegate();
- m_waitUntilDone = true;
- result->setNull();
-}
-
-void DRTTestRunner::setWillSendRequestClearHeader(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString()) {
- string header = arguments[0].toString();
- if (!header.empty())
- m_shell->webViewHost()->addClearHeader(String::fromUTF8(header.c_str()));
- }
- result->setNull();
-}
-
-void DRTTestRunner::setWillSendRequestReturnsNullOnRedirect(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webViewHost()->setBlockRedirects(arguments[0].value.boolValue);
- result->setNull();
-}
-
-void DRTTestRunner::setWillSendRequestReturnsNull(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webViewHost()->setRequestReturnNull(arguments[0].value.boolValue);
- result->setNull();
-}
-
-void DRTTestRunner::pathToLocalResource(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() <= 0 || !arguments[0].isString())
- return;
-
- string url = arguments[0].toString();
-#if OS(WINDOWS)
- if (!url.find("/tmp/")) {
- // We want a temp file.
- const unsigned tempPrefixLength = 5;
- size_t bufferSize = MAX_PATH;
- OwnArrayPtr<WCHAR> tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
- DWORD tempLength = ::GetTempPathW(bufferSize, tempPath.get());
- if (tempLength + url.length() - tempPrefixLength + 1 > bufferSize) {
- bufferSize = tempLength + url.length() - tempPrefixLength + 1;
- tempPath = adoptArrayPtr(new WCHAR[bufferSize]);
- tempLength = GetTempPathW(bufferSize, tempPath.get());
- ASSERT(tempLength < bufferSize);
- }
- string resultPath(WebString(tempPath.get(), tempLength).utf8());
- resultPath.append(url.substr(tempPrefixLength));
- result->set(resultPath);
- return;
- }
-#endif
-
- // Some layout tests use file://// which we resolve as a UNC path. Normalize
- // them to just file:///.
- string lowerUrl = url;
- transform(lowerUrl.begin(), lowerUrl.end(), lowerUrl.begin(), ::tolower);
- while (!lowerUrl.find("file:////")) {
- url = url.substr(0, 8) + url.substr(9);
- lowerUrl = lowerUrl.substr(0, 8) + lowerUrl.substr(9);
- }
- result->set(webkit_support::RewriteLayoutTestsURL(url).spec());
-}
-
-void DRTTestRunner::setStopProvisionalFrameLoads(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
- m_stopProvisionalFrameLoads = true;
-}
-
-void DRTTestRunner::setSmartInsertDeleteEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webViewHost()->setSmartInsertDeleteEnabled(arguments[0].value.boolValue);
- result->setNull();
-}
-
-void DRTTestRunner::setSelectTrailingWhitespaceEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webViewHost()->setSelectTrailingWhitespaceEnabled(arguments[0].value.boolValue);
- result->setNull();
-}
-
-void DRTTestRunner::enableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() != 4) {
- result->set(false);
- return;
- }
- int minWidth = cppVariantToInt32(arguments[0]);
- int minHeight = cppVariantToInt32(arguments[1]);
- WebKit::WebSize minSize(minWidth, minHeight);
-
- int maxWidth = cppVariantToInt32(arguments[2]);
- int maxHeight = cppVariantToInt32(arguments[3]);
- WebKit::WebSize maxSize(maxWidth, maxHeight);
-
- m_shell->webView()->enableAutoResizeMode(minSize, maxSize);
- result->set(true);
-}
-
-void DRTTestRunner::disableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() !=2) {
- result->set(false);
- return;
- }
- int newWidth = cppVariantToInt32(arguments[0]);
- int newHeight = cppVariantToInt32(arguments[1]);
- WebKit::WebSize newSize(newWidth, newHeight);
-
- m_shell->webViewHost()->setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
- m_shell->webView()->disableAutoResizeMode();
- m_shell->webView()->resize(newSize);
- result->set(true);
-}
-
-#if ENABLE(NOTIFICATIONS)
-void DRTTestRunner::grantWebNotificationPermission(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() != 1 || !arguments[0].isString()) {
- result->set(false);
- return;
- }
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- m_shell->notificationPresenter()->grantPermission(cppVariantToWebString(arguments[0]));
-#endif
- result->set(true);
-}
-
-void DRTTestRunner::simulateLegacyWebNotificationClick(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() != 1 || !arguments[0].isString()) {
- result->set(false);
- return;
- }
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- if (m_shell->notificationPresenter()->simulateClick(cppVariantToWebString(arguments[0])))
- result->set(true);
- else
-#endif
- result->set(false);
-}
-#endif
-
-void DRTTestRunner::setDeferMainResourceDataLoad(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() == 1)
- m_deferMainResourceDataLoad = cppVariantToBool(arguments[0]);
-}
-
-void DRTTestRunner::dumpSelectionRect(const CppArgumentList& arguments, CppVariant* result)
-{
- m_dumpSelectionRect = true;
- result->setNull();
-}
-
-void DRTTestRunner::display(const CppArgumentList& arguments, CppVariant* result)
-{
- WebViewHost* host = m_shell->webViewHost();
- const WebKit::WebSize& size = m_shell->webView()->size();
- WebRect rect(0, 0, size.width, size.height);
- host->proxy()->setPaintRect(rect);
- host->paintInvalidatedRegion();
- host->displayRepaintMask();
- result->setNull();
-}
-
-void DRTTestRunner::displayInvalidatedRegion(const CppArgumentList& arguments, CppVariant* result)
-{
- WebViewHost* host = m_shell->webViewHost();
- host->paintInvalidatedRegion();
- host->displayRepaintMask();
- result->setNull();
-}
-
-void DRTTestRunner::testRepaint(const CppArgumentList&, CppVariant* result)
-{
- m_testRepaint = true;
- result->setNull();
-}
-
-void DRTTestRunner::repaintSweepHorizontally(const CppArgumentList&, CppVariant* result)
-{
- m_sweepHorizontally = true;
- result->setNull();
-}
-
-void DRTTestRunner::setJavaScriptCanAccessClipboard(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->javaScriptCanAccessClipboard = arguments[0].value.boolValue;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setXSSAuditorEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->XSSAuditorEnabled = arguments[0].value.boolValue;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setAllowUniversalAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->allowUniversalAccessFromFileURLs = arguments[0].value.boolValue;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setAllowDisplayOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webPermissions()->setDisplayingInsecureContentAllowed(arguments[0].toBoolean());
-
- result->setNull();
-}
-
-void DRTTestRunner::setAllowFileAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->allowFileAccessFromFileURLs = arguments[0].value.boolValue;
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setAllowRunningOfInsecureContent(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_shell->webPermissions()->setRunningInsecureContentAllowed(arguments[0].value.boolValue);
-
- result->setNull();
-}
-
-// Sets map based on scriptFontPairs, a collapsed vector of pairs of ISO 15924
-// four-letter script code and font such as:
-// { "Arab", "My Arabic Font", "Grek", "My Greek Font" }
-static void setFontMap(WebPreferences::ScriptFontFamilyMap& map, const Vector<WebString>& scriptFontPairs)
-{
- map.clear();
- size_t i = 0;
- while (i + 1 < scriptFontPairs.size()) {
- const WebString& script = scriptFontPairs[i++];
- const WebString& font = scriptFontPairs[i++];
-
- int32_t code = u_getPropertyValueEnum(UCHAR_SCRIPT, script.utf8().data());
- if (code >= 0 && code < USCRIPT_CODE_LIMIT)
- map.set(static_cast<int>(code), font);
- }
-}
-
-void DRTTestRunner::overridePreference(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 2 || !arguments[0].isString())
- return;
-
- string key = arguments[0].toString();
- CppVariant value = arguments[1];
- WebPreferences* prefs = m_shell->preferences();
- if (key == "WebKitStandardFont")
- prefs->standardFontFamily = cppVariantToWebString(value);
- else if (key == "WebKitFixedFont")
- prefs->fixedFontFamily = cppVariantToWebString(value);
- else if (key == "WebKitSerifFont")
- prefs->serifFontFamily = cppVariantToWebString(value);
- else if (key == "WebKitSansSerifFont")
- prefs->sansSerifFontFamily = cppVariantToWebString(value);
- else if (key == "WebKitCursiveFont")
- prefs->cursiveFontFamily = cppVariantToWebString(value);
- else if (key == "WebKitFantasyFont")
- prefs->fantasyFontFamily = cppVariantToWebString(value);
- else if (key == "WebKitStandardFontMap")
- setFontMap(prefs->standardFontMap, cppVariantToWebStringArray(value));
- else if (key == "WebKitFixedFontMap")
- setFontMap(prefs->fixedFontMap, cppVariantToWebStringArray(value));
- else if (key == "WebKitSerifFontMap")
- setFontMap(prefs->serifFontMap, cppVariantToWebStringArray(value));
- else if (key == "WebKitSansSerifFontMap")
- setFontMap(prefs->sansSerifFontMap, cppVariantToWebStringArray(value));
- else if (key == "WebKitCursiveFontMap")
- setFontMap(prefs->cursiveFontMap, cppVariantToWebStringArray(value));
- else if (key == "WebKitFantasyFontMap")
- setFontMap(prefs->fantasyFontMap, cppVariantToWebStringArray(value));
- else if (key == "WebKitDefaultFontSize")
- prefs->defaultFontSize = cppVariantToInt32(value);
- else if (key == "WebKitDefaultFixedFontSize")
- prefs->defaultFixedFontSize = cppVariantToInt32(value);
- else if (key == "WebKitMinimumFontSize")
- prefs->minimumFontSize = cppVariantToInt32(value);
- else if (key == "WebKitMinimumLogicalFontSize")
- prefs->minimumLogicalFontSize = cppVariantToInt32(value);
- else if (key == "WebKitDefaultTextEncodingName")
- prefs->defaultTextEncodingName = cppVariantToWebString(value);
- else if (key == "WebKitJavaScriptEnabled")
- prefs->javaScriptEnabled = cppVariantToBool(value);
- else if (key == "WebKitWebSecurityEnabled")
- prefs->webSecurityEnabled = cppVariantToBool(value);
- else if (key == "WebKitJavaScriptCanOpenWindowsAutomatically")
- prefs->javaScriptCanOpenWindowsAutomatically = cppVariantToBool(value);
- else if (key == "WebKitSupportsMultipleWindows")
- prefs->supportsMultipleWindows = cppVariantToBool(value);
- else if (key == "WebKitDisplayImagesKey")
- prefs->loadsImagesAutomatically = cppVariantToBool(value);
- else if (key == "WebKitPluginsEnabled")
- prefs->pluginsEnabled = cppVariantToBool(value);
- else if (key == "WebKitDOMPasteAllowedPreferenceKey")
- prefs->DOMPasteAllowed = cppVariantToBool(value);
- else if (key == "WebKitDeveloperExtrasEnabledPreferenceKey")
- prefs->developerExtrasEnabled = cppVariantToBool(value);
- else if (key == "WebKitShrinksStandaloneImagesToFit")
- prefs->shrinksStandaloneImagesToFit = cppVariantToBool(value);
- else if (key == "WebKitTextAreasAreResizable")
- prefs->textAreasAreResizable = cppVariantToBool(value);
- else if (key == "WebKitJavaEnabled")
- prefs->javaEnabled = cppVariantToBool(value);
- else if (key == "WebKitUsesPageCachePreferenceKey")
- prefs->usesPageCache = cppVariantToBool(value);
- else if (key == "WebKitPageCacheSupportsPluginsPreferenceKey")
- prefs->pageCacheSupportsPlugins = cppVariantToBool(value);
- else if (key == "WebKitJavaScriptCanAccessClipboard")
- prefs->javaScriptCanAccessClipboard = cppVariantToBool(value);
- else if (key == "WebKitXSSAuditorEnabled")
- prefs->XSSAuditorEnabled = cppVariantToBool(value);
- else if (key == "WebKitLocalStorageEnabledPreferenceKey")
- prefs->localStorageEnabled = cppVariantToBool(value);
- else if (key == "WebKitOfflineWebApplicationCacheEnabled")
- prefs->offlineWebApplicationCacheEnabled = cppVariantToBool(value);
- else if (key == "WebKitTabToLinksPreferenceKey")
- prefs->tabsToLinks = cppVariantToBool(value);
- else if (key == "WebKitWebGLEnabled")
- prefs->experimentalWebGLEnabled = cppVariantToBool(value);
- else if (key == "WebKitCSSRegionsEnabled")
- prefs->experimentalCSSRegionsEnabled = cppVariantToBool(value);
- else if (key == "WebKitCSSGridLayoutEnabled")
- prefs->experimentalCSSGridLayoutEnabled = cppVariantToBool(value);
- else if (key == "WebKitHyperlinkAuditingEnabled")
- prefs->hyperlinkAuditingEnabled = cppVariantToBool(value);
- else if (key == "WebKitEnableCaretBrowsing")
- prefs->caretBrowsingEnabled = cppVariantToBool(value);
- else if (key == "WebKitAllowDisplayingInsecureContent")
- prefs->allowDisplayOfInsecureContent = cppVariantToBool(value);
- else if (key == "WebKitAllowRunningInsecureContent")
- prefs->allowRunningOfInsecureContent = cppVariantToBool(value);
- else if (key == "WebKitCSSCustomFilterEnabled")
- prefs->cssCustomFilterEnabled = cppVariantToBool(value);
- else if (key == "WebKitShouldRespectImageOrientation")
- prefs->shouldRespectImageOrientation = cppVariantToBool(value);
- else if (key == "WebKitWebAudioEnabled") {
- ASSERT(cppVariantToBool(value));
- } else {
- string message("Invalid name for preference: ");
- message.append(key);
- printErrorMessage(message);
- }
- m_shell->applyPreferences();
-}
-
-void DRTTestRunner::clearAllDatabases(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- webkit_support::ClearAllDatabases();
-}
-
-void DRTTestRunner::setDatabaseQuota(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if ((arguments.size() >= 1) && arguments[0].isNumber())
- webkit_support::SetDatabaseQuota(arguments[0].toInt32());
-}
-
-void DRTTestRunner::setPOSIXLocale(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() == 1 && arguments[0].isString())
- setlocale(LC_ALL, arguments[0].toString().c_str());
-}
-
-void DRTTestRunner::setPrinting(const CppArgumentList& arguments, CppVariant* result)
-{
- setIsPrinting(true);
- result->setNull();
-}
-
-void DRTTestRunner::numberOfPendingGeolocationPermissionRequests(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- Vector<WebViewHost*> windowList = m_shell->windowList();
- int numberOfRequests = 0;
- for (size_t i = 0; i < windowList.size(); i++)
- numberOfRequests += windowList[i]->geolocationClientMock()->numberOfPendingPermissionRequests();
- result->set(numberOfRequests);
-}
-
-void DRTTestRunner::evaluateInWebInspector(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
- return;
- m_shell->drtDevToolsAgent()->evaluateInWebInspector(arguments[0].toInt32(), arguments[1].toString());
-}
-
-void DRTTestRunner::setMockDeviceOrientation(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 6 || !arguments[0].isBool() || !arguments[1].isNumber() || !arguments[2].isBool() || !arguments[3].isNumber() || !arguments[4].isBool() || !arguments[5].isNumber())
- return;
-
- WebDeviceOrientation orientation;
- orientation.setNull(false);
- if (arguments[0].toBoolean())
- orientation.setAlpha(arguments[1].toDouble());
- if (arguments[2].toBoolean())
- orientation.setBeta(arguments[3].toDouble());
- if (arguments[4].toBoolean())
- orientation.setGamma(arguments[5].toDouble());
-
- // Note that we only call setOrientation on the main page's mock since this is all that the
- // tests require. If necessary, we could get a list of WebViewHosts from the TestShell and
- // call setOrientation on each DeviceOrientationClientMock.
- m_shell->webViewHost()->deviceOrientationClientMock()->setOrientation(orientation);
-}
-
-// FIXME: For greater test flexibility, we should be able to set each page's geolocation mock individually.
-// https://bugs.webkit.org/show_bug.cgi?id=52368
-void DRTTestRunner::setGeolocationPermission(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 1 || !arguments[0].isBool())
- return;
- Vector<WebViewHost*> windowList = m_shell->windowList();
- for (size_t i = 0; i < windowList.size(); i++)
- windowList[i]->geolocationClientMock()->setPermission(arguments[0].toBoolean());
-}
-
-void DRTTestRunner::setMockGeolocationPosition(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 3 || !arguments[0].isNumber() || !arguments[1].isNumber() || !arguments[2].isNumber())
- return;
- Vector<WebViewHost*> windowList = m_shell->windowList();
- for (size_t i = 0; i < windowList.size(); i++)
- windowList[i]->geolocationClientMock()->setPosition(arguments[0].toDouble(), arguments[1].toDouble(), arguments[2].toDouble());
-}
-
-void DRTTestRunner::setMockGeolocationPositionUnavailableError(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 1 || !arguments[0].isString())
- return;
- Vector<WebViewHost*> windowList = m_shell->windowList();
- // FIXME: Benjamin
- for (size_t i = 0; i < windowList.size(); i++)
- windowList[i]->geolocationClientMock()->setPositionUnavailableError(cppVariantToWebString(arguments[0]));
-}
-
-#if ENABLE(INPUT_SPEECH)
-void DRTTestRunner::addMockSpeechInputResult(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isNumber() || !arguments[2].isString())
- return;
-
- if (MockWebSpeechInputController* controller = m_shell->webViewHost()->speechInputControllerMock())
- controller->addMockRecognitionResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble(), cppVariantToWebString(arguments[2]));
-}
-
-void DRTTestRunner::setMockSpeechInputDumpRect(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 1 || !arguments[0].isBool())
- return;
-
- if (MockWebSpeechInputController* controller = m_shell->webViewHost()->speechInputControllerMock())
- controller->setDumpRect(arguments[0].value.boolValue);
-}
-#endif
-
-#if ENABLE(SCRIPTED_SPEECH)
-void DRTTestRunner::addMockSpeechRecognitionResult(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isNumber())
- return;
-
- if (MockWebSpeechRecognizer* recognizer = m_shell->webViewHost()->mockSpeechRecognizer())
- recognizer->addMockResult(cppVariantToWebString(arguments[0]), arguments[1].toDouble());
-}
-
-void DRTTestRunner::setMockSpeechRecognitionError(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isString())
- return;
-
- if (MockWebSpeechRecognizer* recognizer = m_shell->webViewHost()->mockSpeechRecognizer())
- recognizer->setError(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
-}
-
-void DRTTestRunner::wasMockSpeechRecognitionAborted(const CppArgumentList&, CppVariant* result)
-{
- result->set(false);
- if (MockWebSpeechRecognizer* recognizer = m_shell->webViewHost()->mockSpeechRecognizer())
- result->set(recognizer->wasAborted());
-}
-#endif
-
-void DRTTestRunner::setShouldStayOnPageAfterHandlingBeforeUnload(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() == 1 && arguments[0].isBool())
- m_shouldStayOnPageAfterHandlingBeforeUnload = arguments[0].toBoolean();
-
- result->setNull();
-}
-
-void DRTTestRunner::sendWebIntentResponse(const CppArgumentList& arguments, CppVariant* result)
-{
- v8::HandleScope scope;
- v8::Local<v8::Context> ctx = m_shell->webView()->mainFrame()->mainWorldScriptContext();
- result->set(m_shell->webView()->mainFrame()->selectionAsMarkup().utf8());
- v8::Context::Scope cscope(ctx);
-
- WebKit::WebIntentRequest* request = m_shell->webViewHost()->currentIntentRequest();
- if (request->isNull())
- return;
-
- if (arguments.size() == 1) {
- WebKit::WebCString reply = cppVariantToWebString(arguments[0]).utf8();
- v8::Handle<v8::Value> v8value = v8::String::New(reply.data(), reply.length());
- request->postResult(WebKit::WebSerializedScriptValue::serialize(v8value));
- } else {
- v8::Handle<v8::Value> v8value = v8::String::New("ERROR");
- request->postFailure(WebKit::WebSerializedScriptValue::serialize(v8value));
- }
- result->setNull();
-}
-
-void DRTTestRunner::deliverWebIntent(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 3)
- return;
-
- v8::HandleScope scope;
- v8::Local<v8::Context> ctx = m_shell->webView()->mainFrame()->mainWorldScriptContext();
- result->set(m_shell->webView()->mainFrame()->selectionAsMarkup().utf8());
- v8::Context::Scope cscope(ctx);
-
- WebString action = cppVariantToWebString(arguments[0]);
- WebString type = cppVariantToWebString(arguments[1]);
- WebKit::WebCString data = cppVariantToWebString(arguments[2]).utf8();
- WebSerializedScriptValue serializedData = WebSerializedScriptValue::serialize(
- v8::String::New(data.data(), data.length()));
-
- WebIntent intent = WebIntent::create(action, type, serializedData.toString(), WebVector<WebString>(), WebVector<WebString>());
-
- m_shell->webView()->mainFrame()->deliverIntent(intent, 0, m_intentClient.get());
-}
-
-class InvokeCallbackTask : public WebMethodTask<DRTTestRunner> {
-public:
- InvokeCallbackTask(DRTTestRunner* object, PassOwnArrayPtr<CppVariant> callbackArguments, uint32_t numberOfArguments)
- : WebMethodTask<DRTTestRunner>(object)
- , m_callbackArguments(callbackArguments)
- , m_numberOfArguments(numberOfArguments)
- {
- }
-
- virtual void runIfValid()
- {
- CppVariant invokeResult;
- m_callbackArguments[0].invokeDefault(m_callbackArguments.get(), m_numberOfArguments, invokeResult);
- }
-
-private:
- OwnArrayPtr<CppVariant> m_callbackArguments;
- uint32_t m_numberOfArguments;
-};
-
-void DRTTestRunner::setBackingScaleFactor(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isObject())
- return;
-
- float value = arguments[0].value.doubleValue;
- m_shell->webViewHost()->setDeviceScaleFactor(value);
-
- OwnArrayPtr<CppVariant> callbackArguments = adoptArrayPtr(new CppVariant[1]);
- callbackArguments[0].set(arguments[1]);
- result->setNull();
- postTask(new InvokeCallbackTask(this, callbackArguments.release(), 1));
-}
-
-void DRTTestRunner::setPluginsEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool()) {
- m_shell->preferences()->pluginsEnabled = arguments[0].toBoolean();
- m_shell->applyPreferences();
- }
- result->setNull();
-}
-
-void DRTTestRunner::setAudioData(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 1 || !arguments[0].isObject())
- return;
-
- // Check that passed-in object is, in fact, an ArrayBufferView.
- NPObject* npobject = NPVARIANT_TO_OBJECT(arguments[0]);
- if (!npobject)
- return;
- if (!WebBindings::getArrayBufferView(npobject, &m_audioData))
- return;
-
- setShouldDumpAsAudio(true);
-}
-
-#if ENABLE(POINTER_LOCK)
-void DRTTestRunner::didAcquirePointerLock(const CppArgumentList&, CppVariant* result)
-{
- m_shell->webViewHost()->didAcquirePointerLock();
- result->setNull();
-}
-
-void DRTTestRunner::didNotAcquirePointerLock(const CppArgumentList&, CppVariant* result)
-{
- m_shell->webViewHost()->didNotAcquirePointerLock();
- result->setNull();
-}
-
-void DRTTestRunner::didLosePointerLock(const CppArgumentList&, CppVariant* result)
-{
- m_shell->webViewHost()->didLosePointerLock();
- result->setNull();
-}
-
-void DRTTestRunner::setPointerLockWillRespondAsynchronously(const CppArgumentList&, CppVariant* result)
-{
- m_shell->webViewHost()->setPointerLockWillRespondAsynchronously();
- result->setNull();
-}
-
-void DRTTestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, CppVariant* result)
-{
- m_shell->webViewHost()->setPointerLockWillFailSynchronously();
- result->setNull();
-}
-#endif
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.h b/Tools/DumpRenderTree/chromium/DRTTestRunner.h
deleted file mode 100644
index 49f27c36b..000000000
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.h
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
- * Copyright (C) 2012 Apple 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.
- */
-
-/*
- DRTTestRunner class:
- Bound to a JavaScript window.testRunner object using the
- CppBoundClass::bindToJavascript(), this allows layout tests that are run in
- the test_shell (or, in principle, any web page loaded into a client app built
- with this class) to control various aspects of how the tests are run and what
- sort of output they produce.
-*/
-
-#ifndef DRTTestRunner_h
-#define DRTTestRunner_h
-
-#include "TestRunner/src/TestRunner.h"
-#include "WebDeliveredIntentClient.h"
-#include "WebTask.h"
-#include "WebTextDirection.h"
-#include "platform/WebArrayBufferView.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include <wtf/Deque.h>
-#include <wtf/OwnPtr.h>
-
-namespace WebKit {
-class WebGeolocationClientMock;
-}
-
-namespace webkit_support {
-class ScopedTempDirectory;
-}
-
-
-class TestShell;
-
-using WebTestRunner::CppArgumentList;
-using WebTestRunner::CppVariant;
-
-class DRTTestRunner : public WebTestRunner::TestRunner {
-public:
- // Builds the property and method lists needed to bind this class to a JS
- // object.
- DRTTestRunner(TestShell*);
-
- ~DRTTestRunner();
-
- // This function sets a flag that tells the test_shell to dump pages as
- // plain text, rather than as a text representation of the renderer's state.
- // It takes an optional argument, whether to dump pixels results or not.
- void dumpAsText(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print a line of
- // descriptive text for each editing command. It takes no arguments, and
- // ignores any that may be present.
- void dumpEditingCallbacks(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print a line of
- // descriptive text for each frame load callback. It takes no arguments, and
- // ignores any that may be present.
- void dumpFrameLoadCallbacks(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print a line of
- // descriptive text for the progress finished callback. It takes no
- // arguments, and ignores any that may be present.
- void dumpProgressFinishedCallback(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print a line of
- // user gesture status text for some frame load callbacks. It takes no
- // arguments, and ignores any that may be present.
- void dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print out a text
- // representation of the back/forward list. It ignores all arguments.
- void dumpBackForwardList(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print out the
- // scroll offsets of the child frames. It ignores all.
- void dumpChildFrameScrollPositions(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to recursively
- // dump all frames as plain text if the dumpAsText flag is set.
- // It takes no arguments, and ignores any that may be present.
- void dumpChildFramesAsText(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to dump a descriptive
- // line for each resource load callback. It takes no arguments, and ignores
- // any that may be present.
- void dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to print a line of
- // descriptive text for each element that requested a resource. It takes no
- // arguments, and ignores any that may be present.
- void dumpResourceRequestCallbacks(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to dump the MIME type
- // for each resource that was loaded. It takes no arguments, and ignores any
- // that may be present.
- void dumpResourceResponseMIMETypes(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to dump all calls
- // to window.status().
- // It takes no arguments, and ignores any that may be present.
- void dumpWindowStatusChanges(const CppArgumentList&, CppVariant*);
-
- // This function sets a flag that tells the test_shell to dump all calls to
- // WebViewClient::createView().
- // It takes no arguments, and ignores any that may be present.
- void dumpCreateView(const CppArgumentList&, CppVariant*);
-
- // Functions for dealing with windows. By default we block all new windows.
- void windowCount(const CppArgumentList&, CppVariant*);
- void setCanOpenWindows(const CppArgumentList&, CppVariant*);
- void setCloseRemainingWindowsWhenComplete(const CppArgumentList&, CppVariant*);
-
- // By default, tests end when page load is complete. These methods are used
- // to delay the completion of the test until notifyDone is called.
- void waitUntilDone(const CppArgumentList&, CppVariant*);
- void notifyDone(const CppArgumentList&, CppVariant*);
-
- // Methods for adding actions to the work queue. Used in conjunction with
- // waitUntilDone/notifyDone above.
- void queueBackNavigation(const CppArgumentList&, CppVariant*);
- void queueForwardNavigation(const CppArgumentList&, CppVariant*);
- void queueReload(const CppArgumentList&, CppVariant*);
- void queueLoadingScript(const CppArgumentList&, CppVariant*);
- void queueNonLoadingScript(const CppArgumentList&, CppVariant*);
- void queueLoad(const CppArgumentList&, CppVariant*);
- void queueLoadHTMLString(const CppArgumentList&, CppVariant*);
-
- // Changes the cookie policy from the default to allow all cookies.
- void setAlwaysAcceptCookies(const CppArgumentList&, CppVariant*);
-
- // Shows DevTools window.
- void showWebInspector(const CppArgumentList&, CppVariant*);
- void closeWebInspector(const CppArgumentList&, CppVariant*);
-
- // Gives focus to the window.
- void setWindowIsKey(const CppArgumentList&, CppVariant*);
-
-
- // Passes through to WebPreferences which allows the user to have a custom
- // style sheet.
- void setUserStyleSheetEnabled(const CppArgumentList&, CppVariant*);
- void setUserStyleSheetLocation(const CppArgumentList&, CppVariant*);
-
- // Passes this preference through to WebSettings.
- void setAuthorAndUserStylesEnabled(const CppArgumentList&, CppVariant*);
-
- // Causes navigation actions just printout the intended navigation instead
- // of taking you to the page. This is used for cases like mailto, where you
- // don't actually want to open the mail program.
- void setCustomPolicyDelegate(const CppArgumentList&, CppVariant*);
-
- // Delays completion of the test until the policy delegate runs.
- void waitForPolicyDelegate(const CppArgumentList&, CppVariant*);
-
- // Causes WillSendRequest to clear certain headers.
- void setWillSendRequestClearHeader(const CppArgumentList&, CppVariant*);
-
- // Causes WillSendRequest to block redirects.
- void setWillSendRequestReturnsNullOnRedirect(const CppArgumentList&, CppVariant*);
-
- // Causes WillSendRequest to return an empty request.
- void setWillSendRequestReturnsNull(const CppArgumentList&, CppVariant*);
-
- // Converts a URL starting with file:///tmp/ to the local mapping.
- void pathToLocalResource(const CppArgumentList&, CppVariant*);
-
- // Set the WebPreference that controls webkit's popup blocking.
- void setPopupBlockingEnabled(const CppArgumentList&, CppVariant*);
-
- // If true, causes provisional frame loads to be stopped for the remainder of
- // the test.
- void setStopProvisionalFrameLoads(const CppArgumentList&, CppVariant*);
-
- // Enable or disable smart insert/delete. This is enabled by default.
- void setSmartInsertDeleteEnabled(const CppArgumentList&, CppVariant*);
-
- // Enable or disable trailing whitespace selection on double click.
- void setSelectTrailingWhitespaceEnabled(const CppArgumentList&, CppVariant*);
- void enableAutoResizeMode(const CppArgumentList&, CppVariant*);
- void disableAutoResizeMode(const CppArgumentList&, CppVariant*);
- void dumpSelectionRect(const CppArgumentList&, CppVariant*);
-
-#if ENABLE(NOTIFICATIONS)
- // Grants permission for desktop notifications to an origin
- void grantWebNotificationPermission(const CppArgumentList&, CppVariant*);
- // Simulates a click on a desktop notification.
- void simulateLegacyWebNotificationClick(const CppArgumentList&, CppVariant*);
-#endif
-
- void setDeferMainResourceDataLoad(const CppArgumentList&, CppVariant*);
-
- // Deals with Web Audio WAV file data.
- void setAudioData(const CppArgumentList&, CppVariant*);
- const WebKit::WebArrayBufferView& audioData() const { return m_audioData; }
-
- void dumpTitleChanges(const CppArgumentList&, CppVariant*);
- void display(const CppArgumentList&, CppVariant*);
- void displayInvalidatedRegion(const CppArgumentList&, CppVariant*);
- void testRepaint(const CppArgumentList&, CppVariant*);
- void repaintSweepHorizontally(const CppArgumentList&, CppVariant*);
-
- void setJavaScriptCanAccessClipboard(const CppArgumentList&, CppVariant*);
- void setXSSAuditorEnabled(const CppArgumentList&, CppVariant*);
- void overridePreference(const CppArgumentList&, CppVariant*);
- void setAllowUniversalAccessFromFileURLs(const CppArgumentList&, CppVariant*);
- void setAllowDisplayOfInsecureContent(const CppArgumentList&, CppVariant*);
- void setAllowFileAccessFromFileURLs(const CppArgumentList&, CppVariant*);
- void setAllowRunningOfInsecureContent(const CppArgumentList&, CppVariant*);
-
-
- // Clears all databases.
- void clearAllDatabases(const CppArgumentList&, CppVariant*);
- // Sets the default quota for all origins
- void setDatabaseQuota(const CppArgumentList&, CppVariant*);
-
- // Calls setlocale(LC_ALL, ...) for a specified locale.
- // Resets between tests.
- void setPOSIXLocale(const CppArgumentList&, CppVariant*);
-
- // Causes layout to happen as if targetted to printed pages.
- void setPrinting(const CppArgumentList&, CppVariant*);
-
- // Gets the number of geolocation permissions requests pending.
- void numberOfPendingGeolocationPermissionRequests(const CppArgumentList&, CppVariant*);
-
- // Allows layout tests to exec scripts at WebInspector side.
- void evaluateInWebInspector(const CppArgumentList&, CppVariant*);
-
- // DeviceOrientation related functions
- void setMockDeviceOrientation(const CppArgumentList&, CppVariant*);
-
- // Geolocation related functions.
- void setGeolocationPermission(const CppArgumentList&, CppVariant*);
- void setMockGeolocationPosition(const CppArgumentList&, CppVariant*);
- void setMockGeolocationPositionUnavailableError(const CppArgumentList&, CppVariant*);
-
- // Speech input related functions.
-#if ENABLE(INPUT_SPEECH)
- void addMockSpeechInputResult(const CppArgumentList&, CppVariant*);
- void setMockSpeechInputDumpRect(const CppArgumentList&, CppVariant*);
-#endif
-#if ENABLE(SCRIPTED_SPEECH)
- void addMockSpeechRecognitionResult(const CppArgumentList&, CppVariant*);
- void setMockSpeechRecognitionError(const CppArgumentList&, CppVariant*);
- void wasMockSpeechRecognitionAborted(const CppArgumentList&, CppVariant*);
-#endif
-
- // WebPermissionClient related.
- void setImagesAllowed(const CppArgumentList&, CppVariant*);
- void setScriptsAllowed(const CppArgumentList&, CppVariant*);
- void setStorageAllowed(const CppArgumentList&, CppVariant*);
- void setPluginsAllowed(const CppArgumentList&, CppVariant*);
- void dumpPermissionClientCallbacks(const CppArgumentList&, CppVariant*);
-
- // Enable or disable plugins.
- void setPluginsEnabled(const CppArgumentList&, CppVariant*);
-
- void setShouldStayOnPageAfterHandlingBeforeUnload(const CppArgumentList&, CppVariant*);
-
-#if ENABLE(POINTER_LOCK)
- void didAcquirePointerLock(const CppArgumentList&, CppVariant*);
- void didNotAcquirePointerLock(const CppArgumentList&, CppVariant*);
- void didLosePointerLock(const CppArgumentList&, CppVariant*);
- void setPointerLockWillFailSynchronously(const CppArgumentList&, CppVariant*);
- void setPointerLockWillRespondAsynchronously(const CppArgumentList&, CppVariant*);
-#endif
-
- // Expects one string argument for sending successful result, zero
- // arguments for sending a failure result.
- void sendWebIntentResponse(const CppArgumentList&, CppVariant*);
-
- // Cause the web intent to be delivered to this context.
- void deliverWebIntent(const CppArgumentList&, CppVariant*);
-
- // Used to set the device scale factor.
- void setBackingScaleFactor(const CppArgumentList&, CppVariant*);
-
-public:
- // The following methods are not exposed to JavaScript.
- void setWorkQueueFrozen(bool frozen) { m_workQueue.setFrozen(frozen); }
-
- bool shouldDumpAsAudio() const { return m_dumpAsAudio; }
- void setShouldDumpAsAudio(bool dumpAsAudio) { m_dumpAsAudio = dumpAsAudio; }
- bool shouldDumpAsText() { return m_dumpAsText; }
- void setShouldDumpAsText(bool value) { m_dumpAsText = value; }
- bool shouldDumpEditingCallbacks() { return m_dumpEditingCallbacks; }
- bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; }
- void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
- bool shouldDumpProgressFinishedCallback() { return m_dumpProgressFinishedCallback; }
- void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; }
- bool shouldDumpUserGestureInFrameLoadCallbacks() { return m_dumpUserGestureInFrameLoadCallbacks; }
- void setShouldDumpUserGestureInFrameLoadCallbacks(bool value) { m_dumpUserGestureInFrameLoadCallbacks = value; }
- bool shouldDumpResourceLoadCallbacks() {return m_dumpResourceLoadCallbacks; }
- void setShouldDumpResourceRequestCallbacks(bool value) { m_dumpResourceRequestCallbacks = value; }
- bool shouldDumpResourceRequestCallbacks() { return m_dumpResourceRequestCallbacks; }
- void setShouldDumpResourceResponseMIMETypes(bool value) { m_dumpResourceResponseMIMETypes = value; }
- bool shouldDumpResourceResponseMIMETypes() {return m_dumpResourceResponseMIMETypes; }
- bool shouldDumpStatusCallbacks() { return m_dumpWindowStatusChanges; }
- bool shouldDumpSelectionRect() { return m_dumpSelectionRect; }
- bool shouldDumpBackForwardList() { return m_dumpBackForwardList; }
- bool shouldDumpTitleChanges() { return m_dumpTitleChanges; }
- bool shouldDumpPermissionClientCallbacks() { return m_dumpPermissionClientCallbacks; }
- bool shouldDumpChildFrameScrollPositions() { return m_dumpChildFrameScrollPositions; }
- bool shouldDumpChildFramesAsText() { return m_dumpChildFramesAsText; }
- bool shouldGeneratePixelResults() { return m_generatePixelResults; }
- void setShouldGeneratePixelResults(bool value) { m_generatePixelResults = value; }
- bool shouldDumpCreateView() { return m_dumpCreateView; }
- bool canOpenWindows() { return m_canOpenWindows; }
- bool stopProvisionalFrameLoads() { return m_stopProvisionalFrameLoads; }
- bool deferMainResourceDataLoad() { return m_deferMainResourceDataLoad; }
- void setShowDebugLayerTree(bool value) { m_showDebugLayerTree = value; }
- void setTitleTextDirection(WebKit::WebTextDirection dir)
- {
- m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr" : "rtl");
- }
-
- bool shouldInterceptPostMessage()
- {
- return m_interceptPostMessage.isBool() && m_interceptPostMessage.toBoolean();
- }
-
- void setIsPrinting(bool value) { m_isPrinting = value; }
- bool isPrinting() { return m_isPrinting; }
-
- bool testRepaint() const { return m_testRepaint; }
- bool sweepHorizontally() const { return m_sweepHorizontally; }
-
- // Called by the webview delegate when the toplevel frame load is done.
- void locationChangeDone();
-
- // Called by the webview delegate when the policy delegate runs if the
- // waitForPolicyDelegate was called.
- void policyDelegateDone();
-
- // Reinitializes all static values. The reset() method should be called
- // before the start of each test (currently from TestShell::runFileTest).
- void reset();
-
- // A single item in the work queue.
- class WorkItem {
- public:
- virtual ~WorkItem() { }
-
- // Returns true if this started a load.
- virtual bool run(TestShell*) = 0;
- };
-
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
- bool shouldStayOnPageAfterHandlingBeforeUnload() const { return m_shouldStayOnPageAfterHandlingBeforeUnload; }
-
-private:
- friend class WorkItem;
- friend class WorkQueue;
-
- // Helper class for managing events queued by methods like queueLoad or
- // queueScript.
- class WorkQueue {
- public:
- WorkQueue(DRTTestRunner* controller) : m_frozen(false), m_controller(controller) { }
- virtual ~WorkQueue();
- void processWorkSoon();
-
- // Reset the state of the class between tests.
- void reset();
-
- void addWork(WorkItem*);
-
- void setFrozen(bool frozen) { m_frozen = frozen; }
- bool isEmpty() { return m_queue.isEmpty(); }
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
- private:
- void processWork();
- class WorkQueueTask: public WebTestRunner::WebMethodTask<WorkQueue> {
- public:
- WorkQueueTask(WorkQueue* object): WebTestRunner::WebMethodTask<WorkQueue>(object) { }
- virtual void runIfValid() { m_object->processWork(); }
- };
-
- WebTestRunner::WebTaskList m_taskList;
- Deque<WorkItem*> m_queue;
- bool m_frozen;
- DRTTestRunner* m_controller;
- };
- void completeNotifyDone(bool isTimeout);
- class NotifyDoneTimedOutTask: public WebTestRunner::WebMethodTask<DRTTestRunner> {
- public:
- NotifyDoneTimedOutTask(DRTTestRunner* object): WebTestRunner::WebMethodTask<DRTTestRunner>(object) { }
- virtual void runIfValid() { m_object->completeNotifyDone(true); }
- };
-
- // Used for test timeouts.
- WebTestRunner::WebTaskList m_taskList;
-
- // Non-owning pointer. The DRTTestRunner is owned by the host.
- TestShell* m_shell;
-
- // If true, the test_shell will produce a plain text dump rather than a
- // text representation of the renderer.
- bool m_dumpAsText;
-
- // If true, the test_shell will output a base64 encoded WAVE file.
- bool m_dumpAsAudio;
-
- // If true, the test_shell will write a descriptive line for each editing
- // command.
- bool m_dumpEditingCallbacks;
-
- // If true, the test_shell will draw the bounds of the current selection rect
- // taking possible transforms of the selection rect into account.
- bool m_dumpSelectionRect;
-
- // If true, the test_shell will output a descriptive line for each frame
- // load callback.
- bool m_dumpFrameLoadCallbacks;
-
- // If true, the test_shell will output a descriptive line for the progress
- // finished callback.
- bool m_dumpProgressFinishedCallback;
-
- // If true, the test_shell will output a line of the user gesture status
- // text for some frame load callbacks.
- bool m_dumpUserGestureInFrameLoadCallbacks;
-
- // If true, the test_shell will output a descriptive line for each resource
- // load callback.
- bool m_dumpResourceLoadCallbacks;
-
- // If true, the test_shell will output a descriptive line for each resource
- // request callback.
- bool m_dumpResourceRequestCallbacks;
-
- // If true, the test_shell will output the MIME type for each resource that
- // was loaded.
- bool m_dumpResourceResponseMIMETypes;
-
- // If true, the test_shell will produce a dump of the back forward list as
- // well.
- bool m_dumpBackForwardList;
-
- // If true, the test_shell will print out the child frame scroll offsets as
- // well.
- bool m_dumpChildFrameScrollPositions;
-
- // If true and if dump_as_text_ is true, the test_shell will recursively
- // dump all frames as plain text.
- bool m_dumpChildFramesAsText;
-
- // If true, the test_shell will dump all changes to window.status.
- bool m_dumpWindowStatusChanges;
-
- // If true, output a message when the page title is changed.
- bool m_dumpTitleChanges;
-
- // If true, output a descriptive line each time a permission client
- // callback is invoked. Currently only implemented for allowImage.
- bool m_dumpPermissionClientCallbacks;
-
- // If true, the test_shell will generate pixel results in dumpAsText mode
- bool m_generatePixelResults;
-
- // If true, output a descriptive line each time WebViewClient::createView
- // is invoked.
- bool m_dumpCreateView;
-
- // If true, new windows can be opened via javascript or by plugins. By
- // default, set to false and can be toggled to true using
- // setCanOpenWindows().
- bool m_canOpenWindows;
-
- // When reset is called, go through and close all but the main test shell
- // window. By default, set to true but toggled to false using
- // setCloseRemainingWindowsWhenComplete().
- bool m_closeRemainingWindows;
-
- // If true, pixel dump will be produced as a series of 1px-tall, view-wide
- // individual paints over the height of the view.
- bool m_testRepaint;
- // If true and test_repaint_ is true as well, pixel dump will be produced as
- // a series of 1px-wide, view-tall paints across the width of the view.
- bool m_sweepHorizontally;
-
- // If true, stops provisional frame loads during the
- // DidStartProvisionalLoadForFrame callback.
- bool m_stopProvisionalFrameLoads;
-
- // If true, don't dump output until notifyDone is called.
- bool m_waitUntilDone;
-
- // If false, all new requests will not defer the main resource data load.
- bool m_deferMainResourceDataLoad;
-
- // If true, we will show extended information in the graphics layer tree.
- bool m_showDebugLayerTree;
-
- // If true, layout is to target printed pages.
- bool m_isPrinting;
-
- WorkQueue m_workQueue;
-
- // Bound variable counting the number of top URLs visited.
- CppVariant m_webHistoryItemCount;
-
- // Bound variable tracking the directionality of the <title> tag.
- CppVariant m_titleTextDirection;
-
- // Bound variable to set whether postMessages should be intercepted or not
- CppVariant m_interceptPostMessage;
-
- WebKit::WebURL m_userStyleSheetLocation;
-
- // WAV audio data is stored here.
- WebKit::WebArrayBufferView m_audioData;
-
- // Mock object for testing delivering web intents.
- OwnPtr<WebKit::WebDeliveredIntentClient> m_intentClient;
-
- bool m_shouldStayOnPageAfterHandlingBeforeUnload;
-};
-
-#endif // DRTTestRunner_h
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
deleted file mode 100644
index bbd16af32..000000000
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "DumpRenderTree.h"
-
-#include "MockWebKitPlatformSupport.h"
-#include "TestShell.h"
-#include "webkit/support/webkit_support.h"
-#include <public/WebCompositorSupport.h>
-#include <v8/include/v8-testing.h>
-#include <v8/include/v8.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/Vector.h>
-
-using namespace std;
-
-static const char optionComplexText[] = "--complex-text";
-static const char optionDumpPixels[] = "--pixel-tests";
-static const char optionDumpPixelsShortForm[] = "-p";
-static const char optionNotree[] = "--notree";
-static const char optionThreaded[] = "--threaded";
-static const char optionDebugRenderTree[] = "--debug-render-tree";
-static const char optionDebugLayerTree[] = "--debug-layer-tree";
-
-static const char optionAllowExternalPages[] = "--allow-external-pages";
-static const char optionStartupDialog[] = "--testshell-startup-dialog";
-static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-deps";
-
-static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
-static const char optionEnableSoftwareCompositing[] = "--enable-software-compositing";
-static const char optionEnableThreadedCompositing[] = "--enable-threaded-compositing";
-static const char optionForceCompositingMode[] = "--force-compositing-mode";
-static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
-static const char optionEnableDeferred2DCanvas[] = "--enable-deferred-2d-canvas";
-static const char optionEnableAcceleratedPainting[] = "--enable-accelerated-painting";
-static const char optionEnableAcceleratedCompositingForVideo[] = "--enable-accelerated-video";
-static const char optionEnableAcceleratedFixedPosition[] = "--enable-accelerated-fixed-position";
-static const char optionUseGraphicsContext3DImplementation[] = "--use-graphics-context-3d-implementation=";
-static const char optionEnablePerTilePainting[] = "--enable-per-tile-painting";
-static const char optionEnableDeferredImageDecoding[] = "--enable-deferred-image-decoding";
-
-static const char optionStressOpt[] = "--stress-opt";
-static const char optionStressDeopt[] = "--stress-deopt";
-static const char optionJavaScriptFlags[] = "--js-flags=";
-static const char optionEncodeBinary[] = "--encode-binary";
-static const char optionNoTimeout[] = "--no-timeout";
-static const char optionWebCoreLogChannels[] = "--webcore-log-channels=";
-
-class WebKitSupportTestEnvironment {
-public:
- WebKitSupportTestEnvironment()
- {
- m_mockPlatform = MockWebKitPlatformSupport::create();
- webkit_support::SetUpTestEnvironment(m_mockPlatform.get());
- }
- ~WebKitSupportTestEnvironment()
- {
- webkit_support::TearDownTestEnvironment();
- }
-private:
- OwnPtr<MockWebKitPlatformSupport> m_mockPlatform;
-};
-
-static void runTest(TestShell& shell, TestParams& params, const string& inputLine, const bool forceDumpPixels)
-{
- int oldTimeoutMsec = shell.layoutTestTimeout();
- TestCommand command = parseInputLine(inputLine);
- params.testUrl = webkit_support::CreateURLForPathOrURL(command.pathOrURL);
- params.pixelHash = command.shouldDumpPixels;
- webkit_support::SetCurrentDirectoryForFileURL(params.testUrl);
- v8::V8::SetFlagsFromString(shell.javaScriptFlags().c_str(), shell.javaScriptFlags().length());
- if (shell.stressOpt() || shell.stressDeopt()) {
- if (shell.stressOpt())
- v8::Testing::SetStressRunType(v8::Testing::kStressTypeOpt);
- else
- v8::Testing::SetStressRunType(v8::Testing::kStressTypeDeopt);
- for (int i = 0; i < v8::Testing::GetStressRuns(); i++) {
- v8::Testing::PrepareStressRun(i);
- bool isLastLoad = (i == (v8::Testing::GetStressRuns() - 1));
- shell.setDumpWhenFinished(isLastLoad);
- shell.resetTestController();
- shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
- }
- } else {
- shell.resetTestController();
- shell.runFileTest(params, command.shouldDumpPixels || forceDumpPixels);
- }
- shell.setLayoutTestTimeout(oldTimeoutMsec);
-}
-
-int main(int argc, char* argv[])
-{
- WebKitSupportTestEnvironment testEnvironment;
- platformInit(&argc, &argv);
-
- TestParams params;
- Vector<string> tests;
- bool serverMode = false;
- bool dumpAllPixels = false;
- bool allowExternalPages = false;
- bool startupDialog = false;
- bool acceleratedCompositingForVideoEnabled = false;
- bool acceleratedCompositingForFixedPositionEnabled = false;
- bool softwareCompositingEnabled = false;
- bool threadedCompositingEnabled = false;
- bool forceCompositingMode = false;
- bool accelerated2DCanvasEnabled = false;
- bool deferred2DCanvasEnabled = false;
- bool acceleratedPaintingEnabled = false;
- bool perTilePaintingEnabled = false;
- bool deferredImageDecodingEnabled = false;
- bool stressOpt = false;
- bool stressDeopt = false;
- bool hardwareAcceleratedGL = false;
- string javaScriptFlags;
- bool encodeBinary = false;
- bool noTimeout = false;
- bool acceleratedAnimationEnabled = false;
- for (int i = 1; i < argc; ++i) {
- string argument(argv[i]);
- if (argument == "-")
- serverMode = true;
- else if (argument == optionDumpPixels || argument == optionDumpPixelsShortForm)
- dumpAllPixels = true;
- else if (argument == optionNotree)
- params.dumpTree = false;
- else if (argument == optionDebugRenderTree)
- params.debugRenderTree = true;
- else if (argument == optionDebugLayerTree)
- params.debugLayerTree = true;
- else if (argument == optionAllowExternalPages)
- allowExternalPages = true;
- else if (argument == optionStartupDialog)
- startupDialog = true;
- else if (argument == optionCheckLayoutTestSystemDeps)
- return checkLayoutTestSystemDependencies() ? EXIT_SUCCESS : EXIT_FAILURE;
- else if (argument == optionHardwareAcceleratedGL)
- hardwareAcceleratedGL = true;
- else if (argument == optionEnableAcceleratedCompositingForVideo)
- acceleratedCompositingForVideoEnabled = true;
- else if (argument == optionEnableAcceleratedFixedPosition)
- acceleratedCompositingForFixedPositionEnabled = true;
- else if (argument == optionEnableSoftwareCompositing)
- softwareCompositingEnabled = true;
- else if (argument == optionEnableThreadedCompositing)
- threadedCompositingEnabled = true;
- else if (argument == optionForceCompositingMode)
- forceCompositingMode = true;
- else if (argument == optionEnableAccelerated2DCanvas)
- accelerated2DCanvasEnabled = true;
- else if (argument == optionEnableDeferred2DCanvas)
- deferred2DCanvasEnabled = true;
- else if (argument == optionEnableAcceleratedPainting)
- acceleratedPaintingEnabled = true;
- else if (!argument.find(optionUseGraphicsContext3DImplementation)) {
- string implementation = argument.substr(strlen(optionUseGraphicsContext3DImplementation));
- if (!implementation.compare("IN_PROCESS"))
- webkit_support::SetGraphicsContext3DImplementation(webkit_support::IN_PROCESS);
- else if (!implementation.compare("IN_PROCESS_COMMAND_BUFFER"))
- webkit_support::SetGraphicsContext3DImplementation(webkit_support::IN_PROCESS_COMMAND_BUFFER);
- else
- fprintf(stderr, "Unknown GraphicContext3D implementation %s\n", implementation.c_str());
- } else if (argument == optionEnablePerTilePainting)
- perTilePaintingEnabled = true;
- else if (argument == optionEnableDeferredImageDecoding)
- deferredImageDecodingEnabled = true;
- else if (argument == optionStressOpt)
- stressOpt = true;
- else if (argument == optionStressDeopt)
- stressDeopt = true;
- else if (!argument.find(optionJavaScriptFlags))
- javaScriptFlags = argument.substr(strlen(optionJavaScriptFlags));
- else if (argument == optionEncodeBinary)
- encodeBinary = true;
- else if (argument == optionNoTimeout)
- noTimeout = true;
- else if (!argument.find(optionWebCoreLogChannels)) {
- string channels = argument.substr(strlen(optionWebCoreLogChannels));
- webkit_support::EnableWebCoreLogChannels(channels);
- } else if (argument.size() && argument[0] == '-')
- fprintf(stderr, "Unknown option: %s\n", argv[i]);
- else
- tests.append(argument);
- }
- if (stressOpt && stressDeopt) {
- fprintf(stderr, "--stress-opt and --stress-deopt are mutually exclusive.\n");
- return EXIT_FAILURE;
- }
-
- webkit_support::SetUpGLBindings(hardwareAcceleratedGL ? webkit_support::GL_BINDING_DEFAULT : webkit_support::GL_BINDING_SOFTWARE_RENDERER);
-
- if (startupDialog)
- openStartupDialog();
-
- { // Explicit scope for the TestShell instance.
- TestShell shell;
- shell.setAllowExternalPages(allowExternalPages);
- shell.setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
- shell.setAcceleratedCompositingForFixedPositionEnabled(acceleratedCompositingForFixedPositionEnabled);
- shell.setSoftwareCompositingEnabled(softwareCompositingEnabled);
- shell.setThreadedCompositingEnabled(threadedCompositingEnabled);
- shell.setForceCompositingMode(forceCompositingMode);
- shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
- shell.setDeferred2dCanvasEnabled(deferred2DCanvasEnabled);
- shell.setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
- shell.setAcceleratedAnimationEnabled(acceleratedAnimationEnabled);
- shell.setPerTilePaintingEnabled(perTilePaintingEnabled);
- shell.setDeferredImageDecodingEnabled(deferredImageDecodingEnabled);
- shell.setJavaScriptFlags(javaScriptFlags);
- shell.setStressOpt(stressOpt);
- shell.setStressDeopt(stressDeopt);
- shell.setEncodeBinary(encodeBinary);
- if (noTimeout) {
- // 0x20000000ms is big enough for the purpose to avoid timeout in debugging.
- shell.setLayoutTestTimeout(0x20000000);
- }
- shell.initialize();
- if (serverMode && !tests.size()) {
-#if OS(ANDROID)
- // Send a signal to host to indicate DRT is ready to process commands.
- puts("#READY");
- fflush(stdout);
-#endif
- params.printSeparators = true;
- char testString[2048]; // 2048 is the same as the sizes of other platforms.
- while (fgets(testString, sizeof(testString), stdin)) {
- char* newLinePosition = strchr(testString, '\n');
- if (newLinePosition)
- *newLinePosition = '\0';
- if (testString[0] == '\0')
- continue;
- // Explicitly quit on platforms where EOF is not reliable.
- if (!strcmp(testString, "QUIT"))
- break;
- runTest(shell, params, testString, dumpAllPixels);
- }
- } else if (!tests.size())
- puts("#EOF");
- else {
- params.printSeparators = tests.size() > 1;
- for (unsigned i = 0; i < tests.size(); i++)
- runTest(shell, params, tests[i], dumpAllPixels);
- }
-
- shell.callJSGC();
- shell.callJSGC();
-
- // When we finish the last test, cleanup the DRTTestRunner.
- // It may have references to not-yet-cleaned up windows. By cleaning up
- // here we help purify reports.
- shell.resetTestController();
- }
-
- // Shutdown WebCompositor after TestShell is destructed properly.
- WebKit::Platform::current()->compositorSupport()->shutdown();
-
- return EXIT_SUCCESS;
-}
diff --git a/Tools/DumpRenderTree/chromium/ImageDiff.cpp b/Tools/DumpRenderTree/chromium/ImageDiff.cpp
deleted file mode 100644
index 906813d9c..000000000
--- a/Tools/DumpRenderTree/chromium/ImageDiff.cpp
+++ /dev/null
@@ -1,515 +0,0 @@
-/*
- * 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.
- */
-
-// This file input format is based loosely on
-// WebKitTools/DumpRenderTree/ImageDiff.m
-
-// The exact format of this tool's output to stdout is important, to match
-// what the run-webkit-tests script expects.
-
-#include "webkit/support/webkit_support_gfx.h"
-#include <algorithm>
-#include <iterator>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <vector>
-
-#if defined(_WIN32)
-#include <windows.h>
-#define PATH_MAX MAX_PATH
-#define strtok_r strtok_s
-#endif
-
-// Define macro here to make ImageDiff independent of WTF.
-#ifdef NDEBUG
-#define ASSERT(assertion) do { } while (0)
-#else
-#define ASSERT(assertion) do \
- if (!(assertion)) { \
- fprintf(stderr, "ASSERT failed at %s:%d: " #assertion ".", __FILE__, __LINE__); \
- exit(1); \
- } \
-while (0)
-#endif
-
-using namespace std;
-
-// Causes the app to remain open, waiting for pairs of filenames on stdin.
-// The caller is then responsible for terminating this app.
-static const char optionPollStdin[] = "--use-stdin";
-static const char optionGenerateDiff[] = "--diff";
-
-// If --diff is passed, causes the app to output the image difference
-// metric (percentageDifferent()) on stdout.
-static const char optionWrite[] = "--write-image-diff-metrics";
-
-// Use weightedPercentageDifferent() instead of the default image
-// comparator proc.
-static const char optionWeightedIntensity[] = "--weighted-intensity";
-
-// Return codes used by this utility.
-static const int statusSame = 0;
-static const int statusDifferent = 1;
-static const int statusError = 2;
-
-// Color codes.
-static const unsigned int rgbaRed = 0x000000ff;
-static const unsigned int rgbaAlpha = 0xff000000;
-
-class Image {
-public:
- Image()
- : m_width(0)
- , m_height(0) { }
-
- Image(const Image& image)
- : m_width(image.m_width)
- , m_height(image.m_height)
- , m_data(image.m_data) { }
-
- bool hasImage() const { return m_width > 0 && m_height > 0; }
- int width() const { return m_width; }
- int height() const { return m_height; }
- const unsigned char* data() const { return &m_data.front(); }
-
- // Creates the image from stdin with the given data length. On success, it
- // will return true. On failure, no other methods should be accessed.
- bool createFromStdin(size_t byteLength)
- {
- if (!byteLength)
- return false;
-
- unsigned char* source = new unsigned char[byteLength];
- if (fread(source, 1, byteLength, stdin) != byteLength) {
- delete [] source;
- return false;
- }
-
- if (!webkit_support::DecodePNG(source, byteLength, &m_data, &m_width, &m_height)) {
- delete [] source;
- clear();
- return false;
- }
- delete [] source;
- return true;
- }
-
- // Creates the image from the given filename on disk, and returns true on
- // success.
- bool createFromFilename(const char* filename)
- {
- FILE* f = fopen(filename, "rb");
- if (!f)
- return false;
-
- vector<unsigned char> compressed;
- const int bufSize = 1024;
- unsigned char buf[bufSize];
- size_t numRead = 0;
- while ((numRead = fread(buf, 1, bufSize, f)) > 0)
- std::copy(buf, &buf[numRead], std::back_inserter(compressed));
-
- fclose(f);
-
- if (!webkit_support::DecodePNG(&compressed[0], compressed.size(), &m_data, &m_width, &m_height)) {
- clear();
- return false;
- }
- return true;
- }
-
- void clear()
- {
- m_width = m_height = 0;
- m_data.clear();
- }
-
- // Returns the RGBA value of the pixel at the given location
- const unsigned int pixelAt(int x, int y) const
- {
- ASSERT(x >= 0 && x < m_width);
- ASSERT(y >= 0 && y < m_height);
- return *reinterpret_cast<const unsigned int*>(&(m_data[(y * m_width + x) * 4]));
- }
-
- void setPixelAt(int x, int y, unsigned int color) const
- {
- ASSERT(x >= 0 && x < m_width);
- ASSERT(y >= 0 && y < m_height);
- void* addr = &const_cast<unsigned char*>(&m_data.front())[(y * m_width + x) * 4];
- *reinterpret_cast<unsigned int*>(addr) = color;
- }
-
-private:
- // pixel dimensions of the image
- int m_width, m_height;
-
- vector<unsigned char> m_data;
-};
-
-typedef float (*ImageComparisonProc) (const Image&, const Image&);
-
-float percentageDifferent(const Image& baseline, const Image& actual)
-{
- int w = min(baseline.width(), actual.width());
- int h = min(baseline.height(), actual.height());
-
- // Compute pixels different in the overlap
- int pixelsDifferent = 0;
- for (int y = 0; y < h; ++y) {
- for (int x = 0; x < w; ++x) {
- if (baseline.pixelAt(x, y) != actual.pixelAt(x, y))
- pixelsDifferent++;
- }
- }
-
- // Count pixels that are a difference in size as also being different
- int maxWidth = max(baseline.width(), actual.width());
- int maxHeight = max(baseline.height(), actual.height());
-
- // ...pixels off the right side, but not including the lower right corner
- pixelsDifferent += (maxWidth - w) * h;
-
- // ...pixels along the bottom, including the lower right corner
- pixelsDifferent += (maxHeight - h) * maxWidth;
-
- // Like the WebKit ImageDiff tool, we define percentage different in terms
- // of the size of the 'actual' bitmap.
- float totalPixels = static_cast<float>(actual.width()) * static_cast<float>(actual.height());
- if (!totalPixels)
- return 100.0f; // When the bitmap is empty, they are 100% different.
- return static_cast<float>(pixelsDifferent) / totalPixels * 100;
-}
-
-inline unsigned int maxOf3(unsigned int a, unsigned int b, unsigned int c)
-{
- if (a < b)
- return std::max(b, c);
- return std::max(a, c);
-}
-
-inline unsigned int getRedComponent(unsigned int color)
-{
- return (color << 24) >> 24;
-}
-
-inline unsigned int getGreenComponent(unsigned int color)
-{
- return (color << 16) >> 24;
-}
-
-inline unsigned int getBlueComponent(unsigned int color)
-{
- return (color << 8) >> 24;
-}
-
-/// Rank small-pixel-count high-intensity changes as more important than
-/// large-pixel-count low-intensity changes.
-float weightedPercentageDifferent(const Image& baseline, const Image& actual)
-{
- int w = min(baseline.width(), actual.width());
- int h = min(baseline.height(), actual.height());
-
- float weightedPixelsDifferent = 0;
- for (int y = 0; y < h; ++y) {
- for (int x = 0; x < w; ++x) {
- unsigned int actualColor = actual.pixelAt(x, y);
- unsigned int baselineColor = baseline.pixelAt(x, y);
- if (baselineColor != actualColor) {
- unsigned int actualR = getRedComponent(actualColor);
- unsigned int actualG = getGreenComponent(actualColor);
- unsigned int actualB = getBlueComponent(actualColor);
- unsigned int baselineR = getRedComponent(baselineColor);
- unsigned int baselineG = getGreenComponent(baselineColor);
- unsigned int baselineB = getBlueComponent(baselineColor);
- unsigned int deltaR = std::max(actualR, baselineR)
- - std::min(actualR, baselineR);
- unsigned int deltaG = std::max(actualG, baselineG)
- - std::min(actualG, baselineG);
- unsigned int deltaB = std::max(actualB, baselineB)
- - std::min(actualB, baselineB);
- weightedPixelsDifferent +=
- static_cast<float>(maxOf3(deltaR, deltaG, deltaB)) / 255;
- }
- }
- }
-
- int maxWidth = max(baseline.width(), actual.width());
- int maxHeight = max(baseline.height(), actual.height());
-
- weightedPixelsDifferent += (maxWidth - w) * h;
-
- weightedPixelsDifferent += (maxHeight - h) * maxWidth;
-
- float totalPixels = static_cast<float>(actual.width())
- * static_cast<float>(actual.height());
- if (!totalPixels)
- return 100.0f;
- return weightedPixelsDifferent / totalPixels * 100;
-}
-
-
-void printHelp()
-{
- fprintf(stderr,
- "Usage:\n"
- " ImageDiff <compare file> <reference file>\n"
- " Compares two files on disk, returning 0 when they are the same\n"
- " ImageDiff --use-stdin\n"
- " Stays open reading pairs of filenames from stdin, comparing them,\n"
- " and sending 0 to stdout when they are the same\n"
- " ImageDiff --diff <compare file> <reference file> <output file>\n"
- " Compares two files on disk, outputs an image that visualizes the"
- " difference to <output file>\n"
- " --write-image-diff-metrics prints a difference metric to stdout\n"
- " --weighted-intensity weights the difference metric by intensity\n"
- " at each pixel\n");
- /* For unfinished webkit-like-mode (see below)
- "\n"
- " ImageDiff -s\n"
- " Reads stream input from stdin, should be EXACTLY of the format\n"
- " \"Content-length: <byte length> <data>Content-length: ...\n"
- " it will take as many file pairs as given, and will compare them as\n"
- " (cmp_file, reference_file) pairs\n");
- */
-}
-
-int compareImages(const char* file1, const char* file2,
- ImageComparisonProc comparator)
-{
- Image actualImage;
- Image baselineImage;
-
- if (!actualImage.createFromFilename(file1)) {
- fprintf(stderr, "ImageDiff: Unable to open file \"%s\"\n", file1);
- return statusError;
- }
- if (!baselineImage.createFromFilename(file2)) {
- fprintf(stderr, "ImageDiff: Unable to open file \"%s\"\n", file2);
- return statusError;
- }
-
- float percent = (*comparator)(actualImage, baselineImage);
- if (percent > 0.0) {
- // failure: The WebKit version also writes the difference image to
- // stdout, which seems excessive for our needs.
- printf("diff: %01.2f%% failed\n", percent);
- return statusDifferent;
- }
-
- // success
- printf("diff: %01.2f%% passed\n", percent);
- return statusSame;
-
-}
-
-// Untested mode that acts like WebKit's image comparator. I wrote this but
-// decided it's too complicated. We may use it in the future if it looks useful.
-int untestedCompareImages(ImageComparisonProc comparator)
-{
- Image actualImage;
- Image baselineImage;
- char buffer[2048];
- while (fgets(buffer, sizeof(buffer), stdin)) {
- if (!strncmp("Content-length: ", buffer, 16)) {
- char* context;
- strtok_r(buffer, " ", &context);
- int imageSize = strtol(strtok_r(0, " ", &context), 0, 10);
-
- bool success = false;
- if (imageSize > 0 && !actualImage.hasImage()) {
- if (!actualImage.createFromStdin(imageSize)) {
- fputs("Error, input image can't be decoded.\n", stderr);
- return 1;
- }
- } else if (imageSize > 0 && !baselineImage.hasImage()) {
- if (!baselineImage.createFromStdin(imageSize)) {
- fputs("Error, baseline image can't be decoded.\n", stderr);
- return 1;
- }
- } else {
- fputs("Error, image size must be specified.\n", stderr);
- return 1;
- }
- }
-
- if (actualImage.hasImage() && baselineImage.hasImage()) {
- float percent = (*comparator)(actualImage, baselineImage);
- if (percent > 0.0) {
- // failure: The WebKit version also writes the difference image to
- // stdout, which seems excessive for our needs.
- printf("diff: %01.2f%% failed\n", percent);
- } else {
- // success
- printf("diff: %01.2f%% passed\n", percent);
- }
- actualImage.clear();
- baselineImage.clear();
- }
- fflush(stdout);
- }
- return 0;
-}
-
-bool createImageDiff(const Image& image1, const Image& image2, Image* out)
-{
- int w = min(image1.width(), image2.width());
- int h = min(image1.height(), image2.height());
- *out = Image(image1);
- bool same = (image1.width() == image2.width()) && (image1.height() == image2.height());
-
- // FIXME: do something with the extra pixels if the image sizes are different.
- for (int y = 0; y < h; ++y) {
- for (int x = 0; x < w; ++x) {
- unsigned int basePixel = image1.pixelAt(x, y);
- if (basePixel != image2.pixelAt(x, y)) {
- // Set differing pixels red.
- out->setPixelAt(x, y, rgbaRed | rgbaAlpha);
- same = false;
- } else {
- // Set same pixels as faded.
- unsigned int alpha = basePixel & rgbaAlpha;
- unsigned int newPixel = basePixel - ((alpha / 2) & rgbaAlpha);
- out->setPixelAt(x, y, newPixel);
- }
- }
- }
-
- return same;
-}
-
-static bool writeFile(const char* outFile, const unsigned char* data, size_t dataSize)
-{
- FILE* file = fopen(outFile, "wb");
- if (!file) {
- fprintf(stderr, "ImageDiff: Unable to create file \"%s\"\n", outFile);
- return false;
- }
- if (dataSize != fwrite(data, 1, dataSize, file)) {
- fclose(file);
- fprintf(stderr, "ImageDiff: Unable to write data to file \"%s\"\n", outFile);
- return false;
- }
- fclose(file);
- return true;
-}
-
-int diffImages(const char* file1, const char* file2, const char* outFile,
- bool shouldWritePercentages, ImageComparisonProc comparator)
-{
- Image actualImage;
- Image baselineImage;
-
- if (!actualImage.createFromFilename(file1)) {
- fprintf(stderr, "ImageDiff: Unable to open file \"%s\"\n", file1);
- return statusError;
- }
- if (!baselineImage.createFromFilename(file2)) {
- fprintf(stderr, "ImageDiff: Unable to open file \"%s\"\n", file2);
- return statusError;
- }
-
- Image diffImage;
- bool same = createImageDiff(baselineImage, actualImage, &diffImage);
- if (same)
- return statusSame;
-
- vector<unsigned char> pngData;
- webkit_support::EncodeRGBAPNG(diffImage.data(), diffImage.width(), diffImage.height(),
- diffImage.width() * 4, &pngData);
- if (!writeFile(outFile, &pngData.front(), pngData.size()))
- return statusError;
-
- if (shouldWritePercentages) {
- float percent = (*comparator)(actualImage, baselineImage);
- fprintf(stdout, "%.3f\n", percent);
- }
-
- return statusDifferent;
-}
-
-int main(int argc, const char* argv[])
-{
- std::vector<const char*> values;
- bool pollStdin = false;
- bool generateDiff = false;
- bool shouldWritePercentages = false;
- ImageComparisonProc comparator = percentageDifferent;
- for (int i = 1; i < argc; ++i) {
- if (!strcmp(argv[i], optionPollStdin))
- pollStdin = true;
- else if (!strcmp(argv[i], optionGenerateDiff))
- generateDiff = true;
- else if (!strcmp(argv[i], optionWrite))
- shouldWritePercentages = true;
- else if (!strcmp(argv[i], optionWeightedIntensity))
- comparator = weightedPercentageDifferent;
- else
- values.push_back(argv[i]);
- }
-
- if (pollStdin) {
- // Watch stdin for filenames.
- const size_t bufferSize = PATH_MAX;
- char stdinBuffer[bufferSize];
- char firstName[bufferSize];
- bool haveFirstName = false;
- while (fgets(stdinBuffer, bufferSize, stdin)) {
- if (!stdinBuffer[0])
- continue;
-
- if (haveFirstName) {
- // compareImages writes results to stdout unless an error occurred.
- if (compareImages(firstName, stdinBuffer,
- comparator) == statusError)
- printf("error\n");
- fflush(stdout);
- haveFirstName = false;
- } else {
- // Save the first filename in another buffer and wait for the second
- // filename to arrive via stdin.
- strcpy(firstName, stdinBuffer);
- haveFirstName = true;
- }
- }
- return 0;
- }
-
- if (generateDiff) {
- if (values.size() == 3)
- return diffImages(values[0], values[1], values[2],
- shouldWritePercentages, comparator);
- } else if (values.size() == 2)
- return compareImages(argv[1], argv[2], comparator);
-
- printHelp();
- return statusError;
-}
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestHelper.mm b/Tools/DumpRenderTree/chromium/LayoutTestHelper.mm
deleted file mode 100644
index 5ecac6692..000000000
--- a/Tools/DumpRenderTree/chromium/LayoutTestHelper.mm
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2012 Apple Inc.
- *
- * 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 <AppKit/AppKit.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-// This is a simple helper app that changes the color sync profile to the
-// generic profile and back when done. This program is managed by the layout
-// test script, so it can do the job for multiple DumpRenderTree while they are
-// running layout tests.
-
-namespace {
-
-#if defined(MAC_OS_X_VERSION_10_7) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
-
-CFURLRef sUserColorProfileURL;
-
-void installLayoutTestColorProfile()
-{
- // To make sure we get consistent colors (not dependent on the chosen color
- // space of the main display), we force the generic RGB color profile.
- // This causes a change the user can see.
-
- CFUUIDRef mainDisplayID = CGDisplayCreateUUIDFromDisplayID(CGMainDisplayID());
-
- if (!sUserColorProfileURL) {
- CFDictionaryRef deviceInfo = ColorSyncDeviceCopyDeviceInfo(kColorSyncDisplayDeviceClass, mainDisplayID);
-
- if (!deviceInfo) {
- NSLog(@"No display attached to system; not setting main display's color profile.");
- CFRelease(mainDisplayID);
- return;
- }
-
- CFDictionaryRef profileInfo = (CFDictionaryRef)CFDictionaryGetValue(deviceInfo, kColorSyncCustomProfiles);
- if (profileInfo) {
- sUserColorProfileURL = (CFURLRef)CFDictionaryGetValue(profileInfo, CFSTR("1"));
- CFRetain(sUserColorProfileURL);
- } else {
- profileInfo = (CFDictionaryRef)CFDictionaryGetValue(deviceInfo, kColorSyncFactoryProfiles);
- CFDictionaryRef factoryProfile = (CFDictionaryRef)CFDictionaryGetValue(profileInfo, CFSTR("1"));
- sUserColorProfileURL = (CFURLRef)CFDictionaryGetValue(factoryProfile, kColorSyncDeviceProfileURL);
- CFRetain(sUserColorProfileURL);
- }
-
- CFRelease(deviceInfo);
- }
-
- ColorSyncProfileRef genericRGBProfile = ColorSyncProfileCreateWithName(kColorSyncGenericRGBProfile);
- CFErrorRef error;
- CFURLRef profileURL = ColorSyncProfileGetURL(genericRGBProfile, &error);
- if (!profileURL) {
- NSLog(@"Failed to get URL of Generic RGB color profile! Many pixel tests may fail as a result. Error: %@", error);
-
- if (sUserColorProfileURL) {
- CFRelease(sUserColorProfileURL);
- sUserColorProfileURL = 0;
- }
-
- CFRelease(genericRGBProfile);
- CFRelease(mainDisplayID);
- return;
- }
-
- CFMutableDictionaryRef profileInfo = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
- CFDictionarySetValue(profileInfo, kColorSyncDeviceDefaultProfileID, profileURL);
-
- if (!ColorSyncDeviceSetCustomProfiles(kColorSyncDisplayDeviceClass, mainDisplayID, profileInfo)) {
- NSLog(@"Failed to set color profile for main display! Many pixel tests may fail as a result.");
-
- if (sUserColorProfileURL) {
- CFRelease(sUserColorProfileURL);
- sUserColorProfileURL = 0;
- }
- }
-
- CFRelease(profileInfo);
- CFRelease(genericRGBProfile);
- CFRelease(mainDisplayID);
-}
-
-void restoreUserColorProfile(void)
-{
- // This is used as a signal handler, and thus the calls into ColorSync are unsafe.
- // But we might as well try to restore the user's color profile, we're going down anyway...
-
- if (!sUserColorProfileURL)
- return;
-
- CFUUIDRef mainDisplayID = CGDisplayCreateUUIDFromDisplayID(CGMainDisplayID());
- CFMutableDictionaryRef profileInfo = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
- CFDictionarySetValue(profileInfo, kColorSyncDeviceDefaultProfileID, sUserColorProfileURL);
- ColorSyncDeviceSetCustomProfiles(kColorSyncDisplayDeviceClass, mainDisplayID, profileInfo);
- CFRelease(mainDisplayID);
- CFRelease(profileInfo);
-}
-
-#else // For Snow Leopard and before, use older CM* API.
-
-const char colorProfilePath[] = "/System/Library/ColorSync/Profiles/Generic RGB Profile.icc";
-
-CMProfileLocation initialColorProfileLocation; // The locType field is initialized to 0 which is the same as cmNoProfileBase.
-
-void installLayoutTestColorProfile()
-{
- // To make sure we get consistent colors (not dependent on the Main display),
- // we force the generic rgb color profile. This cases a change the user can
- // see.
- const CMDeviceScope scope = { kCFPreferencesCurrentUser, kCFPreferencesCurrentHost };
-
- CMProfileRef profile = 0;
- int error = CMGetProfileByAVID((CMDisplayIDType)kCGDirectMainDisplay, &profile);
- if (!error) {
- UInt32 size = sizeof(initialColorProfileLocation);
- error = NCMGetProfileLocation(profile, &initialColorProfileLocation, &size);
- CMCloseProfile(profile);
- }
- if (error) {
- NSLog(@"failed to get the current color profile, pixmaps won't match. Error: %d", (int)error);
- initialColorProfileLocation.locType = cmNoProfileBase;
- return;
- }
-
- CMProfileLocation location;
- location.locType = cmPathBasedProfile;
- strncpy(location.u.pathLoc.path, colorProfilePath, sizeof(location.u.pathLoc.path));
- error = CMSetDeviceProfile(cmDisplayDeviceClass, (CMDeviceID)kCGDirectMainDisplay, &scope, cmDefaultProfileID, &location);
- if (error) {
- NSLog(@"failed install the generic color profile, pixmaps won't match. Error: %d", (int)error);
- initialColorProfileLocation.locType = cmNoProfileBase;
- }
-}
-
-void restoreUserColorProfile(void)
-{
- // This is used as a signal handler, and thus the calls into ColorSync are unsafe.
- // But we might as well try to restore the user's color profile, we're going down anyway...
- if (initialColorProfileLocation.locType != cmNoProfileBase) {
- const CMDeviceScope scope = { kCFPreferencesCurrentUser, kCFPreferencesCurrentHost };
- int error = CMSetDeviceProfile(cmDisplayDeviceClass, (CMDeviceID)kCGDirectMainDisplay, &scope, cmDefaultProfileID, &initialColorProfileLocation);
- if (error) {
- NSLog(@"Failed to restore color profile, use System Preferences -> Displays -> Color to reset. Error: %d", (int)error);
- }
- initialColorProfileLocation.locType = cmNoProfileBase;
- }
-}
-
-#endif
-
-void simpleSignalHandler(int sig)
-{
- // Try to restore the color profile and try to go down cleanly
- restoreUserColorProfile();
- exit(128 + sig);
-}
-
-} // namespace
-
-int main(int argc, char* argv[])
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
- // Hooks the ways we might get told to clean up...
- signal(SIGINT, simpleSignalHandler);
- signal(SIGHUP, simpleSignalHandler);
- signal(SIGTERM, simpleSignalHandler);
-
- // Save off the current profile, and then install the layout test profile.
- installLayoutTestColorProfile();
-
- // Let the script know we're ready
- printf("ready\n");
- fflush(stdout);
-
- // Wait for any key (or signal)
- getchar();
-
- // Restore the profile
- restoreUserColorProfile();
-
- [pool release];
- return 0;
-}
diff --git a/Tools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp b/Tools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp
deleted file mode 100644
index 25efdcdcb..000000000
--- a/Tools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.
- */
-
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <windows.h>
-
-static BOOL fontSmoothingEnabled = FALSE;
-
-static void saveInitialSettings(void)
-{
- ::SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &fontSmoothingEnabled, 0);
-}
-
-// Technically, all we need to do is disable ClearType. However,
-// for some reason, the call to SPI_SETFONTSMOOTHINGTYPE doesn't
-// seem to work, so we just disable font smoothing all together
-// (which works reliably)
-static void installLayoutTestSettings(void)
-{
- ::SystemParametersInfo(SPI_SETFONTSMOOTHING, FALSE, 0, 0);
-}
-
-static void restoreInitialSettings(void)
-{
- ::SystemParametersInfo(SPI_SETFONTSMOOTHING, static_cast<UINT>(fontSmoothingEnabled), 0, 0);
-}
-
-static void simpleSignalHandler(int signalNumber)
-{
- // Try to restore the settings and then go down cleanly
- restoreInitialSettings();
- exit(128 + signalNumber);
-}
-
-int main(int, char*[])
-{
- // Hooks the ways we might get told to clean up...
- signal(SIGINT, simpleSignalHandler);
- signal(SIGTERM, simpleSignalHandler);
-
- saveInitialSettings();
-
- installLayoutTestSettings();
-
- // Let the script know we're ready
- printf("ready\n");
- fflush(stdout);
-
- // Wait for any key (or signal)
- getchar();
-
- restoreInitialSettings();
-
- return EXIT_SUCCESS;
-}
diff --git a/Tools/DumpRenderTree/chromium/MockConstraints.cpp b/Tools/DumpRenderTree/chromium/MockConstraints.cpp
deleted file mode 100644
index a4f15842e..000000000
--- a/Tools/DumpRenderTree/chromium/MockConstraints.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#if ENABLE(MEDIA_STREAM)
-
-#include "MockConstraints.h"
-
-#include <public/WebMediaConstraints.h>
-
-using namespace WebKit;
-
-namespace MockConstraints {
-
-static bool isSupported(const WebString& constraint)
-{
- return constraint == "valid_and_supported_1" || constraint == "valid_and_supported_2";
-}
-
-static bool isValid(const WebString& constraint)
-{
- return isSupported(constraint) || constraint == "valid_but_unsupported_1" || constraint == "valid_but_unsupported_2";
-}
-
-bool verifyConstraints(const WebMediaConstraints& constraints)
-{
- WebVector<WebMediaConstraint> mandatoryConstraints;
- constraints.getMandatoryConstraints(mandatoryConstraints);
- if (mandatoryConstraints.size()) {
- for (size_t i = 0; i < mandatoryConstraints.size(); ++i) {
- const WebMediaConstraint& curr = mandatoryConstraints[i];
- if (!isSupported(curr.m_name) || curr.m_value != "1")
- return false;
- }
- }
-
- WebVector<WebMediaConstraint> optionalConstraints;
- constraints.getOptionalConstraints(optionalConstraints);
- if (optionalConstraints.size()) {
- for (size_t i = 0; i < optionalConstraints.size(); ++i) {
- const WebMediaConstraint& curr = optionalConstraints[i];
- if (!isValid(curr.m_name) || curr.m_value != "0")
- return false;
- }
- }
-
- return true;
-}
-
-} // namespace MockConstraints
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/MockConstraints.h b/Tools/DumpRenderTree/chromium/MockConstraints.h
deleted file mode 100644
index 6bf0da9b1..000000000
--- a/Tools/DumpRenderTree/chromium/MockConstraints.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef MockConstraints_h
-#define MockConstraints_h
-
-#if ENABLE(MEDIA_STREAM)
-
-namespace WebKit {
-class WebMediaConstraints;
-}
-
-namespace MockConstraints {
-
-bool verifyConstraints(const WebKit::WebMediaConstraints&);
-
-} // namespace MockConstraints
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // MockConstraints_h
-
diff --git a/Tools/DumpRenderTree/chromium/MockGrammarCheck.cpp b/Tools/DumpRenderTree/chromium/MockGrammarCheck.cpp
deleted file mode 100644
index e004476ed..000000000
--- a/Tools/DumpRenderTree/chromium/MockGrammarCheck.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "MockGrammarCheck.h"
-
-#include "WebTextCheckingResult.h"
-#include "platform/WebString.h"
-
-#include <wtf/ASCIICType.h>
-#include <wtf/Assertions.h>
-#include <wtf/text/WTFString.h>
-
-using namespace WebKit;
-
-bool MockGrammarCheck::checkGrammarOfString(const WebString& text, Vector<WebTextCheckingResult>* results)
-{
- ASSERT(results);
- WTF::String stringText(text.data(), text.length());
- if (stringText.find(isASCIIAlpha) == static_cast<size_t>(-1))
- return true;
-
- // Find matching grammatical errors from known ones. This function has to
- // check all errors because the given text may consist of two or more
- // sentences that have grammatical errors.
- static const struct {
- const char* text;
- int location;
- int length;
- } grammarErrors[] = {
- {"I have a issue.", 7, 1},
- {"I have an grape.", 7, 2},
- {"I have an kiwi.", 7, 2},
- {"I have an muscat.", 7, 2},
- {"You has the right.", 4, 3},
- {"apple orange zz.", 0, 16},
- {"apple zz orange.", 0, 16},
- {"apple,zz,orange.", 0, 16},
- {"orange,zz,apple.", 0, 16},
- {"the the adlj adaasj sdklj. there there", 0, 38},
- {"zz apple orange.", 0, 16},
- };
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(grammarErrors); ++i) {
- int offset = 0;
- while ((offset = stringText.find(grammarErrors[i].text, offset)) != -1) {
- results->append(WebTextCheckingResult(WebTextCheckingTypeGrammar, offset + grammarErrors[i].location, grammarErrors[i].length));
- offset += grammarErrors[i].length;
- }
- }
- return false;
-}
diff --git a/Tools/DumpRenderTree/chromium/MockGrammarCheck.h b/Tools/DumpRenderTree/chromium/MockGrammarCheck.h
deleted file mode 100644
index 64271b3fa..000000000
--- a/Tools/DumpRenderTree/chromium/MockGrammarCheck.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef MockGrammarCheck_h
-#define MockGrammarCheck_h
-
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-class WebString;
-struct WebTextCheckingResult;
-
-}
-
-// A mock implementation of a grammar-checker used for WebKit tests. This class
-// only implements the minimal functionarities required by WebKit tests, i.e.
-// this class just compares the given string with known grammar mistakes in
-// webkit tests and adds grammar markers on them. Even though this is sufficent
-// for webkit tests, this class is not suitable for any other usages.
-class MockGrammarCheck {
-public:
- static bool checkGrammarOfString(const WebKit::WebString&, Vector<WebKit::WebTextCheckingResult>*);
-};
-
-#endif // MockSpellCheck_h
diff --git a/Tools/DumpRenderTree/chromium/MockSpellCheck.cpp b/Tools/DumpRenderTree/chromium/MockSpellCheck.cpp
deleted file mode 100644
index 7593c7190..000000000
--- a/Tools/DumpRenderTree/chromium/MockSpellCheck.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "MockSpellCheck.h"
-
-#include <wtf/ASCIICType.h>
-#include <wtf/Assertions.h>
-#include <wtf/text/WTFString.h>
-
-using namespace WebKit;
-
-MockSpellCheck::MockSpellCheck()
- : m_initialized(false) { }
-
-MockSpellCheck::~MockSpellCheck() { }
-
-static bool isNotASCIIAlpha(UChar ch) { return !isASCIIAlpha(ch); }
-
-bool MockSpellCheck::spellCheckWord(const WebString& text, int* misspelledOffset, int* misspelledLength)
-{
- ASSERT(misspelledOffset);
- ASSERT(misspelledLength);
-
- // Initialize this spellchecker.
- initializeIfNeeded();
-
- // Reset the result values as our spellchecker does.
- *misspelledOffset = 0;
- *misspelledLength = 0;
-
- // Convert to a String because we store String instances in
- // m_misspelledWords and WebString has no find().
- WTF::String stringText(text.data(), text.length());
- int skippedLength = 0;
-
- while (!stringText.isEmpty()) {
- // Extract the first possible English word from the given string.
- // The given string may include non-ASCII characters or numbers. So, we
- // should filter out such characters before start looking up our
- // misspelled-word table.
- // (This is a simple version of our SpellCheckWordIterator class.)
- // If the given string doesn't include any ASCII characters, we can treat the
- // string as valid one.
- // Unfortunately, This implementation splits a contraction, i.e. "isn't" is
- // split into two pieces "isn" and "t". This is OK because webkit tests
- // don't have misspelled contractions.
- int wordOffset = stringText.find(isASCIIAlpha);
- if (wordOffset == -1)
- return true;
- int wordEnd = stringText.find(isNotASCIIAlpha, wordOffset);
- int wordLength = wordEnd == -1 ? static_cast<int>(stringText.length()) - wordOffset : wordEnd - wordOffset;
-
- // Look up our misspelled-word table to check if the extracted word is a
- // known misspelled word, and return the offset and the length of the
- // extracted word if this word is a known misspelled word.
- // (See the comment in MockSpellCheck::initializeIfNeeded() why we use a
- // misspelled-word table.)
- WTF::String word = stringText.substring(wordOffset, wordLength);
- if (m_misspelledWords.contains(word)) {
- *misspelledOffset = wordOffset + skippedLength;
- *misspelledLength = wordLength;
- break;
- }
-
- ASSERT(0 < wordOffset + wordLength);
- stringText = stringText.substring(wordOffset + wordLength);
- skippedLength += wordOffset + wordLength;
- }
-
- return false;
-}
-
-void MockSpellCheck::fillSuggestionList(const WebString& word, WebVector<WebString>* suggestions)
-{
- if (word == WebString::fromUTF8("wellcome")) {
- WebVector<WebString> result(suggestions->size() + 1);
- for (size_t i = 0; i < suggestions->size(); ++i)
- result[i] = (*suggestions)[i];
- result[suggestions->size()] = WebString::fromUTF8("welcome");
- suggestions->swap(result);
- }
-}
-
-bool MockSpellCheck::initializeIfNeeded()
-{
- // Exit if we have already initialized this object.
- if (m_initialized)
- return false;
-
- // Create a table that consists of misspelled words used in WebKit layout
- // tests.
- // Since WebKit layout tests don't have so many misspelled words as
- // well-spelled words, it is easier to compare the given word with misspelled
- // ones than to compare with well-spelled ones.
- static const char* misspelledWords[] = {
- // These words are known misspelled words in webkit tests.
- // If there are other misspelled words in webkit tests, please add them in
- // this array.
- "foo",
- "Foo",
- "baz",
- "fo",
- "LibertyF",
- "chello",
- "xxxtestxxx",
- "XXxxx",
- "Textx",
- "blockquoted",
- "asd",
- "Lorem",
- "Nunc",
- "Curabitur",
- "eu",
- "adlj",
- "adaasj",
- "sdklj",
- "jlkds",
- "jsaada",
- "jlda",
- "zz",
- "contentEditable",
- // The following words are used by unit tests.
- "ifmmp",
- "qwertyuiopasd",
- "qwertyuiopasdf",
- "wellcome"
- };
-
- m_misspelledWords.clear();
- for (size_t i = 0; i < arraysize(misspelledWords); ++i)
- m_misspelledWords.add(WTF::String::fromUTF8(misspelledWords[i]), false);
-
- // Mark as initialized to prevent this object from being initialized twice
- // or more.
- m_initialized = true;
-
- // Since this MockSpellCheck class doesn't download dictionaries, this
- // function always returns false.
- return false;
-}
diff --git a/Tools/DumpRenderTree/chromium/MockSpellCheck.h b/Tools/DumpRenderTree/chromium/MockSpellCheck.h
deleted file mode 100644
index b7d07878e..000000000
--- a/Tools/DumpRenderTree/chromium/MockSpellCheck.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef MockSpellCheck_h
-#define MockSpellCheck_h
-
-#include "platform/WebString.h"
-#include "platform/WebVector.h"
-#include <wtf/HashMap.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-// A mock implementation of a spell-checker used for WebKit tests.
-// This class only implements the minimal functionarities required by WebKit
-// tests, i.e. this class just compares the given string with known misspelled
-// words in webkit tests and mark them as missspelled.
-// Even though this is sufficent for webkit tests, this class is not suitable
-// for any other usages.
-class MockSpellCheck {
-public:
- MockSpellCheck();
- ~MockSpellCheck();
-
- // Checks the spellings of the specified text.
- // This function returns true if the text consists of valid words, and
- // returns false if it includes invalid words.
- // When the given text includes invalid words, this function sets the
- // position of the first invalid word to misspelledOffset, and the length of
- // the first invalid word to misspelledLength, respectively.
- // For example, when the given text is " zz zz", this function sets 3 to
- // misspelledOffset and 2 to misspelledLength, respectively.
- bool spellCheckWord(const WebKit::WebString& text,
- int* misspelledOffset,
- int* misspelledLength);
-
- void fillSuggestionList(const WebKit::WebString& word, WebKit::WebVector<WebKit::WebString>* suggestions);
-
-private:
- // Initialize the internal resources if we need to initialize it.
- // Initializing this object may take long time. To prevent from hurting
- // the performance of test_shell, we initialize this object when
- // SpellCheckWord() is called for the first time.
- // To be compliant with SpellCheck:InitializeIfNeeded(), this function
- // returns true if this object is downloading a dictionary, otherwise
- // it returns false.
- bool initializeIfNeeded();
-
- // A table that consists of misspelled words.
- HashMap<WTF::String, bool> m_misspelledWords;
-
- // A flag representing whether or not this object is initialized.
- bool m_initialized;
-};
-
-#endif // MockSpellCheck_h
diff --git a/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp b/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp
deleted file mode 100644
index 79ae9f229..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "MockWebKitPlatformSupport.h"
-
-#include "MockWebMediaStreamCenter.h"
-#include "MockWebRTCPeerConnectionHandler.h"
-#include <wtf/Assertions.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebKit;
-
-PassOwnPtr<MockWebKitPlatformSupport> MockWebKitPlatformSupport::create()
-{
- return adoptPtr(new MockWebKitPlatformSupport());
-}
-
-MockWebKitPlatformSupport::MockWebKitPlatformSupport()
-{
-}
-
-MockWebKitPlatformSupport::~MockWebKitPlatformSupport()
-{
-}
-
-void MockWebKitPlatformSupport::cryptographicallyRandomValues(unsigned char*, size_t)
-{
- CRASH();
-}
-
-#if ENABLE(MEDIA_STREAM)
-WebMediaStreamCenter* MockWebKitPlatformSupport::createMediaStreamCenter(WebMediaStreamCenterClient* client)
-{
- if (!m_mockMediaStreamCenter)
- m_mockMediaStreamCenter = adoptPtr(new MockWebMediaStreamCenter(client));
-
- return m_mockMediaStreamCenter.get();
-}
-
-WebRTCPeerConnectionHandler* MockWebKitPlatformSupport::createRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
-{
- return new MockWebRTCPeerConnectionHandler(client);
-}
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h b/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h
deleted file mode 100644
index 1e5443809..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebKitPlatformSupport.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef MockWebKitPlatformSupport_h
-#define MockWebKitPlatformSupport_h
-
-#include <public/Platform.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-class MockWebKitPlatformSupport : public WebKit::Platform {
-public:
- static PassOwnPtr<MockWebKitPlatformSupport> create();
- ~MockWebKitPlatformSupport();
-
- virtual void cryptographicallyRandomValues(unsigned char* buffer, size_t length) OVERRIDE;
-
-#if ENABLE(MEDIA_STREAM)
- virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter(WebKit::WebMediaStreamCenterClient*) OVERRIDE;
- virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*) OVERRIDE;
-#endif // ENABLE(MEDIA_STREAM)
-
-private:
- MockWebKitPlatformSupport();
-
-#if ENABLE(MEDIA_STREAM)
- OwnPtr<WebKit::WebMediaStreamCenter> m_mockMediaStreamCenter;
-#endif // ENABLE(MEDIA_STREAM)
-};
-
-#endif // MockWebKitPlatformSupport_h
diff --git a/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp b/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp
deleted file mode 100644
index e0f761934..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#if ENABLE(MEDIA_STREAM)
-
-#include "MockWebMediaStreamCenter.h"
-
-#include <public/WebAudioDestinationConsumer.h>
-#include <public/WebMediaStreamCenterClient.h>
-#include <public/WebMediaStreamComponent.h>
-#include <public/WebMediaStreamDescriptor.h>
-#include <public/WebMediaStreamSource.h>
-#include <public/WebMediaStreamSourcesRequest.h>
-#include <public/WebVector.h>
-
-using namespace WebKit;
-
-MockWebMediaStreamCenter::MockWebMediaStreamCenter(WebMediaStreamCenterClient* client)
-{
-}
-
-void MockWebMediaStreamCenter::queryMediaStreamSources(const WebMediaStreamSourcesRequest& request)
-{
- WebVector<WebMediaStreamSource> audioSources, videoSources;
- request.didCompleteQuery(audioSources, videoSources);
-}
-
-void MockWebMediaStreamCenter::didEnableMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent& component)
-{
- component.source().setReadyState(WebMediaStreamSource::ReadyStateLive);
-}
-
-void MockWebMediaStreamCenter::didDisableMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent& component)
-{
- component.source().setReadyState(WebMediaStreamSource::ReadyStateMuted);
-}
-
-bool MockWebMediaStreamCenter::didAddMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent&)
-{
- return true;
-};
-
-bool MockWebMediaStreamCenter::didRemoveMediaStreamTrack(const WebMediaStreamDescriptor&, const WebMediaStreamComponent&)
-{
- return true;
-};
-
-void MockWebMediaStreamCenter::didStopLocalMediaStream(const WebMediaStreamDescriptor& stream)
-{
- WebVector<WebMediaStreamComponent> audioComponents;
- stream.audioSources(audioComponents);
- for (size_t i = 0; i < audioComponents.size(); ++i)
- audioComponents[i].source().setReadyState(WebMediaStreamSource::ReadyStateEnded);
-
- WebVector<WebMediaStreamComponent> videoComponents;
- stream.videoSources(videoComponents);
- for (size_t i = 0; i < videoComponents.size(); ++i)
- videoComponents[i].source().setReadyState(WebMediaStreamSource::ReadyStateEnded);
-}
-
-class MockWebAudioDestinationConsumer : public WebAudioDestinationConsumer {
-public:
- virtual ~MockWebAudioDestinationConsumer() { }
- virtual void consumeAudio(const WebVector<const float*>&, size_t number_of_frames) OVERRIDE { }
-};
-
-void MockWebMediaStreamCenter::didCreateMediaStream(WebMediaStreamDescriptor& stream)
-{
- WebVector<WebMediaStreamComponent> audioComponents;
- stream.audioSources(audioComponents);
- for (size_t i = 0; i < audioComponents.size(); ++i) {
- WebMediaStreamSource source = audioComponents[i].source();
- if (source.requiresAudioConsumer()) {
- MockWebAudioDestinationConsumer* consumer = new MockWebAudioDestinationConsumer();
- source.addAudioConsumer(consumer);
- source.removeAudioConsumer(consumer);
- delete consumer;
- }
- }
-}
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h b/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h
deleted file mode 100644
index 7d532e743..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebMediaStreamCenter.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef MockWebMediaStreamCenter_h
-#define MockWebMediaStreamCenter_h
-
-#if ENABLE(MEDIA_STREAM)
-#include <public/WebMediaStreamCenter.h>
-
-namespace WebKit {
-class WebMediaStreamCenterClient;
-};
-
-class MockWebMediaStreamCenter : public WebKit::WebMediaStreamCenter {
-public:
- explicit MockWebMediaStreamCenter(WebKit::WebMediaStreamCenterClient*);
-
- virtual void queryMediaStreamSources(const WebKit::WebMediaStreamSourcesRequest&) OVERRIDE;
- virtual void didEnableMediaStreamTrack(const WebKit::WebMediaStreamDescriptor&, const WebKit::WebMediaStreamComponent&) OVERRIDE;
- virtual void didDisableMediaStreamTrack(const WebKit::WebMediaStreamDescriptor&, const WebKit::WebMediaStreamComponent&) OVERRIDE;
- virtual bool didAddMediaStreamTrack(const WebKit::WebMediaStreamDescriptor&, const WebKit::WebMediaStreamComponent&) OVERRIDE;
- virtual bool didRemoveMediaStreamTrack(const WebKit::WebMediaStreamDescriptor&, const WebKit::WebMediaStreamComponent&) OVERRIDE;
- virtual void didStopLocalMediaStream(const WebKit::WebMediaStreamDescriptor&) OVERRIDE;
- virtual void didCreateMediaStream(WebKit::WebMediaStreamDescriptor&) OVERRIDE;
-
-private:
- MockWebMediaStreamCenter() { }
-};
-
-#endif // ENABLE(MEDIA_STREAM)
-#endif // MockWebMediaStreamCenter_h
-
diff --git a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp b/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp
deleted file mode 100644
index d667d8865..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "MockWebPrerenderingSupport.h"
-
-#include <wtf/Assertions.h>
-
-MockWebPrerenderingSupport::MockWebPrerenderingSupport()
-{
- ASSERT(!current());
- initialize(this);
-}
-
-MockWebPrerenderingSupport::~MockWebPrerenderingSupport()
-{
- ASSERT(current() == this);
- shutdown();
-}
-
-void MockWebPrerenderingSupport::add(const WebKit::WebPrerender&)
-{
-}
-
-void MockWebPrerenderingSupport::cancel(const WebKit::WebPrerender&)
-{
-}
-
-void MockWebPrerenderingSupport::abandon(const WebKit::WebPrerender&)
-{
-}
diff --git a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h b/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h
deleted file mode 100644
index b5d4af53d..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebPrerenderingSupport.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef MockWebPrerenderingSupport_h
-#define MockWebPrerenderingSupport_h
-
-#include "third_party/WebKit/Source/Platform/chromium/public/WebPrerenderingSupport.h"
-
-class MockWebPrerenderingSupport : public WebKit::WebPrerenderingSupport {
-public:
- MockWebPrerenderingSupport();
- virtual ~MockWebPrerenderingSupport();
-
-private:
- void add(const WebKit::WebPrerender&) OVERRIDE;
- void cancel(const WebKit::WebPrerender&) OVERRIDE;
- void abandon(const WebKit::WebPrerender&) OVERRIDE;
-};
-
-#endif // MockWebPrerenderingSupport_h
diff --git a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
deleted file mode 100644
index cfd76de74..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#if ENABLE(MEDIA_STREAM)
-
-#include "MockWebRTCPeerConnectionHandler.h"
-
-#include "MockConstraints.h"
-#include "Task.h"
-#include <public/WebMediaConstraints.h>
-#include <public/WebMediaStreamComponent.h>
-#include <public/WebMediaStreamDescriptor.h>
-#include <public/WebRTCPeerConnectionHandlerClient.h>
-#include <public/WebRTCSessionDescription.h>
-#include <public/WebRTCSessionDescriptionRequest.h>
-#include <public/WebRTCStatsRequest.h>
-#include <public/WebRTCStatsResponse.h>
-#include <public/WebRTCVoidRequest.h>
-#include <public/WebString.h>
-#include <public/WebVector.h>
-#include <wtf/DateMath.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-class RTCSessionDescriptionRequestSuccededTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- RTCSessionDescriptionRequestSuccededTask(MockWebRTCPeerConnectionHandler* object, const WebRTCSessionDescriptionRequest& request, const WebRTCSessionDescription& result)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_request(request)
- , m_result(result)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_request.requestSucceeded(m_result);
- }
-
-private:
- WebRTCSessionDescriptionRequest m_request;
- WebRTCSessionDescription m_result;
-};
-
-class RTCSessionDescriptionRequestFailedTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- RTCSessionDescriptionRequestFailedTask(MockWebRTCPeerConnectionHandler* object, const WebRTCSessionDescriptionRequest& request)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_request(request)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_request.requestFailed("TEST_ERROR");
- }
-
-private:
- WebRTCSessionDescriptionRequest m_request;
-};
-
-class RTCStatsRequestSucceededTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- RTCStatsRequestSucceededTask(MockWebRTCPeerConnectionHandler* object, const WebKit::WebRTCStatsRequest& request, const WebKit::WebRTCStatsResponse& response)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_request(request)
- , m_response(response)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_request.requestSucceeded(m_response);
- }
-
-private:
- WebKit::WebRTCStatsRequest m_request;
- WebKit::WebRTCStatsResponse m_response;
-};
-
-class RTCVoidRequestTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- RTCVoidRequestTask(MockWebRTCPeerConnectionHandler* object, const WebRTCVoidRequest& request, bool succeeded)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_request(request)
- , m_succeeded(succeeded)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- if (m_succeeded)
- m_request.requestSucceeded();
- else
- m_request.requestFailed("TEST_ERROR");
- }
-
-private:
- WebRTCVoidRequest m_request;
- bool m_succeeded;
-};
-
-class StringDataTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- StringDataTask(MockWebRTCPeerConnectionHandler* object, const WebRTCDataChannel& dataChannel, const WebString& data)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_dataChannel(dataChannel)
- , m_data(data)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_dataChannel.dataArrived(m_data);
- }
-
-private:
- WebRTCDataChannel m_dataChannel;
- WebString m_data;
-};
-
-class CharPtrDataTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- CharPtrDataTask(MockWebRTCPeerConnectionHandler* object, const WebRTCDataChannel& dataChannel, const char* data, size_t length)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_dataChannel(dataChannel)
- , m_length(length)
- {
- m_data = new char[m_length];
- memcpy(m_data, data, m_length);
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_dataChannel.dataArrived(m_data, m_length);
- delete [] m_data;
- }
-
-private:
- WebRTCDataChannel m_dataChannel;
- char* m_data;
- size_t m_length;
-};
-
-class DataChannelReadyStateTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- DataChannelReadyStateTask(MockWebRTCPeerConnectionHandler* object, const WebRTCDataChannel& dataChannel, WebRTCDataChannel::ReadyState state)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_dataChannel(dataChannel)
- , m_state(state)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_dataChannel.readyStateChanged(m_state);
- }
-
-private:
- WebRTCDataChannel m_dataChannel;
- WebRTCDataChannel::ReadyState m_state;
-};
-
-class RTCPeerConnectionReadyStateTask : public WebMethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- RTCPeerConnectionReadyStateTask(MockWebRTCPeerConnectionHandler* object, WebRTCPeerConnectionHandlerClient* client, WebRTCPeerConnectionHandlerClient::ReadyState state)
- : WebMethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_client(client)
- , m_state(state)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_client->didChangeReadyState(m_state);
- }
-
-private:
- WebRTCPeerConnectionHandlerClient* m_client;
- WebRTCPeerConnectionHandlerClient::ReadyState m_state;
-};
-
-/////////////////////
-
-MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
- : m_client(client)
- , m_stopped(false)
- , m_streamCount(0)
-{
-}
-
-bool MockWebRTCPeerConnectionHandler::initialize(const WebRTCConfiguration&, const WebMediaConstraints& constraints)
-{
- if (MockConstraints::verifyConstraints(constraints)) {
- postTask(new RTCPeerConnectionReadyStateTask(this, m_client, WebRTCPeerConnectionHandlerClient::ReadyStateActive));
- return true;
- }
-
- return false;
-}
-
-void MockWebRTCPeerConnectionHandler::createOffer(const WebRTCSessionDescriptionRequest& request, const WebMediaConstraints& constraints)
-{
- WebString shouldSucceed;
- if (constraints.getMandatoryConstraintValue("succeed", shouldSucceed) && shouldSucceed == "true") {
- WebRTCSessionDescription sessionDescription;
- sessionDescription.initialize("offer", "local");
- postTask(new RTCSessionDescriptionRequestSuccededTask(this, request, sessionDescription));
- } else
- postTask(new RTCSessionDescriptionRequestFailedTask(this, request));
-}
-
-void MockWebRTCPeerConnectionHandler::createAnswer(const WebRTCSessionDescriptionRequest& request, const WebMediaConstraints&)
-{
- if (!m_remoteDescription.isNull()) {
- WebRTCSessionDescription sessionDescription;
- sessionDescription.initialize("answer", "local");
- postTask(new RTCSessionDescriptionRequestSuccededTask(this, request, sessionDescription));
- } else
- postTask(new RTCSessionDescriptionRequestFailedTask(this, request));
-}
-
-void MockWebRTCPeerConnectionHandler::setLocalDescription(const WebRTCVoidRequest& request, const WebRTCSessionDescription& localDescription)
-{
- if (!localDescription.isNull() && localDescription.sdp() == "local") {
- m_localDescription = localDescription;
- postTask(new RTCVoidRequestTask(this, request, true));
- } else
- postTask(new RTCVoidRequestTask(this, request, false));
-}
-
-void MockWebRTCPeerConnectionHandler::setRemoteDescription(const WebRTCVoidRequest& request, const WebRTCSessionDescription& remoteDescription)
-{
- if (!remoteDescription.isNull() && remoteDescription.sdp() == "remote") {
- m_remoteDescription = remoteDescription;
- postTask(new RTCVoidRequestTask(this, request, true));
- } else
- postTask(new RTCVoidRequestTask(this, request, false));
-}
-
-WebRTCSessionDescription MockWebRTCPeerConnectionHandler::localDescription()
-{
- return m_localDescription;
-}
-
-WebRTCSessionDescription MockWebRTCPeerConnectionHandler::remoteDescription()
-{
- return m_remoteDescription;
-}
-
-bool MockWebRTCPeerConnectionHandler::updateICE(const WebRTCConfiguration&, const WebMediaConstraints&)
-{
- m_client->didChangeICEState(WebRTCPeerConnectionHandlerClient::ICEStateGathering);
- return true;
-}
-
-bool MockWebRTCPeerConnectionHandler::addICECandidate(const WebRTCICECandidate& iceCandidate)
-{
- m_client->didGenerateICECandidate(iceCandidate);
- return true;
-}
-
-bool MockWebRTCPeerConnectionHandler::addStream(const WebMediaStreamDescriptor& stream, const WebMediaConstraints&)
-{
- m_streamCount += 1;
- m_client->didAddRemoteStream(stream);
- m_client->negotiationNeeded();
- return true;
-}
-
-void MockWebRTCPeerConnectionHandler::removeStream(const WebMediaStreamDescriptor& stream)
-{
- m_streamCount -= 1;
- m_client->didRemoveRemoteStream(stream);
- m_client->negotiationNeeded();
-}
-
-void MockWebRTCPeerConnectionHandler::getStats(const WebRTCStatsRequest& request)
-{
- WebRTCStatsResponse response = request.createResponse();
- double currentDate = WTF::jsCurrentTime();
- if (request.hasSelector()) {
- WebMediaStreamDescriptor stream = request.stream();
- WebMediaStreamComponent component = request.component();
- // FIXME: There is no check that the fetched values are valid.
- size_t reportIndex = response.addReport();
- response.addElement(reportIndex, true, currentDate);
- response.addStatistic(reportIndex, true, "type", "video");
- } else {
- for (int i = 0; i < m_streamCount; ++i) {
- size_t reportIndex = response.addReport();
- response.addElement(reportIndex, true, currentDate);
- response.addStatistic(reportIndex, true, "type", "audio");
- reportIndex = response.addReport();
- response.addElement(reportIndex, true, currentDate);
- response.addStatistic(reportIndex, true, "type", "video");
- }
- }
- postTask(new RTCStatsRequestSucceededTask(this, request, response));
-}
-
-void MockWebRTCPeerConnectionHandler::stop()
-{
- m_stopped = true;
-}
-
-bool MockWebRTCPeerConnectionHandler::openDataChannel(const WebRTCDataChannel& dataChannel)
-{
- if (m_stopped)
- return false;
-
- WebRTCDataChannel remoteDataChannel;
- remoteDataChannel.initialize("MockRemoteDataChannel", dataChannel.reliable());
- remoteDataChannel.readyStateChanged(WebRTCDataChannel::ReadyStateOpen);
- m_client->didAddRemoteDataChannel(remoteDataChannel);
-
- postTask(new DataChannelReadyStateTask(this, dataChannel, WebRTCDataChannel::ReadyStateOpen));
- return true;
-}
-
-void MockWebRTCPeerConnectionHandler::closeDataChannel(const WebRTCDataChannel& dataChannel)
-{
- postTask(new DataChannelReadyStateTask(this, dataChannel, WebRTCDataChannel::ReadyStateClosed));
-}
-
-bool MockWebRTCPeerConnectionHandler::sendStringData(const WebRTCDataChannel& dataChannel, const WebString& data)
-{
- if (m_stopped)
- return false;
-
- dataChannel.dataArrived(data);
- return true;
-}
-
-bool MockWebRTCPeerConnectionHandler::sendRawData(const WebRTCDataChannel& dataChannel, const char* data, size_t length)
-{
- if (m_stopped)
- return false;
-
- dataChannel.dataArrived(data, length);
- return true;
-}
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h
deleted file mode 100644
index a1522f4fb..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef MockWebRTCPeerConnectionHandler_h
-#define MockWebRTCPeerConnectionHandler_h
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "WebTask.h"
-#include <public/WebRTCDataChannel.h>
-#include <public/WebRTCPeerConnectionHandler.h>
-#include <public/WebRTCSessionDescription.h>
-#include <public/WebRTCSessionDescriptionRequest.h>
-#include <public/WebRTCStatsRequest.h>
-
-namespace WebKit {
-class WebRTCPeerConnectionHandlerClient;
-};
-
-class MockWebRTCPeerConnectionHandler : public WebKit::WebRTCPeerConnectionHandler {
-public:
- explicit MockWebRTCPeerConnectionHandler(WebKit::WebRTCPeerConnectionHandlerClient*);
-
- virtual bool initialize(const WebKit::WebRTCConfiguration&, const WebKit::WebMediaConstraints&) OVERRIDE;
-
- virtual void createOffer(const WebKit::WebRTCSessionDescriptionRequest&, const WebKit::WebMediaConstraints&) OVERRIDE;
- virtual void createAnswer(const WebKit::WebRTCSessionDescriptionRequest&, const WebKit::WebMediaConstraints&) OVERRIDE;
- virtual void setLocalDescription(const WebKit::WebRTCVoidRequest&, const WebKit::WebRTCSessionDescription&) OVERRIDE;
- virtual void setRemoteDescription(const WebKit::WebRTCVoidRequest&, const WebKit::WebRTCSessionDescription&) OVERRIDE;
- virtual WebKit::WebRTCSessionDescription localDescription() OVERRIDE;
- virtual WebKit::WebRTCSessionDescription remoteDescription() OVERRIDE;
- virtual bool updateICE(const WebKit::WebRTCConfiguration&, const WebKit::WebMediaConstraints&) OVERRIDE;
- virtual bool addICECandidate(const WebKit::WebRTCICECandidate&) OVERRIDE;
- virtual bool addStream(const WebKit::WebMediaStreamDescriptor&, const WebKit::WebMediaConstraints&) OVERRIDE;
- virtual void removeStream(const WebKit::WebMediaStreamDescriptor&) OVERRIDE;
- virtual void getStats(const WebKit::WebRTCStatsRequest&) OVERRIDE;
- virtual void stop() OVERRIDE;
-
- virtual bool openDataChannel(const WebKit::WebRTCDataChannel&) OVERRIDE;
- virtual bool sendStringData(const WebKit::WebRTCDataChannel&, const WebKit::WebString&) OVERRIDE;
- virtual bool sendRawData(const WebKit::WebRTCDataChannel&, const char*, size_t) OVERRIDE;
- virtual void closeDataChannel(const WebKit::WebRTCDataChannel&) OVERRIDE;
-
- // WebTask related methods
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
-private:
- MockWebRTCPeerConnectionHandler() { }
-
- WebKit::WebRTCPeerConnectionHandlerClient* m_client;
- bool m_stopped;
- WebTestRunner::WebTaskList m_taskList;
- WebKit::WebRTCSessionDescription m_localDescription;
- WebKit::WebRTCSessionDescription m_remoteDescription;
- int m_streamCount;
-};
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // MockWebRTCPeerConnectionHandler_h
-
diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
deleted file mode 100644
index 528455bd6..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-#include "MockWebSpeechInputController.h"
-
-#include "Task.h"
-#include "WebSpeechInputListener.h"
-#include "platform/WebCString.h"
-#include "platform/WebVector.h"
-#include <wtf/text/CString.h>
-#include <wtf/text/StringBuilder.h>
-
-#if ENABLE(INPUT_SPEECH)
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-PassOwnPtr<MockWebSpeechInputController> MockWebSpeechInputController::create(WebSpeechInputListener* listener)
-{
- return adoptPtr(new MockWebSpeechInputController(listener));
-}
-
-void MockWebSpeechInputController::addMockRecognitionResult(const WebString& result, double confidence, const WebString& language)
-{
- WebSpeechInputResult res;
- res.assign(result, confidence);
-
- if (language.isEmpty())
- m_resultsForEmptyLanguage.append(res);
- else {
- String langString = String::fromUTF8(language.utf8().data());
- if (!m_recognitionResults.contains(langString))
- m_recognitionResults.set(langString, Vector<WebSpeechInputResult>());
- m_recognitionResults.find(langString)->value.append(res);
- }
-}
-
-void MockWebSpeechInputController::setDumpRect(bool dumpRect)
-{
- m_dumpRect = dumpRect;
-}
-
-void MockWebSpeechInputController::clearResults()
-{
- m_resultsForEmptyLanguage.clear();
- m_recognitionResults.clear();
- m_dumpRect = false;
-}
-
-bool MockWebSpeechInputController::startRecognition(int requestId, const WebRect& elementRect, const WebString& language, const WebString& grammar, const WebSecurityOrigin& origin)
-{
- if (m_speechTask)
- return false;
-
- m_requestId = requestId;
- m_requestRect = elementRect;
- m_recording = true;
- m_language = String::fromUTF8(language.utf8().data());
-
- m_speechTask = new SpeechTask(this);
- postTask(m_speechTask);
-
- return true;
-}
-
-void MockWebSpeechInputController::cancelRecognition(int requestId)
-{
- if (m_speechTask) {
- ASSERT(requestId == m_requestId);
-
- m_speechTask->stop();
- m_recording = false;
- m_listener->didCompleteRecognition(m_requestId);
- m_requestId = 0;
- }
-}
-
-void MockWebSpeechInputController::stopRecording(int requestId)
-{
- ASSERT(requestId == m_requestId);
- if (m_speechTask && m_recording) {
- m_speechTask->stop();
- speechTaskFired();
- }
-}
-
-MockWebSpeechInputController::MockWebSpeechInputController(WebSpeechInputListener* listener)
- : m_listener(listener)
- , m_speechTask(0)
- , m_recording(false)
- , m_requestId(-1)
- , m_dumpRect(false)
-{
-}
-
-static WebSpeechInputResultArray makeRectResult(const WebRect& rect)
-{
- StringBuilder sb;
- sb.append(String::number(rect.x));
- sb.append(",");
- sb.append(String::number(rect.y));
- sb.append(",");
- sb.append(String::number(rect.width));
- sb.append(",");
- sb.append(String::number(rect.height));
-
- WebSpeechInputResult res;
- res.assign(WebString(sb.characters(), sb.length()), 1.0);
-
- WebSpeechInputResultArray results;
- results.assign(&res, 1);
- return results;
-}
-
-void MockWebSpeechInputController::speechTaskFired()
-{
- if (m_recording) {
- m_recording = false;
- m_listener->didCompleteRecording(m_requestId);
-
- m_speechTask = new SpeechTask(this);
- postTask(m_speechTask);
- } else {
- bool noResultsFound = false;
- // We take a copy of the requestId here so that if scripts destroyed the input element
- // inside one of the callbacks below, we'll still know what this session's requestId was.
- int requestId = m_requestId;
- m_requestId = 0;
-
- if (m_dumpRect) {
- m_listener->setRecognitionResult(requestId, makeRectResult(m_requestRect));
- } else if (m_language.isEmpty()) {
- // Empty language case must be handled separately to avoid problems with HashMap and empty keys.
- if (!m_resultsForEmptyLanguage.isEmpty())
- m_listener->setRecognitionResult(requestId, m_resultsForEmptyLanguage);
- else
- noResultsFound = true;
- } else {
- if (m_recognitionResults.contains(m_language))
- m_listener->setRecognitionResult(requestId, m_recognitionResults.get(m_language));
- else
- noResultsFound = true;
- }
-
- if (noResultsFound) {
- // Can't avoid setting a result even if no result was set for the given language.
- // This would avoid generating the events used to check the results and the test would timeout.
- String error("error: no result found for language '");
- error.append(m_language);
- error.append("'");
-
- WebSpeechInputResult res;
- res.assign(WebString::fromUTF8(error.utf8().data()), 1.0);
-
- Vector<WebSpeechInputResult> results;
- results.append(res);
-
- m_listener->setRecognitionResult(requestId, results);
- }
- }
-}
-
-MockWebSpeechInputController::SpeechTask::SpeechTask(MockWebSpeechInputController* mock)
- : WebMethodTask<MockWebSpeechInputController>::WebMethodTask(mock)
-{
-}
-
-void MockWebSpeechInputController::SpeechTask::stop()
-{
- m_object->m_speechTask = 0;
- cancel();
- delete(this);
-}
-
-void MockWebSpeechInputController::SpeechTask::runIfValid()
-{
- m_object->m_speechTask = 0;
- m_object->speechTaskFired();
-}
-
-#endif
diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.h b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.h
deleted file mode 100644
index 075f2541f..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef MockWebSpeechInputController_h
-#define MockWebSpeechInputController_h
-
-#if ENABLE(INPUT_SPEECH)
-
-#include "WebTask.h"
-#include "platform/WebRect.h"
-#include "WebSpeechInputController.h"
-#include "WebSpeechInputResult.h"
-#include <wtf/Compiler.h>
-#include <wtf/HashMap.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
-#include <wtf/text/AtomicString.h>
-#include <wtf/text/StringHash.h>
-
-namespace WebKit {
-class WebSecurityOrigin;
-class WebSpeechInputListener;
-class WebString;
-}
-
-class MockWebSpeechInputController : public WebKit::WebSpeechInputController {
-public:
- static PassOwnPtr<MockWebSpeechInputController> create(WebKit::WebSpeechInputListener*);
-
- void addMockRecognitionResult(const WebKit::WebString& result, double confidence, const WebKit::WebString& language);
- void setDumpRect(bool);
- void clearResults();
-
- // WebSpeechInputController implementation:
- virtual bool startRecognition(int requestId, const WebKit::WebRect& elementRect, const WebKit::WebString& language, const WebKit::WebString& grammar, const WebKit::WebSecurityOrigin&) OVERRIDE;
- virtual void cancelRecognition(int requestId) OVERRIDE;
- virtual void stopRecording(int requestId) OVERRIDE;
-
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
-private:
- MockWebSpeechInputController(WebKit::WebSpeechInputListener*);
- void speechTaskFired();
-
- class SpeechTask : public WebTestRunner::WebMethodTask<MockWebSpeechInputController> {
- public:
- SpeechTask(MockWebSpeechInputController*);
- void stop();
-
- private:
- virtual void runIfValid() OVERRIDE;
- };
-
- WebKit::WebSpeechInputListener* m_listener;
-
- WebTestRunner::WebTaskList m_taskList;
- SpeechTask* m_speechTask;
-
- bool m_recording;
- int m_requestId;
- WebKit::WebRect m_requestRect;
- String m_language;
-
- HashMap<String, Vector<WebKit::WebSpeechInputResult> > m_recognitionResults;
- Vector<WebKit::WebSpeechInputResult> m_resultsForEmptyLanguage;
- bool m_dumpRect;
-};
-
-#endif // ENABLE(INPUT_SPEECH)
-
-#endif // MockWebSpeechInputController_h
diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp b/Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp
deleted file mode 100644
index 40d3cb4ba..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-#include "MockWebSpeechRecognizer.h"
-
-#if ENABLE(SCRIPTED_SPEECH)
-
-#include "Task.h"
-#include "WebSpeechRecognitionResult.h"
-#include "WebSpeechRecognizerClient.h"
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-namespace {
-
-// Task class for calling a client function that does not take any parameters.
-typedef void (WebSpeechRecognizerClient::*ClientFunctionPointer)(const WebSpeechRecognitionHandle&);
-class ClientCallTask : public MockWebSpeechRecognizer::Task {
-public:
- ClientCallTask(MockWebSpeechRecognizer* mock, ClientFunctionPointer function)
- : MockWebSpeechRecognizer::Task(mock)
- , m_function(function)
- {
- }
-
- virtual void run() OVERRIDE { (m_recognizer->client()->*m_function)(m_recognizer->handle()); }
-
-private:
- ClientFunctionPointer m_function;
-};
-
-// Task for delivering a result event.
-class ResultTask : public MockWebSpeechRecognizer::Task {
-public:
- ResultTask(MockWebSpeechRecognizer* mock, const WebString transcript, float confidence)
- : MockWebSpeechRecognizer::Task(mock)
- , m_transcript(transcript)
- , m_confidence(confidence)
- {
- }
-
- virtual void run() OVERRIDE
- {
- WebVector<WebString> transcripts(static_cast<size_t>(1));
- WebVector<float> confidences(static_cast<size_t>(1));
- transcripts[0] = m_transcript;
- confidences[0] = m_confidence;
- WebVector<WebSpeechRecognitionResult> finalResults(static_cast<size_t>(1));
- WebVector<WebSpeechRecognitionResult> interimResults;
- finalResults[0].assign(transcripts, confidences, true);
-
- m_recognizer->client()->didReceiveResults(m_recognizer->handle(), finalResults, interimResults);
- }
-
-private:
- WebString m_transcript;
- float m_confidence;
-};
-
-// Task for delivering a nomatch event.
-class NoMatchTask : public MockWebSpeechRecognizer::Task {
-public:
- NoMatchTask(MockWebSpeechRecognizer* mock) : MockWebSpeechRecognizer::Task(mock) { }
- virtual void run() OVERRIDE { m_recognizer->client()->didReceiveNoMatch(m_recognizer->handle(), WebSpeechRecognitionResult()); }
-};
-
-// Task for delivering an error event.
-class ErrorTask : public MockWebSpeechRecognizer::Task {
-public:
- ErrorTask(MockWebSpeechRecognizer* mock, int code, const WebString& message)
- : MockWebSpeechRecognizer::Task(mock)
- , m_code(code)
- , m_message(message)
- {
- }
-
- virtual void run() OVERRIDE { m_recognizer->client()->didReceiveError(m_recognizer->handle(), m_message, static_cast<WebSpeechRecognizerClient::ErrorCode>(m_code)); }
-
-private:
- int m_code;
- WebString m_message;
-};
-
-} // namespace
-
-PassOwnPtr<MockWebSpeechRecognizer> MockWebSpeechRecognizer::create()
-{
- return adoptPtr(new MockWebSpeechRecognizer());
-}
-
-void MockWebSpeechRecognizer::start(const WebSpeechRecognitionHandle& handle, const WebSpeechRecognitionParams& params, WebSpeechRecognizerClient* client)
-{
- m_wasAborted = false;
- m_handle = handle;
- m_client = client;
-
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didStart)));
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didStartAudio)));
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didStartSound)));
-
- if (!m_mockTranscripts.isEmpty()) {
- ASSERT(m_mockTranscripts.size() == m_mockConfidences.size());
-
- for (size_t i = 0; i < m_mockTranscripts.size(); ++i)
- m_taskQueue.append(adoptPtr(new ResultTask(this, m_mockTranscripts[i], m_mockConfidences[i])));
-
- m_mockTranscripts.clear();
- m_mockConfidences.clear();
- } else
- m_taskQueue.append(adoptPtr(new NoMatchTask(this)));
-
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didEndSound)));
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didEndAudio)));
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didEnd)));
-
- startTaskQueue();
-}
-
-void MockWebSpeechRecognizer::stop(const WebSpeechRecognitionHandle& handle, WebSpeechRecognizerClient* client)
-{
- m_handle = handle;
- m_client = client;
-
- // FIXME: Implement.
- ASSERT_NOT_REACHED();
-}
-
-void MockWebSpeechRecognizer::abort(const WebSpeechRecognitionHandle& handle, WebSpeechRecognizerClient* client)
-{
- m_handle = handle;
- m_client = client;
-
- clearTaskQueue();
- m_wasAborted = true;
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didEnd)));
- startTaskQueue();
-}
-
-void MockWebSpeechRecognizer::addMockResult(const WebString& transcript, float confidence)
-{
- m_mockTranscripts.append(transcript);
- m_mockConfidences.append(confidence);
-}
-
-void MockWebSpeechRecognizer::setError(int code, const WebString& message)
-{
- clearTaskQueue();
- m_taskQueue.append(adoptPtr(new ErrorTask(this, code, message)));
- m_taskQueue.append(adoptPtr(new ClientCallTask(this, &WebSpeechRecognizerClient::didEnd)));
- startTaskQueue();
-}
-
-MockWebSpeechRecognizer::MockWebSpeechRecognizer()
- : m_wasAborted(false)
- , m_taskQueueRunning(false)
-{
-}
-
-MockWebSpeechRecognizer::~MockWebSpeechRecognizer()
-{
-}
-
-void MockWebSpeechRecognizer::startTaskQueue()
-{
- if (m_taskQueueRunning)
- return;
- postTask(new StepTask(this));
- m_taskQueueRunning = true;
-}
-
-void MockWebSpeechRecognizer::clearTaskQueue()
-{
- m_taskQueue.clear();
- m_taskQueueRunning = false;
-}
-
-void MockWebSpeechRecognizer::StepTask::runIfValid()
-{
- if (m_object->m_taskQueue.isEmpty()) {
- m_object->m_taskQueueRunning = false;
- return;
- }
-
- OwnPtr<Task> task = m_object->m_taskQueue[0].release();
- m_object->m_taskQueue.remove(0);
- task->run();
-
- if (m_object->m_taskQueue.isEmpty()) {
- m_object->m_taskQueueRunning = false;
- return;
- }
-
- postTask(new StepTask(m_object));
-}
-
-#endif // ENABLE(SCRIPTED_SPEECH)
diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.h b/Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.h
deleted file mode 100644
index 419c5e504..000000000
--- a/Tools/DumpRenderTree/chromium/MockWebSpeechRecognizer.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef MockWebSpeechRecognizer_h
-#define MockWebSpeechRecognizer_h
-
-#if ENABLE(SCRIPTED_SPEECH)
-
-#include "WebSpeechRecognizer.h"
-#include "WebTask.h"
-#include <wtf/Compiler.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebKit {
-class WebSpeechRecognitionHandle;
-class WebSpeechRecognitionParams;
-class WebSpeechRecognizerClient;
-}
-
-class MockWebSpeechRecognizer : public WebKit::WebSpeechRecognizer {
-public:
- static PassOwnPtr<MockWebSpeechRecognizer> create();
- ~MockWebSpeechRecognizer();
-
- // WebSpeechRecognizer implementation:
- virtual void start(const WebKit::WebSpeechRecognitionHandle&, const WebKit::WebSpeechRecognitionParams&, WebKit::WebSpeechRecognizerClient*) OVERRIDE;
- virtual void stop(const WebKit::WebSpeechRecognitionHandle&, WebKit::WebSpeechRecognizerClient*) OVERRIDE;
- virtual void abort(const WebKit::WebSpeechRecognitionHandle&, WebKit::WebSpeechRecognizerClient*) OVERRIDE;
-
- // Methods accessed by layout tests:
- void addMockResult(const WebKit::WebString& transcript, float confidence);
- void setError(int code, const WebKit::WebString& message);
- bool wasAborted() const { return m_wasAborted; }
-
- // Methods accessed from Task objects:
- WebKit::WebSpeechRecognizerClient* client() { return m_client; }
- WebKit::WebSpeechRecognitionHandle& handle() { return m_handle; }
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
- class Task {
- public:
- Task(MockWebSpeechRecognizer* recognizer) : m_recognizer(recognizer) { }
- virtual ~Task() { }
- virtual void run() = 0;
- protected:
- MockWebSpeechRecognizer* m_recognizer;
- };
-
-private:
- MockWebSpeechRecognizer();
- void startTaskQueue();
- void clearTaskQueue();
-
- WebTestRunner::WebTaskList m_taskList;
- WebKit::WebSpeechRecognitionHandle m_handle;
- WebKit::WebSpeechRecognizerClient* m_client;
- Vector<WebKit::WebString> m_mockTranscripts;
- Vector<float> m_mockConfidences;
- bool m_wasAborted;
-
- // Queue of tasks to be run.
- Vector<OwnPtr<Task> > m_taskQueue;
- bool m_taskQueueRunning;
-
- // Task for stepping the queue.
- class StepTask : public WebTestRunner::WebMethodTask<MockWebSpeechRecognizer> {
- public:
- StepTask(MockWebSpeechRecognizer* object) : WebTestRunner::WebMethodTask<MockWebSpeechRecognizer>(object) { }
- virtual void runIfValid() OVERRIDE;
- };
-};
-
-#endif // ENABLE(SCRIPTED_SPEECH)
-
-#endif // MockWebSpeechRecognizer_h
diff --git a/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp b/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp
deleted file mode 100644
index a21588f74..000000000
--- a/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "NotificationPresenter.h"
-
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
-
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "WebNotification.h"
-#include "WebNotificationPermissionCallback.h"
-#include "WebSecurityOrigin.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include "googleurl/src/gurl.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(void* context)
-{
- WebNotification* notification = static_cast<WebNotification*>(context);
- notification->dispatchDisplayEvent();
- delete notification;
-}
-
-NotificationPresenter::~NotificationPresenter()
-{
-}
-
-void NotificationPresenter::grantPermission(const WebString& origin)
-{
- m_allowedOrigins.add(WTF::String(origin.data(), origin.length()));
-}
-
-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)->value;
- 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)->value.utf8().data());
-
- m_replacements.set(replaceId, WTF::String(identifier.data(), identifier.length()));
- }
-
- if (notification.isHTML()) {
- printf("DESKTOP NOTIFICATION: contents at %s\n",
- notification.url().spec().data());
- } else {
- printf("DESKTOP NOTIFICATION:%s icon %s, title %s, text %s\n",
- notification.direction() == WebTextDirectionRightToLeft ? "(RTL)" : "",
- notification.iconURL().isEmpty() ? "" :
- notification.iconURL().spec().data(),
- notification.title().isEmpty() ? "" :
- notification.title().utf8().data(),
- notification.body().isEmpty() ? "" :
- notification.body().utf8().data());
- }
-
- WTF::String id(identifier.data(), identifier.length());
- m_activeNotifications.set(id, notification);
-
- webKitPlatformSupport()->callOnMainThread(deferredDisplayDispatch, new WebNotification(notification));
- return true;
-}
-
-void NotificationPresenter::cancel(const WebNotification& notification)
-{
- 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)
-{
- WebString identifier = identifierForNotification(notification);
- WTF::String id(identifier.data(), identifier.length());
- m_activeNotifications.remove(id);
-}
-
-WebNotificationPresenter::Permission NotificationPresenter::checkPermission(const WebSecurityOrigin& origin)
-{
- // Check with the layout test controller
- WebString originString = origin.toString();
- bool allowed = m_allowedOrigins.find(WTF::String(originString.data(), originString.length())) != m_allowedOrigins.end();
- return allowed ? WebNotificationPresenter::PermissionAllowed
- : WebNotificationPresenter::PermissionDenied;
-}
-
-void NotificationPresenter::requestPermission(
- const WebSecurityOrigin& origin,
- WebNotificationPermissionCallback* callback)
-{
- printf("DESKTOP NOTIFICATION PERMISSION REQUESTED: %s\n",
- origin.toString().utf8().data());
- callback->permissionRequestComplete();
-}
-
-#endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
diff --git a/Tools/DumpRenderTree/chromium/NotificationPresenter.h b/Tools/DumpRenderTree/chromium/NotificationPresenter.h
deleted file mode 100644
index e98cc7294..000000000
--- a/Tools/DumpRenderTree/chromium/NotificationPresenter.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef NotificationPresenter_h
-#define NotificationPresenter_h
-
-#include "WebNotification.h"
-#include "WebNotificationPresenter.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/WTFString.h>
-
-class TestShell;
-
-// A class that implements WebNotificationPresenter for DRT.
-class NotificationPresenter : public WebKit::WebNotificationPresenter {
-public:
- explicit NotificationPresenter(TestShell*) { }
- virtual ~NotificationPresenter();
-
- // Called by the DRTTestRunner to simulate a user granting permission.
- void grantPermission(const WebKit::WebString& origin);
-
- // Called by the DRTTestRunner 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&);
- virtual void objectDestroyed(const WebKit::WebNotification&);
- virtual Permission checkPermission(const WebKit::WebSecurityOrigin&);
- virtual void requestPermission(const WebKit::WebSecurityOrigin&, WebKit::WebNotificationPermissionCallback*);
-
- void reset() { m_allowedOrigins.clear(); }
-
-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;
-};
-
-#endif // NotificationPresenter_h
diff --git a/Tools/DumpRenderTree/chromium/Task.cpp b/Tools/DumpRenderTree/chromium/Task.cpp
deleted file mode 100644
index a619017f5..000000000
--- a/Tools/DumpRenderTree/chromium/Task.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "Task.h"
-
-#include "WebKit.h"
-#include "WebTask.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "webkit/support/webkit_support.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-namespace {
-
-void invokeTask(void* context)
-{
- WebTask* task = static_cast<WebTask*>(context);
- task->run();
- delete task;
-}
-
-class TaskWrapper : public webkit_support::TaskAdaptor {
-public:
- explicit TaskWrapper(WebTask* task)
- : m_task(adoptPtr(task))
- {
- }
- virtual ~TaskWrapper() { }
- virtual void Run()
- {
- m_task->run();
- }
-
-private:
- OwnPtr<WebTask> m_task;
-};
-
-}
-
-void postTask(WebTask* task)
-{
- webKitPlatformSupport()->callOnMainThread(invokeTask, static_cast<void*>(task));
-}
-
-void postDelayedTask(WebTask* task, long long ms)
-{
- webkit_support::PostDelayedTask(new TaskWrapper(task), ms);
-}
diff --git a/Tools/DumpRenderTree/chromium/Task.h b/Tools/DumpRenderTree/chromium/Task.h
deleted file mode 100644
index c8755a83c..000000000
--- a/Tools/DumpRenderTree/chromium/Task.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef Task_h
-#define Task_h
-
-namespace WebTestRunner {
-class WebTask;
-}
-
-void postTask(WebTestRunner::WebTask*);
-void postDelayedTask(WebTestRunner::WebTask*, long long ms);
-
-#endif // Task_h
diff --git a/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp b/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp
deleted file mode 100644
index aa2bf830f..000000000
--- a/Tools/DumpRenderTree/chromium/TestEventPrinter.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "TestEventPrinter.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <wtf/Assertions.h>
-#include <wtf/text/Base64.h>
-
-TestEventPrinter::TestEventPrinter()
- : m_encodeBinary(false)
-{
-}
-
-TestEventPrinter::~TestEventPrinter()
-{
-}
-
-// ----------------------------------------------------------------
-
-void TestEventPrinter::handleTestHeader(const char*) const
-{
-}
-
-void TestEventPrinter::handleTimedOut() const
-{
- fprintf(stderr, "FAIL: Timed out waiting for notifyDone to be called\n");
- fprintf(stdout, "FAIL: Timed out waiting for notifyDone to be called\n");
-}
-
-void TestEventPrinter::handleTextHeader() const
-{
- printf("Content-Type: text/plain\n");
-}
-
-void TestEventPrinter::handleTextFooter() const
-{
- printf("#EOF\n");
-}
-
-void TestEventPrinter::handleAudio(const void* audioData, size_t audioSize) const
-{
- printf("Content-Type: audio/wav\n");
- handleBinary(audioData, audioSize);
-}
-
-void TestEventPrinter::handleAudioFooter() const
-{
- printf("#EOF\n");
- fprintf(stderr, "#EOF\n");
-}
-
-void TestEventPrinter::handleImage(const char* actualHash, const char* expectedHash, const void* imageData, size_t imageSize) const
-{
- ASSERT(actualHash);
- printf("\nActualHash: %s\n", actualHash);
- if (expectedHash && expectedHash[0])
- printf("\nExpectedHash: %s\n", expectedHash);
- if (imageData && imageSize) {
- printf("Content-Type: image/png\n");
- handleBinary(imageData, imageSize);
- }
-}
-
-void TestEventPrinter::handleTestFooter(bool) const
-{
- printf("#EOF\n");
- fprintf(stderr, "#EOF\n");
-}
-
-void TestEventPrinter::handleBinary(const void* data, size_t size) const
-{
- Vector<char> base64;
- if (m_encodeBinary) {
- base64Encode(static_cast<const char*>(data), size, base64, Base64InsertLFs);
- data = base64.data();
- size = base64.size();
- printf("Content-Transfer-Encoding: base64\n");
- }
- // Printf formatting for size_t on 32-bit, 64-bit, and on Windows is hard so just cast to an int.
- printf("Content-Length: %d\n", static_cast<int>(size));
- if (fwrite(data, 1, size, stdout) != size) {
- fprintf(stderr, "Short write to stdout.\n");
- exit(1);
- }
-}
diff --git a/Tools/DumpRenderTree/chromium/TestEventPrinter.h b/Tools/DumpRenderTree/chromium/TestEventPrinter.h
deleted file mode 100644
index c1a7e2dcd..000000000
--- a/Tools/DumpRenderTree/chromium/TestEventPrinter.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef TestEventPrinter_h
-#define TestEventPrinter_h
-
-#include <wtf/PassOwnPtr.h>
-
-class TestEventPrinter {
-public:
- TestEventPrinter();
- ~TestEventPrinter();
- void handleTestHeader(const char* url) const;
- void handleTimedOut() const;
- void handleTextHeader() const;
- void handleTextFooter() const;
- void handleAudio(const void* audioData, size_t audioSize) const;
- void handleAudioFooter() const;
- void handleImage(const char* actualHash, const char* expectedHash, const void* imageData, size_t imageSize) const;
- void handleTestFooter(bool dumpedAnything) const;
-
- // Set if binary output data should be encoded in base64. Default is off.
- void setEncodeBinary(bool encodeBinary) { m_encodeBinary = encodeBinary; }
-
-private:
- void handleBinary(const void* data, size_t) const;
-
- bool m_encodeBinary;
-};
-
-#endif // TestEventPrinter_h
diff --git a/Tools/DumpRenderTree/chromium/TestNavigationController.cpp b/Tools/DumpRenderTree/chromium/TestNavigationController.cpp
deleted file mode 100644
index ad6fcfff4..000000000
--- a/Tools/DumpRenderTree/chromium/TestNavigationController.cpp
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "TestNavigationController.h"
-
-#include "TestShell.h"
-#include <wtf/Assertions.h>
-
-using namespace WebKit;
-using namespace std;
-
-// ----------------------------------------------------------------------------
-// TestNavigationEntry
-
-PassRefPtr<TestNavigationEntry> TestNavigationEntry::create()
-{
- return adoptRef(new TestNavigationEntry);
-}
-
-PassRefPtr<TestNavigationEntry> TestNavigationEntry::create(
- int pageID, const WebURL& url, const WebString& title, const WebString& targetFrame)
-{
- return adoptRef(new TestNavigationEntry(pageID, url, title, targetFrame));
-}
-
-TestNavigationEntry::TestNavigationEntry()
- : m_pageID(-1) { }
-
-TestNavigationEntry::TestNavigationEntry(
- int pageID, const WebURL& url, const WebString& title, const WebString& targetFrame)
- : m_pageID(pageID)
- , m_url(url)
- , m_title(title)
- , m_targetFrame(targetFrame) { }
-
-TestNavigationEntry::~TestNavigationEntry() { }
-
-void TestNavigationEntry::setContentState(const WebHistoryItem& state)
-{
- m_state = state;
-}
-
-// ----------------------------------------------------------------------------
-// TestNavigationController
-
-TestNavigationController::TestNavigationController(NavigationHost* host)
- : m_pendingEntry(0)
- , m_lastCommittedEntryIndex(-1)
- , m_pendingEntryIndex(-1)
- , m_host(host)
- , m_maxPageID(-1) { }
-
-TestNavigationController::~TestNavigationController()
-{
- discardPendingEntry();
-}
-
-void TestNavigationController::reset()
-{
- m_entries.clear();
- discardPendingEntry();
-
- m_lastCommittedEntryIndex = -1;
-}
-
-void TestNavigationController::reload()
-{
- // Base the navigation on where we are now...
- int currentIndex = currentEntryIndex();
-
- // If we are no where, then we can't reload.
- // FIXME: We should add a CanReload method.
- if (currentIndex == -1)
- return;
-
- discardPendingEntry();
-
- m_pendingEntryIndex = currentIndex;
- navigateToPendingEntry(true);
-}
-
-void TestNavigationController::goToOffset(int offset)
-{
- int index = m_lastCommittedEntryIndex + offset;
- if (index < 0 || index >= entryCount())
- return;
-
- goToIndex(index);
-}
-
-void TestNavigationController::goToIndex(int index)
-{
- ASSERT(index >= 0);
- ASSERT(index < static_cast<int>(m_entries.size()));
-
- discardPendingEntry();
-
- m_pendingEntryIndex = index;
- navigateToPendingEntry(false);
-}
-
-void TestNavigationController::loadEntry(TestNavigationEntry* entry)
-{
- // When navigating to a new page, we don't know for sure if we will actually
- // end up leaving the current page. The new page load could for example
- // result in a download or a 'no content' response (e.g., a mailto: URL).
- discardPendingEntry();
- m_pendingEntry = entry;
- navigateToPendingEntry(false);
-}
-
-
-TestNavigationEntry* TestNavigationController::lastCommittedEntry() const
-{
- if (m_lastCommittedEntryIndex == -1)
- return 0;
- return m_entries[m_lastCommittedEntryIndex].get();
-}
-
-TestNavigationEntry* TestNavigationController::activeEntry() const
-{
- TestNavigationEntry* entry = m_pendingEntry.get();
- if (!entry)
- entry = lastCommittedEntry();
- return entry;
-}
-
-int TestNavigationController::currentEntryIndex() const
-{
- if (m_pendingEntryIndex != -1)
- return m_pendingEntryIndex;
- return m_lastCommittedEntryIndex;
-}
-
-
-TestNavigationEntry* TestNavigationController::entryAtIndex(int index) const
-{
- if (index < 0 || index >= entryCount())
- return 0;
- return m_entries[index].get();
-}
-
-TestNavigationEntry* TestNavigationController::entryWithPageID(int32_t pageID) const
-{
- int index = entryIndexWithPageID(pageID);
- return (index != -1) ? m_entries[index].get() : 0;
-}
-
-void TestNavigationController::didNavigateToEntry(TestNavigationEntry* entry)
-{
- // If the entry is that of a page with PageID larger than any this Tab has
- // seen before, then consider it a new navigation.
- if (entry->pageID() > maxPageID()) {
- insertEntry(entry);
- return;
- }
-
- // Otherwise, we just need to update an existing entry with matching PageID.
- // If the existing entry corresponds to the entry which is pending, then we
- // must update the current entry index accordingly. When navigating to the
- // same URL, a new PageID is not created.
-
- int existingEntryIndex = entryIndexWithPageID(entry->pageID());
- TestNavigationEntry* existingEntry = (existingEntryIndex != -1) ?
- m_entries[existingEntryIndex].get() : 0;
- if (!existingEntry) {
- // No existing entry, then simply ignore this navigation!
- } else if (existingEntry == m_pendingEntry.get()) {
- // The given entry might provide a new URL... e.g., navigating back to a
- // page in session history could have resulted in a new client redirect.
- existingEntry->setURL(entry->URL());
- existingEntry->setContentState(entry->contentState());
- m_lastCommittedEntryIndex = m_pendingEntryIndex;
- m_pendingEntryIndex = -1;
- m_pendingEntry.clear();
- } else if (m_pendingEntry && m_pendingEntry->pageID() == -1
- && GURL(m_pendingEntry->URL()) == GURL(existingEntry->URL().spec())) {
- // Not a new navigation
- discardPendingEntry();
- } else {
- // The given entry might provide a new URL... e.g., navigating to a page
- // might result in a client redirect, which should override the URL of the
- // existing entry.
- existingEntry->setURL(entry->URL());
- existingEntry->setContentState(entry->contentState());
-
- // The navigation could have been issued by the renderer, so be sure that
- // we update our current index.
- m_lastCommittedEntryIndex = existingEntryIndex;
- }
-
- updateMaxPageID();
-}
-
-void TestNavigationController::discardPendingEntry()
-{
- m_pendingEntry.clear();
- m_pendingEntryIndex = -1;
-}
-
-void TestNavigationController::insertEntry(TestNavigationEntry* entry)
-{
- discardPendingEntry();
-
- // Prune any entry which are in front of the current entry
- int currentSize = static_cast<int>(m_entries.size());
- if (currentSize > 0) {
- while (m_lastCommittedEntryIndex < (currentSize - 1)) {
- m_entries.removeLast();
- currentSize--;
- }
- }
-
- m_entries.append(RefPtr<TestNavigationEntry>(entry));
- m_lastCommittedEntryIndex = static_cast<int>(m_entries.size()) - 1;
- updateMaxPageID();
-}
-
-int TestNavigationController::entryIndexWithPageID(int32 pageID) const
-{
- for (int i = static_cast<int>(m_entries.size()) - 1; i >= 0; --i) {
- if (m_entries[i]->pageID() == pageID)
- return i;
- }
- return -1;
-}
-
-void TestNavigationController::navigateToPendingEntry(bool reload)
-{
- // For session history navigations only the pending_entry_index_ is set.
- if (!m_pendingEntry) {
- ASSERT(m_pendingEntryIndex != -1);
- m_pendingEntry = m_entries[m_pendingEntryIndex];
- }
-
- if (m_host->navigate(*m_pendingEntry.get(), reload)) {
- // Note: this is redundant if navigation completed synchronously because
- // DidNavigateToEntry call this as well.
- updateMaxPageID();
- } else
- discardPendingEntry();
-}
-
-void TestNavigationController::updateMaxPageID()
-{
- TestNavigationEntry* entry = activeEntry();
- if (entry)
- m_maxPageID = max(m_maxPageID, entry->pageID());
-}
diff --git a/Tools/DumpRenderTree/chromium/TestNavigationController.h b/Tools/DumpRenderTree/chromium/TestNavigationController.h
deleted file mode 100644
index f23a2ae92..000000000
--- a/Tools/DumpRenderTree/chromium/TestNavigationController.h
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef TestNavigationController_h
-#define TestNavigationController_h
-
-#include "WebDataSource.h"
-#include "WebHistoryItem.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include "webkit/support/webkit_support.h"
-#include <string>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
-
-// Associated with browser-initated navigations to hold tracking data.
-class TestShellExtraData : public WebKit::WebDataSource::ExtraData {
-public:
- TestShellExtraData(int32_t pendingPageID)
- : pendingPageID(pendingPageID)
- , requestCommitted(false) { }
-
- // Contains the page_id for this navigation or -1 if there is none yet.
- int32_t pendingPageID;
-
- // True if we have already processed the "DidCommitLoad" event for this
- // request. Used by session history.
- bool requestCommitted;
-};
-
-// Stores one back/forward navigation state for the test shell.
-class TestNavigationEntry: public RefCounted<TestNavigationEntry> {
-public:
- static PassRefPtr<TestNavigationEntry> create();
- static PassRefPtr<TestNavigationEntry> create(
- int pageID,
- const WebKit::WebURL&,
- const WebKit::WebString& title,
- const WebKit::WebString& targetFrame);
-
- // Virtual to allow test_shell to extend the class.
- virtual ~TestNavigationEntry();
-
- // Set / Get the URI
- void setURL(const WebKit::WebURL& url) { m_url = url; }
- const WebKit::WebURL& URL() const { return m_url; }
-
- // Set / Get the title
- void setTitle(const WebKit::WebString& title) { m_title = title; }
- const WebKit::WebString& title() const { return m_title; }
-
- // Set / Get a state.
- void setContentState(const WebKit::WebHistoryItem&);
- const WebKit::WebHistoryItem& contentState() const { return m_state; }
-
- // Get the page id corresponding to the tab's state.
- void setPageID(int pageID) { m_pageID = pageID; }
- int32_t pageID() const { return m_pageID; }
-
- const WebKit::WebString& targetFrame() const { return m_targetFrame; }
-
-private:
- TestNavigationEntry();
- TestNavigationEntry(int pageID,
- const WebKit::WebURL&,
- const WebKit::WebString& title,
- const WebKit::WebString& targetFrame);
-
- // Describes the current page that the tab represents. This is not relevant
- // for all tab contents types.
- int32_t m_pageID;
-
- WebKit::WebURL m_url;
- WebKit::WebString m_title;
- WebKit::WebHistoryItem m_state;
- WebKit::WebString m_targetFrame;
-};
-
-class NavigationHost {
-public:
- virtual bool navigate(const TestNavigationEntry&, bool reload) = 0;
-};
-
-// Test shell's NavigationController. The goal is to be as close to the Chrome
-// version as possible.
-class TestNavigationController {
- WTF_MAKE_NONCOPYABLE(TestNavigationController);
-public:
- TestNavigationController(NavigationHost*);
- ~TestNavigationController();
-
- void reset();
-
- // Causes the controller to reload the current (or pending) entry.
- void reload();
-
- // Causes the controller to go to the specified offset from current. Does
- // nothing if out of bounds.
- void goToOffset(int);
-
- // Causes the controller to go to the specified index.
- void goToIndex(int);
-
- // Causes the controller to load the specified entry.
- // NOTE: Do not pass an entry that the controller already owns!
- void loadEntry(TestNavigationEntry*);
-
- // Returns the last committed entry, which may be null if there are no
- // committed entries.
- TestNavigationEntry* lastCommittedEntry() const;
-
- // Returns the number of entries in the NavigationControllerBase, excluding
- // the pending entry if there is one.
- int entryCount() const { return static_cast<int>(m_entries.size()); }
-
- // Returns the active entry, which is the pending entry if a navigation is in
- // progress or the last committed entry otherwise. NOTE: This can be 0!!
- //
- // If you are trying to get the current state of the NavigationControllerBase,
- // this is the method you will typically want to call.
- TestNavigationEntry* activeEntry() const;
-
- // Returns the index from which we would go back/forward or reload. This is
- // the m_lastCommittedEntryIndex if m_pendingEntryIndex is -1. Otherwise,
- // it is the m_pendingEntryIndex.
- int currentEntryIndex() const;
-
- // Returns the entry at the specified index. Returns 0 if out of bounds.
- TestNavigationEntry* entryAtIndex(int) const;
-
- // Return the entry with the corresponding type and page ID, or 0 if
- // not found.
- TestNavigationEntry* entryWithPageID(int32_t) const;
-
- // Returns the index of the last committed entry.
- int lastCommittedEntryIndex() const { return m_lastCommittedEntryIndex; }
-
- // Used to inform us of a navigation being committed for a tab. Any entry
- // located forward to the current entry will be deleted. The new entry
- // becomes the current entry.
- void didNavigateToEntry(TestNavigationEntry*);
-
- // Used to inform us to discard its pending entry.
- void discardPendingEntry();
-
-private:
- // Inserts an entry after the current position, removing all entries after it.
- // The new entry will become the active one.
- void insertEntry(TestNavigationEntry*);
-
- int maxPageID() const { return m_maxPageID; }
- void navigateToPendingEntry(bool reload);
-
- // Return the index of the entry with the corresponding type and page ID,
- // or -1 if not found.
- int entryIndexWithPageID(int32_t) const;
-
- // Updates the max page ID with that of the given entry, if is larger.
- void updateMaxPageID();
-
- // List of NavigationEntry for this tab
- typedef Vector<RefPtr<TestNavigationEntry> > NavigationEntryList;
- typedef NavigationEntryList::iterator NavigationEntryListIterator;
- NavigationEntryList m_entries;
-
- // An entry we haven't gotten a response for yet. This will be discarded
- // when we navigate again. It's used only so we know what the currently
- // displayed tab is.
- RefPtr<TestNavigationEntry> m_pendingEntry;
-
- // currently visible entry
- int m_lastCommittedEntryIndex;
-
- // index of pending entry if it is in entries_, or -1 if pending_entry_ is a
- // new entry (created by LoadURL).
- int m_pendingEntryIndex;
-
- NavigationHost* m_host;
- int m_maxPageID;
-};
-
-#endif // TestNavigationController_h
-
diff --git a/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h b/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h
deleted file mode 100644
index 9fa3fff3b..000000000
--- a/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "bindings/npapi.h"
-
-// These are defined in WebCore/brdige/npapi.h and we need them on Linux/Win.
-#ifndef FALSE
-#define FALSE (0)
-#endif
-#ifndef TRUE
-#define TRUE (1)
-#endif
diff --git a/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h b/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h
deleted file mode 100644
index 59ae666b9..000000000
--- a/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "npapi.h"
-#include "bindings/npfunctions.h"
-
-// Non-standard event types can be passed to HandleEvent.
-// npapi.h that comes with WebKit.framework adds these events.
-#define getFocusEvent (osEvt + 16)
-#define loseFocusEvent (osEvt + 17)
-#define adjustCursorEvent (osEvt + 18)
diff --git a/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h b/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h
deleted file mode 100644
index 597d4ad7c..000000000
--- a/Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h
+++ /dev/null
@@ -1 +0,0 @@
-#include "bindings/npruntime.h"
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h
deleted file mode 100644
index f2ec50869..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebAccessibilityController.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebAccessibilityController_h
-#define WebAccessibilityController_h
-
-namespace WebKit {
-class WebAccessibilityObject;
-}
-
-namespace WebTestRunner {
-
-class AccessibilityController;
-
-class WebAccessibilityController {
-public:
-#if WEBTESTRUNNER_IMPLEMENTATION
- explicit WebAccessibilityController(AccessibilityController*);
-#endif
-
- void setFocusedElement(const WebKit::WebAccessibilityObject&);
- void notificationReceived(const WebKit::WebAccessibilityObject& target, const char* notificationName);
- bool shouldLogAccessibilityEvents();
-
-private:
- AccessibilityController* m_private;
-};
-
-}
-
-#endif // WebAccessibilityController_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebEventSender.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebEventSender.h
deleted file mode 100644
index 47c59efe6..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebEventSender.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebEventSender_h
-#define WebEventSender_h
-
-#include "WebKit/chromium/public/WebDragOperation.h"
-
-namespace WebKit {
-class WebDragData;
-}
-
-namespace WebTestRunner {
-
-class EventSender;
-
-class WebEventSender {
-public:
-#if WEBTESTRUNNER_IMPLEMENTATION
- explicit WebEventSender(EventSender*);
-#endif
-
- // Simulate drag&drop system call.
- void doDragDrop(const WebKit::WebDragData&, WebKit::WebDragOperationsMask);
-
-private:
- EventSender* m_private;
-};
-
-}
-
-#endif // WebEventSender_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTask.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebTask.h
deleted file mode 100644
index ef73e177e..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTask.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef WebTask_h
-#define WebTask_h
-
-namespace WebTestRunner {
-
-class WebTaskList;
-
-// WebTask represents a task which can run by WebTestDelegate::postTask() or
-// WebTestDelegate::postDelayedTask().
-class WebTask {
-public:
- explicit WebTask(WebTaskList*);
- virtual ~WebTask();
-
- // The main code of this task.
- // An implementation of run() should return immediately if cancel() was called.
- virtual void run() = 0;
- virtual void cancel() = 0;
-
-protected:
- WebTaskList* m_taskList;
-};
-
-class WebTaskList {
-public:
- WebTaskList();
- ~WebTaskList();
- void registerTask(WebTask*);
- void unregisterTask(WebTask*);
- void revokeAll();
-
-private:
- class Private;
- Private* m_private;
-};
-
-// A task containing an object pointer of class T. Derived classes should
-// override runIfValid() which in turn can safely invoke methods on the
-// m_object. The Class T must have "WebTaskList* taskList()".
-template<class T>
-class WebMethodTask : public WebTask {
-public:
- explicit WebMethodTask(T* object)
- : WebTask(object->taskList())
- , m_object(object)
- {
- }
-
- virtual ~WebMethodTask() { }
-
- virtual void run()
- {
- if (m_object)
- runIfValid();
- }
-
- virtual void cancel()
- {
- m_object = 0;
- m_taskList->unregisterTask(this);
- m_taskList = 0;
- }
-
- virtual void runIfValid() = 0;
-
-protected:
- T* m_object;
-};
-
-}
-
-#endif // WebTask_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h
deleted file mode 100644
index ab47d4f9d..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestDelegate.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebTestDelegate_h
-#define WebTestDelegate_h
-
-#include "Platform/chromium/public/WebString.h"
-#include "Platform/chromium/public/WebVector.h"
-
-namespace WebKit {
-struct WebContextMenuData;
-class WebGamepads;
-}
-
-namespace WebTestRunner {
-
-class WebTask;
-
-class WebTestDelegate {
-public:
- virtual void clearContextMenuData() = 0;
- virtual void clearEditCommand() = 0;
- virtual void fillSpellingSuggestionList(const WebKit::WebString& word, WebKit::WebVector<WebKit::WebString>* suggestions) = 0;
- virtual void setEditCommand(const std::string& name, const std::string& value) = 0;
- virtual WebKit::WebContextMenuData* lastContextMenuData() const = 0;
- virtual void setGamepadData(const WebKit::WebGamepads&) = 0;
- virtual void printMessage(const std::string& message) = 0;
-
- // The delegate takes ownership of the WebTask objects and is responsible
- // for deleting them.
- virtual void postTask(WebTask*) = 0;
- virtual void postDelayedTask(WebTask*, long long ms) = 0;
-
- virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) = 0;
- virtual long long getCurrentTimeInMillisecond() = 0;
- virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) = 0;
-};
-
-}
-
-#endif // WebTestDelegate_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h
deleted file mode 100644
index 52520a6b5..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestInterfaces.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebTestInterfaces_h
-#define WebTestInterfaces_h
-
-namespace WebKit {
-class WebFrame;
-class WebView;
-}
-
-namespace WebTestRunner {
-
-class WebAccessibilityController;
-class WebEventSender;
-class WebTestDelegate;
-
-class WebTestInterfaces {
-public:
- WebTestInterfaces();
- ~WebTestInterfaces();
-
- void setWebView(WebKit::WebView*);
- void setDelegate(WebTestDelegate*);
- void bindTo(WebKit::WebFrame*);
- void resetAll();
-
- WebAccessibilityController* accessibilityController();
- WebEventSender* eventSender();
-
-private:
- class Internal;
- Internal* m_internal;
-};
-
-}
-
-#endif // WebTestInterfaces_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h b/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h
deleted file mode 100644
index b4a593cee..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/public/WebTestProxy.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebTestProxy_h
-#define WebTestProxy_h
-
-#include "Platform/chromium/public/WebRect.h"
-#include "WebKit/chromium/public/WebAccessibilityNotification.h"
-#include "WebKit/chromium/public/WebDragOperation.h"
-#include "WebKit/chromium/public/WebNavigationPolicy.h"
-
-namespace WebKit {
-class WebAccessibilityObject;
-class WebDragData;
-class WebFrame;
-class WebImage;
-struct WebPoint;
-struct WebSize;
-}
-
-namespace WebTestRunner {
-
-class WebTestDelegate;
-class WebTestInterfaces;
-
-class WebTestProxyBase {
-public:
- void setInterfaces(WebTestInterfaces*);
- void setDelegate(WebTestDelegate*);
-
- void setPaintRect(const WebKit::WebRect&);
- WebKit::WebRect paintRect() const;
-
-protected:
- WebTestProxyBase();
- ~WebTestProxyBase();
-
- void didInvalidateRect(const WebKit::WebRect&);
- void didScrollRect(int, int, const WebKit::WebRect&);
- void scheduleComposite();
- void scheduleAnimation();
- void setWindowRect(const WebKit::WebRect&);
- void show(WebKit::WebNavigationPolicy);
- void didAutoResize(const WebKit::WebSize&);
- void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification);
- void startDragging(WebKit::WebFrame*, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebImage&, const WebKit::WebPoint&);
-
-private:
- WebTestInterfaces* m_testInterfaces;
- WebTestDelegate* m_delegate;
-
- WebKit::WebRect m_paintRect;
-};
-
-// Use this template to inject methods into your WebViewClient implementation
-// required for the running layout tests.
-template<class WebViewClientImpl, typename T>
-class WebTestProxy : public WebViewClientImpl, public WebTestProxyBase {
-public:
- explicit WebTestProxy(T t)
- : WebViewClientImpl(t)
- {
- }
-
- virtual ~WebTestProxy() { }
-
- virtual void didInvalidateRect(const WebKit::WebRect& rect)
- {
- WebTestProxyBase::didInvalidateRect(rect);
- WebViewClientImpl::didInvalidateRect(rect);
- }
- virtual void didScrollRect(int dx, int dy, const WebKit::WebRect& clipRect)
- {
- WebTestProxyBase::didScrollRect(dx, dy, clipRect);
- WebViewClientImpl::didScrollRect(dx, dy, clipRect);
- }
- virtual void scheduleComposite()
- {
- WebTestProxyBase::scheduleComposite();
- WebViewClientImpl::scheduleComposite();
- }
- virtual void scheduleAnimation()
- {
- WebTestProxyBase::scheduleAnimation();
- WebViewClientImpl::scheduleAnimation();
- }
- virtual void setWindowRect(const WebKit::WebRect& rect)
- {
- WebTestProxyBase::setWindowRect(rect);
- WebViewClientImpl::setWindowRect(rect);
- }
- virtual void show(WebKit::WebNavigationPolicy policy)
- {
- WebTestProxyBase::show(policy);
- WebViewClientImpl::show(policy);
- }
- virtual void didAutoResize(const WebKit::WebSize& newSize)
- {
- WebTestProxyBase::didAutoResize(newSize);
- WebViewClientImpl::didAutoResize(newSize);
- }
- virtual void postAccessibilityNotification(const WebKit::WebAccessibilityObject& object, WebKit::WebAccessibilityNotification notification)
- {
- WebTestProxyBase::postAccessibilityNotification(object, notification);
- WebViewClientImpl::postAccessibilityNotification(object, notification);
- }
- virtual void startDragging(WebKit::WebFrame* frame, const WebKit::WebDragData& data, WebKit::WebDragOperationsMask mask, const WebKit::WebImage& image, const WebKit::WebPoint& point)
- {
- WebTestProxyBase::startDragging(frame, data, mask, image, point);
- WebViewClientImpl::startDragging(frame, data, mask, image, point);
- }
-};
-
-}
-
-#endif // WebTestProxy_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp
deleted file mode 100644
index 5f1b4f9a9..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "AccessibilityControllerChromium.h"
-
-#include "TestDelegate.h"
-#include "WebAccessibilityObject.h"
-#include "WebElement.h"
-#include "WebFrame.h"
-#include "WebNode.h"
-#include "WebView.h"
-#include "platform/WebCString.h"
-
-using namespace WebKit;
-
-namespace WebTestRunner {
-
-AccessibilityController::AccessibilityController()
- : m_logAccessibilityEvents(false)
-{
-
- bindMethod("logAccessibilityEvents", &AccessibilityController::logAccessibilityEventsCallback);
- bindMethod("addNotificationListener", &AccessibilityController::addNotificationListenerCallback);
- bindMethod("removeNotificationListener", &AccessibilityController::removeNotificationListenerCallback);
-
- bindProperty("focusedElement", &AccessibilityController::focusedElementGetterCallback);
- bindProperty("rootElement", &AccessibilityController::rootElementGetterCallback);
-
- bindMethod("accessibleElementById", &AccessibilityController::accessibleElementByIdGetterCallback);
-
- bindFallbackMethod(&AccessibilityController::fallbackCallback);
-}
-
-void AccessibilityController::bindToJavascript(WebFrame* frame, const WebString& classname)
-{
- WebAccessibilityObject::enableAccessibility();
- CppBoundClass::bindToJavascript(frame, classname);
-}
-
-void AccessibilityController::reset()
-{
- m_rootElement = WebAccessibilityObject();
- m_focusedElement = WebAccessibilityObject();
- m_elements.clear();
-
- m_logAccessibilityEvents = false;
-}
-
-void AccessibilityController::setFocusedElement(const WebAccessibilityObject& focusedElement)
-{
- m_focusedElement = focusedElement;
-}
-
-AccessibilityUIElement* AccessibilityController::getFocusedElement()
-{
- if (m_focusedElement.isNull())
- m_focusedElement = m_webView->accessibilityObject();
- return m_elements.getOrCreate(m_focusedElement);
-}
-
-AccessibilityUIElement* AccessibilityController::getRootElement()
-{
- if (m_rootElement.isNull())
- m_rootElement = m_webView->accessibilityObject();
- return m_elements.createRoot(m_rootElement);
-}
-
-AccessibilityUIElement* AccessibilityController::findAccessibleElementByIdRecursive(const WebAccessibilityObject& obj, const WebString& id)
-{
- if (obj.isNull() || obj.isDetached())
- return 0;
-
- WebNode node = obj.node();
- if (!node.isNull() && node.isElementNode()) {
- WebElement element = node.to<WebElement>();
- element.getAttribute("id");
- if (element.getAttribute("id") == id)
- return m_elements.getOrCreate(obj);
- }
-
- unsigned childCount = obj.childCount();
- for (unsigned i = 0; i < childCount; i++) {
- if (AccessibilityUIElement* result = findAccessibleElementByIdRecursive(obj.childAt(i), id))
- return result;
- }
-
- return 0;
-}
-
-AccessibilityUIElement* AccessibilityController::getAccessibleElementById(const std::string& id)
-{
- if (m_rootElement.isNull())
- m_rootElement = m_webView->accessibilityObject();
-
- if (!m_rootElement.updateBackingStoreAndCheckValidity())
- return 0;
-
- return findAccessibleElementByIdRecursive(m_rootElement, WebString::fromUTF8(id.c_str()));
-}
-
-bool AccessibilityController::shouldLogAccessibilityEvents()
-{
- return m_logAccessibilityEvents;
-}
-
-void AccessibilityController::notificationReceived(const WebKit::WebAccessibilityObject& target, const char* notificationName)
-{
- // Call notification listeners on the element.
- AccessibilityUIElement* element = m_elements.getOrCreate(target);
- element->notificationReceived(notificationName);
-
- // Call global notification listeners.
- size_t callbackCount = m_notificationCallbacks.size();
- for (size_t i = 0; i < callbackCount; i++) {
- CppVariant arguments[2];
- arguments[0].set(*element->getAsCppVariant());
- arguments[1].set(notificationName);
- CppVariant invokeResult;
- m_notificationCallbacks[i].invokeDefault(arguments, 2, invokeResult);
- }
-}
-
-void AccessibilityController::logAccessibilityEventsCallback(const CppArgumentList&, CppVariant* result)
-{
- m_logAccessibilityEvents = true;
- result->setNull();
-}
-
-void AccessibilityController::addNotificationListenerCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 1 || !arguments[0].isObject()) {
- result->setNull();
- return;
- }
-
- m_notificationCallbacks.push_back(arguments[0]);
- result->setNull();
-}
-
-void AccessibilityController::removeNotificationListenerCallback(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void AccessibilityController::focusedElementGetterCallback(CppVariant* result)
-{
- result->set(*(getFocusedElement()->getAsCppVariant()));
-}
-
-void AccessibilityController::rootElementGetterCallback(CppVariant* result)
-{
- result->set(*(getRootElement()->getAsCppVariant()));
-}
-
-void AccessibilityController::accessibleElementByIdGetterCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 1 || !arguments[0].isString())
- return;
-
- std::string id = arguments[0].toString();
- AccessibilityUIElement* foundElement = getAccessibleElementById(id);
- if (!foundElement)
- return;
-
- result->set(*(foundElement->getAsCppVariant()));
-}
-
-void AccessibilityController::fallbackCallback(const CppArgumentList&, CppVariant* result)
-{
- m_delegate->printMessage("CONSOLE MESSAGE: JavaScript ERROR: unknown method called on AccessibilityController\n");
- result->setNull();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h b/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h
deleted file mode 100644
index a9728c615..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityControllerChromium.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef AccessibilityControllerChromium_h
-#define AccessibilityControllerChromium_h
-
-#include "AccessibilityUIElementChromium.h"
-#include "CppBoundClass.h"
-
-namespace WebKit {
-class WebAccessibilityObject;
-class WebFrame;
-class WebView;
-}
-
-namespace WebTestRunner {
-
-class TestDelegate;
-
-class AccessibilityController : public CppBoundClass {
-public:
- AccessibilityController();
-
- // Shadow to include accessibility initialization.
- void bindToJavascript(WebKit::WebFrame*, const WebKit::WebString& classname);
- void reset();
-
- void setFocusedElement(const WebKit::WebAccessibilityObject&);
- AccessibilityUIElement* getFocusedElement();
- AccessibilityUIElement* getRootElement();
- AccessibilityUIElement* getAccessibleElementById(const std::string& id);
-
- bool shouldLogAccessibilityEvents();
-
- void notificationReceived(const WebKit::WebAccessibilityObject& target, const char* notificationName);
-
- void setDelegate(TestDelegate* delegate) { m_delegate = delegate; }
- void setWebView(WebKit::WebView* webView) { m_webView = webView; }
-
-private:
- // If true, will log all accessibility notifications.
- bool m_logAccessibilityEvents;
-
- // Bound methods and properties
- void logAccessibilityEventsCallback(const CppArgumentList&, CppVariant*);
- void fallbackCallback(const CppArgumentList&, CppVariant*);
- void addNotificationListenerCallback(const CppArgumentList&, CppVariant*);
- void removeNotificationListenerCallback(const CppArgumentList&, CppVariant*);
-
- void focusedElementGetterCallback(CppVariant*);
- void rootElementGetterCallback(CppVariant*);
- void accessibleElementByIdGetterCallback(const CppArgumentList&, CppVariant*);
-
- AccessibilityUIElement* findAccessibleElementByIdRecursive(const WebKit::WebAccessibilityObject&, const WebKit::WebString& id);
-
- WebKit::WebAccessibilityObject m_focusedElement;
- WebKit::WebAccessibilityObject m_rootElement;
-
- AccessibilityUIElementList m_elements;
-
- std::vector<CppVariant> m_notificationCallbacks;
-
- TestDelegate* m_delegate;
- WebKit::WebView* m_webView;
-};
-
-}
-
-#endif // AccessibilityControllerChromium_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp
deleted file mode 100644
index 7b8f6fbd1..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.cpp
+++ /dev/null
@@ -1,982 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "AccessibilityUIElementChromium.h"
-
-#include "WebAccessibilityObject.h"
-#include "platform/WebCString.h"
-#include "platform/WebPoint.h"
-#include "platform/WebRect.h"
-#include "platform/WebString.h"
-#include <wtf/Assertions.h>
-#include <wtf/StringExtras.h>
-
-using namespace WebKit;
-using namespace std;
-
-namespace WebTestRunner {
-
-namespace {
-
-// Map role value to string, matching Safari/Mac platform implementation to
-// avoid rebaselining layout tests.
-string roleToString(WebAccessibilityRole role)
-{
- string result = "AXRole: AX";
- switch (role) {
- case WebAccessibilityRoleButton:
- return result.append("Button");
- case WebAccessibilityRoleRadioButton:
- return result.append("RadioButton");
- case WebAccessibilityRoleCheckBox:
- return result.append("CheckBox");
- case WebAccessibilityRoleSlider:
- return result.append("Slider");
- case WebAccessibilityRoleTabGroup:
- return result.append("TabGroup");
- case WebAccessibilityRoleTextField:
- return result.append("TextField");
- case WebAccessibilityRoleStaticText:
- return result.append("StaticText");
- case WebAccessibilityRoleTextArea:
- return result.append("TextArea");
- case WebAccessibilityRoleScrollArea:
- return result.append("ScrollArea");
- case WebAccessibilityRolePopUpButton:
- return result.append("PopUpButton");
- case WebAccessibilityRoleMenuButton:
- return result.append("MenuButton");
- case WebAccessibilityRoleTable:
- return result.append("Table");
- case WebAccessibilityRoleApplication:
- return result.append("Application");
- case WebAccessibilityRoleGroup:
- return result.append("Group");
- case WebAccessibilityRoleRadioGroup:
- return result.append("RadioGroup");
- case WebAccessibilityRoleList:
- return result.append("List");
- case WebAccessibilityRoleScrollBar:
- return result.append("ScrollBar");
- case WebAccessibilityRoleValueIndicator:
- return result.append("ValueIndicator");
- case WebAccessibilityRoleImage:
- return result.append("Image");
- case WebAccessibilityRoleMenuBar:
- return result.append("MenuBar");
- case WebAccessibilityRoleMenu:
- return result.append("Menu");
- case WebAccessibilityRoleMenuItem:
- return result.append("MenuItem");
- case WebAccessibilityRoleColumn:
- return result.append("Column");
- case WebAccessibilityRoleRow:
- return result.append("Row");
- case WebAccessibilityRoleToolbar:
- return result.append("Toolbar");
- case WebAccessibilityRoleBusyIndicator:
- return result.append("BusyIndicator");
- case WebAccessibilityRoleProgressIndicator:
- return result.append("ProgressIndicator");
- case WebAccessibilityRoleWindow:
- return result.append("Window");
- case WebAccessibilityRoleDrawer:
- return result.append("Drawer");
- case WebAccessibilityRoleSystemWide:
- return result.append("SystemWide");
- case WebAccessibilityRoleOutline:
- return result.append("Outline");
- case WebAccessibilityRoleIncrementor:
- return result.append("Incrementor");
- case WebAccessibilityRoleBrowser:
- return result.append("Browser");
- case WebAccessibilityRoleComboBox:
- return result.append("ComboBox");
- case WebAccessibilityRoleSplitGroup:
- return result.append("SplitGroup");
- case WebAccessibilityRoleSplitter:
- return result.append("Splitter");
- case WebAccessibilityRoleColorWell:
- return result.append("ColorWell");
- case WebAccessibilityRoleGrowArea:
- return result.append("GrowArea");
- case WebAccessibilityRoleSheet:
- return result.append("Sheet");
- case WebAccessibilityRoleHelpTag:
- return result.append("HelpTag");
- case WebAccessibilityRoleMatte:
- return result.append("Matte");
- case WebAccessibilityRoleRuler:
- return result.append("Ruler");
- case WebAccessibilityRoleRulerMarker:
- return result.append("RulerMarker");
- case WebAccessibilityRoleLink:
- return result.append("Link");
- case WebAccessibilityRoleDisclosureTriangle:
- return result.append("DisclosureTriangle");
- case WebAccessibilityRoleGrid:
- return result.append("Grid");
- case WebAccessibilityRoleCell:
- return result.append("Cell");
- case WebAccessibilityRoleColumnHeader:
- return result.append("ColumnHeader");
- case WebAccessibilityRoleRowHeader:
- return result.append("RowHeader");
- case WebAccessibilityRoleWebCoreLink:
- // Maps to Link role.
- return result.append("Link");
- case WebAccessibilityRoleImageMapLink:
- return result.append("ImageMapLink");
- case WebAccessibilityRoleImageMap:
- return result.append("ImageMap");
- case WebAccessibilityRoleListMarker:
- return result.append("ListMarker");
- case WebAccessibilityRoleWebArea:
- return result.append("WebArea");
- case WebAccessibilityRoleHeading:
- return result.append("Heading");
- case WebAccessibilityRoleListBox:
- return result.append("ListBox");
- case WebAccessibilityRoleListBoxOption:
- return result.append("ListBoxOption");
- case WebAccessibilityRoleTableHeaderContainer:
- return result.append("TableHeaderContainer");
- case WebAccessibilityRoleDefinitionListTerm:
- return result.append("DefinitionListTerm");
- case WebAccessibilityRoleDefinitionListDefinition:
- return result.append("DefinitionListDefinition");
- case WebAccessibilityRoleAnnotation:
- return result.append("Annotation");
- case WebAccessibilityRoleSliderThumb:
- return result.append("SliderThumb");
- case WebAccessibilityRoleLandmarkApplication:
- return result.append("LandmarkApplication");
- case WebAccessibilityRoleLandmarkBanner:
- return result.append("LandmarkBanner");
- case WebAccessibilityRoleLandmarkComplementary:
- return result.append("LandmarkComplementary");
- case WebAccessibilityRoleLandmarkContentInfo:
- return result.append("LandmarkContentInfo");
- case WebAccessibilityRoleLandmarkMain:
- return result.append("LandmarkMain");
- case WebAccessibilityRoleLandmarkNavigation:
- return result.append("LandmarkNavigation");
- case WebAccessibilityRoleLandmarkSearch:
- return result.append("LandmarkSearch");
- case WebAccessibilityRoleApplicationLog:
- return result.append("ApplicationLog");
- case WebAccessibilityRoleApplicationMarquee:
- return result.append("ApplicationMarquee");
- case WebAccessibilityRoleApplicationStatus:
- return result.append("ApplicationStatus");
- case WebAccessibilityRoleApplicationTimer:
- return result.append("ApplicationTimer");
- case WebAccessibilityRoleDocument:
- return result.append("Document");
- case WebAccessibilityRoleDocumentArticle:
- return result.append("DocumentArticle");
- case WebAccessibilityRoleDocumentNote:
- return result.append("DocumentNote");
- case WebAccessibilityRoleDocumentRegion:
- return result.append("DocumentRegion");
- case WebAccessibilityRoleUserInterfaceTooltip:
- return result.append("UserInterfaceTooltip");
- case WebAccessibilityRoleToggleButton:
- return result.append("ToggleButton");
- case WebAccessibilityRoleCanvas:
- return result.append("Canvas");
- case WebAccessibilityRoleParagraph:
- return result.append("Paragraph");
- case WebAccessibilityRoleDiv:
- return result.append("Div");
- case WebAccessibilityRoleLabel:
- return result.append("Label");
- case WebAccessibilityRoleForm:
- return result.append("Form");
- case WebAccessibilityRoleHorizontalRule:
- return result.append("HorizontalRule");
- case WebAccessibilityRoleLegend:
- return result.append("Legend");
- case WebAccessibilityRoleApplicationAlert:
- return result.append("Alert");
- case WebAccessibilityRoleApplicationAlertDialog:
- return result.append("AlertDialog");
- case WebAccessibilityRoleApplicationDialog:
- return result.append("ApplicationDialog");
- case WebAccessibilityRoleDirectory:
- return result.append("Directory");
- case WebAccessibilityRoleDocumentMath:
- return result.append("Math");
- case WebAccessibilityRoleEditableText:
- return result.append("EditableText");
- case WebAccessibilityRoleFooter:
- return result.append("Footer");
- case WebAccessibilityRoleIgnored:
- return result.append("Ignored");
- case WebAccessibilityRoleListItem:
- return result.append("ListItem");
- case WebAccessibilityRoleMenuListPopup:
- return result.append("MenuListPopup");
- case WebAccessibilityRoleMenuListOption:
- return result.append("MenuListOption");
- case WebAccessibilityRolePresentational:
- return result.append("Presentational");
- case WebAccessibilityRoleSpinButton:
- return result.append("SpinButton");
- case WebAccessibilityRoleSpinButtonPart:
- return result.append("SpinButtonPart");
- case WebAccessibilityRoleTabList:
- return result.append("TabList");
- case WebAccessibilityRoleTabPanel:
- return result.append("TabPanel");
- case WebAccessibilityRoleTab:
- return result.append("Tab");
- case WebAccessibilityRoleTreeRole:
- return result.append("Tree");
- case WebAccessibilityRoleTreeGrid:
- return result.append("TreeGrid");
- case WebAccessibilityRoleTreeItemRole:
- return result.append("TreeItem");
- case WebAccessibilityRoleUnknown:
- default:
- return result.append("Unknown");
- }
-}
-
-string getDescription(const WebAccessibilityObject& object)
-{
- string description = object.accessibilityDescription().utf8();
- return description.insert(0, "AXDescription: ");
-}
-
-string getHelpText(const WebAccessibilityObject& object)
-{
- string helpText = object.helpText().utf8();
- return helpText.insert(0, "AXHelp: ");
-}
-
-string getStringValue(const WebAccessibilityObject& object)
-{
- string value = object.stringValue().utf8();
- return value.insert(0, "AXValue: ");
-}
-
-string getRole(const WebAccessibilityObject& object)
-{
- string roleString = roleToString(object.roleValue());
-
- // Special-case canvas with fallback content because Chromium wants to
- // treat this as essentially a separate role that it can map differently depending
- // on the platform.
- if (object.roleValue() == WebAccessibilityRoleCanvas && object.canvasHasFallbackContent())
- roleString += "WithFallbackContent";
-
- return roleString;
-}
-
-string getTitle(const WebAccessibilityObject& object)
-{
- string title = object.title().utf8();
- return title.insert(0, "AXTitle: ");
-}
-
-string getOrientation(const WebAccessibilityObject& object)
-{
- if (object.isVertical())
- return "AXOrientation: AXVerticalOrientation";
-
- return "AXOrientation: AXHorizontalOrientation";
-}
-
-string getValueDescription(const WebAccessibilityObject& object)
-{
- string valueDescription = object.valueDescription().utf8();
- return valueDescription.insert(0, "AXValueDescription: ");
-}
-
-string getAttributes(const WebAccessibilityObject& object)
-{
- // FIXME: Concatenate all attributes of the AccessibilityObject.
- string attributes(getTitle(object));
- attributes.append("\n");
- attributes.append(getRole(object));
- attributes.append("\n");
- attributes.append(getDescription(object));
- return attributes;
-}
-
-
-// Collects attributes into a string, delimited by dashes. Used by all methods
-// that output lists of attributes: attributesOfLinkedUIElementsCallback,
-// AttributesOfChildrenCallback, etc.
-class AttributesCollector {
-public:
- void collectAttributes(const WebAccessibilityObject& object)
- {
- m_attributes.append("\n------------\n");
- m_attributes.append(getAttributes(object));
- }
-
- string attributes() const { return m_attributes; }
-
-private:
- string m_attributes;
-};
-
-}
-
-AccessibilityUIElement::AccessibilityUIElement(const WebAccessibilityObject& object, Factory* factory)
- : m_accessibilityObject(object)
- , m_factory(factory)
-{
-
- ASSERT(factory);
-
- //
- // Properties
- //
-
- bindProperty("role", &AccessibilityUIElement::roleGetterCallback);
- bindProperty("title", &AccessibilityUIElement::titleGetterCallback);
- bindProperty("description", &AccessibilityUIElement::descriptionGetterCallback);
- bindProperty("helpText", &AccessibilityUIElement::helpTextGetterCallback);
- bindProperty("stringValue", &AccessibilityUIElement::stringValueGetterCallback);
- bindProperty("x", &AccessibilityUIElement::xGetterCallback);
- bindProperty("y", &AccessibilityUIElement::yGetterCallback);
- bindProperty("width", &AccessibilityUIElement::widthGetterCallback);
- bindProperty("height", &AccessibilityUIElement::heightGetterCallback);
- bindProperty("intValue", &AccessibilityUIElement::intValueGetterCallback);
- bindProperty("minValue", &AccessibilityUIElement::minValueGetterCallback);
- bindProperty("maxValue", &AccessibilityUIElement::maxValueGetterCallback);
- bindProperty("valueDescription", &AccessibilityUIElement::valueDescriptionGetterCallback);
- bindProperty("childrenCount", &AccessibilityUIElement::childrenCountGetterCallback);
- bindProperty("insertionPointLineNumber", &AccessibilityUIElement::insertionPointLineNumberGetterCallback);
- bindProperty("selectedTextRange", &AccessibilityUIElement::selectedTextRangeGetterCallback);
- bindProperty("isEnabled", &AccessibilityUIElement::isEnabledGetterCallback);
- bindProperty("isRequired", &AccessibilityUIElement::isRequiredGetterCallback);
- bindProperty("isFocused", &AccessibilityUIElement::isFocusedGetterCallback);
- bindProperty("isFocusable", &AccessibilityUIElement::isFocusableGetterCallback);
- bindProperty("isSelected", &AccessibilityUIElement::isSelectedGetterCallback);
- bindProperty("isSelectable", &AccessibilityUIElement::isSelectableGetterCallback);
- bindProperty("isMultiSelectable", &AccessibilityUIElement::isMultiSelectableGetterCallback);
- bindProperty("isSelectedOptionActive", &AccessibilityUIElement::isSelectedOptionActiveGetterCallback);
- bindProperty("isExpanded", &AccessibilityUIElement::isExpandedGetterCallback);
- bindProperty("isChecked", &AccessibilityUIElement::isCheckedGetterCallback);
- bindProperty("isVisible", &AccessibilityUIElement::isVisibleGetterCallback);
- bindProperty("isOffScreen", &AccessibilityUIElement::isOffScreenGetterCallback);
- bindProperty("isCollapsed", &AccessibilityUIElement::isCollapsedGetterCallback);
- bindProperty("hasPopup", &AccessibilityUIElement::hasPopupGetterCallback);
- bindProperty("isValid", &AccessibilityUIElement::isValidGetterCallback);
- bindProperty("isReadOnly", &AccessibilityUIElement::isReadOnlyGetterCallback);
- bindProperty("orientation", &AccessibilityUIElement::orientationGetterCallback);
-
- //
- // Methods
- //
-
- bindMethod("allAttributes", &AccessibilityUIElement::allAttributesCallback);
- bindMethod("attributesOfLinkedUIElements", &AccessibilityUIElement::attributesOfLinkedUIElementsCallback);
- bindMethod("attributesOfDocumentLinks", &AccessibilityUIElement::attributesOfDocumentLinksCallback);
- bindMethod("attributesOfChildren", &AccessibilityUIElement::attributesOfChildrenCallback);
- bindMethod("lineForIndex", &AccessibilityUIElement::lineForIndexCallback);
- bindMethod("boundsForRange", &AccessibilityUIElement::boundsForRangeCallback);
- bindMethod("stringForRange", &AccessibilityUIElement::stringForRangeCallback);
- bindMethod("childAtIndex", &AccessibilityUIElement::childAtIndexCallback);
- bindMethod("elementAtPoint", &AccessibilityUIElement::elementAtPointCallback);
- bindMethod("attributesOfColumnHeaders", &AccessibilityUIElement::attributesOfColumnHeadersCallback);
- bindMethod("attributesOfRowHeaders", &AccessibilityUIElement::attributesOfRowHeadersCallback);
- bindMethod("attributesOfColumns", &AccessibilityUIElement::attributesOfColumnsCallback);
- bindMethod("attributesOfRows", &AccessibilityUIElement::attributesOfRowsCallback);
- bindMethod("attributesOfVisibleCells", &AccessibilityUIElement::attributesOfVisibleCellsCallback);
- bindMethod("attributesOfHeader", &AccessibilityUIElement::attributesOfHeaderCallback);
- bindMethod("indexInTable", &AccessibilityUIElement::indexInTableCallback);
- bindMethod("rowIndexRange", &AccessibilityUIElement::rowIndexRangeCallback);
- bindMethod("columnIndexRange", &AccessibilityUIElement::columnIndexRangeCallback);
- bindMethod("cellForColumnAndRow", &AccessibilityUIElement::cellForColumnAndRowCallback);
- bindMethod("titleUIElement", &AccessibilityUIElement::titleUIElementCallback);
- bindMethod("setSelectedTextRange", &AccessibilityUIElement::setSelectedTextRangeCallback);
- bindMethod("attributeValue", &AccessibilityUIElement::attributeValueCallback);
- bindMethod("isAttributeSettable", &AccessibilityUIElement::isAttributeSettableCallback);
- bindMethod("isActionSupported", &AccessibilityUIElement::isActionSupportedCallback);
- bindMethod("parentElement", &AccessibilityUIElement::parentElementCallback);
- bindMethod("increment", &AccessibilityUIElement::incrementCallback);
- bindMethod("decrement", &AccessibilityUIElement::decrementCallback);
- bindMethod("showMenu", &AccessibilityUIElement::showMenuCallback);
- bindMethod("press", &AccessibilityUIElement::pressCallback);
- bindMethod("isEqual", &AccessibilityUIElement::isEqualCallback);
- bindMethod("addNotificationListener", &AccessibilityUIElement::addNotificationListenerCallback);
- bindMethod("removeNotificationListener", &AccessibilityUIElement::removeNotificationListenerCallback);
- bindMethod("takeFocus", &AccessibilityUIElement::takeFocusCallback);
- bindMethod("scrollToMakeVisible", &AccessibilityUIElement::scrollToMakeVisibleCallback);
- bindMethod("scrollToMakeVisibleWithSubFocus", &AccessibilityUIElement::scrollToMakeVisibleWithSubFocusCallback);
- bindMethod("scrollToGlobalPoint", &AccessibilityUIElement::scrollToGlobalPointCallback);
-
- bindFallbackMethod(&AccessibilityUIElement::fallbackCallback);
-}
-
-AccessibilityUIElement* AccessibilityUIElement::getChildAtIndex(unsigned index)
-{
- return m_factory->getOrCreate(accessibilityObject().childAt(index));
-}
-
-bool AccessibilityUIElement::isEqual(const WebKit::WebAccessibilityObject& other)
-{
- return accessibilityObject().equals(other);
-}
-
-void AccessibilityUIElement::notificationReceived(const char* notificationName)
-{
- size_t callbackCount = m_notificationCallbacks.size();
- for (size_t i = 0; i < callbackCount; i++) {
- CppVariant notificationNameArgument;
- notificationNameArgument.set(notificationName);
- CppVariant invokeResult;
- m_notificationCallbacks[i].invokeDefault(&notificationNameArgument, 1, invokeResult);
- }
-}
-
-//
-// Properties
-//
-
-void AccessibilityUIElement::roleGetterCallback(CppVariant* result)
-{
- result->set(getRole(accessibilityObject()));
-}
-
-void AccessibilityUIElement::titleGetterCallback(CppVariant* result)
-{
- result->set(getTitle(accessibilityObject()));
-}
-
-void AccessibilityUIElement::descriptionGetterCallback(CppVariant* result)
-{
- result->set(getDescription(accessibilityObject()));
-}
-
-void AccessibilityUIElement::helpTextGetterCallback(CppVariant* result)
-{
- result->set(getHelpText(accessibilityObject()));
-}
-
-void AccessibilityUIElement::stringValueGetterCallback(CppVariant* result)
-{
- result->set(getStringValue(accessibilityObject()));
-}
-
-void AccessibilityUIElement::xGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().boundingBoxRect().x);
-}
-
-void AccessibilityUIElement::yGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().boundingBoxRect().y);
-}
-
-void AccessibilityUIElement::widthGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().boundingBoxRect().width);
-}
-
-void AccessibilityUIElement::heightGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().boundingBoxRect().height);
-}
-
-void AccessibilityUIElement::intValueGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().valueForRange());
-}
-
-void AccessibilityUIElement::minValueGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().minValueForRange());
-}
-
-void AccessibilityUIElement::maxValueGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().maxValueForRange());
-}
-
-void AccessibilityUIElement::valueDescriptionGetterCallback(CppVariant* result)
-{
- result->set(getValueDescription(accessibilityObject()));
-}
-
-void AccessibilityUIElement::childrenCountGetterCallback(CppVariant* result)
-{
- int count = 1; // Root object always has only one child, the WebView.
- if (!isRoot())
- count = accessibilityObject().childCount();
- result->set(count);
-}
-
-void AccessibilityUIElement::insertionPointLineNumberGetterCallback(CppVariant* result)
-{
- if (!accessibilityObject().isFocused()) {
- result->set(-1);
- return;
- }
-
- int lineNumber = accessibilityObject().selectionEndLineNumber();
- result->set(lineNumber);
-}
-
-void AccessibilityUIElement::selectedTextRangeGetterCallback(CppVariant* result)
-{
- unsigned selectionStart = accessibilityObject().selectionStart();
- unsigned selectionEnd = accessibilityObject().selectionEnd();
- char buffer[100];
- snprintf(buffer, sizeof(buffer), "{%d, %d}", selectionStart, selectionEnd - selectionStart);
-
- result->set(std::string(buffer));
-}
-
-void AccessibilityUIElement::isEnabledGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isEnabled());
-}
-
-void AccessibilityUIElement::isRequiredGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isRequired());
-}
-
-void AccessibilityUIElement::isFocusedGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isFocused());
-}
-
-void AccessibilityUIElement::isFocusableGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().canSetFocusAttribute());
-}
-
-void AccessibilityUIElement::isSelectedGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isSelected());
-}
-
-void AccessibilityUIElement::isSelectableGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().canSetSelectedAttribute());
-}
-
-void AccessibilityUIElement::isMultiSelectableGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isMultiSelectable());
-}
-
-void AccessibilityUIElement::isSelectedOptionActiveGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isSelectedOptionActive());
-}
-
-void AccessibilityUIElement::isExpandedGetterCallback(CppVariant* result)
-{
- result->set(!accessibilityObject().isCollapsed());
-}
-
-void AccessibilityUIElement::isCheckedGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isChecked());
-}
-
-void AccessibilityUIElement::isVisibleGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isVisible());
-}
-
-void AccessibilityUIElement::isOffScreenGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isOffScreen());
-}
-
-void AccessibilityUIElement::isCollapsedGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isCollapsed());
-}
-
-void AccessibilityUIElement::hasPopupGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().ariaHasPopup());
-}
-
-void AccessibilityUIElement::isValidGetterCallback(CppVariant* result)
-{
- result->set(!accessibilityObject().isDetached());
-}
-
-void AccessibilityUIElement::isReadOnlyGetterCallback(CppVariant* result)
-{
- result->set(accessibilityObject().isReadOnly());
-}
-
-void AccessibilityUIElement::orientationGetterCallback(CppVariant* result)
-{
- result->set(getOrientation(accessibilityObject()));
-}
-
-//
-// Methods
-//
-
-void AccessibilityUIElement::allAttributesCallback(const CppArgumentList&, CppVariant* result)
-{
- result->set(getAttributes(accessibilityObject()));
-}
-
-void AccessibilityUIElement::attributesOfLinkedUIElementsCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfDocumentLinksCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfChildrenCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- AttributesCollector collector;
- unsigned size = accessibilityObject().childCount();
- for (unsigned i = 0; i < size; ++i)
- collector.collectAttributes(accessibilityObject().childAt(i));
- result->set(collector.attributes());
-}
-
-void AccessibilityUIElement::parametrizedAttributeNamesCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::lineForIndexCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- if (!arguments.size() || !arguments[0].isNumber()) {
- result->setNull();
- return;
- }
-
- int index = arguments[0].toInt32();
-
- WebVector<int> lineBreaks;
- accessibilityObject().lineBreaks(lineBreaks);
- int line = 0;
- int vectorSize = static_cast<int>(lineBreaks.size());
- while (line < vectorSize && lineBreaks[line] <= index)
- line++;
- result->set(line);
-}
-
-void AccessibilityUIElement::boundsForRangeCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::stringForRangeCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::childAtIndexCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- if (!arguments.size() || !arguments[0].isNumber()) {
- result->setNull();
- return;
- }
-
- AccessibilityUIElement* child = getChildAtIndex(arguments[0].toInt32());
- if (!child) {
- result->setNull();
- return;
- }
-
- result->set(*(child->getAsCppVariant()));
-}
-
-void AccessibilityUIElement::elementAtPointCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfColumnHeadersCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfRowHeadersCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfColumnsCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfRowsCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfVisibleCellsCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::attributesOfHeaderCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::indexInTableCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::rowIndexRangeCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::columnIndexRangeCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::cellForColumnAndRowCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::titleUIElementCallback(const CppArgumentList&, CppVariant* result)
-{
- WebAccessibilityObject obj = accessibilityObject().titleUIElement();
- if (obj.isNull()) {
- result->setNull();
- return;
- }
-
- result->set(*(m_factory->getOrCreate(obj)->getAsCppVariant()));
-}
-
-void AccessibilityUIElement::setSelectedTextRangeCallback(const CppArgumentList&arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
-
- int selectionStart = arguments[0].toInt32();
- int selectionEnd = selectionStart + arguments[1].toInt32();
- accessibilityObject().setSelectedTextRange(selectionStart, selectionEnd);
-}
-
-void AccessibilityUIElement::attributeValueCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::isAttributeSettableCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 1 && !arguments[0].isString()) {
- result->setNull();
- return;
- }
-
- string attribute = arguments[0].toString();
- bool settable = false;
- if (attribute == "AXValue")
- settable = accessibilityObject().canSetValueAttribute();
- result->set(settable);
-}
-
-void AccessibilityUIElement::isActionSupportedCallback(const CppArgumentList&, CppVariant* result)
-{
- // This one may be really hard to implement.
- // Not exposed by AccessibilityObject.
- result->setNull();
-}
-
-void AccessibilityUIElement::parentElementCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::incrementCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::decrementCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::showMenuCallback(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void AccessibilityUIElement::pressCallback(const CppArgumentList&, CppVariant* result)
-{
- accessibilityObject().performDefaultAction();
- result->setNull();
-}
-
-void AccessibilityUIElement::isEqualCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 1 || !arguments[0].isObject()) {
- result->setNull();
- return;
- }
-
- result->set(arguments[0].isEqual(*getAsCppVariant()));
-}
-
-void AccessibilityUIElement::addNotificationListenerCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 1 || !arguments[0].isObject()) {
- result->setNull();
- return;
- }
-
- m_notificationCallbacks.push_back(arguments[0]);
- result->setNull();
-}
-
-void AccessibilityUIElement::removeNotificationListenerCallback(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void AccessibilityUIElement::takeFocusCallback(const CppArgumentList&, CppVariant* result)
-{
- accessibilityObject().setFocused(true);
- result->setNull();
-}
-
-void AccessibilityUIElement::scrollToMakeVisibleCallback(const CppArgumentList&, CppVariant* result)
-{
- accessibilityObject().scrollToMakeVisible();
- result->setNull();
-}
-
-void AccessibilityUIElement::scrollToMakeVisibleWithSubFocusCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() != 4
- || !arguments[0].isNumber()
- || !arguments[1].isNumber()
- || !arguments[2].isNumber()
- || !arguments[3].isNumber())
- return;
-
- int x = arguments[0].toInt32();
- int y = arguments[1].toInt32();
- int width = arguments[2].toInt32();
- int height = arguments[3].toInt32();
- accessibilityObject().scrollToMakeVisibleWithSubFocus(WebRect(x, y, width, height));
- result->setNull();
-}
-
-void AccessibilityUIElement::scrollToGlobalPointCallback(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() != 2
- || !arguments[0].isNumber()
- || !arguments[1].isNumber())
- return;
-
- int x = arguments[0].toInt32();
- int y = arguments[1].toInt32();
-
- accessibilityObject().scrollToGlobalPoint(WebPoint(x, y));
- result->setNull();
-}
-
-void AccessibilityUIElement::fallbackCallback(const CppArgumentList &, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-RootAccessibilityUIElement::RootAccessibilityUIElement(const WebAccessibilityObject &object, Factory *factory)
- : AccessibilityUIElement(object, factory) { }
-
-AccessibilityUIElement* RootAccessibilityUIElement::getChildAtIndex(unsigned index)
-{
- if (index)
- return 0;
-
- return factory()->getOrCreate(accessibilityObject());
-}
-
-
-AccessibilityUIElementList ::~AccessibilityUIElementList()
-{
- clear();
-}
-
-void AccessibilityUIElementList::clear()
-{
- for (ElementList::iterator i = m_elements.begin(); i != m_elements.end(); ++i)
- delete (*i);
- m_elements.clear();
-}
-
-AccessibilityUIElement* AccessibilityUIElementList::getOrCreate(const WebAccessibilityObject& object)
-{
- if (object.isNull())
- return 0;
-
- size_t elementCount = m_elements.size();
- for (size_t i = 0; i < elementCount; i++) {
- if (m_elements[i]->isEqual(object))
- return m_elements[i];
- }
-
- AccessibilityUIElement* element = new AccessibilityUIElement(object, this);
- m_elements.append(element);
- return element;
-}
-
-AccessibilityUIElement* AccessibilityUIElementList::createRoot(const WebAccessibilityObject& object)
-{
- AccessibilityUIElement* element = new RootAccessibilityUIElement(object, this);
- m_elements.append(element);
- return element;
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h b/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h
deleted file mode 100644
index 4dc479e93..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/AccessibilityUIElementChromium.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef AccessibilityUIElementChromium_h
-#define AccessibilityUIElementChromium_h
-
-#include "CppBoundClass.h"
-#include "WebAccessibilityObject.h"
-#include <vector>
-#include <wtf/Vector.h>
-
-namespace WebTestRunner {
-
-class AccessibilityUIElement : public CppBoundClass {
-public:
- class Factory {
- public:
- virtual ~Factory() { }
- virtual AccessibilityUIElement* getOrCreate(const WebKit::WebAccessibilityObject&) = 0;
- };
-
- AccessibilityUIElement(const WebKit::WebAccessibilityObject&, Factory*);
-
- virtual AccessibilityUIElement* getChildAtIndex(unsigned);
- virtual bool isRoot() const { return false; }
- virtual bool isEqual(const WebKit::WebAccessibilityObject&);
-
- virtual void notificationReceived(const char *notificationName);
-
-protected:
- const WebKit::WebAccessibilityObject& accessibilityObject() const { return m_accessibilityObject; }
-
- Factory* factory() const { return m_factory; }
-
-private:
- // Bound properties.
- void roleGetterCallback(CppVariant*);
- void titleGetterCallback(CppVariant*);
- void descriptionGetterCallback(CppVariant*);
- void helpTextGetterCallback(CppVariant*);
- void stringValueGetterCallback(CppVariant*);
- void xGetterCallback(CppVariant*);
- void yGetterCallback(CppVariant*);
- void widthGetterCallback(CppVariant*);
- void heightGetterCallback(CppVariant*);
- void intValueGetterCallback(CppVariant*);
- void minValueGetterCallback(CppVariant*);
- void maxValueGetterCallback(CppVariant*);
- void valueDescriptionGetterCallback(CppVariant*);
- void childrenCountGetterCallback(CppVariant*);
- void insertionPointLineNumberGetterCallback(CppVariant*);
- void selectedTextRangeGetterCallback(CppVariant*);
- void isEnabledGetterCallback(CppVariant*);
- void isRequiredGetterCallback(CppVariant*);
- void isFocusedGetterCallback(CppVariant*);
- void isFocusableGetterCallback(CppVariant*);
- void isSelectedGetterCallback(CppVariant*);
- void isSelectableGetterCallback(CppVariant*);
- void isMultiSelectableGetterCallback(CppVariant*);
- void isSelectedOptionActiveGetterCallback(CppVariant*);
- void isExpandedGetterCallback(CppVariant*);
- void isCheckedGetterCallback(CppVariant*);
- void isVisibleGetterCallback(CppVariant*);
- void isOffScreenGetterCallback(CppVariant*);
- void isCollapsedGetterCallback(CppVariant*);
- void hasPopupGetterCallback(CppVariant*);
- void isValidGetterCallback(CppVariant*);
- void isReadOnlyGetterCallback(CppVariant*);
- void orientationGetterCallback(CppVariant*);
-
- // Bound methods.
- void allAttributesCallback(const CppArgumentList&, CppVariant*);
- void attributesOfLinkedUIElementsCallback(const CppArgumentList&, CppVariant*);
- void attributesOfDocumentLinksCallback(const CppArgumentList&, CppVariant*);
- void attributesOfChildrenCallback(const CppArgumentList&, CppVariant*);
- void parametrizedAttributeNamesCallback(const CppArgumentList&, CppVariant*);
- void lineForIndexCallback(const CppArgumentList&, CppVariant*);
- void boundsForRangeCallback(const CppArgumentList&, CppVariant*);
- void stringForRangeCallback(const CppArgumentList&, CppVariant*);
- void childAtIndexCallback(const CppArgumentList&, CppVariant*);
- void elementAtPointCallback(const CppArgumentList&, CppVariant*);
- void attributesOfColumnHeadersCallback(const CppArgumentList&, CppVariant*);
- void attributesOfRowHeadersCallback(const CppArgumentList&, CppVariant*);
- void attributesOfColumnsCallback(const CppArgumentList&, CppVariant*);
- void attributesOfRowsCallback(const CppArgumentList&, CppVariant*);
- void attributesOfVisibleCellsCallback(const CppArgumentList&, CppVariant*);
- void attributesOfHeaderCallback(const CppArgumentList&, CppVariant*);
- void indexInTableCallback(const CppArgumentList&, CppVariant*);
- void rowIndexRangeCallback(const CppArgumentList&, CppVariant*);
- void columnIndexRangeCallback(const CppArgumentList&, CppVariant*);
- void cellForColumnAndRowCallback(const CppArgumentList&, CppVariant*);
- void titleUIElementCallback(const CppArgumentList&, CppVariant*);
- void setSelectedTextRangeCallback(const CppArgumentList&, CppVariant*);
- void attributeValueCallback(const CppArgumentList&, CppVariant*);
- void isAttributeSettableCallback(const CppArgumentList&, CppVariant*);
- void isActionSupportedCallback(const CppArgumentList&, CppVariant*);
- void parentElementCallback(const CppArgumentList&, CppVariant*);
- void incrementCallback(const CppArgumentList&, CppVariant*);
- void decrementCallback(const CppArgumentList&, CppVariant*);
- void showMenuCallback(const CppArgumentList&, CppVariant*);
- void pressCallback(const CppArgumentList&, CppVariant*);
- void isEqualCallback(const CppArgumentList&, CppVariant*);
- void addNotificationListenerCallback(const CppArgumentList&, CppVariant*);
- void removeNotificationListenerCallback(const CppArgumentList&, CppVariant*);
- void takeFocusCallback(const CppArgumentList&, CppVariant*);
- void scrollToMakeVisibleCallback(const CppArgumentList&, CppVariant*);
- void scrollToMakeVisibleWithSubFocusCallback(const CppArgumentList&, CppVariant*);
- void scrollToGlobalPointCallback(const CppArgumentList&, CppVariant*);
-
- void fallbackCallback(const CppArgumentList&, CppVariant*);
-
- WebKit::WebAccessibilityObject m_accessibilityObject;
- Factory* m_factory;
- std::vector<CppVariant> m_notificationCallbacks;
-};
-
-
-class RootAccessibilityUIElement : public AccessibilityUIElement {
-public:
- RootAccessibilityUIElement(const WebKit::WebAccessibilityObject&, Factory*);
-
- virtual AccessibilityUIElement* getChildAtIndex(unsigned);
- virtual bool isRoot() const { return true; }
-};
-
-
-// Provides simple lifetime management of the AccessibilityUIElement instances:
-// all AccessibilityUIElements ever created from the controller are stored in
-// a list and cleared explicitly.
-class AccessibilityUIElementList : public AccessibilityUIElement::Factory {
-public:
- AccessibilityUIElementList() { }
- virtual ~AccessibilityUIElementList();
-
- void clear();
- virtual AccessibilityUIElement* getOrCreate(const WebKit::WebAccessibilityObject&);
- AccessibilityUIElement* createRoot(const WebKit::WebAccessibilityObject&);
-
-private:
- typedef Vector<AccessibilityUIElement*> ElementList;
- ElementList m_elements;
-};
-
-}
-
-#endif // AccessibilityUIElementChromium_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp
deleted file mode 100644
index 930de6113..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.cpp
+++ /dev/null
@@ -1,360 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2009 Pawel Hajdan (phajdan.jr@chromium.org)
- *
- * 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.
- */
-
-// This file contains definitions for CppBoundClass
-
-// Here's the control flow of a JS method getting forwarded to a class.
-// - Something calls our NPObject with a function like "Invoke".
-// - CppNPObject's static invoke() function forwards it to its attached
-// CppBoundClass's invoke() method.
-// - CppBoundClass has then overridden invoke() to look up the function
-// name in its internal map of methods, and then calls the appropriate
-// method.
-
-#include "config.h"
-#include "CppBoundClass.h"
-
-#include "WebBindings.h"
-#include "WebFrame.h"
-#include "platform/WebString.h"
-#include <wtf/Assertions.h>
-#include <wtf/OwnPtr.h>
-
-using namespace WebKit;
-using namespace std;
-
-namespace WebTestRunner {
-
-namespace {
-
-class CppVariantPropertyCallback : public CppBoundClass::PropertyCallback {
-public:
- CppVariantPropertyCallback(CppVariant* value) : m_value(value) { }
-
- virtual bool getValue(CppVariant* value)
- {
- value->set(*m_value);
- return true;
- }
-
- virtual bool setValue(const CppVariant& value)
- {
- m_value->set(value);
- return true;
- }
-
-private:
- CppVariant* m_value;
-};
-
-class GetterPropertyCallback : public CppBoundClass::PropertyCallback {
-public:
- GetterPropertyCallback(PassOwnPtr<CppBoundClass::GetterCallback> callback)
- : m_callback(callback)
- {
- }
-
- virtual bool getValue(CppVariant* value)
- {
- m_callback->run(value);
- return true;
- }
-
- virtual bool setValue(const CppVariant& value) { return false; }
-
-private:
- OwnPtr<CppBoundClass::GetterCallback> m_callback;
-};
-
-}
-
-// Our special NPObject type. We extend an NPObject with a pointer to a
-// CppBoundClass, which is just a C++ interface that we forward all NPObject
-// callbacks to.
-struct CppNPObject {
- NPObject parent; // This must be the first field in the struct.
- CppBoundClass* boundClass;
-
- //
- // All following objects and functions are static, and just used to interface
- // with NPObject/NPClass.
- //
-
- // An NPClass associates static functions of CppNPObject with the
- // function pointers used by the JS runtime.
- static NPClass npClass;
-
- // Allocate a new NPObject with the specified class.
- static NPObject* allocate(NPP, NPClass*);
-
- // Free an object.
- static void deallocate(NPObject*);
-
- // Returns true if the C++ class associated with this NPObject exposes the
- // given property. Called by the JS runtime.
- static bool hasProperty(NPObject*, NPIdentifier);
-
- // Returns true if the C++ class associated with this NPObject exposes the
- // given method. Called by the JS runtime.
- static bool hasMethod(NPObject*, NPIdentifier);
-
- // If the given method is exposed by the C++ class associated with this
- // NPObject, invokes it with the given arguments and returns a result. Otherwise,
- // returns "undefined" (in the JavaScript sense). Called by the JS runtime.
- static bool invoke(NPObject*, NPIdentifier,
- const NPVariant* arguments, uint32_t argumentCount,
- NPVariant* result);
-
- // If the given property is exposed by the C++ class associated with this
- // NPObject, returns its value. Otherwise, returns "undefined" (in the
- // JavaScript sense). Called by the JS runtime.
- static bool getProperty(NPObject*, NPIdentifier, NPVariant* result);
-
- // If the given property is exposed by the C++ class associated with this
- // NPObject, sets its value. Otherwise, does nothing. Called by the JS
- // runtime.
- static bool setProperty(NPObject*, NPIdentifier, const NPVariant* value);
-};
-
-// Build CppNPObject's static function pointers into an NPClass, for use
-// in constructing NPObjects for the C++ classes.
-NPClass CppNPObject::npClass = {
- NP_CLASS_STRUCT_VERSION,
- CppNPObject::allocate,
- CppNPObject::deallocate,
- /* NPInvalidateFunctionPtr */ 0,
- CppNPObject::hasMethod,
- CppNPObject::invoke,
- /* NPInvokeDefaultFunctionPtr */ 0,
- CppNPObject::hasProperty,
- CppNPObject::getProperty,
- CppNPObject::setProperty,
- /* NPRemovePropertyFunctionPtr */ 0
-};
-
-NPObject* CppNPObject::allocate(NPP npp, NPClass* aClass)
-{
- CppNPObject* obj = new CppNPObject;
- // obj->parent will be initialized by the NPObject code calling this.
- obj->boundClass = 0;
- return &obj->parent;
-}
-
-void CppNPObject::deallocate(NPObject* npObj)
-{
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- delete obj;
-}
-
-bool CppNPObject::hasMethod(NPObject* npObj, NPIdentifier ident)
-{
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- return obj->boundClass->hasMethod(ident);
-}
-
-bool CppNPObject::hasProperty(NPObject* npObj, NPIdentifier ident)
-{
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- return obj->boundClass->hasProperty(ident);
-}
-
-bool CppNPObject::invoke(NPObject* npObj, NPIdentifier ident,
- const NPVariant* arguments, uint32_t argumentCount,
- NPVariant* result)
-{
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- return obj->boundClass->invoke(ident, arguments, argumentCount, result);
-}
-
-bool CppNPObject::getProperty(NPObject* npObj, NPIdentifier ident, NPVariant* result)
-{
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- return obj->boundClass->getProperty(ident, result);
-}
-
-bool CppNPObject::setProperty(NPObject* npObj, NPIdentifier ident, const NPVariant* value)
-{
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- return obj->boundClass->setProperty(ident, value);
-}
-
-CppBoundClass::~CppBoundClass()
-{
- for (MethodList::iterator i = m_methods.begin(); i != m_methods.end(); ++i)
- delete i->value;
-
- for (PropertyList::iterator i = m_properties.begin(); i != m_properties.end(); ++i)
- delete i->value;
-
- // Unregister ourselves if we were bound to a frame.
- if (m_boundToFrame)
- WebBindings::unregisterObject(NPVARIANT_TO_OBJECT(m_selfVariant));
-}
-
-bool CppBoundClass::hasMethod(NPIdentifier ident) const
-{
- return m_methods.find(ident) != m_methods.end();
-}
-
-bool CppBoundClass::hasProperty(NPIdentifier ident) const
-{
- return m_properties.find(ident) != m_properties.end();
-}
-
-bool CppBoundClass::invoke(NPIdentifier ident,
- const NPVariant* arguments,
- size_t argumentCount,
- NPVariant* result) {
- MethodList::const_iterator end = m_methods.end();
- MethodList::const_iterator method = m_methods.find(ident);
- Callback* callback;
- if (method == end) {
- if (!m_fallbackCallback.get()) {
- VOID_TO_NPVARIANT(*result);
- return false;
- }
- callback = m_fallbackCallback.get();
- } else
- callback = (*method).value;
-
- // Build a CppArgumentList argument vector from the NPVariants coming in.
- CppArgumentList cppArguments(argumentCount);
- for (size_t i = 0; i < argumentCount; i++)
- cppArguments[i].set(arguments[i]);
-
- CppVariant cppResult;
- callback->run(cppArguments, &cppResult);
-
- cppResult.copyToNPVariant(result);
- return true;
-}
-
-bool CppBoundClass::getProperty(NPIdentifier ident, NPVariant* result) const
-{
- PropertyList::const_iterator callback = m_properties.find(ident);
- if (callback == m_properties.end()) {
- VOID_TO_NPVARIANT(*result);
- return false;
- }
-
- CppVariant cppValue;
- if (!callback->value->getValue(&cppValue))
- return false;
- cppValue.copyToNPVariant(result);
- return true;
-}
-
-bool CppBoundClass::setProperty(NPIdentifier ident, const NPVariant* value)
-{
- PropertyList::iterator callback = m_properties.find(ident);
- if (callback == m_properties.end())
- return false;
-
- CppVariant cppValue;
- cppValue.set(*value);
- return (*callback).value->setValue(cppValue);
-}
-
-void CppBoundClass::bindCallback(const string& name, Callback* callback)
-{
- NPIdentifier ident = WebBindings::getStringIdentifier(name.c_str());
- MethodList::iterator oldCallback = m_methods.find(ident);
- if (oldCallback != m_methods.end()) {
- delete oldCallback->value;
- if (!callback) {
- m_methods.remove(oldCallback);
- return;
- }
- }
-
- m_methods.set(ident, callback);
-}
-
-void CppBoundClass::bindGetterCallback(const string& name, PassOwnPtr<GetterCallback> callback)
-{
- PropertyCallback* propertyCallback = callback ? new GetterPropertyCallback(callback) : 0;
- bindProperty(name, propertyCallback);
-}
-
-void CppBoundClass::bindProperty(const string& name, CppVariant* prop)
-{
- PropertyCallback* propertyCallback = prop ? new CppVariantPropertyCallback(prop) : 0;
- bindProperty(name, propertyCallback);
-}
-
-void CppBoundClass::bindProperty(const string& name, PropertyCallback* callback)
-{
- NPIdentifier ident = WebBindings::getStringIdentifier(name.c_str());
- PropertyList::iterator oldCallback = m_properties.find(ident);
- if (oldCallback != m_properties.end()) {
- delete oldCallback->value;
- if (!callback) {
- m_properties.remove(oldCallback);
- return;
- }
- }
-
- m_properties.set(ident, callback);
-}
-
-bool CppBoundClass::isMethodRegistered(const string& name) const
-{
- NPIdentifier ident = WebBindings::getStringIdentifier(name.c_str());
- MethodList::const_iterator callback = m_methods.find(ident);
- return callback != m_methods.end();
-}
-
-CppVariant* CppBoundClass::getAsCppVariant()
-{
- if (!m_selfVariant.isObject()) {
- // Create an NPObject using our static NPClass. The first argument (a
- // plugin's instance handle) is passed through to the allocate function
- // directly, and we don't use it, so it's ok to be 0.
- NPObject* npObj = WebBindings::createObject(0, &CppNPObject::npClass);
- CppNPObject* obj = reinterpret_cast<CppNPObject*>(npObj);
- obj->boundClass = this;
- m_selfVariant.set(npObj);
- WebBindings::releaseObject(npObj); // CppVariant takes the reference.
- }
- ASSERT(m_selfVariant.isObject());
- return &m_selfVariant;
-}
-
-void CppBoundClass::bindToJavascript(WebFrame* frame, const WebString& classname)
-{
- // BindToWindowObject will take its own reference to the NPObject, and clean
- // up after itself. It will also (indirectly) register the object with V8,
- // so we must remember this so we can unregister it when we're destroyed.
- frame->bindToWindowObject(classname, NPVARIANT_TO_OBJECT(*getAsCppVariant()));
- m_boundToFrame = true;
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h b/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h
deleted file mode 100644
index 54af6ddce..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/CppBoundClass.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2009 Pawel Hajdan (phajdan.jr@chromium.org)
- *
- * 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.
- */
-
-/*
- CppBoundClass class:
- This base class serves as a parent for C++ classes designed to be bound to
- JavaScript objects.
-
- Subclasses should define the constructor to build the property and method
- lists needed to bind this class to a JS object. They should also declare
- and define member variables and methods to be exposed to JS through
- that object.
-*/
-
-#ifndef CppBoundClass_h
-#define CppBoundClass_h
-
-#include "CppVariant.h"
-#include <wtf/HashMap.h>
-#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebKit {
-class WebFrame;
-class WebString;
-}
-
-namespace WebTestRunner {
-
-typedef Vector<CppVariant> CppArgumentList;
-
-// CppBoundClass lets you map Javascript method calls and property accesses
-// directly to C++ method calls and CppVariant* variable access.
-class CppBoundClass {
- WTF_MAKE_NONCOPYABLE(CppBoundClass);
-public:
- class PropertyCallback {
- public:
- virtual ~PropertyCallback() { }
-
- // Sets |value| to the value of the property. Returns false in case of
- // failure. |value| is always non-0.
- virtual bool getValue(CppVariant* result) = 0;
-
- // sets the property value to |value|. Returns false in case of failure.
- virtual bool setValue(const CppVariant&) = 0;
- };
-
- // Callback class for "void function(CppVariant*)"
- class GetterCallback {
- public:
- virtual ~GetterCallback() { }
- virtual void run(CppVariant*) = 0;
- };
-
- // The constructor should call BindMethod, BindProperty, and
- // SetFallbackMethod as needed to set up the methods, properties, and
- // fallback method.
- CppBoundClass() : m_boundToFrame(false) { }
- virtual ~CppBoundClass();
-
- // Return a CppVariant representing this class, for use with BindProperty().
- // The variant type is guaranteed to be NPVariantType_Object.
- CppVariant* getAsCppVariant();
-
- // Given a WebFrame, BindToJavascript builds the NPObject that will represent
- // the class and binds it to the frame's window under the given name. This
- // should generally be called from the WebView delegate's
- // WindowObjectCleared(). A class so bound will be accessible to JavaScript
- // as window.<classname>. The owner of the CppBoundObject is responsible for
- // keeping the object around while the frame is alive, and for destroying it
- // afterwards.
- void bindToJavascript(WebKit::WebFrame*, const WebKit::WebString& classname);
-
- // Used by a test. Returns true if a method with the specified name exists,
- // regardless of whether a fallback is registered.
- bool isMethodRegistered(const std::string&) const;
-
-protected:
- // Callback for "void function(const CppArguemntList&, CppVariant*)"
- class Callback {
- public:
- virtual ~Callback() { }
- virtual void run(const CppArgumentList&, CppVariant*) = 0;
- };
-
- // Callback for "void T::method(const CppArguemntList&, CppVariant*)"
- template <class T> class MemberCallback : public Callback {
- public:
- typedef void (T::*MethodType)(const CppArgumentList&, CppVariant*);
- MemberCallback(T* object, MethodType method)
- : m_object(object)
- , m_method(method) { }
- virtual ~MemberCallback() { }
-
- virtual void run(const CppArgumentList& arguments, CppVariant* result)
- {
- (m_object->*m_method)(arguments, result);
- }
-
- private:
- T* m_object;
- MethodType m_method;
- };
-
- // Callback class for "void T::method(CppVariant*)"
- template <class T> class MemberGetterCallback : public GetterCallback {
- public:
- typedef void (T::*MethodType)(CppVariant*);
- MemberGetterCallback(T* object, MethodType method)
- : m_object(object)
- , m_method(method) { }
- virtual ~MemberGetterCallback() { }
-
- virtual void run(CppVariant* result) { (m_object->*m_method)(result); }
-
- private:
- T* m_object;
- MethodType m_method;
- };
-
- // Bind the Javascript method called the string parameter to the C++ method.
- void bindCallback(const std::string&, Callback*);
-
- // A wrapper for bindCallback, to simplify the common case of binding a
- // method on the current object. Though not verified here, the method parameter
- // must be a method of this CppBoundClass subclass.
- template<class T>
- void bindMethod(const std::string& name, void (T::*method)(const CppArgumentList&, CppVariant*))
- {
- Callback* callback = new MemberCallback<T>(static_cast<T*>(this), method);
- bindCallback(name, callback);
- }
-
- // Bind Javascript property |name| to the C++ getter callback |callback|.
- // This can be used to create read-only properties.
- void bindGetterCallback(const std::string&, PassOwnPtr<GetterCallback>);
-
- // A wrapper for BindGetterCallback, to simplify the common case of binding a
- // property on the current object. Though not verified here, the method parameter
- // must be a method of this CppBoundClass subclass.
- template<class T>
- void bindProperty(const std::string& name, void (T::*method)(CppVariant*))
- {
- OwnPtr<GetterCallback> callback = adoptPtr(new MemberGetterCallback<T>(static_cast<T*>(this), method));
- bindGetterCallback(name, callback.release());
- }
-
- // Bind the Javascript property called |name| to a CppVariant.
- void bindProperty(const std::string&, CppVariant*);
-
- // Bind Javascript property called |name| to a PropertyCallback.
- // CppBoundClass assumes control over the life time of the callback.
- void bindProperty(const std::string&, PropertyCallback*);
-
- // Set the fallback callback, which is called when when a callback is
- // invoked that isn't bound.
- // If it is 0 (its default value), a JavaScript exception is thrown in
- // that case (as normally expected). If non 0, the fallback method is
- // invoked and the script continues its execution.
- // Passing 0 clears out any existing binding.
- // It is used for tests and should probably only be used in such cases
- // as it may cause unexpected behaviors (a JavaScript object with a
- // fallback always returns true when checked for a method's
- // existence).
- void bindFallbackCallback(PassOwnPtr<Callback> fallbackCallback)
- {
- m_fallbackCallback = fallbackCallback;
- }
-
- // A wrapper for BindFallbackCallback, to simplify the common case of
- // binding a method on the current object. Though not verified here,
- // |method| must be a method of this CppBoundClass subclass.
- // Passing 0 for |method| clears out any existing binding.
- template<class T>
- void bindFallbackMethod(void (T::*method)(const CppArgumentList&, CppVariant*))
- {
- if (method) {
- OwnPtr<Callback> callback = adoptPtr(new MemberCallback<T>(static_cast<T*>(this), method));
- bindFallbackCallback(callback.release());
- } else
- bindFallbackCallback(nullptr);
- }
-
- // Some fields are protected because some tests depend on accessing them,
- // but otherwise they should be considered private.
-
- typedef HashMap<NPIdentifier, PropertyCallback*> PropertyList;
- typedef HashMap<NPIdentifier, Callback*> MethodList;
- // These maps associate names with property and method pointers to be
- // exposed to JavaScript.
- PropertyList m_properties;
- MethodList m_methods;
-
- // The callback gets invoked when a call is made to an nonexistent method.
- OwnPtr<Callback> m_fallbackCallback;
-
-private:
- // NPObject callbacks.
- friend struct CppNPObject;
- bool hasMethod(NPIdentifier) const;
- bool invoke(NPIdentifier, const NPVariant* args, size_t argCount,
- NPVariant* result);
- bool hasProperty(NPIdentifier) const;
- bool getProperty(NPIdentifier, NPVariant* result) const;
- bool setProperty(NPIdentifier, const NPVariant*);
-
- // A lazily-initialized CppVariant representing this class. We retain 1
- // reference to this object, and it is released on deletion.
- CppVariant m_selfVariant;
-
- // True if our np_object has been bound to a WebFrame, in which case it must
- // be unregistered with V8 when we delete it.
- bool m_boundToFrame;
-};
-
-}
-
-#endif // CppBoundClass_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp
deleted file mode 100644
index 4d2856e74..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.cpp
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "CppVariant.h"
-
-#include "WebBindings.h"
-#include <limits>
-#include <wtf/Assertions.h>
-#include <wtf/StringExtras.h>
-
-using namespace WebKit;
-using namespace std;
-
-namespace WebTestRunner {
-
-CppVariant::CppVariant()
-{
- type = NPVariantType_Null;
-}
-
-// Note that Set() performs a deep copy, which is necessary to safely
-// call FreeData() on the value in the destructor.
-CppVariant::CppVariant(const CppVariant& original)
-{
- type = NPVariantType_Null;
- set(original);
-}
-
-// See comment for copy constructor, above.
-CppVariant& CppVariant::operator=(const CppVariant& original)
-{
- if (&original != this)
- set(original);
- return *this;
-}
-
-CppVariant::~CppVariant()
-{
- freeData();
-}
-
-void CppVariant::freeData()
-{
- WebBindings::releaseVariantValue(this);
-}
-
-bool CppVariant::isEqual(const CppVariant& other) const
-{
- if (type != other.type)
- return false;
-
- switch (type) {
- case NPVariantType_Bool:
- return (value.boolValue == other.value.boolValue);
- case NPVariantType_Int32:
- return (value.intValue == other.value.intValue);
- case NPVariantType_Double:
- return (value.doubleValue == other.value.doubleValue);
- case NPVariantType_String: {
- const NPString *this_value = &value.stringValue;
- const NPString *other_value = &other.value.stringValue;
- uint32_t len = this_value->UTF8Length;
- return len == other_value->UTF8Length
- && !strncmp(this_value->UTF8Characters,
- other_value->UTF8Characters, len);
- }
- case NPVariantType_Null:
- case NPVariantType_Void:
- return true;
- case NPVariantType_Object: {
- NPObject* thisValue = value.objectValue;
- NPObject* otherValue = other.value.objectValue;
- return thisValue->_class == otherValue->_class
- && thisValue->referenceCount == otherValue->referenceCount;
- }
- }
- return false;
-}
-
-void CppVariant::copyToNPVariant(NPVariant* result) const
-{
- result->type = type;
- switch (type) {
- case NPVariantType_Bool:
- result->value.boolValue = value.boolValue;
- break;
- case NPVariantType_Int32:
- result->value.intValue = value.intValue;
- break;
- case NPVariantType_Double:
- result->value.doubleValue = value.doubleValue;
- break;
- case NPVariantType_String:
- WebBindings::initializeVariantWithStringCopy(result, &value.stringValue);
- break;
- case NPVariantType_Null:
- case NPVariantType_Void:
- // Nothing to set.
- break;
- case NPVariantType_Object:
- result->type = NPVariantType_Object;
- result->value.objectValue = WebBindings::retainObject(value.objectValue);
- break;
- }
-}
-
-void CppVariant::set(const NPVariant& newValue)
-{
- freeData();
- switch (newValue.type) {
- case NPVariantType_Bool:
- set(newValue.value.boolValue);
- break;
- case NPVariantType_Int32:
- set(newValue.value.intValue);
- break;
- case NPVariantType_Double:
- set(newValue.value.doubleValue);
- break;
- case NPVariantType_String:
- set(newValue.value.stringValue);
- break;
- case NPVariantType_Null:
- case NPVariantType_Void:
- type = newValue.type;
- break;
- case NPVariantType_Object:
- set(newValue.value.objectValue);
- break;
- }
-}
-
-void CppVariant::setNull()
-{
- freeData();
- type = NPVariantType_Null;
-}
-
-void CppVariant::set(bool newValue)
-{
- freeData();
- type = NPVariantType_Bool;
- value.boolValue = newValue;
-}
-
-void CppVariant::set(int32_t newValue)
-{
- freeData();
- type = NPVariantType_Int32;
- value.intValue = newValue;
-}
-
-void CppVariant::set(double newValue)
-{
- freeData();
- type = NPVariantType_Double;
- value.doubleValue = newValue;
-}
-
-// The newValue must be a null-terminated string.
-void CppVariant::set(const char* newValue)
-{
- freeData();
- type = NPVariantType_String;
- NPString newString = {newValue,
- static_cast<uint32_t>(strlen(newValue))};
- WebBindings::initializeVariantWithStringCopy(this, &newString);
-}
-
-void CppVariant::set(const string& newValue)
-{
- freeData();
- type = NPVariantType_String;
- NPString newString = {newValue.data(),
- static_cast<uint32_t>(newValue.size())};
- WebBindings::initializeVariantWithStringCopy(this, &newString);
-}
-
-void CppVariant::set(const NPString& newValue)
-{
- freeData();
- type = NPVariantType_String;
- WebBindings::initializeVariantWithStringCopy(this, &newValue);
-}
-
-void CppVariant::set(NPObject* newValue)
-{
- freeData();
- type = NPVariantType_Object;
- value.objectValue = WebBindings::retainObject(newValue);
-}
-
-string CppVariant::toString() const
-{
- ASSERT(isString());
- return string(value.stringValue.UTF8Characters,
- value.stringValue.UTF8Length);
-}
-
-int32_t CppVariant::toInt32() const
-{
- if (isInt32())
- return value.intValue;
- if (isDouble())
- return static_cast<int32_t>(value.doubleValue);
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-double CppVariant::toDouble() const
-{
- if (isInt32())
- return static_cast<double>(value.intValue);
- if (isDouble())
- return value.doubleValue;
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-bool CppVariant::toBoolean() const
-{
- ASSERT(isBool());
- return value.boolValue;
-}
-
-Vector<string> CppVariant::toStringVector() const
-{
-
- ASSERT(isObject());
- Vector<string> stringVector;
- NPObject* npValue = value.objectValue;
- NPIdentifier lengthId = WebBindings::getStringIdentifier("length");
-
- if (!WebBindings::hasProperty(0, npValue, lengthId))
- return stringVector;
-
- NPVariant lengthValue;
- if (!WebBindings::getProperty(0, npValue, lengthId, &lengthValue))
- return stringVector;
-
- int length = 0;
- // The length is a double in some cases.
- if (NPVARIANT_IS_DOUBLE(lengthValue))
- length = static_cast<int>(NPVARIANT_TO_DOUBLE(lengthValue));
- else if (NPVARIANT_IS_INT32(lengthValue))
- length = NPVARIANT_TO_INT32(lengthValue);
- WebBindings::releaseVariantValue(&lengthValue);
-
- // For sanity, only allow 100 items.
- length = min(100, length);
- for (int i = 0; i < length; ++i) {
- // Get each of the items.
- char indexInChar[20]; // Enough size to store 32-bit integer
- snprintf(indexInChar, 20, "%d", i);
- string index(indexInChar);
- NPIdentifier indexId = WebBindings::getStringIdentifier(index.c_str());
- if (!WebBindings::hasProperty(0, npValue, indexId))
- continue;
- NPVariant indexValue;
- if (!WebBindings::getProperty(0, npValue, indexId, &indexValue))
- continue;
- if (NPVARIANT_IS_STRING(indexValue)) {
- string item(NPVARIANT_TO_STRING(indexValue).UTF8Characters,
- NPVARIANT_TO_STRING(indexValue).UTF8Length);
- stringVector.append(item);
- }
- WebBindings::releaseVariantValue(&indexValue);
- }
- return stringVector;
-}
-
-bool CppVariant::invoke(const string& method, const CppVariant* arguments,
- uint32_t argumentCount, CppVariant& result) const
-{
- ASSERT(isObject());
- NPIdentifier methodName = WebBindings::getStringIdentifier(method.c_str());
- NPObject* npObject = value.objectValue;
- if (!WebBindings::hasMethod(0, npObject, methodName))
- return false;
- NPVariant r;
- bool status = WebBindings::invoke(0, npObject, methodName, arguments, argumentCount, &r);
- result.set(r);
- return status;
-}
-
-bool CppVariant::invokeDefault(const CppVariant* arguments, uint32_t argumentCount,
- CppVariant& result) const
-{
- ASSERT(isObject());
- NPObject* npObject = value.objectValue;
- NPVariant r;
- bool status = WebBindings::invokeDefault(0, npObject, arguments, argumentCount, &r);
- result.set(r);
- return status;
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h b/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h
deleted file mode 100644
index e82a70b66..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/CppVariant.h
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * 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.
- */
-
-/*
- This file contains the declaration for CppVariant, a type used by C++ classes
- that are to be bound to JavaScript objects.
-
- CppVariant exists primarily as an interface between C++ callers and the
- corresponding NPVariant type. CppVariant also provides a number of
- convenience constructors and accessors, so that the NPVariantType values
- don't need to be exposed, and a destructor to free any memory allocated for
- string values.
-*/
-
-#ifndef CppVariant_h
-#define CppVariant_h
-
-#include "WebBindings.h"
-#include <string>
-#include <wtf/Vector.h>
-
-namespace WebTestRunner {
-
-class CppVariant : public NPVariant {
-public:
- CppVariant();
- ~CppVariant();
- void setNull();
- void set(bool);
- void set(int32_t);
- void set(double);
-
- // Note that setting a CppVariant to a string value involves copying the
- // string data, which must be freed with a call to freeData() when the
- // CppVariant is set to a different value or is no longer needed. Normally
- // this is handled by the other set() methods and by the destructor.
- void set(const char*); // Must be a null-terminated string.
- void set(const std::string&);
- void set(const NPString&);
- void set(const NPVariant&);
-
- // Note that setting a CppVariant to an NPObject involves ref-counting
- // the actual object. freeData() should only be called if the CppVariant
- // is no longer needed. The other set() methods handle this internally.
- // Also, the object's NPClass is expected to be a static object: neither
- // the NP runtime nor CppVariant will ever free it.
- void set(NPObject*_value);
-
- // These three methods all perform deep copies of any string data. This
- // allows local CppVariants to be released by the destructor without
- // corrupting their sources. In performance-critical code, or when strings
- // are very long, avoid creating new CppVariants.
- // In case of NPObject as the data, the copying involves ref-counting
- // as opposed to deep-copying. The ref-counting ensures that sources don't
- // get corrupted when the copies get destroyed.
- void copyToNPVariant(NPVariant* result) const;
- CppVariant& operator=(const CppVariant& original);
- CppVariant(const CppVariant& original);
-
- // Calls NPN_ReleaseVariantValue, which frees any string data
- // held by the object and sets its type to null.
- // In case of NPObject, the NPN_ReleaseVariantValue decrements
- // the ref-count (releases when ref-count becomes 0)
- void freeData();
-
- // Compares this CppVariant's type and value to another's. They must be
- // identical in both type and value to be considered equal. For string and
- // object types, a deep comparison is performed; that is, the contents of the
- // strings, or the classes and refcounts of the objects, must be the same,
- // but they need not be the same pointers.
- bool isEqual(const CppVariant&) const;
-
- // The value of a CppVariant may be read directly from its NPVariant (but
- // should only be set using one of the set() methods above). Although the
- // type of a CppVariant is likewise public, it can be accessed through these
- // functions rather than directly if a caller wishes to avoid dependence on
- // the NPVariantType values.
- bool isBool() const { return (type == NPVariantType_Bool); }
- bool isInt32() const { return (type == NPVariantType_Int32); }
- bool isDouble() const { return (type == NPVariantType_Double); }
- bool isNumber() const { return (isInt32() || isDouble()); }
- bool isString() const { return (type == NPVariantType_String); }
- bool isVoid() const { return (type == NPVariantType_Void); }
- bool isNull() const { return (type == NPVariantType_Null); }
- bool isEmpty() const { return (isVoid() || isNull()); }
- bool isObject() const { return (type == NPVariantType_Object); }
-
- // Converters. The CppVariant must be of a type convertible to these values.
- // For example, toInt32() works only if isNumber() is true.
- std::string toString() const;
- int32_t toInt32() const;
- double toDouble() const;
- bool toBoolean() const;
- // Returns a vector of strings for the specified argument. This is useful
- // for converting a JavaScript array of strings into a vector of strings.
- Vector<std::string> toStringVector() const;
-
- // Invoke method of the given name on an object with the supplied arguments.
- // The first argument should be the object on which the method is to be
- // invoked. Returns whether the method was successfully invoked. If the
- // method was invoked successfully, any return value is stored in the
- // CppVariant specified by result.
- bool invoke(const std::string&, const CppVariant* arguments,
- uint32_t argumentCount, CppVariant& result) const;
-
- // Invoke an object's default method with the supplied arguments.
- // The first argument should be the object on which the method is to be
- // invoked. Returns whether the method was successfully invoked. If the
- // method was invoked successfully, any return value is stored in the
- // CppVariant specified by result.
- bool invokeDefault(const CppVariant* arguments,
- uint32_t argumentCount, CppVariant& result) const;
-};
-
-}
-
-#endif // CppVariant_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp
deleted file mode 100644
index 773a56b17..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.cpp
+++ /dev/null
@@ -1,1301 +0,0 @@
-/*
- * 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.
- */
-
-// This file contains the definition for EventSender.
-//
-// Some notes about drag and drop handling:
-// Windows drag and drop goes through a system call to doDragDrop. At that
-// point, program control is given to Windows which then periodically makes
-// callbacks into the webview. This won't work for layout tests, so instead,
-// we queue up all the mouse move and mouse up events. When the test tries to
-// start a drag (by calling EvenSendingController::doDragDrop), we take the
-// events in the queue and replay them.
-// The behavior of queuing events and replaying them can be disabled by a
-// layout test by setting eventSender.dragMode to false.
-
-#include "config.h"
-#include "EventSender.h"
-
-#include "KeyCodeMapping.h"
-#include "TestDelegate.h"
-#include "WebContextMenuData.h"
-#include "WebDragOperation.h"
-#include "WebEventSender.h"
-#include "WebTouchPoint.h"
-#include "WebView.h"
-#include "platform/WebDragData.h"
-#include "platform/WebPoint.h"
-#include "platform/WebString.h"
-#include "platform/WebVector.h"
-#include <wtf/Deque.h>
-#include <wtf/StringExtras.h>
-
-#if OS(WINDOWS)
-#include "win/WebInputEventFactory.h"
-#endif
-
-// FIXME: layout before each event?
-
-using namespace std;
-using namespace WebKit;
-
-namespace WebTestRunner {
-
-WebPoint EventSender::lastMousePos;
-WebMouseEvent::Button EventSender::pressedButton = WebMouseEvent::ButtonNone;
-WebMouseEvent::Button EventSender::lastButtonType = WebMouseEvent::ButtonNone;
-
-namespace {
-
-struct SavedEvent {
- enum SavedEventType {
- Unspecified,
- MouseUp,
- MouseMove,
- LeapForward
- };
-
- SavedEventType type;
- WebMouseEvent::Button buttonType; // For MouseUp.
- WebPoint pos; // For MouseMove.
- int milliseconds; // For LeapForward.
-
- SavedEvent()
- : type(Unspecified)
- , buttonType(WebMouseEvent::ButtonNone)
- , milliseconds(0) { }
-};
-
-WebDragData currentDragData;
-WebDragOperation currentDragEffect;
-WebDragOperationsMask currentDragEffectsAllowed;
-bool replayingSavedEvents = false;
-Deque<SavedEvent> mouseEventQueue;
-int touchModifiers;
-Vector<WebTouchPoint> touchPoints;
-
-// Time and place of the last mouse up event.
-double lastClickTimeSec = 0;
-WebPoint lastClickPos;
-int clickCount = 0;
-
-// maximum distance (in space and time) for a mouse click
-// to register as a double or triple click
-const double multipleClickTimeSec = 1;
-const int multipleClickRadiusPixels = 5;
-
-// How much we should scroll per event - the value here is chosen to
-// match the WebKit impl and layout test results.
-const float scrollbarPixelsPerTick = 40.0f;
-
-inline bool outsideMultiClickRadius(const WebPoint& a, const WebPoint& b)
-{
- return ((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)) >
- multipleClickRadiusPixels * multipleClickRadiusPixels;
-}
-
-// Used to offset the time the event hander things an event happened. This is
-// done so tests can run without a delay, but bypass checks that are time
-// dependent (e.g., dragging has a timeout vs selection).
-uint32 timeOffsetMs = 0;
-
-double getCurrentEventTimeSec(TestDelegate* delegate)
-{
- return (delegate->getCurrentTimeInMillisecond() + timeOffsetMs) / 1000.0;
-}
-
-void advanceEventTime(int32_t deltaMs)
-{
- timeOffsetMs += deltaMs;
-}
-
-void initMouseEvent(WebInputEvent::Type t, WebMouseEvent::Button b, const WebPoint& pos, WebMouseEvent* e, double ts)
-{
- e->type = t;
- e->button = b;
- e->modifiers = 0;
- e->x = pos.x;
- e->y = pos.y;
- e->globalX = pos.x;
- e->globalY = pos.y;
- e->timeStampSeconds = ts;
- e->clickCount = clickCount;
-}
-
-// Returns true if the specified key is the system key.
-bool applyKeyModifier(const string& modifierName, WebInputEvent* event)
-{
- bool isSystemKey = false;
- const char* characters = modifierName.c_str();
- if (!strcmp(characters, "ctrlKey")
-#if !OS(MAC_OS_X)
- || !strcmp(characters, "addSelectionKey")
-#endif
- ) {
- event->modifiers |= WebInputEvent::ControlKey;
- } else if (!strcmp(characters, "shiftKey") || !strcmp(characters, "rangeSelectionKey"))
- event->modifiers |= WebInputEvent::ShiftKey;
- else if (!strcmp(characters, "altKey")) {
- event->modifiers |= WebInputEvent::AltKey;
-#if !OS(MAC_OS_X)
- // On Windows all keys with Alt modifier will be marked as system key.
- // We keep the same behavior on Linux and everywhere non-Mac, see:
- // WebKit/chromium/src/gtk/WebInputEventFactory.cpp
- // If we want to change this behavior on Linux, this piece of code must be
- // kept in sync with the related code in above file.
- isSystemKey = true;
-#endif
-#if OS(MAC_OS_X)
- } else if (!strcmp(characters, "metaKey") || !strcmp(characters, "addSelectionKey")) {
- event->modifiers |= WebInputEvent::MetaKey;
- // On Mac only command key presses are marked as system key.
- // See the related code in: WebKit/chromium/src/mac/WebInputEventFactory.cpp
- // It must be kept in sync with the related code in above file.
- isSystemKey = true;
-#else
- } else if (!strcmp(characters, "metaKey")) {
- event->modifiers |= WebInputEvent::MetaKey;
-#endif
- }
- return isSystemKey;
-}
-
-bool applyKeyModifiers(const CppVariant* argument, WebInputEvent* event)
-{
- bool isSystemKey = false;
- if (argument->isObject()) {
- Vector<string> modifiers = argument->toStringVector();
- for (Vector<string>::const_iterator i = modifiers.begin(); i != modifiers.end(); ++i)
- isSystemKey |= applyKeyModifier(*i, event);
- } else if (argument->isString())
- isSystemKey = applyKeyModifier(argument->toString(), event);
- return isSystemKey;
-}
-
-// Get the edit command corresponding to a keyboard event.
-// Returns true if the specified event corresponds to an edit command, the name
-// of the edit command will be stored in |*name|.
-bool getEditCommand(const WebKeyboardEvent& event, string* name)
-{
-#if OS(MAC_OS_X)
- // We only cares about Left,Right,Up,Down keys with Command or Command+Shift
- // modifiers. These key events correspond to some special movement and
- // selection editor commands, and was supposed to be handled in
- // WebKit/chromium/src/EditorClientImpl.cpp. But these keys will be marked
- // as system key, which prevents them from being handled. Thus they must be
- // handled specially.
- if ((event.modifiers & ~WebKeyboardEvent::ShiftKey) != WebKeyboardEvent::MetaKey)
- return false;
-
- switch (event.windowsKeyCode) {
- case VKEY_LEFT:
- *name = "MoveToBeginningOfLine";
- break;
- case VKEY_RIGHT:
- *name = "MoveToEndOfLine";
- break;
- case VKEY_UP:
- *name = "MoveToBeginningOfDocument";
- break;
- case VKEY_DOWN:
- *name = "MoveToEndOfDocument";
- break;
- default:
- return false;
- }
-
- if (event.modifiers & WebKeyboardEvent::ShiftKey)
- name->append("AndModifySelection");
-
- return true;
-#else
- return false;
-#endif
-}
-
-// Key event location code introduced in DOM Level 3.
-// See also: http://www.w3.org/TR/DOM-Level-3-Events/#events-keyboardevents
-enum KeyLocationCode {
- DOMKeyLocationStandard = 0x00,
- DOMKeyLocationLeft = 0x01,
- DOMKeyLocationRight = 0x02,
- DOMKeyLocationNumpad = 0x03
-};
-
-}
-
-EventSender::EventSender()
- : m_delegate(0)
-{
- // Initialize the map that associates methods of this class with the names
- // they will use when called by JavaScript. The actual binding of those
- // names to their methods will be done by calling bindToJavaScript() (defined
- // by CppBoundClass, the parent to EventSender).
- bindMethod("addTouchPoint", &EventSender::addTouchPoint);
- bindMethod("beginDragWithFiles", &EventSender::beginDragWithFiles);
- bindMethod("cancelTouchPoint", &EventSender::cancelTouchPoint);
- bindMethod("clearKillRing", &EventSender::clearKillRing);
- bindMethod("clearTouchPoints", &EventSender::clearTouchPoints);
- bindMethod("contextClick", &EventSender::contextClick);
- bindMethod("continuousMouseScrollBy", &EventSender::continuousMouseScrollBy);
- bindMethod("dispatchMessage", &EventSender::dispatchMessage);
- bindMethod("dumpFilenameBeingDragged", &EventSender::dumpFilenameBeingDragged);
- bindMethod("enableDOMUIEventLogging", &EventSender::enableDOMUIEventLogging);
- bindMethod("fireKeyboardEventsToElement", &EventSender::fireKeyboardEventsToElement);
- bindMethod("keyDown", &EventSender::keyDown);
- bindMethod("leapForward", &EventSender::leapForward);
- bindMethod("mouseDown", &EventSender::mouseDown);
- bindMethod("mouseMoveTo", &EventSender::mouseMoveTo);
- bindMethod("mouseScrollBy", &EventSender::mouseScrollBy);
- bindMethod("mouseUp", &EventSender::mouseUp);
- bindMethod("releaseTouchPoint", &EventSender::releaseTouchPoint);
- bindMethod("scheduleAsynchronousClick", &EventSender::scheduleAsynchronousClick);
- bindMethod("scheduleAsynchronousKeyDown", &EventSender::scheduleAsynchronousKeyDown);
- bindMethod("setTouchModifier", &EventSender::setTouchModifier);
- bindMethod("textZoomIn", &EventSender::textZoomIn);
- bindMethod("textZoomOut", &EventSender::textZoomOut);
- bindMethod("touchCancel", &EventSender::touchCancel);
- bindMethod("touchEnd", &EventSender::touchEnd);
- bindMethod("touchMove", &EventSender::touchMove);
- bindMethod("touchStart", &EventSender::touchStart);
- bindMethod("updateTouchPoint", &EventSender::updateTouchPoint);
- bindMethod("gestureFlingCancel", &EventSender::gestureFlingCancel);
- bindMethod("gestureFlingStart", &EventSender::gestureFlingStart);
- bindMethod("gestureScrollBegin", &EventSender::gestureScrollBegin);
- bindMethod("gestureScrollEnd", &EventSender::gestureScrollEnd);
- bindMethod("gestureScrollFirstPoint", &EventSender::gestureScrollFirstPoint);
- bindMethod("gestureScrollUpdate", &EventSender::gestureScrollUpdate);
- bindMethod("gestureTap", &EventSender::gestureTap);
- bindMethod("gestureTapDown", &EventSender::gestureTapDown);
- bindMethod("gestureTapCancel", &EventSender::gestureTapCancel);
- bindMethod("gestureLongPress", &EventSender::gestureLongPress);
- bindMethod("gestureLongTap", &EventSender::gestureLongTap);
- bindMethod("gestureTwoFingerTap", &EventSender::gestureTwoFingerTap);
- bindMethod("zoomPageIn", &EventSender::zoomPageIn);
- bindMethod("zoomPageOut", &EventSender::zoomPageOut);
- bindMethod("scalePageBy", &EventSender::scalePageBy);
-
- // When set to true (the default value), we batch mouse move and mouse up
- // events so we can simulate drag & drop.
- bindProperty("dragMode", &dragMode);
-#if OS(WINDOWS)
- bindProperty("WM_KEYDOWN", &wmKeyDown);
- bindProperty("WM_KEYUP", &wmKeyUp);
- bindProperty("WM_CHAR", &wmChar);
- bindProperty("WM_DEADCHAR", &wmDeadChar);
- bindProperty("WM_SYSKEYDOWN", &wmSysKeyDown);
- bindProperty("WM_SYSKEYUP", &wmSysKeyUp);
- bindProperty("WM_SYSCHAR", &wmSysChar);
- bindProperty("WM_SYSDEADCHAR", &wmSysDeadChar);
-#endif
-}
-
-void EventSender::reset()
-{
- // The test should have finished a drag and the mouse button state.
- ASSERT(currentDragData.isNull());
- currentDragData.reset();
- currentDragEffect = WebKit::WebDragOperationNone;
- currentDragEffectsAllowed = WebKit::WebDragOperationNone;
- pressedButton = WebMouseEvent::ButtonNone;
- dragMode.set(true);
-#if OS(WINDOWS)
- wmKeyDown.set(WM_KEYDOWN);
- wmKeyUp.set(WM_KEYUP);
- wmChar.set(WM_CHAR);
- wmDeadChar.set(WM_DEADCHAR);
- wmSysKeyDown.set(WM_SYSKEYDOWN);
- wmSysKeyUp.set(WM_SYSKEYUP);
- wmSysChar.set(WM_SYSCHAR);
- wmSysDeadChar.set(WM_SYSDEADCHAR);
-#endif
- lastMousePos = WebPoint(0, 0);
- lastClickTimeSec = 0;
- lastClickPos = WebPoint(0, 0);
- clickCount = 0;
- lastButtonType = WebMouseEvent::ButtonNone;
- timeOffsetMs = 0;
- touchModifiers = 0;
- touchPoints.clear();
- m_taskList.revokeAll();
- m_currentGestureLocation = WebPoint(0, 0);
-}
-
-void EventSender::doDragDrop(const WebDragData& dragData, WebDragOperationsMask mask)
-{
- WebMouseEvent event;
- initMouseEvent(WebInputEvent::MouseDown, pressedButton, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- WebPoint clientPoint(event.x, event.y);
- WebPoint screenPoint(event.globalX, event.globalY);
- currentDragData = dragData;
- currentDragEffectsAllowed = mask;
- currentDragEffect = webview()->dragTargetDragEnter(dragData, clientPoint, screenPoint, currentDragEffectsAllowed, 0);
-
- // Finish processing events.
- replaySavedEvents();
-}
-
-void EventSender::dumpFilenameBeingDragged(const CppArgumentList&, CppVariant*)
-{
- WebString filename;
- WebVector<WebDragData::Item> items = currentDragData.items();
- for (size_t i = 0; i < items.size(); ++i) {
- if (items[i].storageType == WebDragData::Item::StorageTypeBinaryData) {
- filename = items[i].title;
- break;
- }
- }
- m_delegate->printMessage(std::string("Filename being dragged: ") + filename.utf8().data() + "\n");
-}
-
-WebMouseEvent::Button EventSender::getButtonTypeFromButtonNumber(int buttonCode)
-{
- if (!buttonCode)
- return WebMouseEvent::ButtonLeft;
- if (buttonCode == 2)
- return WebMouseEvent::ButtonRight;
- return WebMouseEvent::ButtonMiddle;
-}
-
-int EventSender::getButtonNumberFromSingleArg(const CppArgumentList& arguments)
-{
- int buttonCode = 0;
- if (arguments.size() > 0 && arguments[0].isNumber())
- buttonCode = arguments[0].toInt32();
- return buttonCode;
-}
-
-void EventSender::updateClickCountForButton(WebMouseEvent::Button buttonType)
-{
- if ((getCurrentEventTimeSec(m_delegate) - lastClickTimeSec < multipleClickTimeSec)
- && (!outsideMultiClickRadius(lastMousePos, lastClickPos))
- && (buttonType == lastButtonType))
- ++clickCount;
- else {
- clickCount = 1;
- lastButtonType = buttonType;
- }
-}
-
-//
-// Implemented javascript methods.
-//
-
-void EventSender::mouseDown(const CppArgumentList& arguments, CppVariant* result)
-{
- if (result) // Could be 0 if invoked asynchronously.
- result->setNull();
-
- webview()->layout();
-
- int buttonNumber = getButtonNumberFromSingleArg(arguments);
- ASSERT(buttonNumber != -1);
-
- WebMouseEvent::Button buttonType = getButtonTypeFromButtonNumber(buttonNumber);
-
- updateClickCountForButton(buttonType);
-
- WebMouseEvent event;
- pressedButton = buttonType;
- initMouseEvent(WebInputEvent::MouseDown, buttonType, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- if (arguments.size() >= 2 && (arguments[1].isObject() || arguments[1].isString()))
- applyKeyModifiers(&(arguments[1]), &event);
- webview()->handleInputEvent(event);
-}
-
-void EventSender::mouseUp(const CppArgumentList& arguments, CppVariant* result)
-{
- if (result) // Could be 0 if invoked asynchronously.
- result->setNull();
-
- webview()->layout();
-
- int buttonNumber = getButtonNumberFromSingleArg(arguments);
- ASSERT(buttonNumber != -1);
-
- WebMouseEvent::Button buttonType = getButtonTypeFromButtonNumber(buttonNumber);
-
- if (isDragMode() && !replayingSavedEvents) {
- SavedEvent savedEvent;
- savedEvent.type = SavedEvent::MouseUp;
- savedEvent.buttonType = buttonType;
- mouseEventQueue.append(savedEvent);
- replaySavedEvents();
- } else {
- WebMouseEvent event;
- initMouseEvent(WebInputEvent::MouseUp, buttonType, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- if (arguments.size() >= 2 && (arguments[1].isObject() || arguments[1].isString()))
- applyKeyModifiers(&(arguments[1]), &event);
- doMouseUp(event);
- }
-}
-
-void EventSender::doMouseUp(const WebMouseEvent& e)
-{
- webview()->handleInputEvent(e);
-
- pressedButton = WebMouseEvent::ButtonNone;
- lastClickTimeSec = e.timeStampSeconds;
- lastClickPos = lastMousePos;
-
- // If we're in a drag operation, complete it.
- if (currentDragData.isNull())
- return;
- WebPoint clientPoint(e.x, e.y);
- WebPoint screenPoint(e.globalX, e.globalY);
-
- currentDragEffect = webview()->dragTargetDragOver(clientPoint, screenPoint, currentDragEffectsAllowed, 0);
- if (currentDragEffect)
- webview()->dragTargetDrop(clientPoint, screenPoint, 0);
- else
- webview()->dragTargetDragLeave();
- webview()->dragSourceEndedAt(clientPoint, screenPoint, currentDragEffect);
- webview()->dragSourceSystemDragEnded();
-
- currentDragData.reset();
-}
-
-void EventSender::mouseMoveTo(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
- webview()->layout();
-
- WebPoint mousePos(arguments[0].toInt32(), arguments[1].toInt32());
-
- if (isDragMode() && pressedButton == WebMouseEvent::ButtonLeft && !replayingSavedEvents) {
- SavedEvent savedEvent;
- savedEvent.type = SavedEvent::MouseMove;
- savedEvent.pos = mousePos;
- mouseEventQueue.append(savedEvent);
- } else {
- WebMouseEvent event;
- initMouseEvent(WebInputEvent::MouseMove, pressedButton, mousePos, &event, getCurrentEventTimeSec(m_delegate));
- doMouseMove(event);
- }
-}
-
-void EventSender::doMouseMove(const WebMouseEvent& e)
-{
- lastMousePos = WebPoint(e.x, e.y);
-
- webview()->handleInputEvent(e);
-
- if (pressedButton == WebMouseEvent::ButtonNone || currentDragData.isNull())
- return;
- WebPoint clientPoint(e.x, e.y);
- WebPoint screenPoint(e.globalX, e.globalY);
- currentDragEffect = webview()->dragTargetDragOver(clientPoint, screenPoint, currentDragEffectsAllowed, 0);
-}
-
-void EventSender::keyDown(const CppArgumentList& arguments, CppVariant* result)
-{
- if (result)
- result->setNull();
- if (arguments.size() < 1 || !arguments[0].isString())
- return;
- bool generateChar = false;
-
- // FIXME: I'm not exactly sure how we should convert the string to a key
- // event. This seems to work in the cases I tested.
- // FIXME: Should we also generate a KEY_UP?
- string codeStr = arguments[0].toString();
-
- // Convert \n -> VK_RETURN. Some layout tests use \n to mean "Enter", when
- // Windows uses \r for "Enter".
- int code = 0;
- int text = 0;
- bool needsShiftKeyModifier = false;
- if ("\n" == codeStr) {
- generateChar = true;
- text = code = VKEY_RETURN;
- } else if ("rightArrow" == codeStr)
- code = VKEY_RIGHT;
- else if ("downArrow" == codeStr)
- code = VKEY_DOWN;
- else if ("leftArrow" == codeStr)
- code = VKEY_LEFT;
- else if ("upArrow" == codeStr)
- code = VKEY_UP;
- else if ("insert" == codeStr)
- code = VKEY_INSERT;
- else if ("delete" == codeStr)
- code = VKEY_DELETE;
- else if ("pageUp" == codeStr)
- code = VKEY_PRIOR;
- else if ("pageDown" == codeStr)
- code = VKEY_NEXT;
- else if ("home" == codeStr)
- code = VKEY_HOME;
- else if ("end" == codeStr)
- code = VKEY_END;
- else if ("printScreen" == codeStr)
- code = VKEY_SNAPSHOT;
- else if ("menu" == codeStr)
- code = VKEY_APPS;
- else if ("leftControl" == codeStr)
- code = VKEY_LCONTROL;
- else if ("rightControl" == codeStr)
- code = VKEY_RCONTROL;
- else if ("leftShift" == codeStr)
- code = VKEY_LSHIFT;
- else if ("rightShift" == codeStr)
- code = VKEY_RSHIFT;
- else if ("leftAlt" == codeStr)
- code = VKEY_LMENU;
- else if ("rightAlt" == codeStr)
- code = VKEY_RMENU;
- 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
- // name, set its key code.
- for (int i = 1; i <= 24; ++i) {
- char functionChars[10];
- snprintf(functionChars, 10, "F%d", i);
- string functionKeyName(functionChars);
- if (functionKeyName == codeStr) {
- code = VKEY_F1 + (i - 1);
- break;
- }
- }
- if (!code) {
- WebString webCodeStr = WebString::fromUTF8(codeStr.data(), codeStr.size());
- ASSERT(webCodeStr.length() == 1);
- text = code = webCodeStr.data()[0];
- needsShiftKeyModifier = needsShiftModifier(code);
- if ((code & 0xFF) >= 'a' && (code & 0xFF) <= 'z')
- code -= 'a' - 'A';
- generateChar = true;
- }
- }
-
- // For one generated keyboard event, we need to generate a keyDown/keyUp
- // pair; refer to EventSender.cpp in Tools/DumpRenderTree/win.
- // On Windows, we might also need to generate a char event to mimic the
- // Windows event flow; on other platforms we create a merged event and test
- // the event flow that that platform provides.
- WebKeyboardEvent eventDown, eventChar, eventUp;
- eventDown.type = WebInputEvent::RawKeyDown;
- eventDown.modifiers = 0;
- eventDown.windowsKeyCode = code;
-#if OS(LINUX) && USE(GTK)
- eventDown.nativeKeyCode = NativeKeyCodeForWindowsKeyCode(code);
-#endif
-
- if (generateChar) {
- eventDown.text[0] = text;
- eventDown.unmodifiedText[0] = text;
- }
- eventDown.setKeyIdentifierFromWindowsKeyCode();
-
- if (arguments.size() >= 2 && (arguments[1].isObject() || arguments[1].isString()))
- eventDown.isSystemKey = applyKeyModifiers(&(arguments[1]), &eventDown);
-
- if (needsShiftKeyModifier)
- eventDown.modifiers |= WebInputEvent::ShiftKey;
-
- // See if KeyLocation argument is given.
- if (arguments.size() >= 3 && arguments[2].isNumber()) {
- int location = arguments[2].toInt32();
- if (location == DOMKeyLocationNumpad)
- eventDown.modifiers |= WebInputEvent::IsKeyPad;
- }
-
- eventChar = eventUp = eventDown;
- eventUp.type = WebInputEvent::KeyUp;
- // EventSender.m forces a layout here, with at least one
- // test (fast/forms/focus-control-to-page.html) relying on this.
- webview()->layout();
-
- // In the browser, if a keyboard event corresponds to an editor command,
- // the command will be dispatched to the renderer just before dispatching
- // the keyboard event, and then it will be executed in the
- // RenderView::handleCurrentKeyboardEvent() method, which is called from
- // third_party/WebKit/Source/WebKit/chromium/src/EditorClientImpl.cpp.
- // We just simulate the same behavior here.
- string editCommand;
- if (getEditCommand(eventDown, &editCommand))
- m_delegate->setEditCommand(editCommand, "");
-
- webview()->handleInputEvent(eventDown);
-
- m_delegate->clearEditCommand();
-
- if (generateChar) {
- eventChar.type = WebInputEvent::Char;
- eventChar.keyIdentifier[0] = '\0';
- webview()->handleInputEvent(eventChar);
- }
-
- webview()->handleInputEvent(eventUp);
-}
-
-void EventSender::dispatchMessage(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
-#if OS(WINDOWS)
- if (arguments.size() == 3) {
- // Grab the message id to see if we need to dispatch it.
- int msg = arguments[0].toInt32();
-
- // WebKit's version of this function stuffs a MSG struct and uses
- // TranslateMessage and DispatchMessage. We use a WebKeyboardEvent, which
- // doesn't need to receive the DeadChar and SysDeadChar messages.
- if (msg == WM_DEADCHAR || msg == WM_SYSDEADCHAR)
- return;
-
- webview()->layout();
-
- unsigned long lparam = static_cast<unsigned long>(arguments[2].toDouble());
- webview()->handleInputEvent(WebInputEventFactory::keyboardEvent(0, msg, arguments[1].toInt32(), lparam));
- } else
- ASSERT_NOT_REACHED();
-#endif
-}
-
-bool EventSender::needsShiftModifier(int keyCode)
-{
- // If code is an uppercase letter, assign a SHIFT key to
- // eventDown.modifier, this logic comes from
- // Tools/DumpRenderTree/win/EventSender.cpp
- return (keyCode & 0xFF) >= 'A' && (keyCode & 0xFF) <= 'Z';
-}
-
-void EventSender::leapForward(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 1 || !arguments[0].isNumber())
- return;
-
- int milliseconds = arguments[0].toInt32();
- if (isDragMode() && pressedButton == WebMouseEvent::ButtonLeft && !replayingSavedEvents) {
- SavedEvent savedEvent;
- savedEvent.type = SavedEvent::LeapForward;
- savedEvent.milliseconds = milliseconds;
- mouseEventQueue.append(savedEvent);
- } else
- doLeapForward(milliseconds);
-}
-
-void EventSender::doLeapForward(int milliseconds)
-{
- advanceEventTime(milliseconds);
-}
-
-// Apple's port of WebKit zooms by a factor of 1.2 (see
-// WebKit/WebView/WebView.mm)
-void EventSender::textZoomIn(const CppArgumentList&, CppVariant* result)
-{
- webview()->setZoomLevel(true, webview()->zoomLevel() + 1);
- result->setNull();
-}
-
-void EventSender::textZoomOut(const CppArgumentList&, CppVariant* result)
-{
- webview()->setZoomLevel(true, webview()->zoomLevel() - 1);
- result->setNull();
-}
-
-void EventSender::zoomPageIn(const CppArgumentList&, CppVariant* result)
-{
- webview()->setZoomLevel(false, webview()->zoomLevel() + 1);
- result->setNull();
-}
-
-void EventSender::zoomPageOut(const CppArgumentList&, CppVariant* result)
-{
- webview()->setZoomLevel(false, webview()->zoomLevel() - 1);
- result->setNull();
-}
-
-void EventSender::scalePageBy(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 3 || !arguments[0].isNumber() || !arguments[1].isNumber() || !arguments[2].isNumber())
- return;
-
- float scaleFactor = static_cast<float>(arguments[0].toDouble());
- int x = arguments[1].toInt32();
- int y = arguments[2].toInt32();
- webview()->setPageScaleFactor(scaleFactor, WebPoint(x, y));
- 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;
- while (!mouseEventQueue.isEmpty()) {
- SavedEvent e = mouseEventQueue.takeFirst();
-
- switch (e.type) {
- case SavedEvent::MouseMove: {
- WebMouseEvent event;
- initMouseEvent(WebInputEvent::MouseMove, pressedButton, e.pos, &event, getCurrentEventTimeSec(m_delegate));
- doMouseMove(event);
- break;
- }
- case SavedEvent::LeapForward:
- doLeapForward(e.milliseconds);
- break;
- case SavedEvent::MouseUp: {
- WebMouseEvent event;
- initMouseEvent(WebInputEvent::MouseUp, e.buttonType, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- doMouseUp(event);
- break;
- }
- default:
- ASSERT_NOT_REACHED();
- }
- }
-
- replayingSavedEvents = false;
-}
-
-// Because actual context menu is implemented by the browser side,
-// this function does only what LayoutTests are expecting:
-// - Many test checks the count of items. So returning non-zero value makes sense.
-// - Some test compares the count before and after some action. So changing the count based on flags
-// also makes sense. This function is doing such for some flags.
-// - Some test even checks actual string content. So providing it would be also helpful.
-//
-static Vector<WebString> makeMenuItemStringsFor(WebContextMenuData* contextMenu, TestDelegate* delegate)
-{
- // These constants are based on Safari's context menu because tests are made for it.
- static const char* nonEditableMenuStrings[] = { "Back", "Reload Page", "Open in Dashbaord", "<separator>", "View Source", "Save Page As", "Print Page", "Inspect Element", 0 };
- static const char* editableMenuStrings[] = { "Cut", "Copy", "<separator>", "Paste", "Spelling and Grammar", "Substitutions, Transformations", "Font", "Speech", "Paragraph Direction", "<separator>", 0 };
-
- // This is possible because mouse events are cancelleable.
- if (!contextMenu)
- return Vector<WebString>();
-
- Vector<WebString> strings;
-
- if (contextMenu->isEditable) {
- for (const char** item = editableMenuStrings; *item; ++item)
- strings.append(WebString::fromUTF8(*item));
- WebVector<WebString> suggestions;
- delegate->fillSpellingSuggestionList(contextMenu->misspelledWord, &suggestions);
- for (size_t i = 0; i < suggestions.size(); ++i)
- strings.append(suggestions[i]);
- } else {
- for (const char** item = nonEditableMenuStrings; *item; ++item)
- strings.append(WebString::fromUTF8(*item));
- }
-
- return strings;
-}
-
-void EventSender::contextClick(const CppArgumentList& arguments, CppVariant* result)
-{
- webview()->layout();
-
- updateClickCountForButton(WebMouseEvent::ButtonRight);
-
- // Clears last context menu data because we need to know if the context menu be requested
- // after following mouse events.
- m_delegate->clearContextMenuData();
-
- // Generate right mouse down and up.
- WebMouseEvent event;
- // This is a hack to work around only allowing a single pressed button since we want to
- // test the case where both the left and right mouse buttons are pressed.
- if (pressedButton == WebMouseEvent::ButtonNone)
- pressedButton = WebMouseEvent::ButtonRight;
- initMouseEvent(WebInputEvent::MouseDown, WebMouseEvent::ButtonRight, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- webview()->handleInputEvent(event);
-
-#if OS(WINDOWS)
- initMouseEvent(WebInputEvent::MouseUp, WebMouseEvent::ButtonRight, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- webview()->handleInputEvent(event);
-
- pressedButton = WebMouseEvent::ButtonNone;
-#endif
-
- WebContextMenuData* lastContextMenu = m_delegate->lastContextMenuData();
- result->set(WebBindings::makeStringArray(makeMenuItemStringsFor(lastContextMenu, m_delegate)));
-}
-
-class MouseDownTask: public WebMethodTask<EventSender> {
-public:
- MouseDownTask(EventSender* obj, const CppArgumentList& arg)
- : WebMethodTask<EventSender>(obj), m_arguments(arg) { }
- virtual void runIfValid() { m_object->mouseDown(m_arguments, 0); }
-
-private:
- CppArgumentList m_arguments;
-};
-
-class MouseUpTask: public WebMethodTask<EventSender> {
-public:
- MouseUpTask(EventSender* obj, const CppArgumentList& arg)
- : WebMethodTask<EventSender>(obj), m_arguments(arg) { }
- virtual void runIfValid() { m_object->mouseUp(m_arguments, 0); }
-
-private:
- CppArgumentList m_arguments;
-};
-
-void EventSender::scheduleAsynchronousClick(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- m_delegate->postTask(new MouseDownTask(this, arguments));
- m_delegate->postTask(new MouseUpTask(this, arguments));
-}
-
-class KeyDownTask : public WebMethodTask<EventSender> {
-public:
- KeyDownTask(EventSender* obj, const CppArgumentList& arg)
- : WebMethodTask<EventSender>(obj), m_arguments(arg) { }
- virtual void runIfValid() { m_object->keyDown(m_arguments, 0); }
-
-private:
- CppArgumentList m_arguments;
-};
-
-void EventSender::scheduleAsynchronousKeyDown(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- m_delegate->postTask(new KeyDownTask(this, arguments));
-}
-
-void EventSender::beginDragWithFiles(const CppArgumentList& arguments, CppVariant* result)
-{
- currentDragData.initialize();
- Vector<string> files = arguments[0].toStringVector();
- WebVector<WebString> absoluteFilenames(files.size());
- for (size_t i = 0; i < files.size(); ++i) {
- WebDragData::Item item;
- item.storageType = WebDragData::Item::StorageTypeFilename;
- item.filenameData = m_delegate->getAbsoluteWebStringFromUTF8Path(files[i]);
- currentDragData.addItem(item);
- absoluteFilenames[i] = item.filenameData;
- }
- currentDragData.setFilesystemId(m_delegate->registerIsolatedFileSystem(absoluteFilenames));
- currentDragEffectsAllowed = WebKit::WebDragOperationCopy;
-
- // Provide a drag source.
- webview()->dragTargetDragEnter(currentDragData, lastMousePos, lastMousePos, currentDragEffectsAllowed, 0);
-
- // dragMode saves events and then replays them later. We don't need/want that.
- dragMode.set(false);
-
- // Make the rest of eventSender think a drag is in progress.
- pressedButton = WebMouseEvent::ButtonLeft;
-
- result->setNull();
-}
-
-void EventSender::addTouchPoint(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- WebTouchPoint touchPoint;
- touchPoint.state = WebTouchPoint::StatePressed;
- touchPoint.position = WebPoint(arguments[0].toInt32(), arguments[1].toInt32());
- touchPoint.screenPosition = touchPoint.position;
-
- int lowestId = 0;
- for (size_t i = 0; i < touchPoints.size(); i++) {
- if (touchPoints[i].id == lowestId)
- lowestId++;
- }
- touchPoint.id = lowestId;
- touchPoints.append(touchPoint);
-}
-
-void EventSender::clearTouchPoints(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
- touchPoints.clear();
-}
-
-void EventSender::releaseTouchPoint(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- const unsigned index = arguments[0].toInt32();
- ASSERT(index < touchPoints.size());
-
- WebTouchPoint* touchPoint = &touchPoints[index];
- touchPoint->state = WebTouchPoint::StateReleased;
-}
-
-void EventSender::setTouchModifier(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- int mask = 0;
- const string keyName = arguments[0].toString();
- if (keyName == "shift")
- mask = WebInputEvent::ShiftKey;
- else if (keyName == "alt")
- mask = WebInputEvent::AltKey;
- else if (keyName == "ctrl")
- mask = WebInputEvent::ControlKey;
- else if (keyName == "meta")
- mask = WebInputEvent::MetaKey;
-
- if (arguments[1].toBoolean())
- touchModifiers |= mask;
- else
- touchModifiers &= ~mask;
-}
-
-void EventSender::updateTouchPoint(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- const unsigned index = arguments[0].toInt32();
- ASSERT(index < touchPoints.size());
-
- WebPoint position(arguments[1].toInt32(), arguments[2].toInt32());
- WebTouchPoint* touchPoint = &touchPoints[index];
- touchPoint->state = WebTouchPoint::StateMoved;
- touchPoint->position = position;
- touchPoint->screenPosition = position;
-}
-
-void EventSender::cancelTouchPoint(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- const unsigned index = arguments[0].toInt32();
- ASSERT(index < touchPoints.size());
-
- WebTouchPoint* touchPoint = &touchPoints[index];
- touchPoint->state = WebTouchPoint::StateCancelled;
-}
-
-void EventSender::sendCurrentTouchEvent(const WebInputEvent::Type type)
-{
- ASSERT(static_cast<unsigned>(WebTouchEvent::touchesLengthCap) > touchPoints.size());
- webview()->layout();
-
- WebTouchEvent touchEvent;
- touchEvent.type = type;
- touchEvent.modifiers = touchModifiers;
- touchEvent.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
- touchEvent.touchesLength = touchPoints.size();
- for (unsigned i = 0; i < touchPoints.size(); ++i)
- touchEvent.touches[i] = touchPoints[i];
- webview()->handleInputEvent(touchEvent);
-
- for (unsigned i = 0; i < touchPoints.size(); ++i) {
- WebTouchPoint* touchPoint = &touchPoints[i];
- if (touchPoint->state == WebTouchPoint::StateReleased) {
- touchPoints.remove(i);
- --i;
- } else
- touchPoint->state = WebTouchPoint::StateStationary;
- }
-}
-
-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();
- int paged = false;
- int hasPreciseScrollingDeltas = false;
-
- if (arguments.size() > 2 && arguments[2].isBool())
- paged = arguments[2].toBoolean();
-
- if (arguments.size() > 3 && arguments[3].isBool())
- hasPreciseScrollingDeltas = arguments[3].toBoolean();
-
- WebMouseWheelEvent event;
- initMouseEvent(WebInputEvent::MouseWheel, pressedButton, lastMousePos, &event, getCurrentEventTimeSec(m_delegate));
- event.wheelTicksX = static_cast<float>(horizontal);
- event.wheelTicksY = static_cast<float>(vertical);
- event.deltaX = event.wheelTicksX;
- event.deltaY = event.wheelTicksY;
- event.scrollByPage = paged;
- event.hasPreciseScrollingDeltas = hasPreciseScrollingDeltas;
-
- if (continuous) {
- event.wheelTicksX /= scrollbarPixelsPerTick;
- event.wheelTicksY /= scrollbarPixelsPerTick;
- } else {
- event.deltaX *= scrollbarPixelsPerTick;
- event.deltaY *= scrollbarPixelsPerTick;
- }
- webview()->handleInputEvent(event);
-}
-
-void EventSender::touchEnd(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
- sendCurrentTouchEvent(WebInputEvent::TouchEnd);
-}
-
-void EventSender::touchMove(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
- sendCurrentTouchEvent(WebInputEvent::TouchMove);
-}
-
-void EventSender::touchStart(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
- sendCurrentTouchEvent(WebInputEvent::TouchStart);
-}
-
-void EventSender::touchCancel(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
- sendCurrentTouchEvent(WebInputEvent::TouchCancel);
-}
-
-void EventSender::gestureScrollBegin(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureScrollBegin, arguments);
-}
-
-void EventSender::gestureScrollEnd(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureScrollEnd, arguments);
-}
-
-void EventSender::gestureScrollUpdate(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureScrollUpdate, arguments);
-}
-
-void EventSender::gestureTap(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureTap, arguments);
-}
-
-void EventSender::gestureTapDown(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureTapDown, arguments);
-}
-
-void EventSender::gestureTapCancel(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureTapCancel, arguments);
-}
-
-void EventSender::gestureLongPress(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureLongPress, arguments);
-}
-
-void EventSender::gestureLongTap(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureLongTap, arguments);
-}
-
-void EventSender::gestureTwoFingerTap(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- gestureEvent(WebInputEvent::GestureTwoFingerTap, arguments);
-}
-
-void EventSender::gestureScrollFirstPoint(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
-
- WebPoint point(arguments[0].toInt32(), arguments[1].toInt32());
- m_currentGestureLocation = point;
-}
-
-void EventSender::gestureEvent(WebInputEvent::Type type, const CppArgumentList& arguments)
-{
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
-
- WebPoint point(arguments[0].toInt32(), arguments[1].toInt32());
-
- WebGestureEvent event;
- event.type = type;
-
- switch (type) {
- case WebInputEvent::GestureScrollUpdate:
- event.data.scrollUpdate.deltaX = static_cast<float>(arguments[0].toDouble());
- event.data.scrollUpdate.deltaY = static_cast<float>(arguments[1].toDouble());
- event.x = m_currentGestureLocation.x;
- event.y = m_currentGestureLocation.y;
- m_currentGestureLocation.x = m_currentGestureLocation.x + event.data.scrollUpdate.deltaX;
- m_currentGestureLocation.y = m_currentGestureLocation.y + event.data.scrollUpdate.deltaY;
- break;
-
- case WebInputEvent::GestureScrollBegin:
- m_currentGestureLocation = WebPoint(point.x, point.y);
- event.x = m_currentGestureLocation.x;
- event.y = m_currentGestureLocation.y;
- break;
- case WebInputEvent::GestureScrollEnd:
- event.x = m_currentGestureLocation.x;
- event.y = m_currentGestureLocation.y;
- break;
- case WebInputEvent::GestureTap:
- if (arguments.size() >= 3)
- event.data.tap.tapCount = static_cast<float>(arguments[2].toDouble());
- else
- event.data.tap.tapCount = 1;
- event.x = point.x;
- event.y = point.y;
- break;
- case WebInputEvent::GestureTapDown:
- event.x = point.x;
- event.y = point.y;
- if (arguments.size() >= 4) {
- event.data.tapDown.width = static_cast<float>(arguments[2].toDouble());
- event.data.tapDown.height = static_cast<float>(arguments[3].toDouble());
- }
- break;
- case WebInputEvent::GestureTapCancel:
- event.x = point.x;
- event.y = point.y;
- break;
- case WebInputEvent::GestureLongPress:
- event.x = point.x;
- event.y = point.y;
- if (arguments.size() >= 4) {
- event.data.longPress.width = static_cast<float>(arguments[2].toDouble());
- event.data.longPress.height = static_cast<float>(arguments[3].toDouble());
- }
- break;
- case WebInputEvent::GestureLongTap:
- event.x = point.x;
- event.y = point.y;
- if (arguments.size() >= 4) {
- event.data.longPress.width = static_cast<float>(arguments[2].toDouble());
- event.data.longPress.height = static_cast<float>(arguments[3].toDouble());
- }
- break;
- case WebInputEvent::GestureTwoFingerTap:
- event.x = point.x;
- event.y = point.y;
- if (arguments.size() >= 4) {
- event.data.twoFingerTap.firstFingerWidth = static_cast<float>(arguments[2].toDouble());
- event.data.twoFingerTap.firstFingerHeight = static_cast<float>(arguments[3].toDouble());
- }
- break;
- default:
- ASSERT_NOT_REACHED();
- }
-
- event.globalX = event.x;
- event.globalY = event.y;
- event.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
- webview()->handleInputEvent(event);
-}
-
-void EventSender::gestureFlingCancel(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (!arguments.size())
- return;
-
- WebGestureEvent event;
- event.type = WebInputEvent::GestureFlingCancel;
- event.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
- webview()->handleInputEvent(event);
-}
-
-void EventSender::gestureFlingStart(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 4)
- return;
-
- for (int i = 0; i < 4; i++)
- if (!arguments[i].isNumber())
- return;
-
- WebGestureEvent event;
- event.type = WebInputEvent::GestureFlingStart;
-
- event.x = static_cast<float>(arguments[0].toDouble());
- event.y = static_cast<float>(arguments[1].toDouble());
- event.globalX = event.x;
- event.globalY = event.y;
-
- event.data.flingStart.velocityX = static_cast<float>(arguments[2].toDouble());
- event.data.flingStart.velocityY = static_cast<float>(arguments[3].toDouble());
- event.timeStampSeconds = getCurrentEventTimeSec(m_delegate);
- webview()->handleInputEvent(event);
-}
-
-//
-// Unimplemented stubs
-//
-
-void EventSender::enableDOMUIEventLogging(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void EventSender::fireKeyboardEventsToElement(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-void EventSender::clearKillRing(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h b/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h
deleted file mode 100644
index b1da68487..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/EventSender.h
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * 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.
- */
-
-/*
- EventSender class:
- Bound to a JavaScript window.eventSender object using
- CppBoundClass::bindToJavascript(), this allows layout tests to fire DOM events.
-*/
-
-#ifndef EventSender_h
-#define EventSender_h
-
-#include "CppBoundClass.h"
-#include "WebDragOperation.h"
-#include "WebInputEvent.h"
-#include "WebTask.h"
-#include "platform/WebPoint.h"
-
-namespace WebKit {
-class WebDragData;
-class WebView;
-}
-
-namespace WebTestRunner {
-
-class TestDelegate;
-
-class EventSender : public CppBoundClass {
-public:
- EventSender();
-
- void setDelegate(TestDelegate* delegate) { m_delegate = delegate; }
- void setWebView(WebKit::WebView* webView) { m_webView = webView; }
-
- // Resets some static variable state.
- void reset();
-
- // Simulate drag&drop system call.
- void doDragDrop(const WebKit::WebDragData&, WebKit::WebDragOperationsMask);
-
- // Test helper for dragging out images.
- void dumpFilenameBeingDragged(const CppArgumentList&, CppVariant*);
-
- // JS callback methods.
- void contextClick(const CppArgumentList&, CppVariant*);
- void mouseDown(const CppArgumentList&, CppVariant*);
- void mouseUp(const CppArgumentList&, CppVariant*);
- void mouseMoveTo(const CppArgumentList&, CppVariant*);
- void leapForward(const CppArgumentList&, CppVariant*);
- void keyDown(const CppArgumentList&, CppVariant*);
- void dispatchMessage(const CppArgumentList&, CppVariant*);
- // FIXME: These aren't really events. They should be moved to layout controller.
- void textZoomIn(const CppArgumentList&, CppVariant*);
- void textZoomOut(const CppArgumentList&, CppVariant*);
- void zoomPageIn(const CppArgumentList&, CppVariant*);
- void zoomPageOut(const CppArgumentList&, CppVariant*);
- void scalePageBy(const CppArgumentList&, CppVariant*);
-
- void mouseScrollBy(const CppArgumentList&, CppVariant*);
- void continuousMouseScrollBy(const CppArgumentList&, CppVariant*);
- void scheduleAsynchronousClick(const CppArgumentList&, CppVariant*);
- void scheduleAsynchronousKeyDown(const CppArgumentList&, CppVariant*);
- void beginDragWithFiles(const CppArgumentList&, CppVariant*);
- CppVariant dragMode;
-
- void addTouchPoint(const CppArgumentList&, CppVariant*);
- void cancelTouchPoint(const CppArgumentList&, CppVariant*);
- void clearTouchPoints(const CppArgumentList&, CppVariant*);
- void releaseTouchPoint(const CppArgumentList&, CppVariant*);
- void setTouchModifier(const CppArgumentList&, CppVariant*);
- void touchCancel(const CppArgumentList&, CppVariant*);
- void touchEnd(const CppArgumentList&, CppVariant*);
- void touchMove(const CppArgumentList&, CppVariant*);
- void touchStart(const CppArgumentList&, CppVariant*);
- void updateTouchPoint(const CppArgumentList&, CppVariant*);
-
- void gestureFlingCancel(const CppArgumentList&, CppVariant*);
- void gestureFlingStart(const CppArgumentList&, CppVariant*);
- void gestureScrollBegin(const CppArgumentList&, CppVariant*);
- void gestureScrollEnd(const CppArgumentList&, CppVariant*);
- void gestureScrollFirstPoint(const CppArgumentList&, CppVariant*);
- void gestureScrollUpdate(const CppArgumentList&, CppVariant*);
- void gestureTap(const CppArgumentList&, CppVariant*);
- void gestureTapDown(const CppArgumentList&, CppVariant*);
- void gestureTapCancel(const CppArgumentList&, CppVariant*);
- void gestureLongPress(const CppArgumentList&, CppVariant*);
- void gestureLongTap(const CppArgumentList&, CppVariant*);
- void gestureTwoFingerTap(const CppArgumentList&, CppVariant*);
- void gestureEvent(WebKit::WebInputEvent::Type, const CppArgumentList&);
-
- // Unimplemented stubs
- void enableDOMUIEventLogging(const CppArgumentList&, CppVariant*);
- void fireKeyboardEventsToElement(const CppArgumentList&, CppVariant*);
- void clearKillRing(const CppArgumentList&, CppVariant*);
-
- // Properties used in layout tests.
-#if defined(OS_WIN)
- CppVariant wmKeyDown;
- CppVariant wmKeyUp;
- CppVariant wmChar;
- CppVariant wmDeadChar;
- CppVariant wmSysKeyDown;
- CppVariant wmSysKeyUp;
- CppVariant wmSysChar;
- CppVariant wmSysDeadChar;
-#endif
-
- WebTaskList* taskList() { return &m_taskList; }
-
-private:
- WebKit::WebView* webview() { return m_webView; }
-
- // Returns true if dragMode is true.
- bool isDragMode() { return dragMode.isBool() && dragMode.toBoolean(); }
-
- // Sometimes we queue up mouse move and mouse up events for drag drop
- // handling purposes. These methods dispatch the event.
- void doMouseMove(const WebKit::WebMouseEvent&);
- void doMouseUp(const WebKit::WebMouseEvent&);
- static void doLeapForward(int milliseconds);
- void replaySavedEvents();
-
- // Helper to return the button type given a button code
- static WebKit::WebMouseEvent::Button getButtonTypeFromButtonNumber(int);
-
- // Helper to extract the button number from the optional argument in
- // mouseDown and mouseUp
- static int getButtonNumberFromSingleArg(const CppArgumentList&);
-
- // Returns true if the specified key code passed in needs a shift key
- // modifier to be passed into the generated event.
- bool needsShiftModifier(int);
-
- void updateClickCountForButton(WebKit::WebMouseEvent::Button);
-
- // 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);
-
- WebTaskList m_taskList;
-
- TestDelegate* m_delegate;
- WebKit::WebView* m_webView;
-
- // Location of the touch point that initiated a gesture.
- WebKit::WebPoint m_currentGestureLocation;
-
- // Location of last mouseMoveTo event.
- static WebKit::WebPoint lastMousePos;
-
- // Currently pressed mouse button (Left/Right/Middle or None)
- static WebKit::WebMouseEvent::Button pressedButton;
-
- // The last button number passed to mouseDown and mouseUp.
- // Used to determine whether the click count continues to
- // increment or not.
- static WebKit::WebMouseEvent::Button lastButtonType;
-};
-
-}
-
-#endif // EventSender_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp
deleted file mode 100644
index e9c246af2..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.cpp
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#include "config.h"
-#include "GamepadController.h"
-#include "TestDelegate.h"
-
-using namespace WebKit;
-
-namespace WebTestRunner {
-
-GamepadController::GamepadController()
-{
- bindMethod("connect", &GamepadController::connect);
- bindMethod("disconnect", &GamepadController::disconnect);
- bindMethod("setId", &GamepadController::setId);
- bindMethod("setButtonCount", &GamepadController::setButtonCount);
- bindMethod("setButtonData", &GamepadController::setButtonData);
- bindMethod("setAxisCount", &GamepadController::setAxisCount);
- bindMethod("setAxisData", &GamepadController::setAxisData);
-
- bindFallbackMethod(&GamepadController::fallbackCallback);
-
- reset();
-}
-
-void GamepadController::bindToJavascript(WebFrame* frame, const WebString& classname)
-{
- CppBoundClass::bindToJavascript(frame, classname);
-}
-
-void GamepadController::setDelegate(TestDelegate* delegate)
-{
- m_delegate = delegate;
-}
-
-void GamepadController::reset()
-{
- memset(&m_gamepads, 0, sizeof(m_gamepads));
-}
-
-void GamepadController::connect(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 1) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- m_gamepads.items[index].connected = true;
- m_gamepads.length = 0;
- for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; ++i)
- if (m_gamepads.items[i].connected)
- m_gamepads.length = i + 1;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::disconnect(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 1) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- m_gamepads.items[index].connected = false;
- m_gamepads.length = 0;
- for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; ++i)
- if (m_gamepads.items[i].connected)
- m_gamepads.length = i + 1;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::setId(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 2) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- std::string src = args[1].toString();
- const char* p = src.c_str();
- memset(m_gamepads.items[index].id, 0, sizeof(m_gamepads.items[index].id));
- for (unsigned i = 0; *p && i < WebKit::WebGamepad::idLengthCap - 1; ++i)
- m_gamepads.items[index].id[i] = *p++;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::setButtonCount(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 2) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- int buttons = args[1].toInt32();
- if (buttons < 0 || buttons >= static_cast<int>(WebKit::WebGamepad::buttonsLengthCap))
- return;
- m_gamepads.items[index].buttonsLength = buttons;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::setButtonData(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 3) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- int button = args[1].toInt32();
- if (button < 0 || button >= static_cast<int>(WebKit::WebGamepad::buttonsLengthCap))
- return;
- double data = args[2].toDouble();
- m_gamepads.items[index].buttons[button] = data;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::setAxisCount(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 2) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- int axes = args[1].toInt32();
- if (axes < 0 || axes >= static_cast<int>(WebKit::WebGamepad::axesLengthCap))
- return;
- m_gamepads.items[index].axesLength = axes;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::setAxisData(const CppArgumentList& args, CppVariant* result)
-{
- if (args.size() < 3) {
- m_delegate->printMessage("Invalid args");
- return;
- }
- int index = args[0].toInt32();
- if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap))
- return;
- int axis = args[1].toInt32();
- if (axis < 0 || axis >= static_cast<int>(WebKit::WebGamepad::axesLengthCap))
- return;
- double data = args[2].toDouble();
- m_gamepads.items[index].axes[axis] = data;
- m_delegate->setGamepadData(m_gamepads);
- result->setNull();
-}
-
-void GamepadController::fallbackCallback(const CppArgumentList&, CppVariant* result)
-{
- m_delegate->printMessage("CONSOLE MESSAGE: JavaScript ERROR: unknown method called on GamepadController\n");
- result->setNull();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.h b/Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.h
deleted file mode 100644
index 9058c702d..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/GamepadController.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef GamepadController_h
-#define GamepadController_h
-
-#include "CppBoundClass.h"
-#include "platform/WebGamepads.h"
-
-namespace WebKit {
-class WebGamepads;
-class WebFrame;
-}
-
-namespace WebTestRunner {
-
-class TestDelegate;
-
-class GamepadController : public CppBoundClass {
-public:
- GamepadController();
-
- void bindToJavascript(WebKit::WebFrame*, const WebKit::WebString& classname);
- void setDelegate(TestDelegate*);
- void reset();
-
-private:
- // Bound methods and properties
- void connect(const CppArgumentList&, CppVariant*);
- void disconnect(const CppArgumentList&, CppVariant*);
- void setId(const CppArgumentList&, CppVariant*);
- void setButtonCount(const CppArgumentList&, CppVariant*);
- void setButtonData(const CppArgumentList&, CppVariant*);
- void setAxisCount(const CppArgumentList&, CppVariant*);
- void setAxisData(const CppArgumentList&, CppVariant*);
- void fallbackCallback(const CppArgumentList&, CppVariant*);
-
- WebKit::WebGamepads m_gamepads;
-
- TestDelegate* m_delegate;
-};
-
-}
-
-#endif // GamepadController_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp
deleted file mode 100644
index c339f2f2b..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "KeyCodeMapping.h"
-
-#include <wtf/UnusedParam.h>
-
-namespace WebTestRunner {
-
-int NativeKeyCodeForWindowsKeyCode(int keysym)
-{
-#if OS(LINUX) && USE(GTK)
- // See /usr/share/X11/xkb/keycodes/*
- static const int asciiToKeyCode[] = {
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 0,
- 22,
- 23,
- 0,
- 0,
- 0,
- 36,
- 0,
- 0,
- 50,
- 37,
- 64,
- 127,
- 66,
- 0,
- 0,
- 0,
- 0,
- 131,
- 0,
- 9,
- 100,
- 102,
- 0,
- 0,
- 65, // ' '
- 112, // '!'
- 117, // '"'
- 115, // '#'
- 110, // '$'
- 113, // '%'
- 111, // '&'
- 114, // '''
- 116, // '('
- 0, // ')'
- 107, // '*'
- 0, // '+'
- 0, // ','
- 118, // '-'
- 119, // '.'
- 146, // '/'
- 19, // '0'
- 10, // '1'
- 11, // '2'
- 12, // '3'
- 13, // '4'
- 14, // '5'
- 15, // '6'
- 16, // '7'
- 17, // '8'
- 18, // '9'
- 0, // ':'
- 0, // ';'
- 0, // '<'
- 0, // '='
- 0, // '>'
- 0, // '?'
- 0, // '@'
- 38, // 'A'
- 56, // 'B'
- 54, // 'C'
- 40, // 'D'
- 26, // 'E'
- 41, // 'F'
- 42, // 'G'
- 43, // 'H'
- 31, // 'I'
- 44, // 'J'
- 45, // 'K'
- 46, // 'L'
- 58, // 'M'
- 57, // 'N'
- 32, // 'O'
- 33, // 'P'
- 24, // 'Q'
- 27, // 'R'
- 39, // 'S'
- 28, // 'T'
- 30, // 'U'
- 55, // 'V'
- 25, // 'W'
- 53, // 'X'
- 29, // 'Y'
- 52, // 'Z'
- 133, // '['
- 134, // '\'
- 135, // ']'
- 0, // '^'
- 0, // '_'
- 90, // '`'
- 38, // 'a'
- 56, // 'b'
- 54, // 'c'
- 40, // 'd'
- 26, // 'e'
- 41, // 'f'
- 42, // 'g'
- 43, // 'h'
- 31, // 'i'
- 44, // 'j'
- 45, // 'k'
- 46, // 'l'
- 58, // 'm'
- 57, // 'n'
- 32, // 'o'
- 33, // 'p'
- 24, // 'q'
- 27, // 'r'
- 39, // 's'
- 28, // 't'
- 30, // 'u'
- 55, // 'v'
- 25, // 'w'
- 53, // 'x'
- 29, // 'y'
- 52, // 'z'
- 96, // '{'
- 0, // '|'
- 0, // '}'
- 0, // '~'
- 0, // DEL
- };
-
- if (keysym <= 127)
- return asciiToKeyCode[keysym];
-
- switch (keysym) {
- case VKEY_PRIOR:
- return 112;
- case VKEY_NEXT:
- return 117;
- case VKEY_END:
- return 115;
- case VKEY_HOME:
- return 110;
- case VKEY_LEFT:
- return 113;
- case VKEY_UP:
- return 111;
- case VKEY_RIGHT:
- return 114;
- case VKEY_DOWN:
- return 116;
- case VKEY_SNAPSHOT:
- return 107;
- case VKEY_INSERT:
- return 118;
- case VKEY_DELETE:
- return 119;
- case VKEY_APPS:
- return 135;
- case VKEY_F1:
- case VKEY_F1 + 1:
- case VKEY_F1 + 2:
- case VKEY_F1 + 3:
- case VKEY_F1 + 4:
- case VKEY_F1 + 5:
- case VKEY_F1 + 6:
- case VKEY_F1 + 7:
- case VKEY_F1 + 8:
- case VKEY_F1 + 9:
- case VKEY_F1 + 10:
- case VKEY_F1 + 11:
- case VKEY_F1 + 12:
- case VKEY_F1 + 13:
- case VKEY_F1 + 14:
- case VKEY_F1 + 15:
- case VKEY_F1 + 16:
- case VKEY_F1 + 17:
- case VKEY_F1 + 18:
- case VKEY_F1 + 19:
- case VKEY_F1 + 20:
- case VKEY_F1 + 21:
- case VKEY_F1 + 22:
- case VKEY_F1 + 23:
- return 67 + (keysym - VKEY_F1);
- case VKEY_LSHIFT:
- return 50;
- case VKEY_RSHIFT:
- return 62;
- case VKEY_LCONTROL:
- return 37;
- case VKEY_RCONTROL:
- return 105;
- case VKEY_LMENU:
- return 64;
- case VKEY_RMENU:
- return 108;
-
- default:
- return 0;
- }
-#else
- UNUSED_PARAM(keysym);
- return 0;
-#endif
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h b/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h
deleted file mode 100644
index 87469fac4..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/KeyCodeMapping.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef KeyCodeMapping_h
-#define KeyCodeMapping_h
-
-namespace WebTestRunner {
-
-// The keycodes match the values of the virtual keycodes found here http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
-enum {
- VKEY_RETURN = 0x0D,
- VKEY_PRIOR = 0x21,
- VKEY_NEXT = 0x22,
- VKEY_END = 0x23,
- VKEY_HOME = 0x24,
- VKEY_LEFT = 0x25,
- VKEY_UP = 0x26,
- VKEY_RIGHT = 0x27,
- VKEY_DOWN = 0x28,
- VKEY_SNAPSHOT = 0x2C,
- VKEY_INSERT = 0x2D,
- VKEY_DELETE = 0x2E,
- VKEY_APPS = 0x5D,
- VKEY_F1 = 0x70,
- VKEY_LSHIFT = 0xA0,
- VKEY_RSHIFT = 0xA1,
- VKEY_LCONTROL = 0xA2,
- VKEY_RCONTROL = 0xA3,
- VKEY_LMENU = 0xA4,
- VKEY_RMENU = 0xA5,
-};
-
-// Map a windows keycode to a native keycode on OS(LINUX) && USE(GTK).
-int NativeKeyCodeForWindowsKeyCode(int keysym);
-
-}
-
-#endif // KeyCodeMapping_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h b/Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h
deleted file mode 100644
index f8eceb6d0..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TestDelegate.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef TestDelegate_h
-#define TestDelegate_h
-
-#include "platform/WebString.h"
-#include "platform/WebVector.h"
-
-namespace WebKit {
-struct WebContextMenuData;
-class WebGamepads;
-}
-
-namespace WebTestRunner {
-
-class WebTask;
-
-class TestDelegate {
-public:
- virtual void clearContextMenuData() = 0;
- virtual void clearEditCommand() = 0;
- virtual void fillSpellingSuggestionList(const WebKit::WebString& word, WebKit::WebVector<WebKit::WebString>* suggestions) = 0;
- virtual void setEditCommand(const std::string& name, const std::string& value) = 0;
- virtual WebKit::WebContextMenuData* lastContextMenuData() const = 0;
- virtual void setGamepadData(const WebKit::WebGamepads&) = 0;
- virtual void printMessage(const std::string& message) = 0;
- virtual void postTask(WebTask*) = 0;
- virtual void postDelayedTask(WebTask*, long long ms) = 0;
- virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) = 0;
- virtual long long getCurrentTimeInMillisecond() = 0;
- virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) = 0;
-};
-
-}
-
-#endif // TestDelegate_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp
deleted file mode 100644
index f08da5d40..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "TestInterfaces.h"
-
-#include "AccessibilityControllerChromium.h"
-#include "EventSender.h"
-#include "GamepadController.h"
-#include "TextInputController.h"
-#include "platform/WebString.h"
-
-using WebKit::WebFrame;
-using WebKit::WebString;
-using WebKit::WebView;
-
-namespace WebTestRunner {
-
-TestInterfaces::TestInterfaces()
-{
- m_accessibilityController = adoptPtr(new AccessibilityController());
- m_eventSender = adoptPtr(new EventSender());
- m_gamepadController = adoptPtr(new GamepadController());
- m_textInputController = adoptPtr(new TextInputController());
-}
-
-TestInterfaces::~TestInterfaces()
-{
- m_accessibilityController->setWebView(0);
- m_eventSender->setWebView(0);
- // m_gamepadController doesn't depend on WebView.
- m_textInputController->setWebView(0);
-
- m_accessibilityController->setDelegate(0);
- m_eventSender->setDelegate(0);
- m_gamepadController->setDelegate(0);
- // m_textInputController doesn't depend on TestDelegate.
-}
-
-void TestInterfaces::setWebView(WebView* webView)
-{
- m_accessibilityController->setWebView(webView);
- m_eventSender->setWebView(webView);
- // m_gamepadController doesn't depend on WebView.
- m_textInputController->setWebView(webView);
-}
-
-void TestInterfaces::setDelegate(TestDelegate* delegate)
-{
- m_accessibilityController->setDelegate(delegate);
- m_eventSender->setDelegate(delegate);
- m_gamepadController->setDelegate(delegate);
- // m_textInputController doesn't depend on TestDelegate.
-}
-
-void TestInterfaces::bindTo(WebFrame* frame)
-{
- m_accessibilityController->bindToJavascript(frame, WebString::fromUTF8("accessibilityController"));
- m_eventSender->bindToJavascript(frame, WebString::fromUTF8("eventSender"));
- m_gamepadController->bindToJavascript(frame, WebString::fromUTF8("gamepadController"));
- m_textInputController->bindToJavascript(frame, WebString::fromUTF8("textInputController"));
-}
-
-void TestInterfaces::resetAll()
-{
- m_accessibilityController->reset();
- m_eventSender->reset();
- m_gamepadController->reset();
- // m_textInputController doesn't have any state to reset.
-}
-
-AccessibilityController* TestInterfaces::accessibilityController()
-{
- return m_accessibilityController.get();
-}
-
-EventSender* TestInterfaces::eventSender()
-{
- return m_eventSender.get();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h b/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h
deleted file mode 100644
index a7da43283..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TestInterfaces.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef TestInterfaces_h
-#define TestInterfaces_h
-
-#include <wtf/OwnPtr.h>
-
-namespace WebKit {
-class WebFrame;
-class WebView;
-}
-
-namespace WebTestRunner {
-
-class AccessibilityController;
-class EventSender;
-class GamepadController;
-class TestDelegate;
-class TextInputController;
-
-class TestInterfaces {
-public:
- TestInterfaces();
- ~TestInterfaces();
-
- void setWebView(WebKit::WebView*);
- void setDelegate(TestDelegate*);
- void bindTo(WebKit::WebFrame*);
- void resetAll();
-
- AccessibilityController* accessibilityController();
- EventSender* eventSender();
-
-private:
- OwnPtr<AccessibilityController> m_accessibilityController;
- OwnPtr<EventSender> m_eventSender;
- OwnPtr<GamepadController> m_gamepadController;
- OwnPtr<TextInputController> m_textInputController;
-};
-
-}
-
-#endif // TestInterfaces_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp
deleted file mode 100644
index 8aa817a2b..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp
+++ /dev/null
@@ -1,755 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
- *
- * 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.
- */
-
-#include "config.h"
-#include "TestRunner.h"
-
-#include "WebAnimationController.h"
-#include "WebBindings.h"
-#include "WebDocument.h"
-#include "WebElement.h"
-#include "WebFindOptions.h"
-#include "WebFrame.h"
-#include "WebInputElement.h"
-#include "WebScriptSource.h"
-#include "WebSecurityPolicy.h"
-#include "WebSettings.h"
-#include "WebSurroundingText.h"
-#include "WebTestDelegate.h"
-#include "WebView.h"
-#include "WebWorkerInfo.h"
-#include "platform/WebPoint.h"
-#include "v8/include/v8.h"
-
-#if OS(LINUX) || OS(ANDROID)
-#include "linux/WebFontRendering.h"
-#endif
-
-using namespace WebKit;
-using namespace std;
-
-namespace WebTestRunner {
-
-TestRunner::TestRunner()
- : m_delegate(0)
- , m_webView(0)
-{
- // Methods implemented in terms of chromium's public WebKit API.
- bindMethod("setTabKeyCyclesThroughElements", &TestRunner::setTabKeyCyclesThroughElements);
- bindMethod("setAsynchronousSpellCheckingEnabled", &TestRunner::setAsynchronousSpellCheckingEnabled);
- bindMethod("execCommand", &TestRunner::execCommand);
- bindMethod("isCommandEnabled", &TestRunner::isCommandEnabled);
- bindMethod("pauseAnimationAtTimeOnElementWithId", &TestRunner::pauseAnimationAtTimeOnElementWithId);
- bindMethod("pauseTransitionAtTimeOnElementWithId", &TestRunner::pauseTransitionAtTimeOnElementWithId);
- bindMethod("elementDoesAutoCompleteForElementWithId", &TestRunner::elementDoesAutoCompleteForElementWithId);
- bindMethod("numberOfActiveAnimations", &TestRunner::numberOfActiveAnimations);
- bindMethod("callShouldCloseOnWebView", &TestRunner::callShouldCloseOnWebView);
- bindMethod("setDomainRelaxationForbiddenForURLScheme", &TestRunner::setDomainRelaxationForbiddenForURLScheme);
- bindMethod("evaluateScriptInIsolatedWorldAndReturnValue", &TestRunner::evaluateScriptInIsolatedWorldAndReturnValue);
- bindMethod("evaluateScriptInIsolatedWorld", &TestRunner::evaluateScriptInIsolatedWorld);
- bindMethod("setIsolatedWorldSecurityOrigin", &TestRunner::setIsolatedWorldSecurityOrigin);
- bindMethod("setIsolatedWorldContentSecurityPolicy", &TestRunner::setIsolatedWorldContentSecurityPolicy);
- bindMethod("addOriginAccessWhitelistEntry", &TestRunner::addOriginAccessWhitelistEntry);
- bindMethod("removeOriginAccessWhitelistEntry", &TestRunner::removeOriginAccessWhitelistEntry);
- bindMethod("hasCustomPageSizeStyle", &TestRunner::hasCustomPageSizeStyle);
- bindMethod("forceRedSelectionColors", &TestRunner::forceRedSelectionColors);
- bindMethod("addUserScript", &TestRunner::addUserScript);
- bindMethod("addUserStyleSheet", &TestRunner::addUserStyleSheet);
- bindMethod("startSpeechInput", &TestRunner::startSpeechInput);
- bindMethod("loseCompositorContext", &TestRunner::loseCompositorContext);
- bindMethod("markerTextForListItem", &TestRunner::markerTextForListItem);
- bindMethod("findString", &TestRunner::findString);
- bindMethod("setMinimumTimerInterval", &TestRunner::setMinimumTimerInterval);
- bindMethod("setAutofilled", &TestRunner::setAutofilled);
- bindMethod("setValueForUser", &TestRunner::setValueForUser);
- bindMethod("enableFixedLayoutMode", &TestRunner::enableFixedLayoutMode);
- bindMethod("setFixedLayoutSize", &TestRunner::setFixedLayoutSize);
- bindMethod("selectionAsMarkup", &TestRunner::selectionAsMarkup);
- bindMethod("setTextSubpixelPositioning", &TestRunner::setTextSubpixelPositioning);
- bindMethod("resetPageVisibility", &TestRunner::resetPageVisibility);
- bindMethod("setPageVisibility", &TestRunner::setPageVisibility);
- bindMethod("setTextDirection", &TestRunner::setTextDirection);
- bindMethod("textSurroundingNode", &TestRunner::textSurroundingNode);
- bindMethod("setTouchDragDropEnabled", &TestRunner::setTouchDragDropEnabled);
-
- // Properties.
- bindProperty("workerThreadCount", &TestRunner::workerThreadCount);
- bindProperty("globalFlag", &m_globalFlag);
- bindProperty("platformName", &m_platformName);
-
- // The following are stubs.
- bindMethod("dumpDatabaseCallbacks", &TestRunner::notImplemented);
-#if ENABLE(NOTIFICATIONS)
- bindMethod("denyWebNotificationPermission", &TestRunner::notImplemented);
- bindMethod("removeAllWebNotificationPermissions", &TestRunner::notImplemented);
- bindMethod("simulateWebNotificationClick", &TestRunner::notImplemented);
-#endif
- bindMethod("setIconDatabaseEnabled", &TestRunner::notImplemented);
- bindMethod("setScrollbarPolicy", &TestRunner::notImplemented);
- bindMethod("clearAllApplicationCaches", &TestRunner::notImplemented);
- bindMethod("clearApplicationCacheForOrigin", &TestRunner::notImplemented);
- bindMethod("clearBackForwardList", &TestRunner::notImplemented);
- bindMethod("keepWebHistory", &TestRunner::notImplemented);
- bindMethod("setApplicationCacheOriginQuota", &TestRunner::notImplemented);
- bindMethod("setCallCloseOnWebViews", &TestRunner::notImplemented);
- bindMethod("setMainFrameIsFirstResponder", &TestRunner::notImplemented);
- bindMethod("setPrivateBrowsingEnabled", &TestRunner::notImplemented);
- bindMethod("setUseDashboardCompatibilityMode", &TestRunner::notImplemented);
- bindMethod("deleteAllLocalStorage", &TestRunner::notImplemented);
- bindMethod("localStorageDiskUsageForOrigin", &TestRunner::notImplemented);
- bindMethod("originsWithLocalStorage", &TestRunner::notImplemented);
- bindMethod("deleteLocalStorageForOrigin", &TestRunner::notImplemented);
- bindMethod("observeStorageTrackerNotifications", &TestRunner::notImplemented);
- bindMethod("syncLocalStorage", &TestRunner::notImplemented);
- bindMethod("addDisallowedURL", &TestRunner::notImplemented);
- bindMethod("applicationCacheDiskUsageForOrigin", &TestRunner::notImplemented);
- bindMethod("abortModal", &TestRunner::notImplemented);
-
- // The fallback method is called when an unknown method is invoked.
- bindFallbackMethod(&TestRunner::fallbackMethod);
-}
-
-void TestRunner::reset()
-{
- if (m_webView) {
- m_webView->setZoomLevel(false, 0);
- m_webView->setTabKeyCyclesThroughElements(true);
-#if !OS(DARWIN) && !OS(WINDOWS) // Actually, TOOLKIT_GTK
- // (Constants copied because we can't depend on the header that defined
- // them from this file.)
- m_webView->setSelectionColors(0xff1e90ff, 0xff000000, 0xffc8c8c8, 0xff323232);
-#endif
- m_webView->removeAllUserContent();
- m_webView->disableAutoResizeMode();
- }
- WebSecurityPolicy::resetOriginAccessWhitelists();
-#if OS(LINUX) || OS(ANDROID)
- WebFontRendering::setSubpixelPositioning(false);
-#endif
-
- m_globalFlag.set(false);
- m_platformName.set("chromium");
-}
-
-void TestRunner::setTabKeyCyclesThroughElements(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_webView->setTabKeyCyclesThroughElements(arguments[0].toBoolean());
- result->setNull();
-}
-
-void TestRunner::setAsynchronousSpellCheckingEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isBool())
- m_webView->settings()->setAsynchronousSpellCheckingEnabled(cppVariantToBool(arguments[0]));
- result->setNull();
-}
-
-void TestRunner::execCommand(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() <= 0 || !arguments[0].isString())
- return;
-
- std::string command = arguments[0].toString();
- std::string value("");
- // Ignore the second parameter (which is userInterface)
- // since this command emulates a manual action.
- if (arguments.size() >= 3 && arguments[2].isString())
- value = arguments[2].toString();
-
- // Note: webkit's version does not return the boolean, so neither do we.
- m_webView->focusedFrame()->executeCommand(WebString::fromUTF8(command), WebString::fromUTF8(value));
-}
-
-void TestRunner::isCommandEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() <= 0 || !arguments[0].isString()) {
- result->setNull();
- return;
- }
-
- std::string command = arguments[0].toString();
- bool rv = m_webView->focusedFrame()->isCommandEnabled(WebString::fromUTF8(command));
- result->set(rv);
-}
-
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(const WebString& animationName, double time, const WebString& elementId)
-{
- WebFrame* webFrame = m_webView->mainFrame();
- if (!webFrame)
- return false;
-
- WebAnimationController* controller = webFrame->animationController();
- if (!controller)
- return false;
-
- WebElement element = webFrame->document().getElementById(elementId);
- if (element.isNull())
- return false;
- return controller->pauseAnimationAtTime(element, animationName, time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(const WebString& propertyName, double time, const WebString& elementId)
-{
- WebFrame* webFrame = m_webView->mainFrame();
- if (!webFrame)
- return false;
-
- WebAnimationController* controller = webFrame->animationController();
- if (!controller)
- return false;
-
- WebElement element = webFrame->document().getElementById(elementId);
- if (element.isNull())
- return false;
- return controller->pauseTransitionAtTime(element, propertyName, time);
-}
-
-bool TestRunner::elementDoesAutoCompleteForElementWithId(const WebString& elementId)
-{
- WebFrame* webFrame = m_webView->mainFrame();
- if (!webFrame)
- return false;
-
- WebElement element = webFrame->document().getElementById(elementId);
- if (element.isNull() || !element.hasTagName("input"))
- return false;
-
- WebInputElement inputElement = element.to<WebInputElement>();
- return inputElement.autoComplete();
-}
-
-int TestRunner::numberOfActiveAnimations()
-{
- WebFrame* webFrame = m_webView->mainFrame();
- if (!webFrame)
- return -1;
-
- WebAnimationController* controller = webFrame->animationController();
- if (!controller)
- return -1;
-
- return controller->numberOfActiveAnimations();
-}
-
-void TestRunner::pauseAnimationAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
-{
- result->set(false);
- if (arguments.size() > 2 && arguments[0].isString() && arguments[1].isNumber() && arguments[2].isString()) {
- WebString animationName = cppVariantToWebString(arguments[0]);
- double time = arguments[1].toDouble();
- WebString elementId = cppVariantToWebString(arguments[2]);
- result->set(pauseAnimationAtTimeOnElementWithId(animationName, time, elementId));
- }
-}
-
-void TestRunner::pauseTransitionAtTimeOnElementWithId(const CppArgumentList& arguments, CppVariant* result)
-{
- result->set(false);
- if (arguments.size() > 2 && arguments[0].isString() && arguments[1].isNumber() && arguments[2].isString()) {
- WebString propertyName = cppVariantToWebString(arguments[0]);
- double time = arguments[1].toDouble();
- WebString elementId = cppVariantToWebString(arguments[2]);
- result->set(pauseTransitionAtTimeOnElementWithId(propertyName, time, elementId));
- }
-}
-
-void TestRunner::elementDoesAutoCompleteForElementWithId(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() != 1 || !arguments[0].isString()) {
- result->set(false);
- return;
- }
- WebString elementId = cppVariantToWebString(arguments[0]);
- result->set(elementDoesAutoCompleteForElementWithId(elementId));
-}
-
-void TestRunner::numberOfActiveAnimations(const CppArgumentList&, CppVariant* result)
-{
- result->set(numberOfActiveAnimations());
-}
-
-void TestRunner::callShouldCloseOnWebView(const CppArgumentList&, CppVariant* result)
-{
- result->set(m_webView->dispatchBeforeUnloadEvent());
-}
-
-void TestRunner::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() != 2 || !arguments[0].isBool() || !arguments[1].isString())
- return;
- m_webView->setDomainRelaxationForbidden(cppVariantToBool(arguments[0]), cppVariantToWebString(arguments[1]));
-}
-
-void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentList& arguments, CppVariant* result)
-{
- v8::HandleScope scope;
- WebVector<v8::Local<v8::Value> > values;
- if (arguments.size() >= 2 && arguments[0].isNumber() && arguments[1].isString()) {
- WebScriptSource source(cppVariantToWebString(arguments[1]));
- // This relies on the iframe focusing itself when it loads. This is a bit
- // sketchy, but it seems to be what other tests do.
- m_webView->focusedFrame()->executeScriptInIsolatedWorld(arguments[0].toInt32(), &source, 1, 1, &values);
- }
- result->setNull();
- // Since only one script was added, only one result is expected
- if (values.size() == 1 && !values[0].IsEmpty()) {
- v8::Local<v8::Value> scriptValue = values[0];
- // FIXME: There are many more types that can be handled.
- if (scriptValue->IsString()) {
- v8::String::AsciiValue asciiV8(scriptValue);
- result->set(std::string(*asciiV8));
- } else if (scriptValue->IsBoolean())
- result->set(scriptValue->ToBoolean()->Value());
- else if (scriptValue->IsNumber()) {
- if (scriptValue->IsInt32())
- result->set(scriptValue->ToInt32()->Value());
- else
- result->set(scriptValue->ToNumber()->Value());
- } else if (scriptValue->IsNull())
- result->setNull();
- }
-}
-
-void TestRunner::evaluateScriptInIsolatedWorld(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() >= 2 && arguments[0].isNumber() && arguments[1].isString()) {
- WebScriptSource source(cppVariantToWebString(arguments[1]));
- // This relies on the iframe focusing itself when it loads. This is a bit
- // sketchy, but it seems to be what other tests do.
- m_webView->focusedFrame()->executeScriptInIsolatedWorld(arguments[0].toInt32(), &source, 1, 1);
- }
- result->setNull();
-}
-
-void TestRunner::setIsolatedWorldSecurityOrigin(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() != 2 || !arguments[0].isNumber() || !(arguments[1].isString() || arguments[1].isNull()))
- return;
-
- WebSecurityOrigin origin;
- if (arguments[1].isString())
- origin = WebSecurityOrigin::createFromString(cppVariantToWebString(arguments[1]));
- m_webView->focusedFrame()->setIsolatedWorldSecurityOrigin(arguments[0].toInt32(), origin);
-}
-
-void TestRunner::setIsolatedWorldContentSecurityPolicy(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() != 2 || !arguments[0].isNumber() || !arguments[1].isString())
- return;
-
- m_webView->focusedFrame()->setIsolatedWorldContentSecurityPolicy(arguments[0].toInt32(), cppVariantToWebString(arguments[1]));
-}
-
-void TestRunner::addOriginAccessWhitelistEntry(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() != 4 || !arguments[0].isString() || !arguments[1].isString()
- || !arguments[2].isString() || !arguments[3].isBool())
- return;
-
- WebKit::WebURL url(GURL(arguments[0].toString()));
- if (!url.isValid())
- return;
-
- WebSecurityPolicy::addOriginAccessWhitelistEntry(
- url,
- cppVariantToWebString(arguments[1]),
- cppVariantToWebString(arguments[2]),
- arguments[3].toBoolean());
-}
-
-void TestRunner::removeOriginAccessWhitelistEntry(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() != 4 || !arguments[0].isString() || !arguments[1].isString()
- || !arguments[2].isString() || !arguments[3].isBool())
- return;
-
- WebKit::WebURL url(GURL(arguments[0].toString()));
- if (!url.isValid())
- return;
-
- WebSecurityPolicy::removeOriginAccessWhitelistEntry(
- url,
- cppVariantToWebString(arguments[1]),
- cppVariantToWebString(arguments[2]),
- arguments[3].toBoolean());
-}
-
-void TestRunner::hasCustomPageSizeStyle(const CppArgumentList& arguments, CppVariant* result)
-{
- result->set(false);
- int pageIndex = 0;
- if (arguments.size() > 1)
- return;
- if (arguments.size() == 1)
- pageIndex = cppVariantToInt32(arguments[0]);
- WebFrame* frame = m_webView->mainFrame();
- if (!frame)
- return;
- result->set(frame->hasCustomPageSizeStyle(pageIndex));
-}
-
-void TestRunner::forceRedSelectionColors(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- m_webView->setSelectionColors(0xffee0000, 0xff00ee00, 0xff000000, 0xffc0c0c0);
-}
-
-void TestRunner::addUserScript(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 3 || !arguments[0].isString() || !arguments[1].isBool() || !arguments[2].isBool())
- return;
- WebView::addUserScript(
- cppVariantToWebString(arguments[0]), WebVector<WebString>(),
- arguments[1].toBoolean() ? WebView::UserScriptInjectAtDocumentStart : WebView::UserScriptInjectAtDocumentEnd,
- arguments[2].toBoolean() ? WebView::UserContentInjectInAllFrames : WebView::UserContentInjectInTopFrameOnly);
-}
-
-void TestRunner::addUserStyleSheet(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 2 || !arguments[0].isString() || !arguments[1].isBool())
- return;
- WebView::addUserStyleSheet(
- cppVariantToWebString(arguments[0]), WebVector<WebString>(),
- arguments[1].toBoolean() ? WebView::UserContentInjectInAllFrames : WebView::UserContentInjectInTopFrameOnly,
- // Chromium defaults to InjectInSubsequentDocuments, but for compatibility
- // with the other ports' DRTs, we use UserStyleInjectInExistingDocuments.
- WebView::UserStyleInjectInExistingDocuments);
-}
-
-void TestRunner::startSpeechInput(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 1)
- return;
-
- WebElement element;
- if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
- return;
-
- WebInputElement* input = toWebInputElement(&element);
- if (!input)
- return;
-
- if (!input->isSpeechInputEnabled())
- return;
-
- input->startSpeechInput();
-}
-
-void TestRunner::loseCompositorContext(const CppArgumentList& args, CppVariant*)
-{
- int numTimes;
- if (args.size() == 1 || !args[0].isNumber())
- numTimes = 1;
- else
- numTimes = args[0].toInt32();
- m_webView->loseCompositorContext(numTimes);
-}
-
-void TestRunner::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());
-}
-
-void TestRunner::findString(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() < 1 || !arguments[0].isString())
- return;
-
- WebFindOptions findOptions;
- bool wrapAround = false;
- if (arguments.size() >= 2) {
- Vector<std::string> optionsArray = arguments[1].toStringVector();
- findOptions.matchCase = true;
-
- for (size_t i = 0; i < optionsArray.size(); ++i) {
- const std::string& option = optionsArray[i];
- // FIXME: Support all the options, so we can run findString.html too.
- if (option == "CaseInsensitive")
- findOptions.matchCase = false;
- else if (option == "Backwards")
- findOptions.forward = false;
- else if (option == "WrapAround")
- wrapAround = true;
- }
- }
-
- WebFrame* frame = m_webView->mainFrame();
- const bool findResult = frame->find(0, cppVariantToWebString(arguments[0]), findOptions, wrapAround, 0);
- result->set(findResult);
-}
-
-void TestRunner::setMinimumTimerInterval(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 1 || !arguments[0].isNumber())
- return;
- m_webView->settings()->setMinimumTimerInterval(arguments[0].toDouble());
-}
-
-void TestRunner::setAutofilled(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 2 || !arguments[1].isBool())
- return;
-
- WebElement element;
- if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
- return;
-
- WebInputElement* input = toWebInputElement(&element);
- if (!input)
- return;
-
- input->setAutofilled(arguments[1].value.boolValue);
-}
-
-void TestRunner::setValueForUser(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 2)
- return;
-
- WebElement element;
- if (!WebBindings::getElement(arguments[0].value.objectValue, &element))
- return;
-
- WebInputElement* input = toWebInputElement(&element);
- if (!input)
- return;
-
- input->setValue(cppVariantToWebString(arguments[1]), true);
-}
-
-void TestRunner::enableFixedLayoutMode(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 1 || !arguments[0].isBool())
- return;
- bool enableFixedLayout = arguments[0].toBoolean();
- m_webView->enableFixedLayoutMode(enableFixedLayout);
-}
-
-void TestRunner::setFixedLayoutSize(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
- int width = arguments[0].toInt32();
- int height = arguments[1].toInt32();
- m_webView->setFixedLayoutSize(WebSize(width, height));
-}
-
-void TestRunner::selectionAsMarkup(const CppArgumentList& arguments, CppVariant* result)
-{
- result->set(m_webView->mainFrame()->selectionAsMarkup().utf8());
-}
-
-void TestRunner::setTextSubpixelPositioning(const CppArgumentList& arguments, CppVariant* result)
-{
-#if OS(LINUX) || OS(ANDROID)
- // Since FontConfig doesn't provide a variable to control subpixel positioning, we'll fall back
- // to setting it globally for all fonts.
- if (arguments.size() > 0 && arguments[0].isBool())
- WebFontRendering::setSubpixelPositioning(arguments[0].value.boolValue);
-#endif
- result->setNull();
-}
-
-void TestRunner::resetPageVisibility(const CppArgumentList& arguments, CppVariant* result)
-{
- m_webView->setVisibilityState(WebPageVisibilityStateVisible, true);
-}
-
-void TestRunner::setPageVisibility(const CppArgumentList& arguments, CppVariant* result)
-{
- if (arguments.size() > 0 && arguments[0].isString()) {
- string newVisibility = arguments[0].toString();
- if (newVisibility == "visible")
- m_webView->setVisibilityState(WebPageVisibilityStateVisible, false);
- else if (newVisibility == "hidden")
- m_webView->setVisibilityState(WebPageVisibilityStateHidden, false);
- else if (newVisibility == "prerender")
- m_webView->setVisibilityState(WebPageVisibilityStatePrerender, false);
- else if (newVisibility == "preview")
- m_webView->setVisibilityState(WebPageVisibilityStatePreview, false);
- }
-}
-
-void TestRunner::setTextDirection(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 1 || !arguments[0].isString())
- return;
-
- // Map a direction name to a WebTextDirection value.
- std::string directionName = arguments[0].toString();
- WebKit::WebTextDirection direction;
- if (directionName == "auto")
- direction = WebKit::WebTextDirectionDefault;
- else if (directionName == "rtl")
- direction = WebKit::WebTextDirectionRightToLeft;
- else if (directionName == "ltr")
- direction = WebKit::WebTextDirectionLeftToRight;
- else
- return;
-
- m_webView->setTextDirection(direction);
-}
-
-void TestRunner::textSurroundingNode(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() < 4 || !arguments[0].isObject() || !arguments[1].isNumber() || !arguments[2].isNumber() || !arguments[3].isNumber())
- return;
-
- WebNode node;
- if (!WebBindings::getNode(arguments[0].value.objectValue, &node))
- return;
-
- if (node.isNull() || !node.isTextNode())
- return;
-
- WebPoint point(arguments[1].toInt32(), arguments[2].toInt32());
- unsigned maxLength = arguments[3].toInt32();
-
- WebSurroundingText surroundingText;
- surroundingText.initialize(node, point, maxLength);
- if (surroundingText.isNull())
- return;
-
- result->set(surroundingText.textContent().utf8());
-}
-
-void TestRunner::setTouchDragDropEnabled(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
- if (arguments.size() != 1 || !arguments[0].isBool())
- return;
-
- m_webView->settings()->setTouchDragDropEnabled(arguments[0].toBoolean());
-}
-
-void TestRunner::workerThreadCount(CppVariant* result)
-{
- result->set(static_cast<int>(WebWorkerInfo::dedicatedWorkerCount()));
-}
-
-// Need these conversions because the format of the value for booleans
-// may vary - for example, on mac "1" and "0" are used for boolean.
-bool TestRunner::cppVariantToBool(const CppVariant& value)
-{
- if (value.isBool())
- return value.toBoolean();
- if (value.isNumber())
- return value.toInt32();
- if (value.isString()) {
- string valueString = value.toString();
- if (valueString == "true" || valueString == "1")
- return true;
- if (valueString == "false" || valueString == "0")
- return false;
- }
- printErrorMessage("Invalid value. Expected boolean value.");
- return false;
-}
-
-int32_t TestRunner::cppVariantToInt32(const CppVariant& value)
-{
- if (value.isNumber())
- return value.toInt32();
- if (value.isString()) {
- string stringSource = value.toString();
- const char* source = stringSource.data();
- char* end;
- long number = strtol(source, &end, 10);
- if (end == source + stringSource.length() && number >= numeric_limits<int32_t>::min() && number <= numeric_limits<int32_t>::max())
- return static_cast<int32_t>(number);
- }
- printErrorMessage("Invalid value for preference. Expected integer value.");
- return 0;
-}
-
-WebString TestRunner::cppVariantToWebString(const CppVariant& value)
-{
- if (!value.isString()) {
- printErrorMessage("Invalid value for preference. Expected string value.");
- return WebString();
- }
- return WebString::fromUTF8(value.toString());
-}
-
-Vector<WebString> TestRunner::cppVariantToWebStringArray(const CppVariant& value)
-{
- if (!value.isObject()) {
- printErrorMessage("Invalid value for preference. Expected object value.");
- return Vector<WebString>();
- }
- Vector<WebString> resultVector;
- Vector<string> stringVector = value.toStringVector();
- for (size_t i = 0; i < stringVector.size(); ++i)
- resultVector.append(WebString::fromUTF8(stringVector[i].c_str()));
- return resultVector;
-}
-
-void TestRunner::printErrorMessage(const string& text)
-{
- m_delegate->printMessage(string("CONSOLE MESSAGE: ") + text + "\n");
-}
-
-void TestRunner::fallbackMethod(const CppArgumentList&, CppVariant* result)
-{
- printErrorMessage("JavaScript ERROR: unknown method called on TestRunner");
- result->setNull();
-}
-
-void TestRunner::notImplemented(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h b/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
deleted file mode 100644
index 4691e5579..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TestRunner.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org)
- *
- * 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.
- */
-
-#ifndef TestRunner_h
-#define TestRunner_h
-
-#include "CppBoundClass.h"
-
-namespace WebKit {
-class WebView;
-}
-
-namespace WebTestRunner {
-
-class WebTestDelegate;
-
-class TestRunner : public CppBoundClass {
-public:
- TestRunner();
-
- // FIXME: once DRTTestRunner is moved entirely to this class, change this
- // method to take a TestDelegate* instead.
- void setDelegate(WebTestDelegate* delegate) { m_delegate = delegate; }
- void setWebView(WebKit::WebView* webView) { m_webView = webView; }
-
- void reset();
-
-protected:
- // FIXME: make these private once the move from DRTTestRunner to TestRunner
- // is complete.
- bool cppVariantToBool(const CppVariant&);
- int32_t cppVariantToInt32(const CppVariant&);
- WebKit::WebString cppVariantToWebString(const CppVariant&);
- Vector<WebKit::WebString> cppVariantToWebStringArray(const CppVariant&);
-
- void printErrorMessage(const std::string&);
-
-private:
- ///////////////////////////////////////////////////////////////////////////
- // Methods implemented entirely in terms of chromium's public WebKit API
-
- // Method that controls whether pressing Tab key cycles through page elements
- // or inserts a '\t' char in text area
- void setTabKeyCyclesThroughElements(const CppArgumentList&, CppVariant*);
-
- // Changes asynchronous spellchecking flag on the settings.
- void setAsynchronousSpellCheckingEnabled(const CppArgumentList&, CppVariant*);
-
- // Executes an internal command (superset of document.execCommand() commands).
- void execCommand(const CppArgumentList&, CppVariant*);
-
- // Checks if an internal command is currently available.
- void isCommandEnabled(const CppArgumentList&, CppVariant*);
-
- void pauseAnimationAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
- void pauseTransitionAtTimeOnElementWithId(const CppArgumentList&, CppVariant*);
- void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*);
- void numberOfActiveAnimations(const CppArgumentList&, CppVariant*);
- void callShouldCloseOnWebView(const CppArgumentList&, CppVariant*);
- void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*);
- void evaluateScriptInIsolatedWorldAndReturnValue(const CppArgumentList&, CppVariant*);
- void evaluateScriptInIsolatedWorld(const CppArgumentList&, CppVariant*);
- void setIsolatedWorldSecurityOrigin(const CppArgumentList&, CppVariant*);
- void setIsolatedWorldContentSecurityPolicy(const CppArgumentList&, CppVariant*);
-
- // Allows layout tests to manage origins' whitelisting.
- void addOriginAccessWhitelistEntry(const CppArgumentList&, CppVariant*);
- void removeOriginAccessWhitelistEntry(const CppArgumentList&, CppVariant*);
-
- // Returns true if the current page box has custom page size style for
- // printing.
- void hasCustomPageSizeStyle(const CppArgumentList&, CppVariant*);
-
- // Forces the selection colors for testing under Linux.
- void forceRedSelectionColors(const CppArgumentList&, CppVariant*);
-
- // Adds a user script or user style sheet to be injected into new documents.
- void addUserScript(const CppArgumentList&, CppVariant*);
- void addUserStyleSheet(const CppArgumentList&, CppVariant*);
-
- void startSpeechInput(const CppArgumentList&, CppVariant*);
-
- void loseCompositorContext(const CppArgumentList& args, CppVariant* result);
-
- void markerTextForListItem(const CppArgumentList&, CppVariant*);
- void findString(const CppArgumentList&, CppVariant*);
-
- void setMinimumTimerInterval(const CppArgumentList&, CppVariant*);
-
- // Expects the first argument to be an input element and the second argument to be a boolean.
- // Forwards the setAutofilled() call to the element.
- void setAutofilled(const CppArgumentList&, CppVariant*);
-
- // Expects the first argument to be an input element and the second argument to be a string value.
- // Forwards the setValueForUser() call to the element.
- void setValueForUser(const CppArgumentList&, CppVariant*);
-
- void enableFixedLayoutMode(const CppArgumentList&, CppVariant*);
- void setFixedLayoutSize(const CppArgumentList&, CppVariant*);
-
- void selectionAsMarkup(const CppArgumentList&, CppVariant*);
-
- // Enables or disables subpixel positioning (i.e. fractional X positions for
- // glyphs) in text rendering on Linux. Since this method changes global
- // settings, tests that call it must use their own custom font family for
- // all text that they render. If not, an already-cached style will be used,
- // resulting in the changed setting being ignored.
- void setTextSubpixelPositioning(const CppArgumentList&, CppVariant*);
-
- // Switch the visibility of the page.
- void setPageVisibility(const CppArgumentList&, CppVariant*);
- void resetPageVisibility(const CppArgumentList&, CppVariant*);
-
- // Changes the direction of the focused element.
- void setTextDirection(const CppArgumentList&, CppVariant*);
-
- // Retrieves the text surrounding a position in a text node.
- // Expects the first argument to be a text node, the second and third to be
- // point coordinates relative to the node and the fourth the maximum text
- // length to retrieve.
- void textSurroundingNode(const CppArgumentList&, CppVariant*);
- void setTouchDragDropEnabled(const CppArgumentList&, CppVariant*);
-
- ///////////////////////////////////////////////////////////////////////////
- // Properties
- void workerThreadCount(CppVariant*);
-
- ///////////////////////////////////////////////////////////////////////////
- // Fallback and stub methods
-
- // The fallback method is called when a nonexistent method is called on
- // the layout test controller object.
- // It is usefull to catch typos in the JavaScript code (a few layout tests
- // do have typos in them) and it allows the script to continue running in
- // that case (as the Mac does).
- void fallbackMethod(const CppArgumentList&, CppVariant*);
-
- // Stub for not implemented methods.
- void notImplemented(const CppArgumentList&, CppVariant*);
-
- ///////////////////////////////////////////////////////////////////////////
- // Internal helpers
- bool pauseAnimationAtTimeOnElementWithId(const WebKit::WebString& animationName, double time, const WebKit::WebString& elementId);
- bool pauseTransitionAtTimeOnElementWithId(const WebKit::WebString& propertyName, double time, const WebKit::WebString& elementId);
- bool elementDoesAutoCompleteForElementWithId(const WebKit::WebString&);
- int numberOfActiveAnimations();
-
- // globalFlag is used by a number of layout tests in http/tests/security/dataURL.
- CppVariant m_globalFlag;
-
- // Bound variable to return the name of this platform (chromium).
- CppVariant m_platformName;
-
- WebTestDelegate* m_delegate;
- WebKit::WebView* m_webView;
-};
-
-}
-
-#endif // TestRunner_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp
deleted file mode 100644
index e929c71fb..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.cpp
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "TextInputController.h"
-
-#include "WebBindings.h"
-#include "WebCompositionUnderline.h"
-#include "WebFrame.h"
-#include "WebInputEvent.h"
-#include "WebRange.h"
-#include "WebView.h"
-#include "platform/WebString.h"
-#include "platform/WebVector.h"
-#include <string>
-#include <wtf/StringExtras.h>
-
-using namespace WebKit;
-
-namespace WebTestRunner {
-
-TextInputController::TextInputController()
-{
- bindMethod("attributedSubstringFromRange", &TextInputController::attributedSubstringFromRange);
- bindMethod("characterIndexForPoint", &TextInputController::characterIndexForPoint);
- bindMethod("conversationIdentifier", &TextInputController::conversationIdentifier);
- bindMethod("doCommand", &TextInputController::doCommand);
- bindMethod("firstRectForCharacterRange", &TextInputController::firstRectForCharacterRange);
- bindMethod("hasMarkedText", &TextInputController::hasMarkedText);
- bindMethod("insertText", &TextInputController::insertText);
- bindMethod("makeAttributedString", &TextInputController::makeAttributedString);
- bindMethod("markedRange", &TextInputController::markedRange);
- bindMethod("selectedRange", &TextInputController::selectedRange);
- bindMethod("setMarkedText", &TextInputController::setMarkedText);
- bindMethod("substringFromRange", &TextInputController::substringFromRange);
- bindMethod("unmarkText", &TextInputController::unmarkText);
- bindMethod("validAttributesForMarkedText", &TextInputController::validAttributesForMarkedText);
- bindMethod("setComposition", &TextInputController::setComposition);
-}
-
-void TextInputController::insertText(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 1 || !arguments[0].isString())
- return;
-
- m_webView->confirmComposition(WebString::fromUTF8(arguments[0].toString()));
-}
-
-void TextInputController::doCommand(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- WebFrame* mainFrame = m_webView->mainFrame();
- if (!mainFrame)
- return;
-
- if (arguments.size() >= 1 && arguments[0].isString())
- mainFrame->executeCommand(WebString::fromUTF8(arguments[0].toString()));
-}
-
-void TextInputController::setMarkedText(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() >= 3 && arguments[0].isString()
- && arguments[1].isNumber() && arguments[2].isNumber()) {
- WebVector<WebCompositionUnderline> underlines;
- m_webView->setComposition(WebString::fromUTF8(arguments[0].toString()),
- underlines,
- arguments[1].toInt32(),
- arguments[1].toInt32() + arguments[2].toInt32());
- }
-}
-
-void TextInputController::unmarkText(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-
- m_webView->confirmComposition();
-}
-
-void TextInputController::hasMarkedText(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-
- WebFrame* mainFrame = m_webView->mainFrame();
- if (!mainFrame)
- return;
-
- result->set(mainFrame->hasMarkedText());
-}
-
-void TextInputController::conversationIdentifier(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void TextInputController::substringFromRange(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void TextInputController::attributedSubstringFromRange(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void TextInputController::markedRange(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-
- WebFrame* mainFrame = m_webView->mainFrame();
- if (!mainFrame)
- return;
-
- WebRange range = mainFrame->markedRange();
- Vector<int> intArray(2);
- intArray[0] = range.startOffset();
- intArray[1] = range.endOffset();
- result->set(WebBindings::makeIntArray(intArray));
-}
-
-void TextInputController::selectedRange(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-
- WebFrame* mainFrame = m_webView->mainFrame();
- if (!mainFrame)
- return;
-
- WebRange range = mainFrame->selectionRange();
- Vector<int> intArray(2);
- intArray[0] = range.startOffset();
- intArray[1] = range.endOffset();
- result->set(WebBindings::makeIntArray(intArray));
-}
-
-void TextInputController::firstRectForCharacterRange(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- WebFrame* frame = m_webView->focusedFrame();
- if (!frame)
- return;
-
- if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
- return;
-
- WebRect rect;
- if (!frame->firstRectForCharacterRange(arguments[0].toInt32(), arguments[1].toInt32(), rect))
- return;
-
- Vector<int> intArray(4);
- intArray[0] = rect.x;
- intArray[1] = rect.y;
- intArray[2] = rect.width;
- intArray[3] = rect.height;
- result->set(WebBindings::makeIntArray(intArray));
-}
-
-void TextInputController::characterIndexForPoint(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void TextInputController::validAttributesForMarkedText(const CppArgumentList&, CppVariant* result)
-{
- result->setNull();
-
- WebFrame* mainFrame = m_webView->mainFrame();
- if (!mainFrame)
- return;
-
- result->set("NSUnderline,NSUnderlineColor,NSMarkedClauseSegment,"
- "NSTextInputReplacementRangeAttributeName");
-}
-
-void TextInputController::makeAttributedString(const CppArgumentList&, CppVariant* result)
-{
- // FIXME: Implement this.
- result->setNull();
-}
-
-void TextInputController::setComposition(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-
- if (arguments.size() < 1)
- return;
-
- // Sends a keydown event with key code = 0xE5 to emulate input method behavior.
- WebKeyboardEvent keyDown;
- keyDown.type = WebInputEvent::RawKeyDown;
- keyDown.modifiers = 0;
- keyDown.windowsKeyCode = 0xE5; // VKEY_PROCESSKEY
- keyDown.setKeyIdentifierFromWindowsKeyCode();
- m_webView->handleInputEvent(keyDown);
-
- WebVector<WebCompositionUnderline> underlines;
- WebString text(WebString::fromUTF8(arguments[0].toString()));
- m_webView->setComposition(text, underlines, 0, text.length());
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h b/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h
deleted file mode 100644
index 286d83356..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/TextInputController.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.
- */
-
-// TextInputController is bound to window.textInputController in Javascript
-// when DRT is running. Layout tests use it to exercise various corners of
-// text input.
-
-#ifndef TextInputController_h
-#define TextInputController_h
-
-#include "CppBoundClass.h"
-
-namespace WebKit {
-class WebView;
-}
-
-namespace WebTestRunner {
-
-class TextInputController : public CppBoundClass {
-public:
- TextInputController();
-
- void setWebView(WebKit::WebView* webView) { m_webView = webView; }
-
- void insertText(const CppArgumentList&, CppVariant*);
- void doCommand(const CppArgumentList&, CppVariant*);
- void setMarkedText(const CppArgumentList&, CppVariant*);
- void unmarkText(const CppArgumentList&, CppVariant*);
- void hasMarkedText(const CppArgumentList&, CppVariant*);
- void conversationIdentifier(const CppArgumentList&, CppVariant*);
- void substringFromRange(const CppArgumentList&, CppVariant*);
- void attributedSubstringFromRange(const CppArgumentList&, CppVariant*);
- void markedRange(const CppArgumentList&, CppVariant*);
- void selectedRange(const CppArgumentList&, CppVariant*);
- void firstRectForCharacterRange(const CppArgumentList&, CppVariant*);
- void characterIndexForPoint(const CppArgumentList&, CppVariant*);
- void validAttributesForMarkedText(const CppArgumentList&, CppVariant*);
- void makeAttributedString(const CppArgumentList&, CppVariant*);
- void setComposition(const CppArgumentList&, CppVariant*);
-
-private:
- WebKit::WebView* m_webView;
-};
-
-}
-
-#endif // TextInputController_h
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp
deleted file mode 100644
index 3fbe30945..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebAccessibilityController.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "WebAccessibilityController.h"
-
-#include "AccessibilityControllerChromium.h"
-
-using WebKit::WebAccessibilityObject;
-
-namespace WebTestRunner {
-
-WebAccessibilityController::WebAccessibilityController(AccessibilityController* controller)
- : m_private(controller)
-{
-}
-
-void WebAccessibilityController::setFocusedElement(const WebAccessibilityObject& object)
-{
- m_private->setFocusedElement(object);
-}
-
-void WebAccessibilityController::notificationReceived(const WebAccessibilityObject& target, const char* notificationName)
-{
- m_private->notificationReceived(target, notificationName);
-}
-
-bool WebAccessibilityController::shouldLogAccessibilityEvents()
-{
- return m_private->shouldLogAccessibilityEvents();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp
deleted file mode 100644
index 93c0bba49..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebEventSender.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "WebEventSender.h"
-
-#include "EventSender.h"
-
-using WebKit::WebDragData;
-using WebKit::WebDragOperationsMask;
-
-namespace WebTestRunner {
-
-WebEventSender::WebEventSender(EventSender* eventSender)
- : m_private(eventSender)
-{
-}
-
-void WebEventSender::doDragDrop(const WebDragData& data, WebDragOperationsMask mask)
-{
- m_private->doDragDrop(data, mask);
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTask.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTask.cpp
deleted file mode 100644
index 97531c80d..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTask.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "WebTask.h"
-
-#include "WebKit.h"
-#include <wtf/Vector.h>
-
-namespace WebTestRunner {
-
-WebTask::WebTask(WebTaskList* list)
- : m_taskList(list)
-{
- m_taskList->registerTask(this);
-}
-
-WebTask::~WebTask()
-{
- if (m_taskList)
- m_taskList->unregisterTask(this);
-}
-
-class WebTaskList::Private : public Vector<WebTask*> {
-};
-
-WebTaskList::WebTaskList()
- : m_private(new Private)
-{
-}
-
-WebTaskList::~WebTaskList()
-{
- revokeAll();
- delete m_private;
-}
-
-void WebTaskList::registerTask(WebTask* task)
-{
- m_private->append(task);
-}
-
-void WebTaskList::unregisterTask(WebTask* task)
-{
- size_t index = m_private->find(task);
- if (index != notFound)
- m_private->remove(index);
-}
-
-void WebTaskList::revokeAll()
-{
- while (!m_private->isEmpty())
- (*m_private)[0]->cancel();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp
deleted file mode 100644
index 9a86953c3..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestInterfaces.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "WebTestInterfaces.h"
-
-#include "TestDelegate.h"
-#include "TestInterfaces.h"
-#include "WebAccessibilityController.h"
-#include "WebEventSender.h"
-#include "WebTestDelegate.h"
-
-using WebKit::WebContextMenuData;
-using WebKit::WebFrame;
-using WebKit::WebGamepads;
-using WebKit::WebString;
-using WebKit::WebVector;
-using WebKit::WebView;
-
-namespace WebTestRunner {
-
-class WebTestInterfaces::Internal : public TestDelegate {
-public:
- Internal();
- virtual ~Internal();
-
- TestInterfaces* testInterfaces() { return &m_interfaces; }
- void setDelegate(WebTestDelegate*);
- WebAccessibilityController* accessibilityController() { return &m_accessibilityController; }
- WebEventSender* eventSender() { return &m_eventSender; }
-
- // TestDelegate implementation.
- virtual void clearContextMenuData();
- virtual void clearEditCommand();
- virtual void fillSpellingSuggestionList(const WebString& word, WebVector<WebString>* suggestions);
- virtual void setEditCommand(const std::string& name, const std::string& value);
- virtual WebContextMenuData* lastContextMenuData() const;
- virtual void setGamepadData(const WebGamepads&);
- virtual void printMessage(const std::string& message);
- virtual void postTask(WebTask*);
- virtual void postDelayedTask(WebTask*, long long ms);
- virtual WebString registerIsolatedFileSystem(const WebVector<WebString>& absoluteFilenames);
- virtual long long getCurrentTimeInMillisecond();
- virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path);
-
-private:
- TestInterfaces m_interfaces;
- WebAccessibilityController m_accessibilityController;
- WebEventSender m_eventSender;
- WebTestDelegate* m_delegate;
-};
-
-WebTestInterfaces::Internal::Internal()
- : m_accessibilityController(m_interfaces.accessibilityController())
- , m_eventSender(m_interfaces.eventSender())
- , m_delegate(0)
-{
-}
-
-WebTestInterfaces::Internal::~Internal()
-{
-}
-
-void WebTestInterfaces::Internal::setDelegate(WebTestDelegate* delegate)
-{
- if (delegate) {
- m_delegate = delegate;
- m_interfaces.setDelegate(this);
- } else {
- m_delegate = 0;
- m_interfaces.setDelegate(0);
- }
-}
-
-void WebTestInterfaces::Internal::clearContextMenuData()
-{
- m_delegate->clearContextMenuData();
-}
-
-void WebTestInterfaces::Internal::clearEditCommand()
-{
- m_delegate->clearEditCommand();
-}
-
-void WebTestInterfaces::Internal::fillSpellingSuggestionList(const WebString& word, WebVector<WebString>* suggestions)
-{
- m_delegate->fillSpellingSuggestionList(word, suggestions);
-}
-
-void WebTestInterfaces::Internal::setEditCommand(const std::string& name, const std::string& value)
-{
- m_delegate->setEditCommand(name, value);
-}
-
-WebContextMenuData* WebTestInterfaces::Internal::lastContextMenuData() const
-{
- return m_delegate->lastContextMenuData();
-}
-
-void WebTestInterfaces::Internal::setGamepadData(const WebGamepads& pads)
-{
- m_delegate->setGamepadData(pads);
-}
-
-void WebTestInterfaces::Internal::printMessage(const std::string& message)
-{
- m_delegate->printMessage(message);
-}
-
-void WebTestInterfaces::Internal::postTask(WebTask* task)
-{
- m_delegate->postTask(task);
-}
-
-void WebTestInterfaces::Internal::postDelayedTask(WebTask* task, long long ms)
-{
- m_delegate->postDelayedTask(task, ms);
-}
-
-WebString WebTestInterfaces::Internal::registerIsolatedFileSystem(const WebVector<WebString>& absoluteFilenames)
-{
- return m_delegate->registerIsolatedFileSystem(absoluteFilenames);
-}
-
-long long WebTestInterfaces::Internal::getCurrentTimeInMillisecond()
-{
- return m_delegate->getCurrentTimeInMillisecond();
-}
-
-WebKit::WebString WebTestInterfaces::Internal::getAbsoluteWebStringFromUTF8Path(const std::string& path)
-{
- return m_delegate->getAbsoluteWebStringFromUTF8Path(path);
-}
-
-WebTestInterfaces::WebTestInterfaces()
-{
- m_internal = new Internal;
-}
-
-WebTestInterfaces::~WebTestInterfaces()
-{
- delete m_internal;
-}
-
-void WebTestInterfaces::setWebView(WebView* webView)
-{
- m_internal->testInterfaces()->setWebView(webView);
-}
-
-void WebTestInterfaces::setDelegate(WebTestDelegate* delegate)
-{
- m_internal->setDelegate(delegate);
-}
-
-void WebTestInterfaces::bindTo(WebFrame* frame)
-{
- m_internal->testInterfaces()->bindTo(frame);
-}
-
-void WebTestInterfaces::resetAll()
-{
- m_internal->testInterfaces()->resetAll();
-}
-
-WebAccessibilityController* WebTestInterfaces::accessibilityController()
-{
- return m_internal->accessibilityController();
-}
-
-WebEventSender* WebTestInterfaces::eventSender()
-{
- return m_internal->eventSender();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp b/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
deleted file mode 100644
index 942f0bb88..000000000
--- a/Tools/DumpRenderTree/chromium/TestRunner/src/WebTestProxy.cpp
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "WebTestProxy.h"
-
-#include "WebAccessibilityController.h"
-#include "WebAccessibilityNotification.h"
-#include "WebAccessibilityObject.h"
-#include "WebElement.h"
-#include "WebEventSender.h"
-#include "WebNode.h"
-#include "WebTestDelegate.h"
-#include "WebTestInterfaces.h"
-#include "platform/WebCString.h"
-
-using namespace WebKit;
-using namespace std;
-
-namespace WebTestRunner {
-
-WebTestProxyBase::WebTestProxyBase()
- : m_testInterfaces(0)
- , m_delegate(0)
-{
-}
-
-WebTestProxyBase::~WebTestProxyBase()
-{
-}
-
-void WebTestProxyBase::setInterfaces(WebTestInterfaces* interfaces)
-{
- m_testInterfaces = interfaces;
-}
-
-void WebTestProxyBase::setDelegate(WebTestDelegate* delegate)
-{
- m_delegate = delegate;
-}
-
-void WebTestProxyBase::setPaintRect(const WebRect& rect)
-{
- m_paintRect = rect;
-}
-
-WebRect WebTestProxyBase::paintRect() const
-{
- return m_paintRect;
-}
-
-void WebTestProxyBase::didInvalidateRect(const WebRect& rect)
-{
- // m_paintRect = m_paintRect U rect
- if (rect.isEmpty())
- return;
- if (m_paintRect.isEmpty()) {
- m_paintRect = rect;
- return;
- }
- int left = min(m_paintRect.x, rect.x);
- int top = min(m_paintRect.y, rect.y);
- int right = max(m_paintRect.x + m_paintRect.width, rect.x + rect.width);
- int bottom = max(m_paintRect.y + m_paintRect.height, rect.y + rect.height);
- m_paintRect = WebRect(left, top, right - left, bottom - top);
-}
-
-void WebTestProxyBase::didScrollRect(int, int, const WebRect& clipRect)
-{
- didInvalidateRect(clipRect);
-}
-
-void WebTestProxyBase::scheduleComposite()
-{
- m_paintRect = WebRect(0, 0, INT_MAX, INT_MAX);
-}
-
-void WebTestProxyBase::scheduleAnimation()
-{
- scheduleComposite();
-}
-
-void WebTestProxyBase::show(WebNavigationPolicy)
-{
- scheduleComposite();
-}
-
-void WebTestProxyBase::setWindowRect(const WebRect& rect)
-{
- scheduleComposite();
-}
-
-void WebTestProxyBase::didAutoResize(const WebSize&)
-{
- scheduleComposite();
-}
-
-void WebTestProxyBase::postAccessibilityNotification(const WebKit::WebAccessibilityObject& obj, WebKit::WebAccessibilityNotification notification)
-{
- if (notification == WebKit::WebAccessibilityNotificationFocusedUIElementChanged)
- m_testInterfaces->accessibilityController()->setFocusedElement(obj);
-
- const char* notificationName;
- switch (notification) {
- case WebKit::WebAccessibilityNotificationActiveDescendantChanged:
- notificationName = "ActiveDescendantChanged";
- break;
- case WebKit::WebAccessibilityNotificationAutocorrectionOccured:
- notificationName = "AutocorrectionOccured";
- break;
- case WebKit::WebAccessibilityNotificationCheckedStateChanged:
- notificationName = "CheckedStateChanged";
- break;
- case WebKit::WebAccessibilityNotificationChildrenChanged:
- notificationName = "ChildrenChanged";
- break;
- case WebKit::WebAccessibilityNotificationFocusedUIElementChanged:
- notificationName = "FocusedUIElementChanged";
- break;
- case WebKit::WebAccessibilityNotificationLayoutComplete:
- notificationName = "LayoutComplete";
- break;
- case WebKit::WebAccessibilityNotificationLoadComplete:
- notificationName = "LoadComplete";
- break;
- case WebKit::WebAccessibilityNotificationSelectedChildrenChanged:
- notificationName = "SelectedChildrenChanged";
- break;
- case WebKit::WebAccessibilityNotificationSelectedTextChanged:
- notificationName = "SelectedTextChanged";
- break;
- case WebKit::WebAccessibilityNotificationValueChanged:
- notificationName = "ValueChanged";
- break;
- case WebKit::WebAccessibilityNotificationScrolledToAnchor:
- notificationName = "ScrolledToAnchor";
- break;
- case WebKit::WebAccessibilityNotificationLiveRegionChanged:
- notificationName = "LiveRegionChanged";
- break;
- case WebKit::WebAccessibilityNotificationMenuListItemSelected:
- notificationName = "MenuListItemSelected";
- break;
- case WebKit::WebAccessibilityNotificationMenuListValueChanged:
- notificationName = "MenuListValueChanged";
- break;
- case WebKit::WebAccessibilityNotificationRowCountChanged:
- notificationName = "RowCountChanged";
- break;
- case WebKit::WebAccessibilityNotificationRowCollapsed:
- notificationName = "RowCollapsed";
- break;
- case WebKit::WebAccessibilityNotificationRowExpanded:
- notificationName = "RowExpanded";
- break;
- case WebKit::WebAccessibilityNotificationInvalidStatusChanged:
- notificationName = "InvalidStatusChanged";
- break;
- case WebKit::WebAccessibilityNotificationTextChanged:
- notificationName = "TextChanged";
- break;
- case WebKit::WebAccessibilityNotificationAriaAttributeChanged:
- notificationName = "AriaAttributeChanged";
- break;
- default:
- notificationName = "UnknownNotification";
- break;
- }
-
- m_testInterfaces->accessibilityController()->notificationReceived(obj, notificationName);
-
- if (m_testInterfaces->accessibilityController()->shouldLogAccessibilityEvents()) {
- std::string message("AccessibilityNotification - ");
- message += notificationName;
-
- WebKit::WebNode node = obj.node();
- if (!node.isNull() && node.isElementNode()) {
- WebKit::WebElement element = node.to<WebKit::WebElement>();
- if (element.hasAttribute("id")) {
- message += " - id:";
- message += element.getAttribute("id").utf8().data();
- }
- }
-
- m_delegate->printMessage(message + "\n");
- }
-}
-
-void WebTestProxyBase::startDragging(WebFrame*, const WebDragData& data, WebDragOperationsMask mask, const WebImage&, const WebPoint&)
-{
- // When running a test, we need to fake a drag drop operation otherwise
- // Windows waits for real mouse events to know when the drag is over.
- m_testInterfaces->eventSender()->doDragDrop(data, mask);
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
deleted file mode 100644
index 75fec130a..000000000
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ /dev/null
@@ -1,818 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "DRTDevToolsAgent.h"
-#include "DRTDevToolsClient.h"
-#include "DRTTestRunner.h"
-#include "MockWebPrerenderingSupport.h"
-#include "WebCache.h"
-#include "WebDataSource.h"
-#include "WebDocument.h"
-#include "WebElement.h"
-#include "WebFrame.h"
-#include "WebHistoryItem.h"
-#include "WebIDBFactory.h"
-#include "WebTestingSupport.h"
-#include "WebPermissions.h"
-#include "WebRuntimeFeatures.h"
-#include "WebScriptController.h"
-#include "WebSettings.h"
-#include "WebTestProxy.h"
-#include "WebView.h"
-#include "WebViewHost.h"
-#include "platform/WebArrayBufferView.h"
-#include "skia/ext/platform_canvas.h"
-#include "webkit/support/webkit_support.h"
-#include "webkit/support/webkit_support_gfx.h"
-#include <public/Platform.h>
-#include <public/WebCompositorSupport.h>
-#include <public/WebPoint.h>
-#include <public/WebSize.h>
-#include <public/WebString.h>
-#include <public/WebThread.h>
-#include <public/WebURLRequest.h>
-#include <public/WebURLResponse.h>
-#include <algorithm>
-#include <cctype>
-#include <vector>
-#include <wtf/MD5.h>
-#include <wtf/OwnArrayPtr.h>
-
-
-using namespace WebKit;
-using namespace WebTestRunner;
-using namespace std;
-
-// Content area size for newly created windows.
-static const int testWindowWidth = 800;
-static const int testWindowHeight = 600;
-
-// The W3C SVG layout tests use a different size than the other layout tests.
-static const int SVGTestWindowWidth = 480;
-static const int SVGTestWindowHeight = 360;
-
-static const char layoutTestsPattern[] = "/LayoutTests/";
-static const string::size_type layoutTestsPatternSize = sizeof(layoutTestsPattern) - 1;
-static const char fileUrlPattern[] = "file:/";
-static const char fileTestPrefix[] = "(file test):";
-static const char dataUrlPattern[] = "data:";
-static const string::size_type dataUrlPatternSize = sizeof(dataUrlPattern) - 1;
-
-// FIXME: Move this to a common place so that it can be shared with
-// WebCore::TransparencyWin::makeLayerOpaque().
-static void makeCanvasOpaque(SkCanvas* canvas)
-{
- const SkBitmap& bitmap = canvas->getTopDevice()->accessBitmap(true);
- ASSERT(bitmap.config() == SkBitmap::kARGB_8888_Config);
-
- SkAutoLockPixels lock(bitmap);
- for (int y = 0; y < bitmap.height(); y++) {
- uint32_t* row = bitmap.getAddr32(0, y);
- for (int x = 0; x < bitmap.width(); x++)
- row[x] |= 0xFF000000; // Set alpha bits to 1.
- }
-}
-
-TestShell::TestShell()
- : m_testIsPending(false)
- , m_testIsPreparing(false)
- , m_focusedWidget(0)
- , m_devTools(0)
- , m_dumpPixelsForCurrentTest(false)
- , m_allowExternalPages(false)
- , m_acceleratedCompositingForVideoEnabled(false)
- , m_acceleratedCompositingForFixedPositionEnabled(false)
- , m_softwareCompositingEnabled(false)
- , m_threadedCompositingEnabled(false)
- , m_forceCompositingMode(false)
- , m_accelerated2dCanvasEnabled(false)
- , m_deferred2dCanvasEnabled(false)
- , m_acceleratedPaintingEnabled(false)
- , m_perTilePaintingEnabled(false)
- , m_acceleratedAnimationEnabled(false)
- , m_deferredImageDecodingEnabled(false)
- , m_stressOpt(false)
- , m_stressDeopt(false)
- , m_dumpWhenFinished(true)
- , m_isDisplayingModalDialog(false)
-{
- WebRuntimeFeatures::enableDataTransferItems(true);
- WebRuntimeFeatures::enableDeviceMotion(false);
- WebRuntimeFeatures::enableGeolocation(true);
- WebRuntimeFeatures::enableIndexedDatabase(true);
- WebRuntimeFeatures::enableInputTypeDateTime(true);
- WebRuntimeFeatures::enableInputTypeDateTimeLocal(true);
- WebRuntimeFeatures::enableInputTypeMonth(true);
- WebRuntimeFeatures::enableInputTypeTime(true);
- WebRuntimeFeatures::enableInputTypeWeek(true);
- WebRuntimeFeatures::enableFileSystem(true);
- WebRuntimeFeatures::enableJavaScriptI18NAPI(true);
- WebRuntimeFeatures::enableMediaSource(true);
- WebRuntimeFeatures::enableEncryptedMedia(true);
- WebRuntimeFeatures::enableMediaStream(true);
- WebRuntimeFeatures::enablePeerConnection(true);
- WebRuntimeFeatures::enableWebAudio(true);
- WebRuntimeFeatures::enableVideoTrack(true);
- WebRuntimeFeatures::enableGamepad(true);
- WebRuntimeFeatures::enableShadowDOM(true);
- WebRuntimeFeatures::enableStyleScoped(true);
- WebRuntimeFeatures::enableScriptedSpeech(true);
- WebRuntimeFeatures::enableRequestAutocomplete(true);
-
- // 30 second is the same as the value in Mac DRT.
- // If we use a value smaller than the timeout value of
- // (new-)run-webkit-tests, (new-)run-webkit-tests misunderstands that a
- // timed-out DRT process was crashed.
- m_timeout = 30 * 1000;
-}
-
-void TestShell::initialize()
-{
- m_webPermissions = adoptPtr(new WebPermissions(this));
- m_testInterfaces = adoptPtr(new WebTestInterfaces());
- m_testRunner = adoptPtr(new DRTTestRunner(this));
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- m_notificationPresenter = adoptPtr(new NotificationPresenter(this));
-#endif
-#if ENABLE(LINK_PRERENDER)
- m_prerenderingSupport = adoptPtr(new MockWebPrerenderingSupport());
-#endif
-
- WTF::initializeThreading();
-
- if (m_threadedCompositingEnabled)
- m_webCompositorThread = adoptPtr(WebKit::Platform::current()->createThread("Compositor"));
- WebKit::Platform::current()->compositorSupport()->initialize(m_webCompositorThread.get());
-
- createMainWindow();
-}
-
-void TestShell::createMainWindow()
-{
- m_drtDevToolsAgent = adoptPtr(new DRTDevToolsAgent);
- m_webViewHost = adoptPtr(createNewWindow(WebURL(), m_drtDevToolsAgent.get()));
- m_webView = m_webViewHost->webView();
- m_testInterfaces->setDelegate(m_webViewHost.get());
- m_testInterfaces->setWebView(m_webView);
- m_testRunner->setDelegate(m_webViewHost.get());
- m_testRunner->setWebView(m_webView);
- m_drtDevToolsAgent->setWebView(m_webView);
-}
-
-TestShell::~TestShell()
-{
- m_testInterfaces->setDelegate(0);
- m_testInterfaces->setWebView(0);
- m_testRunner->setDelegate(0);
- m_testRunner->setWebView(0);
- m_drtDevToolsAgent->setWebView(0);
-}
-
-void TestShell::createDRTDevToolsClient(DRTDevToolsAgent* agent)
-{
- m_drtDevToolsClient = adoptPtr(new DRTDevToolsClient(agent, m_devTools->webView()));
-}
-
-void TestShell::showDevTools()
-{
- if (!m_devTools) {
- WebURL url = webkit_support::GetDevToolsPathAsURL();
- if (!url.isValid()) {
- ASSERT(false);
- return;
- }
- m_devTools = createNewWindow(url);
- m_devTools->webView()->settings()->setMemoryInfoEnabled(true);
- m_devTools->setLogConsoleOutput(false);
- ASSERT(m_devTools);
- createDRTDevToolsClient(m_drtDevToolsAgent.get());
- }
- m_devTools->show(WebKit::WebNavigationPolicyNewWindow);
-}
-
-void TestShell::closeDevTools()
-{
- if (m_devTools) {
- m_devTools->webView()->settings()->setMemoryInfoEnabled(false);
- m_drtDevToolsAgent->reset();
- m_drtDevToolsClient.clear();
- closeWindow(m_devTools);
- m_devTools = 0;
- }
-}
-
-void TestShell::resetWebSettings(WebView& webView)
-{
- m_prefs.reset();
- m_prefs.acceleratedCompositingEnabled = true;
- m_prefs.acceleratedCompositingForVideoEnabled = m_acceleratedCompositingForVideoEnabled;
- m_prefs.acceleratedCompositingForFixedPositionEnabled = m_acceleratedCompositingForFixedPositionEnabled;
- m_prefs.forceCompositingMode = m_forceCompositingMode;
- m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled;
- m_prefs.deferred2dCanvasEnabled = m_deferred2dCanvasEnabled;
- m_prefs.acceleratedPaintingEnabled = m_acceleratedPaintingEnabled;
- m_prefs.perTilePaintingEnabled = m_perTilePaintingEnabled;
- m_prefs.acceleratedAnimationEnabled = m_acceleratedAnimationEnabled;
- m_prefs.deferredImageDecodingEnabled = m_deferredImageDecodingEnabled;
- m_prefs.applyTo(&webView);
-}
-
-void TestShell::runFileTest(const TestParams& params, bool shouldDumpPixels)
-{
- ASSERT(params.testUrl.isValid());
- m_dumpPixelsForCurrentTest = shouldDumpPixels;
- m_testIsPreparing = true;
- m_params = params;
- string testUrl = m_params.testUrl.spec();
-
- m_testRunner->setShouldGeneratePixelResults(shouldDumpPixels);
-
- if (testUrl.find("loading/") != string::npos
- || testUrl.find("loading\\") != string::npos)
- m_testRunner->setShouldDumpFrameLoadCallbacks(true);
-
- if (testUrl.find("compositing/") != string::npos || testUrl.find("compositing\\") != string::npos) {
- if (!m_softwareCompositingEnabled)
- m_prefs.accelerated2dCanvasEnabled = true;
- m_prefs.acceleratedCompositingForVideoEnabled = true;
- m_prefs.deferred2dCanvasEnabled = true;
- m_prefs.mockScrollbarsEnabled = true;
- m_prefs.applyTo(m_webView);
- }
-
- if (testUrl.find("/dumpAsText/") != string::npos
- || testUrl.find("\\dumpAsText\\") != string::npos) {
- m_testRunner->setShouldDumpAsText(true);
- m_testRunner->setShouldGeneratePixelResults(false);
- }
-
- if (testUrl.find("/inspector/") != string::npos
- || testUrl.find("\\inspector\\") != string::npos)
- showDevTools();
-
- if (m_params.debugLayerTree)
- m_testRunner->setShowDebugLayerTree(true);
-
- if (m_dumpWhenFinished)
- m_printer.handleTestHeader(testUrl.c_str());
- loadURL(m_params.testUrl);
-
- m_testIsPreparing = false;
- waitTestFinished();
-}
-
-static inline bool isSVGTestURL(const WebURL& url)
-{
- return url.isValid() && string(url.spec()).find("W3C-SVG-1.1") != string::npos;
-}
-
-void TestShell::resizeWindowForTest(WebViewHost* window, const WebURL& url)
-{
- int width, height;
- if (isSVGTestURL(url)) {
- width = SVGTestWindowWidth;
- height = SVGTestWindowHeight;
- } else {
- width = testWindowWidth;
- height = testWindowHeight;
- }
- window->setWindowRect(WebRect(0, 0, width + virtualWindowBorder * 2, height + virtualWindowBorder * 2));
-}
-
-void TestShell::resetTestController()
-{
- resetWebSettings(*webView());
- m_webPermissions->reset();
- m_testInterfaces->resetAll();
- m_testRunner->reset();
- m_webViewHost->reset();
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- m_notificationPresenter->reset();
-#endif
-#if OS(ANDROID)
- webkit_support::ReleaseMediaResources();
-#endif
- m_drtDevToolsAgent->reset();
- if (m_drtDevToolsClient)
- m_drtDevToolsClient->reset();
- webView()->setPageScaleFactor(1, WebPoint(0, 0));
- webView()->enableFixedLayoutMode(false);
- webView()->setFixedLayoutSize(WebSize(0, 0));
- webView()->mainFrame()->clearOpener();
- WebTestingSupport::resetInternalsObject(webView()->mainFrame());
- WebCache::clear();
-}
-
-void TestShell::loadURL(const WebURL& url)
-{
- m_webViewHost->loadURLForFrame(url, WebString());
-}
-
-void TestShell::reload()
-{
- m_webViewHost->navigationController()->reload();
-}
-
-void TestShell::goToOffset(int offset)
-{
- m_webViewHost->navigationController()->goToOffset(offset);
-}
-
-int TestShell::navigationEntryCount() const
-{
- return m_webViewHost->navigationController()->entryCount();
-}
-
-void TestShell::callJSGC()
-{
- m_webView->mainFrame()->collectGarbage();
-}
-
-void TestShell::setFocus(WebWidget* widget, bool enable)
-{
- // Simulate the effects of InteractiveSetFocus(), which includes calling
- // both setFocus() and setIsActive().
- if (enable) {
- if (m_focusedWidget != widget) {
- if (m_focusedWidget)
- m_focusedWidget->setFocus(false);
- webView()->setIsActive(enable);
- widget->setFocus(enable);
- m_focusedWidget = widget;
- }
- } else {
- if (m_focusedWidget == widget) {
- widget->setFocus(enable);
- webView()->setIsActive(enable);
- m_focusedWidget = 0;
- }
- }
-}
-
-void TestShell::testFinished()
-{
- if (!m_testIsPending)
- return;
- m_testIsPending = false;
- if (m_dumpWhenFinished)
- dump();
- webkit_support::QuitMessageLoop();
-}
-
-void TestShell::testTimedOut()
-{
- m_printer.handleTimedOut();
- testFinished();
-}
-
-static string dumpDocumentText(WebFrame* frame)
-{
- // We use the document element's text instead of the body text here because
- // not all documents have a body, such as XML documents.
- WebElement documentElement = frame->document().documentElement();
- if (documentElement.isNull())
- return string();
- return documentElement.innerText().utf8();
-}
-
-static string dumpFramesAsText(WebFrame* frame, bool recursive)
-{
- string result;
-
- // Add header for all but the main frame. Skip empty frames.
- if (frame->parent() && !frame->document().documentElement().isNull()) {
- result.append("\n--------\nFrame: '");
- result.append(frame->uniqueName().utf8().data());
- result.append("'\n--------\n");
- }
-
- result.append(dumpDocumentText(frame));
- result.append("\n");
-
- if (recursive) {
- for (WebFrame* child = frame->firstChild(); child; child = child->nextSibling())
- result.append(dumpFramesAsText(child, recursive));
- }
-
- return result;
-}
-
-static string dumpFramesAsPrintedText(WebFrame* frame, bool recursive)
-{
- string result;
-
- // Cannot do printed format for anything other than HTML
- if (!frame->document().isHTMLDocument())
- return string();
-
- // Add header for all but the main frame. Skip empty frames.
- if (frame->parent() && !frame->document().documentElement().isNull()) {
- result.append("\n--------\nFrame: '");
- result.append(frame->uniqueName().utf8().data());
- result.append("'\n--------\n");
- }
-
- result.append(frame->renderTreeAsText(WebFrame::RenderAsTextPrinting).utf8());
- result.append("\n");
-
- if (recursive) {
- for (WebFrame* child = frame->firstChild(); child; child = child->nextSibling())
- result.append(dumpFramesAsPrintedText(child, recursive));
- }
-
- return result;
-}
-
-static void dumpFrameScrollPosition(WebFrame* frame, bool recursive)
-{
- WebSize offset = frame->scrollOffset();
- if (offset.width > 0 || offset.height > 0) {
- if (frame->parent())
- printf("frame '%s' ", frame->uniqueName().utf8().data());
- printf("scrolled to %d,%d\n", offset.width, offset.height);
- }
-
- if (!recursive)
- return;
- for (WebFrame* child = frame->firstChild(); child; child = child->nextSibling())
- dumpFrameScrollPosition(child, recursive);
-}
-
-struct ToLower {
- char16 operator()(char16 c) { return tolower(c); }
-};
-
-// FIXME: Eliminate std::transform(), std::vector, and std::sort().
-
-// Returns True if item1 < item2.
-static bool HistoryItemCompareLess(const WebHistoryItem& item1, const WebHistoryItem& item2)
-{
- string16 target1 = item1.target();
- string16 target2 = item2.target();
- std::transform(target1.begin(), target1.end(), target1.begin(), ToLower());
- std::transform(target2.begin(), target2.end(), target2.begin(), ToLower());
- return target1 < target2;
-}
-
-static string normalizeLayoutTestURLInternal(const string& url)
-{
- string result = url;
- size_t pos;
- if (!url.find(fileUrlPattern) && ((pos = url.find(layoutTestsPattern)) != string::npos)) {
- // adjust file URLs to match upstream results.
- result.replace(0, pos + layoutTestsPatternSize, fileTestPrefix);
- } else if (!url.find(dataUrlPattern)) {
- // URL-escape data URLs to match results upstream.
- string path = url.substr(dataUrlPatternSize);
- result.replace(dataUrlPatternSize, url.length(), path);
- }
- return result;
-}
-
-static string dumpHistoryItem(const WebHistoryItem& item, int indent, bool isCurrent)
-{
- string result;
-
- if (isCurrent) {
- result.append("curr->");
- result.append(indent - 6, ' '); // 6 == "curr->".length()
- } else
- result.append(indent, ' ');
-
- string url = normalizeLayoutTestURLInternal(item.urlString().utf8());
- result.append(url);
- if (!item.target().isEmpty()) {
- result.append(" (in frame \"");
- result.append(item.target().utf8());
- result.append("\")");
- }
- if (item.isTargetItem())
- result.append(" **nav target**");
- result.append("\n");
-
- const WebVector<WebHistoryItem>& children = item.children();
- if (!children.isEmpty()) {
- // Must sort to eliminate arbitrary result ordering which defeats
- // reproducible testing.
- // FIXME: WebVector should probably just be a std::vector!!
- std::vector<WebHistoryItem> sortedChildren;
- for (size_t i = 0; i < children.size(); ++i)
- sortedChildren.push_back(children[i]);
- std::sort(sortedChildren.begin(), sortedChildren.end(), HistoryItemCompareLess);
- for (size_t i = 0; i < sortedChildren.size(); ++i)
- result += dumpHistoryItem(sortedChildren[i], indent + 4, false);
- }
-
- return result;
-}
-
-static void dumpBackForwardList(const TestNavigationController& navigationController, string& result)
-{
- result.append("\n============== Back Forward List ==============\n");
- for (int index = 0; index < navigationController.entryCount(); ++index) {
- int currentIndex = navigationController.lastCommittedEntryIndex();
- WebHistoryItem historyItem = navigationController.entryAtIndex(index)->contentState();
- if (historyItem.isNull()) {
- historyItem.initialize();
- historyItem.setURLString(navigationController.entryAtIndex(index)->URL().spec().utf16());
- }
- result.append(dumpHistoryItem(historyItem, 8, index == currentIndex));
- }
- result.append("===============================================\n");
-}
-
-string TestShell::dumpAllBackForwardLists()
-{
- string result;
- for (unsigned i = 0; i < m_windowList.size(); ++i)
- dumpBackForwardList(*m_windowList[i]->navigationController(), result);
- return result;
-}
-
-void TestShell::dump()
-{
- WebScriptController::flushConsoleMessages();
-
- // Dump the requested representation.
- WebFrame* frame = m_webView->mainFrame();
- if (!frame)
- return;
- bool shouldDumpAsText = m_testRunner->shouldDumpAsText();
- bool shouldDumpAsAudio = m_testRunner->shouldDumpAsAudio();
- bool shouldGeneratePixelResults = m_testRunner->shouldGeneratePixelResults();
- bool shouldDumpAsPrinted = m_testRunner->isPrinting();
- bool dumpedAnything = false;
-
- if (shouldDumpAsAudio) {
- const WebKit::WebArrayBufferView& webArrayBufferView = m_testRunner->audioData();
- m_printer.handleAudio(webArrayBufferView.baseAddress(), webArrayBufferView.byteLength());
- m_printer.handleAudioFooter();
- m_printer.handleTestFooter(true);
-
- fflush(stdout);
- fflush(stderr);
- return;
- }
-
- if (m_params.dumpTree) {
- dumpedAnything = true;
- m_printer.handleTextHeader();
- // Text output: the test page can request different types of output
- // which we handle here.
- if (!shouldDumpAsText) {
- // Plain text pages should be dumped as text
- string mimeType = frame->dataSource()->response().mimeType().utf8();
- if (mimeType == "text/plain") {
- shouldDumpAsText = true;
- shouldGeneratePixelResults = false;
- }
- }
- if (shouldDumpAsText) {
- bool recursive = m_testRunner->shouldDumpChildFramesAsText();
- string dataUtf8 = shouldDumpAsPrinted ? dumpFramesAsPrintedText(frame, recursive) : dumpFramesAsText(frame, recursive);
- if (fwrite(dataUtf8.c_str(), 1, dataUtf8.size(), stdout) != dataUtf8.size())
- FATAL("Short write to stdout, disk full?\n");
- } else {
- WebFrame::RenderAsTextControls renderTextBehavior = WebFrame::RenderAsTextNormal;
- if (shouldDumpAsPrinted)
- renderTextBehavior |= WebFrame::RenderAsTextPrinting;
- if (m_params.debugRenderTree)
- renderTextBehavior |= WebFrame::RenderAsTextDebug;
- printf("%s", frame->renderTreeAsText(renderTextBehavior).utf8().data());
- bool recursive = m_testRunner->shouldDumpChildFrameScrollPositions();
- dumpFrameScrollPosition(frame, recursive);
- }
- if (m_testRunner->shouldDumpBackForwardList())
- printf("%s", dumpAllBackForwardLists().c_str());
- }
- if (dumpedAnything && m_params.printSeparators)
- m_printer.handleTextFooter();
-
- if (m_dumpPixelsForCurrentTest && shouldGeneratePixelResults) {
- // Image output: we write the image data to the file given on the
- // command line (for the dump pixels argument), and the MD5 sum to
- // stdout.
- dumpedAnything = true;
- m_webView->layout();
- if (m_testRunner->testRepaint()) {
- WebSize viewSize = m_webView->size();
- int width = viewSize.width;
- int height = viewSize.height;
- if (m_testRunner->sweepHorizontally()) {
- for (WebRect column(0, 0, 1, height); column.x < width; column.x++)
- m_webViewHost->paintRect(column);
- } else {
- for (WebRect line(0, 0, width, 1); line.y < height; line.y++)
- m_webViewHost->paintRect(line);
- }
- } else if (m_testRunner->isPrinting())
- m_webViewHost->paintPagesWithBoundaries();
- else
- m_webViewHost->paintInvalidatedRegion();
-
- // See if we need to draw the selection bounds rect. Selection bounds
- // rect is the rect enclosing the (possibly transformed) selection.
- // The rect should be drawn after everything is laid out and painted.
- if (m_testRunner->shouldDumpSelectionRect()) {
- // If there is a selection rect - draw a red 1px border enclosing rect
- WebRect wr = frame->selectionBoundsRect();
- if (!wr.isEmpty()) {
- // Render a red rectangle bounding selection rect
- SkPaint paint;
- paint.setColor(0xFFFF0000); // Fully opaque red
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- paint.setStrokeWidth(1.0f);
- SkIRect rect; // Bounding rect
- rect.set(wr.x, wr.y, wr.x + wr.width, wr.y + wr.height);
- m_webViewHost->canvas()->drawIRect(rect, paint);
- }
- }
-
- dumpImage(m_webViewHost->canvas());
- }
- m_printer.handleTestFooter(dumpedAnything);
- fflush(stdout);
- fflush(stderr);
-}
-
-void TestShell::dumpImage(SkCanvas* canvas) const
-{
- // Fix the alpha. The expected PNGs on Mac have an alpha channel, so we want
- // to keep it. On Windows, the alpha channel is wrong since text/form control
- // drawing may have erased it in a few places. So on Windows we force it to
- // opaque and also don't write the alpha channel for the reference. Linux
- // doesn't have the wrong alpha like Windows, but we match Windows.
-#if OS(MAC_OS_X)
- bool discardTransparency = false;
-#else
- bool discardTransparency = true;
- makeCanvasOpaque(canvas);
-#endif
-
- const SkBitmap& sourceBitmap = canvas->getTopDevice()->accessBitmap(false);
- SkAutoLockPixels sourceBitmapLock(sourceBitmap);
-
- // Compute MD5 sum.
- MD5 digester;
- Vector<uint8_t, 16> digestValue;
-#if OS(ANDROID)
- // On Android, pixel layout is RGBA (see third_party/skia/include/core/SkColorPriv.h);
- // however, other Chrome platforms use BGRA (see skia/config/SkUserConfig.h).
- // To match the checksum of other Chrome platforms, we need to reorder the layout of pixels.
- // NOTE: The following code assumes we use SkBitmap::kARGB_8888_Config,
- // which has been checked in device.makeOpaque() (see above).
- const uint8_t* rawPixels = reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels());
- size_t bitmapSize = sourceBitmap.getSize();
- OwnArrayPtr<uint8_t> reorderedPixels = adoptArrayPtr(new uint8_t[bitmapSize]);
- for (size_t i = 0; i < bitmapSize; i += 4) {
- reorderedPixels[i] = rawPixels[i + 2]; // R
- reorderedPixels[i + 1] = rawPixels[i + 1]; // G
- reorderedPixels[i + 2] = rawPixels[i]; // B
- reorderedPixels[i + 3] = rawPixels[i + 3]; // A
- }
- digester.addBytes(reorderedPixels.get(), bitmapSize);
- reorderedPixels.clear();
-#else
- digester.addBytes(reinterpret_cast<const uint8_t*>(sourceBitmap.getPixels()), sourceBitmap.getSize());
-#endif
- digester.checksum(digestValue);
- string md5hash;
- md5hash.reserve(16 * 2);
- for (unsigned i = 0; i < 16; ++i) {
- char hex[3];
- // Use "x", not "X". The string must be lowercased.
- sprintf(hex, "%02x", digestValue[i]);
- md5hash.append(hex);
- }
-
- // Only encode and dump the png if the hashes don't match. Encoding the
- // image is really expensive.
- if (md5hash.compare(m_params.pixelHash)) {
- std::vector<unsigned char> png;
-#if OS(ANDROID)
- webkit_support::EncodeRGBAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(),
- sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png);
-#else
- webkit_support::EncodeBGRAPNGWithChecksum(reinterpret_cast<const unsigned char*>(sourceBitmap.getPixels()), sourceBitmap.width(),
- sourceBitmap.height(), static_cast<int>(sourceBitmap.rowBytes()), discardTransparency, md5hash, &png);
-#endif
-
- m_printer.handleImage(md5hash.c_str(), m_params.pixelHash.c_str(), &png[0], png.size());
- } else
- m_printer.handleImage(md5hash.c_str(), m_params.pixelHash.c_str(), 0, 0);
-}
-
-void TestShell::bindJSObjectsToWindow(WebFrame* frame)
-{
- WebTestingSupport::injectInternalsObject(frame);
- m_testInterfaces->bindTo(frame);
- m_testRunner->bindToJavascript(frame, WebString::fromUTF8("testRunner"));
- m_testRunner->bindToJavascript(frame, WebString::fromUTF8("layoutTestController"));
-}
-
-WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url)
-{
- return createNewWindow(url, 0);
-}
-
-WebViewHost* TestShell::createNewWindow(const WebKit::WebURL& url, DRTDevToolsAgent* devToolsAgent)
-{
- WebTestRunner::WebTestProxy<WebViewHost, TestShell*>* host = new WebTestRunner::WebTestProxy<WebViewHost, TestShell*>(this);
- host->setInterfaces(m_testInterfaces.get());
- if (m_webViewHost)
- host->setDelegate(m_webViewHost.get());
- else
- host->setDelegate(host);
- host->setProxy(host);
- WebView* view = WebView::create(host);
- view->setPermissionClient(webPermissions());
- view->setDevToolsAgentClient(devToolsAgent);
- host->setWebWidget(view);
- m_prefs.applyTo(view);
- view->initializeMainFrame(host);
- m_windowList.append(host);
- host->loadURLForFrame(url, WebString());
- return host;
-}
-
-void TestShell::closeWindow(WebViewHost* window)
-{
- size_t i = m_windowList.find(window);
- if (i == notFound) {
- ASSERT_NOT_REACHED();
- return;
- }
- m_windowList.remove(i);
- WebWidget* focusedWidget = m_focusedWidget;
- if (window->webWidget() == m_focusedWidget)
- focusedWidget = 0;
-
- delete window;
- // We set the focused widget after deleting the web view host because it
- // can change the focus.
- m_focusedWidget = focusedWidget;
- if (m_focusedWidget) {
- webView()->setIsActive(true);
- m_focusedWidget->setFocus(true);
- }
-}
-
-void TestShell::closeRemainingWindows()
-{
- // Just close devTools window manually because we have custom deinitialization code for it.
- closeDevTools();
-
- // Iterate through the window list and close everything except the main
- // window. We don't want to delete elements as we're iterating, so we copy
- // to a temp vector first.
- Vector<WebViewHost*> windowsToDelete;
- for (unsigned i = 0; i < m_windowList.size(); ++i) {
- if (m_windowList[i] != webViewHost())
- windowsToDelete.append(m_windowList[i]);
- }
- ASSERT(windowsToDelete.size() + 1 == m_windowList.size());
- for (unsigned i = 0; i < windowsToDelete.size(); ++i)
- closeWindow(windowsToDelete[i]);
- ASSERT(m_windowList.size() == 1);
-}
-
-int TestShell::windowCount()
-{
- return m_windowList.size();
-}
-
-string TestShell::normalizeLayoutTestURL(const string& url)
-{
- return normalizeLayoutTestURLInternal(url);
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
deleted file mode 100644
index 306f35cd1..000000000
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef TestShell_h
-#define TestShell_h
-
-#include "DRTTestRunner.h"
-#include "NotificationPresenter.h"
-#include "TestEventPrinter.h"
-#include "WebPreferences.h"
-#include "WebTestInterfaces.h"
-#include "WebViewHost.h"
-#include <string>
-#include <wtf/OwnPtr.h>
-#include <wtf/Vector.h>
-
-// TestShell is a container of global variables and has bridge functions between
-// various objects. Only one instance is created in one DRT process.
-
-namespace WebKit {
-class WebDevToolsAgentClient;
-class WebFrame;
-class WebNotificationPresenter;
-class WebThread;
-class WebView;
-class WebURL;
-}
-
-class DRTDevToolsAgent;
-class DRTDevToolsCallArgs;
-class DRTDevToolsClient;
-class MockWebPrerenderingSupport;
-class WebPermissions;
-
-struct TestParams {
- bool dumpTree;
- bool debugRenderTree;
- bool debugLayerTree;
- bool printSeparators;
- WebKit::WebURL testUrl;
- std::string pixelHash;
-
- TestParams()
- : dumpTree(true)
- , debugRenderTree(false)
- , debugLayerTree(false)
- , printSeparators(false) { }
-};
-
-class TestShell {
-public:
- TestShell();
- ~TestShell();
-
- void initialize();
-
- // The main WebView.
- WebKit::WebView* webView() const { return m_webView; }
- // Returns the host for the main WebView.
- WebViewHost* webViewHost() const { return m_webViewHost.get(); }
- DRTTestRunner* testRunner() const { return m_testRunner.get(); }
- WebTestRunner::WebEventSender* eventSender() const { return m_testInterfaces->eventSender(); }
- WebTestRunner::WebAccessibilityController* accessibilityController() const { return m_testInterfaces->accessibilityController(); }
-#if ENABLE(NOTIFICATIONS)
- NotificationPresenter* notificationPresenter() const { return m_notificationPresenter.get(); }
-#endif
- const TestEventPrinter* printer() const { return &m_printer; }
-
- WebPreferences* preferences() { return &m_prefs; }
- void applyPreferences() { m_prefs.applyTo(m_webView); }
-
- WebPermissions* webPermissions() { return m_webPermissions.get(); }
-
- void bindJSObjectsToWindow(WebKit::WebFrame*);
- void runFileTest(const TestParams&, bool shouldDumpPixelTests);
- void callJSGC();
- void resetTestController();
- void waitTestFinished();
-
- // Operations to the main window.
- void loadURL(const WebKit::WebURL&);
- void reload();
- void goToOffset(int offset);
- int navigationEntryCount() const;
-
- void setFocus(WebKit::WebWidget*, bool enable);
- bool shouldDumpFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpFrameLoadCallbacks(); }
- bool shouldDumpResourceRequestCallbacks() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpResourceRequestCallbacks(); }
- bool shouldDumpUserGestureInFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpUserGestureInFrameLoadCallbacks(); }
- bool shouldDumpResourceLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpResourceLoadCallbacks(); }
- bool shouldDumpResourceResponseMIMETypes() const { return (m_testIsPreparing || m_testIsPending) && testRunner()->shouldDumpResourceResponseMIMETypes(); }
- void setIsLoading(bool flag) { m_isLoading = flag; }
-
- // Called by the DRTTestRunner to signal test completion.
- void testFinished();
- // Called by DRTTestRunner when a test hits the timeout, but does not
- // cause a hang. We can avoid killing TestShell in this case and still dump
- // the test results.
- void testTimedOut();
-
- bool allowExternalPages() const { return m_allowExternalPages; }
- void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
-
- void setAcceleratedCompositingForVideoEnabled(bool enabled) { m_acceleratedCompositingForVideoEnabled = enabled; }
- void setAcceleratedCompositingForFixedPositionEnabled(bool enabled) { m_acceleratedCompositingForFixedPositionEnabled = enabled; }
- bool softwareCompositingEnabled() { return m_softwareCompositingEnabled; }
- void setSoftwareCompositingEnabled(bool enabled) { m_softwareCompositingEnabled = enabled; }
- void setThreadedCompositingEnabled(bool enabled) { m_threadedCompositingEnabled = enabled; }
- void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
- void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
- void setDeferred2dCanvasEnabled(bool enabled) { m_deferred2dCanvasEnabled = enabled; }
- void setAcceleratedPaintingEnabled(bool enabled) { m_acceleratedPaintingEnabled = enabled; }
- void setPerTilePaintingEnabled(bool enabled) { m_perTilePaintingEnabled = enabled; }
- void setAcceleratedAnimationEnabled(bool enabled) { m_acceleratedAnimationEnabled = enabled; }
- void setDeferredImageDecodingEnabled(bool enabled) { m_deferredImageDecodingEnabled = enabled; }
-#if defined(OS_WIN)
- // Access to the finished event. Used by the static WatchDog thread.
- HANDLE finishedEvent() { return m_finishedEvent; }
-#endif
-
- // Get the timeout for running a test in milliseconds.
- int layoutTestTimeout() { return m_timeout; }
- int layoutTestTimeoutForWatchDog() { return layoutTestTimeout() + 1000; }
- void setLayoutTestTimeout(int timeout) { m_timeout = timeout; }
-
- // V8 JavaScript stress test options.
- int stressOpt() { return m_stressOpt; }
- void setStressOpt(bool stressOpt) { m_stressOpt = stressOpt; }
- int stressDeopt() { return m_stressDeopt; }
- void setStressDeopt(int stressDeopt) { m_stressDeopt = stressDeopt; }
-
- // The JavaScript flags specified as a strings.
- std::string javaScriptFlags() { return m_javaScriptFlags; }
- void setJavaScriptFlags(std::string javaScriptFlags) { m_javaScriptFlags = javaScriptFlags; }
-
- // Set whether to dump when the loaded page has finished processing. This is used with multiple load
- // testing where we only want to have the output from the last load.
- void setDumpWhenFinished(bool dumpWhenFinished) { m_dumpWhenFinished = dumpWhenFinished; }
-
- void setIsDisplayingModalDialog(bool isDisplayingModalDialog) { m_isDisplayingModalDialog = isDisplayingModalDialog; }
- bool isDisplayingModalDialog() const { return m_isDisplayingModalDialog; }
-
- // Set whether the binary data output should be encoded in base64 text.
- void setEncodeBinary(bool encodeBinary) { m_printer.setEncodeBinary(encodeBinary); }
-
- WebViewHost* createNewWindow(const WebKit::WebURL&);
- void closeWindow(WebViewHost*);
- void closeRemainingWindows();
- int windowCount();
- static void resizeWindowForTest(WebViewHost*, const WebKit::WebURL&);
-
- void showDevTools();
- void closeDevTools();
-
- DRTDevToolsAgent* drtDevToolsAgent() { return m_drtDevToolsAgent.get(); }
- DRTDevToolsClient* drtDevToolsClient() { return m_drtDevToolsClient.get(); }
- WebViewHost* devToolsWebView() { return m_devTools; }
-
- static const int virtualWindowBorder = 3;
-
- typedef Vector<WebViewHost*> WindowList;
- WindowList windowList() const { return m_windowList; }
-
- // Returns a string representation of an URL's spec that does not depend on
- // the location of the layout test in the file system.
- std::string normalizeLayoutTestURL(const std::string&);
-
-private:
- WebViewHost* createNewWindow(const WebKit::WebURL&, DRTDevToolsAgent*);
- void createMainWindow();
- void createDRTDevToolsClient(DRTDevToolsAgent*);
-
- void resetWebSettings(WebKit::WebView&);
- void dump();
- std::string dumpAllBackForwardLists();
- void dumpImage(SkCanvas*) const;
-
- bool m_testIsPending;
- bool m_testIsPreparing;
- bool m_isLoading;
- WebKit::WebView* m_webView;
- WebKit::WebWidget* m_focusedWidget;
- WebViewHost* m_devTools;
-
- // Be careful of the destruction order of the following objects.
- TestEventPrinter m_printer;
- OwnPtr<WebPermissions> m_webPermissions;
- OwnPtr<DRTDevToolsAgent> m_drtDevToolsAgent;
- OwnPtr<DRTDevToolsClient> m_drtDevToolsClient;
- OwnPtr<WebTestRunner::WebTestInterfaces> m_testInterfaces;
- OwnPtr<DRTTestRunner> m_testRunner;
-#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
- OwnPtr<NotificationPresenter> m_notificationPresenter;
-#endif
- // It's important that this thread is destroyed after the WebViewHost.
- OwnPtr<WebKit::WebThread> m_webCompositorThread;
- OwnPtr<WebViewHost> m_webViewHost;
-#if ENABLE(LINK_PRERENDER)
- OwnPtr<MockWebPrerenderingSupport> m_prerenderingSupport;
-#endif
-
- TestParams m_params;
- bool m_dumpPixelsForCurrentTest;
- int m_timeout; // timeout value in millisecond
- bool m_allowExternalPages;
- bool m_acceleratedCompositingForVideoEnabled;
- bool m_acceleratedCompositingForFixedPositionEnabled;
- bool m_softwareCompositingEnabled;
- bool m_threadedCompositingEnabled;
- bool m_forceCompositingMode;
- bool m_accelerated2dCanvasEnabled;
- bool m_deferred2dCanvasEnabled;
- bool m_acceleratedPaintingEnabled;
- bool m_perTilePaintingEnabled;
- bool m_acceleratedAnimationEnabled;
- bool m_deferredImageDecodingEnabled;
- WebPreferences m_prefs;
- bool m_stressOpt;
- bool m_stressDeopt;
- std::string m_javaScriptFlags;
- bool m_dumpWhenFinished;
- bool m_isDisplayingModalDialog;
-
-
- // List of all windows in this process.
- // The main window should be put into windowList[0].
- WindowList m_windowList;
-
-#if defined(OS_WIN)
- // Used by the watchdog to know when it's finished.
- HANDLE m_finishedEvent;
-#endif
-};
-
-void platformInit(int*, char***);
-void openStartupDialog();
-bool checkLayoutTestSystemDependencies();
-
-#endif // TestShell_h
diff --git a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp b/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
deleted file mode 100644
index 1a327bb85..000000000
--- a/Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "linux/WebFontRendering.h"
-#include "third_party/skia/include/ports/SkTypeface_android.h"
-
-namespace {
-
-// Must be same as DEVICE_DRT_DIR in Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py.
-#define DEVICE_DRT_DIR "/data/local/tmp/drt/"
-
-const char fontMainConfigFile[] = DEVICE_DRT_DIR "android_main_fonts.xml";
-const char fontFallbackConfigFile[] = DEVICE_DRT_DIR "android_fallback_fonts.xml";
-const char fontsDir[] = DEVICE_DRT_DIR "fonts/";
-
-} // namespace
-
-void platformInit(int* argc, char*** argv)
-{
- // Initialize skia with customized font config files.
- SkUseTestFontConfigFile(fontMainConfigFile, fontFallbackConfigFile, fontsDir);
-
- // Disable auto hint and use normal hinting in layout test mode to produce the same font metrics as chromium-linux.
- WebKit::WebFontRendering::setAutoHint(false);
- WebKit::WebFontRendering::setHinting(SkPaint::kNormal_Hinting);
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShellMac.mm b/Tools/DumpRenderTree/chromium/TestShellMac.mm
deleted file mode 100644
index d79a8c835..000000000
--- a/Tools/DumpRenderTree/chromium/TestShellMac.mm
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-
-#include "TestShell.h"
-#include "WebThemeEngineDRTMac.h"
-#include "webkit/support/webkit_support.h"
-#import <AppKit/AppKit.h>
-
-static WebThemeEngineDRTMac themeEngine;
-
-// A class to be the target/selector of the "watchdog" thread that ensures
-// pages timeout if they take too long and tells the test harness via stdout.
-@interface WatchDogTarget : NSObject {
-@private
- NSTimeInterval _timeout;
-}
-// |timeout| is in seconds
-- (id)initWithTimeout:(NSTimeInterval)timeout;
-// serves as the "run" method of a NSThread.
-- (void)run:(id)sender;
-@end
-
-@implementation WatchDogTarget
-
-- (id)initWithTimeout:(NSTimeInterval)timeout
-{
- if ((self = [super init]))
- _timeout = timeout;
- return self;
-}
-
-- (void)run:(id)ignore
-{
- NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
-
- // check for debugger, just bail if so. We don't want the timeouts hitting
- // when we're trying to track down an issue.
- if (webkit_support::BeingDebugged())
- return;
-
- NSThread* currentThread = [NSThread currentThread];
-
- // Wait to be cancelled. If we are that means the test finished. If it hasn't,
- // then we need to tell the layout script we timed out and start again.
- NSDate* limitDate = [NSDate dateWithTimeIntervalSinceNow:_timeout];
- while ([(NSDate*)[NSDate date] compare:limitDate] == NSOrderedAscending &&
- ![currentThread isCancelled]) {
- // sleep for a small increment then check again
- NSDate* incrementDate = [NSDate dateWithTimeIntervalSinceNow:1.0];
- [NSThread sleepUntilDate:incrementDate];
- }
- if (![currentThread isCancelled]) {
- // Print a warning to be caught by the layout-test script.
- // Note: the layout test driver may or may not recognize
- // this as a timeout.
- puts("#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- exit(0);
- }
-
- [pool release];
-}
-
-@end
-
-void TestShell::waitTestFinished()
-{
- ASSERT(!m_testIsPending);
-
- m_testIsPending = true;
-
- // Create a watchdog thread which just sets a timer and
- // kills the process if it times out. This catches really
- // bad hangs where the shell isn't coming back to the
- // message loop. If the watchdog is what catches a
- // timeout, it can't do anything except terminate the test
- // shell, which is unfortunate.
- // Windows multiplies by 2.5, but that causes us to run for far, far too
- // long. We use the passed value and let the scripts flag override
- // the value as needed.
- NSTimeInterval timeoutSeconds = layoutTestTimeoutForWatchDog() / 1000;
- WatchDogTarget* watchdog = [[[WatchDogTarget alloc]
- initWithTimeout:timeoutSeconds] autorelease];
- NSThread* thread = [[NSThread alloc] initWithTarget:watchdog
- selector:@selector(run:)
- object:nil];
- [thread start];
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (m_testIsPending)
- webkit_support::RunMessageLoop();
-
- // Tell the watchdog that we're finished. No point waiting to re-join, it'll
- // die on its own.
- [thread cancel];
- [thread release];
-}
-
-void platformInit(int*, char***)
-{
- webkit_support::SetThemeEngine(&themeEngine);
-}
-
-void openStartupDialog()
-{
- // FIXME: This code doesn't work. Need NSApplication event loop?
- NSAlert* alert = [[[NSAlert alloc] init] autorelease];
- alert.messageText = @"Attach to me?";
- alert.informativeText = @"This would probably be a good time to attach your debugger.";
- [alert addButtonWithTitle:@"OK"];
- [alert runModal];
-}
-
-bool checkLayoutTestSystemDependencies()
-{
- return true;
-}
-
diff --git a/Tools/DumpRenderTree/chromium/TestShellPosix.cpp b/Tools/DumpRenderTree/chromium/TestShellPosix.cpp
deleted file mode 100644
index a6d8a541c..000000000
--- a/Tools/DumpRenderTree/chromium/TestShellPosix.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "webkit/support/webkit_support.h"
-
-#include <signal.h>
-#include <unistd.h>
-
-static void AlarmHandler(int)
-{
- // If the alarm alarmed, kill the process since we have a really bad hang.
- puts("\n#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- exit(0);
-}
-
-void TestShell::waitTestFinished()
-{
- ASSERT(!m_testIsPending);
- m_testIsPending = true;
-
- // Install an alarm signal handler that will kill us if we time out.
- struct sigaction alarmAction;
- alarmAction.sa_handler = AlarmHandler;
- sigemptyset(&alarmAction.sa_mask);
- alarmAction.sa_flags = 0;
-
- struct sigaction oldAction;
- sigaction(SIGALRM, &alarmAction, &oldAction);
- alarm(layoutTestTimeoutForWatchDog() / 1000);
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (m_testIsPending)
- webkit_support::RunMessageLoop();
-
- // Remove the alarm.
- alarm(0);
- sigaction(SIGALRM, &oldAction, 0);
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShellWin.cpp b/Tools/DumpRenderTree/chromium/TestShellWin.cpp
deleted file mode 100644
index 083d54a1b..000000000
--- a/Tools/DumpRenderTree/chromium/TestShellWin.cpp
+++ /dev/null
@@ -1,217 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include "WebThemeEngineDRTWin.h"
-#include "webkit/support/webkit_support.h"
-#include <fcntl.h>
-#include <io.h>
-#include <list>
-#include <process.h>
-#include <shlwapi.h>
-#include <string>
-#include <sys/stat.h>
-#include <windows.h>
-
-#define SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(structName, member) \
- offsetof(structName, member) + \
- (sizeof static_cast<structName*>(0)->member)
-#define NONCLIENTMETRICS_SIZE_PRE_VISTA \
- SIZEOF_STRUCT_WITH_SPECIFIED_LAST_MEMBER(NONCLIENTMETRICS, lfMessageFont)
-
-// Theme engine
-static WebThemeEngineDRTWin themeEngine;
-
-// Thread main to run for the thread which just tests for timeout.
-unsigned int __stdcall watchDogThread(void* arg)
-{
- // If we're debugging a layout test, don't timeout.
- if (::IsDebuggerPresent())
- return 0;
-
- TestShell* shell = static_cast<TestShell*>(arg);
- // FIXME: Do we need user-specified time settings as with the original
- // Chromium implementation?
- DWORD timeout = static_cast<DWORD>(shell->layoutTestTimeoutForWatchDog());
- DWORD rv = WaitForSingleObject(shell->finishedEvent(), timeout);
- if (rv == WAIT_TIMEOUT) {
- // Print a warning to be caught by the layout-test script.
- // Note: the layout test driver may or may not recognize
- // this as a timeout.
- puts("\n#TEST_TIMED_OUT\n");
- puts("#EOF\n");
- fflush(stdout);
- TerminateProcess(GetCurrentProcess(), 0);
- }
- // Finished normally.
- return 0;
-}
-
-void TestShell::waitTestFinished()
-{
- ASSERT(!m_testIsPending);
-
- m_testIsPending = true;
-
- // Create a watchdog thread which just sets a timer and
- // kills the process if it times out. This catches really
- // bad hangs where the shell isn't coming back to the
- // message loop. If the watchdog is what catches a
- // timeout, it can't do anything except terminate the test
- // shell, which is unfortunate.
- m_finishedEvent = CreateEvent(0, TRUE, FALSE, 0);
- ASSERT(m_finishedEvent);
-
- HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(
- 0,
- 0,
- &watchDogThread,
- this,
- 0,
- 0));
- ASSERT(threadHandle);
-
- // TestFinished() will post a quit message to break this loop when the page
- // finishes loading.
- while (m_testIsPending)
- webkit_support::RunMessageLoop();
-
- // Tell the watchdog that we are finished.
- SetEvent(m_finishedEvent);
-
- // Wait to join the watchdog thread. (up to 1s, then quit)
- WaitForSingleObject(threadHandle, 1000);
-}
-
-void platformInit(int*, char***)
-{
- // Set stdout/stderr binary mode.
- _setmode(_fileno(stdout), _O_BINARY);
- _setmode(_fileno(stderr), _O_BINARY);
-
- // Set theme engine.
- webkit_support::SetThemeEngine(&themeEngine);
-
- // Load Ahem font.
- // AHEM____.TTF is copied to the directory of DumpRenderTree.exe by WebKit.gyp.
- WCHAR path[_MAX_PATH];
- if (!::GetModuleFileName(0, path, _MAX_PATH)) {
- fprintf(stderr, "Can't get the module path.\n");
- exit(1);
- }
- ::PathRemoveFileSpec(path);
- wcscat_s(path, _MAX_PATH, L"/AHEM____.TTF");
- struct _stat ahemStat;
- if (_wstat(path, &ahemStat) == -1) {
- fprintf(stderr, "Can't access: '%S'\n", path);
- exit(1);
- }
-
- FILE* fp = _wfopen(path, L"rb");
- if (!fp) {
- _wperror(path);
- exit(1);
- }
- size_t size = ahemStat.st_size;
- char* fontBuffer = new char[size];
- if (fread(fontBuffer, 1, size, fp) != size) {
- fprintf(stderr, "Can't read the font: '%S'\n", path);
- fclose(fp);
- exit(1);
- }
- fclose(fp);
- DWORD numFonts = 1;
- HANDLE fontHandle = ::AddFontMemResourceEx(fontBuffer, size, 0, &numFonts);
- delete[] fontBuffer; // OS owns a copy of the buffer.
- if (!fontHandle) {
- fprintf(stderr, "Failed to register Ahem font: '%S'\n", path);
- exit(1);
- }
- // We don't need to release the font explicitly.
-}
-
-void openStartupDialog()
-{
- ::MessageBox(0, L"Attach to me?", L"DumpRenderTree", MB_OK);
-}
-
-bool checkLayoutTestSystemDependencies()
-{
- // This metric will be 17 when font size is "Normal".
- // The size of drop-down menus depends on it.
- int verticalScrollSize = ::GetSystemMetrics(SM_CXVSCROLL);
- int requiredVScrollSize = 17;
- std::list<std::string> errors;
- if (verticalScrollSize != requiredVScrollSize)
- errors.push_back("Must use normal size fonts (96 dpi).");
-
- // ClearType must be disabled, because the rendering is unpredictable.
- BOOL fontSmoothingEnabled;
- ::SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &fontSmoothingEnabled, 0);
- int fontSmoothingType;
- ::SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &fontSmoothingType, 0);
- if (fontSmoothingEnabled && (fontSmoothingType == FE_FONTSMOOTHINGCLEARTYPE))
- errors.push_back("ClearType must be disabled.");
-
- // Check that we're using the default system fonts.
- OSVERSIONINFO versionInfo = {0};
- versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
- ::GetVersionEx(&versionInfo);
- const bool isVistaOrLater = (versionInfo.dwMajorVersion >= 6);
- NONCLIENTMETRICS metrics = {0};
- metrics.cbSize = isVistaOrLater ? (sizeof NONCLIENTMETRICS) : NONCLIENTMETRICS_SIZE_PRE_VISTA;
- const bool success = !!::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, metrics.cbSize, &metrics, 0);
- ASSERT(success);
- LOGFONTW* systemFonts[] =
- {&metrics.lfStatusFont, &metrics.lfMenuFont, &metrics.lfSmCaptionFont};
- const wchar_t* const requiredFont = isVistaOrLater ? L"Segoe UI" : L"Tahoma";
- const int requiredFontSize = isVistaOrLater ? -12 : -11;
- for (size_t i = 0; i < arraysize(systemFonts); ++i) {
- if (systemFonts[i]->lfHeight != requiredFontSize || wcscmp(requiredFont, systemFonts[i]->lfFaceName)) {
- errors.push_back(isVistaOrLater ? "Must use either the Aero or Basic theme." : "Must use the default XP theme (Luna).");
- break;
- }
- }
-
- if (!errors.empty()) {
- fprintf(stderr, "%s",
- "##################################################################\n"
- "## Layout test system dependencies check failed.\n"
- "##\n");
- for (std::list<std::string>::iterator it = errors.begin(); it != errors.end(); ++it)
- fprintf(stderr, "## %s\n", it->c_str());
- fprintf(stderr, "%s",
- "##\n"
- "##################################################################\n");
- }
- return errors.empty();
-}
diff --git a/Tools/DumpRenderTree/chromium/TestShellX11.cpp b/Tools/DumpRenderTree/chromium/TestShellX11.cpp
deleted file mode 100644
index 4b25aa34b..000000000
--- a/Tools/DumpRenderTree/chromium/TestShellX11.cpp
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "TestShell.h"
-
-#include <fontconfig/fontconfig.h>
-
-#if USE(GTK)
-#include <gtk/gtk.h>
-
-void openStartupDialog()
-{
- GtkWidget* dialog = gtk_message_dialog_new(
- 0, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, "Attach to me?");
- gtk_window_set_title(GTK_WINDOW(dialog), "DumpRenderTree");
- gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
- gtk_widget_destroy(dialog);
-}
-
-bool checkLayoutTestSystemDependencies()
-{
- return true;
-}
-#endif // USE(GTK)
-
-static bool checkAndLoadFontFile(FcConfig* fontcfg, const char* path1, const char* path2)
-{
- const char* font = path1;
- if (access(font, R_OK) < 0) {
- font = path2;
- if (access(font, R_OK) < 0) {
- fprintf(stderr, "You are missing %s or %s. Without this, some layout tests may fail. "
- "See http://code.google.com/p/chromium/wiki/LayoutTestsLinux "
- "for more.\n", path1, path2);
- return false;
- }
- }
- if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) font)) {
- fprintf(stderr, "Failed to load font %s\n", font);
- return false;
- }
- return true;
-}
-
-static void setupFontconfig()
-{
- // We wish to make the layout tests reproducable with respect to fonts. Skia
- // uses fontconfig to resolve font family names from WebKit into actual font
- // files found on the current system. This means that fonts vary based on the
- // system and also on the fontconfig configuration.
- //
- // To avoid this we initialise fontconfig here and install a configuration
- // which only knows about a few, select, fonts.
-
- // We have fontconfig parse a config file from our resources file. This
- // sets a number of aliases ("sans"->"Arial" etc), but doesn't include any
- // font directories.
- FcInit();
-
- char drtPath[PATH_MAX + 1];
- int drtPathSize = readlink("/proc/self/exe", drtPath, PATH_MAX);
- if (drtPathSize < 0 || drtPathSize > PATH_MAX) {
- fputs("Unable to resolve /proc/self/exe.", stderr);
- exit(1);
- }
- drtPath[drtPathSize] = 0;
- std::string drtDirPath(drtPath);
- size_t lastPathPos = drtDirPath.rfind("/");
- ASSERT(lastPathPos != std::string::npos);
- drtDirPath.erase(lastPathPos + 1);
-
- FcConfig* fontcfg = FcConfigCreate();
- std::string fontconfigPath = drtDirPath + "fonts.conf";
- if (!FcConfigParseAndLoad(fontcfg, reinterpret_cast<const FcChar8*>(fontconfigPath.c_str()), true)) {
- fputs("Failed to parse fontconfig config file\n", stderr);
- exit(1);
- }
-
- // This is the list of fonts that fontconfig will know about. It
- // will try its best to match based only on the fonts here in. The
- // paths are where these fonts are found on our Ubuntu boxes.
- static const char *const fonts[] = {
- "/usr/share/fonts/truetype/kochi/kochi-gothic.ttf",
- "/usr/share/fonts/truetype/kochi/kochi-mincho.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Arial_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Courier_New_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Georgia_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Impact.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Trebuchet_MS_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Times_New_Roman_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold_Italic.ttf",
- "/usr/share/fonts/truetype/msttcorefonts/Verdana_Italic.ttf",
- // The DejaVuSans font is used by the css2.1 tests.
- "/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf",
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_hi.ttf",
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_ta.ttf",
- "/usr/share/fonts/truetype/ttf-indic-fonts-core/MuktiNarrow.ttf",
- };
- for (size_t i = 0; i < arraysize(fonts); ++i) {
- if (access(fonts[i], R_OK)) {
- fprintf(stderr, "You are missing %s. Try re-running build/install-build-deps.sh. Also see "
- "http://code.google.com/p/chromium/wiki/LayoutTestsLinux",
- fonts[i]);
- exit(1);
- }
- if (!FcConfigAppFontAddFile(fontcfg, (FcChar8 *) fonts[i])) {
- fprintf(stderr, "Failed to load font %s\n", fonts[i]);
- exit(1);
- }
- }
-
- if (!checkAndLoadFontFile(fontcfg, "/usr/share/fonts/truetype/thai/Garuda.ttf",
- "/usr/share/fonts/truetype/tlwg/Garuda.ttf"))
- exit(1);
-
- // We special case these fonts because they're only needed in a
- // few layout tests.
- checkAndLoadFontFile(fontcfg, "/usr/share/fonts/truetype/ttf-indic-fonts-core/lohit_pa.ttf",
- "/usr/share/fonts/truetype/ttf-punjabi-fonts/lohit_pa.ttf");
-
- // Also load the layout-test-specific "Ahem" font.
- std::string ahemPath = drtDirPath + "AHEM____.TTF";
- if (!FcConfigAppFontAddFile(fontcfg, reinterpret_cast<const FcChar8*>(ahemPath.c_str()))) {
- fprintf(stderr, "Failed to load font %s\n", ahemPath.c_str());
- exit(1);
- }
-
- if (!FcConfigSetCurrent(fontcfg)) {
- fputs("Failed to set the default font configuration\n", stderr);
- exit(1);
- }
-}
-
-void platformInit(int* argc, char*** argv)
-{
- // FIXME: It's better call gtk_init() only when we run plugin tests.
- // See http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/633ea167cde196ca#
-#if USE(GTK)
- gtk_init(argc, argv);
-#endif
-
- setupFontconfig();
-}
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
deleted file mode 100644
index ea2fded18..000000000
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
+++ /dev/null
@@ -1,514 +0,0 @@
-/*
- * Copyright (C) 2011 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-#include "TestWebPlugin.h"
-
-#include "WebFrame.h"
-#include "WebInputEvent.h"
-#include "platform/WebGraphicsContext3D.h"
-#include "WebKit.h"
-#include "platform/WebKitPlatformSupport.h"
-#include "WebPluginContainer.h"
-#include "WebPluginParams.h"
-#include "WebTouchPoint.h"
-#include <wtf/Assertions.h>
-#include <wtf/text/CString.h>
-
-using namespace WebKit;
-
-// GLenum values copied from gl2.h.
-#define GL_FALSE 0
-#define GL_TRUE 1
-#define GL_ONE 1
-#define GL_TRIANGLES 0x0004
-#define GL_ONE_MINUS_SRC_ALPHA 0x0303
-#define GL_DEPTH_TEST 0x0B71
-#define GL_BLEND 0x0BE2
-#define GL_SCISSOR_TEST 0x0B90
-#define GL_TEXTURE_2D 0x0DE1
-#define GL_FLOAT 0x1406
-#define GL_RGBA 0x1908
-#define GL_UNSIGNED_BYTE 0x1401
-#define GL_TEXTURE_MAG_FILTER 0x2800
-#define GL_TEXTURE_MIN_FILTER 0x2801
-#define GL_TEXTURE_WRAP_S 0x2802
-#define GL_TEXTURE_WRAP_T 0x2803
-#define GL_NEAREST 0x2600
-#define GL_COLOR_BUFFER_BIT 0x4000
-#define GL_CLAMP_TO_EDGE 0x812F
-#define GL_ARRAY_BUFFER 0x8892
-#define GL_STATIC_DRAW 0x88E4
-#define GL_FRAGMENT_SHADER 0x8B30
-#define GL_VERTEX_SHADER 0x8B31
-#define GL_COMPILE_STATUS 0x8B81
-#define GL_LINK_STATUS 0x8B82
-#define GL_COLOR_ATTACHMENT0 0x8CE0
-#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
-#define GL_FRAMEBUFFER 0x8D40
-
-static void premultiplyAlpha(const unsigned colorIn[3], float alpha, float colorOut[4])
-{
- for (int i = 0; i < 3; ++i)
- colorOut[i] = (colorIn[i] / 255.0f) * alpha;
-
- colorOut[3] = alpha;
-}
-
-static const char* pointState(WebKit::WebTouchPoint::State state)
-{
- switch (state) {
- case WebKit::WebTouchPoint::StateReleased:
- return "Released";
- case WebKit::WebTouchPoint::StatePressed:
- return "Pressed";
- case WebKit::WebTouchPoint::StateMoved:
- return "Moved";
- case WebKit::WebTouchPoint::StateCancelled:
- return "Cancelled";
- default:
- return "Unknown";
- }
-
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-static void printTouchList(const WebKit::WebTouchPoint* points, int length)
-{
- for (int i = 0; i < length; ++i)
- printf("* %d, %d: %s\n", points[i].position.x, points[i].position.y, pointState(points[i].state));
-}
-
-static void printEventDetails(const WebKit::WebInputEvent& event)
-{
- if (WebKit::WebInputEvent::isTouchEventType(event.type)) {
- const WebKit::WebTouchEvent& touch = static_cast<const WebKit::WebTouchEvent&>(event);
- printTouchList(touch.touches, touch.touchesLength);
- printTouchList(touch.changedTouches, touch.changedTouchesLength);
- printTouchList(touch.targetTouches, touch.targetTouchesLength);
- } else if (WebKit::WebInputEvent::isMouseEventType(event.type) || event.type == WebKit::WebInputEvent::MouseWheel) {
- const WebKit::WebMouseEvent& mouse = static_cast<const WebKit::WebMouseEvent&>(event);
- printf("* %d, %d\n", mouse.x, mouse.y);
- } else if (WebKit::WebInputEvent::isGestureEventType(event.type)) {
- const WebKit::WebGestureEvent& gesture = static_cast<const WebKit::WebGestureEvent&>(event);
- printf("* %d, %d\n", gesture.x, gesture.y);
- }
-}
-
-static WebKit::WebPluginContainer::TouchEventRequestType parseTouchEventRequestType(const WebString& string)
-{
- DEFINE_STATIC_LOCAL(const WebString, kPrimitiveRaw, (WebString::fromUTF8("raw")));
- DEFINE_STATIC_LOCAL(const WebString, kPrimitiveSynthetic, (WebString::fromUTF8("synthetic")));
-
- if (string == kPrimitiveRaw)
- return WebKit::WebPluginContainer::TouchEventRequestTypeRaw;
- if (string == kPrimitiveSynthetic)
- return WebKit::WebPluginContainer::TouchEventRequestTypeSynthesizedMouse;
- return WebKit::WebPluginContainer::TouchEventRequestTypeNone;
-}
-
-TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame,
- const WebKit::WebPluginParams& params)
- : m_frame(frame)
- , m_container(0)
- , m_context(0)
- , m_touchEventRequest(WebKit::WebPluginContainer::TouchEventRequestTypeNone)
- , m_printEventDetails(false)
- , m_canProcessDrag(false)
-{
- static const WebString kAttributePrimitive = WebString::fromUTF8("primitive");
- static const WebString kAttributeBackgroundColor = WebString::fromUTF8("background-color");
- static const WebString kAttributePrimitiveColor = WebString::fromUTF8("primitive-color");
- static const WebString kAttributeOpacity = WebString::fromUTF8("opacity");
- static const WebString kAttributeAcceptsTouch = WebString::fromUTF8("accepts-touch");
- static const WebString kAttributePrintEventDetails = WebString::fromUTF8("print-event-details");
- static const WebString kAttributeCanProcessDrag = WebString::fromUTF8("can-process-drag");
-
- ASSERT(params.attributeNames.size() == params.attributeValues.size());
- size_t size = params.attributeNames.size();
- for (size_t i = 0; i < size; ++i) {
- const WebString& attributeName = params.attributeNames[i];
- const WebString& attributeValue = params.attributeValues[i];
-
- if (attributeName == kAttributePrimitive)
- m_scene.primitive = parsePrimitive(attributeValue);
- else if (attributeName == kAttributeBackgroundColor)
- parseColor(attributeValue, m_scene.backgroundColor);
- else if (attributeName == kAttributePrimitiveColor)
- parseColor(attributeValue, m_scene.primitiveColor);
- else if (attributeName == kAttributeOpacity)
- m_scene.opacity = parseOpacity(attributeValue);
- else if (attributeName == kAttributeAcceptsTouch)
- m_touchEventRequest = parseTouchEventRequestType(attributeValue);
- else if (attributeName == kAttributePrintEventDetails)
- m_printEventDetails = parseBoolean(attributeValue);
- else if (attributeName == kAttributeCanProcessDrag)
- m_canProcessDrag = parseBoolean(attributeValue);
- }
-}
-
-TestWebPlugin::~TestWebPlugin()
-{
-}
-
-const WebString& TestWebPlugin::mimeType()
-{
- static const WebString kMimeType = WebString::fromUTF8("application/x-webkit-test-webplugin");
- return kMimeType;
-}
-
-bool TestWebPlugin::initialize(WebPluginContainer* container)
-{
- WebGraphicsContext3D::Attributes attrs;
- m_context = webKitPlatformSupport()->createOffscreenGraphicsContext3D(attrs);
- if (!m_context)
- return false;
-
- if (!m_context->makeContextCurrent())
- return false;
-
- if (!initScene())
- return false;
-
- m_container = container;
- m_container->setBackingTextureId(m_colorTexture);
- m_container->requestTouchEventType(m_touchEventRequest);
- m_container->setWantsWheelEvents(true);
- return true;
-}
-
-void TestWebPlugin::destroy()
-{
- destroyScene();
-
- delete m_context;
- m_context = 0;
-
- m_container = 0;
- m_frame = 0;
-}
-
-void TestWebPlugin::updateGeometry(const WebRect& frameRect,
- const WebRect& clipRect,
- const WebVector<WebRect>& cutOutsRects,
- bool isVisible)
-{
- if (clipRect == m_rect)
- return;
- m_rect = clipRect;
- if (m_rect.isEmpty())
- return;
-
- m_context->reshape(m_rect.width, m_rect.height);
- m_context->viewport(0, 0, m_rect.width, m_rect.height);
-
- m_context->bindTexture(GL_TEXTURE_2D, m_colorTexture);
- m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- m_context->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- m_context->texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_rect.width, m_rect.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- m_context->bindFramebuffer(GL_FRAMEBUFFER, m_framebuffer);
- m_context->framebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_colorTexture, 0);
-
- drawScene();
-
- m_context->flush();
- m_container->commitBackingTexture();
-}
-
-TestWebPlugin::Primitive TestWebPlugin::parsePrimitive(const WebString& string)
-{
- static const WebString kPrimitiveNone = WebString::fromUTF8("none");
- static const WebString kPrimitiveTriangle = WebString::fromUTF8("triangle");
-
- Primitive primitive = PrimitiveNone;
- if (string == kPrimitiveNone)
- primitive = PrimitiveNone;
- else if (string == kPrimitiveTriangle)
- primitive = PrimitiveTriangle;
- else
- ASSERT_NOT_REACHED();
- return primitive;
-}
-
-// FIXME: This method should already exist. Use it.
-// For now just parse primary colors.
-void TestWebPlugin::parseColor(const WebString& string, unsigned color[3])
-{
- color[0] = color[1] = color[2] = 0;
- if (string == "black")
- return;
-
- if (string == "red")
- color[0] = 255;
- else if (string == "green")
- color[1] = 255;
- else if (string == "blue")
- color[2] = 255;
- else
- ASSERT_NOT_REACHED();
-}
-
-float TestWebPlugin::parseOpacity(const WebString& string)
-{
- return static_cast<float>(atof(string.utf8().data()));
-}
-
-bool TestWebPlugin::parseBoolean(const WebString& string)
-{
- static const WebString kPrimitiveTrue = WebString::fromUTF8("true");
- return string == kPrimitiveTrue;
-}
-
-bool TestWebPlugin::initScene()
-{
- float color[4];
- premultiplyAlpha(m_scene.backgroundColor, m_scene.opacity, color);
-
- m_colorTexture = m_context->createTexture();
- m_framebuffer = m_context->createFramebuffer();
-
- m_context->viewport(0, 0, m_rect.width, m_rect.height);
- m_context->disable(GL_DEPTH_TEST);
- m_context->disable(GL_SCISSOR_TEST);
-
- m_context->clearColor(color[0], color[1], color[2], color[3]);
-
- m_context->enable(GL_BLEND);
- m_context->blendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
-
- return m_scene.primitive != PrimitiveNone ? initProgram() && initPrimitive() : true;
-}
-
-void TestWebPlugin::drawScene()
-{
- m_context->viewport(0, 0, m_rect.width, m_rect.height);
- m_context->clear(GL_COLOR_BUFFER_BIT);
-
- if (m_scene.primitive != PrimitiveNone)
- drawPrimitive();
-}
-
-void TestWebPlugin::destroyScene()
-{
- if (m_scene.program) {
- m_context->deleteProgram(m_scene.program);
- m_scene.program = 0;
- }
- if (m_scene.vbo) {
- m_context->deleteBuffer(m_scene.vbo);
- m_scene.vbo = 0;
- }
-
- if (m_framebuffer) {
- m_context->deleteFramebuffer(m_framebuffer);
- m_framebuffer = 0;
- }
-
- if (m_colorTexture) {
- m_context->deleteTexture(m_colorTexture);
- m_colorTexture = 0;
- }
-}
-
-bool TestWebPlugin::initProgram()
-{
- const CString vertexSource(
- "attribute vec4 position; \n"
- "void main() { \n"
- " gl_Position = position; \n"
- "} \n"
- );
-
- const CString fragmentSource(
- "precision mediump float; \n"
- "uniform vec4 color; \n"
- "void main() { \n"
- " gl_FragColor = color; \n"
- "} \n"
- );
-
- m_scene.program = loadProgram(vertexSource, fragmentSource);
- if (!m_scene.program)
- return false;
-
- m_scene.colorLocation = m_context->getUniformLocation(m_scene.program, "color");
- m_scene.positionLocation = m_context->getAttribLocation(m_scene.program, "position");
- return true;
-}
-
-bool TestWebPlugin::initPrimitive()
-{
- ASSERT(m_scene.primitive == PrimitiveTriangle);
-
- m_scene.vbo = m_context->createBuffer();
- if (!m_scene.vbo)
- return false;
-
- const float vertices[] = { 0.0f, 0.8f, 0.0f,
- -0.8f, -0.8f, 0.0f,
- 0.8f, -0.8f, 0.0f };
- m_context->bindBuffer(GL_ARRAY_BUFFER, m_scene.vbo);
- m_context->bufferData(GL_ARRAY_BUFFER, sizeof(vertices), 0, GL_STATIC_DRAW);
- m_context->bufferSubData(GL_ARRAY_BUFFER, 0, sizeof(vertices), vertices);
- return true;
-}
-
-void TestWebPlugin::drawPrimitive()
-{
- ASSERT(m_scene.primitive == PrimitiveTriangle);
- ASSERT(m_scene.vbo);
- ASSERT(m_scene.program);
-
- m_context->useProgram(m_scene.program);
-
- // Bind primitive color.
- float color[4];
- premultiplyAlpha(m_scene.primitiveColor, m_scene.opacity, color);
- m_context->uniform4f(m_scene.colorLocation, color[0], color[1], color[2], color[3]);
-
- // Bind primitive vertices.
- m_context->bindBuffer(GL_ARRAY_BUFFER, m_scene.vbo);
- m_context->enableVertexAttribArray(m_scene.positionLocation);
- m_context->vertexAttribPointer(m_scene.positionLocation, 3, GL_FLOAT, GL_FALSE, 0, 0);
- m_context->drawArrays(GL_TRIANGLES, 0, 3);
-}
-
-unsigned TestWebPlugin::loadShader(unsigned type, const CString& source)
-{
- unsigned shader = m_context->createShader(type);
- if (shader) {
- m_context->shaderSource(shader, source.data());
- m_context->compileShader(shader);
-
- int compiled = 0;
- m_context->getShaderiv(shader, GL_COMPILE_STATUS, &compiled);
- if (!compiled) {
- m_context->deleteShader(shader);
- shader = 0;
- }
- }
- return shader;
-}
-
-unsigned TestWebPlugin::loadProgram(const CString& vertexSource,
- const CString& fragmentSource)
-{
- unsigned vertexShader = loadShader(GL_VERTEX_SHADER, vertexSource);
- unsigned fragmentShader = loadShader(GL_FRAGMENT_SHADER, fragmentSource);
- unsigned program = m_context->createProgram();
- if (vertexShader && fragmentShader && program) {
- m_context->attachShader(program, vertexShader);
- m_context->attachShader(program, fragmentShader);
- m_context->linkProgram(program);
-
- int linked = 0;
- m_context->getProgramiv(program, GL_LINK_STATUS, &linked);
- if (!linked) {
- m_context->deleteProgram(program);
- program = 0;
- }
- }
- if (vertexShader)
- m_context->deleteShader(vertexShader);
- if (fragmentShader)
- m_context->deleteShader(fragmentShader);
-
- return program;
-}
-
-bool TestWebPlugin::handleInputEvent(const WebKit::WebInputEvent& event, WebKit::WebCursorInfo& info)
-{
- const char* eventName = 0;
- switch (event.type) {
- case WebKit::WebInputEvent::Undefined: eventName = "unknown"; break;
-
- case WebKit::WebInputEvent::MouseDown: eventName = "MouseDown"; break;
- case WebKit::WebInputEvent::MouseUp: eventName = "MouseUp"; break;
- case WebKit::WebInputEvent::MouseMove: eventName = "MouseMove"; break;
- case WebKit::WebInputEvent::MouseEnter: eventName = "MouseEnter"; break;
- case WebKit::WebInputEvent::MouseLeave: eventName = "MouseLeave"; break;
- case WebKit::WebInputEvent::ContextMenu: eventName = "ContextMenu"; break;
-
- case WebKit::WebInputEvent::MouseWheel: eventName = "MouseWheel"; break;
-
- case WebKit::WebInputEvent::RawKeyDown: eventName = "RawKeyDown"; break;
- case WebKit::WebInputEvent::KeyDown: eventName = "KeyDown"; break;
- case WebKit::WebInputEvent::KeyUp: eventName = "KeyUp"; break;
- case WebKit::WebInputEvent::Char: eventName = "Char"; break;
-
- case WebKit::WebInputEvent::GestureScrollBegin: eventName = "GestureScrollBegin"; break;
- case WebKit::WebInputEvent::GestureScrollEnd: eventName = "GestureScrollEnd"; break;
- case WebKit::WebInputEvent::GestureScrollUpdate: eventName = "GestureScrollUpdate"; break;
- case WebKit::WebInputEvent::GestureFlingStart: eventName = "GestureFlingStart"; break;
- case WebKit::WebInputEvent::GestureFlingCancel: eventName = "GestureFlingCancel"; break;
- case WebKit::WebInputEvent::GestureTap: eventName = "GestureTap"; break;
- case WebKit::WebInputEvent::GestureTapDown: eventName = "GestureTapDown"; break;
- case WebKit::WebInputEvent::GestureTapCancel: eventName = "GestureTapCancel"; break;
- case WebKit::WebInputEvent::GestureDoubleTap: eventName = "GestureDoubleTap"; break;
- case WebKit::WebInputEvent::GestureTwoFingerTap: eventName = "GestureTwoFingerTap"; break;
- case WebKit::WebInputEvent::GestureLongPress: eventName = "GestureLongPress"; break;
- case WebKit::WebInputEvent::GestureLongTap: eventName = "GestureLongTap"; break;
- case WebKit::WebInputEvent::GesturePinchBegin: eventName = "GesturePinchBegin"; break;
- case WebKit::WebInputEvent::GesturePinchEnd: eventName = "GesturePinchEnd"; break;
- case WebKit::WebInputEvent::GesturePinchUpdate: eventName = "GesturePinchUpdate"; break;
-
- case WebKit::WebInputEvent::TouchStart: eventName = "TouchStart"; break;
- case WebKit::WebInputEvent::TouchMove: eventName = "TouchMove"; break;
- case WebKit::WebInputEvent::TouchEnd: eventName = "TouchEnd"; break;
- case WebKit::WebInputEvent::TouchCancel: eventName = "TouchCancel"; break;
- }
-
- printf("Plugin received event: %s\n", eventName ? eventName : "unknown");
- if (m_printEventDetails)
- printEventDetails(event);
- return false;
-}
-
-bool TestWebPlugin::handleDragStatusUpdate(WebKit::WebDragStatus dragStatus, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebPoint& position, const WebKit::WebPoint& screenPosition)
-{
- const char* dragStatusName = 0;
- switch (dragStatus) {
- case WebKit::WebDragStatusEnter:
- dragStatusName = "DragEnter";
- break;
- case WebKit::WebDragStatusOver:
- dragStatusName = "DragOver";
- break;
- case WebKit::WebDragStatusLeave:
- dragStatusName = "DragLeave";
- break;
- case WebKit::WebDragStatusDrop:
- dragStatusName = "DragDrop";
- break;
- case WebKit::WebDragStatusUnknown:
- ASSERT_NOT_REACHED();
- }
- printf("Plugin received event: %s\n", dragStatusName);
- return false;
-}
-
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.h b/Tools/DumpRenderTree/chromium/TestWebPlugin.h
deleted file mode 100644
index e6f5b47a4..000000000
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (C) 2011 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef TestWebPlugin_h
-#define TestWebPlugin_h
-
-#include "WebPlugin.h"
-#include "WebPluginContainer.h"
-#include "platform/WebRect.h"
-
-namespace WebKit {
-class WebGraphicsContext3D;
-}
-
-// A fake implemention of WebKit::WebPlugin for testing purposes.
-//
-// It uses WebGraphicsContext3D to paint a scene consisiting of a primitive
-// over a background. The primitive and background can be customized using
-// the following plugin parameters:
-// primitive: none (default), triangle.
-// background-color: black (default), red, green, blue.
-// primitive-color: black (default), red, green, blue.
-// opacity: [0.0 - 1.0]. Default is 1.0.
-//
-// Whether the plugin accepts touch events or not can be customized using the
-// 'accepts-touch' plugin parameter (defaults to false).
-class TestWebPlugin : public WebKit::WebPlugin {
-public:
- TestWebPlugin(WebKit::WebFrame*, const WebKit::WebPluginParams&);
- virtual ~TestWebPlugin();
-
- static const WebKit::WebString& mimeType();
-
- // WebPlugin methods:
- virtual bool initialize(WebKit::WebPluginContainer*);
- virtual void destroy();
- virtual NPObject* scriptableObject() { return 0; }
- virtual bool canProcessDrag() const { return m_canProcessDrag; }
- virtual void paint(WebKit::WebCanvas*, const WebKit::WebRect&) { }
- virtual void updateGeometry(const WebKit::WebRect& frameRect,
- const WebKit::WebRect& clipRect,
- const WebKit::WebVector<WebKit::WebRect>& cutOutsRects,
- bool isVisible);
- virtual void updateFocus(bool) { }
- virtual void updateVisibility(bool) { }
- virtual bool acceptsInputEvents() { return true; }
- virtual bool handleInputEvent(const WebKit::WebInputEvent&, WebKit::WebCursorInfo&);
- virtual bool handleDragStatusUpdate(WebKit::WebDragStatus, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebPoint& position, const WebKit::WebPoint& screenPosition);
- virtual void didReceiveResponse(const WebKit::WebURLResponse&) { }
- virtual void didReceiveData(const char* data, int dataLength) { }
- virtual void didFinishLoading() { }
- virtual void didFailLoading(const WebKit::WebURLError&) { }
- virtual void didFinishLoadingFrameRequest(const WebKit::WebURL&, void* notifyData) { }
- virtual void didFailLoadingFrameRequest(const WebKit::WebURL&, void* notifyData, const WebKit::WebURLError&) { }
- virtual bool isPlaceholder() { return false; }
-
-private:
- enum Primitive {
- PrimitiveNone,
- PrimitiveTriangle
- };
-
- struct Scene {
- Primitive primitive;
- unsigned backgroundColor[3];
- unsigned primitiveColor[3];
- float opacity;
-
- unsigned vbo;
- unsigned program;
- int colorLocation;
- int positionLocation;
-
- Scene()
- : primitive(PrimitiveNone)
- , opacity(1.0f) // Fully opaque.
- , vbo(0)
- , program(0)
- , colorLocation(-1)
- , positionLocation(-1)
- {
- backgroundColor[0] = backgroundColor[1] = backgroundColor[2] = 0;
- primitiveColor[0] = primitiveColor[1] = primitiveColor[2] = 0;
- }
- };
-
- // Functions for parsing plugin parameters.
- Primitive parsePrimitive(const WebKit::WebString&);
- void parseColor(const WebKit::WebString&, unsigned color[3]);
- float parseOpacity(const WebKit::WebString&);
- bool parseBoolean(const WebKit::WebString&);
-
- // Functions for loading and drawing scene.
- bool initScene();
- void drawScene();
- void destroyScene();
- bool initProgram();
- bool initPrimitive();
- void drawPrimitive();
- unsigned loadShader(unsigned type, const WTF::CString& source);
- unsigned loadProgram(const WTF::CString& vertexSource,
- const WTF::CString& fragmentSource);
-
- WebKit::WebFrame* m_frame;
- WebKit::WebPluginContainer* m_container;
-
- WebKit::WebRect m_rect;
- WebKit::WebGraphicsContext3D* m_context;
- unsigned m_colorTexture;
- unsigned m_framebuffer;
- Scene m_scene;
-
- WebKit::WebPluginContainer::TouchEventRequestType m_touchEventRequest;
- bool m_printEventDetails;
- bool m_canProcessDrag;
-};
-
-#endif // TestPepperPlugin_h
diff --git a/Tools/DumpRenderTree/chromium/WebPermissions.cpp b/Tools/DumpRenderTree/chromium/WebPermissions.cpp
deleted file mode 100644
index 2c7c9eee8..000000000
--- a/Tools/DumpRenderTree/chromium/WebPermissions.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#include "config.h"
-#include "WebPermissions.h"
-
-#include "DRTTestRunner.h"
-#include "TestShell.h"
-#include "platform/WebCString.h"
-#include "platform/WebURL.h"
-
-WebPermissions::WebPermissions(TestShell* shell)
- : m_shell(shell)
-{
- reset();
-}
-
-WebPermissions::~WebPermissions()
-{
-}
-
-bool WebPermissions::allowImage(WebKit::WebFrame*, bool enabledPerSettings, const WebKit::WebURL& imageURL)
-{
- bool allowed = enabledPerSettings && m_imagesAllowed;
- if (testRunner()->shouldDumpPermissionClientCallbacks())
- fprintf(stdout, "PERMISSION CLIENT: allowImage(%s): %s\n", m_shell->normalizeLayoutTestURL(imageURL.spec()).c_str(), allowed ? "true" : "false");
- return allowed;
-}
-
-bool WebPermissions::allowScriptFromSource(WebKit::WebFrame*, bool enabledPerSettings, const WebKit::WebURL& scriptURL)
-{
- bool allowed = enabledPerSettings && m_scriptsAllowed;
- if (testRunner()->shouldDumpPermissionClientCallbacks())
- fprintf(stdout, "PERMISSION CLIENT: allowScriptFromSource(%s): %s\n", m_shell->normalizeLayoutTestURL(scriptURL.spec()).c_str(), allowed ? "true" : "false");
- return allowed;
-}
-
-bool WebPermissions::allowStorage(WebKit::WebFrame*, bool)
-{
- return m_storageAllowed;
-}
-
-bool WebPermissions::allowPlugins(WebKit::WebFrame*, bool enabledPerSettings)
-{
- return enabledPerSettings && m_pluginsAllowed;
-}
-
-bool WebPermissions::allowDisplayingInsecureContent(WebKit::WebFrame*, bool enabledPerSettings,
- const WebKit::WebSecurityOrigin&, const WebKit::WebURL&)
-{
- return enabledPerSettings || m_displayingInsecureContentAllowed;
-}
-
-bool WebPermissions::allowRunningInsecureContent(WebKit::WebFrame*, bool enabledPerSettings,
- const WebKit::WebSecurityOrigin&, const WebKit::WebURL&)
-{
- return enabledPerSettings || m_runningInsecureContentAllowed;
-}
-
-void WebPermissions::setImagesAllowed(bool imagesAllowed)
-{
- m_imagesAllowed = imagesAllowed;
-}
-
-void WebPermissions::setScriptsAllowed(bool scriptsAllowed)
-{
- m_scriptsAllowed = scriptsAllowed;
-}
-
-void WebPermissions::setStorageAllowed(bool storageAllowed)
-{
- m_storageAllowed = storageAllowed;
-}
-
-void WebPermissions::setPluginsAllowed(bool pluginsAllowed)
-{
- m_pluginsAllowed = pluginsAllowed;
-}
-
-void WebPermissions::setDisplayingInsecureContentAllowed(bool allowed)
-{
- m_displayingInsecureContentAllowed = allowed;
-}
-
-void WebPermissions::setRunningInsecureContentAllowed(bool allowed)
-{
- m_runningInsecureContentAllowed = allowed;
-}
-
-void WebPermissions::reset()
-{
- m_imagesAllowed = true;
- m_scriptsAllowed = true;
- m_storageAllowed = true;
- m_pluginsAllowed = true;
- m_displayingInsecureContentAllowed = false;
- m_runningInsecureContentAllowed = false;
-}
-
-// Private functions ----------------------------------------------------------
-
-DRTTestRunner* WebPermissions::testRunner() const
-{
- return m_shell->testRunner();
-}
diff --git a/Tools/DumpRenderTree/chromium/WebPermissions.h b/Tools/DumpRenderTree/chromium/WebPermissions.h
deleted file mode 100644
index c625077e8..000000000
--- a/Tools/DumpRenderTree/chromium/WebPermissions.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2011 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.
- */
-
-#ifndef WebPermissions_h
-#define WebPermissions_h
-
-#include "WebPermissionClient.h"
-
-class DRTTestRunner;
-class TestShell;
-
-class WebPermissions : public WebKit::WebPermissionClient {
-public:
- WebPermissions(TestShell*);
- virtual ~WebPermissions();
-
- // Override WebPermissionClient methods.
- virtual bool allowImage(WebKit::WebFrame*, bool enabledPerSettings, const WebKit::WebURL& imageURL);
- virtual bool allowScriptFromSource(WebKit::WebFrame*, bool enabledPerSettings, const WebKit::WebURL& scriptURL);
- virtual bool allowStorage(WebKit::WebFrame*, bool local);
- virtual bool allowPlugins(WebKit::WebFrame*, bool enabledPerSettings);
- virtual bool allowDisplayingInsecureContent(WebKit::WebFrame*, bool enabledPerSettings,
- const WebKit::WebSecurityOrigin&, const WebKit::WebURL&);
- virtual bool allowRunningInsecureContent(WebKit::WebFrame*, bool enabledPerSettings,
- const WebKit::WebSecurityOrigin&, const WebKit::WebURL&);
-
- // Hooks to set the different policies.
- void setImagesAllowed(bool);
- void setScriptsAllowed(bool);
- void setStorageAllowed(bool);
- void setPluginsAllowed(bool);
- void setDisplayingInsecureContentAllowed(bool);
- void setRunningInsecureContentAllowed(bool);
-
- // Resets the policy to allow everything, except for running insecure content.
- void reset();
-
-private:
- DRTTestRunner* testRunner() const;
-
- // Non-owning pointer. The WebPermissions instance is owned by this TestShell instance.
- TestShell* m_shell;
-
- bool m_imagesAllowed;
- bool m_scriptsAllowed;
- bool m_storageAllowed;
- bool m_pluginsAllowed;
- bool m_displayingInsecureContentAllowed;
- bool m_runningInsecureContentAllowed;
-};
-
-#endif
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.cpp b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
deleted file mode 100644
index f64a7b156..000000000
--- a/Tools/DumpRenderTree/chromium/WebPreferences.cpp
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#include "WebPreferences.h"
-#include "WebRuntimeFeatures.h"
-
-#include "WebView.h"
-
-using namespace WebKit;
-
-void WebPreferences::reset()
-{
-#if OS(MAC_OS_X)
- cursiveFontFamily = WebString::fromUTF8("Apple Chancery");
- fantasyFontFamily = WebString::fromUTF8("Papyrus");
- WebString serif = WebString::fromUTF8("Times");
-#else
- // These two fonts are picked from the intersection of
- // Win XP font list and Vista font list :
- // http://www.microsoft.com/typography/fonts/winxp.htm
- // http://blogs.msdn.com/michkap/archive/2006/04/04/567881.aspx
- // Some of them are installed only with CJK and complex script
- // support enabled on Windows XP and are out of consideration here.
- // (although we enabled both on our buildbots.)
- // They (especially Impact for fantasy) are not typical cursive
- // and fantasy fonts, but it should not matter for layout tests
- // as long as they're available.
- cursiveFontFamily = WebString::fromUTF8("Comic Sans MS");
- fantasyFontFamily = WebString::fromUTF8("Impact");
- // NOTE: case matters here, this must be 'times new roman', else
- // some layout tests fail.
- WebString serif = WebString::fromUTF8("times new roman");
-#endif
- serifFontFamily = serif;
- standardFontFamily = serif;
- fixedFontFamily = WebString::fromUTF8("Courier");
- sansSerifFontFamily = WebString::fromUTF8("Helvetica");
-
- defaultFontSize = 16;
- defaultFixedFontSize = 13;
- minimumFontSize = 0;
- minimumLogicalFontSize = 9;
- // Do not disable acceleration for 2d canvas based on size.
- // This makes having test expectations consistent.
- minimumAccelerated2dCanvasSize = 0;
-
- DOMPasteAllowed = true;
- XSSAuditorEnabled = false;
- allowDisplayOfInsecureContent = true;
- allowFileAccessFromFileURLs = true;
- allowRunningOfInsecureContent = true;
- authorAndUserStylesEnabled = true;
- defaultTextEncodingName = WebString::fromUTF8("ISO-8859-1");
- developerExtrasEnabled = true;
- experimentalWebGLEnabled = false;
- experimentalCSSRegionsEnabled = true;
- experimentalCSSGridLayoutEnabled = false;
- javaEnabled = false;
- javaScriptCanAccessClipboard = true;
- javaScriptCanOpenWindowsAutomatically = true;
- supportsMultipleWindows = true;
- javaScriptEnabled = true;
- loadsImagesAutomatically = true;
- localStorageEnabled = true;
- offlineWebApplicationCacheEnabled = true;
- pluginsEnabled = true;
- shrinksStandaloneImagesToFit = false;
- textAreasAreResizable = false;
- userStyleSheetLocation = WebURL();
- usesPageCache = false;
- pageCacheSupportsPlugins = false;
- webSecurityEnabled = true;
- caretBrowsingEnabled = false;
-
- // Allow those layout tests running as local files, i.e. under
- // LayoutTests/http/tests/local, to access http server.
- allowUniversalAccessFromFileURLs = true;
-
-#if OS(DARWIN)
- editingBehavior = WebSettings::EditingBehaviorMac;
-#else
- editingBehavior = WebSettings::EditingBehaviorWin;
-#endif
-
- tabsToLinks = false;
- hyperlinkAuditingEnabled = false;
- acceleratedCompositingForVideoEnabled = false;
- acceleratedCompositingForFixedPositionEnabled = false;
- acceleratedCompositingEnabled = false;
- accelerated2dCanvasEnabled = false;
- deferred2dCanvasEnabled = false;
- acceleratedPaintingEnabled = false;
- forceCompositingMode = false;
- perTilePaintingEnabled = false;
- acceleratedAnimationEnabled = false;
- deferredImageDecodingEnabled = false;
- mediaPlaybackRequiresUserGesture = false;
- mockScrollbarsEnabled = false;
- cssCustomFilterEnabled = false;
- shouldRespectImageOrientation = false;
-}
-
-static void setStandardFontFamilyWrapper(WebSettings* settings, const WebKit::WebString& font, UScriptCode script)
-{
- settings->setStandardFontFamily(font, script);
-}
-
-static void setFixedFontFamilyWrapper(WebSettings* settings, const WebKit::WebString& font, UScriptCode script)
-{
- settings->setFixedFontFamily(font, script);
-}
-
-static void setSerifFontFamilyWrapper(WebSettings* settings, const WebKit::WebString& font, UScriptCode script)
-{
- settings->setSerifFontFamily(font, script);
-}
-
-static void setSansSerifFontFamilyWrapper(WebSettings* settings, const WebKit::WebString& font, UScriptCode script)
-{
- settings->setSansSerifFontFamily(font, script);
-}
-
-static void setCursiveFontFamilyWrapper(WebSettings* settings, const WebKit::WebString& font, UScriptCode script)
-{
- settings->setCursiveFontFamily(font, script);
-}
-
-static void setFantasyFontFamilyWrapper(WebSettings* settings, const WebKit::WebString& font, UScriptCode script)
-{
- settings->setFantasyFontFamily(font, script);
-}
-
-typedef void (*SetFontFamilyWrapper)(WebSettings*, const WebString&, UScriptCode);
-
-static void applyFontMap(WebSettings* settings, const WebPreferences::ScriptFontFamilyMap& map, SetFontFamilyWrapper setter)
-{
- for (WebPreferences::ScriptFontFamilyMap::const_iterator iter = map.begin(); iter != map.end(); ++iter) {
- const WebString& font = iter->value;
- if (!font.isNull() && !font.isEmpty())
- (*setter)(settings, font, static_cast<UScriptCode>(iter->key));
- }
-}
-
-void WebPreferences::applyTo(WebView* webView)
-{
- WebSettings* settings = webView->settings();
- settings->setStandardFontFamily(standardFontFamily);
- settings->setFixedFontFamily(fixedFontFamily);
- settings->setSerifFontFamily(serifFontFamily);
- settings->setSansSerifFontFamily(sansSerifFontFamily);
- settings->setCursiveFontFamily(cursiveFontFamily);
- settings->setFantasyFontFamily(fantasyFontFamily);
-
- applyFontMap(settings, standardFontMap, setStandardFontFamilyWrapper);
- applyFontMap(settings, fixedFontMap, setFixedFontFamilyWrapper);
- applyFontMap(settings, serifFontMap, setSerifFontFamilyWrapper);
- applyFontMap(settings, sansSerifFontMap, setSansSerifFontFamilyWrapper);
- applyFontMap(settings, cursiveFontMap, setCursiveFontFamilyWrapper);
- applyFontMap(settings, fantasyFontMap, setFantasyFontFamilyWrapper);
-
- settings->setDefaultFontSize(defaultFontSize);
- settings->setDefaultFixedFontSize(defaultFixedFontSize);
- settings->setMinimumFontSize(minimumFontSize);
- settings->setMinimumLogicalFontSize(minimumLogicalFontSize);
- settings->setMinimumAccelerated2dCanvasSize(minimumAccelerated2dCanvasSize);
-
- settings->setDOMPasteAllowed(DOMPasteAllowed);
- settings->setXSSAuditorEnabled(XSSAuditorEnabled);
- settings->setAllowDisplayOfInsecureContent(allowDisplayOfInsecureContent);
- settings->setAllowFileAccessFromFileURLs(allowFileAccessFromFileURLs);
- settings->setAllowRunningOfInsecureContent(allowRunningOfInsecureContent);
- settings->setAuthorAndUserStylesEnabled(authorAndUserStylesEnabled);
- settings->setDefaultTextEncodingName(defaultTextEncodingName);
- settings->setDeveloperExtrasEnabled(developerExtrasEnabled);
- settings->setExperimentalWebGLEnabled(experimentalWebGLEnabled);
- WebRuntimeFeatures::enableCSSRegions(experimentalCSSRegionsEnabled);
- settings->setExperimentalCSSGridLayoutEnabled(experimentalCSSGridLayoutEnabled);
- settings->setExperimentalCSSCustomFilterEnabled(cssCustomFilterEnabled);
- settings->setJavaEnabled(javaEnabled);
- settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
- settings->setJavaScriptCanOpenWindowsAutomatically(javaScriptCanOpenWindowsAutomatically);
- settings->setSupportsMultipleWindows(supportsMultipleWindows);
- settings->setJavaScriptEnabled(javaScriptEnabled);
- settings->setLoadsImagesAutomatically(loadsImagesAutomatically);
- settings->setLocalStorageEnabled(localStorageEnabled);
- settings->setOfflineWebApplicationCacheEnabled(offlineWebApplicationCacheEnabled);
- settings->setPluginsEnabled(pluginsEnabled);
- settings->setShrinksStandaloneImagesToFit(shrinksStandaloneImagesToFit);
- settings->setTextAreasAreResizable(textAreasAreResizable);
- settings->setUserStyleSheetLocation(userStyleSheetLocation);
- settings->setUsesPageCache(usesPageCache);
- settings->setPageCacheSupportsPlugins(pageCacheSupportsPlugins);
- settings->setWebSecurityEnabled(webSecurityEnabled);
- settings->setAllowUniversalAccessFromFileURLs(allowUniversalAccessFromFileURLs);
- settings->setEditingBehavior(editingBehavior);
- settings->setHyperlinkAuditingEnabled(hyperlinkAuditingEnabled);
- // LayoutTests were written with Safari Mac in mind which does not allow
- // tabbing to links by default.
- webView->setTabsToLinks(tabsToLinks);
- settings->setCaretBrowsingEnabled(caretBrowsingEnabled);
- settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled);
- settings->setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
- settings->setAcceleratedCompositingForFixedPositionEnabled(acceleratedCompositingForFixedPositionEnabled);
- settings->setFixedPositionCreatesStackingContext(acceleratedCompositingForFixedPositionEnabled);
- settings->setForceCompositingMode(forceCompositingMode);
- settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled);
- settings->setDeferred2dCanvasEnabled(deferred2dCanvasEnabled);
- settings->setAcceleratedPaintingEnabled(acceleratedPaintingEnabled);
- settings->setPerTilePaintingEnabled(perTilePaintingEnabled);
- settings->setAcceleratedAnimationEnabled(acceleratedAnimationEnabled);
- settings->setDeferredImageDecodingEnabled(deferredImageDecodingEnabled);
- settings->setMediaPlaybackRequiresUserGesture(mediaPlaybackRequiresUserGesture);
- settings->setMockScrollbarsEnabled(mockScrollbarsEnabled);
- settings->setShouldRespectImageOrientation(shouldRespectImageOrientation);
-
- // Fixed values.
- settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
- settings->setDownloadableBinaryFontsEnabled(true);
- settings->setAllowScriptsToCloseWindows(false);
- settings->setNeedsSiteSpecificQuirks(true);
- settings->setEditableLinkBehaviorNeverLive();
- settings->setEnableScrollAnimator(false);
- settings->setFontRenderingModeNormal();
- settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded();
- settings->setUsesEncodingDetector(false);
- settings->setImagesEnabled(true);
- settings->setInteractiveFormValidationEnabled(true);
- // Enable fullscreen so the fullscreen layout tests can run.
- settings->setFullScreenEnabled(true);
- settings->setValidationMessageTimerMagnification(-1);
- settings->setVisualWordMovementEnabled(false);
- settings->setPasswordEchoEnabled(false);
- settings->setApplyDeviceScaleFactorInCompositor(true);
-}
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.h b/Tools/DumpRenderTree/chromium/WebPreferences.h
deleted file mode 100644
index a17a3cbd2..000000000
--- a/Tools/DumpRenderTree/chromium/WebPreferences.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebPreferences_h
-#define WebPreferences_h
-
-#include "WebSettings.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include <wtf/HashMap.h>
-
-namespace WebKit {
-class WebView;
-}
-
-struct WebPreferences {
- WebKit::WebString standardFontFamily;
- WebKit::WebString fixedFontFamily;
- WebKit::WebString serifFontFamily;
- WebKit::WebString sansSerifFontFamily;
- WebKit::WebString cursiveFontFamily;
- WebKit::WebString fantasyFontFamily;
-
- // UScriptCode uses -1 and 0 for UScriptInvalidCode and UScriptCommon.
- // We need to use -2 and -3 for empty value and deleted value.
- // (See WebCore::ScriptFontFamilyMap)
- struct UScriptCodeHashTraits : WTF::GenericHashTraits<int> {
- static const bool emptyValueIsZero = false;
- static int emptyValue() { return -2; }
- static void constructDeletedValue(int& slot) { slot = -3; }
- static bool isDeletedValue(int value) { return value == -3; }
- };
-
- // Map of UScriptCode to font such as USCRIPT_ARABIC to "My Arabic Font".
- typedef HashMap<int, WebKit::WebString, DefaultHash<int>::Hash, UScriptCodeHashTraits> ScriptFontFamilyMap;
- ScriptFontFamilyMap standardFontMap;
- ScriptFontFamilyMap fixedFontMap;
- ScriptFontFamilyMap serifFontMap;
- ScriptFontFamilyMap sansSerifFontMap;
- ScriptFontFamilyMap cursiveFontMap;
- ScriptFontFamilyMap fantasyFontMap;
-
- int defaultFontSize;
- int defaultFixedFontSize;
- int minimumFontSize;
- int minimumLogicalFontSize;
- int minimumAccelerated2dCanvasSize;
-
- bool DOMPasteAllowed;
- bool XSSAuditorEnabled;
- bool allowDisplayOfInsecureContent;
- bool allowFileAccessFromFileURLs;
- bool allowRunningOfInsecureContent;
- bool authorAndUserStylesEnabled;
- WebKit::WebString defaultTextEncodingName;
- bool developerExtrasEnabled;
- bool experimentalWebGLEnabled;
- bool experimentalCSSRegionsEnabled;
- bool experimentalCSSGridLayoutEnabled;
- bool javaEnabled;
- bool javaScriptCanAccessClipboard;
- bool javaScriptCanOpenWindowsAutomatically;
- bool supportsMultipleWindows;
- bool javaScriptEnabled;
- bool loadsImagesAutomatically;
- bool localStorageEnabled;
- bool offlineWebApplicationCacheEnabled;
- bool pluginsEnabled;
- bool shrinksStandaloneImagesToFit;
- bool textAreasAreResizable;
- WebKit::WebURL userStyleSheetLocation;
- bool usesPageCache;
- bool pageCacheSupportsPlugins;
- bool webSecurityEnabled;
- bool allowUniversalAccessFromFileURLs;
- WebKit::WebSettings::EditingBehavior editingBehavior;
- bool tabsToLinks;
- bool hyperlinkAuditingEnabled;
- bool caretBrowsingEnabled;
- bool acceleratedCompositingForVideoEnabled;
- bool acceleratedCompositingForFixedPositionEnabled;
- bool acceleratedCompositingEnabled;
- bool forceCompositingMode;
- bool accelerated2dCanvasEnabled;
- bool deferred2dCanvasEnabled;
- bool acceleratedPaintingEnabled;
- bool perTilePaintingEnabled;
- bool acceleratedAnimationEnabled;
- bool deferredImageDecodingEnabled;
- bool mediaPlaybackRequiresUserGesture;
- bool mockScrollbarsEnabled;
- bool cssCustomFilterEnabled;
- bool shouldRespectImageOrientation;
-
- WebPreferences() { reset(); }
- void reset();
- void applyTo(WebKit::WebView*);
-};
-
-#endif // WebPreferences_h
diff --git a/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp b/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp
deleted file mode 100755
index 065df4f52..000000000
--- a/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.cpp
+++ /dev/null
@@ -1,528 +0,0 @@
-/*
- * 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.
- */
-
-// This file implements a simple generic version of the WebThemeEngine,
-// which is used to draw all the native controls on a web page. We use this
-// file when running in layout test mode in order to remove any
-// platform-specific rendering differences due to themes, colors, etc.
-//
-
-#include "config.h"
-#include "WebThemeControlDRTWin.h"
-
-#include "skia/ext/skia_utils_win.h"
-#include "third_party/skia/include/core/SkCanvas.h"
-#include "third_party/skia/include/core/SkPaint.h"
-#include "third_party/skia/include/core/SkPath.h"
-#include "third_party/skia/include/core/SkRect.h"
-
-#include <algorithm>
-#include <wtf/Assertions.h>
-
-using namespace std;
-
-static const SkColor edgeColor = SK_ColorBLACK;
-static const SkColor readOnlyColor = SkColorSetRGB(0xe9, 0xc2, 0xa6);
-static const SkColor fgColor = SK_ColorBLACK;
-static const SkColor bgColors[] = {
- SK_ColorBLACK, // Unknown
- SkColorSetRGB(0xc9, 0xc9, 0xc9), // Disabled
- SkColorSetRGB(0xf3, 0xe0, 0xd0), // Readonly
- SkColorSetRGB(0x89, 0xc4, 0xff), // Normal
- SkColorSetRGB(0x43, 0xf9, 0xff), // Hot
- SkColorSetRGB(0x20, 0xf6, 0xcc), // Focused
- SkColorSetRGB(0x00, 0xf3, 0xac), // Hover
- SkColorSetRGB(0xa9, 0xff, 0x12), // Pressed
- SkColorSetRGB(0xcc, 0xcc, 0xcc) // Indeterminate
-};
-
-static SkIRect validate(const SkIRect& rect, WebThemeControlDRTWin::Type ctype)
-{
- switch (ctype) {
- case WebThemeControlDRTWin::UncheckedBoxType:
- case WebThemeControlDRTWin::CheckedBoxType:
- case WebThemeControlDRTWin::UncheckedRadioType:
- case WebThemeControlDRTWin::CheckedRadioType: {
- SkIRect retval = rect;
-
- // The maximum width and height is 13.
- // Center the square in the passed rectangle.
- const int maxControlSize = 13;
- int controlSize = std::min(rect.width(), rect.height());
- controlSize = std::min(controlSize, maxControlSize);
-
- retval.fLeft = rect.fLeft + (rect.width() / 2) - (controlSize / 2);
- retval.fRight = retval.fLeft + controlSize - 1;
- retval.fTop = rect.fTop + (rect.height() / 2) - (controlSize / 2);
- retval.fBottom = retval.fTop + controlSize - 1;
-
- return retval;
- }
-
- default:
- return rect;
- }
-}
-
-// WebThemeControlDRTWin
-
-WebThemeControlDRTWin::WebThemeControlDRTWin(SkCanvas* canvas,
- const SkIRect& irect,
- Type ctype,
- State cstate)
- : m_canvas(canvas)
- , m_irect(validate(irect, ctype))
- , m_type(ctype)
- , m_state(cstate)
- , m_left(m_irect.fLeft)
- , m_right(m_irect.fRight)
- , m_top(m_irect.fTop)
- , m_bottom(m_irect.fBottom)
- , m_height(m_irect.height())
- , m_width(m_irect.width())
- , m_edgeColor(edgeColor)
- , m_bgColor(bgColors[cstate])
- , m_fgColor(fgColor)
-{
-}
-
-WebThemeControlDRTWin::~WebThemeControlDRTWin()
-{
-}
-
-void WebThemeControlDRTWin::box(const SkIRect& rect, SkColor fillColor)
-{
- SkPaint paint;
-
- paint.setStyle(SkPaint::kFill_Style);
- paint.setColor(fillColor);
- m_canvas->drawIRect(rect, paint);
-
- paint.setColor(m_edgeColor);
- paint.setStyle(SkPaint::kStroke_Style);
- m_canvas->drawIRect(rect, paint);
-}
-
-void WebThemeControlDRTWin::line(int x0, int y0, int x1, int y1, SkColor color)
-{
- SkPaint paint;
- paint.setColor(color);
- m_canvas->drawLine(SkIntToScalar(x0), SkIntToScalar(y0),
- SkIntToScalar(x1), SkIntToScalar(y1),
- paint);
-}
-
-void WebThemeControlDRTWin::triangle(int x0, int y0,
- int x1, int y1,
- int x2, int y2,
- SkColor color)
-{
- SkPath path;
- SkPaint paint;
-
- paint.setColor(color);
- paint.setStyle(SkPaint::kFill_Style);
- path.incReserve(4);
- path.moveTo(SkIntToScalar(x0), SkIntToScalar(y0));
- path.lineTo(SkIntToScalar(x1), SkIntToScalar(y1));
- path.lineTo(SkIntToScalar(x2), SkIntToScalar(y2));
- path.close();
- m_canvas->drawPath(path, paint);
-
- paint.setColor(m_edgeColor);
- paint.setStyle(SkPaint::kStroke_Style);
- m_canvas->drawPath(path, paint);
-}
-
-void WebThemeControlDRTWin::roundRect(SkColor color)
-{
- SkRect rect;
- SkScalar radius = SkIntToScalar(5);
- SkPaint paint;
-
- rect.set(m_irect);
- paint.setColor(color);
- paint.setStyle(SkPaint::kFill_Style);
- m_canvas->drawRoundRect(rect, radius, radius, paint);
-
- paint.setColor(m_edgeColor);
- paint.setStyle(SkPaint::kStroke_Style);
- m_canvas->drawRoundRect(rect, radius, radius, paint);
-}
-
-void WebThemeControlDRTWin::oval(SkColor color)
-{
- SkRect rect;
- SkPaint paint;
-
- rect.set(m_irect);
- paint.setColor(color);
- paint.setStyle(SkPaint::kFill_Style);
- m_canvas->drawOval(rect, paint);
-
- paint.setColor(m_edgeColor);
- paint.setStyle(SkPaint::kStroke_Style);
- m_canvas->drawOval(rect, paint);
-}
-
-void WebThemeControlDRTWin::circle(SkScalar radius, SkColor color)
-{
- SkScalar cy = SkIntToScalar(m_top + m_height / 2);
- SkScalar cx = SkIntToScalar(m_left + m_width / 2);
- SkPaint paint;
-
- paint.setColor(color);
- paint.setStyle(SkPaint::kFill_Style);
- m_canvas->drawCircle(cx, cy, radius, paint);
-
- paint.setColor(m_edgeColor);
- paint.setStyle(SkPaint::kStroke_Style);
- m_canvas->drawCircle(cx, cy, radius, paint);
-}
-
-void WebThemeControlDRTWin::nestedBoxes(int indentLeft,
- int indentTop,
- int indentRight,
- int indentBottom,
- SkColor outerColor,
- SkColor innerColor)
-{
- SkIRect lirect;
- box(m_irect, outerColor);
- lirect.set(m_irect.fLeft + indentLeft,
- m_irect.fTop + indentTop,
- m_irect.fRight - indentRight,
- m_irect.fBottom - indentBottom);
- box(lirect, innerColor);
-}
-
-void WebThemeControlDRTWin::markState()
-{
- // The horizontal lines in a read only control are spaced by this amount.
- const int readOnlyLineOffset = 5;
-
- // The length of a triangle side for the corner marks.
- const int triangleSize = 5;
-
- switch (m_state) {
- case UnknownState:
- case DisabledState:
- case NormalState:
- // Don't visually mark these states (color is enough).
- break;
- case ReadOnlyState:
- // Drawing lines across the control.
- for (int i = m_top + readOnlyLineOffset; i < m_bottom; i += readOnlyLineOffset)
- line(m_left + 1, i, m_right - 1, i, readOnlyColor);
- break;
-
- case HotState:
- // Draw a triangle in the upper left corner of the control.
- triangle(m_left, m_top,
- m_left + triangleSize, m_top,
- m_left, m_top + triangleSize, m_edgeColor);
- break;
-
- case HoverState:
- // Draw a triangle in the upper right corner of the control.
- triangle(m_right, m_top,
- m_right, m_top + triangleSize,
- m_right - triangleSize, m_top, m_edgeColor);
- break;
-
- case FocusedState:
- // Draw a triangle in the bottom right corner of the control.
- triangle(m_right, m_bottom,
- m_right - triangleSize, m_bottom,
- m_right, m_bottom - triangleSize, m_edgeColor);
- break;
-
- case PressedState:
- // Draw a triangle in the bottom left corner of the control.
- triangle(m_left, m_bottom,
- m_left, m_bottom - triangleSize,
- m_left + triangleSize, m_bottom, m_edgeColor);
- break;
-
- default:
- ASSERT_NOT_REACHED();
- CRASH();
- break;
- }
-}
-
-void WebThemeControlDRTWin::draw()
-{
- int halfWidth = m_width / 2;
- int halfHeight = m_height / 2;
- int quarterWidth = m_width / 4;
- int quarterHeight = m_height / 4;
-
- // Indent amounts for the check in a checkbox or radio button.
- const int checkIndent = 3;
-
- // Indent amounts for short and long sides of the scrollbar notches.
- const int notchLongOffset = 1;
- const int notchShortOffset = 4;
- const int noOffset = 0;
-
- // Indent amounts for the short and long sides of a scroll thumb box.
- const int thumbLongIndent = 0;
- const int thumbShortIndent = 2;
-
- // Indents for the crosshatch on a scroll grip.
- const int gripLongIndent = 3;
- const int gripShortIndent = 5;
-
- // Indents for the the slider track.
- const int sliderIndent = 2;
-
- switch (m_type) {
- case UnknownType:
- ASSERT_NOT_REACHED();
- CRASH();
- break;
-
- case TextFieldType:
- // We render this by hand outside of this function.
- ASSERT_NOT_REACHED();
- CRASH();
- break;
-
- case PushButtonType:
- // push buttons render as a rounded rectangle
- roundRect(m_bgColor);
- break;
-
- case UncheckedBoxType:
- // Unchecked boxes are simply plain boxes.
- box(m_irect, m_bgColor);
- break;
-
- case CheckedBoxType:
- nestedBoxes(checkIndent, checkIndent, checkIndent, checkIndent, m_bgColor, m_fgColor);
- break;
-
- case IndeterminateCheckboxType:
- // Indeterminate checkbox is a box containing '-'.
- nestedBoxes(checkIndent, halfHeight, checkIndent, halfHeight, m_bgColor, m_fgColor);
- break;
-
- case UncheckedRadioType:
- circle(SkIntToScalar(halfHeight), m_bgColor);
- break;
-
- case CheckedRadioType:
- circle(SkIntToScalar(halfHeight), m_bgColor);
- circle(SkIntToScalar(halfHeight - checkIndent), m_fgColor);
- break;
-
- case HorizontalScrollTrackBackType: {
- // Draw a box with a notch at the left.
- int longOffset = halfHeight - notchLongOffset;
- int shortOffset = m_width - notchShortOffset;
- nestedBoxes(noOffset, longOffset, shortOffset, longOffset, m_bgColor, m_edgeColor);
- break;
- }
-
- case HorizontalScrollTrackForwardType: {
- // Draw a box with a notch at the right.
- int longOffset = halfHeight - notchLongOffset;
- int shortOffset = m_width - notchShortOffset;
- nestedBoxes(shortOffset, longOffset, noOffset, longOffset, m_bgColor, m_fgColor);
- break;
- }
-
- case VerticalScrollTrackBackType: {
- // Draw a box with a notch at the top.
- int longOffset = halfWidth - notchLongOffset;
- int shortOffset = m_height - notchShortOffset;
- nestedBoxes(longOffset, noOffset, longOffset, shortOffset, m_bgColor, m_fgColor);
- break;
- }
-
- case VerticalScrollTrackForwardType: {
- // Draw a box with a notch at the bottom.
- int longOffset = halfWidth - notchLongOffset;
- int shortOffset = m_height - notchShortOffset;
- nestedBoxes(longOffset, shortOffset, longOffset, noOffset, m_bgColor, m_fgColor);
- break;
- }
-
- case HorizontalScrollThumbType:
- // Draw a narrower box on top of the outside box.
- nestedBoxes(thumbLongIndent, thumbShortIndent, thumbLongIndent, thumbShortIndent, m_bgColor, m_bgColor);
- break;
-
- case VerticalScrollThumbType:
- // Draw a shorter box on top of the outside box.
- nestedBoxes(thumbShortIndent, thumbLongIndent, thumbShortIndent, thumbLongIndent, m_bgColor, m_bgColor);
- break;
-
- case HorizontalSliderThumbType:
- case VerticalSliderThumbType:
- // Slider thumbs are ovals.
- oval(m_bgColor);
- break;
-
- case HorizontalScrollGripType: {
- // Draw a horizontal crosshatch for the grip.
- int longOffset = halfWidth - gripLongIndent;
- line(m_left + gripLongIndent, m_top + halfHeight,
- m_right - gripLongIndent, m_top + halfHeight, m_fgColor);
- line(m_left + longOffset, m_top + gripShortIndent,
- m_left + longOffset, m_bottom - gripShortIndent, m_fgColor);
- line(m_right - longOffset, m_top + gripShortIndent,
- m_right - longOffset, m_bottom - gripShortIndent, m_fgColor);
- break;
- }
-
- case VerticalScrollGripType: {
- // Draw a vertical crosshatch for the grip.
- int longOffset = halfHeight - gripLongIndent;
- line(m_left + halfWidth, m_top + gripLongIndent,
- m_left + halfWidth, m_bottom - gripLongIndent, m_fgColor);
- line(m_left + gripShortIndent, m_top + longOffset,
- m_right - gripShortIndent, m_top + longOffset, m_fgColor);
- line(m_left + gripShortIndent, m_bottom - longOffset,
- m_right - gripShortIndent, m_bottom - longOffset, m_fgColor);
- break;
- }
-
- case LeftArrowType:
- // Draw a left arrow inside a box.
- box(m_irect, m_bgColor);
- triangle(m_right - quarterWidth, m_top + quarterHeight,
- m_right - quarterWidth, m_bottom - quarterHeight,
- m_left + quarterWidth, m_top + halfHeight, m_fgColor);
- break;
-
- case RightArrowType:
- // Draw a left arrow inside a box.
- box(m_irect, m_bgColor);
- triangle(m_left + quarterWidth, m_top + quarterHeight,
- m_right - quarterWidth, m_top + halfHeight,
- m_left + quarterWidth, m_bottom - quarterHeight, m_fgColor);
- break;
-
- case UpArrowType:
- // Draw an up arrow inside a box.
- box(m_irect, m_bgColor);
- triangle(m_left + quarterWidth, m_bottom - quarterHeight,
- m_left + halfWidth, m_top + quarterHeight,
- m_right - quarterWidth, m_bottom - quarterHeight, m_fgColor);
- break;
-
- case DownArrowType:
- // Draw a down arrow inside a box.
- box(m_irect, m_bgColor);
- triangle(m_left + quarterWidth, m_top + quarterHeight,
- m_right - quarterWidth, m_top + quarterHeight,
- m_left + halfWidth, m_bottom - quarterHeight, m_fgColor);
- break;
-
- case HorizontalSliderTrackType: {
- // Draw a narrow rect for the track plus box hatches on the ends.
- SkIRect lirect;
- lirect = m_irect;
- lirect.inset(noOffset, halfHeight - sliderIndent);
- box(lirect, m_bgColor);
- line(m_left, m_top, m_left, m_bottom, m_edgeColor);
- line(m_right, m_top, m_right, m_bottom, m_edgeColor);
- break;
- }
-
- case VerticalSliderTrackType: {
- // Draw a narrow rect for the track plus box hatches on the ends.
- SkIRect lirect;
- lirect = m_irect;
- lirect.inset(halfWidth - sliderIndent, noOffset);
- box(lirect, m_bgColor);
- line(m_left, m_top, m_right, m_top, m_edgeColor);
- line(m_left, m_bottom, m_right, m_bottom, m_edgeColor);
- break;
- }
-
- case DropDownButtonType:
- // Draw a box with a big down arrow on top.
- box(m_irect, m_bgColor);
- triangle(m_left + quarterWidth, m_top,
- m_right - quarterWidth, m_top,
- m_left + halfWidth, m_bottom, m_fgColor);
- break;
-
- default:
- ASSERT_NOT_REACHED();
- CRASH();
- break;
- }
-
- markState();
-}
-
-// Because rendering a text field is dependent on input
-// parameters the other controls don't have, we render it directly
-// rather than trying to overcomplicate draw() further.
-void WebThemeControlDRTWin::drawTextField(bool drawEdges, bool fillContentArea, SkColor color)
-{
- SkPaint paint;
-
- if (fillContentArea) {
- paint.setColor(color);
- paint.setStyle(SkPaint::kFill_Style);
- m_canvas->drawIRect(m_irect, paint);
- }
- if (drawEdges) {
- paint.setColor(m_edgeColor);
- paint.setStyle(SkPaint::kStroke_Style);
- m_canvas->drawIRect(m_irect, paint);
- }
-
- markState();
-}
-
-void WebThemeControlDRTWin::drawProgressBar(const SkIRect& fillRect)
-{
- SkPaint paint;
-
- paint.setColor(m_bgColor);
- paint.setStyle(SkPaint::kFill_Style);
- m_canvas->drawIRect(m_irect, paint);
-
- // Emulate clipping
- SkIRect tofill;
- tofill.intersect(m_irect, fillRect);
- paint.setColor(m_fgColor);
- paint.setStyle(SkPaint::kFill_Style);
- m_canvas->drawIRect(tofill, paint);
-
- markState();
-}
-
diff --git a/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h b/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h
deleted file mode 100644
index ef731ab39..000000000
--- a/Tools/DumpRenderTree/chromium/WebThemeControlDRTWin.h
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * 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.
- */
-
-// WebThemeControlDRTWin implements the generic rendering of controls
-// needed by WebThemeEngineDRTWin. See the comments in that class
-// header file for why this class is needed and used.
-//
-// This class implements a generic set of widgets using Skia. The widgets
-// are optimized for testability, not a pleasing appearance.
-//
-
-#ifndef WebThemeControlDRTWin_h
-#define WebThemeControlDRTWin_h
-
-#include "third_party/skia/include/core/SkColor.h"
-#include "third_party/skia/include/core/SkRect.h"
-#include <wtf/Noncopyable.h>
-
-// Skia forward declarations
-class SkCanvas;
-
-class WebThemeControlDRTWin {
- WTF_MAKE_NONCOPYABLE(WebThemeControlDRTWin);
-public:
- // This list of states mostly mirrors the list in WebCore/platform/ThemeTypes.h
- // but is maintained separately since that isn't public and also to minimize
- // dependencies.
- // Note that the WebKit ThemeTypes seem to imply that a control can be
- // in multiple states simultaneously but WebThemeEngine only allows for
- // a single state at a time.
- //
- // Some definitions for the various states:
- // Disabled - indicates that a control can't be modified or selected
- // (corresponds to HTML 'disabled' attribute)
- // ReadOnly - indicates that a control can't be modified but can be
- // selected
- // Normal - the normal state of control on the page when it isn't
- // focused or otherwise active
- // Hot - when the mouse is hovering over a part of the control,
- // all the other parts are considered "hot"
- // Hover - when the mouse is directly over a control (the CSS
- // :hover pseudo-class)
- // Focused - when the control has the keyboard focus
- // Pressed - when the control is being triggered (by a mousedown or
- // a key event).
- // Indeterminate - when set to indeterminate (only for progress bar)
- enum State {
- UnknownState = 0,
- DisabledState,
- ReadOnlyState,
- NormalState,
- HotState,
- HoverState,
- FocusedState,
- PressedState,
- IndeterminateState
- };
-
- // This list of types mostly mirrors the list in
- // WebCore/platform/ThemeTypes.h but is maintained
- // separately since that isn't public and also to minimize dependencies.
- //
- // Note that what the user might think of as a single control can be
- // made up of multiple parts. For example, a single scroll bar contains
- // six clickable parts - two arrows, the "thumb" indicating the current
- // position on the bar, the other two parts of the bar (before and after
- // the thumb) and the "gripper" on the thumb itself.
- //
- enum Type {
- UnknownType = 0,
- TextFieldType,
- PushButtonType,
- UncheckedBoxType,
- CheckedBoxType,
- IndeterminateCheckboxType,
- UncheckedRadioType,
- CheckedRadioType,
- HorizontalScrollTrackBackType,
- HorizontalScrollTrackForwardType,
- HorizontalScrollThumbType,
- HorizontalScrollGripType,
- VerticalScrollTrackBackType,
- VerticalScrollTrackForwardType,
- VerticalScrollThumbType,
- VerticalScrollGripType,
- LeftArrowType,
- RightArrowType,
- UpArrowType,
- DownArrowType,
- HorizontalSliderTrackType,
- HorizontalSliderThumbType,
- VerticalSliderTrackType,
- VerticalSliderThumbType,
- DropDownButtonType,
- ProgressBarType
- };
-
- // Constructs a control of the given size, type and state to draw
- // on to the given canvas.
- WebThemeControlDRTWin(SkCanvas*, const SkIRect&, Type, State);
- ~WebThemeControlDRTWin();
-
- // Draws the control.
- void draw();
-
- // Use this for TextField controls instead, because the logic
- // for drawing them is dependent on what WebKit tells us to do.
- // If drawEdges is true, draw an edge around the control. If
- // fillContentArea is true, fill the content area with the given color.
- void drawTextField(bool drawEdges, bool fillContentArea, SkColor);
-
- // Use this for drawing ProgressBar controls instead, since we
- // need to know the rect to fill inside the bar.
- void drawProgressBar(const SkIRect& fillRect);
-
-private:
- // Draws a box of size specified by irect, filled with the given color.
- // The box will have a border drawn in the default edge color.
- void box(const SkIRect& irect, SkColor);
-
-
- // Draws a triangle of size specified by the three pairs of coordinates,
- // filled with the given color. The box will have an edge drawn in the
- // default edge color.
- void triangle(int x0, int y0, int x1, int y1, int x2, int y2, SkColor);
-
- // Draws a rectangle the size of the control with rounded corners, filled
- // with the specified color (and with a border in the default edge color).
- void roundRect(SkColor);
-
- // Draws an oval the size of the control, filled with the specified color
- // and with a border in the default edge color.
- void oval(SkColor);
-
- // Draws a circle centered in the control with the specified radius,
- // filled with the specified color, and with a border draw in the
- // default edge color.
- void circle(SkScalar radius, SkColor);
-
- // Draws a box the size of the control, filled with the outerColor and
- // with a border in the default edge color, and then draws another box
- // indented on all four sides by the specified amounts, filled with the
- // inner color and with a border in the default edge color.
- void nestedBoxes(int indentLeft,
- int indentTop,
- int indentRight,
- int indentBottom,
- SkColor outerColor,
- SkColor innerColor);
-
- // Draws a line between the two points in the given color.
- void line(int x0, int y0, int x1, int y1, SkColor);
-
- // Draws a distinctive mark on the control for each state, so that the
- // state of the control can be determined without needing to know which
- // color is which.
- void markState();
-
- SkCanvas* m_canvas;
- const SkIRect m_irect;
- const Type m_type;
- const State m_state;
- const SkColor m_edgeColor;
- const SkColor m_bgColor;
- const SkColor m_fgColor;
-
- // The following are convenience accessors for m_irect.
- const int m_left;
- const int m_right;
- const int m_top;
- const int m_bottom;
- const int m_width;
- const int m_height;
-};
-
-#endif // WebThemeControlDRTWin_h
diff --git a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm
deleted file mode 100644
index 6f9c4b66d..000000000
--- a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.mm
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * 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.
- */
-
-#include "WebThemeEngineDRTMac.h"
-
-#include "skia/ext/skia_utils_mac.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCanvas.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
-#import <AppKit/NSAffineTransform.h>
-#import <AppKit/NSGraphicsContext.h>
-#import <AppKit/NSScroller.h>
-#import <AppKit/NSWindow.h>
-#include <Carbon/Carbon.h>
-
-using WebKit::WebCanvas;
-using WebKit::WebRect;
-using WebKit::WebThemeEngine;
-
-// We can't directly tell the NSScroller to draw itself as active or inactive,
-// instead we have to make it a child of an (in)active window. This class lets
-// us fake that parent window.
-@interface FakeActiveWindow : NSWindow {
-@private
- BOOL hasActiveControls;
-}
-+ (NSWindow*)alwaysActiveWindow;
-+ (NSWindow*)alwaysInactiveWindow;
-- (id)initWithActiveControls:(BOOL)_hasActiveControls;
-- (BOOL)_hasActiveControls;
-@end
-
-@implementation FakeActiveWindow
-
-static NSWindow* alwaysActiveWindow = nil;
-static NSWindow* alwaysInactiveWindow = nil;
-
-+ (NSWindow*)alwaysActiveWindow
-{
- if (alwaysActiveWindow == nil)
- alwaysActiveWindow = [[self alloc] initWithActiveControls:YES];
- return alwaysActiveWindow;
-}
-
-+ (NSWindow*)alwaysInactiveWindow
-{
- if (alwaysInactiveWindow == nil)
- alwaysInactiveWindow = [[self alloc] initWithActiveControls:NO];
- return alwaysInactiveWindow;
-}
-
-- (id)initWithActiveControls:(BOOL)_hasActiveControls
-{
- self = [super init];
- hasActiveControls = _hasActiveControls;
- return self;
-}
-
-- (BOOL)_hasActiveControls
-{
- return hasActiveControls;
-}
-
-@end
-
-void WebThemeEngineDRTMac::paintScrollbarThumb(
- WebCanvas* canvas,
- WebThemeEngine::State state,
- WebThemeEngine::Size size,
- const WebRect& rect,
- const WebThemeEngine::ScrollbarInfo& scrollbarInfo)
-{
- // To match the Mac port, we still use HITheme for inner scrollbars.
- if (scrollbarInfo.parent == WebThemeEngine::ScrollbarParentRenderLayer)
- paintHIThemeScrollbarThumb(canvas, state, size, rect, scrollbarInfo);
- else
- paintNSScrollerScrollbarThumb(canvas, state, size, rect, scrollbarInfo);
-}
-
-static ThemeTrackEnableState stateToHIEnableState(WebThemeEngine::State state)
-{
- switch (state) {
- case WebThemeEngine::StateDisabled:
- return kThemeTrackDisabled;
- case WebThemeEngine::StateInactive:
- return kThemeTrackInactive;
- default:
- return kThemeTrackActive;
- }
-}
-
-// Duplicated from webkit/glue/webthemeengine_impl_mac.cc in the downstream
-// Chromium WebThemeEngine implementation.
-void WebThemeEngineDRTMac::paintHIThemeScrollbarThumb(
- WebCanvas* canvas,
- WebThemeEngine::State state,
- WebThemeEngine::Size size,
- const WebRect& rect,
- const WebThemeEngine::ScrollbarInfo& scrollbarInfo)
-{
- HIThemeTrackDrawInfo trackInfo;
- trackInfo.version = 0;
- trackInfo.kind = size == WebThemeEngine::SizeRegular ? kThemeMediumScrollBar : kThemeSmallScrollBar;
- trackInfo.bounds = CGRectMake(rect.x, rect.y, rect.width, rect.height);
- trackInfo.min = 0;
- trackInfo.max = scrollbarInfo.maxValue;
- trackInfo.value = scrollbarInfo.currentValue;
- trackInfo.trackInfo.scrollbar.viewsize = scrollbarInfo.visibleSize;
- trackInfo.attributes = 0;
- if (scrollbarInfo.orientation == WebThemeEngine::ScrollbarOrientationHorizontal)
- trackInfo.attributes |= kThemeTrackHorizontal;
-
- trackInfo.enableState = stateToHIEnableState(state);
-
- trackInfo.trackInfo.scrollbar.pressState =
- state == WebThemeEngine::StatePressed ? kThemeThumbPressed : 0;
- trackInfo.attributes |= (kThemeTrackShowThumb | kThemeTrackHideTrack);
- gfx::SkiaBitLocker bitLocker(canvas);
- CGContextRef cgContext = bitLocker.cgContext();
- HIThemeDrawTrack(&trackInfo, 0, cgContext, kHIThemeOrientationNormal);
-}
-
-void WebThemeEngineDRTMac::paintNSScrollerScrollbarThumb(
- WebCanvas* canvas,
- WebThemeEngine::State state,
- WebThemeEngine::Size size,
- const WebRect& rect,
- const WebThemeEngine::ScrollbarInfo& scrollbarInfo)
-{
- [NSGraphicsContext saveGraphicsState];
- NSScroller* scroller = [[NSScroller alloc] initWithFrame:NSMakeRect(rect.x, rect.y, rect.width, rect.height)];
- [scroller setEnabled:state != WebThemeEngine::StateDisabled];
- if (state == WebThemeEngine::StateInactive)
- [[[FakeActiveWindow alwaysInactiveWindow] contentView] addSubview:scroller];
- else
- [[[FakeActiveWindow alwaysActiveWindow] contentView] addSubview:scroller];
-
- [scroller setControlSize:size == WebThemeEngine::SizeRegular ? NSRegularControlSize : NSSmallControlSize];
-
- double value = double(scrollbarInfo.currentValue) / double(scrollbarInfo.maxValue);
- [scroller setDoubleValue: value];
-
- float knobProportion = float(scrollbarInfo.visibleSize) / float(scrollbarInfo.totalSize);
- [scroller setKnobProportion: knobProportion];
-
- gfx::SkiaBitLocker bitLocker(canvas);
- CGContextRef cgContext = bitLocker.cgContext();
- NSGraphicsContext* nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:cgContext flipped:YES];
- [NSGraphicsContext setCurrentContext:nsGraphicsContext];
-
- // Despite passing in frameRect() to the scroller, it always draws at (0, 0).
- // Force it to draw in the right location by translating the whole graphics
- // context.
- CGContextSaveGState(cgContext);
- NSAffineTransform *transform = [NSAffineTransform transform];
- [transform translateXBy:rect.x yBy:rect.y];
- [transform concat];
-
- [scroller drawKnob];
- CGContextRestoreGState(cgContext);
-
- [scroller release];
-
- [NSGraphicsContext restoreGraphicsState];
-}
diff --git a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp
deleted file mode 100755
index db8c38b7b..000000000
--- a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.cpp
+++ /dev/null
@@ -1,793 +0,0 @@
-/*
- * 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.
- */
-
-#include "config.h"
-#include "WebThemeEngineDRTWin.h"
-
-#include "platform/WebRect.h"
-#include "WebThemeControlDRTWin.h"
-#include "third_party/skia/include/core/SkRect.h"
-
-// Although all this code is generic, we include these headers
-// to pull in the Windows #defines for the parts and states of
-// the controls.
-#include <vsstyle.h>
-#include <windows.h>
-
-#include <wtf/Assertions.h>
-
-using namespace WebKit;
-
-// We define this for clarity, although there really should be a DFCS_NORMAL in winuser.h.
-static const int dfcsNormal = 0x0000;
-
-static SkIRect webRectToSkIRect(const WebRect& webRect)
-{
- SkIRect irect;
- irect.set(webRect.x, webRect.y, webRect.x + webRect.width - 1, webRect.y + webRect.height - 1);
- return irect;
-}
-
-static void drawControl(WebCanvas* canvas,
- const WebRect& rect,
- WebThemeControlDRTWin::Type ctype,
- WebThemeControlDRTWin::State cstate)
-{
- WebThemeControlDRTWin control(canvas, webRectToSkIRect(rect), ctype, cstate);
- control.draw();
-}
-
-static void drawTextField(WebCanvas* canvas,
- const WebRect& rect,
- WebThemeControlDRTWin::Type ctype,
- WebThemeControlDRTWin::State cstate,
- bool drawEdges,
- bool fillContentArea,
- WebColor color)
-{
- WebThemeControlDRTWin control(canvas, webRectToSkIRect(rect), ctype, cstate);
- control.drawTextField(drawEdges, fillContentArea, color);
-}
-
-static void drawProgressBar(WebCanvas* canvas,
- WebThemeControlDRTWin::Type ctype,
- WebThemeControlDRTWin::State cstate,
- const WebRect& barRect,
- const WebRect& fillRect)
-{
- WebThemeControlDRTWin control(canvas, webRectToSkIRect(barRect), ctype, cstate);
- control.drawProgressBar(webRectToSkIRect(fillRect));
-}
-
-// WebThemeEngineDRTWin
-
-void WebThemeEngineDRTWin::paintButton(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- if (part == BP_CHECKBOX) {
- switch (state) {
- case CBS_UNCHECKEDNORMAL:
- ASSERT(classicState == dfcsNormal);
- ctype = WebThemeControlDRTWin::UncheckedBoxType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case CBS_UNCHECKEDHOT:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_HOT));
- ctype = WebThemeControlDRTWin::UncheckedBoxType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case CBS_UNCHECKEDPRESSED:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_PUSHED));
- ctype = WebThemeControlDRTWin::UncheckedBoxType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case CBS_UNCHECKEDDISABLED:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::UncheckedBoxType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case CBS_CHECKEDNORMAL:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED));
- ctype = WebThemeControlDRTWin::CheckedBoxType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case CBS_CHECKEDHOT:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_HOT));
- ctype = WebThemeControlDRTWin::CheckedBoxType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case CBS_CHECKEDPRESSED:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_PUSHED));
- ctype = WebThemeControlDRTWin::CheckedBoxType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case CBS_CHECKEDDISABLED:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::CheckedBoxType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case CBS_MIXEDNORMAL:
- // Classic theme can't represent mixed state checkbox. We assume
- // it's equivalent to unchecked.
- ASSERT(classicState == DFCS_BUTTONCHECK);
- ctype = WebThemeControlDRTWin::IndeterminateCheckboxType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case CBS_MIXEDHOT:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_HOT));
- ctype = WebThemeControlDRTWin::IndeterminateCheckboxType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case CBS_MIXEDPRESSED:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_PUSHED));
- ctype = WebThemeControlDRTWin::IndeterminateCheckboxType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case CBS_MIXEDDISABLED:
- ASSERT(classicState == (DFCS_BUTTONCHECK | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::IndeterminateCheckboxType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
- } else if (BP_RADIOBUTTON == part) {
- switch (state) {
- case RBS_UNCHECKEDNORMAL:
- ASSERT(classicState == DFCS_BUTTONRADIO);
- ctype = WebThemeControlDRTWin::UncheckedRadioType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case RBS_UNCHECKEDHOT:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_HOT));
- ctype = WebThemeControlDRTWin::UncheckedRadioType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case RBS_UNCHECKEDPRESSED:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_PUSHED));
- ctype = WebThemeControlDRTWin::UncheckedRadioType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case RBS_UNCHECKEDDISABLED:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::UncheckedRadioType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case RBS_CHECKEDNORMAL:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED));
- ctype = WebThemeControlDRTWin::CheckedRadioType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case RBS_CHECKEDHOT:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_HOT));
- ctype = WebThemeControlDRTWin::CheckedRadioType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case RBS_CHECKEDPRESSED:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_PUSHED));
- ctype = WebThemeControlDRTWin::CheckedRadioType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case RBS_CHECKEDDISABLED:
- ASSERT(classicState == (DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::CheckedRadioType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
- } else if (BP_PUSHBUTTON == part) {
- switch (state) {
- case PBS_NORMAL:
- ASSERT(classicState == DFCS_BUTTONPUSH);
- ctype = WebThemeControlDRTWin::PushButtonType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case PBS_HOT:
- ASSERT(classicState == (DFCS_BUTTONPUSH | DFCS_HOT));
- ctype = WebThemeControlDRTWin::PushButtonType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case PBS_PRESSED:
- ASSERT(classicState == (DFCS_BUTTONPUSH | DFCS_PUSHED));
- ctype = WebThemeControlDRTWin::PushButtonType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case PBS_DISABLED:
- ASSERT(classicState == (DFCS_BUTTONPUSH | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::PushButtonType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case PBS_DEFAULTED:
- ASSERT(classicState == DFCS_BUTTONPUSH);
- ctype = WebThemeControlDRTWin::PushButtonType;
- cstate = WebThemeControlDRTWin::FocusedState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
- } else
- ASSERT_NOT_REACHED();
-
- drawControl(canvas, rect, ctype, cstate);
-}
-
-
-void WebThemeEngineDRTWin::paintMenuList(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- if (CP_DROPDOWNBUTTON == part) {
- ctype = WebThemeControlDRTWin::DropDownButtonType;
- switch (state) {
- case CBXS_NORMAL:
- ASSERT(classicState == DFCS_MENUARROW);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case CBXS_HOT:
- ASSERT(classicState == (DFCS_MENUARROW | DFCS_HOT));
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case CBXS_PRESSED:
- ASSERT(classicState == (DFCS_MENUARROW | DFCS_PUSHED));
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case CBXS_DISABLED:
- ASSERT(classicState == (DFCS_MENUARROW | DFCS_INACTIVE));
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- default:
- CRASH();
- break;
- }
- } else
- CRASH();
-
- drawControl(canvas, rect, ctype, cstate);
-}
-
-void WebThemeEngineDRTWin::paintScrollbarArrow(WebCanvas* canvas,
- int state,
- int classicState,
- const WebRect& rect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- switch (state) {
- case ABS_UPNORMAL:
- ASSERT(classicState == DFCS_SCROLLUP);
- ctype = WebThemeControlDRTWin::UpArrowType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case ABS_DOWNNORMAL:
- ASSERT(classicState == DFCS_SCROLLDOWN);
- ctype = WebThemeControlDRTWin::DownArrowType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case ABS_LEFTNORMAL:
- ASSERT(classicState == DFCS_SCROLLLEFT);
- ctype = WebThemeControlDRTWin::LeftArrowType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case ABS_RIGHTNORMAL:
- ASSERT(classicState == DFCS_SCROLLRIGHT);
- ctype = WebThemeControlDRTWin::RightArrowType;
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case ABS_UPHOT:
- ASSERT(classicState == (DFCS_SCROLLUP | DFCS_HOT));
- ctype = WebThemeControlDRTWin::UpArrowType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case ABS_DOWNHOT:
- ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_HOT));
- ctype = WebThemeControlDRTWin::DownArrowType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case ABS_LEFTHOT:
- ASSERT(classicState == (DFCS_SCROLLLEFT | DFCS_HOT));
- ctype = WebThemeControlDRTWin::LeftArrowType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case ABS_RIGHTHOT:
- ASSERT(classicState == (DFCS_SCROLLRIGHT | DFCS_HOT));
- ctype = WebThemeControlDRTWin::RightArrowType;
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case ABS_UPHOVER:
- ASSERT(classicState == DFCS_SCROLLUP);
- ctype = WebThemeControlDRTWin::UpArrowType;
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case ABS_DOWNHOVER:
- ASSERT(classicState == DFCS_SCROLLDOWN);
- ctype = WebThemeControlDRTWin::DownArrowType;
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case ABS_LEFTHOVER:
- ASSERT(classicState == DFCS_SCROLLLEFT);
- ctype = WebThemeControlDRTWin::LeftArrowType;
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case ABS_RIGHTHOVER:
- ASSERT(classicState == DFCS_SCROLLRIGHT);
- ctype = WebThemeControlDRTWin::RightArrowType;
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case ABS_UPPRESSED:
- ASSERT(classicState == (DFCS_SCROLLUP | DFCS_PUSHED | DFCS_FLAT));
- ctype = WebThemeControlDRTWin::UpArrowType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case ABS_DOWNPRESSED:
- ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_PUSHED | DFCS_FLAT));
- ctype = WebThemeControlDRTWin::DownArrowType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case ABS_LEFTPRESSED:
- ASSERT(classicState == (DFCS_SCROLLLEFT | DFCS_PUSHED | DFCS_FLAT));
- ctype = WebThemeControlDRTWin::LeftArrowType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case ABS_RIGHTPRESSED:
- ASSERT(classicState == (DFCS_SCROLLRIGHT | DFCS_PUSHED | DFCS_FLAT));
- ctype = WebThemeControlDRTWin::RightArrowType;
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case ABS_UPDISABLED:
- ASSERT(classicState == (DFCS_SCROLLUP | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::UpArrowType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case ABS_DOWNDISABLED:
- ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::DownArrowType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case ABS_LEFTDISABLED:
- ASSERT(classicState == (DFCS_SCROLLLEFT | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::LeftArrowType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case ABS_RIGHTDISABLED:
- ASSERT(classicState == (DFCS_SCROLLRIGHT | DFCS_INACTIVE));
- ctype = WebThemeControlDRTWin::RightArrowType;
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
-
- drawControl(canvas, rect, ctype, cstate);
-}
-
-void WebThemeEngineDRTWin::paintScrollbarThumb(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- switch (part) {
- case SBP_THUMBBTNHORZ:
- ctype = WebThemeControlDRTWin::HorizontalScrollThumbType;
- break;
-
- case SBP_THUMBBTNVERT:
- ctype = WebThemeControlDRTWin::VerticalScrollThumbType;
- break;
-
- case SBP_GRIPPERHORZ:
- ctype = WebThemeControlDRTWin::HorizontalScrollGripType;
- break;
-
- case SBP_GRIPPERVERT:
- ctype = WebThemeControlDRTWin::VerticalScrollGripType;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
-
- switch (state) {
- case SCRBS_NORMAL:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case SCRBS_HOT:
- ASSERT(classicState == DFCS_HOT);
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case SCRBS_HOVER:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case SCRBS_PRESSED:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case SCRBS_DISABLED:
- ASSERT_NOT_REACHED(); // This should never happen in practice.
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
-
- drawControl(canvas, rect, ctype, cstate);
-}
-
-void WebThemeEngineDRTWin::paintScrollbarTrack(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect,
- const WebRect& alignRect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- switch (part) {
- case SBP_UPPERTRACKHORZ:
- ctype = WebThemeControlDRTWin::HorizontalScrollTrackBackType;
- break;
-
- case SBP_LOWERTRACKHORZ:
- ctype = WebThemeControlDRTWin::HorizontalScrollTrackForwardType;
- break;
-
- case SBP_UPPERTRACKVERT:
- ctype = WebThemeControlDRTWin::VerticalScrollTrackBackType;
- break;
-
- case SBP_LOWERTRACKVERT:
- ctype = WebThemeControlDRTWin::VerticalScrollTrackForwardType;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
-
- switch (state) {
- case SCRBS_NORMAL:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case SCRBS_HOT:
- ASSERT_NOT_REACHED(); // This should never happen in practice.
- break;
-
- case SCRBS_HOVER:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::HoverState;
- break;
-
- case SCRBS_PRESSED:
- ASSERT_NOT_REACHED(); // This should never happen in practice.
- break;
-
- case SCRBS_DISABLED:
- ASSERT(classicState == DFCS_INACTIVE);
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- default:
- CRASH();
- break;
- }
-
- drawControl(canvas, rect, ctype, cstate);
-}
-
-void WebThemeEngineDRTWin::paintSpinButton(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- if (part == SPNP_UP) {
- ctype = WebThemeControlDRTWin::UpArrowType;
- switch (state) {
- case UPS_NORMAL:
- ASSERT(classicState == DFCS_SCROLLUP);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
- case UPS_DISABLED:
- ASSERT(classicState == (DFCS_SCROLLUP | DFCS_INACTIVE));
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
- case UPS_PRESSED:
- ASSERT(classicState == (DFCS_SCROLLUP | DFCS_PUSHED));
- cstate = WebThemeControlDRTWin::PressedState;
- break;
- case UPS_HOT:
- ASSERT(classicState == (DFCS_SCROLLUP | DFCS_HOT));
- cstate = WebThemeControlDRTWin::HoverState;
- break;
- default:
- ASSERT_NOT_REACHED();
- }
- } else if (part == SPNP_DOWN) {
- ctype = WebThemeControlDRTWin::DownArrowType;
- switch (state) {
- case DNS_NORMAL:
- ASSERT(classicState == DFCS_SCROLLDOWN);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
- case DNS_DISABLED:
- ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_INACTIVE));
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
- case DNS_PRESSED:
- ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_PUSHED));
- cstate = WebThemeControlDRTWin::PressedState;
- break;
- case DNS_HOT:
- ASSERT(classicState == (DFCS_SCROLLDOWN | DFCS_HOT));
- cstate = WebThemeControlDRTWin::HoverState;
- break;
- default:
- ASSERT_NOT_REACHED();
- }
- } else
- ASSERT_NOT_REACHED();
- drawControl(canvas, rect, ctype, cstate);
-}
-
-void WebThemeEngineDRTWin::paintTextField(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect,
- WebColor color,
- bool fillContentArea,
- bool drawEdges)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- ASSERT(EP_EDITTEXT == part);
- ctype = WebThemeControlDRTWin::TextFieldType;
-
- switch (state) {
- case ETS_NORMAL:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case ETS_HOT:
- ASSERT(classicState == DFCS_HOT);
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case ETS_DISABLED:
- ASSERT(classicState == DFCS_INACTIVE);
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case ETS_SELECTED:
- ASSERT(classicState == DFCS_PUSHED);
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- case ETS_FOCUSED:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::FocusedState;
- break;
-
- case ETS_READONLY:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::ReadOnlyState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
-
- drawTextField(canvas, rect, ctype, cstate, drawEdges, fillContentArea, color);
-}
-
-void WebThemeEngineDRTWin::paintTrackbar(WebCanvas* canvas,
- int part,
- int state,
- int classicState,
- const WebRect& rect)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::UnknownType;
- WebThemeControlDRTWin::State cstate = WebThemeControlDRTWin::UnknownState;
-
- if (TKP_THUMBBOTTOM == part) {
- ctype = WebThemeControlDRTWin::HorizontalSliderThumbType;
- switch (state) {
- case TUS_NORMAL:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case TUS_HOT:
- ASSERT(classicState == DFCS_HOT);
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case TUS_DISABLED:
- ASSERT(classicState == DFCS_INACTIVE);
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case TUS_PRESSED:
- ASSERT(classicState == DFCS_PUSHED);
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
- } else if (TKP_THUMBVERT == part) {
- ctype = WebThemeControlDRTWin::VerticalSliderThumbType;
- switch (state) {
- case TUS_NORMAL:
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- break;
-
- case TUS_HOT:
- ASSERT(classicState == DFCS_HOT);
- cstate = WebThemeControlDRTWin::HotState;
- break;
-
- case TUS_DISABLED:
- ASSERT(classicState == DFCS_INACTIVE);
- cstate = WebThemeControlDRTWin::DisabledState;
- break;
-
- case TUS_PRESSED:
- ASSERT(classicState == DFCS_PUSHED);
- cstate = WebThemeControlDRTWin::PressedState;
- break;
-
- default:
- ASSERT_NOT_REACHED();
- break;
- }
- } else if (TKP_TRACK == part) {
- ctype = WebThemeControlDRTWin::HorizontalSliderTrackType;
- ASSERT(state == TRS_NORMAL);
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- } else if (TKP_TRACKVERT == part) {
- ctype = WebThemeControlDRTWin::VerticalSliderTrackType;
- ASSERT(state == TRVS_NORMAL);
- ASSERT(classicState == dfcsNormal);
- cstate = WebThemeControlDRTWin::NormalState;
- } else
- ASSERT_NOT_REACHED();
-
- drawControl(canvas, rect, ctype, cstate);
-}
-
-
-void WebThemeEngineDRTWin::paintProgressBar(WebKit::WebCanvas* canvas,
- const WebKit::WebRect& barRect,
- const WebKit::WebRect& valueRect,
- bool determinate,
- double)
-{
- WebThemeControlDRTWin::Type ctype = WebThemeControlDRTWin::ProgressBarType;
- WebThemeControlDRTWin::State cstate = determinate ? WebThemeControlDRTWin::NormalState
- : WebThemeControlDRTWin::IndeterminateState;
- drawProgressBar(canvas, ctype, cstate, barRect, valueRect);
-}
-
-
-WebKit::WebSize WebThemeEngineDRTWin::getSize(int part)
-{
- return WebKit::WebSize();
-}
-
diff --git a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h b/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h
deleted file mode 100644
index 33fd6126a..000000000
--- a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTWin.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * 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.
- */
-
-// This implements the WebThemeEngine API used by the Windows version of
-// Chromium to render native form controls like checkboxes, radio buttons,
-// and scroll bars.
-// The normal implementation (native_theme) renders the controls using either
-// the UXTheme theming engine present in XP, Vista, and Win 7, or the "classic"
-// theme used if that theme is selected in the Desktop settings.
-// Unfortunately, both of these themes render controls differently on the
-// different versions of Windows.
-//
-// In order to ensure maximum consistency of baselines across the different
-// Windows versions, we provide a simple implementation for DRT here
-// instead. These controls are actually platform-independent (they're rendered
-// using Skia) and could be used on Linux and the Mac as well, should we
-// choose to do so at some point.
-//
-
-#ifndef WebThemeEngineDRTWin_h
-#define WebThemeEngineDRTWin_h
-
-#include "platform/win/WebThemeEngine.h"
-#include <wtf/Noncopyable.h>
-
-class WebThemeEngineDRTWin : public WebKit::WebThemeEngine {
- WTF_MAKE_NONCOPYABLE(WebThemeEngineDRTWin);
-public:
- WebThemeEngineDRTWin() { }
-
- // WebThemeEngine methods:
- virtual void paintButton(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&);
-
- virtual void paintMenuList(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&);
-
- virtual void paintScrollbarArrow(
- WebKit::WebCanvas*, int state, int classicState,
- const WebKit::WebRect&);
-
- virtual void paintScrollbarThumb(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&);
-
- virtual void paintScrollbarTrack(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&, const WebKit::WebRect& alignRect);
-
- virtual void paintSpinButton(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&);
-
- virtual void paintTextField(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&, WebKit::WebColor, bool fillContentArea,
- bool drawEdges);
-
- virtual void paintTrackbar(
- WebKit::WebCanvas*, int part, int state, int classicState,
- const WebKit::WebRect&);
-
- virtual void paintProgressBar(
- WebKit::WebCanvas*, const WebKit::WebRect& barRect,
- const WebKit::WebRect& valueRect,
- bool determinate, double time);
-
- virtual WebKit::WebSize getSize(int part);
-};
-
-#endif // WebThemeEngineDRTWin_h
diff --git a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp
deleted file mode 100644
index 3878ff167..000000000
--- a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-#if ENABLE(MEDIA_STREAM)
-
-#include "WebUserMediaClientMock.h"
-
-#include "MockConstraints.h"
-#include "Task.h"
-#include "WebDocument.h"
-#include "WebMediaStreamRegistry.h"
-#include "WebUserMediaRequest.h"
-#include <public/WebMediaConstraints.h>
-#include <public/WebMediaStreamDescriptor.h>
-#include <public/WebMediaStreamSource.h>
-#include <public/WebVector.h>
-#include <wtf/Assertions.h>
-
-using namespace WebKit;
-using namespace WebTestRunner;
-
-class UserMediaRequestTask : public WebMethodTask<WebUserMediaClientMock> {
-public:
- UserMediaRequestTask(WebUserMediaClientMock* object, const WebUserMediaRequest& request, const WebMediaStreamDescriptor result)
- : WebMethodTask<WebUserMediaClientMock>(object)
- , m_request(request)
- , m_result(result)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- if (m_result.isNull())
- m_request.requestFailed();
- else
- m_request.requestSucceeded(m_result);
- }
-
-private:
- WebUserMediaRequest m_request;
- WebMediaStreamDescriptor m_result;
-};
-
-////////////////////////////////
-
-class MockExtraData : public WebMediaStreamDescriptor::ExtraData {
-public:
- int foo;
-};
-
-PassOwnPtr<WebUserMediaClientMock> WebUserMediaClientMock::create()
-{
- return adoptPtr(new WebUserMediaClientMock());
-}
-
-void WebUserMediaClientMock::requestUserMedia(const WebUserMediaRequest& streamRequest, const WebVector<WebMediaStreamSource>& audioSourcesVector, const WebVector<WebMediaStreamSource>& videoSourcesVector)
-{
- ASSERT(!streamRequest.isNull());
- WebUserMediaRequest request = streamRequest;
-
- if (request.ownerDocument().isNull() || !request.ownerDocument().frame()) {
- postTask(new UserMediaRequestTask(this, request, WebMediaStreamDescriptor()));
- return;
- }
-
- WebMediaConstraints constraints = request.audioConstraints();
- if (!constraints.isNull() && !MockConstraints::verifyConstraints(constraints)) {
- postTask(new UserMediaRequestTask(this, request, WebMediaStreamDescriptor()));
- return;
- }
- constraints = request.videoConstraints();
- if (!constraints.isNull() && !MockConstraints::verifyConstraints(constraints)) {
- postTask(new UserMediaRequestTask(this, request, WebMediaStreamDescriptor()));
- return;
- }
-
- const size_t zero = 0;
- const size_t one = 1;
- WebVector<WebMediaStreamSource> audioSources(request.audio() ? one : zero);
- WebVector<WebMediaStreamSource> videoSources(request.video() ? one : zero);
-
- if (request.audio())
- audioSources[0].initialize("MockAudioDevice#1", WebMediaStreamSource::TypeAudio, "Mock audio device");
-
- if (request.video())
- videoSources[0].initialize("MockVideoDevice#1", WebMediaStreamSource::TypeVideo, "Mock video device");
-
- WebMediaStreamDescriptor stream;
- stream.initialize("foobar", audioSources, videoSources);
-
- stream.setExtraData(new MockExtraData());
-
- postTask(new UserMediaRequestTask(this, request, stream));
-}
-
-void WebUserMediaClientMock::cancelUserMediaRequest(const WebUserMediaRequest&)
-{
-}
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h
deleted file mode 100644
index ef4cb51d1..000000000
--- a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebUserMediaClientMock_h
-#define WebUserMediaClientMock_h
-
-#if ENABLE(MEDIA_STREAM)
-
-#include "WebTask.h"
-#include "WebUserMediaClient.h"
-#include "webkit/support/test_media_stream_client.h"
-#include <public/WebCommon.h>
-#include <public/WebString.h>
-#include <public/WebURL.h>
-#include <wtf/PassOwnPtr.h>
-
-class WebUserMediaClientMock : public WebKit::WebUserMediaClient {
-public:
- static PassOwnPtr<WebUserMediaClientMock> create();
- ~WebUserMediaClientMock() { }
-
- virtual void requestUserMedia(const WebKit::WebUserMediaRequest&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&) OVERRIDE;
- virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&);
-
- // Task related methods
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
-private:
- WebUserMediaClientMock() { }
-
- WebTestRunner::WebTaskList m_taskList;
-};
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // WebUserMediaClientMock_h
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
deleted file mode 100644
index bc5f9942b..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ /dev/null
@@ -1,1874 +0,0 @@
-/*
- * Copyright (C) 2010, 2011, 2012 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.
- */
-
-#include "config.h"
-#include "WebViewHost.h"
-
-#include "DRTTestRunner.h"
-#include "MockGrammarCheck.h"
-#include "MockWebSpeechInputController.h"
-#include "MockWebSpeechRecognizer.h"
-#include "Task.h"
-#include "TestNavigationController.h"
-#include "TestShell.h"
-#include "TestWebPlugin.h"
-#include "WebCachedURLRequest.h"
-#include "WebConsoleMessage.h"
-#include "WebContextMenuData.h"
-#include "WebDOMMessageEvent.h"
-#include "WebDataSource.h"
-#include "WebDeviceOrientationClientMock.h"
-#include "WebDocument.h"
-#include "WebElement.h"
-#include "WebEventSender.h"
-#include "WebFrame.h"
-#include "WebGeolocationClientMock.h"
-#include "WebHistoryItem.h"
-#include "WebIntent.h"
-#include "WebIntentServiceInfo.h"
-#include "WebKit.h"
-#include "WebNode.h"
-#include "WebPluginParams.h"
-#include "WebPopupMenu.h"
-#include "WebPopupType.h"
-#include "WebPrintParams.h"
-#include "WebRange.h"
-#include "WebScreenInfo.h"
-#include "WebStorageNamespace.h"
-#include "WebTextCheckingCompletion.h"
-#include "WebTextCheckingResult.h"
-#include "WebUserMediaClientMock.h"
-#include "WebView.h"
-#include "WebViewHostOutputSurface.h"
-#include "WebViewHostSoftwareOutputDevice.h"
-#include "WebWindowFeatures.h"
-#include "platform/WebSerializedScriptValue.h"
-#include "skia/ext/platform_canvas.h"
-#include "webkit/support/test_media_stream_client.h"
-#include "webkit/support/webkit_support.h"
-#include <public/WebCString.h>
-#include <public/WebCompositorOutputSurface.h>
-#include <public/WebDragData.h>
-#include <public/WebRect.h>
-#include <public/WebSize.h>
-#include <public/WebThread.h>
-#include <public/WebURLRequest.h>
-#include <public/WebURLResponse.h>
-
-#include <wtf/Assertions.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/Vector.h>
-
-using namespace WebCore;
-using namespace WebKit;
-using namespace WebTestRunner;
-using namespace std;
-
-static const int screenWidth = 1920;
-static const int screenHeight = 1080;
-static const int screenUnavailableBorder = 8;
-
-// WebNavigationType debugging strings taken from PolicyDelegate.mm.
-static const char* linkClickedString = "link clicked";
-static const char* formSubmittedString = "form submitted";
-static const char* backForwardString = "back/forward";
-static const char* reloadString = "reload";
-static const char* formResubmittedString = "form resubmitted";
-static const char* otherString = "other";
-static const char* illegalString = "illegal value";
-
-static int nextPageID = 1;
-
-// Used to write a platform neutral file:/// URL by only taking the filename
-// (e.g., converts "file:///tmp/foo.txt" to just "foo.txt").
-static string urlSuitableForTestResult(const string& url)
-{
- if (url.empty() || string::npos == url.find("file://"))
- return url;
-
- size_t pos = url.rfind('/');
- if (pos == string::npos) {
-#if OS(WINDOWS)
- pos = url.rfind('\\');
- if (pos == string::npos)
- pos = 0;
-#else
- pos = 0;
-#endif
- }
- string filename = url.substr(pos + 1);
- if (filename.empty())
- return "file:"; // A WebKit test has this in its expected output.
- return filename;
-}
-
-// Used to write a platform neutral file:/// URL by taking the
-// filename and its directory. (e.g., converts
-// "file:///tmp/foo/bar.txt" to just "bar.txt").
-static string descriptionSuitableForTestResult(const string& url)
-{
- if (url.empty() || string::npos == url.find("file://"))
- return url;
-
- size_t pos = url.rfind('/');
- if (pos == string::npos || !pos)
- return "ERROR:" + url;
- pos = url.rfind('/', pos - 1);
- if (pos == string::npos)
- return "ERROR:" + url;
-
- return url.substr(pos + 1);
-}
-
-// Get a debugging string from a WebNavigationType.
-static const char* webNavigationTypeToString(WebNavigationType type)
-{
- switch (type) {
- case WebKit::WebNavigationTypeLinkClicked:
- return linkClickedString;
- case WebKit::WebNavigationTypeFormSubmitted:
- return formSubmittedString;
- case WebKit::WebNavigationTypeBackForward:
- return backForwardString;
- case WebKit::WebNavigationTypeReload:
- return reloadString;
- case WebKit::WebNavigationTypeFormResubmitted:
- return formResubmittedString;
- case WebKit::WebNavigationTypeOther:
- return otherString;
- }
- return illegalString;
-}
-
-static string URLDescription(const GURL& url)
-{
- if (url.SchemeIs("file"))
- return url.ExtractFileName();
- return url.possibly_invalid_spec();
-}
-
-static void printResponseDescription(const WebURLResponse& response)
-{
- if (response.isNull()) {
- fputs("(null)", stdout);
- return;
- }
- string url = response.url().spec();
- printf("<NSURLResponse %s, http status code %d>",
- descriptionSuitableForTestResult(url).c_str(),
- response.httpStatusCode());
-}
-
-static void printNodeDescription(const WebNode& node, int exception)
-{
- if (exception) {
- fputs("ERROR", stdout);
- return;
- }
- if (node.isNull()) {
- fputs("(null)", stdout);
- return;
- }
- fputs(node.nodeName().utf8().data(), stdout);
- const WebNode& parent = node.parentNode();
- if (!parent.isNull()) {
- fputs(" > ", stdout);
- printNodeDescription(parent, 0);
- }
-}
-
-static void printRangeDescription(const WebRange& range)
-{
- if (range.isNull()) {
- fputs("(null)", stdout);
- return;
- }
- printf("range from %d of ", range.startOffset());
- int exception = 0;
- WebNode startNode = range.startContainer(exception);
- printNodeDescription(startNode, exception);
- printf(" to %d of ", range.endOffset());
- WebNode endNode = range.endContainer(exception);
- printNodeDescription(endNode, exception);
-}
-
-static string editingActionDescription(WebEditingAction action)
-{
- switch (action) {
- case WebKit::WebEditingActionTyped:
- return "WebViewInsertActionTyped";
- case WebKit::WebEditingActionPasted:
- return "WebViewInsertActionPasted";
- case WebKit::WebEditingActionDropped:
- return "WebViewInsertActionDropped";
- }
- return "(UNKNOWN ACTION)";
-}
-
-static string textAffinityDescription(WebTextAffinity affinity)
-{
- switch (affinity) {
- case WebKit::WebTextAffinityUpstream:
- return "NSSelectionAffinityUpstream";
- case WebKit::WebTextAffinityDownstream:
- return "NSSelectionAffinityDownstream";
- }
- return "(UNKNOWN AFFINITY)";
-}
-
-// WebViewClient -------------------------------------------------------------
-
-WebView* WebViewHost::createView(WebFrame* creator, const WebURLRequest& request, const WebWindowFeatures&, const WebString&, WebNavigationPolicy)
-{
- if (!testRunner()->canOpenWindows())
- return 0;
- if (testRunner()->shouldDumpCreateView())
- fprintf(stdout, "createView(%s)\n", URLDescription(request.url()).c_str());
- creator->consumeUserGesture();
- return m_shell->createNewWindow(WebURL())->webView();
-}
-
-WebWidget* WebViewHost::createPopupMenu(WebPopupType type)
-{
- switch (type) {
- case WebKit::WebPopupTypeNone:
- case WebKit::WebPopupTypePage:
- case WebKit::WebPopupTypeHelperPlugin:
- break;
- case WebKit::WebPopupTypeSelect:
- case WebKit::WebPopupTypeSuggestion:
- m_popupmenus.append(WebPopupMenu::create(0));
- return m_popupmenus.last();
- }
- return 0;
-}
-
-WebWidget* WebViewHost::createPopupMenu(const WebPopupMenuInfo&)
-{
- // Do not use this method. It's been replaced by createExternalPopupMenu.
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-WebStorageNamespace* WebViewHost::createSessionStorageNamespace(unsigned quota)
-{
- return webkit_support::CreateSessionStorageNamespace(quota);
-}
-
-WebCompositorOutputSurface* WebViewHost::createOutputSurface()
-{
- if (!webView())
- return 0;
-
- if (m_shell->softwareCompositingEnabled())
- return WebViewHostOutputSurface::createSoftware(adoptPtr(new WebViewHostSoftwareOutputDevice)).leakPtr();
- return WebViewHostOutputSurface::create3d(adoptPtr(webkit_support::CreateGraphicsContext3D(WebGraphicsContext3D::Attributes(), webView()))).leakPtr();
-}
-
-void WebViewHost::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine)
-{
- // This matches win DumpRenderTree's UIDelegate.cpp.
- if (!m_logConsoleOutput)
- return;
- string newMessage;
- if (!message.text.isEmpty()) {
- newMessage = message.text.utf8();
- size_t fileProtocol = newMessage.find("file://");
- if (fileProtocol != string::npos) {
- newMessage = newMessage.substr(0, fileProtocol)
- + urlSuitableForTestResult(newMessage.substr(fileProtocol));
- }
- }
- printf("CONSOLE MESSAGE: ");
- if (sourceLine)
- printf("line %d: ", sourceLine);
- printf("%s\n", newMessage.data());
-}
-
-void WebViewHost::didStartLoading()
-{
- m_shell->setIsLoading(true);
-}
-
-void WebViewHost::didStopLoading()
-{
- if (testRunner()->shouldDumpProgressFinishedCallback())
- fputs("postProgressFinishedNotification\n", stdout);
- m_shell->setIsLoading(false);
-}
-
-// The output from these methods in layout test mode should match that
-// expected by the layout tests. See EditingDelegate.m in DumpRenderTree.
-
-bool WebViewHost::shouldBeginEditing(const WebRange& range)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- fputs("EDITING DELEGATE: shouldBeginEditingInDOMRange:", stdout);
- printRangeDescription(range);
- fputs("\n", stdout);
- }
- return true;
-}
-
-bool WebViewHost::shouldEndEditing(const WebRange& range)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- fputs("EDITING DELEGATE: shouldEndEditingInDOMRange:", stdout);
- printRangeDescription(range);
- fputs("\n", stdout);
- }
- return true;
-}
-
-bool WebViewHost::shouldInsertNode(const WebNode& node, const WebRange& range, WebEditingAction action)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- fputs("EDITING DELEGATE: shouldInsertNode:", stdout);
- printNodeDescription(node, 0);
- fputs(" replacingDOMRange:", stdout);
- printRangeDescription(range);
- printf(" givenAction:%s\n", editingActionDescription(action).c_str());
- }
- return true;
-}
-
-bool WebViewHost::shouldInsertText(const WebString& text, const WebRange& range, WebEditingAction action)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- printf("EDITING DELEGATE: shouldInsertText:%s replacingDOMRange:", text.utf8().data());
- printRangeDescription(range);
- printf(" givenAction:%s\n", editingActionDescription(action).c_str());
- }
- return true;
-}
-
-bool WebViewHost::shouldChangeSelectedRange(
- const WebRange& fromRange, const WebRange& toRange, WebTextAffinity affinity, bool stillSelecting)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- fputs("EDITING DELEGATE: shouldChangeSelectedDOMRange:", stdout);
- printRangeDescription(fromRange);
- fputs(" toDOMRange:", stdout);
- printRangeDescription(toRange);
- printf(" affinity:%s stillSelecting:%s\n",
- textAffinityDescription(affinity).c_str(),
- (stillSelecting ? "TRUE" : "FALSE"));
- }
- return true;
-}
-
-bool WebViewHost::shouldDeleteRange(const WebRange& range)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- fputs("EDITING DELEGATE: shouldDeleteDOMRange:", stdout);
- printRangeDescription(range);
- fputs("\n", stdout);
- }
- return true;
-}
-
-bool WebViewHost::shouldApplyStyle(const WebString& style, const WebRange& range)
-{
- if (testRunner()->shouldDumpEditingCallbacks()) {
- printf("EDITING DELEGATE: shouldApplyStyle:%s toElementsInDOMRange:", style.utf8().data());
- printRangeDescription(range);
- fputs("\n", stdout);
- }
- return true;
-}
-
-bool WebViewHost::isSmartInsertDeleteEnabled()
-{
- return m_smartInsertDeleteEnabled;
-}
-
-bool WebViewHost::isSelectTrailingWhitespaceEnabled()
-{
- return m_selectTrailingWhitespaceEnabled;
-}
-
-void WebViewHost::didBeginEditing()
-{
- if (!testRunner()->shouldDumpEditingCallbacks())
- return;
- fputs("EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification\n", stdout);
-}
-
-void WebViewHost::didChangeSelection(bool isEmptySelection)
-{
- if (testRunner()->shouldDumpEditingCallbacks())
- fputs("EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification\n", stdout);
- // No need to update clipboard with the selected text in DRT.
-}
-
-void WebViewHost::didChangeContents()
-{
- if (!testRunner()->shouldDumpEditingCallbacks())
- return;
- fputs("EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification\n", stdout);
-}
-
-void WebViewHost::didEndEditing()
-{
- if (!testRunner()->shouldDumpEditingCallbacks())
- return;
- fputs("EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification\n", stdout);
-}
-
-bool WebViewHost::handleCurrentKeyboardEvent()
-{
- if (m_editCommandName.empty())
- return false;
- WebFrame* frame = webView()->focusedFrame();
- if (!frame)
- return false;
-
- return frame->executeCommand(WebString::fromUTF8(m_editCommandName), WebString::fromUTF8(m_editCommandValue));
-}
-
-// WebKit::WebPrerendererClient
-
-void WebViewHost::willAddPrerender(WebKit::WebPrerender*)
-{
-}
-
-
-// WebKit::WebSpellCheckClient
-
-void WebViewHost::spellCheck(const WebString& text, int& misspelledOffset, int& misspelledLength, WebVector<WebString>* optionalSuggestions)
-{
- // Check the spelling of the given text.
- m_spellcheck.spellCheckWord(text, &misspelledOffset, &misspelledLength);
-}
-
-void WebViewHost::checkTextOfParagraph(const WebString& text, WebTextCheckingTypeMask mask, WebVector<WebTextCheckingResult>* webResults)
-{
- Vector<WebTextCheckingResult> results;
- if (mask & WebTextCheckingTypeSpelling) {
- size_t offset = 0;
- size_t length = text.length();
- const WebUChar* data = text.data();
- while (offset < length) {
- int misspelledPosition = 0;
- int misspelledLength = 0;
- m_spellcheck.spellCheckWord(WebString(&data[offset], length - offset), &misspelledPosition, &misspelledLength);
- if (!misspelledLength)
- break;
- WebTextCheckingResult result;
- result.type = WebTextCheckingTypeSpelling;
- result.location = offset + misspelledPosition;
- result.length = misspelledLength;
- results.append(result);
- offset += misspelledPosition + misspelledLength;
- }
- }
- if (mask & WebTextCheckingTypeGrammar)
- MockGrammarCheck::checkGrammarOfString(text, &results);
- webResults->assign(results);
-}
-
-void WebViewHost::requestCheckingOfText(const WebString& text, WebTextCheckingCompletion* completion)
-{
- if (text.isEmpty()) {
- if (completion)
- completion->didCancelCheckingText();
- return;
- }
-
- m_lastRequestedTextCheckingCompletion = completion;
- m_lastRequestedTextCheckString = text;
- postDelayedTask(new HostMethodTask(this, &WebViewHost::finishLastTextCheck), 0);
-}
-
-void WebViewHost::finishLastTextCheck()
-{
- Vector<WebTextCheckingResult> results;
- int offset = 0;
- String text(m_lastRequestedTextCheckString.data(), m_lastRequestedTextCheckString.length());
- while (text.length()) {
- int misspelledPosition = 0;
- int misspelledLength = 0;
- m_spellcheck.spellCheckWord(WebString(text.characters(), text.length()), &misspelledPosition, &misspelledLength);
- if (!misspelledLength)
- break;
- WebVector<WebString> suggestions;
- m_spellcheck.fillSuggestionList(WebString(text.characters() + misspelledPosition, misspelledLength), &suggestions);
- results.append(WebTextCheckingResult(WebTextCheckingTypeSpelling, offset + misspelledPosition, misspelledLength,
- suggestions.isEmpty() ? WebString() : suggestions[0]));
- text = text.substring(misspelledPosition + misspelledLength);
- offset += misspelledPosition + misspelledLength;
- }
- MockGrammarCheck::checkGrammarOfString(m_lastRequestedTextCheckString, &results);
- m_lastRequestedTextCheckingCompletion->didFinishCheckingText(results);
- m_lastRequestedTextCheckingCompletion = 0;
-}
-
-
-WebString WebViewHost::autoCorrectWord(const WebString&)
-{
- // Returns an empty string as Mac WebKit ('WebKitSupport/WebEditorClient.mm')
- // does. (If this function returns a non-empty string, WebKit replaces the
- // given misspelled string with the result one. This process executes some
- // editor commands and causes layout-test failures.)
- return WebString();
-}
-
-void WebViewHost::runModalAlertDialog(WebFrame*, const WebString& message)
-{
- printf("ALERT: %s\n", message.utf8().data());
- fflush(stdout);
-}
-
-bool WebViewHost::runModalConfirmDialog(WebFrame*, const WebString& message)
-{
- printf("CONFIRM: %s\n", message.utf8().data());
- return true;
-}
-
-bool WebViewHost::runModalPromptDialog(WebFrame* frame, const WebString& message,
- const WebString& defaultValue, WebString*)
-{
- printf("PROMPT: %s, default text: %s\n", message.utf8().data(), defaultValue.utf8().data());
- return true;
-}
-
-bool WebViewHost::runModalBeforeUnloadDialog(WebFrame*, const WebString& message)
-{
- printf("CONFIRM NAVIGATION: %s\n", message.utf8().data());
- return !testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
-}
-
-void WebViewHost::showContextMenu(WebFrame*, const WebContextMenuData& contextMenuData)
-{
- m_lastContextMenuData = adoptPtr(new WebContextMenuData(contextMenuData));
-}
-
-void WebViewHost::setStatusText(const WebString& text)
-{
- if (!testRunner()->shouldDumpStatusCallbacks())
- return;
- // When running tests, write to stdout.
- printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", text.utf8().data());
-}
-
-void WebViewHost::didUpdateLayout()
-{
-#if OS(MAC_OS_X)
- static bool queryingPreferredSize = false;
- if (queryingPreferredSize)
- return;
-
- queryingPreferredSize = true;
- // Query preferred width to emulate the same functionality in Chromium:
- // see RenderView::CheckPreferredSize (src/content/renderer/render_view.cc)
- // and TabContentsViewMac::RenderViewCreated (src/chrome/browser/tab_contents/tab_contents_view_mac.mm)
- webView()->mainFrame()->contentsPreferredWidth();
- webView()->mainFrame()->documentElementScrollHeight();
- queryingPreferredSize = false;
-#endif
-}
-
-void WebViewHost::navigateBackForwardSoon(int offset)
-{
- navigationController()->goToOffset(offset);
-}
-
-int WebViewHost::historyBackListCount()
-{
- return navigationController()->lastCommittedEntryIndex();
-}
-
-int WebViewHost::historyForwardListCount()
-{
- int currentIndex =navigationController()->lastCommittedEntryIndex();
- return navigationController()->entryCount() - currentIndex - 1;
-}
-
-#if ENABLE(NOTIFICATIONS)
-WebNotificationPresenter* WebViewHost::notificationPresenter()
-{
- return m_shell->notificationPresenter();
-}
-#endif
-
-WebKit::WebGeolocationClient* WebViewHost::geolocationClient()
-{
- return geolocationClientMock();
-}
-
-WebKit::WebGeolocationClientMock* WebViewHost::geolocationClientMock()
-{
- if (!m_geolocationClientMock)
- m_geolocationClientMock = adoptPtr(WebGeolocationClientMock::create());
- return m_geolocationClientMock.get();
-}
-
-#if ENABLE(INPUT_SPEECH)
-WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener)
-{
- if (!m_speechInputControllerMock)
- m_speechInputControllerMock = MockWebSpeechInputController::create(listener);
- return m_speechInputControllerMock.get();
-}
-#endif
-
-#if ENABLE(SCRIPTED_SPEECH)
-WebSpeechRecognizer* WebViewHost::speechRecognizer()
-{
- if (!m_mockSpeechRecognizer)
- m_mockSpeechRecognizer = MockWebSpeechRecognizer::create();
- return m_mockSpeechRecognizer.get();
-}
-#endif
-
-WebDeviceOrientationClientMock* WebViewHost::deviceOrientationClientMock()
-{
- if (!m_deviceOrientationClientMock.get())
- m_deviceOrientationClientMock = adoptPtr(WebDeviceOrientationClientMock::create());
- return m_deviceOrientationClientMock.get();
-}
-
-MockSpellCheck* WebViewHost::mockSpellCheck()
-{
- return &m_spellcheck;
-}
-
-WebDeviceOrientationClient* WebViewHost::deviceOrientationClient()
-{
- return deviceOrientationClientMock();
-}
-
-#if ENABLE(MEDIA_STREAM)
-WebUserMediaClient* WebViewHost::userMediaClient()
-{
- return userMediaClientMock();
-}
-
-WebUserMediaClientMock* WebViewHost::userMediaClientMock()
-{
- if (!m_userMediaClientMock.get())
- m_userMediaClientMock = WebUserMediaClientMock::create();
- return m_userMediaClientMock.get();
-}
-#endif
-
-// WebWidgetClient -----------------------------------------------------------
-
-void WebViewHost::didAutoResize(const WebSize& newSize)
-{
- // Purposely don't include the virtualWindowBorder in this case so that
- // window.inner[Width|Height] is the same as window.outer[Width|Height]
- setWindowRect(WebRect(0, 0, newSize.width, newSize.height));
-}
-
-void WebViewHost::scheduleAnimation()
-{
- if (webView()->settings()->scrollAnimatorEnabled())
- webView()->animate(0.0);
-}
-
-void WebViewHost::didFocus()
-{
- m_shell->setFocus(webWidget(), true);
-}
-
-void WebViewHost::didBlur()
-{
- m_shell->setFocus(webWidget(), false);
-}
-
-WebScreenInfo WebViewHost::screenInfo()
-{
- // We don't need to set actual values.
- WebScreenInfo info;
- info.depth = 24;
- info.depthPerComponent = 8;
- info.isMonochrome = false;
- info.rect = WebRect(0, 0, screenWidth, screenHeight);
- // Use values different from info.rect for testing.
- info.availableRect = WebRect(screenUnavailableBorder, screenUnavailableBorder,
- screenWidth - screenUnavailableBorder * 2,
- screenHeight - screenUnavailableBorder * 2);
- return info;
-}
-
-#if ENABLE(POINTER_LOCK)
-bool WebViewHost::requestPointerLock()
-{
- switch (m_pointerLockPlannedResult) {
- case PointerLockWillSucceed:
- postDelayedTask(new HostMethodTask(this, &WebViewHost::didAcquirePointerLock), 0);
- return true;
- case PointerLockWillRespondAsync:
- ASSERT(!m_pointerLocked);
- return true;
- case PointerLockWillFailSync:
- ASSERT(!m_pointerLocked);
- return false;
- default:
- ASSERT_NOT_REACHED();
- return false;
- }
-}
-
-void WebViewHost::requestPointerUnlock()
-{
- postDelayedTask(new HostMethodTask(this, &WebViewHost::didLosePointerLock), 0);
-}
-
-bool WebViewHost::isPointerLocked()
-{
- return m_pointerLocked;
-}
-
-void WebViewHost::didAcquirePointerLock()
-{
- m_pointerLocked = true;
- webWidget()->didAcquirePointerLock();
-
- // Reset planned result to default.
- m_pointerLockPlannedResult = PointerLockWillSucceed;
-}
-
-void WebViewHost::didNotAcquirePointerLock()
-{
- ASSERT(!m_pointerLocked);
- m_pointerLocked = false;
- webWidget()->didNotAcquirePointerLock();
-
- // Reset planned result to default.
- m_pointerLockPlannedResult = PointerLockWillSucceed;
-}
-
-void WebViewHost::didLosePointerLock()
-{
- bool wasLocked = m_pointerLocked;
- m_pointerLocked = false;
- if (wasLocked)
- webWidget()->didLosePointerLock();
-}
-#endif
-
-void WebViewHost::show(WebNavigationPolicy)
-{
- m_hasWindow = true;
-}
-
-
-
-void WebViewHost::closeWidget()
-{
- m_hasWindow = false;
- m_shell->closeWindow(this);
- // No more code here, we should be deleted at this point.
-}
-
-void WebViewHost::closeWidgetSoon()
-{
- postDelayedTask(new HostMethodTask(this, &WebViewHost::closeWidget), 0);
-}
-
-void WebViewHost::didChangeCursor(const WebCursorInfo& cursorInfo)
-{
- if (!hasWindow())
- return;
- m_currentCursor = cursorInfo;
-}
-
-WebRect WebViewHost::windowRect()
-{
- return m_windowRect;
-}
-
-void WebViewHost::setWindowRect(const WebRect& rect)
-{
- m_windowRect = rect;
- const int border2 = TestShell::virtualWindowBorder * 2;
- if (m_windowRect.width <= border2)
- m_windowRect.width = 1 + border2;
- if (m_windowRect.height <= border2)
- m_windowRect.height = 1 + border2;
- int width = m_windowRect.width - border2;
- int height = m_windowRect.height - border2;
- discardBackingStore();
- webWidget()->resize(WebSize(width, height));
-}
-
-WebRect WebViewHost::rootWindowRect()
-{
- return windowRect();
-}
-
-WebRect WebViewHost::windowResizerRect()
-{
- // Not necessary.
- return WebRect();
-}
-
-void WebViewHost::runModal()
-{
- if (m_shell->isDisplayingModalDialog()) {
- // DumpRenderTree doesn't support real modal dialogs, so a test shouldn't try to start two modal dialogs at the same time.
- ASSERT_NOT_REACHED();
- return;
- }
- // This WebViewHost might get deleted before RunMessageLoop() returns, so keep a copy of the m_shell member variable around.
- ASSERT(m_shell->webViewHost() != this);
- TestShell* shell = m_shell;
- shell->setIsDisplayingModalDialog(true);
- bool oldState = webkit_support::MessageLoopNestableTasksAllowed();
- webkit_support::MessageLoopSetNestableTasksAllowed(true);
- m_inModalLoop = true;
- webkit_support::RunMessageLoop();
- webkit_support::MessageLoopSetNestableTasksAllowed(oldState);
- shell->setIsDisplayingModalDialog(false);
-}
-
-bool WebViewHost::enterFullScreen()
-{
- postDelayedTask(new HostMethodTask(this, &WebViewHost::enterFullScreenNow), 0);
- return true;
-}
-
-void WebViewHost::exitFullScreen()
-{
- postDelayedTask(new HostMethodTask(this, &WebViewHost::exitFullScreenNow), 0);
-}
-
-// WebFrameClient ------------------------------------------------------------
-
-WebPlugin* WebViewHost::createPlugin(WebFrame* frame, const WebPluginParams& params)
-{
- if (params.mimeType == TestWebPlugin::mimeType())
- return new TestWebPlugin(frame, params);
-
- return webkit_support::CreateWebPlugin(frame, params);
-}
-
-WebMediaPlayer* WebViewHost::createMediaPlayer(WebFrame* frame, const WebURL& url, WebMediaPlayerClient* client)
-{
-#if ENABLE(MEDIA_STREAM)
- return webkit_support::CreateMediaPlayer(frame, url, client, testMediaStreamClient());
-#else
- return webkit_support::CreateMediaPlayer(frame, url, client);
-#endif
-}
-
-WebApplicationCacheHost* WebViewHost::createApplicationCacheHost(WebFrame* frame, WebApplicationCacheHostClient* client)
-{
- return webkit_support::CreateApplicationCacheHost(frame, client);
-}
-
-void WebViewHost::loadURLExternally(WebFrame* frame, const WebURLRequest& request, WebNavigationPolicy policy)
-{
- loadURLExternally(frame, request, policy, WebString());
-}
-
-void WebViewHost::loadURLExternally(WebFrame*, const WebURLRequest& request, WebNavigationPolicy policy, const WebString& downloadName)
-{
- ASSERT(policy != WebKit::WebNavigationPolicyCurrentTab);
- WebViewHost* another = m_shell->createNewWindow(request.url());
- if (another)
- another->show(policy);
-}
-
-WebNavigationPolicy WebViewHost::decidePolicyForNavigation(
- WebFrame*, const WebURLRequest& request,
- WebNavigationType type, const WebNode& originatingNode,
- WebNavigationPolicy defaultPolicy, bool isRedirect)
-{
- WebNavigationPolicy result;
- if (!m_policyDelegateEnabled)
- return defaultPolicy;
-
- printf("Policy delegate: attempt to load %s with navigation type '%s'",
- URLDescription(request.url()).c_str(), webNavigationTypeToString(type));
- if (!originatingNode.isNull()) {
- fputs(" originating from ", stdout);
- printNodeDescription(originatingNode, 0);
- }
- fputs("\n", stdout);
- if (m_policyDelegateIsPermissive)
- result = WebKit::WebNavigationPolicyCurrentTab;
- else
- result = WebKit::WebNavigationPolicyIgnore;
-
- if (m_policyDelegateShouldNotifyDone)
- testRunner()->policyDelegateDone();
- return result;
-}
-
-bool WebViewHost::canHandleRequest(WebFrame*, const WebURLRequest& request)
-{
- GURL url = request.url();
- // Just reject the scheme used in
- // LayoutTests/http/tests/misc/redirect-to-external-url.html
- return !url.SchemeIs("spaceballs");
-}
-
-WebURLError WebViewHost::cannotHandleRequestError(WebFrame*, const WebURLRequest& request)
-{
- WebURLError error;
- // A WebKit layout test expects the following values.
- // unableToImplementPolicyWithError() below prints them.
- error.domain = WebString::fromUTF8("WebKitErrorDomain");
- error.reason = 101;
- error.unreachableURL = request.url();
- return error;
-}
-
-WebURLError WebViewHost::cancelledError(WebFrame*, const WebURLRequest& request)
-{
- return webkit_support::CreateCancelledError(request);
-}
-
-void WebViewHost::unableToImplementPolicyWithError(WebFrame* frame, const WebURLError& error)
-{
- printf("Policy delegate: unable to implement policy with error domain '%s', "
- "error code %d, in frame '%s'\n",
- error.domain.utf8().data(), error.reason, frame->uniqueName().utf8().data());
-}
-
-void WebViewHost::willPerformClientRedirect(WebFrame* frame, const WebURL& from, const WebURL& to,
- double interval, double fire_time)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- printf(" - willPerformClientRedirectToURL: %s \n", to.spec().data());
- }
-
- if (m_shell->shouldDumpUserGestureInFrameLoadCallbacks())
- printFrameUserGestureStatus(frame, " - in willPerformClientRedirect\n");
-}
-
-void WebViewHost::didCancelClientRedirect(WebFrame* frame)
-{
- if (!m_shell->shouldDumpFrameLoadCallbacks())
- return;
- printFrameDescription(frame);
- fputs(" - didCancelClientRedirectForFrame\n", stdout);
-}
-
-void WebViewHost::didCreateDataSource(WebFrame*, WebDataSource* ds)
-{
- ds->setExtraData(m_pendingExtraData.leakPtr());
- if (!testRunner()->deferMainResourceDataLoad())
- ds->setDeferMainResourceDataLoad(false);
-}
-
-void WebViewHost::didStartProvisionalLoad(WebFrame* frame)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didStartProvisionalLoadForFrame\n", stdout);
- }
-
- if (m_shell->shouldDumpUserGestureInFrameLoadCallbacks())
- printFrameUserGestureStatus(frame, " - in didStartProvisionalLoadForFrame\n");
-
- if (!m_topLoadingFrame)
- m_topLoadingFrame = frame;
-
- if (testRunner()->stopProvisionalFrameLoads()) {
- printFrameDescription(frame);
- fputs(" - stopping load in didStartProvisionalLoadForFrame callback\n", stdout);
- frame->stopLoading();
- }
- updateAddressBar(frame->view());
-}
-
-void WebViewHost::didReceiveServerRedirectForProvisionalLoad(WebFrame* frame)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didReceiveServerRedirectForProvisionalLoadForFrame\n", stdout);
- }
- updateAddressBar(frame->view());
-}
-
-void WebViewHost::didFailProvisionalLoad(WebFrame* frame, const WebURLError& error)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didFailProvisionalLoadWithError\n", stdout);
- }
-
- locationChangeDone(frame);
-
- // Don't display an error page if we're running layout tests, because
- // DumpRenderTree doesn't.
-}
-
-void WebViewHost::didCommitProvisionalLoad(WebFrame* frame, bool isNewNavigation)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didCommitLoadForFrame\n", stdout);
- }
- updateForCommittedLoad(frame, isNewNavigation);
-}
-
-void WebViewHost::didClearWindowObject(WebFrame* frame)
-{
- m_shell->bindJSObjectsToWindow(frame);
-}
-
-void WebViewHost::didReceiveTitle(WebFrame* frame, const WebString& title, WebTextDirection direction)
-{
- WebCString title8 = title.utf8();
-
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- printf(" - didReceiveTitle: %s\n", title8.data());
- }
-
- if (testRunner()->shouldDumpTitleChanges())
- printf("TITLE CHANGED: '%s'\n", title8.data());
-
- setPageTitle(title);
- testRunner()->setTitleTextDirection(direction);
-}
-
-void WebViewHost::didFinishDocumentLoad(WebFrame* frame)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didFinishDocumentLoadForFrame\n", stdout);
- } else {
- unsigned pendingUnloadEvents = frame->unloadListenerCount();
- if (pendingUnloadEvents) {
- printFrameDescription(frame);
- printf(" - has %u onunload handler(s)\n", pendingUnloadEvents);
- }
- }
-}
-
-void WebViewHost::didHandleOnloadEvents(WebFrame* frame)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didHandleOnloadEventsForFrame\n", stdout);
- }
-}
-
-void WebViewHost::didFailLoad(WebFrame* frame, const WebURLError& error)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didFailLoadWithError\n", stdout);
- }
- locationChangeDone(frame);
-}
-
-void WebViewHost::didFinishLoad(WebFrame* frame)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didFinishLoadForFrame\n", stdout);
- }
- updateAddressBar(frame->view());
- locationChangeDone(frame);
-}
-
-void WebViewHost::didNavigateWithinPage(WebFrame* frame, bool isNewNavigation)
-{
- frame->dataSource()->setExtraData(m_pendingExtraData.leakPtr());
-
- updateForCommittedLoad(frame, isNewNavigation);
-}
-
-void WebViewHost::didChangeLocationWithinPage(WebFrame* frame)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks()) {
- printFrameDescription(frame);
- fputs(" - didChangeLocationWithinPageForFrame\n", stdout);
- }
-}
-
-void WebViewHost::assignIdentifierToRequest(WebFrame*, unsigned identifier, const WebURLRequest& request)
-{
- if (!m_shell->shouldDumpResourceLoadCallbacks())
- return;
- ASSERT(!m_resourceIdentifierMap.contains(identifier));
- m_resourceIdentifierMap.set(identifier, descriptionSuitableForTestResult(request.url().spec()));
-}
-
-void WebViewHost::removeIdentifierForRequest(unsigned identifier)
-{
- m_resourceIdentifierMap.remove(identifier);
-}
-
-static void blockRequest(WebURLRequest& request)
-{
- request.setURL(WebURL());
-}
-
-static bool isLocalhost(const string& host)
-{
- return host == "127.0.0.1" || host == "localhost";
-}
-
-static bool hostIsUsedBySomeTestsToGenerateError(const string& host)
-{
- return host == "255.255.255.255";
-}
-
-void WebViewHost::willRequestResource(WebKit::WebFrame* frame, const WebKit::WebCachedURLRequest& request)
-{
- if (m_shell->shouldDumpResourceRequestCallbacks()) {
- printFrameDescription(frame);
- WebElement element = request.initiatorElement();
- if (!element.isNull()) {
- printf(" - element with ");
- if (element.hasAttribute("id"))
- printf("id '%s'", element.getAttribute("id").utf8().data());
- else
- printf("no id");
- } else
- printf(" - %s", request.initiatorName().utf8().data());
- printf(" requested '%s'\n", URLDescription(request.urlRequest().url()).c_str());
- }
-}
-
-void WebViewHost::willSendRequest(WebFrame* frame, unsigned identifier, WebURLRequest& request, const WebURLResponse& redirectResponse)
-{
- // Need to use GURL for host() and SchemeIs()
- GURL url = request.url();
- string requestURL = url.possibly_invalid_spec();
-
- GURL mainDocumentURL = request.firstPartyForCookies();
- if (testRunner()->shouldDumpResourceLoadCallbacks()) {
- printResourceDescription(identifier);
- printf(" - willSendRequest <NSURLRequest URL %s, main document URL %s,"
- " http method %s> redirectResponse ",
- descriptionSuitableForTestResult(requestURL).c_str(),
- URLDescription(mainDocumentURL).c_str(),
- request.httpMethod().utf8().data());
- printResponseDescription(redirectResponse);
- fputs("\n", stdout);
- }
-
- request.setExtraData(webkit_support::CreateWebURLRequestExtraData(frame->document().referrerPolicy()));
-
- if (!redirectResponse.isNull() && m_blocksRedirects) {
- fputs("Returning null for this redirect\n", stdout);
- blockRequest(request);
- return;
- }
-
- if (m_requestReturnNull) {
- blockRequest(request);
- return;
- }
-
- string host = url.host();
- if (!host.empty() && (url.SchemeIs("http") || url.SchemeIs("https"))) {
- if (!isLocalhost(host) && !hostIsUsedBySomeTestsToGenerateError(host)
- && ((!mainDocumentURL.SchemeIs("http") && !mainDocumentURL.SchemeIs("https")) || isLocalhost(mainDocumentURL.host()))
- && !m_shell->allowExternalPages()) {
- printf("Blocked access to external URL %s\n", requestURL.c_str());
- blockRequest(request);
- return;
- }
- }
-
- HashSet<String>::const_iterator end = m_clearHeaders.end();
- for (HashSet<String>::const_iterator header = m_clearHeaders.begin(); header != end; ++header)
- request.clearHTTPHeaderField(WebString(header->characters(), header->length()));
-
- // Set the new substituted URL.
- request.setURL(webkit_support::RewriteLayoutTestsURL(request.url().spec()));
-}
-
-void WebViewHost::didReceiveResponse(WebFrame*, unsigned identifier, const WebURLResponse& response)
-{
- if (m_shell->shouldDumpResourceLoadCallbacks()) {
- printResourceDescription(identifier);
- fputs(" - didReceiveResponse ", stdout);
- printResponseDescription(response);
- fputs("\n", stdout);
- }
- if (m_shell->shouldDumpResourceResponseMIMETypes()) {
- GURL url = response.url();
- WebString mimeType = response.mimeType();
- printf("%s has MIME type %s\n",
- url.ExtractFileName().c_str(),
- // Simulate NSURLResponse's mapping of empty/unknown MIME types to application/octet-stream
- mimeType.isEmpty() ? "application/octet-stream" : mimeType.utf8().data());
- }
-}
-
-void WebViewHost::didFinishResourceLoad(WebFrame*, unsigned identifier)
-{
- if (m_shell->shouldDumpResourceLoadCallbacks()) {
- printResourceDescription(identifier);
- fputs(" - didFinishLoading\n", stdout);
- }
- removeIdentifierForRequest(identifier);
-}
-
-void WebViewHost::didFailResourceLoad(WebFrame*, unsigned identifier, const WebURLError& error)
-{
- if (m_shell->shouldDumpResourceLoadCallbacks()) {
- printResourceDescription(identifier);
- fputs(" - didFailLoadingWithError: ", stdout);
- fputs(webkit_support::MakeURLErrorDescription(error).c_str(), stdout);
- fputs("\n", stdout);
- }
- removeIdentifierForRequest(identifier);
-}
-
-void WebViewHost::didDisplayInsecureContent(WebFrame*)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks())
- fputs("didDisplayInsecureContent\n", stdout);
-}
-
-void WebViewHost::didRunInsecureContent(WebFrame*, const WebSecurityOrigin& origin, const WebURL& insecureURL)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks())
- fputs("didRunInsecureContent\n", stdout);
-}
-
-void WebViewHost::didDetectXSS(WebFrame*, const WebURL&, bool)
-{
- if (m_shell->shouldDumpFrameLoadCallbacks())
- fputs("didDetectXSS\n", stdout);
-}
-
-void WebViewHost::openFileSystem(WebFrame* frame, WebFileSystem::Type type, long long size, bool create, WebFileSystemCallbacks* callbacks)
-{
- webkit_support::OpenFileSystem(frame, type, size, create, callbacks);
-}
-
-void WebViewHost::deleteFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSystem::Type type, WebKit::WebFileSystemCallbacks* callbacks)
-{
- webkit_support::DeleteFileSystem(frame, type, callbacks);
-}
-
-bool WebViewHost::willCheckAndDispatchMessageEvent(WebFrame* sourceFrame, WebFrame* targetFrame, WebSecurityOrigin target, WebDOMMessageEvent event)
-{
- if (m_shell->testRunner()->shouldInterceptPostMessage()) {
- fputs("intercepted postMessage\n", stdout);
- return true;
- }
-
- return false;
-}
-
-void WebViewHost::registerIntentService(WebKit::WebFrame*, const WebKit::WebIntentServiceInfo& service)
-{
- printf("Registered Web Intent Service: action=%s type=%s title=%s url=%s disposition=%s\n",
- service.action().utf8().data(), service.type().utf8().data(), service.title().utf8().data(), service.url().spec().data(), service.disposition().utf8().data());
-}
-
-void WebViewHost::dispatchIntent(WebFrame* source, const WebIntentRequest& request)
-{
- printf("Received Web Intent: action=%s type=%s\n",
- request.intent().action().utf8().data(),
- request.intent().type().utf8().data());
- WebMessagePortChannelArray* ports = request.intent().messagePortChannelsRelease();
- m_currentRequest = request;
- if (ports) {
- printf("Have %d ports\n", static_cast<int>(ports->size()));
- for (size_t i = 0; i < ports->size(); ++i)
- (*ports)[i]->destroy();
- delete ports;
- }
-
- if (!request.intent().service().isEmpty())
- printf("Explicit intent service: %s\n", request.intent().service().spec().data());
-
- WebVector<WebString> extras = request.intent().extrasNames();
- for (size_t i = 0; i < extras.size(); ++i) {
- printf("Extras[%s] = %s\n", extras[i].utf8().data(),
- request.intent().extrasValue(extras[i]).utf8().data());
- }
-
- WebVector<WebURL> suggestions = request.intent().suggestions();
- for (size_t i = 0; i < suggestions.size(); ++i)
- printf("Have suggestion %s\n", suggestions[i].spec().data());
-}
-
-void WebViewHost::deliveredIntentResult(WebFrame* frame, int id, const WebSerializedScriptValue& data)
-{
- printf("Web intent success for id %d\n", id);
-}
-
-void WebViewHost::deliveredIntentFailure(WebFrame* frame, int id, const WebSerializedScriptValue& data)
-{
- printf("Web intent failure for id %d\n", id);
-}
-
-// WebTestDelegate ------------------------------------------------------------
-
-WebContextMenuData* WebViewHost::lastContextMenuData() const
-{
- return m_lastContextMenuData.get();
-}
-
-void WebViewHost::clearContextMenuData()
-{
- m_lastContextMenuData.clear();
-}
-
-void WebViewHost::setEditCommand(const string& name, const string& value)
-{
- m_editCommandName = name;
- m_editCommandValue = value;
-}
-
-void WebViewHost::clearEditCommand()
-{
- m_editCommandName.clear();
- m_editCommandValue.clear();
-}
-
-void WebViewHost::fillSpellingSuggestionList(const WebKit::WebString& word, WebKit::WebVector<WebKit::WebString>* suggestions)
-{
- mockSpellCheck()->fillSuggestionList(word, suggestions);
-}
-
-void WebViewHost::setGamepadData(const WebGamepads& pads)
-{
- webkit_support::SetGamepadData(pads);
-}
-
-void WebViewHost::printMessage(const std::string& message)
-{
- printf("%s", message.c_str());
-}
-
-void WebViewHost::postTask(WebTask* task)
-{
- ::postTask(task);
-}
-
-void WebViewHost::postDelayedTask(WebTask* task, long long ms)
-{
- ::postDelayedTask(task, ms);
-}
-
-WebString WebViewHost::registerIsolatedFileSystem(const WebVector<WebString>& absoluteFilenames)
-{
- return webkit_support::RegisterIsolatedFileSystem(absoluteFilenames);
-}
-
-long long WebViewHost::getCurrentTimeInMillisecond()
-{
- return webkit_support::GetCurrentTimeInMillisecond();
-}
-
-WebKit::WebString WebViewHost::getAbsoluteWebStringFromUTF8Path(const std::string& path)
-{
- return webkit_support::GetAbsoluteWebStringFromUTF8Path(path);
-}
-
-// Public functions -----------------------------------------------------------
-
-WebViewHost::WebViewHost(TestShell* shell)
- : m_shell(shell)
- , m_proxy(0)
- , m_webWidget(0)
- , m_lastRequestedTextCheckingCompletion(0)
-{
- reset();
-}
-
-WebViewHost::~WebViewHost()
-{
- // DevTools frontend page is supposed to be navigated only once and
- // loading another URL in that Page is an error.
- if (m_shell->devToolsWebView() != this) {
- // Navigate to an empty page to fire all the destruction logic for the
- // current page.
- loadURLForFrame(GURL("about:blank"), WebString());
- }
-
- for (Vector<WebKit::WebWidget*>::iterator it = m_popupmenus.begin();
- it < m_popupmenus.end(); ++it)
- (*it)->close();
-
- webWidget()->close();
- if (m_inModalLoop)
- webkit_support::QuitMessageLoop();
-}
-
-void WebViewHost::setWebWidget(WebKit::WebWidget* widget)
-{
- m_webWidget = widget;
- webView()->setSpellCheckClient(this);
- webView()->setPrerendererClient(this);
- webView()->setCompositorSurfaceReady();
-}
-
-WebView* WebViewHost::webView() const
-{
- ASSERT(m_webWidget);
- // DRT does not support popup widgets. So m_webWidget is always a WebView.
- return static_cast<WebView*>(m_webWidget);
-}
-
-WebWidget* WebViewHost::webWidget() const
-{
- ASSERT(m_webWidget);
- return m_webWidget;
-}
-
-WebTestProxyBase* WebViewHost::proxy() const
-{
- ASSERT(m_proxy);
- return m_proxy;
-}
-
-void WebViewHost::setProxy(WebTestProxyBase* proxy)
-{
- ASSERT(!m_proxy);
- ASSERT(proxy);
- m_proxy = proxy;
-}
-
-void WebViewHost::reset()
-{
- m_policyDelegateEnabled = false;
- m_policyDelegateIsPermissive = false;
- m_policyDelegateShouldNotifyDone = false;
- m_topLoadingFrame = 0;
- m_pageId = -1;
- m_lastPageIdUpdated = -1;
- m_hasWindow = false;
- m_inModalLoop = false;
- m_smartInsertDeleteEnabled = true;
- m_logConsoleOutput = true;
-#if OS(WINDOWS)
- m_selectTrailingWhitespaceEnabled = true;
-#else
- m_selectTrailingWhitespaceEnabled = false;
-#endif
- m_blocksRedirects = false;
- m_requestReturnNull = false;
- m_isPainting = false;
- m_canvas.clear();
-#if ENABLE(POINTER_LOCK)
- m_pointerLocked = false;
- m_pointerLockPlannedResult = PointerLockWillSucceed;
-#endif
-
- m_navigationController = adoptPtr(new TestNavigationController(this));
-
- m_pendingExtraData.clear();
- m_resourceIdentifierMap.clear();
- m_clearHeaders.clear();
- m_editCommandName.clear();
- m_editCommandValue.clear();
-
- if (m_geolocationClientMock.get())
- m_geolocationClientMock->resetMock();
-
-#if ENABLE(INPUT_SPEECH)
- if (m_speechInputControllerMock.get())
- m_speechInputControllerMock->clearResults();
-#endif
-
- m_currentCursor = WebCursorInfo();
- m_windowRect = WebRect();
- // m_proxy is not set when reset() is invoked from the constructor.
- if (m_proxy)
- proxy()->setPaintRect(WebRect());
-
- if (m_webWidget) {
- webView()->mainFrame()->setName(WebString());
- webView()->settings()->setMinimumTimerInterval(webkit_support::GetForegroundTabTimerInterval());
- }
-}
-
-void WebViewHost::setSelectTrailingWhitespaceEnabled(bool enabled)
-{
- m_selectTrailingWhitespaceEnabled = enabled;
- // In upstream WebKit, smart insert/delete is mutually exclusive with select
- // trailing whitespace, however, we allow both because Chromium on Windows
- // allows both.
-}
-
-void WebViewHost::setSmartInsertDeleteEnabled(bool enabled)
-{
- m_smartInsertDeleteEnabled = enabled;
- // In upstream WebKit, smart insert/delete is mutually exclusive with select
- // trailing whitespace, however, we allow both because Chromium on Windows
- // allows both.
-}
-
-void WebViewHost::setLogConsoleOutput(bool enabled)
-{
- m_logConsoleOutput = enabled;
-}
-
-void WebViewHost::setCustomPolicyDelegate(bool isCustom, bool isPermissive)
-{
- m_policyDelegateEnabled = isCustom;
- m_policyDelegateIsPermissive = isPermissive;
-}
-
-void WebViewHost::waitForPolicyDelegate()
-{
- m_policyDelegateEnabled = true;
- m_policyDelegateShouldNotifyDone = true;
-}
-
-void WebViewHost::loadURLForFrame(const WebURL& url, const WebString& frameName)
-{
- if (!url.isValid())
- return;
- TestShell::resizeWindowForTest(this, url);
- navigationController()->loadEntry(TestNavigationEntry::create(-1, url, WebString(), frameName).get());
-}
-
-bool WebViewHost::navigate(const TestNavigationEntry& entry, bool reload)
-{
- // Get the right target frame for the entry.
- WebFrame* frame = webView()->mainFrame();
- if (!entry.targetFrame().isEmpty())
- frame = webView()->findFrameByName(entry.targetFrame());
-
- // TODO(mpcomplete): should we clear the target frame, or should
- // back/forward navigations maintain the target frame?
-
- // A navigation resulting from loading a javascript URL should not be
- // treated as a browser initiated event. Instead, we want it to look as if
- // the page initiated any load resulting from JS execution.
- if (!GURL(entry.URL()).SchemeIs("javascript"))
- setPendingExtraData(adoptPtr(new TestShellExtraData(entry.pageID())));
-
- // If we are reloading, then WebKit will use the state of the current page.
- // Otherwise, we give it the state to navigate to.
- if (reload) {
- frame->reload(false);
- } else if (!entry.contentState().isNull()) {
- ASSERT(entry.pageID() != -1);
- frame->loadHistoryItem(entry.contentState());
- } else {
- ASSERT(entry.pageID() == -1);
- frame->loadRequest(WebURLRequest(entry.URL()));
- }
-
- // In case LoadRequest failed before DidCreateDataSource was called.
- setPendingExtraData(nullptr);
-
- // Restore focus to the main frame prior to loading new request.
- // This makes sure that we don't have a focused iframe. Otherwise, that
- // iframe would keep focus when the SetFocus called immediately after
- // LoadRequest, thus making some tests fail (see http://b/issue?id=845337
- // for more details).
- webView()->setFocusedFrame(frame);
- m_shell->setFocus(webView(), true);
-
- return true;
-}
-
-// Private functions ----------------------------------------------------------
-
-DRTTestRunner* WebViewHost::testRunner() const
-{
- return m_shell->testRunner();
-}
-
-void WebViewHost::updateAddressBar(WebView* webView)
-{
- WebFrame* mainFrame = webView->mainFrame();
- WebDataSource* dataSource = mainFrame->dataSource();
- if (!dataSource)
- dataSource = mainFrame->provisionalDataSource();
- if (!dataSource)
- return;
-
- setAddressBarURL(dataSource->request().url());
-}
-
-void WebViewHost::locationChangeDone(WebFrame* frame)
-{
- if (frame != m_topLoadingFrame)
- return;
- m_topLoadingFrame = 0;
- testRunner()->locationChangeDone();
-}
-
-void WebViewHost::updateForCommittedLoad(WebFrame* frame, bool isNewNavigation)
-{
- // Code duplicated from RenderView::DidCommitLoadForFrame.
- TestShellExtraData* extraData = static_cast<TestShellExtraData*>(frame->dataSource()->extraData());
- const WebURL& url = frame->dataSource()->request().url();
- bool nonBlankPageAfterReset = m_pageId == -1 && !url.isEmpty() && strcmp(url.spec().data(), "about:blank");
-
- if (isNewNavigation || nonBlankPageAfterReset) {
- // New navigation.
- updateSessionHistory(frame);
- m_pageId = nextPageID++;
- } else if (extraData && extraData->pendingPageID != -1 && !extraData->requestCommitted) {
- // This is a successful session history navigation!
- updateSessionHistory(frame);
- m_pageId = extraData->pendingPageID;
- }
-
- // Don't update session history multiple times.
- if (extraData)
- extraData->requestCommitted = true;
-
- updateURL(frame);
-}
-
-void WebViewHost::updateURL(WebFrame* frame)
-{
- WebDataSource* ds = frame->dataSource();
- ASSERT(ds);
- const WebURLRequest& request = ds->request();
- RefPtr<TestNavigationEntry> entry(TestNavigationEntry::create());
-
- // The referrer will be empty on https->http transitions. It
- // would be nice if we could get the real referrer from somewhere.
- entry->setPageID(m_pageId);
- if (ds->hasUnreachableURL())
- entry->setURL(ds->unreachableURL());
- else
- entry->setURL(request.url());
-
- const WebHistoryItem& historyItem = frame->currentHistoryItem();
- if (!historyItem.isNull())
- entry->setContentState(historyItem);
-
- navigationController()->didNavigateToEntry(entry.get());
- updateAddressBar(frame->view());
- m_lastPageIdUpdated = max(m_lastPageIdUpdated, m_pageId);
-}
-
-void WebViewHost::updateSessionHistory(WebFrame* frame)
-{
- // If we have a valid page ID at this point, then it corresponds to the page
- // we are navigating away from. Otherwise, this is the first navigation, so
- // there is no past session history to record.
- if (m_pageId == -1)
- return;
-
- TestNavigationEntry* entry = navigationController()->entryWithPageID(m_pageId);
- if (!entry)
- return;
-
- const WebHistoryItem& historyItem = webView()->mainFrame()->previousHistoryItem();
- if (historyItem.isNull())
- return;
-
- entry->setContentState(historyItem);
-}
-
-void WebViewHost::printFrameDescription(WebFrame* webframe)
-{
- string name8 = webframe->uniqueName().utf8();
- if (webframe == webView()->mainFrame()) {
- if (!name8.length()) {
- fputs("main frame", stdout);
- return;
- }
- printf("main frame \"%s\"", name8.c_str());
- return;
- }
- if (!name8.length()) {
- fputs("frame (anonymous)", stdout);
- return;
- }
- printf("frame \"%s\"", name8.c_str());
-}
-
-void WebViewHost::printFrameUserGestureStatus(WebFrame* webframe, const char* msg)
-{
- bool isUserGesture = webframe->isProcessingUserGesture();
- printf("Frame with user gesture \"%s\"%s", isUserGesture ? "true" : "false", msg);
-}
-
-void WebViewHost::printResourceDescription(unsigned identifier)
-{
- ResourceMap::iterator it = m_resourceIdentifierMap.find(identifier);
- printf("%s", it != m_resourceIdentifierMap.end() ? it->value.c_str() : "<unknown>");
-}
-
-void WebViewHost::setPendingExtraData(PassOwnPtr<TestShellExtraData> extraData)
-{
- m_pendingExtraData = extraData;
-}
-
-void WebViewHost::setDeviceScaleFactor(float deviceScaleFactor)
-{
- webView()->setDeviceScaleFactor(deviceScaleFactor);
- discardBackingStore();
-}
-
-void WebViewHost::setPageTitle(const WebString&)
-{
- // Nothing to do in layout test.
-}
-
-void WebViewHost::setAddressBarURL(const WebURL&)
-{
- // Nothing to do in layout test.
-}
-
-void WebViewHost::enterFullScreenNow()
-{
- webView()->willEnterFullScreen();
- webView()->didEnterFullScreen();
-}
-
-void WebViewHost::exitFullScreenNow()
-{
- webView()->willExitFullScreen();
- webView()->didExitFullScreen();
-}
-
-#if ENABLE(MEDIA_STREAM)
-webkit_support::TestMediaStreamClient* WebViewHost::testMediaStreamClient()
-{
- if (!m_testMediaStreamClient.get())
- m_testMediaStreamClient = adoptPtr(new webkit_support::TestMediaStreamClient());
- return m_testMediaStreamClient.get();
-}
-#endif
-
-// Painting functions ---------------------------------------------------------
-
-void WebViewHost::paintRect(const WebRect& rect)
-{
- ASSERT(!m_isPainting);
- ASSERT(canvas());
- m_isPainting = true;
- float deviceScaleFactor = webView()->deviceScaleFactor();
- int scaledX = static_cast<int>(static_cast<float>(rect.x) * deviceScaleFactor);
- int scaledY = static_cast<int>(static_cast<float>(rect.y) * deviceScaleFactor);
- int scaledWidth = static_cast<int>(ceil(static_cast<float>(rect.width) * deviceScaleFactor));
- int scaledHeight = static_cast<int>(ceil(static_cast<float>(rect.height) * deviceScaleFactor));
- WebRect deviceRect(scaledX, scaledY, scaledWidth, scaledHeight);
- webWidget()->paint(canvas(), deviceRect);
- m_isPainting = false;
-}
-
-void WebViewHost::paintInvalidatedRegion()
-{
-#if ENABLE(REQUEST_ANIMATION_FRAME)
- webWidget()->animate(0.0);
-#endif
- webWidget()->layout();
- WebSize widgetSize = webWidget()->size();
- WebRect clientRect(0, 0, widgetSize.width, widgetSize.height);
-
- // Paint the canvas if necessary. Allow painting to generate extra rects
- // for the first two calls. This is necessary because some WebCore rendering
- // objects update their layout only when painted.
- // Store the total area painted in total_paint. Then tell the gdk window
- // to update that area after we're done painting it.
- for (int i = 0; i < 3; ++i) {
- // rect = intersect(proxy()->paintRect() , clientRect)
- WebRect damageRect = proxy()->paintRect();
- int left = max(damageRect.x, clientRect.x);
- int top = max(damageRect.y, clientRect.y);
- int right = min(damageRect.x + damageRect.width, clientRect.x + clientRect.width);
- int bottom = min(damageRect.y + damageRect.height, clientRect.y + clientRect.height);
- WebRect rect;
- if (left < right && top < bottom)
- rect = WebRect(left, top, right - left, bottom - top);
-
- proxy()->setPaintRect(WebRect());
- if (rect.isEmpty())
- continue;
- paintRect(rect);
- }
- ASSERT(proxy()->paintRect().isEmpty());
-}
-
-void WebViewHost::paintPagesWithBoundaries()
-{
- ASSERT(!m_isPainting);
- ASSERT(canvas());
- m_isPainting = true;
-
- WebSize pageSizeInPixels = webWidget()->size();
- WebFrame* webFrame = webView()->mainFrame();
-
- int pageCount = webFrame->printBegin(pageSizeInPixels);
- int totalHeight = pageCount * (pageSizeInPixels.height + 1) - 1;
-
- SkCanvas* testCanvas = skia::TryCreateBitmapCanvas(pageSizeInPixels.width, totalHeight, true);
- if (testCanvas) {
- discardBackingStore();
- m_canvas = adoptPtr(testCanvas);
- } else {
- webFrame->printEnd();
- return;
- }
-
- webFrame->printPagesWithBoundaries(canvas(), pageSizeInPixels);
- webFrame->printEnd();
-
- m_isPainting = false;
-}
-
-SkCanvas* WebViewHost::canvas()
-{
- if (m_canvas)
- return m_canvas.get();
- WebSize widgetSize = webWidget()->size();
- float deviceScaleFactor = webView()->deviceScaleFactor();
- int scaledWidth = static_cast<int>(ceil(static_cast<float>(widgetSize.width) * deviceScaleFactor));
- int scaledHeight = static_cast<int>(ceil(static_cast<float>(widgetSize.height) * deviceScaleFactor));
- resetScrollRect();
- m_canvas = adoptPtr(skia::CreateBitmapCanvas(scaledWidth, scaledHeight, true));
- return m_canvas.get();
-}
-
-void WebViewHost::resetScrollRect()
-{
-}
-
-void WebViewHost::discardBackingStore()
-{
- m_canvas.clear();
-}
-
-// Paints the entire canvas a semi-transparent black (grayish). This is used
-// by the layout tests in fast/repaint. The alpha value matches upstream.
-void WebViewHost::displayRepaintMask()
-{
- canvas()->drawARGB(167, 0, 0, 0);
-}
-
-// Simulate a print by going into print mode and then exit straight away.
-void WebViewHost::printPage(WebKit::WebFrame* frame)
-{
- WebSize pageSizeInPixels = webWidget()->size();
- WebPrintParams printParams(pageSizeInPixels);
- frame->printBegin(printParams);
- frame->printEnd();
-}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.h b/Tools/DumpRenderTree/chromium/WebViewHost.h
deleted file mode 100644
index 97906eb26..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHost.h
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#ifndef WebViewHost_h
-#define WebViewHost_h
-
-#include "MockSpellCheck.h"
-#include "TestNavigationController.h"
-#include "WebAccessibilityNotification.h"
-#include "WebCursorInfo.h"
-#include "WebFrameClient.h"
-#include "WebIntentRequest.h"
-#include "WebPrerendererClient.h"
-#include "WebSpellCheckClient.h"
-#include "WebTask.h"
-#include "WebTestDelegate.h"
-#include "WebTestProxy.h"
-#include "WebViewClient.h"
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/Vector.h>
-#include <wtf/text/WTFString.h>
-
-class DRTTestRunner;
-class MockWebSpeechInputController;
-class MockWebSpeechRecognizer;
-class SkCanvas;
-class TestShell;
-class WebUserMediaClientMock;
-
-namespace WebKit {
-class WebFrame;
-class WebDeviceOrientationClient;
-class WebDeviceOrientationClientMock;
-class WebGeolocationClient;
-class WebGeolocationClientMock;
-class WebGeolocationServiceMock;
-class WebIntentServiceInfo;
-class WebSerializedScriptValue;
-class WebSharedWorkerClient;
-class WebSpeechInputController;
-class WebSpeechInputListener;
-class WebURL;
-struct WebRect;
-struct WebURLError;
-struct WebWindowFeatures;
-}
-
-namespace webkit_support {
-class MediaStreamUtil;
-class TestMediaStreamClient;
-}
-
-class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient, public NavigationHost,
- public WebKit::WebPrerendererClient, public WebKit::WebSpellCheckClient,
- public WebTestRunner::WebTestDelegate {
- public:
- WebViewHost(TestShell*);
- virtual ~WebViewHost();
- void setWebWidget(WebKit::WebWidget*);
- WebKit::WebView* webView() const;
- WebKit::WebWidget* webWidget() const;
- WebTestRunner::WebTestProxyBase* proxy() const;
- void setProxy(WebTestRunner::WebTestProxyBase*);
- void reset();
- void setSelectTrailingWhitespaceEnabled(bool);
- void setSmartInsertDeleteEnabled(bool);
- void setLogConsoleOutput(bool);
- void waitForPolicyDelegate();
- void setCustomPolicyDelegate(bool, bool);
- WebKit::WebFrame* topLoadingFrame() { return m_topLoadingFrame; }
- void setBlockRedirects(bool block) { m_blocksRedirects = block; }
- void setRequestReturnNull(bool returnNull) { m_requestReturnNull = returnNull; }
- void setPendingExtraData(PassOwnPtr<TestShellExtraData>);
- void setDeviceScaleFactor(float);
-
- void paintRect(const WebKit::WebRect&);
- void paintInvalidatedRegion();
- void paintPagesWithBoundaries();
- SkCanvas* canvas();
- void displayRepaintMask();
-
- void loadURLForFrame(const WebKit::WebURL&, const WebKit::WebString& frameName);
- TestNavigationController* navigationController() { return m_navigationController.get(); }
-
- void addClearHeader(const WTF::String& header) { m_clearHeaders.add(header); }
- const HashSet<WTF::String>& clearHeaders() const { return m_clearHeaders; }
- void closeWidget();
-
-#if ENABLE(INPUT_SPEECH)
- MockWebSpeechInputController* speechInputControllerMock() { return m_speechInputControllerMock.get(); }
-#endif
-
-#if ENABLE(SCRIPTED_SPEECH)
- MockWebSpeechRecognizer* mockSpeechRecognizer() { return m_mockSpeechRecognizer.get(); }
-#endif
-
-#if ENABLE(POINTER_LOCK)
- void didAcquirePointerLock();
- void didNotAcquirePointerLock();
- void didLosePointerLock();
- void setPointerLockWillRespondAsynchronously() { m_pointerLockPlannedResult = PointerLockWillRespondAsync; }
- void setPointerLockWillFailSynchronously() { m_pointerLockPlannedResult = PointerLockWillFailSync; }
-#endif
-
- // WebTestDelegate.
- virtual WebKit::WebContextMenuData* lastContextMenuData() const OVERRIDE;
- virtual void clearContextMenuData() OVERRIDE;
- virtual void setEditCommand(const std::string& name, const std::string& value) OVERRIDE;
- virtual void clearEditCommand() OVERRIDE;
- virtual void fillSpellingSuggestionList(const WebKit::WebString& word, WebKit::WebVector<WebKit::WebString>* suggestions) OVERRIDE;
- virtual void setGamepadData(const WebKit::WebGamepads&) OVERRIDE;
- virtual void printMessage(const std::string& message) OVERRIDE;
- virtual void postTask(WebTestRunner::WebTask*) OVERRIDE;
- virtual void postDelayedTask(WebTestRunner::WebTask*, long long ms) OVERRIDE;
- virtual WebKit::WebString registerIsolatedFileSystem(const WebKit::WebVector<WebKit::WebString>& absoluteFilenames) OVERRIDE;
- virtual long long getCurrentTimeInMillisecond() OVERRIDE;
- virtual WebKit::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) OVERRIDE;
-
- // NavigationHost
- virtual bool navigate(const TestNavigationEntry&, bool reload);
-
- // WebKit::WebPrerendererClient
- virtual void willAddPrerender(WebKit::WebPrerender*) OVERRIDE;
-
- // WebKit::WebSpellCheckClient
- virtual void spellCheck(const WebKit::WebString&, int& offset, int& length, WebKit::WebVector<WebKit::WebString>* optionalSuggestions);
- virtual void checkTextOfParagraph(const WebKit::WebString&, WebKit::WebTextCheckingTypeMask, WebKit::WebVector<WebKit::WebTextCheckingResult>*);
- virtual void requestCheckingOfText(const WebKit::WebString&, WebKit::WebTextCheckingCompletion*);
- virtual WebKit::WebString autoCorrectWord(const WebKit::WebString&);
-
- // WebKit::WebViewClient
- virtual WebKit::WebView* createView(WebKit::WebFrame*, const WebKit::WebURLRequest&, const WebKit::WebWindowFeatures&, const WebKit::WebString&, WebKit::WebNavigationPolicy);
- virtual WebKit::WebWidget* createPopupMenu(WebKit::WebPopupType);
- virtual WebKit::WebWidget* createPopupMenu(const WebKit::WebPopupMenuInfo&);
- virtual WebKit::WebStorageNamespace* createSessionStorageNamespace(unsigned quota);
- virtual WebKit::WebCompositorOutputSurface* createOutputSurface();
- virtual void didAddMessageToConsole(const WebKit::WebConsoleMessage&, const WebKit::WebString& sourceName, unsigned sourceLine);
- virtual void didStartLoading();
- virtual void didStopLoading();
- virtual bool shouldBeginEditing(const WebKit::WebRange&);
- virtual bool shouldEndEditing(const WebKit::WebRange&);
- virtual bool shouldInsertNode(const WebKit::WebNode&, const WebKit::WebRange&, WebKit::WebEditingAction);
- virtual bool shouldInsertText(const WebKit::WebString&, const WebKit::WebRange&, WebKit::WebEditingAction);
- virtual bool shouldChangeSelectedRange(const WebKit::WebRange& from, const WebKit::WebRange& to, WebKit::WebTextAffinity, bool stillSelecting);
- virtual bool shouldDeleteRange(const WebKit::WebRange&);
- virtual bool shouldApplyStyle(const WebKit::WebString& style, const WebKit::WebRange&);
- virtual bool isSmartInsertDeleteEnabled();
- virtual bool isSelectTrailingWhitespaceEnabled();
- virtual void didBeginEditing();
- virtual void didChangeSelection(bool isSelectionEmpty);
- virtual void didChangeContents();
- virtual void didEndEditing();
- virtual bool handleCurrentKeyboardEvent();
- virtual void runModalAlertDialog(WebKit::WebFrame*, const WebKit::WebString&);
- virtual bool runModalConfirmDialog(WebKit::WebFrame*, const WebKit::WebString&);
- virtual bool runModalPromptDialog(WebKit::WebFrame*, const WebKit::WebString& message, const WebKit::WebString& defaultValue, WebKit::WebString* actualValue);
- virtual bool runModalBeforeUnloadDialog(WebKit::WebFrame*, const WebKit::WebString&);
- virtual void showContextMenu(WebKit::WebFrame*, const WebKit::WebContextMenuData&);
- virtual void setStatusText(const WebKit::WebString&);
- virtual void didUpdateLayout();
- virtual void navigateBackForwardSoon(int offset);
- virtual int historyBackListCount();
- virtual int historyForwardListCount();
-#if ENABLE(NOTIFICATIONS)
- virtual WebKit::WebNotificationPresenter* notificationPresenter();
-#endif
- virtual WebKit::WebGeolocationClient* geolocationClient();
-#if ENABLE(INPUT_SPEECH)
- virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*);
-#endif
-#if ENABLE(SCRIPTED_SPEECH)
- virtual WebKit::WebSpeechRecognizer* speechRecognizer() OVERRIDE;
-#endif
- virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient() OVERRIDE;
-#if ENABLE(MEDIA_STREAM)
- virtual WebKit::WebUserMediaClient* userMediaClient();
-#endif
- virtual void printPage(WebKit::WebFrame*);
-
- // WebKit::WebWidgetClient
- virtual void didAutoResize(const WebKit::WebSize& newSize);
- virtual void scheduleAnimation();
- virtual void didFocus();
- virtual void didBlur();
- virtual void didChangeCursor(const WebKit::WebCursorInfo&);
- virtual void closeWidgetSoon();
- virtual void show(WebKit::WebNavigationPolicy);
- virtual void runModal();
- virtual bool enterFullScreen();
- virtual void exitFullScreen();
- virtual WebKit::WebRect windowRect();
- virtual void setWindowRect(const WebKit::WebRect&);
- virtual WebKit::WebRect rootWindowRect();
- virtual WebKit::WebRect windowResizerRect();
- virtual WebKit::WebScreenInfo screenInfo();
-#if ENABLE(POINTER_LOCK)
- virtual bool requestPointerLock();
- virtual void requestPointerUnlock();
- virtual bool isPointerLocked();
-#endif
-
- // WebKit::WebFrameClient
- virtual WebKit::WebPlugin* createPlugin(WebKit::WebFrame*, const WebKit::WebPluginParams&);
- virtual WebKit::WebMediaPlayer* createMediaPlayer(WebKit::WebFrame*, const WebKit::WebURL&, WebKit::WebMediaPlayerClient*);
- virtual WebKit::WebApplicationCacheHost* createApplicationCacheHost(WebKit::WebFrame*, WebKit::WebApplicationCacheHostClient*);
- virtual void loadURLExternally(WebKit::WebFrame*, const WebKit::WebURLRequest&, WebKit::WebNavigationPolicy);
- virtual void loadURLExternally(WebKit::WebFrame*, const WebKit::WebURLRequest&, WebKit::WebNavigationPolicy, const WebKit::WebString& downloadName);
- virtual WebKit::WebNavigationPolicy decidePolicyForNavigation(
- WebKit::WebFrame*, const WebKit::WebURLRequest&,
- WebKit::WebNavigationType, const WebKit::WebNode&,
- WebKit::WebNavigationPolicy, bool isRedirect);
- virtual bool canHandleRequest(WebKit::WebFrame*, const WebKit::WebURLRequest&);
- virtual WebKit::WebURLError cannotHandleRequestError(WebKit::WebFrame*, const WebKit::WebURLRequest&);
- virtual WebKit::WebURLError cancelledError(WebKit::WebFrame*, const WebKit::WebURLRequest&);
- virtual void unableToImplementPolicyWithError(WebKit::WebFrame*, const WebKit::WebURLError&);
- virtual void willPerformClientRedirect(
- WebKit::WebFrame*, const WebKit::WebURL& from, const WebKit::WebURL& to,
- double interval, double fireTime);
- virtual void didCancelClientRedirect(WebKit::WebFrame*);
- virtual void didCreateDataSource(WebKit::WebFrame*, WebKit::WebDataSource*);
- virtual void didStartProvisionalLoad(WebKit::WebFrame*);
- virtual void didReceiveServerRedirectForProvisionalLoad(WebKit::WebFrame*);
- virtual void didFailProvisionalLoad(WebKit::WebFrame*, const WebKit::WebURLError&);
- virtual void didCommitProvisionalLoad(WebKit::WebFrame*, bool isNewNavigation);
- virtual void didClearWindowObject(WebKit::WebFrame*);
- virtual void didReceiveTitle(WebKit::WebFrame*, const WebKit::WebString&, WebKit::WebTextDirection);
- virtual void didFinishDocumentLoad(WebKit::WebFrame*);
- virtual void didHandleOnloadEvents(WebKit::WebFrame*);
- virtual void didFailLoad(WebKit::WebFrame*, const WebKit::WebURLError&);
- virtual void didFinishLoad(WebKit::WebFrame*);
- virtual void didNavigateWithinPage(WebKit::WebFrame*, bool isNewNavigation);
- virtual void didChangeLocationWithinPage(WebKit::WebFrame*);
- virtual void assignIdentifierToRequest(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLRequest&);
- virtual void removeIdentifierForRequest(unsigned identifier);
- virtual void willRequestResource(WebKit::WebFrame*, const WebKit::WebCachedURLRequest&);
- virtual void willSendRequest(WebKit::WebFrame*, unsigned identifier, WebKit::WebURLRequest&, const WebKit::WebURLResponse&);
- virtual void didReceiveResponse(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLResponse&);
- virtual void didFinishResourceLoad(WebKit::WebFrame*, unsigned identifier);
- virtual void didFailResourceLoad(WebKit::WebFrame*, unsigned identifier, const WebKit::WebURLError&);
- virtual void didDisplayInsecureContent(WebKit::WebFrame*);
- virtual void didRunInsecureContent(WebKit::WebFrame*, const WebKit::WebSecurityOrigin&, const WebKit::WebURL&);
- virtual void didDetectXSS(WebKit::WebFrame*, const WebKit::WebURL&, bool didBlockEntirePage);
- virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, long long size, bool create, WebKit::WebFileSystemCallbacks*);
- virtual void deleteFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, WebKit::WebFileSystemCallbacks*);
- virtual bool willCheckAndDispatchMessageEvent(
- WebKit::WebFrame* sourceFrame, WebKit::WebFrame* targetFrame,
- WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent);
- virtual void registerIntentService(WebKit::WebFrame*, const WebKit::WebIntentServiceInfo&);
- virtual void dispatchIntent(WebKit::WebFrame*, const WebKit::WebIntentRequest&);
- virtual void deliveredIntentResult(WebKit::WebFrame*, int, const WebKit::WebSerializedScriptValue&);
- virtual void deliveredIntentFailure(WebKit::WebFrame*, int, const WebKit::WebSerializedScriptValue&);
-
- WebKit::WebDeviceOrientationClientMock* deviceOrientationClientMock();
-
- // Spellcheck related helper APIs
- MockSpellCheck* mockSpellCheck();
- void finishLastTextCheck();
-
- // Geolocation client mocks for DRTTestRunner
- WebKit::WebGeolocationClientMock* geolocationClientMock();
-
- // Pending task list, Note taht the method is referred from WebMethodTask class.
- WebTestRunner::WebTaskList* taskList() { return &m_taskList; }
-
- // The current web intents request.
- WebKit::WebIntentRequest* currentIntentRequest() { return &m_currentRequest; }
-
-private:
-
- class HostMethodTask : public WebTestRunner::WebMethodTask<WebViewHost> {
- public:
- typedef void (WebViewHost::*CallbackMethodType)();
- HostMethodTask(WebViewHost* object, CallbackMethodType callback)
- : WebTestRunner::WebMethodTask<WebViewHost>(object)
- , m_callback(callback)
- { }
-
- virtual void runIfValid() { (m_object->*m_callback)(); }
-
- private:
- CallbackMethodType m_callback;
- };
-
- DRTTestRunner* testRunner() const;
-
- // Called the title of the page changes.
- // Can be used to update the title of the window.
- void setPageTitle(const WebKit::WebString&);
-
- // Called when the URL of the page changes.
- // Extracts the URL and forwards on to SetAddressBarURL().
- void updateAddressBar(WebKit::WebView*);
-
- // Called when the URL of the page changes.
- // Should be used to update the text of the URL bar.
- void setAddressBarURL(const WebKit::WebURL&);
-
- void enterFullScreenNow();
- void exitFullScreenNow();
-
- // In the Mac code, this is called to trigger the end of a test after the
- // page has finished loading. From here, we can generate the dump for the
- // test.
- void locationChangeDone(WebKit::WebFrame*);
-
- void updateForCommittedLoad(WebKit::WebFrame*, bool isNewNavigation);
- void updateURL(WebKit::WebFrame*);
- void updateSessionHistory(WebKit::WebFrame*);
-
- // Dumping a frame to the console.
- void printFrameDescription(WebKit::WebFrame*);
-
- // Dumping the user gesture status to the console.
- void printFrameUserGestureStatus(WebKit::WebFrame*, const char*);
-
- bool hasWindow() const { return m_hasWindow; }
- void resetScrollRect();
- void discardBackingStore();
-
-#if ENABLE(MEDIA_STREAM)
- WebUserMediaClientMock* userMediaClientMock();
- webkit_support::TestMediaStreamClient* testMediaStreamClient();
-#endif
-
- // Causes navigation actions just printout the intended navigation instead
- // of taking you to the page. This is used for cases like mailto, where you
- // don't actually want to open the mail program.
- bool m_policyDelegateEnabled;
-
- // Toggles the behavior of the policy delegate. If true, then navigations
- // will be allowed. Otherwise, they will be ignored (dropped).
- bool m_policyDelegateIsPermissive;
-
- // If true, the policy delegate will signal layout test completion.
- bool m_policyDelegateShouldNotifyDone;
-
- // Non-owning pointer. The WebViewHost instance is owned by this TestShell instance.
- TestShell* m_shell;
-
- // Non-owning pointer. This class needs to be wrapped in a WebTestProxy. This is the pointer to the WebTestProxyBase.
- WebTestRunner::WebTestProxyBase* m_proxy;
-
- // This delegate works for the following widget.
- WebKit::WebWidget* m_webWidget;
-
- // This is non-0 IFF a load is in progress.
- WebKit::WebFrame* m_topLoadingFrame;
-
- // For tracking session history. See RenderView.
- int m_pageId;
- int m_lastPageIdUpdated;
-
- OwnPtr<TestShellExtraData> m_pendingExtraData;
-
- // Maps resource identifiers to a descriptive string.
- typedef HashMap<unsigned, std::string> ResourceMap;
- ResourceMap m_resourceIdentifierMap;
- void printResourceDescription(unsigned identifier);
-
- WebKit::WebCursorInfo m_currentCursor;
-
- bool m_hasWindow;
- bool m_inModalLoop;
- WebKit::WebRect m_windowRect;
-
- // true if we want to enable smart insert/delete.
- bool m_smartInsertDeleteEnabled;
-
- // true if we want to enable selection of trailing whitespaces
- bool m_selectTrailingWhitespaceEnabled;
-
- // true if whatever is sent to the console should be logged to stdout.
- bool m_logConsoleOutput;
-
- // Set of headers to clear in willSendRequest.
- HashSet<WTF::String> m_clearHeaders;
-
- // true if we should block any redirects
- bool m_blocksRedirects;
-
- // true if we should block (set an empty request for) any requests
- bool m_requestReturnNull;
-
- // Edit command associated to the current keyboard event.
- std::string m_editCommandName;
- std::string m_editCommandValue;
-
- // The mock spellchecker used in spellCheck().
- MockSpellCheck m_spellcheck;
-
- // Painting.
- OwnPtr<SkCanvas> m_canvas;
- WebKit::WebRect m_paintRect;
- bool m_isPainting;
-
- OwnPtr<WebKit::WebContextMenuData> m_lastContextMenuData;
-
- // Geolocation
- OwnPtr<WebKit::WebGeolocationClientMock> m_geolocationClientMock;
-
- OwnPtr<WebKit::WebDeviceOrientationClientMock> m_deviceOrientationClientMock;
-#if ENABLE(INPUT_SPEECH)
- OwnPtr<MockWebSpeechInputController> m_speechInputControllerMock;
-#endif
-
-#if ENABLE(SCRIPTED_SPEECH)
- OwnPtr<MockWebSpeechRecognizer> m_mockSpeechRecognizer;
-#endif
-
-#if ENABLE(MEDIA_STREAM)
- OwnPtr<WebUserMediaClientMock> m_userMediaClientMock;
- OwnPtr<webkit_support::TestMediaStreamClient> m_testMediaStreamClient;
-#endif
-
- OwnPtr<TestNavigationController> m_navigationController;
-
- WebKit::WebString m_lastRequestedTextCheckString;
- WebKit::WebTextCheckingCompletion* m_lastRequestedTextCheckingCompletion;
-
- WebTestRunner::WebTaskList m_taskList;
- Vector<WebKit::WebWidget*> m_popupmenus;
-
-#if ENABLE(POINTER_LOCK)
- bool m_pointerLocked;
- enum {
- PointerLockWillSucceed,
- PointerLockWillRespondAsync,
- PointerLockWillFailSync
- } m_pointerLockPlannedResult;
-#endif
-
- // For web intents: holds the current request, if any.
- WebKit::WebIntentRequest m_currentRequest;
-};
-
-#endif // WebViewHost_h
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp b/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp
deleted file mode 100644
index 09a0af501..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-
-#include "WebViewHostOutputSurface.h"
-
-#include <public/WebCompositorSoftwareOutputDevice.h>
-#include <public/WebGraphicsContext3D.h>
-#include <wtf/Assertions.h>
-
-namespace WebKit {
-
-PassOwnPtr<WebViewHostOutputSurface> WebViewHostOutputSurface::create3d(PassOwnPtr<WebKit::WebGraphicsContext3D> context3d)
-{
- return adoptPtr(new WebViewHostOutputSurface(context3d));
-}
-
-PassOwnPtr<WebViewHostOutputSurface> WebViewHostOutputSurface::createSoftware(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice)
-{
- return adoptPtr(new WebViewHostOutputSurface(softwareDevice));
-}
-
-WebViewHostOutputSurface::WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D> context)
- : m_context(context)
-{
-}
-
-WebViewHostOutputSurface::WebViewHostOutputSurface(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice)
- : m_softwareDevice(softwareDevice)
-{
-}
-
-WebViewHostOutputSurface::~WebViewHostOutputSurface()
-{
-}
-
-bool WebViewHostOutputSurface::bindToClient(WebCompositorOutputSurfaceClient*)
-{
- if (!m_context)
- return true;
-
- return m_context->makeContextCurrent();
-}
-
-const WebKit::WebCompositorOutputSurface::Capabilities& WebViewHostOutputSurface::capabilities() const
-{
- return m_capabilities;
-}
-
-WebGraphicsContext3D* WebViewHostOutputSurface::context3D() const
-{
- return m_context.get();
-}
-
-WebCompositorSoftwareOutputDevice* WebViewHostOutputSurface::softwareDevice() const
-{
- return m_softwareDevice.get();
-}
-
-void WebViewHostOutputSurface::sendFrameToParentCompositor(const WebCompositorFrame&)
-{
- ASSERT_NOT_REACHED();
-}
-
-}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h b/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h
deleted file mode 100644
index bbd61a21a..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef WebViewHostOutputSurface_h
-#define WebViewHostOutputSurface_h
-
-#include <public/WebCompositorOutputSurface.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-
-class WebCompositorOutputSurfaceClient;
-class WebCompositorSoftwareOutputDevice;
-class WebGraphicsContext3D;
-
-class WebViewHostOutputSurface : public WebKit::WebCompositorOutputSurface {
-public:
- static PassOwnPtr<WebViewHostOutputSurface> create3d(PassOwnPtr<WebKit::WebGraphicsContext3D>);
- static PassOwnPtr<WebViewHostOutputSurface> createSoftware(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice>);
- virtual ~WebViewHostOutputSurface();
-
- virtual bool bindToClient(WebCompositorOutputSurfaceClient*) OVERRIDE;
-
- virtual const WebKit::WebCompositorOutputSurface::Capabilities& capabilities() const OVERRIDE;
- virtual WebGraphicsContext3D* context3D() const OVERRIDE;
- virtual WebCompositorSoftwareOutputDevice* softwareDevice() const OVERRIDE;
- virtual void sendFrameToParentCompositor(const WebCompositorFrame&) OVERRIDE;
-
-private:
- explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D>);
- explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice>);
-
- WebKit::WebCompositorOutputSurface::Capabilities m_capabilities;
- OwnPtr<WebKit::WebGraphicsContext3D> m_context;
- OwnPtr<WebKit::WebCompositorSoftwareOutputDevice> m_softwareDevice;
-};
-
-}
-
-#endif // WebViewHostOutputSurface_h
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp b/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp
deleted file mode 100644
index ecee9940d..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-
-#include "WebViewHostSoftwareOutputDevice.h"
-
-#include "SkBitmap.h"
-#include "SkDevice.h"
-#include <public/WebSize.h>
-#include <wtf/Assertions.h>
-
-namespace WebKit {
-
-WebImage* WebViewHostSoftwareOutputDevice::lock(bool forWrite)
-{
- ASSERT(m_device);
- m_image = m_device->accessBitmap(forWrite);
- return &m_image;
-}
-
-void WebViewHostSoftwareOutputDevice::unlock()
-{
- m_image.reset();
-}
-
-void WebViewHostSoftwareOutputDevice::didChangeViewportSize(WebSize size)
-{
- if (m_device && size.width == m_device->width() && size.height == m_device->height())
- return;
-
- m_device = adoptPtr(new SkDevice(SkBitmap::kARGB_8888_Config, size.width, size.height, true));
-}
-
-
-}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h b/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h
deleted file mode 100644
index 5bd551ff9..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 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 AND ITS 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 APPLE OR ITS 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.
- */
-
-#ifndef WebViewHostSoftwareOutputDevice_h
-#define WebViewHostSoftwareOutputDevice_h
-
-#include <public/WebCompositorSoftwareOutputDevice.h>
-#include <public/WebImage.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-class SkDevice;
-
-namespace WebKit {
-
-struct WebSize;
-
-class WebViewHostSoftwareOutputDevice : public WebKit::WebCompositorSoftwareOutputDevice {
-public:
- virtual WebImage* lock(bool forWrite) OVERRIDE;
- virtual void unlock() OVERRIDE;
-
- virtual void didChangeViewportSize(WebSize) OVERRIDE;
-
-private:
- OwnPtr<SkDevice> m_device;
- WebImage m_image;
-};
-
-}
-
-#endif // WebViewHostSoftwareOutputDevice_h
diff --git a/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml b/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml
deleted file mode 100644
index 79193b7c4..000000000
--- a/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<familyset>
- <family>
- <fileset>
- <file>DejaVuSans.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>kochi-mincho.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>lohit_hi.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>lohit_ta.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>MuktiNarrow.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>Garuda.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>lohit_pa.ttf</file>
- </fileset>
- </family>
-</familyset>
diff --git a/Tools/DumpRenderTree/chromium/android_main_fonts.xml b/Tools/DumpRenderTree/chromium/android_main_fonts.xml
deleted file mode 100644
index b6afa7944..000000000
--- a/Tools/DumpRenderTree/chromium/android_main_fonts.xml
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<familyset>
-
- <family>
- <nameset>
- <name>sans</name>
- <name>sans serif</name>
- <name>sans-serif</name>
- <name>Arial</name>
- <name>Helvetica</name>
- </nameset>
- <fileset>
- <file>Arial.ttf</file>
- <file>Arial_Bold.ttf</file>
- <file>Arial_Italic.ttf</file>
- <file>Arial_Bold_Italic.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>serif</name>
- <name>Times</name>
- <name>Times New Roman</name>
- <name>Monaco</name>
- <!-- Match chromium-linux. See comments of SubpixelPositioning in fonts.conf -->
- <name>SubpixelPositioning</name>
- </nameset>
- <fileset>
- <file>Times_New_Roman.ttf</file>
- <file>Times_New_Roman_Bold.ttf</file>
- <file>Times_New_Roman_Italic.ttf</file>
- <file>Times_New_Roman_Bold_Italic.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>mono</name>
- <name>monospace</name>
- <name>Courier</name>
- <name>Courier New</name>
- </nameset>
- <fileset>
- <file>Courier_New.ttf</file>
- <file>Courier_New_Bold.ttf</file>
- <file>Courier_New_Italic.ttf</file>
- <file>Courier_New_Bold_Italic.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>cursive</name>
- <name>Comic Sans MS</name>
- </nameset>
- <fileset>
- <file>Comic_Sans_MS.ttf</file>
- <file>Comic_Sans_MS_Bold.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>fantasy</name>
- <name>Impact</name>
- </nameset>
- <fileset>
- <file>Impact.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>Georgia</name>
- </nameset>
- <fileset>
- <file>Georgia.ttf</file>
- <file>Georgia_Bold.ttf</file>
- <file>Georgia_Italic.ttf</file>
- <file>Georgia_Bold_Italic.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>Trebuchet MS</name>
- </nameset>
- <fileset>
- <file>Trebuchet_MS.ttf</file>
- <file>Trebuchet_MS_Bold.ttf</file>
- <file>Trebuchet_MS_Italic.ttf</file>
- <file>Trebuchet_MS_Bold_Italic.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>Verdana</name>
- </nameset>
- <fileset>
- <file>Verdana.ttf</file>
- <file>Verdana_Bold.ttf</file>
- <file>Verdana_Italic.ttf</file>
- <file>Verdana_Bold_Italic.ttf</file>
- </fileset>
- </family>
-
- <family>
- <nameset>
- <name>Ahem</name>
- <!-- Match chromium-linux. See comments of SubpixelPositioning in fonts.conf -->
- <name>SubpixelPositioningAhem</name>
- </nameset>
- <fileset>
- <file>AHEM____.TTF</file>
- </fileset>
- </family>
-
-</familyset>
diff --git a/Tools/DumpRenderTree/chromium/config.h b/Tools/DumpRenderTree/chromium/config.h
deleted file mode 100644
index ef418aec0..000000000
--- a/Tools/DumpRenderTree/chromium/config.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * 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.
- */
-
-#ifndef config_h
-#define config_h
-
-#include <wtf/Platform.h>
-#include <wtf/ExportMacros.h>
-
-#if OS(WINDOWS) && !COMPILER(GCC)
-// Allow 'this' to be used in base member initializer list.
-#pragma warning(disable : 4355)
-#endif
-
-#endif // config_h
diff --git a/Tools/DumpRenderTree/chromium/fonts.conf b/Tools/DumpRenderTree/chromium/fonts.conf
deleted file mode 100644
index d337b1243..000000000
--- a/Tools/DumpRenderTree/chromium/fonts.conf
+++ /dev/null
@@ -1,252 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
-<!-- /etc/fonts/fonts.conf file to configure system font access -->
-<fontconfig>
- <match target="font">
- <edit name="embeddedbitmap" mode="assign"><bool>false</bool></edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>Times</string>
- </test>
- <edit name="family" mode="assign">
- <string>Times New Roman</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans serif</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- </match>
-
- <!-- Some layout tests specify Helvetica as a family and we need to make sure
- that we don't fallback to Times New Roman for them -->
- <match target="pattern">
- <test qual="any" name="family">
- <string>Helvetica</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>sans-serif</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>serif</string>
- </test>
- <edit name="family" mode="assign">
- <string>Times New Roman</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>mono</string>
- </test>
- <edit name="family" mode="assign">
- <string>Courier New</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>monospace</string>
- </test>
- <edit name="family" mode="assign">
- <string>Courier New</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>Courier</string>
- </test>
- <edit name="family" mode="assign">
- <string>Courier New</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>cursive</string>
- </test>
- <edit name="family" mode="assign">
- <string>Comic Sans MS</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>fantasy</string>
- </test>
- <edit name="family" mode="assign">
- <string>Impact</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test qual="any" name="family">
- <string>Monaco</string>
- </test>
- <edit name="family" mode="assign">
- <string>Times New Roman</string>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>NonAntiAliasedSans</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- <edit name="antialias" mode="assign">
- <bool>false</bool>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>SlightHintedGeorgia</string>
- </test>
- <edit name="family" mode="assign">
- <string>Georgia</string>
- </edit>
- <edit name="hintstyle" mode="assign">
- <const>hintslight</const>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>NonHintedSans</string>
- </test>
- <edit name="family" mode="assign">
- <string>Verdana</string>
- </edit>
- <!-- These deliberately contradict each other. The 'hinting' preference
- should take priority -->
- <edit name="hintstyle" mode="assign">
- <const>hintfull</const>
- </edit>
- <edit name="hinting" mode="assign">
- <bool>false</bool>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>AutohintedSerif</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- <edit name="autohint" mode="assign">
- <bool>true</bool>
- </edit>
- <edit name="hintstyle" mode="assign">
- <const>hintmedium</const>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>HintedSerif</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- <edit name="autohint" mode="assign">
- <bool>false</bool>
- </edit>
- <edit name="hintstyle" mode="assign">
- <const>hintmedium</const>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>FullAndAutoHintedSerif</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- <edit name="autohint" mode="assign">
- <bool>true</bool>
- </edit>
- <edit name="hintstyle" mode="assign">
- <const>hintfull</const>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>SubpixelEnabledArial</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- <edit name="rgba" mode="assign">
- <const>rgb</const>
- </edit>
- </match>
-
- <match target="pattern">
- <test name="family" compare="eq">
- <string>SubpixelDisabledArial</string>
- </test>
- <edit name="family" mode="assign">
- <string>Arial</string>
- </edit>
- <edit name="rgba" mode="assign">
- <const>none</const>
- </edit>
- </match>
-
- <match target="pattern">
- <!-- FontConfig doesn't currently provide a well-defined way to turn on
- subpixel positioning. This is just an arbitrary pattern to use after
- turning subpixel positioning on globally to ensure that we don't have
- issues with our style getting cached for other tests. -->
- <test name="family" compare="eq">
- <string>SubpixelPositioning</string>
- </test>
- <edit name="family" mode="assign">
- <string>Times New Roman</string>
- </edit>
- </match>
-
- <match target="pattern">
- <!-- See comments above -->
- <test name="family" compare="eq">
- <string>SubpixelPositioningAhem</string>
- </test>
- <edit name="family" mode="assign">
- <string>ahem</string>
- </edit>
- </match>
-
-</fontconfig>
diff --git a/Tools/DumpRenderTree/config.h b/Tools/DumpRenderTree/config.h
index ccff71c7c..6424465dc 100644
--- a/Tools/DumpRenderTree/config.h
+++ b/Tools/DumpRenderTree/config.h
@@ -30,16 +30,7 @@
#include <wtf/Platform.h>
#include <wtf/ExportMacros.h>
-#if USE(JSC)
#include <runtime/JSExportMacros.h>
-#endif
-
-// On MSW, wx headers need to be included before windows.h is.
-// The only way we can always ensure this is if we include wx here.
-#if PLATFORM(WX)
-#include <wx/defs.h>
-#endif
-
#ifdef __cplusplus
#undef new
@@ -85,10 +76,10 @@
#endif
#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
+#define _WIN32_WINNT 0x0502
#undef WINVER
-#define WINVER 0x0500
+#define WINVER 0x0502
#undef _WINSOCKAPI_
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
diff --git a/Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp b/Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp
new file mode 100644
index 000000000..8012da637
--- /dev/null
+++ b/Tools/DumpRenderTree/efl/AccessibilityControllerEfl.cpp
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Jan Michael Alonzo
+ * Copyright (C) 2013 Samsung Electronics. 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.
+ */
+
+#include "config.h"
+#include "AccessibilityController.h"
+
+#if HAVE(ACCESSIBILITY)
+
+#include "AccessibilityCallbacks.h"
+#include "AccessibilityUIElement.h"
+#include "DumpRenderTree.h"
+#include "DumpRenderTreeChrome.h"
+#include "WebCoreSupport/DumpRenderTreeSupportEfl.h"
+
+#include <atk/atk.h>
+#include <wtf/gobject/GOwnPtr.h>
+
+AccessibilityUIElement AccessibilityController::focusedElement()
+{
+ AtkObject* accessible = DumpRenderTreeSupportEfl::focusedAccessibleElement(browser->mainFrame());
+ if (!accessible)
+ return 0;
+
+ return AccessibilityUIElement(accessible);
+}
+
+AccessibilityUIElement AccessibilityController::rootElement()
+{
+ AtkObject* accessible = DumpRenderTreeSupportEfl::rootAccessibleElement(browser->mainFrame());
+ if (!accessible)
+ return 0;
+
+ return AccessibilityUIElement(accessible);
+}
+
+AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRef id)
+{
+ AtkObject* root = DumpRenderTreeSupportEfl::rootAccessibleElement(browser->mainFrame());
+ if (!root)
+ return 0;
+
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(id);
+ GOwnPtr<gchar> idBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(id, idBuffer.get(), bufferSize);
+
+ AtkObject* result = childElementById(root, idBuffer.get());
+ if (ATK_IS_OBJECT(result))
+ return AccessibilityUIElement(result);
+
+ return 0;
+}
+
+#endif
diff --git a/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp b/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp
new file mode 100644
index 000000000..9e115d9e9
--- /dev/null
+++ b/Tools/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2009 Jan Michael Alonzo
+ * Copyright (C) 2013 Samsung Electronics. 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.
+ */
+
+#include "config.h"
+#include "AccessibilityUIElement.h"
+
+#if HAVE(ACCESSIBILITY)
+
+#include "WebCoreSupport/DumpRenderTreeSupportEfl.h"
+#include <JavaScriptCore/JSStringRef.h>
+#include <atk/atk.h>
+#include <wtf/Assertions.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GRefPtr.h>
+#include <wtf/text/WTFString.h>
+#include <wtf/unicode/CharacterNames.h>
+
+JSStringRef AccessibilityUIElement::helpText() const
+{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ ASSERT(ATK_IS_OBJECT(m_element));
+
+ String helpText = DumpRenderTreeSupportEfl::accessibilityHelpText(ATK_OBJECT(m_element));
+ GOwnPtr<gchar> axHelpText(g_strdup_printf("AXHelp: %s", helpText.utf8().data()));
+ return JSStringCreateWithUTF8CString(axHelpText.get());
+}
+
+#endif
diff --git a/Tools/DumpRenderTree/efl/CMakeLists.txt b/Tools/DumpRenderTree/efl/CMakeLists.txt
index 7f3563d90..998019121 100644
--- a/Tools/DumpRenderTree/efl/CMakeLists.txt
+++ b/Tools/DumpRenderTree/efl/CMakeLists.txt
@@ -1,11 +1,19 @@
-SET(DumpRenderTree_SOURCES
+set(DumpRenderTree_SOURCES
+ ${TOOLS_DIR}/DumpRenderTree/AccessibilityController.cpp
+ ${TOOLS_DIR}/DumpRenderTree/AccessibilityTextMarker.cpp
+ ${TOOLS_DIR}/DumpRenderTree/AccessibilityUIElement.cpp
${TOOLS_DIR}/DumpRenderTree/DumpRenderTreeCommon.cpp
${TOOLS_DIR}/DumpRenderTree/CyclicRedundancyCheck.cpp
${TOOLS_DIR}/DumpRenderTree/GCController.cpp
${TOOLS_DIR}/DumpRenderTree/TestRunner.cpp
${TOOLS_DIR}/DumpRenderTree/PixelDumpSupport.cpp
${TOOLS_DIR}/DumpRenderTree/WorkQueue.cpp
+ ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp
+ ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityControllerAtk.cpp
+ ${TOOLS_DIR}/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp
${TOOLS_DIR}/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp
+ ${TOOLS_DIR}/DumpRenderTree/efl/AccessibilityControllerEfl.cpp
+ ${TOOLS_DIR}/DumpRenderTree/efl/AccessibilityUIElementEfl.cpp
${TOOLS_DIR}/DumpRenderTree/efl/DumpHistoryItem.cpp
${TOOLS_DIR}/DumpRenderTree/efl/DumpRenderTree.cpp
${TOOLS_DIR}/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
@@ -21,16 +29,12 @@ SET(DumpRenderTree_SOURCES
${TOOLS_DIR}/DumpRenderTree/efl/WorkQueueItemEfl.cpp
)
-SET(ImageDiff_SOURCES
- ${TOOLS_DIR}/DumpRenderTree/efl/ImageDiff.cpp
-)
-
-SET(DumpRenderTree_LIBRARIES
- ${JavaScriptCore_LIBRARY_NAME}
- ${WebCoreTestSupport_LIBRARY_NAME}
- ${WebCore_LIBRARY_NAME}
- ${WebKit_LIBRARY_NAME}
- ${WTF_LIBRARY_NAME}
+set(DumpRenderTree_LIBRARIES
+ JavaScriptCore
+ WebCoreTestSupport
+ WebCore
+ WebKit
+ WTF
${CAIRO_LIBRARIES}
${ECORE_LIBRARIES}
${ECORE_EVAS_LIBRARIES}
@@ -38,16 +42,17 @@ SET(DumpRenderTree_LIBRARIES
${ECORE_INPUT_LIBRARIES}
${EDJE_LIBRARIES}
${EINA_LIBRARIES}
+ ${EO_LIBRARIES}
${EVAS_LIBRARIES}
${FONTCONFIG_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${LIBXSLT_LIBRARIES}
+ ${LIBXSLT_LIBRARIES} -lm
${SQLITE_LIBRARIES}
${GLIB_LIBRARIES}
${LIBSOUP_LIBRARIES}
)
-SET(DumpRenderTree_INCLUDE_DIRECTORIES
+set(DumpRenderTree_INCLUDE_DIRECTORIES
"${WEBKIT_DIR}/efl/ewk"
${WEBKIT_DIR}/efl
${WEBKIT_DIR}/efl/WebCoreSupport
@@ -72,6 +77,7 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
${WEBCORE_DIR}/platform/network/soup
${WEBCORE_DIR}/plugins
${WEBCORE_DIR}/rendering
+ ${WEBCORE_DIR}/rendering/shapes
${WEBCORE_DIR}/rendering/style
${WEBCORE_DIR}/history
${WEBCORE_DIR}/loader
@@ -87,9 +93,11 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
${JAVASCRIPTCORE_DIR}/interpreter
${JAVASCRIPTCORE_DIR}/jit
${JAVASCRIPTCORE_DIR}/llint
+ ${JAVASCRIPTCORE_DIR}/profiler
${JAVASCRIPTCORE_DIR}/runtime
${JAVASCRIPTCORE_DIR}/ForwardingHeaders
${TOOLS_DIR}/DumpRenderTree
+ ${TOOLS_DIR}/DumpRenderTree/atk
${TOOLS_DIR}/DumpRenderTree/cairo
${TOOLS_DIR}/DumpRenderTree/efl
${WTF_DIR}
@@ -106,24 +114,30 @@ SET(DumpRenderTree_INCLUDE_DIRECTORIES
${ECORE_INPUT_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
+ ${EO_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${FONTCONFIG_INCLUDE_DIR}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
+if (ENABLE_ACCESSIBILITY)
+ list(APPEND DumpRenderTree_INCLUDE_DIRECTORIES
+ ${TOOLS_DIR}/DumpRenderTree/atk
+ ${ATK_INCLUDE_DIRS}
+ )
+ list(APPEND DumpRenderTree_LIBRARIES
+ ${ATK_LIBRARIES}
+ )
+endif ()
+
# FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
# structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
-ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
- -DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3"
- -DDATA_DIR="${THEME_BINARY_DIR}")
-
-INCLUDE_DIRECTORIES(${DumpRenderTree_INCLUDE_DIRECTORIES})
+add_definitions(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
+ -DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3")
-ADD_EXECUTABLE(DumpRenderTree ${DumpRenderTree_SOURCES})
-TARGET_LINK_LIBRARIES(DumpRenderTree ${DumpRenderTree_LIBRARIES})
-SET_TARGET_PROPERTIES(DumpRenderTree PROPERTIES FOLDER "Tools")
+include_directories(${DumpRenderTree_INCLUDE_DIRECTORIES})
-ADD_EXECUTABLE(ImageDiff ${ImageDiff_SOURCES})
-TARGET_LINK_LIBRARIES(ImageDiff ${DumpRenderTree_LIBRARIES})
-SET_TARGET_PROPERTIES(ImageDiff PROPERTIES FOLDER "Tools")
+add_executable(DumpRenderTree ${DumpRenderTree_SOURCES})
+target_link_libraries(DumpRenderTree ${DumpRenderTree_LIBRARIES})
+set_target_properties(DumpRenderTree PROPERTIES FOLDER "Tools")
diff --git a/Tools/DumpRenderTree/efl/DumpRenderTree.cpp b/Tools/DumpRenderTree/efl/DumpRenderTree.cpp
index ef210e07e..ac85f04ab 100644
--- a/Tools/DumpRenderTree/efl/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/efl/DumpRenderTree.cpp
@@ -69,10 +69,18 @@ static bool dumpPixelsForCurrentTest;
static int dumpPixelsForAllTests = false;
static int dumpTree = true;
static int printSeparators = true;
+static int useTimeoutWatchdog = true;
static String dumpFramesAsText(Evas_Object* frame)
{
+ if (!frame)
+ return String();
+
String result;
+ const char* frameContents = ewk_frame_plain_text_get(frame);
+
+ if (!frameContents)
+ return String();
if (browser->mainFrame() != frame) {
result.append("\n--------\nFrame: '");
@@ -80,7 +88,6 @@ static String dumpFramesAsText(Evas_Object* frame)
result.append("'\n--------\n");
}
- const char* frameContents = ewk_frame_plain_text_get(frame);
result.append(String::fromUTF8(frameContents));
result.append("\n");
eina_stringshare_del(frameContents);
@@ -161,6 +168,11 @@ static void sendPixelResultsEOF()
fflush(stderr);
}
+bool shouldSetWaitToDumpWatchdog()
+{
+ return !waitToDumpWatchdog && useTimeoutWatchdog;
+}
+
static void invalidateAnyPreviousWaitToDumpWatchdog()
{
if (waitToDumpWatchdog) {
@@ -195,6 +207,7 @@ static bool parseCommandLineOptions(int argc, char** argv)
{"notree", no_argument, &dumpTree, false},
{"pixel-tests", no_argument, &dumpPixelsForAllTests, true},
{"tree", no_argument, &dumpTree, true},
+ {"no-timeout", no_argument, &useTimeoutWatchdog, false},
{0, 0, 0, 0}
};
@@ -274,8 +287,8 @@ static void runTest(const char* inputLine)
WorkQueue::shared()->setFrozen(false);
const bool isSVGW3CTest = testURL.contains("svg/W3C-SVG-1.1");
- const int width = isSVGW3CTest ? 480 : TestRunner::maxViewWidth;
- const int height = isSVGW3CTest ? 360 : TestRunner::maxViewHeight;
+ const int width = isSVGW3CTest ? TestRunner::w3cSVGViewWidth : TestRunner::viewWidth;
+ const int height = isSVGW3CTest ? TestRunner::w3cSVGViewHeight : TestRunner::viewHeight;
evas_object_resize(browser->mainView(), width, height);
if (prevTestBFItem)
@@ -422,11 +435,12 @@ void dump()
static Ecore_Evas* initEcoreEvas()
{
- const char* engine = 0;
+ Ecore_Evas* ecoreEvas = 0;
#if defined(WTF_USE_ACCELERATED_COMPOSITING) && defined(HAVE_ECORE_X)
- engine = "opengl_x11";
+ ecoreEvas = ecore_evas_new("opengl_x11", 0, 0, 800, 600, 0);
+ if (!ecoreEvas)
#endif
- Ecore_Evas* ecoreEvas = ecore_evas_new(engine, 0, 0, 800, 600, 0);
+ ecoreEvas = ecore_evas_new(0, 0, 0, 800, 600, 0);
if (!ecoreEvas) {
shutdownEfl();
exit(EXIT_FAILURE);
diff --git a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp b/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
index fb9c717e2..5a63384d8 100644
--- a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
+++ b/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
@@ -50,11 +50,14 @@
#include <wtf/NotFound.h>
#include <wtf/text/StringBuilder.h>
+#if HAVE(ACCESSIBILITY)
+#include "AccessibilityController.h"
+#endif
+
using namespace WebCore;
HashMap<unsigned long, CString> DumpRenderTreeChrome::m_dumpAssignedUrls;
Evas_Object* DumpRenderTreeChrome::m_provisionalLoadFailedFrame = 0;
-Ewk_Intent_Request* DumpRenderTreeChrome::m_currentIntentRequest = 0;
PassOwnPtr<DumpRenderTreeChrome> DumpRenderTreeChrome::create(Evas* evas)
{
@@ -71,6 +74,9 @@ DumpRenderTreeChrome::DumpRenderTreeChrome(Evas* evas)
, m_mainFrame(0)
, m_evas(evas)
, m_gcController(adoptPtr(new GCController))
+#if HAVE(ACCESSIBILITY)
+ , m_axController(adoptPtr(new AccessibilityController))
+#endif
{
}
@@ -96,7 +102,7 @@ Evas_Object* DumpRenderTreeChrome::createView() const
if (!view)
return 0;
- ewk_view_theme_set(view, DATA_DIR"/default.edj");
+ ewk_view_theme_set(view, TEST_THEME_DIR "/default.edj");
evas_object_smart_callback_add(view, "download,request", onDownloadRequest, 0);
evas_object_smart_callback_add(view, "load,resource,failed", onResourceLoadFailed, 0);
@@ -123,8 +129,6 @@ Evas_Object* DumpRenderTreeChrome::createView() const
Evas_Object* mainFrame = ewk_view_frame_main_get(view);
evas_object_smart_callback_add(mainFrame, "icon,changed", onFrameIconChanged, 0);
- evas_object_smart_callback_add(mainFrame, "intent,new", onFrameIntentNew, 0);
- evas_object_smart_callback_add(mainFrame, "intent,service,register", onFrameIntentServiceRegistration, 0);
evas_object_smart_callback_add(mainFrame, "load,provisional", onFrameProvisionalLoad, 0);
evas_object_smart_callback_add(mainFrame, "load,provisional,failed", onFrameProvisionalLoadFailed, 0);
evas_object_smart_callback_add(mainFrame, "load,committed", onFrameLoadCommitted, 0);
@@ -149,12 +153,12 @@ Evas_Object* DumpRenderTreeChrome::createInspectorView()
const bool ignoreMessages = true;
evas_object_data_set(inspectorView, "ignore-console-messages", &ignoreMessages);
- ewk_view_theme_set(inspectorView, DATA_DIR"/default.edj");
+ ewk_view_theme_set(inspectorView, TEST_THEME_DIR "/default.edj");
Evas_Object* mainFrame = ewk_view_frame_main_get(inspectorView);
evas_object_smart_callback_add(mainFrame, "load,finished", onInspectorFrameLoadFinished, 0);
- evas_object_resize(inspectorView, TestRunner::maxViewWidth, TestRunner::maxViewHeight);
+ evas_object_resize(inspectorView, TestRunner::viewWidth, TestRunner::viewHeight);
evas_object_show(inspectorView);
evas_object_focus_set(inspectorView, true);
@@ -204,11 +208,11 @@ bool DumpRenderTreeChrome::initialize()
if (!m_mainView)
return false;
- ewk_view_theme_set(m_mainView, DATA_DIR"/default.edj");
+ ewk_view_theme_set(m_mainView, TEST_THEME_DIR "/default.edj");
evas_object_name_set(m_mainView, "m_mainView");
evas_object_move(m_mainView, 0, 0);
- evas_object_resize(m_mainView, 800, 600);
+ evas_object_resize(m_mainView, TestRunner::viewWidth, TestRunner::viewHeight);
evas_object_layer_set(m_mainView, EVAS_LAYER_MAX);
evas_object_show(m_mainView);
evas_object_focus_set(m_mainView, EINA_TRUE);
@@ -241,11 +245,6 @@ Evas_Object* DumpRenderTreeChrome::mainView() const
return m_mainView;
}
-Ewk_Intent_Request* DumpRenderTreeChrome::currentIntentRequest() const
-{
- return m_currentIntentRequest;
-}
-
void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
{
ewk_settings_icon_database_clear();
@@ -281,12 +280,10 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
ewk_view_setting_auto_load_images_set(mainView(), EINA_TRUE);
ewk_view_setting_user_stylesheet_set(mainView(), 0);
ewk_view_setting_enable_xss_auditor_set(browser->mainView(), EINA_TRUE);
- ewk_view_setting_minimum_timer_interval_set(browser->mainView(), 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
ewk_view_setting_enable_webgl_set(mainView(), EINA_TRUE);
ewk_view_setting_enable_hyperlink_auditing_set(mainView(), EINA_FALSE);
ewk_view_setting_include_links_in_focus_chain_set(mainView(), EINA_FALSE);
ewk_view_setting_scripts_can_access_clipboard_set(mainView(), EINA_TRUE);
- ewk_view_setting_web_audio_set(mainView(), EINA_FALSE);
ewk_view_setting_allow_universal_access_from_file_urls_set(mainView(), EINA_TRUE);
ewk_view_setting_allow_file_access_from_file_urls_set(mainView(), EINA_TRUE);
ewk_view_setting_resizable_textareas_set(mainView(), EINA_TRUE);
@@ -306,6 +303,10 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
ewk_security_policy_whitelist_origin_reset();
+#if HAVE(ACCESSIBILITY)
+ browser->accessibilityController()->resetToConsistentState();
+#endif
+
DumpRenderTreeSupportEfl::clearFrameName(mainFrame());
DumpRenderTreeSupportEfl::clearOpener(mainFrame());
DumpRenderTreeSupportEfl::clearUserScripts(mainView());
@@ -315,8 +316,6 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
DumpRenderTreeSupportEfl::setValidationMessageTimerMagnification(mainView(), -1);
DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(mainView(), true);
DumpRenderTreeSupportEfl::setCSSGridLayoutEnabled(mainView(), false);
- DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(mainView(), false);
- DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(mainView(), false);
DumpRenderTreeSupportEfl::setDefersLoading(mainView(), false);
DumpRenderTreeSupportEfl::setLoadsSiteIconsIgnoringImageLoadingSetting(mainView(), false);
DumpRenderTreeSupportEfl::setSerializeHTTPLoads(false);
@@ -324,6 +323,8 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
DumpRenderTreeSupportEfl::setCSSRegionsEnabled(mainView(), true);
DumpRenderTreeSupportEfl::setShouldTrackVisitedLinks(false);
DumpRenderTreeSupportEfl::setTracksRepaints(mainFrame(), false);
+ DumpRenderTreeSupportEfl::setSeamlessIFramesEnabled(true);
+ DumpRenderTreeSupportEfl::setWebAudioEnabled(mainView(), false);
// Reset capacities for the memory cache for dead objects.
static const unsigned cacheTotalCapacity = 8192 * 1024;
@@ -331,11 +332,6 @@ void DumpRenderTreeChrome::resetDefaultsToConsistentValues()
DumpRenderTreeSupportEfl::setDeadDecodedDataDeletionInterval(0);
ewk_settings_page_cache_capacity_set(3);
- if (m_currentIntentRequest) {
- ewk_intent_request_unref(m_currentIntentRequest);
- m_currentIntentRequest = 0;
- }
-
policyDelegateEnabled = false;
policyDelegatePermissive = false;
}
@@ -443,6 +439,11 @@ void DumpRenderTreeChrome::onWindowObjectCleared(void* userData, Evas_Object*, v
JSValueRef exception = 0;
ASSERT(gTestRunner);
+#if HAVE(ACCESSIBILITY)
+ browser->accessibilityController()->makeWindowObject(objectClearedInfo->context, objectClearedInfo->windowObject, &exception);
+ ASSERT(!exception);
+#endif
+
GCController* gcController = static_cast<GCController*>(userData);
ASSERT(gcController);
@@ -615,8 +616,6 @@ void DumpRenderTreeChrome::onFrameCreated(void*, Evas_Object*, void* eventInfo)
Evas_Object* frame = static_cast<Evas_Object*>(eventInfo);
evas_object_smart_callback_add(frame, "icon,changed", onFrameIconChanged, 0);
- evas_object_smart_callback_add(frame, "intent,new", onFrameIntentNew, 0);
- evas_object_smart_callback_add(frame, "intent,service,register", onFrameIntentServiceRegistration, 0);
evas_object_smart_callback_add(frame, "load,provisional", onFrameProvisionalLoad, 0);
evas_object_smart_callback_add(frame, "load,provisional,failed", onFrameProvisionalLoadFailed, 0);
evas_object_smart_callback_add(frame, "load,committed", onFrameLoadCommitted, 0);
@@ -850,61 +849,6 @@ void DumpRenderTreeChrome::onNewResourceRequest(void*, Evas_Object*, void* event
m_dumpAssignedUrls.add(request->identifier, pathSuitableForTestResult(request->url));
}
-void DumpRenderTreeChrome::onFrameIntentNew(void*, Evas_Object*, void* eventInfo)
-{
- Ewk_Intent_Request* request = static_cast<Ewk_Intent_Request*>(eventInfo);
- Ewk_Intent* intent = ewk_intent_request_intent_get(request);
- if (!intent)
- return;
-
- ewk_intent_request_ref(request);
- if (m_currentIntentRequest)
- ewk_intent_request_unref(m_currentIntentRequest);
- m_currentIntentRequest = request;
-
- printf("Received Web Intent: action=%s type=%s\n",
- ewk_intent_action_get(intent),
- ewk_intent_type_get(intent));
-
- const MessagePortChannelArray* messagePorts = DumpRenderTreeSupportEfl::intentMessagePorts(intent);
- if (messagePorts)
- printf("Have %d ports\n", static_cast<int>(messagePorts->size()));
-
- const char* service = ewk_intent_service_get(intent);
- if (service && strcmp(service, ""))
- printf("Explicit intent service: %s\n", service);
-
- void* data = 0;
- Eina_List* extraNames = ewk_intent_extra_names_get(intent);
- EINA_LIST_FREE(extraNames, data) {
- const char* name = static_cast<char*>(data);
- const char* value = ewk_intent_extra_get(intent, name);
- if (value) {
- printf("Extras[%s] = %s\n", name, value);
- eina_stringshare_del(value);
- }
- eina_stringshare_del(name);
- }
-
- Eina_List* suggestions = ewk_intent_suggestions_get(intent);
- EINA_LIST_FREE(suggestions, data) {
- const char* suggestion = static_cast<char*>(data);
- printf("Have suggestion %s\n", suggestion);
- eina_stringshare_del(suggestion);
- }
-}
-
-void DumpRenderTreeChrome::onFrameIntentServiceRegistration(void*, Evas_Object*, void* eventInfo)
-{
- Ewk_Intent_Service_Info* serviceInfo = static_cast<Ewk_Intent_Service_Info*>(eventInfo);
- printf("Registered Web Intent Service: action=%s type=%s title=%s url=%s disposition=%s\n",
- serviceInfo->action,
- serviceInfo->type,
- serviceInfo->title,
- serviceInfo->href,
- serviceInfo->disposition);
-}
-
void DumpRenderTreeChrome::onDownloadRequest(void*, Evas_Object*, void* eventInfo)
{
// In case of "download,request", the URL need to be downloaded, not opened on the current view.
@@ -915,8 +859,15 @@ void DumpRenderTreeChrome::onDownloadRequest(void*, Evas_Object*, void* eventInf
return;
Ewk_Download* download = static_cast<Ewk_Download*>(eventInfo);
- ewk_view_theme_set(newView, DATA_DIR"/default.edj");
+ ewk_view_theme_set(newView, TEST_THEME_DIR "/default.edj");
ewk_view_uri_set(newView, download->url);
browser->m_extraViews.append(newView);
}
+
+#if HAVE(ACCESSIBILITY)
+AccessibilityController* DumpRenderTreeChrome::accessibilityController() const
+{
+ return m_axController.get();
+}
+#endif
diff --git a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h b/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h
index 32a365490..836596561 100644
--- a/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h
+++ b/Tools/DumpRenderTree/efl/DumpRenderTreeChrome.h
@@ -32,13 +32,16 @@
#include <Eina.h>
#include <Evas.h>
-#include <ewk_intent_request.h>
#include <wtf/HashMap.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
#include <wtf/text/CString.h>
+#if HAVE(ACCESSIBILITY)
+#include "AccessibilityController.h"
+#endif
+
class DumpRenderTreeChrome {
public:
~DumpRenderTreeChrome();
@@ -58,8 +61,6 @@ public:
Evas_Object* mainFrame() const;
Evas_Object* mainView() const;
- Ewk_Intent_Request* currentIntentRequest() const;
-
void resetDefaultsToConsistentValues();
private:
@@ -67,7 +68,10 @@ private:
Evas_Object* createView() const;
bool initialize();
-
+#if HAVE(ACCESSIBILITY)
+ AccessibilityController* accessibilityController() const;
+ OwnPtr<AccessibilityController> m_axController;
+#endif
Evas_Object* m_mainFrame;
Evas_Object* m_mainView;
Evas* m_evas;
@@ -75,7 +79,6 @@ private:
Vector<Evas_Object*> m_extraViews;
static HashMap<unsigned long, CString> m_dumpAssignedUrls;
static Evas_Object* m_provisionalLoadFailedFrame;
- static Ewk_Intent_Request* m_currentIntentRequest;
// Smart callbacks
static void onWindowObjectCleared(void*, Evas_Object*, void*);
@@ -139,9 +142,6 @@ private:
static void onNewResourceRequest(void*, Evas_Object*, void*);
- static void onFrameIntentNew(void*, Evas_Object*, void*);
- static void onFrameIntentServiceRegistration(void*, Evas_Object*, void*);
-
static void onDownloadRequest(void*, Evas_Object*, void*);
};
diff --git a/Tools/DumpRenderTree/efl/DumpRenderTreeEfl.h b/Tools/DumpRenderTree/efl/DumpRenderTreeEfl.h
index f474c89e2..ebc5cd35a 100644
--- a/Tools/DumpRenderTree/efl/DumpRenderTreeEfl.h
+++ b/Tools/DumpRenderTree/efl/DumpRenderTreeEfl.h
@@ -40,4 +40,6 @@ extern bool policyDelegateEnabled;
extern bool policyDelegatePermissive;
extern Ecore_Timer* waitToDumpWatchdog;
+bool shouldSetWaitToDumpWatchdog();
+
#endif /* DumpRenderTreeEfl_h */
diff --git a/Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp b/Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp
index d24bf3606..f7b425c6e 100644
--- a/Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp
+++ b/Tools/DumpRenderTree/efl/DumpRenderTreeView.cpp
@@ -91,6 +91,12 @@ static Eina_Bool onJavaScriptConfirm(Ewk_View_Smart_Data*, Evas_Object*, const c
return EINA_TRUE;
}
+static Eina_Bool onBeforeUnloadConfirm(Ewk_View_Smart_Data*, Evas_Object*, const char* message)
+{
+ printf("CONFIRM NAVIGATION: %s\n", message);
+ return !gTestRunner->shouldStayOnPageAfterHandlingBeforeUnload();
+}
+
static Eina_Bool onJavaScriptPrompt(Ewk_View_Smart_Data*, Evas_Object*, const char* message, const char* defaultValue, const char** value)
{
printf("PROMPT: %s, default text: %s\n", message, defaultValue);
@@ -217,6 +223,7 @@ Evas_Object* drtViewAdd(Evas* evas)
api.add_console_message = onConsoleMessage;
api.run_javascript_alert = onJavaScriptAlert;
api.run_javascript_confirm = onJavaScriptConfirm;
+ api.run_before_unload_confirm = onBeforeUnloadConfirm;
api.run_javascript_prompt = onJavaScriptPrompt;
api.window_create = onWindowCreate;
api.window_close = onWindowClose;
diff --git a/Tools/DumpRenderTree/efl/FontManagement.cpp b/Tools/DumpRenderTree/efl/FontManagement.cpp
index df8a150d5..eee26d141 100644
--- a/Tools/DumpRenderTree/efl/FontManagement.cpp
+++ b/Tools/DumpRenderTree/efl/FontManagement.cpp
@@ -89,10 +89,10 @@ static void addFontFiles(const Vector<CString>& fontFiles, FcConfig* config)
static CString getCustomBuildDir()
{
- if (const char* userChosenBuildDir = getenv("WEBKITOUTPUTDIR")) {
+ if (const char* userChosenBuildDir = getenv("WEBKIT_OUTPUTDIR")) {
if (ecore_file_is_dir(userChosenBuildDir))
return userChosenBuildDir;
- fprintf(stderr, "WEBKITOUTPUTDIR set to '%s', but path doesn't exist.\n", userChosenBuildDir);
+ fprintf(stderr, "WEBKIT_OUTPUTDIR set to '%s', but path doesn't exist.\n", userChosenBuildDir);
}
return CString();
@@ -104,7 +104,7 @@ static CString getPlatformFontsPath()
if (!customBuildDir.isNull()) {
CString fontsPath = buildPath(customBuildDir.data(), "Dependencies", "Root", "webkitgtk-test-fonts", 0);
if (!ecore_file_exists(fontsPath.data()))
- fprintf(stderr, "WEBKITOUTPUTDIR set to '%s', but could not local test fonts.\n", customBuildDir.data());
+ fprintf(stderr, "WEBKIT_OUTPUTDIR set to '%s', but could not local test fonts.\n", customBuildDir.data());
return fontsPath;
}
@@ -112,7 +112,7 @@ static CString getPlatformFontsPath()
if (ecore_file_exists(fontsPath.data()))
return fontsPath;
- fprintf(stderr, "Could not locate tests fonts, try setting WEBKITOUTPUTDIR.\n");
+ fprintf(stderr, "Could not locate tests fonts, try setting WEBKIT_OUTPUTDIR.\n");
return CString();
}
diff --git a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp b/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
index cd78b10aa..9f66e95e9 100644
--- a/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
+++ b/Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
@@ -112,11 +112,6 @@ void TestRunner::keepWebHistory()
DumpRenderTreeSupportEfl::setShouldTrackVisitedLinks(true);
}
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
-{
- return DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(context, value);
-}
-
size_t TestRunner::webHistoryItemCount()
{
const Ewk_History* history = ewk_view_history_get(browser->mainView());
@@ -126,11 +121,6 @@ size_t TestRunner::webHistoryItemCount()
return ewk_history_back_list_length(history) + ewk_history_forward_list_length(history);
}
-unsigned TestRunner::workerThreadCount() const
-{
- return DumpRenderTreeSupportEfl::workerThreadCount();
-}
-
void TestRunner::notifyDone()
{
if (m_waitToDump && !topLoadingFrame && !WorkQueue::shared()->count())
@@ -261,6 +251,7 @@ void TestRunner::setValueForUser(JSContextRef context, JSValueRef nodeObject, JS
void TestRunner::setViewModeMediaFeature(JSStringRef mode)
{
+#if ENABLE(VIEW_MODE_CSS_MEDIA)
Evas_Object* view = browser->mainView();
if (!view)
return;
@@ -275,6 +266,9 @@ void TestRunner::setViewModeMediaFeature(JSStringRef mode)
ewk_view_mode_set(view, EWK_VIEW_MODE_MAXIMIZED);
else if (equals(mode, "minimized"))
ewk_view_mode_set(view, EWK_VIEW_MODE_MINIMIZED);
+#else
+ UNUSED_PARAM(mode);
+#endif
}
void TestRunner::setWindowIsKey(bool)
@@ -282,11 +276,6 @@ void TestRunner::setWindowIsKey(bool)
notImplemented();
}
-void TestRunner::setSmartInsertDeleteEnabled(bool flag)
-{
- DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(browser->mainView(), flag);
-}
-
static Eina_Bool waitToDumpWatchdogFired(void*)
{
waitToDumpWatchdog = 0;
@@ -299,7 +288,7 @@ void TestRunner::setWaitToDump(bool waitUntilDone)
static const double timeoutSeconds = 30;
m_waitToDump = waitUntilDone;
- if (m_waitToDump && !waitToDumpWatchdog)
+ if (m_waitToDump && shouldSetWaitToDumpWatchdog())
waitToDumpWatchdog = ecore_timer_add(timeoutSeconds, waitToDumpWatchdogFired, 0);
}
@@ -323,11 +312,6 @@ void TestRunner::setXSSAuditorEnabled(bool flag)
ewk_view_setting_enable_xss_auditor_set(browser->mainView(), flag);
}
-void TestRunner::setFrameFlatteningEnabled(bool flag)
-{
- ewk_view_setting_enable_frame_flattening_set(browser->mainView(), flag);
-}
-
void TestRunner::setSpatialNavigationEnabled(bool flag)
{
ewk_view_setting_spatial_navigation_set(browser->mainView(), flag);
@@ -348,16 +332,6 @@ void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
DumpRenderTreeSupportEfl::setAuthorAndUserStylesEnabled(browser->mainView(), flag);
}
-void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
-{
- DumpRenderTreeSupportEfl::setAutofilled(context, nodeObject, autofilled);
-}
-
-void TestRunner::disableImageLoading()
-{
- ewk_view_setting_auto_load_images_set(browser->mainView(), EINA_FALSE);
-}
-
void TestRunner::setMockDeviceOrientation(bool, double, bool, double, bool, double)
{
// FIXME: Implement for DeviceOrientation layout tests.
@@ -446,11 +420,6 @@ void TestRunner::setIconDatabaseEnabled(bool enabled)
ewk_settings_icon_database_path_set(databasePath.utf8().data());
}
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
-{
- DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(browser->mainView(), flag);
-}
-
void TestRunner::setPopupBlockingEnabled(bool flag)
{
ewk_view_setting_scripts_can_open_windows_set(browser->mainView(), !flag);
@@ -461,13 +430,6 @@ void TestRunner::setPluginsEnabled(bool flag)
ewk_view_setting_enable_plugins_set(browser->mainView(), flag);
}
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
- const String elementId(id->string());
- const Evas_Object* mainFrame = browser->mainFrame();
- return DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(mainFrame, elementId);
-}
-
void TestRunner::execCommand(JSStringRef name, JSStringRef value)
{
DumpRenderTreeSupportEfl::executeCoreCommandByName(browser->mainView(), name->string().utf8().data(), value->string().utf8().data());
@@ -660,21 +622,6 @@ void TestRunner::setAppCacheMaximumSize(unsigned long long size)
ewk_settings_application_cache_max_quota_set(size);
}
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
- return DumpRenderTreeSupportEfl::pauseAnimation(browser->mainFrame(), animationName->string().utf8().data(), elementId->string().utf8().data(), time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- return DumpRenderTreeSupportEfl::pauseTransition(browser->mainFrame(), propertyName->string().utf8().data(), elementId->string().utf8().data(), time);
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- return DumpRenderTreeSupportEfl::activeAnimationsCount(browser->mainFrame());
-}
-
static inline bool toBool(JSStringRef value)
{
return equals(value, "true") || equals(value, "1");
@@ -714,7 +661,7 @@ void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
else if (equals(key, "WebKitCSSRegionsEnabled"))
DumpRenderTreeSupportEfl::setCSSRegionsEnabled(browser->mainView(), toBool(value));
else if (equals(key, "WebKitWebAudioEnabled"))
- ewk_view_setting_web_audio_set(browser->mainView(), toBool(value));
+ DumpRenderTreeSupportEfl::setWebAudioEnabled(browser->mainView(), toBool(value));
else if (equals(key, "WebKitDisplayImagesKey"))
ewk_view_setting_auto_load_images_set(browser->mainView(), toBool(value));
else
@@ -736,11 +683,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
ewk_view_setting_enable_developer_extras_set(browser->mainView(), enabled);
}
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
- notImplemented();
-}
-
void TestRunner::showWebInspector()
{
ewk_view_inspector_show(browser->mainView());
@@ -796,16 +738,6 @@ void TestRunner::setWebViewEditable(bool)
ewk_frame_editable_set(browser->mainFrame(), EINA_TRUE);
}
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
-{
- String markerTextChar = DumpRenderTreeSupportEfl::markerTextForListItem(context, nodeObject);
- if (markerTextChar.isEmpty())
- return 0;
-
- JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithUTF8CString(markerTextChar.utf8().data()));
- return markerText;
-}
-
void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
{
notImplemented();
@@ -821,11 +753,6 @@ void TestRunner::setSerializeHTTPLoads(bool serialize)
DumpRenderTreeSupportEfl::setSerializeHTTPLoads(serialize);
}
-void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
-{
- ewk_view_setting_minimum_timer_interval_set(browser->mainView(), minimumTimerInterval);
-}
-
void TestRunner::setTextDirection(JSStringRef direction)
{
Ewk_Text_Direction ewkDirection;
@@ -897,8 +824,8 @@ void TestRunner::setPageVisibility(const char* visibility)
ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_HIDDEN, false);
else if (newVisibility == "prerender")
ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_PRERENDER, false);
- else if (newVisibility == "preview")
- ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_PREVIEW, false);
+ else if (newVisibility == "unloaded")
+ ewk_view_visibility_state_set(browser->mainView(), EWK_PAGE_VISIBILITY_STATE_UNLOADED, false);
}
void TestRunner::setAutomaticLinkDetectionEnabled(bool)
@@ -906,21 +833,18 @@ void TestRunner::setAutomaticLinkDetectionEnabled(bool)
notImplemented();
}
-void TestRunner::sendWebIntentResponse(JSStringRef response)
+void TestRunner::setStorageDatabaseIdleInterval(double)
{
- Ewk_Intent_Request* request = browser->currentIntentRequest();
- if (!request)
- return;
-
- DumpRenderTreeSupportEfl::sendWebIntentResponse(request, response);
+ notImplemented();
}
-void TestRunner::deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data)
+void TestRunner::closeIdleLocalStorageDatabases()
{
- DumpRenderTreeSupportEfl::deliverWebIntent(browser->mainFrame(), action, type, data);
+ notImplemented();
}
-void TestRunner::setStorageDatabaseIdleInterval(double)
+JSRetainPtr<JSStringRef> TestRunner::platformName() const
{
- notImplemented();
+ JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("efl"));
+ return platformName;
}
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp b/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
index 466182bb3..d89a8d2f6 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp
@@ -35,22 +35,7 @@
#include <atk/atk.h>
#include <gtk/gtk.h>
#include <webkit/webkit.h>
-
-static bool loggingAccessibilityEvents = false;
-
-AccessibilityController::AccessibilityController()
-{
-}
-
-AccessibilityController::~AccessibilityController()
-{
-}
-
-AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
-{
- // FIXME: implement
- return 0;
-}
+#include <wtf/gobject/GOwnPtr.h>
AccessibilityUIElement AccessibilityController::focusedElement()
{
@@ -72,42 +57,18 @@ AccessibilityUIElement AccessibilityController::rootElement()
AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRef id)
{
- // FIXME: implement
- return 0;
-}
-
-void AccessibilityController::setLogFocusEvents(bool)
-{
-}
-
-void AccessibilityController::setLogScrollingStartEvents(bool)
-{
-}
-
-void AccessibilityController::setLogValueChangeEvents(bool)
-{
-}
-
-void AccessibilityController::setLogAccessibilityEvents(bool logAccessibilityEvents)
-{
- if (logAccessibilityEvents == loggingAccessibilityEvents)
- return;
+ AtkObject* root = DumpRenderTreeSupportGtk::getRootAccessibleElement(mainFrame);
+ if (!root)
+ return 0;
- if (!logAccessibilityEvents) {
- disconnectAccessibilityCallbacks();
- loggingAccessibilityEvents = false;
- return;
- }
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(id);
+ GOwnPtr<gchar> idBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(id, idBuffer.get(), bufferSize);
- connectAccessibilityCallbacks();
- loggingAccessibilityEvents = true;
-}
+ AtkObject* result = childElementById(root, idBuffer.get());
+ if (ATK_IS_OBJECT(result))
+ return AccessibilityUIElement(result);
-bool AccessibilityController::addNotificationListener(JSObjectRef)
-{
- return false;
-}
+ return 0;
-void AccessibilityController::removeNotificationListener()
-{
}
diff --git a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
index b00c583f0..30f7b6436 100644
--- a/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp
@@ -37,382 +37,6 @@
#include <wtf/text/WTFString.h>
#include <wtf/unicode/CharacterNames.h>
-static inline String roleToString(AtkRole role)
-{
- switch (role) {
- case ATK_ROLE_ALERT:
- return "AXRole: AXAlert";
- case ATK_ROLE_CANVAS:
- return "AXRole: AXCanvas";
- case ATK_ROLE_CHECK_BOX:
- return "AXRole: AXCheckBox";
- case ATK_ROLE_COLUMN_HEADER:
- return "AXRole: AXColumnHeader";
- case ATK_ROLE_COMBO_BOX:
- return "AXRole: AXComboBox";
- case ATK_ROLE_DOCUMENT_FRAME:
- return "AXRole: AXWebArea";
- case ATK_ROLE_ENTRY:
- return "AXRole: AXTextField";
- case ATK_ROLE_FOOTER:
- return "AXRole: AXFooter";
- case ATK_ROLE_FORM:
- return "AXRole: AXForm";
- case ATK_ROLE_GROUPING:
- return "AXRole: AXGroup";
- case ATK_ROLE_HEADING:
- return "AXRole: AXHeading";
- case ATK_ROLE_IMAGE:
- return "AXRole: AXImage";
- case ATK_ROLE_IMAGE_MAP:
- return "AXRole: AXImageMap";
- case ATK_ROLE_LABEL:
- return "AXRole: AXLabel";
- case ATK_ROLE_LINK:
- return "AXRole: AXLink";
- case ATK_ROLE_LIST:
- return "AXRole: AXList";
- case ATK_ROLE_LIST_BOX:
- return "AXRole: AXListBox";
- case ATK_ROLE_LIST_ITEM:
- return "AXRole: AXListItem";
- case ATK_ROLE_MENU:
- return "AXRole: AXMenu";
- case ATK_ROLE_MENU_BAR:
- return "AXRole: AXMenuBar";
- case ATK_ROLE_MENU_ITEM:
- return "AXRole: AXMenuItem";
- case ATK_ROLE_PAGE_TAB:
- return "AXRole: AXTab";
- case ATK_ROLE_PAGE_TAB_LIST:
- return "AXRole: AXTabGroup";
- case ATK_ROLE_PANEL:
- return "AXRole: AXGroup";
- case ATK_ROLE_PARAGRAPH:
- return "AXRole: AXParagraph";
- case ATK_ROLE_PASSWORD_TEXT:
- return "AXRole: AXPasswordField";
- case ATK_ROLE_PUSH_BUTTON:
- return "AXRole: AXButton";
- case ATK_ROLE_RADIO_BUTTON:
- return "AXRole: AXRadioButton";
- case ATK_ROLE_ROW_HEADER:
- return "AXRole: AXRowHeader";
- case ATK_ROLE_RULER:
- return "AXRole: AXRuler";
- case ATK_ROLE_SCROLL_BAR:
- return "AXRole: AXScrollBar";
- case ATK_ROLE_SCROLL_PANE:
- return "AXRole: AXScrollArea";
- case ATK_ROLE_SECTION:
- return "AXRole: AXDiv";
- case ATK_ROLE_SEPARATOR:
- return "AXRole: AXHorizontalRule";
- case ATK_ROLE_SLIDER:
- return "AXRole: AXSlider";
- case ATK_ROLE_SPIN_BUTTON:
- return "AXRole: AXSpinButton";
- case ATK_ROLE_TABLE:
- return "AXRole: AXTable";
- case ATK_ROLE_TABLE_CELL:
- return "AXRole: AXCell";
- case ATK_ROLE_TABLE_COLUMN_HEADER:
- return "AXRole: AXColumnHeader";
- case ATK_ROLE_TABLE_ROW:
- return "AXRole: AXRow";
- case ATK_ROLE_TABLE_ROW_HEADER:
- return "AXRole: AXRowHeader";
- case ATK_ROLE_TOGGLE_BUTTON:
- return "AXRole: AXToggleButton";
- case ATK_ROLE_TOOL_BAR:
- return "AXRole: AXToolbar";
- case ATK_ROLE_TOOL_TIP:
- return "AXRole: AXUserInterfaceTooltip";
- case ATK_ROLE_TREE:
- return "AXRole: AXTree";
- case ATK_ROLE_TREE_TABLE:
- return "AXRole: AXTreeGrid";
- case ATK_ROLE_TREE_ITEM:
- return "AXRole: AXTreeItem";
- case ATK_ROLE_WINDOW:
- return "AXRole: AXWindow";
- case ATK_ROLE_UNKNOWN:
- return "AXRole: AXUnknown";
- default:
- // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
- // our DRT isn't properly handling.
- return "AXRole: FIXME not identified";
- }
-}
-
-static inline gchar* replaceCharactersForResults(gchar* str)
-{
- String uString = String::fromUTF8(str);
-
- // The object replacement character is passed along to ATs so we need to be
- // able to test for their presence and do so without causing test failures.
- uString.replace(objectReplacementCharacter, "<obj>");
-
- // The presence of newline characters in accessible text of a single object
- // is appropriate, but it makes test results (especially the accessible tree)
- // harder to read.
- uString.replace("\n", "<\\n>");
-
- return g_strdup(uString.utf8().data());
-}
-
-AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
- : m_element(element)
-{
- if (m_element)
- g_object_ref(m_element);
-}
-
-AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
- : m_element(other.m_element)
-{
- if (m_element)
- g_object_ref(m_element);
-}
-
-AccessibilityUIElement::~AccessibilityUIElement()
-{
- if (m_element)
- g_object_unref(m_element);
-}
-
-void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>& elements)
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&)
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children)
-{
- int count = childrenCount();
- for (int i = 0; i < count; i++) {
- AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
- children.append(AccessibilityUIElement(child));
- }
-}
-
-void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned start, unsigned end)
-{
- for (unsigned i = start; i < end; i++) {
- AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
- elementVector.append(AccessibilityUIElement(child));
- }
-}
-
-int AccessibilityUIElement::rowCount()
-{
- if (!m_element)
- return 0;
-
- ASSERT(ATK_IS_TABLE(m_element));
-
- return atk_table_get_n_rows(ATK_TABLE(m_element));
-}
-
-int AccessibilityUIElement::columnCount()
-{
- if (!m_element)
- return 0;
-
- ASSERT(ATK_IS_TABLE(m_element));
-
- return atk_table_get_n_columns(ATK_TABLE(m_element));
-}
-
-int AccessibilityUIElement::childrenCount()
-{
- if (!m_element)
- return 0;
-
- ASSERT(ATK_IS_OBJECT(m_element));
-
- return atk_object_get_n_accessible_children(ATK_OBJECT(m_element));
-}
-
-AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
-{
- // FIXME: implement
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::linkedUIElementAtIndex(unsigned index)
-{
- // FIXME: implement
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
-{
- Vector<AccessibilityUIElement> children;
- getChildrenWithRange(children, index, index + 1);
-
- if (children.size() == 1)
- return children.at(0);
-
- return 0;
-}
-
-unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
-{
- // FIXME: implement
- return 0;
-}
-
-gchar* attributeSetToString(AtkAttributeSet* attributeSet)
-{
- GString* str = g_string_new(0);
- for (GSList* attributes = attributeSet; attributes; attributes = attributes->next) {
- AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
- GOwnPtr<gchar> attributeData(g_strconcat(attribute->name, ":", attribute->value, NULL));
- g_string_append(str, attributeData.get());
- if (attributes->next)
- g_string_append(str, ", ");
- }
-
- return g_string_free(str, FALSE);
-}
-
-JSStringRef AccessibilityUIElement::allAttributes()
-{
- if (!m_element)
- return JSStringCreateWithCharacters(0, 0);
-
- ASSERT(ATK_IS_OBJECT(m_element));
- GOwnPtr<gchar> attributeData(attributeSetToString(atk_object_get_attributes(ATK_OBJECT(m_element))));
- return JSStringCreateWithUTF8CString(attributeData.get());
-}
-
-JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-AccessibilityUIElement AccessibilityUIElement::titleUIElement()
-{
-
- if (!m_element)
- return 0;
-
- AtkRelationSet* set = atk_object_ref_relation_set(ATK_OBJECT(m_element));
- if (!set)
- return 0;
-
- AtkObject* target = 0;
- int count = atk_relation_set_get_n_relations(set);
- for (int i = 0; i < count; i++) {
- AtkRelation* relation = atk_relation_set_get_relation(set, i);
- if (atk_relation_get_relation_type(relation) == ATK_RELATION_LABELLED_BY) {
- GPtrArray* targetList = atk_relation_get_target(relation);
- if (targetList->len)
- target = static_cast<AtkObject*>(g_ptr_array_index(targetList, 0));
- }
- g_object_unref(set);
- }
-
- return target ? AccessibilityUIElement(target) : 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::parentElement()
-{
- if (!m_element)
- return 0;
-
- ASSERT(ATK_IS_OBJECT(m_element));
-
- AtkObject* parent = atk_object_get_parent(ATK_OBJECT(m_element));
- return parent ? AccessibilityUIElement(parent) : 0;
-}
-
-JSStringRef AccessibilityUIElement::attributesOfChildren()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::role()
-{
- AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
- if (!role)
- return JSStringCreateWithCharacters(0, 0);
-
- String roleString = roleToString(role);
- return JSStringCreateWithUTF8CString(roleString.utf8().data());
-}
-
-JSStringRef AccessibilityUIElement::subrole()
-{
- return 0;
-}
-
-JSStringRef AccessibilityUIElement::roleDescription()
-{
- return 0;
-}
-
-JSStringRef AccessibilityUIElement::title()
-{
- const gchar* name = atk_object_get_name(ATK_OBJECT(m_element));
-
- if (!name)
- return JSStringCreateWithCharacters(0, 0);
-
- GOwnPtr<gchar> axTitle(g_strdup_printf("AXTitle: %s", name));
-
- return JSStringCreateWithUTF8CString(axTitle.get());
-}
-
-JSStringRef AccessibilityUIElement::description()
-{
- const gchar* description = atk_object_get_description(ATK_OBJECT(m_element));
-
- if (!description)
- return JSStringCreateWithCharacters(0, 0);
-
- GOwnPtr<gchar> axDesc(g_strdup_printf("AXDescription: %s", description));
-
- return JSStringCreateWithUTF8CString(axDesc.get());
-}
-
-JSStringRef AccessibilityUIElement::stringValue()
-{
- if (!m_element || !ATK_IS_TEXT(m_element))
- return JSStringCreateWithCharacters(0, 0);
-
- gchar* text = atk_text_get_text(ATK_TEXT(m_element), 0, -1);
- GOwnPtr<gchar> axValue(g_strdup_printf("AXValue: %s", replaceCharactersForResults(text)));
- g_free(text);
-
- return JSStringCreateWithUTF8CString(axValue.get());
-}
-
-JSStringRef AccessibilityUIElement::language()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
JSStringRef AccessibilityUIElement::helpText() const
{
if (!m_element)
@@ -424,585 +48,3 @@ JSStringRef AccessibilityUIElement::helpText() const
GOwnPtr<gchar> axHelpText(g_strdup_printf("AXHelp: %s", helpText.data()));
return JSStringCreateWithUTF8CString(axHelpText.get());
}
-
-double AccessibilityUIElement::x()
-{
- int x, y;
-
- atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
-
- return x;
-}
-
-double AccessibilityUIElement::y()
-{
- int x, y;
-
- atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
-
- return y;
-}
-
-double AccessibilityUIElement::width()
-{
- int width, height;
-
- atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
-
- return width;
-}
-
-double AccessibilityUIElement::height()
-{
- int width, height;
-
- atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
-
- return height;
-}
-
-double AccessibilityUIElement::clickPointX()
-{
- return 0.f;
-}
-
-double AccessibilityUIElement::clickPointY()
-{
- return 0.f;
-}
-
-JSStringRef AccessibilityUIElement::orientation() const
-{
- return 0;
-}
-
-double AccessibilityUIElement::intValue() const
-{
- GValue value = { 0, { { 0 } } };
-
- if (!ATK_IS_VALUE(m_element))
- return 0.0f;
-
- atk_value_get_current_value(ATK_VALUE(m_element), &value);
- if (!G_VALUE_HOLDS_FLOAT(&value))
- return 0.0f;
- return g_value_get_float(&value);
-}
-
-double AccessibilityUIElement::minValue()
-{
- GValue value = { 0, { { 0 } } };
-
- if (!ATK_IS_VALUE(m_element))
- return 0.0f;
-
- atk_value_get_minimum_value(ATK_VALUE(m_element), &value);
- if (!G_VALUE_HOLDS_FLOAT(&value))
- return 0.0f;
- return g_value_get_float(&value);
-}
-
-double AccessibilityUIElement::maxValue()
-{
- GValue value = { 0, { { 0 } } };
-
- if (!ATK_IS_VALUE(m_element))
- return 0.0f;
-
- atk_value_get_maximum_value(ATK_VALUE(m_element), &value);
- if (!G_VALUE_HOLDS_FLOAT(&value))
- return 0.0f;
- return g_value_get_float(&value);
-}
-
-JSStringRef AccessibilityUIElement::valueDescription()
-{
- // FIXME: implement after it has been implemented in ATK.
- // See: https://bugzilla.gnome.org/show_bug.cgi?id=684576
- return JSStringCreateWithCharacters(0, 0);
-}
-
-static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
-{
- if (!ATK_IS_OBJECT(element))
- return false;
-
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
- return atk_state_set_contains_state(stateSet.get(), stateType);
-}
-
-bool AccessibilityUIElement::isEnabled()
-{
- return checkElementState(m_element, ATK_STATE_ENABLED);
-}
-
-int AccessibilityUIElement::insertionPointLineNumber()
-{
- // FIXME: implement
- return 0;
-}
-
-bool AccessibilityUIElement::isActionSupported(JSStringRef action)
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isRequired() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isFocused() const
-{
- if (!ATK_IS_OBJECT(m_element))
- return false;
-
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
- gboolean isFocused = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSED);
-
- return isFocused;
-}
-
-bool AccessibilityUIElement::isSelected() const
-{
- return checkElementState(m_element, ATK_STATE_SELECTED);
-}
-
-int AccessibilityUIElement::hierarchicalLevel() const
-{
- // FIXME: implement
- return 0;
-}
-
-bool AccessibilityUIElement::ariaIsGrabbed() const
-{
- return false;
-}
-
-JSStringRef AccessibilityUIElement::ariaDropEffects() const
-{
- return 0;
-}
-
-bool AccessibilityUIElement::isExpanded() const
-{
- if (!ATK_IS_OBJECT(m_element))
- return false;
-
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
- gboolean isExpanded = atk_state_set_contains_state(stateSet.get(), ATK_STATE_EXPANDED);
-
- return isExpanded;
-}
-
-bool AccessibilityUIElement::isChecked() const
-{
- if (!ATK_IS_OBJECT(m_element))
- return false;
-
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
- gboolean isChecked = atk_state_set_contains_state(stateSet.get(), ATK_STATE_CHECKED);
-
- return isChecked;
-}
-
-JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributesOfColumns()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributesOfRows()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributesOfHeader()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-int AccessibilityUIElement::indexInTable()
-{
- // FIXME: implement
- return 0;
-}
-
-static JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange)
-{
- GOwnPtr<gchar> rangeString(g_strdup("{0, 0}"));
-
- if (!element)
- return JSStringCreateWithUTF8CString(rangeString.get());
-
- ASSERT(ATK_IS_OBJECT(element));
-
- AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element));
- if (!axTable || !ATK_IS_TABLE(axTable))
- return JSStringCreateWithUTF8CString(rangeString.get());
-
- // Look for the cell in the table.
- gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element));
- if (indexInParent == -1)
- return JSStringCreateWithUTF8CString(rangeString.get());
-
- int row = -1;
- int column = -1;
- row = atk_table_get_row_at_index(ATK_TABLE(axTable), indexInParent);
- column = atk_table_get_column_at_index(ATK_TABLE(axTable), indexInParent);
-
- // Get the actual values, if row and columns are valid values.
- if (row != -1 && column != -1) {
- int base = 0;
- int length = 0;
- if (isRowRange) {
- base = row;
- length = atk_table_get_row_extent_at(ATK_TABLE(axTable), row, column);
- } else {
- base = column;
- length = atk_table_get_column_extent_at(ATK_TABLE(axTable), row, column);
- }
- rangeString.set(g_strdup_printf("{%d, %d}", base, length));
- }
-
- return JSStringCreateWithUTF8CString(rangeString.get());
-}
-
-JSStringRef AccessibilityUIElement::rowIndexRange()
-{
- // Range in table for rows.
- return indexRangeInTable(m_element, true);
-}
-
-JSStringRef AccessibilityUIElement::columnIndexRange()
-{
- // Range in table for columns.
- return indexRangeInTable(m_element, false);
-}
-
-int AccessibilityUIElement::lineForIndex(int)
-{
- // FIXME: implement
- return 0;
-}
-
-JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::stringForRange(unsigned, unsigned)
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::attributedStringForRange(unsigned, unsigned)
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location, unsigned length)
-{
- // FIXME: implement
- return false;
-}
-
-AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText)
-{
- // FIXME: implement
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row)
-{
- if (!m_element)
- return 0;
-
- ASSERT(ATK_IS_TABLE(m_element));
-
- AtkObject* foundCell = atk_table_ref_at(ATK_TABLE(m_element), row, column);
- return foundCell ? AccessibilityUIElement(foundCell) : 0;
-}
-
-JSStringRef AccessibilityUIElement::selectedTextRange()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
-{
- // FIXME: implement
-}
-
-JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
-{
- // FIXME: implement
- return 0.0f;
-}
-
-bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
-{
- return false;
-}
-
-static void alterCurrentValue(PlatformUIElement element, int factor)
-{
- if (!element)
- return;
-
- ASSERT(ATK_IS_VALUE(element));
-
- GValue currentValue = G_VALUE_INIT;
- atk_value_get_current_value(ATK_VALUE(element), &currentValue);
-
- GValue increment = G_VALUE_INIT;
- atk_value_get_minimum_increment(ATK_VALUE(element), &increment);
-
- GValue newValue = G_VALUE_INIT;
- g_value_init(&newValue, G_TYPE_FLOAT);
-
- g_value_set_float(&newValue, g_value_get_float(&currentValue) + factor * g_value_get_float(&increment));
- atk_value_set_current_value(ATK_VALUE(element), &newValue);
-
- g_value_unset(&newValue);
- g_value_unset(&increment);
- g_value_unset(&currentValue);
-}
-
-void AccessibilityUIElement::increment()
-{
- alterCurrentValue(m_element, 1);
-}
-
-void AccessibilityUIElement::decrement()
-{
- alterCurrentValue(m_element, -1);
-}
-
-void AccessibilityUIElement::press()
-{
- if (!m_element)
- return;
-
- ASSERT(ATK_IS_OBJECT(m_element));
-
- if (!ATK_IS_ACTION(m_element))
- return;
-
- // Only one action per object is supported so far.
- atk_action_do_action(ATK_ACTION(m_element), 0);
-}
-
-void AccessibilityUIElement::showMenu()
-{
- // FIXME: implement
-}
-
-AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
-{
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned index)
-{
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
-{
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
-{
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::rowAtIndex(unsigned index)
-{
- return 0;
-}
-
-AccessibilityUIElement AccessibilityUIElement::disclosedByRow()
-{
- return 0;
-}
-
-JSStringRef AccessibilityUIElement::accessibilityValue() const
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-JSStringRef AccessibilityUIElement::documentEncoding()
-{
- AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
- if (role != ATK_ROLE_DOCUMENT_FRAME)
- return JSStringCreateWithCharacters(0, 0);
-
- return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "Encoding"));
-}
-
-JSStringRef AccessibilityUIElement::documentURI()
-{
- AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
- if (role != ATK_ROLE_DOCUMENT_FRAME)
- return JSStringCreateWithCharacters(0, 0);
-
- return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
-}
-
-JSStringRef AccessibilityUIElement::url()
-{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
-}
-
-bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
-{
- // FIXME: implement
- return false;
-}
-
-void AccessibilityUIElement::removeNotificationListener()
-{
- // FIXME: implement
-}
-
-bool AccessibilityUIElement::isFocusable() const
-{
- if (!ATK_IS_OBJECT(m_element))
- return false;
-
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
- gboolean isFocusable = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSABLE);
-
- return isFocusable;
-}
-
-bool AccessibilityUIElement::isSelectable() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isMultiSelectable() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isSelectedOptionActive() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isVisible() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isOffScreen() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isCollapsed() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::isIgnored() const
-{
- // FIXME: implement
- return false;
-}
-
-bool AccessibilityUIElement::hasPopup() const
-{
- // FIXME: implement
- return false;
-}
-
-void AccessibilityUIElement::takeFocus()
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::takeSelection()
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::addSelection()
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::removeSelection()
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::scrollToMakeVisible()
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
-{
- // FIXME: implement
-}
-
-void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
-{
- // FIXME: implement
-}
diff --git a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
index bf687b2d3..83212e65d 100644
--- a/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/gtk/DumpRenderTree.cpp
@@ -50,6 +50,7 @@
#include <cstring>
#include <getopt.h>
#include <gtk/gtk.h>
+#include <locale.h>
#include <webkit/webkit.h>
#include <wtf/Assertions.h>
#include <wtf/gobject/GOwnPtr.h>
@@ -173,6 +174,7 @@ static void initializeGtkFontSettings(const char* testURL)
"gtk-xft-antialias", 1,
"gtk-xft-hinting", 0,
"gtk-font-name", "Liberation Sans 12",
+ "gtk-icon-theme-name", "gnome",
NULL);
gdk_screen_set_resolution(gdk_screen_get_default(), 96.0);
@@ -194,7 +196,7 @@ CString getTopLevelPath()
CString getOutputDir()
{
- const char* webkitOutputDir = g_getenv("WEBKITOUTPUTDIR");
+ const char* webkitOutputDir = g_getenv("WEBKIT_OUTPUTDIR");
if (webkitOutputDir)
return webkitOutputDir;
@@ -243,8 +245,7 @@ static void initializeFonts(const char* testURL = 0)
if (fontsPath.isNull())
g_error("Could not locate test fonts at %s. Is WEBKIT_TOP_LEVEL set?", fontsPath.data());
- GOwnPtr<GError> error;
- GOwnPtr<GDir> fontsDirectory(g_dir_open(fontsPath.data(), 0, &error.outPtr()));
+ GOwnPtr<GDir> fontsDirectory(g_dir_open(fontsPath.data(), 0, 0));
while (const char* directoryEntry = g_dir_read_name(fontsDirectory.get())) {
if (!g_str_has_suffix(directoryEntry, ".ttf") && !g_str_has_suffix(directoryEntry, ".otf"))
continue;
@@ -438,41 +439,41 @@ static void resetDefaultsToConsistentValues()
WebKitWebSettings* settings = webkit_web_view_get_settings(webView);
GOwnPtr<gchar> localStoragePath(g_build_filename(g_get_user_data_dir(), "DumpRenderTreeGtk", "databases", NULL));
g_object_set(G_OBJECT(settings),
- "enable-private-browsing", FALSE,
- "enable-developer-extras", FALSE,
- "enable-spell-checking", TRUE,
- "enable-html5-database", TRUE,
- "enable-html5-local-storage", TRUE,
- "html5-local-storage-database-path", localStoragePath.get(),
- "enable-xss-auditor", FALSE,
- "enable-spatial-navigation", FALSE,
- "enable-frame-flattening", FALSE,
- "javascript-can-access-clipboard", TRUE,
- "javascript-can-open-windows-automatically", TRUE,
- "enable-offline-web-application-cache", TRUE,
- "enable-universal-access-from-file-uris", TRUE,
- "enable-file-access-from-file-uris", TRUE,
- "enable-scripts", TRUE,
- "enable-dom-paste", TRUE,
- "default-font-family", "Times",
- "monospace-font-family", "Courier",
- "serif-font-family", "Times",
- "sans-serif-font-family", "Helvetica",
- "cursive-font-family", "cursive",
- "fantasy-font-family", "fantasy",
- "default-font-size", 12,
- "default-monospace-font-size", 10,
- "minimum-font-size", 0,
- "enable-caret-browsing", FALSE,
- "enable-page-cache", FALSE,
- "auto-resize-window", TRUE,
- "auto-load-images", TRUE,
- "enable-java-applet", FALSE,
- "enable-plugins", TRUE,
- "enable-hyperlink-auditing", FALSE,
- "editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX,
- "enable-fullscreen", TRUE,
- NULL);
+ "enable-accelerated-compositing", FALSE,
+ "enable-private-browsing", FALSE,
+ "enable-developer-extras", FALSE,
+ "enable-spell-checking", TRUE,
+ "enable-html5-database", TRUE,
+ "enable-html5-local-storage", TRUE,
+ "html5-local-storage-database-path", localStoragePath.get(),
+ "enable-xss-auditor", FALSE,
+ "enable-spatial-navigation", FALSE,
+ "javascript-can-access-clipboard", TRUE,
+ "javascript-can-open-windows-automatically", TRUE,
+ "enable-offline-web-application-cache", TRUE,
+ "enable-universal-access-from-file-uris", TRUE,
+ "enable-file-access-from-file-uris", TRUE,
+ "enable-scripts", TRUE,
+ "enable-dom-paste", TRUE,
+ "default-font-family", "Times",
+ "monospace-font-family", "Courier",
+ "serif-font-family", "Times",
+ "sans-serif-font-family", "Helvetica",
+ "cursive-font-family", "cursive",
+ "fantasy-font-family", "fantasy",
+ "default-font-size", 12,
+ "default-monospace-font-size", 10,
+ "minimum-font-size", 0,
+ "enable-caret-browsing", FALSE,
+ "enable-page-cache", FALSE,
+ "auto-resize-window", TRUE,
+ "auto-load-images", TRUE,
+ "enable-java-applet", FALSE,
+ "enable-plugins", TRUE,
+ "enable-hyperlink-auditing", FALSE,
+ "editing-behavior", WEBKIT_EDITING_BEHAVIOR_UNIX,
+ "enable-fullscreen", TRUE,
+ NULL);
webkit_web_view_set_settings(webView, settings);
webkit_set_cache_model(WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER);
@@ -483,7 +484,6 @@ static void resetDefaultsToConsistentValues()
g_object_set(G_OBJECT(inspector), "javascript-profiling-enabled", FALSE, NULL);
webkit_web_view_set_zoom_level(webView, 1.0);
- DumpRenderTreeSupportGtk::setMinimumTimerInterval(webView, DumpRenderTreeSupportGtk::defaultMinimumTimerInterval());
DumpRenderTreeSupportGtk::resetOriginAccessWhiteLists();
@@ -502,8 +502,6 @@ static void resetDefaultsToConsistentValues()
DumpRenderTreeSupportGtk::setLinksIncludedInFocusChain(true);
webkit_icon_database_set_path(webkit_get_icon_database(), 0);
- DumpRenderTreeSupportGtk::setSelectTrailingWhitespaceEnabled(false);
- DumpRenderTreeSupportGtk::setSmartInsertDeleteEnabled(webView, true);
DumpRenderTreeSupportGtk::setDefersLoading(webView, false);
DumpRenderTreeSupportGtk::setSerializeHTTPLoads(false);
@@ -518,8 +516,18 @@ static void resetDefaultsToConsistentValues()
DumpRenderTreeSupportGtk::setCSSGridLayoutEnabled(webView, false);
DumpRenderTreeSupportGtk::setCSSRegionsEnabled(webView, true);
DumpRenderTreeSupportGtk::setCSSCustomFilterEnabled(webView, false);
+ DumpRenderTreeSupportGtk::setExperimentalContentSecurityPolicyFeaturesEnabled(true);
+ DumpRenderTreeSupportGtk::setSeamlessIFramesEnabled(true);
DumpRenderTreeSupportGtk::setShadowDOMEnabled(true);
DumpRenderTreeSupportGtk::setStyleScopedEnabled(true);
+
+ if (gTestRunner) {
+ gTestRunner->setAuthenticationPassword("");
+ gTestRunner->setAuthenticationUsername("");
+ gTestRunner->setHandlesAuthenticationChallenges(false);
+ }
+
+ gtk_widget_set_direction(GTK_WIDGET(webView), GTK_TEXT_DIR_NONE);
}
static bool useLongRunningServerMode(int argc, char *argv[])
@@ -643,6 +651,15 @@ void dump()
gtk_main_quit();
}
+static CString temporaryDatabaseDirectory()
+{
+ const char* directoryFromEnvironment = g_getenv("DUMPRENDERTREE_TEMP");
+ if (directoryFromEnvironment)
+ return directoryFromEnvironment;
+ GOwnPtr<char> fallback(g_build_filename(g_get_user_data_dir(), "gtkwebkitdrt", "databases", NULL));
+ return fallback.get();
+}
+
static void setDefaultsToConsistentStateValuesForTesting()
{
resetDefaultsToConsistentValues();
@@ -651,9 +668,7 @@ static void setDefaultsToConsistentStateValuesForTesting()
webkit_web_settings_add_extra_plugin_directory(webView, TEST_PLUGIN_DIR);
#endif
- gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "gtkwebkitdrt", "databases", NULL);
- webkit_set_web_database_directory_path(databaseDirectory);
- g_free(databaseDirectory);
+ webkit_set_web_database_directory_path(temporaryDatabaseDirectory().data());
#if defined(GTK_API_VERSION_2)
gtk_rc_parse_string("style \"nix_scrollbar_spacing\" "
@@ -733,8 +748,8 @@ static void runTest(const string& inputLine)
bool isSVGW3CTest = (testURL.find("svg/W3C-SVG-1.1") != string::npos);
GtkAllocation size;
size.x = size.y = 0;
- size.width = isSVGW3CTest ? 480 : TestRunner::maxViewWidth;
- size.height = isSVGW3CTest ? 360 : TestRunner::maxViewHeight;
+ size.width = isSVGW3CTest ? TestRunner::w3cSVGViewWidth : TestRunner::viewWidth;
+ size.height = isSVGW3CTest ? TestRunner::w3cSVGViewHeight : TestRunner::viewHeight;
gtk_window_resize(GTK_WINDOW(window), size.width, size.height);
gtk_widget_size_allocate(container, &size);
@@ -1053,7 +1068,7 @@ static WebKitWebView* webViewCreate(WebKitWebView*, WebKitWebFrame*);
static gboolean webInspectorShowWindow(WebKitWebInspector*, gpointer data)
{
- gtk_window_set_default_size(GTK_WINDOW(webInspectorWindow), 800, 600);
+ gtk_window_set_default_size(GTK_WINDOW(webInspectorWindow), TestRunner::viewWidth, TestRunner::viewHeight);
gtk_widget_show_all(webInspectorWindow);
return TRUE;
}
@@ -1231,8 +1246,7 @@ static CString descriptionSuitableForTestResult(WebKitNetworkRequest* request)
CString mainDocumentURIString(descriptionSuitableForTestResult(mainDocumentURI));
CString path(convertNetworkRequestToURLPath(request));
GOwnPtr<char> description(g_strdup_printf("<NSURLRequest URL %s, main document URL %s, http method %s>",
- path.data(), mainDocumentURIString.data(),
- soupMessage ? soupMessage->method : "(none)"));
+ path.data(), mainDocumentURIString.data(), soupMessage->method));
return CString(description.get());
}
@@ -1275,15 +1289,23 @@ static void willSendRequestCallback(WebKitWebView* webView, WebKitWebFrame* webF
SoupMessage* soupMessage = webkit_network_request_get_message(request);
SoupURI* uri = soup_uri_new(webkit_network_request_get_uri(request));
- if (SOUP_URI_VALID_FOR_HTTP(uri) && g_strcmp0(uri->host, "127.0.0.1")
- && g_strcmp0(uri->host, "255.255.255.255")
- && g_ascii_strncasecmp(uri->host, "localhost", 9)) {
- printf("Blocked access to external URL %s\n", soup_uri_to_string(uri, FALSE));
- // Cancel load of blocked resource to avoid potential
- // network-related timeouts in tests.
- webkit_network_request_set_uri(request, "about:blank");
- soup_uri_free(uri);
- return;
+ if (SOUP_URI_IS_VALID(uri)) {
+ GOwnPtr<char> uriString(soup_uri_to_string(uri, FALSE));
+
+ if (SOUP_URI_VALID_FOR_HTTP(uri) && g_strcmp0(uri->host, "127.0.0.1")
+ && g_strcmp0(uri->host, "255.255.255.255")
+ && g_ascii_strncasecmp(uri->host, "localhost", 9)) {
+ printf("Blocked access to external URL %s\n", uriString.get());
+ // Cancel load of blocked resource to avoid potential
+ // network-related timeouts in tests.
+ webkit_network_request_set_uri(request, "about:blank");
+ soup_uri_free(uri);
+ return;
+ }
+
+ const string& destination = gTestRunner->redirectionDestinationForURL(uriString.get());
+ if (!destination.empty())
+ webkit_network_request_set_uri(request, destination.c_str());
}
if (uri)
@@ -1337,12 +1359,56 @@ static gboolean webViewRunFileChooser(WebKitWebView*, WebKitFileChooserRequest*)
return TRUE;
}
+static void frameLoadEventCallback(WebKitWebFrame* frame, DumpRenderTreeSupportGtk::FrameLoadEvent event, const char* url)
+{
+ if (done || !gTestRunner->dumpFrameLoadCallbacks())
+ return;
+
+ GOwnPtr<char> frameName(getFrameNameSuitableForTestResult(webkit_web_frame_get_web_view(frame), frame));
+ switch (event) {
+ case DumpRenderTreeSupportGtk::WillPerformClientRedirectToURL:
+ ASSERT(url);
+ printf("%s - willPerformClientRedirectToURL: %s \n", frameName.get(), url);
+ break;
+ case DumpRenderTreeSupportGtk::DidCancelClientRedirect:
+ printf("%s - didCancelClientRedirectForFrame\n", frameName.get());
+ break;
+ case DumpRenderTreeSupportGtk::DidReceiveServerRedirectForProvisionalLoad:
+ printf("%s - didReceiveServerRedirectForProvisionalLoadForFrame\n", frameName.get());
+ break;
+ case DumpRenderTreeSupportGtk::DidDisplayInsecureContent:
+ printf ("didDisplayInsecureContent\n");
+ break;
+ case DumpRenderTreeSupportGtk::DidDetectXSS:
+ printf ("didDetectXSS\n");
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ }
+}
+
+static bool authenticationCallback(CString& username, CString& password)
+{
+ if (!gTestRunner->handlesAuthenticationChallenges()) {
+ printf("<unknown> - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n");
+ return false;
+ }
+
+ username = gTestRunner->authenticationUsername().c_str();
+ password = gTestRunner->authenticationPassword().c_str();
+ printf("<unknown> - didReceiveAuthenticationChallenge - Responding with %s:%s\n", username.data(), password.data());
+ return true;
+}
+
static WebKitWebView* createWebView()
{
// It is important to declare DRT is running early so when creating
// web view mock clients are used instead of proper ones.
DumpRenderTreeSupportGtk::setDumpRenderTreeModeEnabled(true);
+ DumpRenderTreeSupportGtk::setFrameLoadEventCallback(frameLoadEventCallback);
+ DumpRenderTreeSupportGtk::setAuthenticationCallback(authenticationCallback);
+
WebKitWebView* view = WEBKIT_WEB_VIEW(self_scrolling_webkit_web_view_new());
g_object_connect(G_OBJECT(view),
@@ -1427,7 +1493,7 @@ int main(int argc, char* argv[])
initializeGlobalsFromCommandLineOptions(argc, argv);
initializeFonts();
- window = gtk_window_new(GTK_WINDOW_POPUP);
+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
#ifdef GTK_API_VERSION_2
container = gtk_hbox_new(TRUE, 0);
#else
diff --git a/Tools/DumpRenderTree/gtk/EditingCallbacks.cpp b/Tools/DumpRenderTree/gtk/EditingCallbacks.cpp
index 4c968d9f4..ef5a969ae 100644
--- a/Tools/DumpRenderTree/gtk/EditingCallbacks.cpp
+++ b/Tools/DumpRenderTree/gtk/EditingCallbacks.cpp
@@ -59,15 +59,12 @@ static CString dumpRange(WebKitDOMRange* range)
if (!range)
return "(null)";
- GOwnPtr<GError> error1;
- GOwnPtr<GError> error2;
- GOwnPtr<GError> error3;
- GOwnPtr<GError> error4;
GOwnPtr<gchar> dump(g_strdup_printf("range from %li of %s to %li of %s",
- webkit_dom_range_get_start_offset(range, &error1.outPtr()),
- dumpNodePath(webkit_dom_range_get_start_container(range, &error2.outPtr())).data(),
- webkit_dom_range_get_end_offset(range, &error3.outPtr()),
- dumpNodePath(webkit_dom_range_get_end_container(range, &error4.outPtr())).data()));
+ webkit_dom_range_get_start_offset(range, 0),
+ dumpNodePath(webkit_dom_range_get_start_container(range, 0)).data(),
+ webkit_dom_range_get_end_offset(range, 0),
+ dumpNodePath(webkit_dom_range_get_end_container(range, 0)).data()));
+
return dump.get();
}
@@ -138,8 +135,7 @@ gboolean shouldDeleteRange(WebKitWebView* webView, WebKitDOMRange* range)
gboolean shouldShowDeleteInterfaceForElement(WebKitWebView* webView, WebKitDOMHTMLElement* element)
{
- GOwnPtr<gchar> elementClassName(webkit_dom_element_get_class_name(WEBKIT_DOM_ELEMENT(element)));
- return g_str_equal(elementClassName.get(), "needsDeletionUI");
+ return FALSE;
}
gboolean shouldChangeSelectedRange(WebKitWebView* webView, WebKitDOMRange* fromRange, WebKitDOMRange* toRange, WebKitSelectionAffinity affinity, gboolean stillSelecting)
diff --git a/Tools/DumpRenderTree/gtk/EventSender.cpp b/Tools/DumpRenderTree/gtk/EventSender.cpp
index 8f281b239..8fd693564 100644
--- a/Tools/DumpRenderTree/gtk/EventSender.cpp
+++ b/Tools/DumpRenderTree/gtk/EventSender.cpp
@@ -437,6 +437,10 @@ static JSValueRef mouseScrollByCallback(JSContextRef context, JSObjectRef functi
int vertical = (int)JSValueToNumber(context, arguments[1], exception);
g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));
+ // Copy behaviour of Qt and EFL - just return in case of (0,0) mouse scroll
+ if (!horizontal && !vertical)
+ return JSValueMakeUndefined(context);
+
GdkEvent* event = gdk_event_new(GDK_SCROLL);
event->scroll.x = lastMousePositionX;
event->scroll.y = lastMousePositionY;
@@ -489,8 +493,10 @@ static JSValueRef continuousMouseScrollByCallback(JSContextRef context, JSObject
int vertical = JSValueToNumber(context, arguments[1], exception);
g_return_val_if_fail((!exception || !*exception), JSValueMakeUndefined(context));
- g_return_val_if_fail(argumentCount < 3 || !JSValueToBoolean(context, arguments[2]), JSValueMakeUndefined(context));
-
+ // We do not yet support continuous scrolling by page.
+ if (argumentCount >= 3 && JSValueToBoolean(context, arguments[2]))
+ return JSValueMakeUndefined(context);
+
GdkEvent* event = gdk_event_new(GDK_SCROLL);
event->scroll.x = lastMousePositionX;
event->scroll.y = lastMousePositionY;
@@ -539,7 +545,7 @@ static JSValueRef beginDragWithFilesCallback(JSContextRef context, JSObjectRef f
GOwnPtr<gchar> scheme(g_file_get_uri_scheme(parentDirectory.get()));
if (g_str_equal(scheme.get(), "http") || g_str_equal(scheme.get(), "https")) {
GOwnPtr<gchar> currentDirectory(g_get_current_dir());
- parentDirectory = g_file_new_for_path(currentDirectory.get());
+ parentDirectory = adoptGRef(g_file_new_for_path(currentDirectory.get()));
}
JSStringRef lengthProperty = JSStringCreateWithUTF8CString("length");
diff --git a/Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am b/Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
deleted file mode 100644
index e7c3aefc0..000000000
--- a/Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am
+++ /dev/null
@@ -1,28 +0,0 @@
-noinst_PROGRAMS += \
- Programs/ImageDiff
-
-Programs_ImageDiff_CPPFLAGS = $(global_cppflags)
-
-Programs_ImageDiff_SOURCES = \
- Tools/DumpRenderTree/gtk/ImageDiff.cpp
-
-Programs_ImageDiff_CXXFLAGS = \
- $(global_cxxflags) \
- $(global_cppflags) \
- $(Programs_ImageDiff_CFLAGS)
-
-Programs_ImageDiff_CFLAGS = \
- -fno-strict-aliasing \
- $(global_cflags) \
- $(GLOBALDEPS_CFLAGS) \
- $(GTK_CFLAGS)
-
-Programs_ImageDiff_LDADD = \
- $(GTK_LIBS)
-
-Programs_ImageDiff_LDFLAGS = \
- -no-fast-install \
- -no-install
-
-CLEANFILES += \
- Programs/ImageDiff
diff --git a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
index 32d3dd5cb..7669a0133 100644
--- a/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
+++ b/Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
@@ -48,6 +48,7 @@
#include <libsoup/soup.h>
#include <webkit/webkit.h>
#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/text/WTFString.h>
extern "C" {
void webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);
@@ -107,11 +108,6 @@ void TestRunner::keepWebHistory()
// FIXME: implement
}
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
-{
- return DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(context, value);
-}
-
size_t TestRunner::webHistoryItemCount()
{
WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
@@ -126,11 +122,6 @@ size_t TestRunner::webHistoryItemCount()
webkit_web_back_forward_list_get_forward_length(list);
}
-unsigned TestRunner::workerThreadCount() const
-{
- return DumpRenderTreeSupportGtk::workerThreadCount();
-}
-
JSRetainPtr<JSStringRef> TestRunner::platformName() const
{
JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("gtk"));
@@ -157,26 +148,43 @@ JSStringRef TestRunner::pathToLocalResource(JSContextRef context, JSStringRef ur
return JSStringCreateWithUTF8CString(testURI.get());
}
+static CString soupURIToStringPreservingPassword(SoupURI* soupURI)
+{
+ if (!soupURI->password) {
+ GOwnPtr<char> uriString(soup_uri_to_string(soupURI, FALSE));
+ return uriString.get();
+ }
+
+ // soup_uri_to_string does not insert the password into the string, so we need to create the
+ // URI string and then reinsert any credentials that were present in the SoupURI. All tests that
+ // use URL-embedded credentials use HTTP, so it's safe here.
+ GOwnPtr<char> password(soupURI->password);
+ GOwnPtr<char> user(soupURI->user);
+ soupURI->password = 0;
+ soupURI->user = 0;
+
+ GOwnPtr<char> uriString(soup_uri_to_string(soupURI, FALSE));
+ String absoluteURIWithoutCredentialString = String::fromUTF8(uriString.get());
+ String protocolAndCredential = String::format("http://%s:%s@", user ? user.get() : "", password.get());
+ return absoluteURIWithoutCredentialString.replace("http://", protocolAndCredential).utf8();
+}
+
void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
{
- gchar* relativeURL = JSStringCopyUTF8CString(url);
+ GOwnPtr<gchar> relativeURL(JSStringCopyUTF8CString(url));
SoupURI* baseURI = soup_uri_new(webkit_web_frame_get_uri(mainFrame));
-
- SoupURI* absoluteURI = soup_uri_new_with_base(baseURI, relativeURL);
+ SoupURI* absoluteURI = soup_uri_new_with_base(baseURI, relativeURL.get());
soup_uri_free(baseURI);
- g_free(relativeURL);
- gchar* absoluteCString;
- if (absoluteURI) {
- absoluteCString = soup_uri_to_string(absoluteURI, FALSE);
- soup_uri_free(absoluteURI);
- } else
- absoluteCString = JSStringCopyUTF8CString(url);
-
- JSRetainPtr<JSStringRef> absoluteURL(Adopt, JSStringCreateWithUTF8CString(absoluteCString));
- g_free(absoluteCString);
+ if (!absoluteURI) {
+ WorkQueue::shared()->queue(new LoadItem(url, target));
+ return;
+ }
+ CString absoluteURIString = soupURIToStringPreservingPassword(absoluteURI);
+ JSRetainPtr<JSStringRef> absoluteURL(Adopt, JSStringCreateWithUTF8CString(absoluteURIString.data()));
WorkQueue::shared()->queue(new LoadItem(absoluteURL.get(), target));
+ soup_uri_free(absoluteURI);
}
void TestRunner::setAcceptsEditing(bool acceptsEditing)
@@ -315,11 +323,6 @@ void TestRunner::setWindowIsKey(bool windowIsKey)
// FIXME: implement
}
-void TestRunner::setSmartInsertDeleteEnabled(bool flag)
-{
- DumpRenderTreeSupportGtk::setSmartInsertDeleteEnabled(webkit_web_frame_get_web_view(mainFrame), flag);
-}
-
static gboolean waitToDumpWatchdogFired(void*)
{
setWaitToDumpWatchdog(0);
@@ -369,15 +372,6 @@ void TestRunner::setXSSAuditorEnabled(bool flag)
g_object_set(G_OBJECT(settings), "enable-xss-auditor", flag, NULL);
}
-void TestRunner::setFrameFlatteningEnabled(bool flag)
-{
- WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
- ASSERT(view);
-
- WebKitWebSettings* settings = webkit_web_view_get_settings(view);
- g_object_set(G_OBJECT(settings), "enable-frame-flattening", flag, NULL);
-}
-
void TestRunner::setSpatialNavigationEnabled(bool flag)
{
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
@@ -410,20 +404,6 @@ void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
// FIXME: implement
}
-void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool isAutofilled)
-{
- DumpRenderTreeSupportGtk::setAutofilled(context, nodeObject, isAutofilled);
-}
-
-void TestRunner::disableImageLoading()
-{
- WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
- ASSERT(view);
-
- WebKitWebSettings* settings = webkit_web_view_get_settings(view);
- g_object_set(G_OBJECT(settings), "auto-load-images", FALSE, NULL);
-}
-
void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
{
// FIXME: Implement for DeviceOrientation layout tests.
@@ -500,11 +480,6 @@ void TestRunner::setIconDatabaseEnabled(bool enabled)
webkit_icon_database_set_path(database, 0);
}
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
-{
- DumpRenderTreeSupportGtk::setSelectTrailingWhitespaceEnabled(flag);
-}
-
void TestRunner::setPopupBlockingEnabled(bool flag)
{
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
@@ -524,11 +499,6 @@ void TestRunner::setPluginsEnabled(bool flag)
g_object_set(G_OBJECT(settings), "enable-plugins", flag, NULL);
}
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
- return DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(mainFrame, id);
-}
-
void TestRunner::execCommand(JSStringRef name, JSStringRef value)
{
WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
@@ -711,31 +681,6 @@ void TestRunner::setAppCacheMaximumSize(unsigned long long size)
webkit_application_cache_set_maximum_size(size);
}
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
- gchar* name = JSStringCopyUTF8CString(animationName);
- gchar* element = JSStringCopyUTF8CString(elementId);
- bool returnValue = DumpRenderTreeSupportGtk::pauseAnimation(mainFrame, name, time, element);
- g_free(name);
- g_free(element);
- return returnValue;
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- gchar* name = JSStringCopyUTF8CString(propertyName);
- gchar* element = JSStringCopyUTF8CString(elementId);
- bool returnValue = DumpRenderTreeSupportGtk::pauseTransition(mainFrame, name, time, element);
- g_free(name);
- g_free(element);
- return returnValue;
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- return DumpRenderTreeSupportGtk::numberOfActiveAnimations(mainFrame);
-}
-
static gboolean booleanFromValue(gchar* value)
{
return !g_ascii_strcasecmp(value, "true") || !g_ascii_strcasecmp(value, "1");
@@ -814,7 +759,8 @@ void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
{
- printf("TestRunner::addUserScript not implemented.\n");
+ GOwnPtr<gchar> sourceCode(JSStringCopyUTF8CString(source));
+ DumpRenderTreeSupportGtk::addUserScript(mainFrame, sourceCode.get(), runAtStart, allFrames);
}
void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
@@ -833,11 +779,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
g_object_set(webSettings, "enable-developer-extras", enabled, NULL);
}
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
- // FIXME: Implement this.
-}
-
void TestRunner::showWebInspector()
{
WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
@@ -898,16 +839,6 @@ void TestRunner::setWebViewEditable(bool)
{
}
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
-{
- CString markerTextGChar = DumpRenderTreeSupportGtk::markerTextForListItem(mainFrame, context, nodeObject);
- if (markerTextGChar.isNull())
- return 0;
-
- JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithUTF8CString(markerTextGChar.data()));
- return markerText;
-}
-
void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
{
}
@@ -921,15 +852,21 @@ void TestRunner::setSerializeHTTPLoads(bool serialize)
DumpRenderTreeSupportGtk::setSerializeHTTPLoads(serialize);
}
-void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
-{
- WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
- DumpRenderTreeSupportGtk::setMinimumTimerInterval(webView, minimumTimerInterval);
-}
-
void TestRunner::setTextDirection(JSStringRef direction)
{
- // FIXME: Implement.
+ GOwnPtr<gchar> writingDirection(JSStringCopyUTF8CString(direction));
+
+ WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+ ASSERT(view);
+
+ if (g_str_equal(writingDirection.get(), "auto"))
+ gtk_widget_set_direction(GTK_WIDGET(view), GTK_TEXT_DIR_NONE);
+ else if (g_str_equal(writingDirection.get(), "ltr"))
+ gtk_widget_set_direction(GTK_WIDGET(view), GTK_TEXT_DIR_LTR);
+ else if (g_str_equal(writingDirection.get(), "rtl"))
+ gtk_widget_set_direction(GTK_WIDGET(view), GTK_TEXT_DIR_RTL);
+ else
+ fprintf(stderr, "TestRunner::setTextDirection called with unknown direction: '%s'.\n", writingDirection.get());
}
void TestRunner::addChromeInputField()
@@ -970,30 +907,36 @@ void TestRunner::simulateLegacyWebNotificationClick(JSStringRef title)
void TestRunner::resetPageVisibility()
{
- // FIXME: Implement this.
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ DumpRenderTreeSupportGtk::setPageVisibility(webView, WebCore::PageVisibilityStateVisible, true);
}
-void TestRunner::setPageVisibility(const char*)
+void TestRunner::setPageVisibility(const char* visibility)
{
- // FIXME: Implement this.
-}
+ WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
+ String visibilityString(visibility);
+ WebCore::PageVisibilityState visibilityState = WebCore::PageVisibilityStateVisible;
-void TestRunner::setAutomaticLinkDetectionEnabled(bool)
-{
- // FIXME: Implement this.
+ if (visibilityString == "visible")
+ visibilityState = WebCore::PageVisibilityStateVisible;
+ else if (visibilityString == "hidden")
+ visibilityState = WebCore::PageVisibilityStateHidden;
+ else
+ return;
+
+ DumpRenderTreeSupportGtk::setPageVisibility(webView, visibilityState, false);
}
-void TestRunner::sendWebIntentResponse(JSStringRef)
+void TestRunner::setAutomaticLinkDetectionEnabled(bool)
{
// FIXME: Implement this.
}
-void TestRunner::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
+void TestRunner::setStorageDatabaseIdleInterval(double)
{
// FIXME: Implement this.
}
-void TestRunner::setStorageDatabaseIdleInterval(double)
+void TestRunner::closeIdleLocalStorageDatabases()
{
- // FIXME: Implement this.
}
diff --git a/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm b/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm
new file mode 100644
index 000000000..ac57ecc8c
--- /dev/null
+++ b/Tools/DumpRenderTree/ios/AccessibilityControllerIOS.mm
@@ -0,0 +1,128 @@
+/*
+ * Copyright (C) 2009 Apple 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.
+ */
+
+#import "config.h"
+#import "DumpRenderTree.h"
+#import "AccessibilityController.h"
+
+#if PLATFORM(IOS)
+
+#import "AccessibilityCommonMac.h"
+#import "AccessibilityUIElement.h"
+#import <Foundation/Foundation.h>
+#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebHTMLViewPrivate.h>
+
+@interface WebHTMLView (Private)
+- (id)accessibilityFocusedUIElement;
+@end
+
+AccessibilityController::AccessibilityController()
+{
+}
+
+AccessibilityController::~AccessibilityController()
+{
+}
+
+AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
+{
+ return rootElement().elementAtPoint(x, y);
+}
+
+AccessibilityUIElement AccessibilityController::focusedElement()
+{
+ id webDocumentView = [[mainFrame frameView] documentView];
+ if ([webDocumentView isKindOfClass:[WebHTMLView class]])
+ return AccessibilityUIElement([(WebHTMLView *)webDocumentView accessibilityFocusedUIElement]);
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityController::rootElement()
+{
+ // FIXME: we could do some caching here.
+ id webDocumentView = [[mainFrame frameView] documentView];
+ if ([webDocumentView isKindOfClass:[WebHTMLView class]])
+ return AccessibilityUIElement([(WebHTMLView *)webDocumentView accessibilityRootElement]);
+ return 0;
+}
+
+static id findAccessibleObjectById(id obj, NSString *idAttribute)
+{
+ id objIdAttribute = [obj accessibilityIdentifier];
+ if ([objIdAttribute isKindOfClass:[NSString class]] && [objIdAttribute isEqualToString:idAttribute])
+ return obj;
+
+ NSUInteger childrenCount = [obj accessibilityElementCount];
+ for (NSUInteger i = 0; i < childrenCount; ++i) {
+ id result = findAccessibleObjectById([obj accessibilityElementAtIndex:i], idAttribute);
+ if (result)
+ return result;
+ }
+
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRef idAttributeRef)
+{
+ id webDocumentView = [[mainFrame frameView] documentView];
+ if (![webDocumentView isKindOfClass:[WebHTMLView class]])
+ return 0;
+
+ id root = [(WebHTMLView *)webDocumentView accessibilityRootElement];
+ NSString *idAttribute = [NSString stringWithJSStringRef:idAttributeRef];
+ id result = findAccessibleObjectById(root, idAttribute);
+ if (result)
+ return AccessibilityUIElement(result);
+
+ return 0;
+}
+
+void AccessibilityController::setLogFocusEvents(bool)
+{
+}
+
+void AccessibilityController::setLogScrollingStartEvents(bool)
+{
+}
+
+void AccessibilityController::setLogValueChangeEvents(bool)
+{
+}
+
+void AccessibilityController::setLogAccessibilityEvents(bool)
+{
+}
+
+bool AccessibilityController::addNotificationListener(JSObjectRef functionCallback)
+{
+ return false;
+}
+
+void AccessibilityController::removeNotificationListener()
+{
+}
+
+#endif // PLATFORM(IOS)
diff --git a/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm b/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
new file mode 100644
index 000000000..e66aa32a6
--- /dev/null
+++ b/Tools/DumpRenderTree/ios/AccessibilityUIElementIOS.mm
@@ -0,0 +1,811 @@
+/*
+ * Copyright (C) 2009 Apple 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.
+ */
+
+#import "config.h"
+#import "DumpRenderTree.h"
+#import "AccessibilityUIElement.h"
+
+#import "AccessibilityCommonMac.h"
+#import <Foundation/Foundation.h>
+#import <JavaScriptCore/JSRetainPtr.h>
+#import <JavaScriptCore/JSStringRef.h>
+#import <JavaScriptCore/JSStringRefCF.h>
+#import <WebCore/TextGranularity.h>
+#import <WebKit/WebFrame.h>
+#import <WebKit/WebHTMLView.h>
+#import <WebKit/WebTypesInternal.h>
+#import <wtf/RetainPtr.h>
+#import <wtf/Vector.h>
+
+#if PLATFORM(IOS)
+
+#import <UIKit/UIKit.h>
+
+typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
+
+AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
+ : m_element(element)
+{
+ [m_element retain];
+}
+
+AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
+ : m_element(other.m_element)
+{
+ [m_element retain];
+}
+
+AccessibilityUIElement::~AccessibilityUIElement()
+{
+ [m_element release];
+}
+
+@interface NSObject (UIAccessibilityHidden)
+- (id)accessibilityHitTest:(CGPoint)point;
+- (id)accessibilityLinkedElement;
+- (NSRange)accessibilityColumnRange;
+- (NSRange)accessibilityRowRange;
+- (id)accessibilityElementForRow:(NSInteger)row andColumn:(NSInteger)column;
+- (NSURL *)accessibilityURL;
+- (NSArray *)accessibilityHeaderElements;
+- (NSString *)accessibilityPlaceholderValue;
+- (NSString *)stringForRange:(NSRange)range;
+- (NSArray *)elementsForRange:(NSRange)range;
+- (NSString *)selectionRangeString;
+- (CGPoint)accessibilityClickPoint;
+- (void)accessibilityModifySelection:(WebCore::TextGranularity)granularity increase:(BOOL)increase;
+- (void)accessibilitySetPostedNotificationCallback:(AXPostedNotificationCallback)function withContext:(void*)context;
+- (CGFloat)_accessibilityMinValue;
+- (CGFloat)_accessibilityMaxValue;
+@end
+
+@interface NSObject (WebAccessibilityObjectWrapperPrivate)
+- (CGPathRef)_accessibilityPath;
+@end
+
+static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* value)
+{
+ Vector<UniChar> buffer([attribute length]);
+ [attribute getCharacters:buffer.data()];
+ buffer.append(':');
+ buffer.append(' ');
+
+ Vector<UniChar> valueBuffer([value length]);
+ [value getCharacters:valueBuffer.data()];
+ buffer.appendVector(valueBuffer);
+
+ return JSStringCreateWithCharacters(buffer.data(), buffer.size());
+}
+
+#pragma mark iPhone Attributes
+
+JSStringRef AccessibilityUIElement::iphoneLabel()
+{
+ return concatenateAttributeAndValue(@"AXLabel", [m_element accessibilityLabel]);
+}
+
+JSStringRef AccessibilityUIElement::iphoneHint()
+{
+ return concatenateAttributeAndValue(@"AXHint", [m_element accessibilityHint]);
+}
+
+JSStringRef AccessibilityUIElement::iphoneValue()
+{
+ return concatenateAttributeAndValue(@"AXValue", [m_element accessibilityValue]);
+}
+
+JSStringRef AccessibilityUIElement::iphoneIdentifier()
+{
+ return concatenateAttributeAndValue(@"AXIdentifier", [m_element accessibilityIdentifier]);
+}
+
+JSStringRef AccessibilityUIElement::iphoneTraits()
+{
+ return concatenateAttributeAndValue(@"AXTraits", [NSString stringWithFormat:@"%qu", [m_element accessibilityTraits]]);
+}
+
+bool AccessibilityUIElement::iphoneIsElement()
+{
+ return [m_element isAccessibilityElement];
+}
+
+int AccessibilityUIElement::iphoneElementTextPosition()
+{
+ NSRange range = [[m_element valueForKey:@"elementTextRange"] rangeValue];
+ return range.location;
+}
+
+int AccessibilityUIElement::iphoneElementTextLength()
+{
+ NSRange range = [[m_element valueForKey:@"elementTextRange"] rangeValue];
+ return range.length;
+}
+
+JSStringRef AccessibilityUIElement::url()
+{
+ NSURL *url = [m_element accessibilityURL];
+ return [[url absoluteString] createJSStringRef];
+}
+
+double AccessibilityUIElement::x()
+{
+ CGRect frame = [m_element accessibilityFrame];
+ return frame.origin.x;
+}
+
+double AccessibilityUIElement::y()
+{
+ CGRect frame = [m_element accessibilityFrame];
+ return frame.origin.y;
+}
+
+double AccessibilityUIElement::width()
+{
+ CGRect frame = [m_element accessibilityFrame];
+ return frame.size.width;
+}
+
+double AccessibilityUIElement::height()
+{
+ CGRect frame = [m_element accessibilityFrame];
+ return frame.size.height;
+}
+
+double AccessibilityUIElement::clickPointX()
+{
+ CGPoint centerPoint = [m_element accessibilityClickPoint];
+ return centerPoint.x;
+}
+
+double AccessibilityUIElement::clickPointY()
+{
+ CGPoint centerPoint = [m_element accessibilityClickPoint];
+ return centerPoint.y;
+}
+
+void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& elementVector)
+{
+ NSInteger childCount = [m_element accessibilityElementCount];
+ for (NSInteger k = 0; k < childCount; ++k)
+ elementVector.append(AccessibilityUIElement([m_element accessibilityElementAtIndex:k]));
+}
+
+void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned location, unsigned length)
+{
+ NSUInteger childCount = [m_element accessibilityElementCount];
+ for (NSUInteger k = location; k < childCount && k < (location+length); ++k)
+ elementVector.append(AccessibilityUIElement([m_element accessibilityElementAtIndex:k]));
+}
+
+int AccessibilityUIElement::childrenCount()
+{
+ Vector<AccessibilityUIElement> children;
+ getChildren(children);
+
+ return children.size();
+}
+
+AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
+{
+ id element = [m_element accessibilityHitTest:NSMakePoint(x, y)];
+ if (!element)
+ return nil;
+
+ return AccessibilityUIElement(element);
+}
+
+unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
+{
+ Vector<AccessibilityUIElement> children;
+ getChildrenWithRange(children, index, 1);
+
+ if (children.size() == 1)
+ return children[0];
+ return nil;
+}
+
+AccessibilityUIElement AccessibilityUIElement::headerElementAtIndex(unsigned index)
+{
+ NSArray *headers = [m_element accessibilityHeaderElements];
+ if (index < [headers count])
+ return [headers objectAtIndex:index];
+
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::linkedElement()
+{
+ id linkedElement = [m_element accessibilityLinkedElement];
+ if (linkedElement)
+ return AccessibilityUIElement(linkedElement);
+
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::linkedUIElementAtIndex(unsigned index)
+{
+ // FIXME: implement
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::rowAtIndex(unsigned index)
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::titleUIElement()
+{
+ return 0;
+}
+
+AccessibilityUIElement AccessibilityUIElement::parentElement()
+{
+ id accessibilityObject = [m_element accessibilityContainer];
+ if (accessibilityObject)
+ return AccessibilityUIElement(accessibilityObject);
+
+ return nil;
+}
+
+AccessibilityUIElement AccessibilityUIElement::disclosedByRow()
+{
+ return 0;
+}
+
+void AccessibilityUIElement::increaseTextSelection()
+{
+ [m_element accessibilityModifySelection:WebCore::CharacterGranularity increase:YES];
+}
+
+void AccessibilityUIElement::decreaseTextSelection()
+{
+ [m_element accessibilityModifySelection:WebCore::CharacterGranularity increase:NO];
+}
+
+JSStringRef AccessibilityUIElement::stringForSelection()
+{
+ NSString *stringForRange = [m_element selectionRangeString];
+ if (!stringForRange)
+ return 0;
+
+ return [stringForRange createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::stringForRange(unsigned location, unsigned length)
+{
+ NSString *stringForRange = [m_element stringForRange:NSMakeRange(location, length)];
+ if (!stringForRange)
+ return 0;
+
+ return [stringForRange createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::attributedStringForRange(unsigned, unsigned)
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned, unsigned)
+{
+ return false;
+}
+
+
+void AccessibilityUIElement::elementsForRange(unsigned location, unsigned length, Vector<AccessibilityUIElement>& elements)
+{
+ NSArray *elementsForRange = [m_element elementsForRange:NSMakeRange(location, length)];
+ for (id object in elementsForRange) {
+ AccessibilityUIElement element = AccessibilityUIElement(object);
+ elements.append(element);
+ }
+}
+
+static void _CGPathEnumerationIteration(void *info, const CGPathElement *element)
+{
+ NSMutableString *result = (NSMutableString *)info;
+ switch (element->type) {
+ case kCGPathElementMoveToPoint:
+ [result appendString:@"\tMove to point\n"];
+ break;
+
+ case kCGPathElementAddLineToPoint:
+ [result appendString:@"\tLine to\n"];
+ break;
+
+ case kCGPathElementAddQuadCurveToPoint:
+ [result appendString:@"\tQuad curve to\n"];
+ break;
+
+ case kCGPathElementAddCurveToPoint:
+ [result appendString:@"\tCurve to\n"];
+ break;
+
+ case kCGPathElementCloseSubpath:
+ [result appendString:@"\tClose\n"];
+ break;
+ }
+}
+
+JSStringRef AccessibilityUIElement::pathDescription() const
+{
+ NSMutableString *result = [NSMutableString stringWithString:@"\nStart Path\n"];
+ CGPathRef pathRef = [m_element _accessibilityPath];
+
+ CGPathApply(pathRef, result, _CGPathEnumerationIteration);
+
+ return [result createJSStringRef];
+}
+
+#pragma mark Unused
+
+void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>& elementVector)
+{
+}
+
+void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>& elementVector)
+{
+}
+
+JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfChildren()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::allAttributes()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
+{
+ if (JSStringIsEqualToUTF8CString(attribute, "AXPlaceholderValue"))
+ return [[m_element accessibilityPlaceholderValue] createJSStringRef];
+
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+bool AccessibilityUIElement::isPressActionSupported()
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isIncrementActionSupported()
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isDecrementActionSupported()
+{
+ return false;
+}
+
+bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
+{
+ return false;
+}
+
+JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::role()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::subrole()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::roleDescription()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::title()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::description()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::orientation() const
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::stringValue()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::language()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::helpText() const
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+double AccessibilityUIElement::intValue() const
+{
+ return 0.0f;
+}
+
+double AccessibilityUIElement::minValue()
+{
+ return [m_element _accessibilityMinValue];
+}
+
+double AccessibilityUIElement::maxValue()
+{
+ return [m_element _accessibilityMaxValue];
+}
+
+JSStringRef AccessibilityUIElement::valueDescription()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+int AccessibilityUIElement::insertionPointLineNumber()
+{
+ return -1;
+}
+
+bool AccessibilityUIElement::isEnabled()
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isRequired() const
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isFocused() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isSelected() const
+{
+ UIAccessibilityTraits traits = [m_element accessibilityTraits];
+ return (traits & UIAccessibilityTraitSelected);
+}
+
+bool AccessibilityUIElement::isExpanded() const
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isChecked() const
+{
+ return false;
+}
+
+int AccessibilityUIElement::hierarchicalLevel() const
+{
+ return 0;
+}
+
+bool AccessibilityUIElement::ariaIsGrabbed() const
+{
+ return false;
+}
+
+JSStringRef AccessibilityUIElement::ariaDropEffects() const
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+int AccessibilityUIElement::lineForIndex(int index)
+{
+ return -1;
+}
+
+JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfColumns()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfRows()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::attributesOfHeader()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+int AccessibilityUIElement::rowCount()
+{
+ return -1;
+}
+
+int AccessibilityUIElement::columnCount()
+{
+ return -1;
+}
+
+int AccessibilityUIElement::indexInTable()
+{
+ return -1;
+}
+
+JSStringRef AccessibilityUIElement::rowIndexRange()
+{
+ NSRange range = [m_element accessibilityRowRange];
+ NSMutableString* rangeDescription = [NSMutableString stringWithFormat:@"{%lu, %lu}", (unsigned long)range.location, (unsigned long)range.length];
+ return [rangeDescription createJSStringRef];
+}
+
+JSStringRef AccessibilityUIElement::columnIndexRange()
+{
+ NSRange range = [m_element accessibilityColumnRange];
+ NSMutableString* rangeDescription = [NSMutableString stringWithFormat:@"{%lu, %lu}", (unsigned long)range.location, (unsigned long)range.length];
+ return [rangeDescription createJSStringRef];
+}
+
+AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned col, unsigned row)
+{
+ return AccessibilityUIElement([m_element accessibilityElementForRow:row andColumn:col]);
+}
+
+JSStringRef AccessibilityUIElement::selectedTextRange()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+void AccessibilityUIElement::assistiveTechnologySimulatedFocus()
+{
+ [m_element accessibilityElementDidBecomeFocused];
+}
+
+void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
+{
+}
+
+void AccessibilityUIElement::increment()
+{
+ [m_element accessibilityIncrement];
+}
+
+void AccessibilityUIElement::decrement()
+{
+ [m_element accessibilityDecrement];
+}
+
+void AccessibilityUIElement::showMenu()
+{
+}
+
+void AccessibilityUIElement::press()
+{
+}
+
+JSStringRef AccessibilityUIElement::accessibilityValue() const
+{
+ // FIXME: implement
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::documentEncoding()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+JSStringRef AccessibilityUIElement::documentURI()
+{
+ return JSStringCreateWithCharacters(0, 0);
+}
+
+static void _accessibilityNotificationCallback(id element, NSString* notification, void* context)
+{
+ if (!context)
+ return;
+
+ JSObjectRef functionCallback = static_cast<JSObjectRef>(context);
+
+ JSRetainPtr<JSStringRef> jsNotification(Adopt, [notification createJSStringRef]);
+ JSValueRef argument = JSValueMakeString([mainFrame globalContext], jsNotification.get());
+ JSObjectCallAsFunction([mainFrame globalContext], functionCallback, NULL, 1, &argument, NULL);
+}
+
+bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
+{
+ if (!functionCallback)
+ return false;
+
+ m_notificationFunctionCallback = functionCallback;
+ [platformUIElement() accessibilitySetPostedNotificationCallback:_accessibilityNotificationCallback withContext:reinterpret_cast<void*>(m_notificationFunctionCallback)];
+ return true;
+}
+
+void AccessibilityUIElement::removeNotificationListener()
+{
+ m_notificationFunctionCallback = 0;
+ [platformUIElement() accessibilitySetPostedNotificationCallback:nil withContext:nil];
+}
+
+bool AccessibilityUIElement::isFocusable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isSelectable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isMultiSelectable() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isSelectedOptionActive() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isVisible() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isOffScreen() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isCollapsed() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::isIgnored() const
+{
+ // FIXME: implement
+ return false;
+}
+
+bool AccessibilityUIElement::hasPopup() const
+{
+ // FIXME: implement
+ return false;
+}
+
+void AccessibilityUIElement::takeFocus()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::takeSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::addSelection()
+{
+ // FIXME: implement
+}
+
+void AccessibilityUIElement::removeSelection()
+{
+ // FIXME: implement
+}
+
+AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly)
+{
+ // FIXME: implement
+ return 0;
+}
+
+double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
+{
+ // FIXME: implement
+ return 0;
+}
+#endif // PLATFORM(IOS)
diff --git a/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm b/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
index cd1c92d12..f775006fc 100644
--- a/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
+++ b/Tools/DumpRenderTree/mac/AccessibilityUIElementMac.mm
@@ -52,6 +52,10 @@
#define NSAccessibilityDropEffectsAttribute @"AXDropEffects"
#endif
+#ifndef NSAccessibilityPathAttribute
+#define NSAccessibilityPathAttribute @"AXPath"
+#endif
+
typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
@interface NSObject (WebKitAccessibilityAdditions)
@@ -158,7 +162,7 @@ static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* v
Vector<UniChar> valueBuffer([value length]);
[value getCharacters:valueBuffer.data()];
- buffer.append(valueBuffer);
+ buffer.appendVector(valueBuffer);
return JSStringCreateWithCharacters(buffer.data(), buffer.size());
}
@@ -671,11 +675,31 @@ int AccessibilityUIElement::insertionPointLineNumber()
return -1;
}
-bool AccessibilityUIElement::isActionSupported(JSStringRef action)
+bool AccessibilityUIElement::isPressActionSupported()
{
BEGIN_AX_OBJC_EXCEPTIONS
NSArray* actions = [m_element accessibilityActionNames];
- return [actions containsObject:[NSString stringWithJSStringRef:action]];
+ return [actions containsObject:NSAccessibilityPressAction];
+ END_AX_OBJC_EXCEPTIONS
+
+ return false;
+}
+
+bool AccessibilityUIElement::isIncrementActionSupported()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray* actions = [m_element accessibilityActionNames];
+ return [actions containsObject:NSAccessibilityIncrementAction];
+ END_AX_OBJC_EXCEPTIONS
+
+ return false;
+}
+
+bool AccessibilityUIElement::isDecrementActionSupported()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray* actions = [m_element accessibilityActionNames];
+ return [actions containsObject:NSAccessibilityDecrementAction];
END_AX_OBJC_EXCEPTIONS
return false;
@@ -881,24 +905,67 @@ bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location
return false;
NSDictionary* attrs = [string attributesAtIndex:0 effectiveRange:nil];
- if([[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue])
- return true;
+ BOOL misspelled = [[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue];
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ if (misspelled)
+ misspelled = [[attrs objectForKey:NSAccessibilityMarkedMisspelledTextAttribute] boolValue];
+#endif
+ return misspelled;
END_AX_OBJC_EXCEPTIONS
return false;
}
-AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText)
+AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly)
{
BEGIN_AX_OBJC_EXCEPTIONS
NSMutableDictionary* parameter = [NSMutableDictionary dictionary];
[parameter setObject:(isDirectionNext) ? @"AXDirectionNext" : @"AXDirectionPrevious" forKey:@"AXDirection"];
+ if (visibleOnly)
+ [parameter setObject:[NSNumber numberWithBool:YES] forKey:@"AXVisibleOnly"];
[parameter setObject:[NSNumber numberWithInt:1] forKey:@"AXResultsLimit"];
if (startElement && startElement->platformUIElement())
[parameter setObject:(id)startElement->platformUIElement() forKey:@"AXStartElement"];
- if (searchKey)
- [parameter setObject:[NSString stringWithJSStringRef:searchKey] forKey:@"AXSearchKey"];
- if (searchText)
+ if (searchKey) {
+ if (JSValueIsString(context, searchKey)) {
+ NSString *searchKeyParameter = nil;
+ JSStringRef singleSearchKey = JSValueToStringCopy(context, searchKey, 0);
+ if (singleSearchKey) {
+ searchKeyParameter = [NSString stringWithJSStringRef:singleSearchKey];
+ JSStringRelease(singleSearchKey);
+ if (searchKeyParameter)
+ [parameter setObject:searchKeyParameter forKey:@"AXSearchKey"];
+ }
+ }
+ else if (JSValueIsObject(context, searchKey)) {
+ NSMutableArray *searchKeyParameter = nil;
+ JSObjectRef array = const_cast<JSObjectRef>(searchKey);
+ unsigned arrayLength = 0;
+ JSRetainPtr<JSStringRef> arrayLengthString(Adopt, JSStringCreateWithUTF8CString("length"));
+ JSValueRef arrayLengthValue = JSObjectGetProperty(context, array, arrayLengthString.get(), 0);
+ if (arrayLengthValue && JSValueIsNumber(context, arrayLengthValue))
+ arrayLength = static_cast<unsigned>(JSValueToNumber(context, arrayLengthValue, 0));
+
+ for (unsigned i = 0; i < arrayLength; ++i) {
+ JSValueRef exception = 0;
+ JSValueRef value = JSObjectGetPropertyAtIndex(context, array, i, &exception);
+ if (exception)
+ break;
+ JSStringRef singleSearchKey = JSValueToStringCopy(context, value, &exception);
+ if (exception)
+ break;
+ if (singleSearchKey) {
+ if (!searchKeyParameter)
+ searchKeyParameter = [NSMutableArray array];
+ [searchKeyParameter addObject:[NSString stringWithJSStringRef:singleSearchKey]];
+ JSStringRelease(singleSearchKey);
+ }
+ }
+ if (searchKeyParameter)
+ [parameter setObject:searchKeyParameter forKey:@"AXSearchKey"];
+ }
+ }
+ if (searchText && JSStringGetLength(searchText))
[parameter setObject:[NSString stringWithJSStringRef:searchText] forKey:@"AXSearchText"];
id uiElement = [[m_element accessibilityAttributeValue:@"AXUIElementsForSearchPredicate" forParameter:parameter] lastObject];
@@ -1069,6 +1136,39 @@ AccessibilityUIElement AccessibilityUIElement::verticalScrollbar() const
return 0;
}
+JSStringRef AccessibilityUIElement::pathDescription() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSMutableString *result = [NSMutableString stringWithString:@"\nStart Path\n"];
+ NSBezierPath *bezierPath = [m_element accessibilityAttributeValue:NSAccessibilityPathAttribute];
+
+ NSUInteger elementCount = [bezierPath elementCount];
+ for (NSUInteger i = 0; i < elementCount; i++) {
+ switch ([bezierPath elementAtIndex:i]) {
+ case NSMoveToBezierPathElement:
+ [result appendString:@"\tMove to point\n"];
+ break;
+
+ case NSLineToBezierPathElement:
+ [result appendString:@"\tLine to\n"];
+ break;
+
+ case NSCurveToBezierPathElement:
+ [result appendString:@"\tCurve to\n"];
+ break;
+
+ case NSClosePathBezierPathElement:
+ [result appendString:@"\tClose\n"];
+ break;
+ }
+ }
+
+ return [result createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
JSStringRef AccessibilityUIElement::selectedTextRange()
{
NSRange range = NSMakeRange(NSNotFound, 0);
@@ -1417,9 +1517,53 @@ AccessibilityUIElement AccessibilityUIElement::accessibilityElementForTextMarker
#endif // SUPPORTS_AX_TEXTMARKERS
+JSStringRef AccessibilityUIElement::supportedActions()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *names = [m_element accessibilityActionNames];
+ return [[names componentsJoinedByString:@","] createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+static NSString *convertMathMultiscriptPairsToString(NSArray *pairs)
+{
+ __block NSMutableString *result = [NSMutableString string];
+ [pairs enumerateObjectsUsingBlock:^(id pair, NSUInteger index, BOOL *stop) {
+ for (NSString *key in pair)
+ [result appendFormat:@"\t%lu. %@ = %@\n", (unsigned long)index, key, [[pair objectForKey:key] accessibilityAttributeValue:NSAccessibilitySubroleAttribute]];
+ }];
+
+ return result;
+}
+
+JSStringRef AccessibilityUIElement::mathPostscriptsDescription() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *pairs = [m_element accessibilityAttributeValue:@"AXMathPostscripts"];
+ return [convertMathMultiscriptPairsToString(pairs) createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+JSStringRef AccessibilityUIElement::mathPrescriptsDescription() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *pairs = [m_element accessibilityAttributeValue:@"AXMathPrescripts"];
+ return [convertMathMultiscriptPairsToString(pairs) createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+
void AccessibilityUIElement::scrollToMakeVisible()
{
- // FIXME: implement
+ BEGIN_AX_OBJC_EXCEPTIONS
+ [m_element accessibilityPerformAction:@"AXScrollToVisible"];
+ END_AX_OBJC_EXCEPTIONS
}
void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
diff --git a/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig b/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
index 8235bdb8f..cf0d22d0c 100644
--- a/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
+++ b/Tools/DumpRenderTree/mac/Configurations/DumpRenderTree.xcconfig
@@ -21,7 +21,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-OTHER_LDFLAGS = -sectcreate __DATA Ahem qt/fonts/AHEM____.TTF -sectcreate __DATA WeightWatcher100 fonts/WebKitWeightWatcher100.ttf -sectcreate __DATA WeightWatcher200 fonts/WebKitWeightWatcher200.ttf -sectcreate __DATA WeightWatcher300 fonts/WebKitWeightWatcher300.ttf -sectcreate __DATA WeightWatcher400 fonts/WebKitWeightWatcher400.ttf -sectcreate __DATA WeightWatcher500 fonts/WebKitWeightWatcher500.ttf -sectcreate __DATA WeightWatcher600 fonts/WebKitWeightWatcher600.ttf -sectcreate __DATA WeightWatcher700 fonts/WebKitWeightWatcher700.ttf -sectcreate __DATA WeightWatcher800 fonts/WebKitWeightWatcher800.ttf -sectcreate __DATA WeightWatcher900 fonts/WebKitWeightWatcher900.ttf -sectcreate __DATA HiraMaruMono-W4 fonts/SampleFont.sfont -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)
+OTHER_LDFLAGS = -l$(WEBKIT_SYSTEM_INTERFACE_LIBRARY)
LD_RUNPATH_SEARCH_PATHS = "@loader_path/.";
PRODUCT_NAME = DumpRenderTree
GCC_ENABLE_OBJC_EXCEPTIONS = YES
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTree.mm b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
index cbcc09562..2f301c8a2 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTree.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -32,6 +32,7 @@
#import "AccessibilityController.h"
#import "CheckedMalloc.h"
+#import "DefaultPolicyDelegate.h"
#import "DumpRenderTreeDraggingInfo.h"
#import "DumpRenderTreePasteboard.h"
#import "DumpRenderTreeWindow.h"
@@ -110,6 +111,12 @@ using namespace std;
+(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
@end
+#if USE(APPKIT)
+@interface NSSound (Details)
++ (void)_setAlertType:(NSUInteger)alertType;
+@end
+#endif
+
static void runTest(const string& testPathOrURL);
// Deciding when it's OK to dump out the state is a bit tricky. All these must be true:
@@ -142,10 +149,11 @@ static EditingDelegate *editingDelegate;
static ResourceLoadDelegate *resourceLoadDelegate;
static HistoryDelegate *historyDelegate;
PolicyDelegate *policyDelegate;
+DefaultPolicyDelegate *defaultPolicyDelegate;
StorageTrackerDelegate *storageDelegate;
static int dumpPixelsForAllTests = NO;
-static bool dumpPixelsForCurrentTest;
+static bool dumpPixelsForCurrentTest = false;
static int threaded;
static int dumpTree = YES;
static int useTimeoutWatchdog = YES;
@@ -230,7 +238,7 @@ static bool shouldIgnoreWebCoreNodeLeaks(const string& URLString)
static NSSet *allowedFontFamilySet()
{
- static NSSet *fontFamiliySet = [[NSSet setWithObjects:
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
@"Ahem",
@"Al Bayan",
@"American Typewriter",
@@ -325,6 +333,8 @@ static NSSet *allowedFontFamilySet()
@"Sathu",
@"Silom",
@"Skia",
+ @"Songti SC",
+ @"Songti TC",
@"STFangsong",
@"STHeiti",
@"STIXGeneral",
@@ -347,7 +357,16 @@ static NSSet *allowedFontFamilySet()
@"Zapfino",
nil] retain];
- return fontFamiliySet;
+ return fontFamilySet;
+}
+
+static NSSet *systemHiddenFontFamilySet()
+{
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
+ @".LucidaGrandeUI",
+ nil] retain];
+
+ return fontFamilySet;
}
static IMP appKitAvailableFontFamiliesIMP;
@@ -383,7 +402,11 @@ static NSArray *drt_NSFontManager_availableFonts(id self, SEL _cmd)
[availableFontList addObject:[fontInfo objectAtIndex:0]];
}
}
-
+
+ for (NSString *hiddenFontFamily in systemHiddenFontFamilySet()) {
+ [availableFontList addObject:hiddenFontFamily];
+ }
+
availableFonts = availableFontList;
return availableFonts;
}
@@ -411,9 +434,6 @@ static void swizzleNSFontManagerMethods()
static void activateTestingFonts()
{
- // Work around <rdar://problem/6698023> by activating fonts from disk
- // FIXME: This code can be removed once <rdar://problem/6698023> is addressed.
-
static const char* fontFileNames[] = {
"AHEM____.TTF",
"WebKitWeightWatcher100.ttf",
@@ -516,7 +536,7 @@ static void registerMockScrollbars()
WebView *createWebViewAndOffscreenWindow()
{
- NSRect rect = NSMakeRect(0, 0, TestRunner::maxViewWidth, TestRunner::maxViewHeight);
+ NSRect rect = NSMakeRect(0, 0, TestRunner::viewWidth, TestRunner::viewHeight);
WebView *webView = [[WebView alloc] initWithFrame:rect frameName:nil groupName:@"org.webkit.DumpRenderTree"];
[webView setUIDelegate:uiDelegate];
@@ -533,8 +553,14 @@ WebView *createWebViewAndOffscreenWindow()
[WebView registerURLSchemeAsLocal:@"feedsearch"];
[webView setContinuousSpellCheckingEnabled:YES];
- [webView setDefersCallbacks:NO];
+ [webView setAutomaticQuoteSubstitutionEnabled:NO];
+ [webView setAutomaticLinkDetectionEnabled:NO];
+ [webView setAutomaticDashSubstitutionEnabled:NO];
+ [webView setAutomaticTextReplacementEnabled:NO];
+ [webView setAutomaticSpellingCorrectionEnabled:YES];
[webView setGrammarCheckingEnabled:YES];
+
+ [webView setDefersCallbacks:NO];
[webView setInteractiveFormValidationEnabled:YES];
[webView setValidationMessageTimerMagnification:-1];
@@ -544,9 +570,11 @@ WebView *createWebViewAndOffscreenWindow()
DumpRenderTreeWindow *window = [[DumpRenderTreeWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
[window setColorSpace:[[NSScreen mainScreen] colorSpace]];
+ [window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
[[window contentView] addSubview:webView];
[window orderBack:nil];
[window setAutodisplay:NO];
+ [window _setWindowResolution:1 displayIfChanged:YES];
[window startListeningForAcceleratedCompositingChanges];
@@ -587,6 +615,16 @@ static void resetDefaultsToConsistentValues()
[defaults setBool:YES forKey:WebKitFullScreenEnabledPreferenceKey];
[defaults setBool:YES forKey:@"UseWebKitWebInspector"];
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ [defaults setObject:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"notational", @"notationl",
+ @"message", @"mesage",
+ @"would", @"wouldn",
+ @"welcome", @"wellcome",
+ @"hello\nworld", @"hellolfworld",
+ nil] forKey:@"NSTestCorrectionDictionary"];
+#endif
+
// Scrollbars are drawn either using AppKit (which uses NSUserDefaults) or using HIToolbox (which uses CFPreferences / kCFPreferencesAnyApplication / kCFPreferencesCurrentUser / kCFPreferencesAnyHost)
[defaults setObject:@"DoubleMax" forKey:@"AppleScrollBarVariant"];
RetainPtr<CFTypeRef> initialValue = CFPreferencesCopyValue(CFSTR("AppleScrollBarVariant"), kCFPreferencesAnyApplication, kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
@@ -598,7 +636,7 @@ static void resetDefaultsToConsistentValues()
#endif
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
[defaults setBool:NO forKey:@"NSScrollAnimationEnabled"];
#else
[defaults setBool:NO forKey:@"AppleScrollAnimationEnabled"];
@@ -675,6 +713,7 @@ static void resetDefaultsToConsistentValues()
[preferences setUsePreHTML5ParserQuirks:NO];
[preferences setAsynchronousSpellCheckingEnabled:NO];
[preferences setMockScrollbarsEnabled:YES];
+ [preferences setSeamlessIFramesEnabled:YES];
#if ENABLE(WEB_AUDIO)
[preferences setWebAudioEnabled:YES];
@@ -736,28 +775,6 @@ static void testThreadIdentifierMap()
createThread(runThread, 0, "DumpRenderTree: test");
}
-static void crashHandler(int sig)
-{
- char *signalName = strsignal(sig);
- write(STDERR_FILENO, signalName, strlen(signalName));
- write(STDERR_FILENO, "\n", 1);
- exit(128 + sig);
-}
-
-static void installSignalHandlers()
-{
- signal(SIGILL, crashHandler); /* 4: illegal instruction (not reset when caught) */
- signal(SIGTRAP, crashHandler); /* 5: trace trap (not reset when caught) */
- signal(SIGEMT, crashHandler); /* 7: EMT instruction */
- signal(SIGFPE, crashHandler); /* 8: floating point exception */
- signal(SIGBUS, crashHandler); /* 10: bus error */
- signal(SIGSEGV, crashHandler); /* 11: segmentation violation */
- signal(SIGSYS, crashHandler); /* 12: bad argument to system call */
- signal(SIGPIPE, crashHandler); /* 13: write on a pipe with no reader */
- signal(SIGXCPU, crashHandler); /* 24: exceeded CPU time limit */
- signal(SIGXFSZ, crashHandler); /* 25: exceeded file size limit */
-}
-
static void allocateGlobalControllers()
{
// FIXME: We should remove these and move to the ObjC standard [Foo sharedInstance] model
@@ -769,6 +786,7 @@ static void allocateGlobalControllers()
policyDelegate = [[PolicyDelegate alloc] init];
historyDelegate = [[HistoryDelegate alloc] init];
storageDelegate = [[StorageTrackerDelegate alloc] init];
+ defaultPolicyDelegate = [[DefaultPolicyDelegate alloc] init];
}
// ObjC++ doens't seem to let me pass NSObject*& sadly.
@@ -855,6 +873,12 @@ static void prepareConsistentTestingEnvironment()
allocateGlobalControllers();
makeLargeMallocFailSilently();
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ NSActivityOptions options = (NSActivityUserInitiatedAllowingIdleSystemSleep | NSActivityLatencyCritical) & ~(NSActivitySuddenTerminationDisabled | NSActivityAutomaticTerminationDisabled);
+ static id assertion = [[[NSProcessInfo processInfo] beginActivityWithOptions:options reason:@"DumpRenderTree should not be subject to process suppression"] retain];
+ ASSERT_UNUSED(assertion, assertion);
+#endif
}
void dumpRenderTree(int argc, const char *argv[])
@@ -862,12 +886,14 @@ void dumpRenderTree(int argc, const char *argv[])
initializeGlobalsFromCommandLineOptions(argc, argv);
prepareConsistentTestingEnvironment();
addTestPluginsToPluginSearchPath(argv[0]);
- if (dumpPixelsForCurrentTest)
- installSignalHandlers();
if (forceComplexText)
[WebView _setAlwaysUsesComplexTextCodePath:YES];
+#if USE(APPKIT)
+ [NSSound _setAlertType:0];
+#endif
+
WebView *webView = createWebViewAndOffscreenWindow();
mainFrame = [webView mainFrame];
@@ -887,7 +913,7 @@ void dumpRenderTree(int argc, const char *argv[])
printSeparators = YES;
runTestingServerLoop();
} else {
- printSeparators = (optind < argc - 1 || (dumpPixelsForCurrentTest && dumpTree));
+ printSeparators = optind < argc - 1;
for (int i = optind; i != argc; ++i)
runTest(argv[i]);
}
@@ -1095,9 +1121,9 @@ static void sizeWebViewForCurrentTest()
// W3C SVG tests expect to be 480x360
bool isSVGW3CTest = (gTestRunner->testPathOrURL().find("svg/W3C-SVG-1.1") != string::npos);
if (isSVGW3CTest)
- [[mainFrame webView] setFrameSize:NSMakeSize(480, 360)];
+ [[mainFrame webView] setFrameSize:NSMakeSize(TestRunner::w3cSVGViewWidth, TestRunner::w3cSVGViewHeight)];
else
- [[mainFrame webView] setFrameSize:NSMakeSize(TestRunner::maxViewWidth, TestRunner::maxViewHeight)];
+ [[mainFrame webView] setFrameSize:NSMakeSize(TestRunner::viewWidth, TestRunner::viewHeight)];
}
static const char *methodNameStringForFailedTest()
@@ -1261,7 +1287,7 @@ static void resetWebViewToConsistentStateBeforeTesting()
[webView _scaleWebView:1.0 atOrigin:NSZeroPoint];
[webView _setCustomBackingScaleFactor:0];
[webView setTabKeyCyclesThroughElements:YES];
- [webView setPolicyDelegate:nil];
+ [webView setPolicyDelegate:defaultPolicyDelegate];
[policyDelegate setPermissive:NO];
[policyDelegate setControllerToNotifyDone:0];
[frameLoadDelegate resetToConsistentState];
@@ -1270,7 +1296,6 @@ static void resetWebViewToConsistentStateBeforeTesting()
[[webView undoManager] removeAllActions];
[WebView _removeAllUserContentFromGroup:[webView groupName]];
[[webView window] setAutodisplay:NO];
- [webView _setMinimumTimerInterval:[WebView _defaultMinimumTimerInterval]];
[webView setTracksRepaints:NO];
resetDefaultsToConsistentValues();
@@ -1281,7 +1306,13 @@ static void resetWebViewToConsistentStateBeforeTesting()
gTestRunner->removeChromeInputField();
}
- [[mainFrame webView] setSmartInsertDeleteEnabled:YES];
+ [webView setContinuousSpellCheckingEnabled:YES];
+ [webView setAutomaticQuoteSubstitutionEnabled:NO];
+ [webView setAutomaticLinkDetectionEnabled:NO];
+ [webView setAutomaticDashSubstitutionEnabled:NO];
+ [webView setAutomaticTextReplacementEnabled:NO];
+ [webView setAutomaticSpellingCorrectionEnabled:YES];
+ [webView setGrammarCheckingEnabled:YES];
[WebView _setUsesTestModeFocusRingColor:YES];
[WebView _resetOriginAccessWhitelists];
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h b/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
index e6898a9b9..6c7331171 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeMac.h
@@ -32,6 +32,7 @@
#include <CoreFoundation/CoreFoundation.h>
#ifdef __OBJC__
+@class DefaultPolicyDelegate;
@class DumpRenderTreeDraggingInfo;
@class NavigationController;
@class PolicyDelegate;
@@ -40,6 +41,7 @@
@class WebScriptWorld;
@class WebView;
#else
+class DefaultPolicyDelegate;
class DumpRenderTreeDraggingInfo;
class NavigationController;
class PolicyDelegate;
@@ -57,9 +59,7 @@ extern DumpRenderTreeDraggingInfo *draggingInfo;
extern NavigationController* gNavigationController;
extern PolicyDelegate* policyDelegate;
extern StorageTrackerDelegate* storageDelegate;
-
-extern const unsigned maxViewHeight;
-extern const unsigned maxViewWidth;
+extern DefaultPolicyDelegate *defaultPolicyDelegate;
void setWaitToDumpWatchdog(CFRunLoopTimerRef);
bool shouldSetWaitToDumpWatchdog();
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h b/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h
index a229d20e6..3b1d77eb3 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h
+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.h
@@ -32,6 +32,12 @@
@class WebView;
+@interface NSWindow (Details)
+
+- (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
+
+@end
+
@interface DumpRenderTreeWindow : NSWindow
{
}
diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm b/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
index 17a114ba0..4a6fd6bbc 100644
--- a/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeWindow.mm
@@ -120,4 +120,9 @@ static CFArrayCallBacks NonRetainingArrayCallbacks = {
[self setAutodisplay:YES];
}
+- (CGFloat)backingScaleFactor
+{
+ return 1;
+}
+
@end
diff --git a/Tools/DumpRenderTree/mac/EventSendingController.mm b/Tools/DumpRenderTree/mac/EventSendingController.mm
index 6f328a566..05bfd3679 100644
--- a/Tools/DumpRenderTree/mac/EventSendingController.mm
+++ b/Tools/DumpRenderTree/mac/EventSendingController.mm
@@ -586,7 +586,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
savedMouseEvents = nil;
}
-- (void)keyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)keyLocation
+- (void)keyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)location
{
NSString *eventCharacter = character;
unsigned short keyCode = 0;
@@ -738,7 +738,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
for (unsigned i = 0; i < WTF_ARRAY_LENGTH(table); ++i) {
NSString* currentCharacterString = [NSString stringWithCharacters:&table[i].character length:1];
if ([character isEqualToString:currentCharacterString] || [character isEqualToString:table[i].characterName]) {
- if (keyLocation == DOM_KEY_LOCATION_NUMPAD)
+ if (location == DOM_KEY_LOCATION_NUMPAD)
keyCode = table[i].macNumpadKeyCode;
else
keyCode = table[i].macKeyCode;
@@ -758,7 +758,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
modifierFlags |= buildModifierFlags(modifiers);
- if (keyLocation == DOM_KEY_LOCATION_NUMPAD)
+ if (location == DOM_KEY_LOCATION_NUMPAD)
modifierFlags |= NSNumericPadKeyMask;
[[[mainFrame frameView] documentView] layout];
@@ -790,12 +790,12 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
[[[[mainFrame webView] window] firstResponder] keyUp:event];
}
-- (void)keyDownWrapper:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)keyLocation
+- (void)keyDownWrapper:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)location
{
- [self keyDown:character withModifiers:modifiers withLocation:keyLocation];
+ [self keyDown:character withModifiers:modifiers withLocation:location];
}
-- (void)scheduleAsynchronousKeyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)keyLocation
+- (void)scheduleAsynchronousKeyDown:(NSString *)character withModifiers:(WebScriptObject *)modifiers withLocation:(unsigned long)location
{
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[EventSendingController instanceMethodSignatureForSelector:@selector(keyDownWrapper:withModifiers:withLocation:)]];
[invocation retainArguments];
@@ -803,7 +803,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
[invocation setSelector:@selector(keyDownWrapper:withModifiers:withLocation:)];
[invocation setArgument:&character atIndex:2];
[invocation setArgument:&modifiers atIndex:3];
- [invocation setArgument:&keyLocation atIndex:4];
+ [invocation setArgument:&location atIndex:4];
[invocation performSelector:@selector(invoke) withObject:nil afterDelay:0];
}
@@ -843,7 +843,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
if ([event isKindOfClass:[DOMKeyboardEvent class]]) {
printf(" keyIdentifier: %s\n", [[(DOMKeyboardEvent*)event keyIdentifier] UTF8String]);
- printf(" keyLocation: %d\n", [(DOMKeyboardEvent*)event keyLocation]);
+ printf(" keyLocation: %d\n", [(DOMKeyboardEvent*)event location]);
printf(" modifier keys: c:%d s:%d a:%d m:%d\n",
[(DOMKeyboardEvent*)event ctrlKey] ? 1 : 0,
[(DOMKeyboardEvent*)event shiftKey] ? 1 : 0,
@@ -920,7 +920,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
cancelable:YES
view:[document defaultView]
keyIdentifier:@"U+000041"
- keyLocation:0
+ location:0
ctrlKey:YES
altKey:NO
shiftKey:NO
@@ -935,7 +935,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
cancelable:YES
view:[document defaultView]
keyIdentifier:@"U+000045"
- keyLocation:1
+ location:1
ctrlKey:NO
altKey:YES
shiftKey:NO
@@ -950,7 +950,7 @@ static int buildModifierFlags(const WebScriptObject* modifiers)
cancelable:YES
view:[document defaultView]
keyIdentifier:@"U+000056"
- keyLocation:0
+ location:0
ctrlKey:NO
altKey:NO
shiftKey:NO
diff --git a/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm b/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm
index d80f6ba4e..adf5d9e31 100644
--- a/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm
+++ b/Tools/DumpRenderTree/mac/MockWebNotificationProvider.mm
@@ -43,7 +43,7 @@
{
if (!(self = [super init]))
return nil;
- _permissions.adoptNS([[NSMutableDictionary alloc] init]);
+ _permissions = adoptNS([[NSMutableDictionary alloc] init]);
return self;
}
diff --git a/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm b/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
index 0cf9c4a19..c2d43dabf 100644
--- a/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
+++ b/Tools/DumpRenderTree/mac/PixelDumpSupportMac.mm
@@ -53,7 +53,7 @@ static PassRefPtr<BitmapContext> createBitmapContext(size_t pixelsWide, size_t p
return 0;
// Creating this bitmap in the device color space prevents any color conversion when the image of the web view is drawn into it.
- RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB());
CGContextRef context = CGBitmapContextCreate(buffer, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host); // Use ARGB8 on PPC or BGRA8 on X86 to improve CG performance
if (!context) {
free(buffer);
@@ -184,8 +184,8 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc
PassRefPtr<BitmapContext> createPagedBitmapContext()
{
- int pageWidthInPixels = TestRunner::maxViewWidth;
- int pageHeightInPixels = TestRunner::maxViewHeight;
+ int pageWidthInPixels = TestRunner::viewWidth;
+ int pageHeightInPixels = TestRunner::viewHeight;
int numberOfPages = [mainFrame numberOfPagesWithPageWidth:pageWidthInPixels pageHeight:pageHeightInPixels];
size_t rowBytes = 0;
void* buffer = 0;
diff --git a/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm b/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
index c5b26442c..5632aa285 100644
--- a/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
+++ b/Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
@@ -121,7 +121,7 @@ using namespace std;
{
ASSERT([[dataSource webFrame] dataSource] || [[dataSource webFrame] provisionalDataSource]);
- if (!done && gTestRunner->dumpResourceLoadCallbacks())
+ if (!done)
return [[request URL] _drt_descriptionSuitableForTestResult];
return @"<unknown>";
diff --git a/Tools/DumpRenderTree/mac/TestRunnerMac.mm b/Tools/DumpRenderTree/mac/TestRunnerMac.mm
index 22f5c2898..a7d07de46 100644
--- a/Tools/DumpRenderTree/mac/TestRunnerMac.mm
+++ b/Tools/DumpRenderTree/mac/TestRunnerMac.mm
@@ -30,6 +30,7 @@
#import "DumpRenderTree.h"
#import "TestRunner.h"
+#import "DefaultPolicyDelegate.h"
#import "EditingDelegate.h"
#import "MockGeolocationProvider.h"
#import "MockWebNotificationProvider.h"
@@ -45,6 +46,7 @@
#import <WebCore/GeolocationPosition.h>
#import <WebKit/DOMDocument.h>
#import <WebKit/DOMElement.h>
+#import <WebKit/DOMHTMLInputElementPrivate.h>
#import <WebKit/WebApplicationCache.h>
#import <WebKit/WebBackForwardList.h>
#import <WebKit/WebCoreStatistics.h>
@@ -73,7 +75,6 @@
#import <WebKit/WebTypesInternal.h>
#import <WebKit/WebView.h>
#import <WebKit/WebViewPrivate.h>
-#import <WebKit/WebWorkersPrivate.h>
#import <wtf/CurrentTime.h>
#import <wtf/HashMap.h>
#import <wtf/RetainPtr.h>
@@ -119,7 +120,7 @@ TestRunner::~TestRunner()
void TestRunner::addDisallowedURL(JSStringRef url)
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
if (!disallowedURLs)
disallowedURLs = CFSetCreateMutable(kCFAllocatorDefault, 0, NULL);
@@ -143,7 +144,7 @@ void TestRunner::clearAllApplicationCaches()
long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef url)
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
long long usage = [WebApplicationCache diskUsageForOrigin:origin];
[origin release];
@@ -157,7 +158,7 @@ void TestRunner::syncLocalStorage()
long long TestRunner::localStorageDiskUsageForOrigin(JSStringRef url)
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
long long usage = [[WebStorageManager sharedWebStorageManager] diskUsageForOrigin:origin];
[origin release];
@@ -171,7 +172,7 @@ void TestRunner::observeStorageTrackerNotifications(unsigned number)
void TestRunner::clearApplicationCacheForOrigin(JSStringRef url)
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
[WebApplicationCache deleteCacheForOrigin:origin];
@@ -212,6 +213,11 @@ void TestRunner::setStorageDatabaseIdleInterval(double interval)
[WebStorageManager setStorageDatabaseIdleInterval:interval];
}
+void TestRunner::closeIdleLocalStorageDatabases()
+{
+ [WebStorageManager closeIdleLocalStorageDatabases];
+}
+
JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
{
return originsArrayToJS(context, [[WebStorageManager sharedWebStorageManager] origins]);
@@ -219,7 +225,7 @@ JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, URL));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, URL));
WebSecurityOrigin *origin = [[WebSecurityOrigin alloc] initWithURL:[NSURL URLWithString:(NSString *)urlCF.get()]];
[[WebStorageManager sharedWebStorageManager] deleteOrigin:origin];
@@ -243,14 +249,14 @@ void TestRunner::clearBackForwardList()
JSStringRef TestRunner::copyDecodedHostName(JSStringRef name)
{
- RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ RetainPtr<CFStringRef> nameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name));
NSString *nameNS = (NSString *)nameCF.get();
return JSStringCreateWithCFString((CFStringRef)[nameNS _web_decodeHostName]);
}
JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
{
- RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ RetainPtr<CFStringRef> nameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name));
NSString *nameNS = (NSString *)nameCF.get();
return JSStringCreateWithCFString((CFStringRef)[nameNS _web_encodeHostName]);
}
@@ -269,21 +275,6 @@ void TestRunner::keepWebHistory()
}
}
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
-{
- return [[mainFrame webView] _computedStyleIncludingVisitedInfo:context forElement:value];
-}
-
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
-{
- DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
- if (!element)
- return JSRetainPtr<JSStringRef>();
-
- JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithCFString((CFStringRef)[element _markerTextForListItem]));
- return markerText;
-}
-
int TestRunner::numberOfPendingGeolocationPermissionRequests()
{
return [[[mainFrame webView] UIDelegate] numberOfPendingGeolocationPermissionRequests];
@@ -294,11 +285,6 @@ size_t TestRunner::webHistoryItemCount()
return [[[WebHistory optionalSharedHistory] allItems] count];
}
-unsigned TestRunner::workerThreadCount() const
-{
- return [WebWorkersPrivate workerThreadCount];
-}
-
JSRetainPtr<JSStringRef> TestRunner::platformName() const
{
JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("mac"));
@@ -378,7 +364,7 @@ JSStringRef TestRunner::pathToLocalResource(JSContextRef context, JSStringRef lo
void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
NSString *urlNS = (NSString *)urlCF.get();
NSURL *nsurl = [NSURL URLWithString:urlNS relativeToURL:[[[mainFrame dataSource] response] URL]];
@@ -420,22 +406,15 @@ void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
[[[mainFrame webView] preferences] setAuthorAndUserStylesEnabled:flag];
}
-void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
+void TestRunner::setCustomPolicyDelegate(bool setDelegate, bool permissive)
{
- DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
- if (!element || ![element isKindOfClass:[DOMHTMLInputElement class]])
+ if (!setDelegate) {
+ [[mainFrame webView] setPolicyDelegate:defaultPolicyDelegate];
return;
+ }
- [(DOMHTMLInputElement *)element _setAutofilled:autofilled];
-}
-
-void TestRunner::setCustomPolicyDelegate(bool setDelegate, bool permissive)
-{
- if (setDelegate) {
- [policyDelegate setPermissive:permissive];
- [[mainFrame webView] setPolicyDelegate:policyDelegate];
- } else
- [[mainFrame webView] setPolicyDelegate:nil];
+ [policyDelegate setPermissive:permissive];
+ [[mainFrame webView] setPolicyDelegate:policyDelegate];
}
void TestRunner::setDatabaseQuota(unsigned long long quota)
@@ -457,7 +436,7 @@ void TestRunner::setDefersLoading(bool defers)
void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
{
- RetainPtr<CFStringRef> schemeCFString(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, scheme));
+ RetainPtr<CFStringRef> schemeCFString = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, scheme));
[WebView _setDomainRelaxationForbidden:forbidden forURLScheme:(NSString *)schemeCFString.get()];
}
@@ -487,7 +466,7 @@ void TestRunner::setMockGeolocationPosition(double latitude, double longitude, d
void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
{
- RetainPtr<CFStringRef> messageCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, message));
+ RetainPtr<CFStringRef> messageCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, message));
NSString *messageNS = (NSString *)messageCF.get();
[[MockGeolocationProvider shared] setPositionUnavailableErrorWithMessage:messageNS];
}
@@ -548,11 +527,6 @@ void TestRunner::setXSSAuditorEnabled(bool enabled)
[[[mainFrame webView] preferences] setXSSAuditorEnabled:enabled];
}
-void TestRunner::setFrameFlatteningEnabled(bool enabled)
-{
- [[[mainFrame webView] preferences] setFrameFlatteningEnabled:enabled];
-}
-
void TestRunner::setSpatialNavigationEnabled(bool enabled)
{
[[[mainFrame webView] preferences] setSpatialNavigationEnabled:enabled];
@@ -605,7 +579,7 @@ void TestRunner::setUserStyleSheetEnabled(bool flag)
void TestRunner::setUserStyleSheetLocation(JSStringRef path)
{
- RetainPtr<CFStringRef> pathCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, path));
+ RetainPtr<CFStringRef> pathCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, path));
NSURL *url = [NSURL URLWithString:(NSString *)pathCF.get()];
[[WebPreferences standardPreferences] setUserStyleSheetLocation:url];
}
@@ -616,8 +590,8 @@ void TestRunner::setValueForUser(JSContextRef context, JSValueRef nodeObject, JS
if (!element || ![element isKindOfClass:[DOMHTMLInputElement class]])
return;
- RetainPtr<CFStringRef> valueCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, value));
- [(DOMHTMLInputElement *)element _setValueForUser:(NSString *)valueCF.get()];
+ RetainPtr<CFStringRef> valueCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, value));
+ [(DOMHTMLInputElement *)element setValueForUser:(NSString *)valueCF.get()];
}
void TestRunner::setViewModeMediaFeature(JSStringRef mode)
@@ -625,11 +599,6 @@ void TestRunner::setViewModeMediaFeature(JSStringRef mode)
// FIXME: implement
}
-void TestRunner::disableImageLoading()
-{
- [[WebPreferences standardPreferences] setLoadsImagesAutomatically:NO];
-}
-
void TestRunner::dispatchPendingLoadRequests()
{
[[mainFrame webView] _dispatchPendingLoadRequests];
@@ -637,10 +606,10 @@ void TestRunner::dispatchPendingLoadRequests()
void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
{
- RetainPtr<CFStringRef> keyCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, key));
+ RetainPtr<CFStringRef> keyCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, key));
NSString *keyNS = (NSString *)keyCF.get();
- RetainPtr<CFStringRef> valueCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, value));
+ RetainPtr<CFStringRef> valueCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, value));
NSString *valueNS = (NSString *)valueCF.get();
[[WebPreferences standardPreferences] _setPreferenceForTestWithValue:valueNS forKey:keyNS];
@@ -653,7 +622,7 @@ void TestRunner::removeAllVisitedLinks()
void TestRunner::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
{
- RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
+ RetainPtr<CFStringRef> urlString = adoptCF(JSStringCopyCFString(0, jsURL));
::setPersistentUserStyleSheetLocation(urlString.get());
}
@@ -668,16 +637,6 @@ void TestRunner::setWindowIsKey(bool windowIsKey)
[[mainFrame webView] _updateActiveState];
}
-void TestRunner::setSmartInsertDeleteEnabled(bool flag)
-{
- [[mainFrame webView] setSmartInsertDeleteEnabled:flag];
-}
-
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
-{
- [[mainFrame webView] setSelectTrailingWhitespaceEnabled:flag];
-}
-
static const CFTimeInterval waitToDumpWatchdogInterval = 30.0;
static void waitUntilDoneWatchdogFired(CFRunLoopTimerRef timer, void* info)
@@ -697,26 +656,12 @@ int TestRunner::windowCount()
return CFArrayGetCount(openWindowsRef);
}
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef jsString)
-{
- RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, jsString));
- NSString *idNS = (NSString *)idCF.get();
-
- DOMElement *element = [[mainFrame DOMDocument] getElementById:idNS];
- id rep = [[mainFrame dataSource] representation];
-
- if ([rep class] == [WebHTMLRepresentation class])
- return [(WebHTMLRepresentation *)rep elementDoesAutoComplete:element];
-
- return false;
-}
-
void TestRunner::execCommand(JSStringRef name, JSStringRef value)
{
- RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ RetainPtr<CFStringRef> nameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name));
NSString *nameNS = (NSString *)nameCF.get();
- RetainPtr<CFStringRef> valueCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, value));
+ RetainPtr<CFStringRef> valueCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, value));
NSString *valueNS = (NSString *)valueCF.get();
[[mainFrame webView] _executeCoreCommandByName:nameNS value:valueNS];
@@ -731,7 +676,7 @@ bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRe
if (!JSValueIsNumber(context, lengthValue))
return false;
- RetainPtr<CFStringRef> targetCFString(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, target));
+ RetainPtr<CFStringRef> targetCFString = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, target));
size_t length = static_cast<size_t>(JSValueToNumber(context, lengthValue, 0));
for (size_t i = 0; i < length; ++i) {
@@ -765,7 +710,7 @@ void TestRunner::setCacheModel(int cacheModel)
bool TestRunner::isCommandEnabled(JSStringRef name)
{
- RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name));
+ RetainPtr<CFStringRef> nameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, name));
NSString *nameNS = (NSString *)nameCF.get();
// Accept command strings with capital letters for first letter without trailing colon.
@@ -776,7 +721,7 @@ bool TestRunner::isCommandEnabled(JSStringRef name)
}
SEL selector = NSSelectorFromString(nameNS);
- RetainPtr<CommandValidationTarget> target(AdoptNS, [[CommandValidationTarget alloc] initWithAction:selector]);
+ RetainPtr<CommandValidationTarget> target = adoptNS([[CommandValidationTarget alloc] initWithAction:selector]);
id validator = [NSApp targetForAction:selector to:[mainFrame webView] from:target.get()];
if (!validator)
return false;
@@ -787,31 +732,6 @@ bool TestRunner::isCommandEnabled(JSStringRef name)
return [validator validateUserInterfaceItem:target.get()];
}
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
- RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, elementId));
- NSString *idNS = (NSString *)idCF.get();
- RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, animationName));
- NSString *nameNS = (NSString *)nameCF.get();
-
- return [mainFrame _pauseAnimation:nameNS onNode:[[mainFrame DOMDocument] getElementById:idNS] atTime:time];
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, elementId));
- NSString *idNS = (NSString *)idCF.get();
- RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, propertyName));
- NSString *nameNS = (NSString *)nameCF.get();
-
- return [mainFrame _pauseTransitionOfProperty:nameNS onNode:[[mainFrame DOMDocument] getElementById:idNS] atTime:time];
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- return [mainFrame _numberOfActiveAnimations];
-}
-
void TestRunner::waitForPolicyDelegate()
{
setWaitToDump(true);
@@ -821,22 +741,22 @@ void TestRunner::waitForPolicyDelegate()
void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
{
- RetainPtr<CFStringRef> sourceOriginCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, sourceOrigin));
+ RetainPtr<CFStringRef> sourceOriginCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, sourceOrigin));
NSString *sourceOriginNS = (NSString *)sourceOriginCF.get();
- RetainPtr<CFStringRef> protocolCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, destinationProtocol));
+ RetainPtr<CFStringRef> protocolCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, destinationProtocol));
NSString *destinationProtocolNS = (NSString *)protocolCF.get();
- RetainPtr<CFStringRef> hostCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, destinationHost));
+ RetainPtr<CFStringRef> hostCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, destinationHost));
NSString *destinationHostNS = (NSString *)hostCF.get();
[WebView _addOriginAccessWhitelistEntryWithSourceOrigin:sourceOriginNS destinationProtocol:destinationProtocolNS destinationHost:destinationHostNS allowDestinationSubdomains:allowDestinationSubdomains];
}
void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
{
- RetainPtr<CFStringRef> sourceOriginCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, sourceOrigin));
+ RetainPtr<CFStringRef> sourceOriginCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, sourceOrigin));
NSString *sourceOriginNS = (NSString *)sourceOriginCF.get();
- RetainPtr<CFStringRef> protocolCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, destinationProtocol));
+ RetainPtr<CFStringRef> protocolCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, destinationProtocol));
NSString *destinationProtocolNS = (NSString *)protocolCF.get();
- RetainPtr<CFStringRef> hostCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, destinationHost));
+ RetainPtr<CFStringRef> hostCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, destinationHost));
NSString *destinationHostNS = (NSString *)hostCF.get();
[WebView _removeOriginAccessWhitelistEntryWithSourceOrigin:sourceOriginNS destinationProtocol:destinationProtocolNS destinationHost:destinationHostNS allowDestinationSubdomains:allowDestinationSubdomains];
}
@@ -848,14 +768,14 @@ void TestRunner::setScrollbarPolicy(JSStringRef orientation, JSStringRef policy)
void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
{
- RetainPtr<CFStringRef> sourceCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, source));
+ RetainPtr<CFStringRef> sourceCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, source));
NSString *sourceNS = (NSString *)sourceCF.get();
[WebView _addUserScriptToGroup:@"org.webkit.DumpRenderTree" world:[WebScriptWorld world] source:sourceNS url:nil whitelist:nil blacklist:nil injectionTime:(runAtStart ? WebInjectAtDocumentStart : WebInjectAtDocumentEnd) injectedFrames:(allFrames ? WebInjectInAllFrames : WebInjectInTopFrameOnly)];
}
void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
{
- RetainPtr<CFStringRef> sourceCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, source));
+ RetainPtr<CFStringRef> sourceCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, source));
NSString *sourceNS = (NSString *)sourceCF.get();
[WebView _addUserStyleSheetToGroup:@"org.webkit.DumpRenderTree" world:[WebScriptWorld world] source:sourceNS url:nil whitelist:nil blacklist:nil injectedFrames:(allFrames ? WebInjectInAllFrames : WebInjectInTopFrameOnly)];
}
@@ -865,11 +785,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
[[[mainFrame webView] preferences] setDeveloperExtrasEnabled:enabled];
}
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool enabled)
-{
- [[[mainFrame webView] preferences] setAsynchronousSpellCheckingEnabled:enabled];
-}
-
void TestRunner::showWebInspector()
{
[[[mainFrame webView] inspector] show:nil];
@@ -882,7 +797,7 @@ void TestRunner::closeWebInspector()
void TestRunner::evaluateInWebInspector(long callId, JSStringRef script)
{
- RetainPtr<CFStringRef> scriptCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, script));
+ RetainPtr<CFStringRef> scriptCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, script));
NSString *scriptNS = (NSString *)scriptCF.get();
[[[mainFrame webView] inspector] evaluateInFrontend:nil callId:callId script:scriptNS];
}
@@ -912,7 +827,7 @@ void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, J
void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
{
- RetainPtr<CFStringRef> scriptCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, script));
+ RetainPtr<CFStringRef> scriptCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, script));
NSString *scriptNS = (NSString *)scriptCF.get();
// A worldID of 0 always corresponds to a new world. Any other worldID corresponds to a world
@@ -923,7 +838,7 @@ void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef glo
else {
RetainPtr<WebScriptWorld>& worldSlot = worldMap().add(worldID, 0).iterator->value;
if (!worldSlot)
- worldSlot.adoptNS([[WebScriptWorld alloc] init]);
+ worldSlot = adoptNS([[WebScriptWorld alloc] init]);
world = worldSlot.get();
}
@@ -971,8 +886,8 @@ void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringR
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- RetainPtr<CFStringRef> utf8DataCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, utf8Data));
- RetainPtr<CFStringRef> baseURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, baseURL));
+ RetainPtr<CFStringRef> utf8DataCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, utf8Data));
+ RetainPtr<CFStringRef> baseURLCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, baseURL));
WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""];
@@ -1008,7 +923,7 @@ void TestRunner::setWebViewEditable(bool editable)
static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoaderRunLoopMode";
-#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1060
+#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1060
@protocol NSURLConnectionDelegate <NSObject>
@end
#endif
@@ -1039,7 +954,7 @@ static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoade
- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
{
if ([challenge previousFailureCount] == 0) {
- RetainPtr<NSURLCredential> credential(AdoptNS, [[NSURLCredential alloc] initWithUser:m_username password:m_password persistence:NSURLCredentialPersistenceForSession]);
+ RetainPtr<NSURLCredential> credential = adoptNS([[NSURLCredential alloc] initWithUser:m_username password:m_password persistence:NSURLCredentialPersistenceForSession]);
[[challenge sender] useCredential:credential.get() forAuthenticationChallenge:challenge];
return;
}
@@ -1084,15 +999,13 @@ static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoade
void TestRunner::authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password)
{
// See <rdar://problem/7880699>.
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- RetainPtr<CFStringRef> urlStringCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url));
- RetainPtr<CFStringRef> usernameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, username));
- RetainPtr<CFStringRef> passwordCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, password));
+ RetainPtr<CFStringRef> urlStringCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, url));
+ RetainPtr<CFStringRef> usernameCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, username));
+ RetainPtr<CFStringRef> passwordCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, password));
- RetainPtr<NSURLRequest> request(AdoptNS, [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:(NSString *)urlStringCF.get()]]);
+ RetainPtr<NSURLRequest> request = adoptNS([[NSURLRequest alloc] initWithURL:[NSURL URLWithString:(NSString *)urlStringCF.get()]]);
[SynchronousLoader makeRequest:request.get() withUsername:(NSString *)usernameCF.get() password:(NSString *)passwordCF.get()];
-#endif
}
void TestRunner::abortModal()
@@ -1105,21 +1018,14 @@ void TestRunner::setSerializeHTTPLoads(bool serialize)
[WebView _setLoadResourcesSerially:serialize];
}
-void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
-{
- [[mainFrame webView] _setMinimumTimerInterval:minimumTimerInterval];
-}
-
void TestRunner::setTextDirection(JSStringRef directionName)
{
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
if (JSStringIsEqualToUTF8CString(directionName, "ltr"))
[[mainFrame webView] makeBaseWritingDirectionLeftToRight:0];
else if (JSStringIsEqualToUTF8CString(directionName, "rtl"))
[[mainFrame webView] makeBaseWritingDirectionRightToLeft:0];
else
ASSERT_NOT_REACHED();
-#endif
}
void TestRunner::addChromeInputField()
@@ -1175,26 +1081,16 @@ void TestRunner::setPageVisibility(const char* newVisibility)
[webView _setVisibilityState:WebPageVisibilityStateUnloaded isInitialState:NO];
}
-void TestRunner::sendWebIntentResponse(JSStringRef)
-{
- // FIXME: Implement.
-}
-
-void TestRunner::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
-{
- // FIXME: Implement.
-}
-
void TestRunner::grantWebNotificationPermission(JSStringRef jsOrigin)
{
- RetainPtr<CFStringRef> cfOrigin(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, jsOrigin));
+ RetainPtr<CFStringRef> cfOrigin = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, jsOrigin));
ASSERT([[mainFrame webView] _notificationProvider] == [MockWebNotificationProvider shared]);
[[MockWebNotificationProvider shared] setWebNotificationOrigin:(NSString *)cfOrigin.get() permission:TRUE];
}
void TestRunner::denyWebNotificationPermission(JSStringRef jsOrigin)
{
- RetainPtr<CFStringRef> cfOrigin(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, jsOrigin));
+ RetainPtr<CFStringRef> cfOrigin = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, jsOrigin));
ASSERT([[mainFrame webView] _notificationProvider] == [MockWebNotificationProvider shared]);
[[MockWebNotificationProvider shared] setWebNotificationOrigin:(NSString *)cfOrigin.get() permission:FALSE];
}
diff --git a/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm b/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm
index 9f94ecbc4..e06e79750 100644
--- a/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm
+++ b/Tools/DumpRenderTree/mac/WebArchiveDumpSupportMac.mm
@@ -52,7 +52,7 @@ void CFURLResponseSetMIMEType(CFURLResponseRef response, CFStringRef mimeType);
CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
{
// Decode NSURLResponse
- RetainPtr<NSKeyedUnarchiver> unarchiver(AdoptNS, [[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
NSURLResponse *response = [unarchiver.get() decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
[unarchiver.get() finishDecoding];
@@ -62,7 +62,7 @@ CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
// NSURLResponse is not toll-free bridged to CFURLResponse.
- RetainPtr<CFHTTPMessageRef> httpMessage(AdoptCF, CFHTTPMessageCreateResponse(kCFAllocatorDefault, [httpResponse statusCode], 0, kCFHTTPVersion1_1));
+ RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, [httpResponse statusCode], 0, kCFHTTPVersion1_1));
NSDictionary *headerFields = [httpResponse allHeaderFields];
for (NSString *headerField in [headerFields keyEnumerator])
diff --git a/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm b/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm
index c28e991e2..f0b6c33dc 100644
--- a/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm
+++ b/Tools/DumpRenderTree/mac/WorkQueueItemMac.mm
@@ -40,9 +40,9 @@
bool LoadItem::invoke() const
{
- RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_url.get()));
+ RetainPtr<CFStringRef> urlCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_url.get()));
NSString *urlNS = (NSString *)urlCF.get();
- RetainPtr<CFStringRef> targetCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_target.get()));
+ RetainPtr<CFStringRef> targetCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_target.get()));
NSString *targetNS = (NSString *)targetCF.get();
WebFrame *targetFrame;
@@ -56,11 +56,11 @@ bool LoadItem::invoke() const
bool LoadHTMLStringItem::invoke() const
{
- RetainPtr<CFStringRef> contentCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_content.get()));
- RetainPtr<CFStringRef> baseURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_baseURL.get()));
+ RetainPtr<CFStringRef> contentCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_content.get()));
+ RetainPtr<CFStringRef> baseURLCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_baseURL.get()));
if (m_unreachableURL) {
- RetainPtr<CFStringRef> unreachableURLCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_unreachableURL.get()));
+ RetainPtr<CFStringRef> unreachableURLCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_unreachableURL.get()));
[mainFrame loadAlternateHTMLString:(NSString *)contentCF.get() baseURL:[NSURL URLWithString:(NSString *)baseURLCF.get()] forUnreachableURL:[NSURL URLWithString:(NSString *)unreachableURLCF.get()]];
return true;
}
@@ -77,7 +77,7 @@ bool ReloadItem::invoke() const
bool ScriptItem::invoke() const
{
- RetainPtr<CFStringRef> scriptCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, m_script.get()));
+ RetainPtr<CFStringRef> scriptCF = adoptCF(JSStringCopyCFString(kCFAllocatorDefault, m_script.get()));
NSString *scriptNS = (NSString *)scriptCF.get();
[[mainFrame webView] stringByEvaluatingJavaScriptFromString:scriptNS];
return true;
diff --git a/Tools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp b/Tools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp
deleted file mode 100644
index 1266c020e..000000000
--- a/Tools/DumpRenderTree/pthreads/JavaScriptThreadingPthreads.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2005, 2006, 2007 Apple Inc. All rights reserved.
- * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
- * (C) 2007 Eric Seidel <eric@webkit.org>
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-#include "JavaScriptThreading.h"
-
-#include <CoreFoundation/CoreFoundation.h>
-#include <JavaScriptCore/JavaScriptCore.h>
-#include <pthread.h>
-#include <wtf/Assertions.h>
-#include <wtf/HashSet.h>
-
-static JSContextGroupRef javaScriptThreadsGroup;
-
-static pthread_mutex_t javaScriptThreadsMutex = PTHREAD_MUTEX_INITIALIZER;
-static bool javaScriptThreadsShouldTerminate;
-
-static const int javaScriptThreadsCount = 4;
-
-typedef HashSet<pthread_t> ThreadSet;
-
-static ThreadSet* javaScriptThreads()
-{
- ASSERT(pthread_mutex_trylock(&javaScriptThreadsMutex) == EBUSY);
- static ThreadSet staticJavaScriptThreads;
- return &staticJavaScriptThreads;
-}
-
-// This function exercises JSC in a loop until javaScriptThreadsShouldTerminate
-// becomes true or it probabilistically decides to spawn a replacement thread and exit.
-void* runJavaScriptThread(void* arg)
-{
- static const char* const script =
- "var array = [];"
- "for (var i = 0; i < 1024; i++) {"
- " array.push(String(i));"
- "}";
-
- pthread_mutex_lock(&javaScriptThreadsMutex);
- JSGlobalContextRef ctx = JSGlobalContextCreateInGroup(javaScriptThreadsGroup, 0);
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- pthread_mutex_lock(&javaScriptThreadsMutex);
- JSStringRef scriptRef = JSStringCreateWithUTF8CString(script);
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- while (1) {
- pthread_mutex_lock(&javaScriptThreadsMutex);
- JSValueRef exception = 0;
- JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
- ASSERT(!exception);
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- pthread_mutex_lock(&javaScriptThreadsMutex);
- size_t valuesCount = 1024;
- JSValueRef values[valuesCount];
- for (size_t i = 0; i < valuesCount; ++i)
- values[i] = JSObjectMake(ctx, 0, 0);
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- // Check for cancellation.
- if (javaScriptThreadsShouldTerminate)
- goto done;
-
- // Respawn probabilistically.
- if (random() % 5 == 0) {
- pthread_mutex_lock(&javaScriptThreadsMutex);
- pthread_t pthread;
- pthread_create(&pthread, 0, &runJavaScriptThread, 0);
- pthread_detach(pthread);
- javaScriptThreads()->add(pthread);
- pthread_mutex_unlock(&javaScriptThreadsMutex);
- goto done;
- }
- }
-
-done:
- pthread_mutex_lock(&javaScriptThreadsMutex);
- JSStringRelease(scriptRef);
- JSGarbageCollect(ctx);
- JSGlobalContextRelease(ctx);
- javaScriptThreads()->remove(pthread_self());
- pthread_mutex_unlock(&javaScriptThreadsMutex);
- return 0;
-}
-
-void startJavaScriptThreads()
-{
- javaScriptThreadsGroup = JSContextGroupCreate();
-
- pthread_mutex_lock(&javaScriptThreadsMutex);
-
- for (int i = 0; i < javaScriptThreadsCount; i++) {
- pthread_t pthread;
- pthread_create(&pthread, 0, &runJavaScriptThread, 0);
- pthread_detach(pthread);
- javaScriptThreads()->add(pthread);
- }
-
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-}
-
-void stopJavaScriptThreads()
-{
- pthread_mutex_lock(&javaScriptThreadsMutex);
-
- javaScriptThreadsShouldTerminate = true;
-
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- while (true) {
- pthread_mutex_lock(&javaScriptThreadsMutex);
- int threadCount = javaScriptThreads()->size();
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- if (!threadCount)
- break;
-
- usleep(1000);
- }
-}
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTree.pro b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
index 2671ab664..2d6cfca22 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/Tools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -26,17 +26,20 @@ macx: QT += xml
HEADERS += \
$$PWD/../WorkQueue.h \
$$PWD/../DumpRenderTree.h \
+ $$PWD/../GCController.h \
+ $$PWD/../TestRunner.h \
DumpRenderTreeQt.h \
EventSenderQt.h \
TextInputControllerQt.h \
WorkQueueItemQt.h \
TestRunnerQt.h \
- GCControllerQt.h \
testplugin.h
SOURCES += \
$$PWD/../WorkQueue.cpp \
$$PWD/../DumpRenderTreeCommon.cpp \
+ $$PWD/../GCController.cpp \
+ $$PWD/../TestRunner.cpp \
DumpRenderTreeQt.cpp \
EventSenderQt.cpp \
TextInputControllerQt.cpp \
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp
index 5026d3ca4..264947497 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp
@@ -40,10 +40,6 @@
#include <qurl.h>
#include <qwebdatabase.h>
-
-#include <wtf/AlwaysInline.h>
-#include <wtf/ExportMacros.h>
-
#ifdef Q_WS_X11
#include <qx11info_x11.h>
#endif
@@ -136,7 +132,7 @@ int main(int argc, char* argv[])
// Remove the first arguments, it is application name itself
args.removeAt(0);
- WebCore::DumpRenderTree dumper;
+ DumpRenderTree dumper;
int index = args.indexOf(QLatin1String("--stdout"));
if (index != -1) {
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index dea0edbc0..c0c285353 100755
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -35,10 +35,12 @@
#include "DumpRenderTreeQt.h"
#include "DumpRenderTreeSupportQt.h"
#include "EventSenderQt.h"
-#include "GCControllerQt.h"
+#include "GCController.h"
#include "InitWebCoreQt.h"
#include "InitWebKitQt.h"
+#include "JSStringRefQt.h"
#include "QtTestSupport.h"
+#include "TestRunner.h"
#include "TestRunnerQt.h"
#include "TextInputControllerQt.h"
#include "testplugin.h"
@@ -72,7 +74,7 @@
#include <unistd.h>
#endif
-namespace WebCore {
+using namespace WebCore;
const int databaseDefaultQuota = 5 * 1024 * 1024;
@@ -192,10 +194,7 @@ void WebPage::resetSettings()
m_drt->testRunner()->setCaretBrowsingEnabled(false);
m_drt->testRunner()->setAuthorAndUserStylesEnabled(true);
- m_drt->testRunner()->setFrameFlatteningEnabled(false);
- m_drt->testRunner()->setSmartInsertDeleteEnabled(true);
- m_drt->testRunner()->setSelectTrailingWhitespaceEnabled(false);
- m_drt->testRunner()->setDefersLoading(false);
+ m_drt->jscTestRunner()->setDefersLoading(false);
// globalSettings must be reset explicitly.
m_drt->testRunner()->setXSSAuditorEnabled(false);
@@ -203,7 +202,7 @@ void WebPage::resetSettings()
QWebSettings::setMaximumPagesInCache(0); // reset to default
settings()->setUserStyleSheetUrl(QUrl()); // reset to default
- DumpRenderTreeSupportQt::setMinimumTimerInterval(handle(), DumpRenderTreeSupportQt::defaultMinimumTimerInterval());
+ DumpRenderTreeSupportQt::setSeamlessIFramesEnabled(true);
DumpRenderTreeSupportQt::resetInternalsObject(mainFrame()->handle());
@@ -384,6 +383,8 @@ WebViewGraphicsBased::WebViewGraphicsBased(QWidget* parent)
scene()->addItem(m_item);
}
+static DumpRenderTree *s_instance = 0;
+
DumpRenderTree::DumpRenderTree()
: m_dumpPixelsForAllTests(false)
, m_stdin(0)
@@ -392,6 +393,9 @@ DumpRenderTree::DumpRenderTree()
, m_graphicsBased(false)
, m_persistentStoragePath(QString(getenv("DUMPRENDERTREE_TEMP")))
{
+ ASSERT(!s_instance);
+ s_instance = this;
+
QByteArray viewMode = getenv("QT_DRT_WEBVIEW_MODE");
if (viewMode == "graphics")
setGraphicsBased(true);
@@ -423,7 +427,7 @@ DumpRenderTree::DumpRenderTree()
DumpRenderTreeSupportQt::webPageSetGroupName(pageAdapter(), "org.webkit.qt.DumpRenderTree");
m_mainView->setContextMenuPolicy(Qt::NoContextMenu);
- m_mainView->resize(QSize(TestRunner::maxViewWidth, TestRunner::maxViewHeight));
+ m_mainView->resize(QSize(TestRunner::viewWidth, TestRunner::viewHeight));
// clean up cache by resetting quota.
qint64 quota = webPage()->settings()->offlineWebApplicationCacheQuota();
@@ -431,7 +435,7 @@ DumpRenderTree::DumpRenderTree()
// create our controllers. This has to be done before connectFrame,
// as it exports there to the JavaScript DOM window.
- m_controller = new TestRunner(this);
+ m_controller = new TestRunnerQt(this);
connect(m_controller, SIGNAL(showPage()), this, SLOT(showPage()));
connect(m_controller, SIGNAL(hidePage()), this, SLOT(hidePage()));
@@ -441,7 +445,7 @@ DumpRenderTree::DumpRenderTree()
connect(m_controller, SIGNAL(done()), this, SLOT(dump()));
m_eventSender = new EventSender(m_page);
m_textInputController = new TextInputController(m_page);
- m_gcController = new GCController(m_page);
+ m_gcController.reset(new GCController());
// now connect our different signals
connect(m_page, SIGNAL(frameCreated(QWebFrame *)),
@@ -484,6 +488,12 @@ DumpRenderTree::~DumpRenderTree()
fclose(stderr);
delete m_mainView;
delete m_stdin;
+ s_instance = 0;
+}
+
+DumpRenderTree* DumpRenderTree::instance()
+{
+ return s_instance;
}
static void clearHistory(QWebPage* page)
@@ -525,6 +535,8 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting(const QUrl& url)
// of the DRT.
m_controller->reset();
+ m_jscController = TestRunner::create(url.toString().toStdString(), m_expectedHash.toStdString());
+
// reset mouse clicks counter
m_eventSender->resetClickCount();
@@ -606,15 +618,15 @@ void DumpRenderTree::open(const QUrl& url)
testRunner()->showWebInspector();
if (isDumpAsTextTest(url))
- testRunner()->dumpAsText();
+ m_jscController->setDumpAsText(true);
if (isGlobalHistoryTest(url))
testRunner()->dumpHistoryCallbacks();
// W3C SVG tests expect to be 480x360
bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1");
- int width = isW3CTest ? 480 : TestRunner::maxViewWidth;
- int height = isW3CTest ? 360 : TestRunner::maxViewHeight;
+ int width = isW3CTest ? TestRunner::w3cSVGViewWidth : TestRunner::viewWidth;
+ int height = isW3CTest ? TestRunner::w3cSVGViewHeight : TestRunner::viewHeight;
m_mainView->resize(QSize(width, height));
m_page->setPreferredContentsSize(QSize());
m_page->setViewportSize(QSize(width, height));
@@ -720,6 +732,8 @@ void DumpRenderTree::processLine(const QString &input)
open(QUrl::fromLocalFile(fi.absoluteFilePath()));
}
+ if (command.timeout > 0)
+ setTimeout(command.timeout);
fflush(stdout);
}
@@ -734,10 +748,51 @@ void DumpRenderTree::initJSObjects()
{
QWebFrame *frame = qobject_cast<QWebFrame*>(sender());
Q_ASSERT(frame);
+
+ JSContextRef context = 0;
+ JSObjectRef window = 0;
+
+ DumpRenderTreeSupportQt::getJSWindowObject(frame->handle(), &context, &window);
+
frame->addToJavaScriptWindowObject(QLatin1String("testRunner"), m_controller);
frame->addToJavaScriptWindowObject(QLatin1String("eventSender"), m_eventSender);
frame->addToJavaScriptWindowObject(QLatin1String("textInputController"), m_textInputController);
- frame->addToJavaScriptWindowObject(QLatin1String("GCController"), m_gcController);
+ m_gcController->makeWindowObject(context, window, 0);
+
+ if (m_jscController) {
+ JSObjectRef dummyWindow = JSObjectMake(context, 0, 0);
+ m_jscController->makeWindowObject(context, dummyWindow, 0);
+ JSRetainPtr<JSStringRef> testRunnerName(Adopt, JSStringCreateWithUTF8CString("testRunner"));
+ JSValueRef wrappedTestRunner = JSObjectGetProperty(context, dummyWindow, testRunnerName.get(), 0);
+ JSRetainPtr<JSStringRef> helperScript(Adopt, JSStringCreateWithUTF8CString("(function() {\n"
+ " function bind(fun, thisArg) {\n"
+ " return function() {\n"
+ " return fun.apply(thisArg, Array.prototype.slice.call(arguments));\n"
+ " }\n"
+ " }\n"
+ "for (var prop in this.jscBasedTestRunner) {\n"
+ " var pd = Object.getOwnPropertyDescriptor(this.qtBasedTestRunner, prop);\n"
+ " if (pd !== undefined) continue;\n"
+ " pd = Object.getOwnPropertyDescriptor(this.jscBasedTestRunner, prop);\n"
+ " this.qtBasedTestRunner[prop] = bind(this.jscBasedTestRunner[prop], this.jscBasedTestRunner);\n"
+ "}\n"
+ "}).apply(this)\n"));
+
+ JSRetainPtr<JSStringRef> qtBasedTestRunnerName(Adopt, JSStringCreateWithUTF8CString("qtBasedTestRunner"));
+ JSRetainPtr<JSStringRef> jscBasedTestRunnerName(Adopt, JSStringCreateWithUTF8CString("jscBasedTestRunner"));
+
+ JSObjectRef args = JSObjectMake(context, 0, 0);
+ JSObjectSetProperty(context, args, qtBasedTestRunnerName.get(), JSObjectGetProperty(context, window, testRunnerName.get(), 0), 0, 0);
+ JSObjectSetProperty(context, args, jscBasedTestRunnerName.get(), wrappedTestRunner, 0, 0);
+
+ JSValueRef ex = 0;
+ JSEvaluateScript(context, helperScript.get(), args, 0, 0, &ex);
+ if (ex) {
+ JSRetainPtr<JSStringRef> msg(Adopt, JSValueToStringCopy(context, ex, 0));
+ fprintf(stderr, "Error evaluating TestRunner setup-script: %s\n", qPrintable(JSStringCopyQString(msg.get())));
+ }
+ }
+
DumpRenderTreeSupportQt::injectInternalsObject(frame->handle());
}
@@ -768,7 +823,7 @@ QString DumpRenderTree::dumpFrameScrollPosition(QWebFrame* frame)
result.append(QString("scrolled to %1,%2\n").arg(pos.x()).arg(pos.y()));
}
- if (m_controller->shouldDumpChildFrameScrollPositions()) {
+ if (m_jscController->dumpChildFrameScrollPositions()) {
QList<QWebFrame*> children = frame->childFrames();
for (int i = 0; i < children.size(); ++i)
result += dumpFrameScrollPosition(children.at(i));
@@ -793,7 +848,7 @@ QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
result.append(innerText);
result.append(QLatin1String("\n"));
- if (m_controller->shouldDumpChildrenAsText()) {
+ if (m_jscController->dumpChildFramesAsText()) {
QList<QWebFrame *> children = frame->childFrames();
for (int i = 0; i < children.size(); ++i)
result += dumpFramesAsText(children.at(i));
@@ -880,7 +935,7 @@ QString DumpRenderTree::dumpBackForwardList(QWebPage* page)
static const char *methodNameStringForFailedTest(TestRunner *controller)
{
const char *errorMessage;
- if (controller->shouldDumpAsText())
+ if (controller->dumpAsText())
errorMessage = "[documentElement innerText]";
// FIXME: Add when we have support
//else if (controller->dumpDOMAsWebArchive())
@@ -908,38 +963,46 @@ void DumpRenderTree::dump()
QString mimeType = DumpRenderTreeSupportQt::responseMimeType(mainFrame->handle());
if (mimeType == "text/plain")
- m_controller->dumpAsText();
+ m_jscController->setDumpAsText(true);
// Dump render text...
QString resultString;
- if (m_controller->shouldDumpAsText())
+ QString resultContentType = "text/plain";
+ QByteArray resultData;
+ if (m_controller->shouldDumpAsAudio()) {
+ resultContentType = "audio/wav";
+ resultData = m_controller->audioData();
+ } else if (m_jscController->dumpAsText())
resultString = dumpFramesAsText(mainFrame);
else {
resultString = DumpRenderTreeSupportQt::frameRenderTreeDump(mainFrame->handle());
resultString += dumpFrameScrollPosition(mainFrame);
}
if (!resultString.isEmpty()) {
- fprintf(stdout, "Content-Type: text/plain\n");
+ fprintf(stdout, "Content-Type: %s\n", resultContentType.toUtf8().constData());
fprintf(stdout, "%s", resultString.toUtf8().constData());
- if (m_controller->shouldDumpBackForwardList()) {
+ if (m_jscController->dumpBackForwardList()) {
fprintf(stdout, "%s", dumpBackForwardList(webPage()).toUtf8().constData());
foreach (QObject* widget, windows) {
QWebPage* page = qobject_cast<QWebPage*>(widget->findChild<QWebPage*>());
fprintf(stdout, "%s", dumpBackForwardList(page).toUtf8().constData());
}
}
-
+ } else if (!resultData.isEmpty()) {
+ fprintf(stdout, "Content-Type: %s\n", resultContentType.toUtf8().constData());
+ fprintf(stdout, "Content-Transfer-Encoding: base64\n");
+ fprintf(stdout, "%s", resultData.toBase64().constData());
} else
- printf("ERROR: nil result from %s", methodNameStringForFailedTest(m_controller));
+ printf("ERROR: nil result from %s", methodNameStringForFailedTest(m_jscController.get()));
// signal end of text block
fputs("#EOF\n", stdout);
fputs("#EOF\n", stderr);
- if (m_dumpPixelsForCurrentTest && m_controller->shouldDumpPixels()) {
+ if (m_dumpPixelsForCurrentTest && m_jscController->generatePixelResults()) {
QImage image;
- if (!m_controller->isPrinting()) {
+ if (!m_jscController->isPrinting()) {
image = QImage(m_page->viewportSize(), QImage::Format_ARGB32);
image.fill(Qt::white);
QPainter painter(&image);
@@ -1020,7 +1083,7 @@ void DumpRenderTree::dump()
void DumpRenderTree::titleChanged(const QString &s)
{
- if (m_controller->shouldDumpTitleChanges())
+ if (m_jscController->dumpTitleChanges())
printf("TITLE CHANGED: '%s'\n", s.toUtf8().data());
}
@@ -1033,7 +1096,7 @@ void DumpRenderTree::connectFrame(QWebFrame *frame)
void DumpRenderTree::dumpDatabaseQuota(QWebFrame* frame, const QString& dbName)
{
- if (!m_controller->shouldDumpDatabaseCallbacks())
+ if (!m_jscController->dumpDatabaseCallbacks())
return;
QWebSecurityOrigin origin = frame->securityOrigin();
printf("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:{%s, %s, %i} database:%s\n",
@@ -1046,7 +1109,7 @@ void DumpRenderTree::dumpDatabaseQuota(QWebFrame* frame, const QString& dbName)
void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint64 defaultOriginQuota, quint64 totalSpaceNeeded)
{
- if (m_controller->shouldDumpApplicationCacheDelegateCallbacks()) {
+ if (m_jscController->dumpApplicationCacheDelegateCallbacks()) {
// For example, numbers from 30000 - 39999 will output as 30000.
// Rounding up or down not really matter for these tests. It's
// sufficient to just get a range of 10000 to determine if we were
@@ -1060,7 +1123,7 @@ void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint
);
}
- if (m_controller->shouldDisallowIncreaseForApplicationCacheQuota())
+ if (m_jscController->disallowIncreaseForApplicationCacheQuota())
return;
origin->setApplicationCacheQuota(defaultOriginQuota);
@@ -1068,7 +1131,7 @@ void DumpRenderTree::dumpApplicationCacheQuota(QWebSecurityOrigin* origin, quint
void DumpRenderTree::statusBarMessage(const QString& message)
{
- if (!m_controller->shouldDumpStatusCallbacks())
+ if (!m_jscController->dumpStatusCallbacks())
return;
printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", message.toUtf8().constData());
@@ -1076,7 +1139,7 @@ void DumpRenderTree::statusBarMessage(const QString& message)
QWebPage *DumpRenderTree::createWindow()
{
- if (!m_controller->canOpenWindows())
+ if (!m_jscController->canOpenWindows())
return 0;
// Create a dummy container object to track the page in DRT.
@@ -1163,5 +1226,3 @@ void DumpRenderTree::setShouldTimeout(bool flag)
{
m_controller->setShouldTimeout(flag);
}
-
-}
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
index 7a6f76fb0..be1559d33 100644
--- a/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
+++ b/Tools/DumpRenderTree/qt/DumpRenderTreeQt.h
@@ -41,12 +41,14 @@
#endif
#include "DumpRenderTreeSupportQt.h"
+#include "TestRunner.h"
#include <qgraphicsview.h>
#include <qgraphicswebview.h>
#include <qwebframe.h>
#include <qwebinspector.h>
#include <qwebpage.h>
#include <qwebview.h>
+#include <wtf/RefPtr.h>
QT_BEGIN_NAMESPACE
class QUrl;
@@ -56,14 +58,12 @@ QT_END_NAMESPACE
class QWebFrameAdapter;
class QWebPageAdapter;
-class TestRunner;
+class TestRunnerQt;
class DumpRenderTreeSupportQt;
class EventSender;
class TextInputController;
class GCController;
-namespace WebCore {
-
class WebPage;
class NetworkAccessManager;
@@ -74,6 +74,8 @@ public:
DumpRenderTree();
virtual ~DumpRenderTree();
+ static DumpRenderTree* instance();
+
// Initialize in single-file mode.
void open(const QUrl& url);
@@ -86,7 +88,8 @@ public:
void closeRemainingWindows();
void resetToConsistentStateBeforeTesting(const QUrl&);
- TestRunner *testRunner() const { return m_controller; }
+ TestRunnerQt *testRunner() const { return m_controller; }
+ TestRunner *jscTestRunner() const { return m_jscController.get(); }
EventSender *eventSender() const { return m_eventSender; }
TextInputController *textInputController() const { return m_textInputController; }
QString persistentStoragePath() const { return m_persistentStoragePath; }
@@ -143,7 +146,8 @@ private:
QString dumpFramesAsText(QWebFrame* frame);
QString dumpBackForwardList(QWebPage* page);
QString dumpFrameScrollPosition(QWebFrame* frame);
- TestRunner *m_controller;
+ TestRunnerQt *m_controller;
+ RefPtr<TestRunner> m_jscController;
bool m_dumpPixelsForCurrentTest;
bool m_dumpPixelsForAllTests;
@@ -155,7 +159,7 @@ private:
EventSender *m_eventSender;
TextInputController *m_textInputController;
- GCController* m_gcController;
+ QScopedPointer<GCController> m_gcController;
NetworkAccessManager* m_networkAccessManager;
QFile *m_stdin;
@@ -235,6 +239,4 @@ private:
QGraphicsWebView* m_item;
};
-}
-
#endif
diff --git a/Tools/DumpRenderTree/qt/EventSenderQt.cpp b/Tools/DumpRenderTree/qt/EventSenderQt.cpp
index 80be13178..352f1de98 100644
--- a/Tools/DumpRenderTree/qt/EventSenderQt.cpp
+++ b/Tools/DumpRenderTree/qt/EventSenderQt.cpp
@@ -424,7 +424,7 @@ QStringList EventSender::contextClick()
QGraphicsSceneContextMenuEvent ctxEvent(QEvent::GraphicsSceneContextMenu);
ctxEvent.setReason(QGraphicsSceneContextMenuEvent::Mouse);
ctxEvent.setPos(m_mousePos);
- WebCore::WebViewGraphicsBased* view = qobject_cast<WebCore::WebViewGraphicsBased*>(m_page->view());
+ WebViewGraphicsBased* view = qobject_cast<WebViewGraphicsBased*>(m_page->view());
if (view)
sendEvent(view->graphicsView(), &ctxEvent);
} else {
@@ -745,7 +745,7 @@ QGraphicsSceneWheelEvent* EventSender::createGraphicsSceneWheelEvent(QEvent::Typ
void EventSender::sendEvent(QObject* receiver, QEvent* event)
{
- if (WebCore::WebViewGraphicsBased* view = qobject_cast<WebCore::WebViewGraphicsBased*>(receiver))
+ if (WebViewGraphicsBased* view = qobject_cast<WebViewGraphicsBased*>(receiver))
view->scene()->sendEvent(view->graphicsView(), event);
else
QApplication::sendEvent(receiver, event);
@@ -755,9 +755,11 @@ void EventSender::postEvent(QObject* receiver, QEvent* event)
{
// QGraphicsScene does not have a postEvent method, so send the event in this case
// and delete it after that.
- if (WebCore::WebViewGraphicsBased* view = qobject_cast<WebCore::WebViewGraphicsBased*>(receiver)) {
+ if (WebViewGraphicsBased* view = qobject_cast<WebViewGraphicsBased*>(receiver)) {
view->scene()->sendEvent(view->graphicsView(), event);
delete event;
} else
QApplication::postEvent(receiver, event); // event deleted by the system
}
+
+#include "moc_EventSenderQt.cpp"
diff --git a/Tools/DumpRenderTree/qt/EventSenderQt.h b/Tools/DumpRenderTree/qt/EventSenderQt.h
index 7e4c60a97..ad13cadb6 100644
--- a/Tools/DumpRenderTree/qt/EventSenderQt.h
+++ b/Tools/DumpRenderTree/qt/EventSenderQt.h
@@ -96,7 +96,7 @@ protected:
void timerEvent(QTimerEvent*);
private:
- bool isGraphicsBased() const { return qobject_cast<WebCore::WebViewGraphicsBased*>(m_page->view()); }
+ bool isGraphicsBased() const { return qobject_cast<WebViewGraphicsBased*>(m_page->view()); }
QGraphicsSceneMouseEvent* createGraphicsSceneMouseEvent(QEvent::Type, const QPoint& pos, const QPoint& screenPos, Qt::MouseButton, Qt::MouseButtons, Qt::KeyboardModifiers);
QGraphicsSceneWheelEvent* createGraphicsSceneWheelEvent(QEvent::Type, const QPoint& pos, const QPoint& screenPos, int delta, Qt::KeyboardModifiers, Qt::Orientation);
void sendEvent(QObject* receiver, QEvent* event);
diff --git a/Tools/DumpRenderTree/qt/GCControllerQt.cpp b/Tools/DumpRenderTree/qt/GCControllerQt.cpp
index a2e5e0c85..9f93698d7 100644
--- a/Tools/DumpRenderTree/qt/GCControllerQt.cpp
+++ b/Tools/DumpRenderTree/qt/GCControllerQt.cpp
@@ -28,15 +28,9 @@
*/
#include "config.h"
-#include "GCControllerQt.h"
-#include "DumpRenderTreeSupportQt.h"
-
-#include <qwebpage.h>
+#include "GCController.h"
-GCController::GCController(QWebPage* parent)
- : QObject(parent)
-{
-}
+#include "DumpRenderTreeSupportQt.h"
void GCController::collect() const
{
@@ -48,7 +42,7 @@ void GCController::collectOnAlternateThread(bool waitUntilDone) const
DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(waitUntilDone);
}
-unsigned int GCController::getJSObjectCount() const
+size_t GCController::getJSObjectCount() const
{
return DumpRenderTreeSupportQt::javaScriptObjectsCount();
}
diff --git a/Tools/DumpRenderTree/qt/GCControllerQt.h b/Tools/DumpRenderTree/qt/GCControllerQt.h
deleted file mode 100644
index bcc9f2347..000000000
--- a/Tools/DumpRenderTree/qt/GCControllerQt.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
- * Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- */
-#ifndef GCControllerQt_h
-#define GCControllerQt_h
-
-#include <QObject>
-
-class QWebPage;
-class DumpRenderTreeSupportQt;
-
-class GCController : public QObject
-{
- Q_OBJECT
-public:
- GCController(QWebPage* parent);
-
-public Q_SLOTS:
- void collect() const;
- void collectOnAlternateThread(bool waitUntilDone) const;
- unsigned int getJSObjectCount() const;
-
-};
-
-#endif
diff --git a/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro b/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
index ae45c0331..3b6ddfc61 100644
--- a/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
+++ b/Tools/DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
@@ -31,7 +31,8 @@ SOURCES += \
Tests/PassDifferentNPPStruct.cpp \
Tests/PluginScriptableNPObjectInvokeDefault.cpp \
Tests/PluginScriptableObjectOverridesAllProperties.cpp \
- Tests/PrivateBrowsing.cpp
+ Tests/PrivateBrowsing.cpp \
+ Tests/ToStringAndValueOfObject.cpp
WEBKIT += webcore # For NPAPI headers
@@ -55,7 +56,7 @@ mac {
LIBS += -framework Carbon -framework Cocoa -framework QuartzCore
}
-!win32:!mac {
+!win32:!embedded:!mac {
LIBS += -lX11
DEFINES += XP_UNIX
}
diff --git a/Tools/DumpRenderTree/qt/TestRunnerQt.cpp b/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
index 37b5bb330..794c00ff1 100644
--- a/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
+++ b/Tools/DumpRenderTree/qt/TestRunnerQt.cpp
@@ -31,39 +31,34 @@
#include "DumpRenderTreeQt.h"
#include "DumpRenderTreeSupportQt.h"
+#include "NotificationPresenterClientQt.h"
#include "WorkQueue.h"
#include "WorkQueueItemQt.h"
+#include <JSStringRefQt.h>
#include <QCoreApplication>
#include <QDir>
#include <QLocale>
#include <qwebsettings.h>
-TestRunner::TestRunner(WebCore::DumpRenderTree* drt)
+TestRunnerQt::TestRunnerQt(DumpRenderTree* drt)
: QObject()
, m_drt(drt)
, m_shouldTimeout(true)
, m_timeout(30000)
{
reset();
- DumpRenderTreeSupportQt::dumpNotification(true);
}
-void TestRunner::reset()
+TestRunner::~TestRunner()
+{
+}
+
+void TestRunnerQt::reset()
{
m_hasDumped = false;
m_loadFinished = false;
- m_textDump = false;
- m_shouldDumpPixels = true;
- m_dumpBackForwardList = false;
- m_dumpChildrenAsText = false;
- m_dumpChildFrameScrollPositions = false;
- m_canOpenWindows = false;
+ m_audioDump = false;
m_waitForDone = false;
- m_disallowIncreaseForApplicationCacheQuota = false;
- m_dumpTitleChanges = false;
- m_dumpDatabaseCallbacks = false;
- m_dumpApplicationCacheDelegateCallbacks = false;
- m_dumpStatusCallbacks = false;
m_timeoutTimer.stop();
m_topLoadingFrame = 0;
m_waitForPolicy = false;
@@ -71,11 +66,10 @@ void TestRunner::reset()
m_webHistory = 0;
m_globalFlag = false;
m_userStyleSheetEnabled = false;
- m_desktopNotificationAllowedOrigins.clear();
m_ignoreDesktopNotification = false;
m_isGeolocationPermissionSet = false;
- m_isPrinting = false;
m_geolocationPermission = false;
+ m_audioData.clear();
DumpRenderTreeSupportQt::dumpEditingCallbacks(false);
DumpRenderTreeSupportQt::dumpFrameLoader(false);
@@ -93,16 +87,23 @@ void TestRunner::reset()
DumpRenderTreeSupportQt::dumpHistoryCallbacks(false);
DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(false);
DumpRenderTreeSupportQt::resetGeolocationMock(m_drt->pageAdapter());
+ DumpRenderTreeSupportQt::dumpNotification(false);
DumpRenderTreeSupportQt::setShouldUseFontSmoothing(false);
DumpRenderTreeSupportQt::disableDefaultTypesettingFeatures();
setIconDatabaseEnabled(false);
clearAllDatabases();
+ removeAllWebNotificationPermissions();
// The default state for DRT is to block third-party cookies, mimicing the Mac port
setAlwaysAcceptCookies(false);
emit hidePage();
}
-void TestRunner::processWork()
+void TestRunnerQt::dumpNotifications()
+{
+ DumpRenderTreeSupportQt::dumpNotification(true);
+}
+
+void TestRunnerQt::processWork()
{
// qDebug() << ">>>processWork";
@@ -114,7 +115,7 @@ void TestRunner::processWork()
}
// Called on loadFinished on WebPage
-void TestRunner::maybeDump(bool /*success*/)
+void TestRunnerQt::maybeDump(bool /*success*/)
{
// This can happen on any of the http/tests/security/window-events-*.html tests, where the test opens
@@ -145,13 +146,7 @@ void TestRunner::maybeDump(bool /*success*/)
}
}
-void TestRunner::dumpAsText(bool shouldDumpPixels)
-{
- m_textDump = true;
- m_shouldDumpPixels = shouldDumpPixels;
-}
-
-void TestRunner::waitUntilDone()
+void TestRunnerQt::waitUntilDone()
{
//qDebug() << ">>>>waitForDone";
m_waitForDone = true;
@@ -162,12 +157,12 @@ void TestRunner::waitUntilDone()
m_timeoutTimer.start(m_timeout, this);
}
-void TestRunner::setViewModeMediaFeature(const QString& mode)
+void TestRunnerQt::setViewModeMediaFeature(const QString& mode)
{
m_drt->webPage()->setProperty("_q_viewMode", mode);
}
-int TestRunner::webHistoryItemCount()
+int TestRunnerQt::webHistoryItemCount()
{
if (!m_webHistory)
return -1;
@@ -177,12 +172,12 @@ int TestRunner::webHistoryItemCount()
return m_webHistory->count() - 1;
}
-void TestRunner::keepWebHistory()
+void TestRunnerQt::keepWebHistory()
{
m_webHistory = m_drt->webPage()->history();
}
-void TestRunner::notifyDone()
+void TestRunnerQt::notifyDone()
{
qDebug() << ">>>>notifyDone";
@@ -206,60 +201,55 @@ void TestRunner::notifyDone()
m_waitForPolicy = false;
}
-int TestRunner::windowCount()
+int TestRunnerQt::windowCount()
{
return m_drt->windowCount();
}
-void TestRunner::grantWebNotificationPermission(const QString& origin)
+void TestRunnerQt::grantWebNotificationPermission(const QString& origin)
{
QWebFrame* frame = m_drt->webPage()->mainFrame();
m_drt->webPage()->setFeaturePermission(frame, QWebPage::Notifications, QWebPage::PermissionGrantedByUser);
- m_desktopNotificationAllowedOrigins.append(origin);
}
-void TestRunner::ignoreLegacyWebNotificationPermissionRequests()
+void TestRunnerQt::ignoreLegacyWebNotificationPermissionRequests()
{
m_ignoreDesktopNotification = true;
}
-void TestRunner::denyWebNotificationPermission(const QString& origin)
+void TestRunnerQt::denyWebNotificationPermission(const QString& origin)
{
- // FIXME: implement.
-}
-
-void TestRunner::removeAllWebNotificationPermissions()
-{
- // FIXME: implement.
+ QWebFrame* frame = m_drt->webPage()->mainFrame();
+ m_drt->webPage()->setFeaturePermission(frame, QWebPage::Notifications, QWebPage::PermissionDeniedByUser);
}
-void TestRunner::simulateWebNotificationClick(const QWebElement& notification)
+void TestRunnerQt::removeAllWebNotificationPermissions()
{
- // FIXME: implement.
+ DumpRenderTreeSupportQt::clearNotificationPermissions();
}
-void TestRunner::simulateLegacyWebNotificationClick(const QString& title)
+void TestRunnerQt::simulateLegacyWebNotificationClick(const QString& title)
{
DumpRenderTreeSupportQt::simulateDesktopNotificationClick(title);
}
-void TestRunner::display()
+void TestRunnerQt::display()
{
DumpRenderTreeSupportQt::setTrackRepaintRects(m_topLoadingFrame->handle(), true);
emit showPage();
}
-void TestRunner::displayInvalidatedRegion()
+void TestRunnerQt::displayInvalidatedRegion()
{
display();
}
-void TestRunner::clearBackForwardList()
+void TestRunnerQt::clearBackForwardList()
{
m_drt->webPage()->history()->clear();
}
-QString TestRunner::pathToLocalResource(const QString& url)
+QString TestRunnerQt::pathToLocalResource(const QString& url)
{
QString localTmpUrl(QLatin1String("file:///tmp/LayoutTests"));
@@ -276,123 +266,115 @@ QString TestRunner::pathToLocalResource(const QString& url)
return url;
}
-void TestRunner::dumpEditingCallbacks()
+void TestRunnerQt::dumpEditingCallbacks()
{
qDebug() << ">>>dumpEditingCallbacks";
DumpRenderTreeSupportQt::dumpEditingCallbacks(true);
}
-void TestRunner::dumpFrameLoadCallbacks()
+void TestRunnerQt::dumpFrameLoadCallbacks()
{
DumpRenderTreeSupportQt::dumpFrameLoader(true);
}
-void TestRunner::dumpProgressFinishedCallback()
+void TestRunnerQt::dumpProgressFinishedCallback()
{
DumpRenderTreeSupportQt::dumpProgressFinishedCallback(true);
}
-void TestRunner::dumpUserGestureInFrameLoadCallbacks()
+void TestRunnerQt::dumpUserGestureInFrameLoadCallbacks()
{
DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(true);
}
-void TestRunner::dumpResourceLoadCallbacks()
+void TestRunnerQt::dumpResourceLoadCallbacks()
{
DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(true);
}
-void TestRunner::dumpResourceResponseMIMETypes()
+void TestRunnerQt::dumpResourceResponseMIMETypes()
{
DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(true);
}
-void TestRunner::dumpWillCacheResponse()
+void TestRunnerQt::dumpWillCacheResponse()
{
DumpRenderTreeSupportQt::dumpWillCacheResponseCallbacks(true);
}
-void TestRunner::dumpHistoryCallbacks()
+void TestRunnerQt::dumpHistoryCallbacks()
{
DumpRenderTreeSupportQt::dumpHistoryCallbacks(true);
}
-void TestRunner::setWillSendRequestReturnsNullOnRedirect(bool enabled)
+void TestRunnerQt::setWillSendRequestReturnsNullOnRedirect(bool enabled)
{
DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(enabled);
}
-void TestRunner::setWillSendRequestReturnsNull(bool enabled)
+void TestRunnerQt::setWillSendRequestReturnsNull(bool enabled)
{
DumpRenderTreeSupportQt::setWillSendRequestReturnsNull(enabled);
}
-void TestRunner::setWillSendRequestClearHeader(const QStringList& headers)
+void TestRunnerQt::setWillSendRequestClearHeader(const QStringList& headers)
{
DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(headers);
}
-void TestRunner::setDeferMainResourceDataLoad(bool defer)
+void TestRunnerQt::setDeferMainResourceDataLoad(bool defer)
{
DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(defer);
}
-void TestRunner::queueBackNavigation(int howFarBackward)
+void TestRunnerQt::queueBackNavigation(int howFarBackward)
{
//qDebug() << ">>>queueBackNavigation" << howFarBackward;
for (int i = 0; i != howFarBackward; ++i)
- WorkQueue::shared()->queue(new BackItem(1, m_drt->webPage()));
+ WorkQueue::shared()->queue(new BackItem(1));
}
-void TestRunner::queueForwardNavigation(int howFarForward)
+void TestRunnerQt::queueForwardNavigation(int howFarForward)
{
//qDebug() << ">>>queueForwardNavigation" << howFarForward;
for (int i = 0; i != howFarForward; ++i)
- WorkQueue::shared()->queue(new ForwardItem(1, m_drt->webPage()));
+ WorkQueue::shared()->queue(new ForwardItem(1));
}
-void TestRunner::queueLoad(const QString& url, const QString& target)
-{
- //qDebug() << ">>>queueLoad" << url << target;
- QUrl mainResourceUrl = m_drt->webPage()->mainFrame()->url();
- QString absoluteUrl = mainResourceUrl.resolved(QUrl(url)).toEncoded();
- WorkQueue::shared()->queue(new LoadItem(absoluteUrl, target, m_drt->webPage()));
-}
-
-void TestRunner::queueLoadHTMLString(const QString& content, const QString& baseURL, const QString& failingURL)
+void TestRunnerQt::queueLoadHTMLString(const QString& content, const QString& baseURL, const QString& failingURL)
{
if (failingURL.isEmpty())
- WorkQueue::shared()->queue(new LoadHTMLStringItem(content, baseURL, m_drt->webPage()));
+ WorkQueue::shared()->queue(new LoadHTMLStringItem(JSStringCreateWithQString(content).get(), JSStringCreateWithQString(baseURL).get()));
else
- WorkQueue::shared()->queue(new LoadAlternateHTMLStringItem(content, baseURL, failingURL, m_drt->webPage()));
+ WorkQueue::shared()->queue(new LoadAlternateHTMLStringItem(JSStringCreateWithQString(content), JSStringCreateWithQString(baseURL), JSStringCreateWithQString(failingURL)));
}
-void TestRunner::queueReload()
+void TestRunnerQt::queueReload()
{
//qDebug() << ">>>queueReload";
- WorkQueue::shared()->queue(new ReloadItem(m_drt->webPage()));
+ WorkQueue::shared()->queue(new ReloadItem());
}
-void TestRunner::queueLoadingScript(const QString& script)
+void TestRunnerQt::queueLoadingScript(const QString& script)
{
//qDebug() << ">>>queueLoadingScript" << script;
- WorkQueue::shared()->queue(new LoadingScriptItem(script, m_drt->webPage()));
+ WorkQueue::shared()->queue(new LoadingScriptItem(JSStringCreateWithQString(script).get()));
}
-void TestRunner::queueNonLoadingScript(const QString& script)
+void TestRunnerQt::queueNonLoadingScript(const QString& script)
{
//qDebug() << ">>>queueNonLoadingScript" << script;
- WorkQueue::shared()->queue(new NonLoadingScriptItem(script, m_drt->webPage()));
+ WorkQueue::shared()->queue(new NonLoadingScriptItem(JSStringCreateWithQString(script).get()));
}
-void TestRunner::provisionalLoad()
+void TestRunnerQt::provisionalLoad()
{
QWebFrame* frame = qobject_cast<QWebFrame*>(sender());
if (!m_topLoadingFrame && !m_hasDumped)
m_topLoadingFrame = frame;
}
-void TestRunner::timerEvent(QTimerEvent *ev)
+void TestRunnerQt::timerEvent(QTimerEvent *ev)
{
if (ev->timerId() == m_timeoutTimer.timerId()) {
const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
@@ -403,134 +385,99 @@ void TestRunner::timerEvent(QTimerEvent *ev)
QObject::timerEvent(ev);
}
-QString TestRunner::encodeHostName(const QString& host)
+QString TestRunnerQt::encodeHostName(const QString& host)
{
QString encoded = QString::fromLatin1(QUrl::toAce(host + QLatin1String(".no")));
encoded.truncate(encoded.length() - 3); // strip .no
return encoded;
}
-QString TestRunner::decodeHostName(const QString& host)
+QString TestRunnerQt::decodeHostName(const QString& host)
{
QString decoded = QUrl::fromAce(host.toLatin1() + QByteArray(".no"));
decoded.truncate(decoded.length() - 3);
return decoded;
}
-void TestRunner::closeWebInspector()
+void TestRunnerQt::closeWebInspector()
{
DumpRenderTreeSupportQt::webInspectorClose(m_drt->pageAdapter());
m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, false);
}
-void TestRunner::setDeveloperExtrasEnabled(bool enabled)
+void TestRunnerQt::setDeveloperExtrasEnabled(bool enabled)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, enabled);
}
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::showWebInspector()
+void TestRunnerQt::showWebInspector()
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, true);
DumpRenderTreeSupportQt::webInspectorShow(m_drt->pageAdapter());
}
-void TestRunner::evaluateInWebInspector(long callId, const QString& script)
+void TestRunnerQt::evaluateInWebInspector(long callId, const QString& script)
{
DumpRenderTreeSupportQt::webInspectorExecuteScript(m_drt->pageAdapter(), callId, script);
}
-void TestRunner::setFrameFlatteningEnabled(bool enabled)
-{
- DumpRenderTreeSupportQt::setFrameFlatteningEnabled(m_drt->pageAdapter(), enabled);
-}
-
-void TestRunner::goBack()
-{
- DumpRenderTreeSupportQt::goBack(m_drt->pageAdapter());
-}
-
-void TestRunner::setDefersLoading(bool flag)
-{
- DumpRenderTreeSupportQt::setDefersLoading(m_drt->pageAdapter(), flag);
-}
-
-void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
+void TestRunnerQt::setAllowUniversalAccessFromFileURLs(bool enabled)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessRemoteUrls, enabled);
}
-void TestRunner::setAllowFileAccessFromFileURLs(bool enabled)
+void TestRunnerQt::setAllowFileAccessFromFileURLs(bool enabled)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::LocalContentCanAccessFileUrls, enabled);
}
-void TestRunner::setAppCacheMaximumSize(unsigned long long quota)
+void TestRunnerQt::setAppCacheMaximumSize(unsigned long long quota)
{
m_drt->webPage()->settings()->setOfflineWebApplicationCacheQuota(quota);
}
-void TestRunner::setAutofilled(const QWebElement& element, bool isAutofilled)
-{
- return DumpRenderTreeSupportQt::setAutofilled(element, isAutofilled);
-}
-
-void TestRunner::setValueForUser(const QWebElement& element, const QString& value)
+void TestRunnerQt::setValueForUser(const QWebElement& element, const QString& value)
{
DumpRenderTreeSupportQt::setValueForUser(element, value);
}
-void TestRunner::setFixedContentsSize(int width, int height)
+void TestRunnerQt::setFixedContentsSize(int width, int height)
{
m_topLoadingFrame->page()->setPreferredContentsSize(QSize(width, height));
}
-void TestRunner::setPrivateBrowsingEnabled(bool enable)
+void TestRunnerQt::setPrivateBrowsingEnabled(bool enable)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::PrivateBrowsingEnabled, enable);
}
-void TestRunner::setSpatialNavigationEnabled(bool enable)
+void TestRunnerQt::setSpatialNavigationEnabled(bool enable)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::SpatialNavigationEnabled, enable);
}
-void TestRunner::setPopupBlockingEnabled(bool enable)
+void TestRunnerQt::setPopupBlockingEnabled(bool enable)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows, !enable);
}
-void TestRunner::setPluginsEnabled(bool flag)
-{
- // FIXME: Implement
-}
-
-void TestRunner::setPOSIXLocale(const QString& locale)
+void TestRunnerQt::setPOSIXLocale(const QString& locale)
{
QLocale qlocale(locale);
QLocale::setDefault(qlocale);
}
-void TestRunner::setWindowIsKey(bool isKey)
+void TestRunnerQt::setWindowIsKey(bool isKey)
{
m_drt->switchFocus(isKey);
}
-void TestRunner::setMainFrameIsFirstResponder(bool isFirst)
-{
- //FIXME: only need this for the moment: https://bugs.webkit.org/show_bug.cgi?id=32990
-}
-
-void TestRunner::setJavaScriptCanAccessClipboard(bool enable)
+void TestRunnerQt::setJavaScriptCanAccessClipboard(bool enable)
{
m_drt->webPage()->settings()->setAttribute(QWebSettings::JavascriptCanAccessClipboard, enable);
}
-void TestRunner::setXSSAuditorEnabled(bool enable)
+void TestRunnerQt::setXSSAuditorEnabled(bool enable)
{
// Set XSSAuditingEnabled globally so that windows created by the test inherit it too.
// resetSettings() will call this to reset the page and global setting to false again.
@@ -540,121 +487,59 @@ void TestRunner::setXSSAuditorEnabled(bool enable)
m_drt->webPage()->settings()->setAttribute(QWebSettings::XSSAuditingEnabled, enable);
}
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(const QString& animationName,
- double time,
- const QString& elementId)
-{
- QWebFrame* frame = m_drt->webPage()->mainFrame();
- Q_ASSERT(frame);
- return DumpRenderTreeSupportQt::pauseAnimation(frame->handle(), animationName, time, elementId);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(const QString& propertyName,
- double time,
- const QString& elementId)
-{
- QWebFrame* frame = m_drt->webPage()->mainFrame();
- Q_ASSERT(frame);
- return DumpRenderTreeSupportQt::pauseTransitionOfProperty(frame->handle(), propertyName, time, elementId);
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- QWebFrame* frame = m_drt->webPage()->mainFrame();
- Q_ASSERT(frame);
- return DumpRenderTreeSupportQt::numberOfActiveAnimations(frame->handle());
-}
-
-void TestRunner::disableImageLoading()
-{
- m_drt->webPage()->settings()->setAttribute(QWebSettings::AutoLoadImages, false);
-}
-
-void TestRunner::dispatchPendingLoadRequests()
-{
- // FIXME: Implement for testing fix for 6727495
-}
-
-void TestRunner::clearAllApplicationCaches()
+void TestRunnerQt::clearAllApplicationCaches()
{
DumpRenderTreeSupportQt::clearAllApplicationCaches();
}
-void TestRunner::clearApplicationCacheForOrigin(const QString& url)
-{
- // FIXME: Implement to support deleting all application caches for an origin.
-}
-
-long long TestRunner::localStorageDiskUsageForOrigin(const QString& originIdentifier)
-{
- // FIXME: Implement to support getting disk usage in bytes for an origin.
- return 0;
-}
-
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
+void TestRunnerQt::setApplicationCacheOriginQuota(unsigned long long quota)
{
if (!m_topLoadingFrame)
return;
m_topLoadingFrame->securityOrigin().setApplicationCacheQuota(quota);
}
-long long TestRunner::applicationCacheDiskUsageForOrigin(const QString& origin)
-{
- // FIXME: Implement to support getting disk usage by all application caches for an origin.
- return 0;
-}
-
-QStringList TestRunner::originsWithApplicationCache()
+QStringList TestRunnerQt::originsWithApplicationCache()
{
// FIXME: Implement to get origins that have application caches.
return QStringList();
}
-void TestRunner::setCacheModel(int model)
-{
- // qwebsetting doesn't have matched setting yet :
- // WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER
- // WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER
- // WEBKIT_CACHE_MODEL_WEB_BROWSER
-
- // FIXME: Implement.
-}
-
-void TestRunner::setDatabaseQuota(int size)
+void TestRunnerQt::setDatabaseQuota(int size)
{
if (!m_topLoadingFrame)
return;
m_topLoadingFrame->securityOrigin().setDatabaseQuota(size);
}
-void TestRunner::clearAllDatabases()
+void TestRunnerQt::clearAllDatabases()
{
QWebDatabase::removeAllDatabases();
}
-void TestRunner::addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
+void TestRunnerQt::addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
{
DumpRenderTreeSupportQt::whiteListAccessFromOrigin(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains);
}
-void TestRunner::removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
+void TestRunnerQt::removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains)
{
DumpRenderTreeSupportQt::removeWhiteListAccessFromOrigin(sourceOrigin, destinationProtocol, destinationHost, allowDestinationSubdomains);
}
-void TestRunner::setCustomPolicyDelegate(bool enabled, bool permissive)
+void TestRunnerQt::setCustomPolicyDelegate(bool enabled, bool permissive)
{
DumpRenderTreeSupportQt::setCustomPolicyDelegate(enabled, permissive);
}
-void TestRunner::waitForPolicyDelegate()
+void TestRunnerQt::waitForPolicyDelegate()
{
setCustomPolicyDelegate(true);
m_waitForPolicy = true;
waitUntilDone();
}
-void TestRunner::overridePreference(const QString& name, const QVariant& value)
+void TestRunnerQt::overridePreference(const QString& name, const QVariant& value)
{
QWebSettings* settings = m_topLoadingFrame->page()->settings();
@@ -684,12 +569,14 @@ void TestRunner::overridePreference(const QString& name, const QVariant& value)
settings->setAttribute(QWebSettings::AcceleratedCompositingEnabled, value.toBool());
else if (name == "WebKitDisplayImagesKey")
settings->setAttribute(QWebSettings::AutoLoadImages, value.toBool());
+ else if (name == "WebKitWebAudioEnabled")
+ settings->setAttribute(QWebSettings::WebAudioEnabled, value.toBool());
else
printf("ERROR: TestRunner::overridePreference() does not support the '%s' preference\n",
name.toLatin1().data());
}
-void TestRunner::setUserStyleSheetLocation(const QString& url)
+void TestRunnerQt::setUserStyleSheetLocation(const QString& url)
{
QByteArray urlData = pathToLocalResource(url).toLatin1();
m_userStyleSheetLocation = QUrl::fromEncoded(urlData, QUrl::StrictMode);
@@ -698,17 +585,17 @@ void TestRunner::setUserStyleSheetLocation(const QString& url)
setUserStyleSheetEnabled(true);
}
-void TestRunner::setCaretBrowsingEnabled(bool value)
+void TestRunnerQt::setCaretBrowsingEnabled(bool value)
{
DumpRenderTreeSupportQt::setCaretBrowsingEnabled(m_drt->pageAdapter(), value);
}
-void TestRunner::setAuthorAndUserStylesEnabled(bool value)
+void TestRunnerQt::setAuthorAndUserStylesEnabled(bool value)
{
DumpRenderTreeSupportQt::setAuthorAndUserStylesEnabled(m_drt->pageAdapter(), value);
}
-void TestRunner::setUserStyleSheetEnabled(bool enabled)
+void TestRunnerQt::setUserStyleSheetEnabled(bool enabled)
{
m_userStyleSheetEnabled = enabled;
@@ -718,22 +605,17 @@ void TestRunner::setUserStyleSheetEnabled(bool enabled)
m_drt->webPage()->settings()->setUserStyleSheetUrl(QUrl());
}
-void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
+void TestRunnerQt::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
{
DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
}
-int TestRunner::workerThreadCount()
-{
- return DumpRenderTreeSupportQt::workerThreadCount();
-}
-
-bool TestRunner::callShouldCloseOnWebView()
+bool TestRunnerQt::callShouldCloseOnWebView()
{
return DumpRenderTreeSupportQt::shouldClose(m_drt->mainFrameAdapter());
}
-void TestRunner::setScrollbarPolicy(const QString& orientation, const QString& policy)
+void TestRunnerQt::setScrollbarPolicy(const QString& orientation, const QString& policy)
{
Qt::Orientation o;
Qt::ScrollBarPolicy p;
@@ -757,223 +639,569 @@ void TestRunner::setScrollbarPolicy(const QString& orientation, const QString& p
m_drt->webPage()->mainFrame()->setScrollBarPolicy(o, p);
}
-void TestRunner::setSmartInsertDeleteEnabled(bool enable)
+void TestRunnerQt::execCommand(const QString& name, const QString& value)
{
- DumpRenderTreeSupportQt::setSmartInsertDeleteEnabled(m_drt->pageAdapter(), enable);
+ DumpRenderTreeSupportQt::executeCoreCommandByName(m_drt->pageAdapter(), name, value);
}
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool enable)
+bool TestRunnerQt::isCommandEnabled(const QString& name) const
{
- DumpRenderTreeSupportQt::setSelectTrailingWhitespaceEnabled(m_drt->pageAdapter(), enable);
+ return DumpRenderTreeSupportQt::isCommandEnabled(m_drt->pageAdapter(), name);
}
-void TestRunner::execCommand(const QString& name, const QString& value)
+bool TestRunner::findString(JSContextRef context, JSStringRef string, JSObjectRef optionsArray)
+{
+ JSRetainPtr<JSStringRef> lengthPropertyName(Adopt, JSStringCreateWithUTF8CString("length"));
+ JSValueRef lengthValue = JSObjectGetProperty(context, optionsArray, lengthPropertyName.get(), 0);
+ if (!JSValueIsNumber(context, lengthValue))
+ return false;
+
+ QWebPage::FindFlags findFlags = QWebPage::FindCaseSensitively;
+
+ int length = static_cast<int>(JSValueToNumber(context, lengthValue, 0));
+ for (int i = 0; i < length; ++i) {
+ JSValueRef value = JSObjectGetPropertyAtIndex(context, optionsArray, i, 0);
+ if (!JSValueIsString(context, value))
+ continue;
+
+ JSRetainPtr<JSStringRef> optionName(Adopt, JSValueToStringCopy(context, value, 0));
+ if (JSStringIsEqualToUTF8CString(optionName.get(), "CaseInsensitive"))
+ findFlags &= ~QWebPage::FindCaseSensitively;
+ else if (JSStringIsEqualToUTF8CString(optionName.get(), "AtWordStarts"))
+ findFlags |= QWebPage::FindAtWordBeginningsOnly;
+ else if (JSStringIsEqualToUTF8CString(optionName.get(), "TreatMedialCapitalAsWordStart"))
+ findFlags |= QWebPage::TreatMedialCapitalAsWordBeginning;
+ else if (JSStringIsEqualToUTF8CString(optionName.get(), "Backwards"))
+ findFlags |= QWebPage::FindBackward;
+ else if (JSStringIsEqualToUTF8CString(optionName.get(), "WrapAround"))
+ findFlags |= QWebPage::FindWrapsAroundDocument;
+ else if (JSStringIsEqualToUTF8CString(optionName.get(), "StartInSelection"))
+ findFlags |= QWebPage::FindBeginsInSelection;
+ }
+
+ DumpRenderTree* drt = DumpRenderTree::instance();
+ return drt->webPage()->findText(JSStringCopyQString(string), findFlags);
+}
+
+void TestRunnerQt::setIconDatabaseEnabled(bool enable)
{
- DumpRenderTreeSupportQt::executeCoreCommandByName(m_drt->pageAdapter(), name, value);
+ if (enable && !m_drt->persistentStoragePath().isEmpty())
+ QWebSettings::setIconDatabasePath(m_drt->persistentStoragePath());
+ else
+ QWebSettings::setIconDatabasePath(QString());
}
-bool TestRunner::isCommandEnabled(const QString& name) const
+void TestRunnerQt::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
{
- return DumpRenderTreeSupportQt::isCommandEnabled(m_drt->pageAdapter(), name);
+ QList<WebPage*> pages = m_drt->getAllPages();
+ foreach (WebPage* page, pages)
+ DumpRenderTreeSupportQt::setMockDeviceOrientation(page->handle(), canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
}
-bool TestRunner::findString(const QString& string, const QStringList& optionArray)
+void TestRunnerQt::setGeolocationPermission(bool allow)
{
- return DumpRenderTreeSupportQt::findString(m_drt->pageAdapter(), string, optionArray);
+ setGeolocationPermissionCommon(allow);
+ QList<WebPage*> pages = m_drt->getAllPages();
+ foreach (WebPage* page, pages)
+ DumpRenderTreeSupportQt::setMockGeolocationPermission(page->handle(), allow);
}
-QString TestRunner::markerTextForListItem(const QWebElement& listItem)
+int TestRunnerQt::numberOfPendingGeolocationPermissionRequests()
{
- return DumpRenderTreeSupportQt::markerTextForListItem(listItem);
+ int pendingPermissionCount = 0;
+ QList<WebPage*> pages = m_drt->getAllPages();
+ foreach (WebPage* page, pages)
+ pendingPermissionCount += DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(page->handle());
+
+ return pendingPermissionCount;
}
-QVariantMap TestRunner::computedStyleIncludingVisitedInfo(const QWebElement& element) const
+void TestRunnerQt::setGeolocationPermissionCommon(bool allow)
{
- return DumpRenderTreeSupportQt::computedStyleIncludingVisitedInfo(element);
+ m_isGeolocationPermissionSet = true;
+ m_geolocationPermission = allow;
}
-bool TestRunner::elementDoesAutoCompleteForElementWithId(const QString& elementId)
+void TestRunnerQt::setMockGeolocationPositionUnavailableError(const QString& message)
{
- return DumpRenderTreeSupportQt::elementDoesAutoCompleteForElementWithId(m_drt->mainFrameAdapter(), elementId);
+ QList<WebPage*> pages = m_drt->getAllPages();
+ foreach (WebPage* page, pages)
+ DumpRenderTreeSupportQt::setMockGeolocationPositionUnavailableError(page->handle(), message);
}
-void TestRunner::authenticateSession(const QString&, const QString&, const QString&)
+void TestRunnerQt::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
{
- // FIXME: If there is a concept per-session (per-process) credential storage, the credentials should be added to it for later use.
+ QList<WebPage*> pages = m_drt->getAllPages();
+ foreach (WebPage* page, pages)
+ DumpRenderTreeSupportQt::setMockGeolocationPosition(page->handle(), latitude, longitude, accuracy);
}
-void TestRunner::setIconDatabaseEnabled(bool enable)
+void TestRunnerQt::removeAllVisitedLinks()
{
- if (enable && !m_drt->persistentStoragePath().isEmpty())
- QWebSettings::setIconDatabasePath(m_drt->persistentStoragePath());
+ QWebHistory* history = m_drt->webPage()->history();
+ history->clear();
+ DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(true);
+}
+
+void TestRunnerQt::addURLToRedirect(const QString& origin, const QString& destination)
+{
+ DumpRenderTreeSupportQt::addURLToRedirect(origin, destination);
+}
+
+void TestRunnerQt::setAlwaysAcceptCookies(bool accept)
+{
+ QWebSettings* globalSettings = QWebSettings::globalSettings();
+ if (accept)
+ globalSettings->setThirdPartyCookiePolicy(QWebSettings::AlwaysAllowThirdPartyCookies);
+ else {
+ // This matches the Safari third-party cookie blocking policy tested in third-party-cookie-relaxing.html
+ globalSettings->setThirdPartyCookiePolicy(QWebSettings::AllowThirdPartyWithExistingCookies);
+ }
+}
+
+void TestRunnerQt::setAlwaysBlockCookies(bool block)
+{
+ QWebSettings* globalSettings = QWebSettings::globalSettings();
+ if (block)
+ globalSettings->setThirdPartyCookiePolicy(QWebSettings::AlwaysBlockThirdPartyCookies);
else
- QWebSettings::setIconDatabasePath(QString());
+ globalSettings->setThirdPartyCookiePolicy(QWebSettings::AlwaysAllowThirdPartyCookies);
}
-void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+void TestRunnerQt::setAudioResult(const QByteArray& audioData)
{
- QList<WebCore::WebPage*> pages = m_drt->getAllPages();
- foreach (WebCore::WebPage* page, pages)
- DumpRenderTreeSupportQt::setMockDeviceOrientation(page->handle(), canProvideAlpha, alpha, canProvideBeta, beta, canProvideGamma, gamma);
+ m_audioData = audioData;
+ m_audioDump = true;
}
-void TestRunner::setGeolocationPermission(bool allow)
+// --- JSC C API stubs
+
+void TestRunner::addDisallowedURL(JSStringRef url)
{
- setGeolocationPermissionCommon(allow);
- QList<WebCore::WebPage*> pages = m_drt->getAllPages();
- foreach (WebCore::WebPage* page, pages)
- DumpRenderTreeSupportQt::setMockGeolocationPermission(page->handle(), allow);
}
-int TestRunner::numberOfPendingGeolocationPermissionRequests()
+void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
{
- int pendingPermissionCount = 0;
- QList<WebCore::WebPage*> pages = m_drt->getAllPages();
- foreach (WebCore::WebPage* page, pages)
- pendingPermissionCount += DumpRenderTreeSupportQt::numberOfPendingGeolocationPermissionRequests(page->handle());
+ DumpRenderTree* drt = DumpRenderTree::instance();
+ QUrl mainResourceUrl = drt->webPage()->mainFrame()->url();
+ QString absoluteUrl = mainResourceUrl.resolved(QUrl(JSStringCopyQString(url))).toEncoded();
+ WorkQueue::shared()->queue(new LoadItem(JSStringCreateWithQString(absoluteUrl).get(), target));
+}
- return pendingPermissionCount;
+void TestRunner::removeAllVisitedLinks()
+{
}
-void TestRunner::setGeolocationPermissionCommon(bool allow)
+void TestRunner::setAcceptsEditing(bool)
{
- m_isGeolocationPermissionSet = true;
- m_geolocationPermission = allow;
}
-void TestRunner::setMockGeolocationPositionUnavailableError(const QString& message)
+void TestRunner::simulateLegacyWebNotificationClick(JSStringRef title)
{
- QList<WebCore::WebPage*> pages = m_drt->getAllPages();
- foreach (WebCore::WebPage* page, pages)
- DumpRenderTreeSupportQt::setMockGeolocationPositionUnavailableError(page->handle(), message);
}
-void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
+void TestRunner::setWindowIsKey(bool)
{
- QList<WebCore::WebPage*> pages = m_drt->getAllPages();
- foreach (WebCore::WebPage* page, pages)
- DumpRenderTreeSupportQt::setMockGeolocationPosition(page->handle(), latitude, longitude, accuracy);
}
-void TestRunner::addMockSpeechInputResult(const QString& result, double confidence, const QString& language)
+void TestRunner::setAlwaysAcceptCookies(bool)
{
- // FIXME: Implement for speech input layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=39485.
}
-void TestRunner::setMockSpeechInputDumpRect(bool flag)
+void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
{
- // FIXME: Implement for speech input layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=39485.
}
-void TestRunner::startSpeechInput(const QString& inputElement)
+void TestRunner::setWebViewEditable(bool)
{
- // FIXME: Implement for speech input layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=39485.
}
-void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(int worldID, const QString& script)
+void TestRunner::clearAllApplicationCaches()
{
- // FIXME: Implement.
}
-void TestRunner::evaluateScriptInIsolatedWorld(int worldID, const QString& script)
+void TestRunner::setTextDirection(JSStringRef directionName)
{
- DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(m_drt->mainFrameAdapter(), worldID, script);
+ QWebPage* webPage = DumpRenderTree::instance()->webPage();
+ if (JSStringIsEqualToUTF8CString(directionName, "auto"))
+ webPage->triggerAction(QWebPage::SetTextDirectionDefault);
+ else if (JSStringIsEqualToUTF8CString(directionName, "rtl"))
+ webPage->triggerAction(QWebPage::SetTextDirectionRightToLeft);
+ else if (JSStringIsEqualToUTF8CString(directionName, "ltr"))
+ webPage->triggerAction(QWebPage::SetTextDirectionLeftToRight);
}
-void TestRunner::addUserStyleSheet(const QString& sourceCode)
+void TestRunner::notifyDone()
{
- DumpRenderTreeSupportQt::addUserStyleSheet(m_drt->pageAdapter(), sourceCode);
}
-void TestRunner::removeAllVisitedLinks()
+int TestRunner::numberOfPendingGeolocationPermissionRequests()
{
- QWebHistory* history = m_drt->webPage()->history();
- history->clear();
- DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(true);
+ return 0;
}
-void TestRunner::addURLToRedirect(const QString& origin, const QString& destination)
+void TestRunner::overridePreference(JSStringRef key, JSStringRef value)
+{
+}
+
+JSStringRef TestRunner::pathToLocalResource(JSContextRef, JSStringRef url)
+{
+ return JSStringCreateWithUTF8CString(0); // ### Take impl from WTR
+}
+
+void TestRunner::removeAllWebNotificationPermissions()
+{
+}
+
+void TestRunner::simulateWebNotificationClick(JSValueRef notification)
+{
+}
+
+void TestRunner::closeIdleLocalStorageDatabases()
+{
+}
+
+void TestRunner::focusWebView()
+{
+}
+
+void TestRunner::setBackingScaleFactor(double)
+{
+}
+
+void TestRunner::removeChromeInputField()
{
- DumpRenderTreeSupportQt::addURLToRedirect(origin, destination);
}
-void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
+void TestRunner::addChromeInputField()
{
- DumpRenderTreeSupportQt::setMinimumTimerInterval(m_drt->pageAdapter(), minimumTimerInterval);
}
-void TestRunner::originsWithLocalStorage()
+JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
{
- // FIXME: Implement.
+ return JSValueMakeNull(context);
}
void TestRunner::deleteAllLocalStorage()
{
- // FIXME: Implement.
}
-void TestRunner::deleteLocalStorageForOrigin(const QString& originIdentifier)
+void TestRunner::deleteLocalStorageForOrigin(JSStringRef originIdentifier)
{
- // FIXME: Implement.
}
void TestRunner::observeStorageTrackerNotifications(unsigned number)
{
- // FIXME: Implement.
}
void TestRunner::syncLocalStorage()
{
- // FIXME: Implement.
+}
+
+int TestRunner::windowCount()
+{
+ return 0;
+}
+
+void TestRunner::setWaitToDump(bool)
+{
+}
+
+void TestRunner::waitForPolicyDelegate()
+{
+}
+
+size_t TestRunner::webHistoryItemCount()
+{
+ return 0;
+}
+
+void TestRunner::showWebInspector()
+{
+}
+
+void TestRunner::closeWebInspector()
+{
+}
+
+void TestRunner::evaluateInWebInspector(long callId, JSStringRef script)
+{
+}
+
+void TestRunner::setSerializeHTTPLoads(bool)
+{
+}
+
+void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
+{
+}
+
+void TestRunner::setCustomPolicyDelegate(bool setDelegate, bool permissive)
+{
+}
+
+void TestRunner::setDatabaseQuota(unsigned long long quota)
+{
+}
+
+void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
}
void TestRunner::resetPageVisibility()
{
- // FIXME: Implement this.
+ DumpRenderTreeSupportQt::resetPageVisibility(DumpRenderTree::instance()->pageAdapter());
}
-void TestRunner::setPageVisibility(const char*)
+void TestRunner::setPageVisibility(const char* visibility)
{
- // FIXME: Implement this.
+ QLatin1String newVisibility = QLatin1String(visibility);
+ if (newVisibility == QStringLiteral("visible"))
+ DumpRenderTree::instance()->webPage()->setVisibilityState(QWebPage::VisibilityStateVisible);
+ else if (newVisibility == QStringLiteral("hidden"))
+ DumpRenderTree::instance()->webPage()->setVisibilityState(QWebPage::VisibilityStateHidden);
+ else if (newVisibility == QStringLiteral("prerender"))
+ DumpRenderTree::instance()->webPage()->setVisibilityState(QWebPage::VisibilityStatePrerender);
+ else if (newVisibility == QStringLiteral("unloaded"))
+ DumpRenderTree::instance()->webPage()->setVisibilityState(QWebPage::VisibilityStateUnloaded);
}
-void TestRunner::setAutomaticLinkDetectionEnabled(bool)
+void TestRunner::keepWebHistory()
{
- // FIXME: Implement this.
}
-void TestRunner::setTextDirection(const QString& directionName)
+void TestRunner::goBack()
{
- if (directionName == "auto")
- m_drt->webPage()->triggerAction(QWebPage::SetTextDirectionDefault);
- else if (directionName == "rtl")
- m_drt->webPage()->triggerAction(QWebPage::SetTextDirectionRightToLeft);
- else if (directionName == "ltr")
- m_drt->webPage()->triggerAction(QWebPage::SetTextDirectionLeftToRight);
+ DumpRenderTreeSupportQt::goBack(DumpRenderTree::instance()->pageAdapter());
}
-void TestRunner::setAlwaysAcceptCookies(bool accept)
+JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
{
- QWebSettings* globalSettings = QWebSettings::globalSettings();
- if (accept)
- globalSettings->setThirdPartyCookiePolicy(QWebSettings::AlwaysAllowThirdPartyCookies);
- else {
- // This matches the Safari third-party cookie blocking policy tested in third-party-cookie-relaxing.html
- globalSettings->setThirdPartyCookiePolicy(QWebSettings::AllowThirdPartyWithExistingCookies);
- }
+ return JSValueMakeNull(context);
}
-void TestRunner::setAlwaysBlockCookies(bool block)
+long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef name)
{
- QWebSettings* globalSettings = QWebSettings::globalSettings();
- if (block)
- globalSettings->setThirdPartyCookiePolicy(QWebSettings::AlwaysBlockThirdPartyCookies);
- else
- globalSettings->setThirdPartyCookiePolicy(QWebSettings::AlwaysAllowThirdPartyCookies);
+ return 0;
+}
+
+void TestRunner::display()
+{
+}
+
+void TestRunner::dispatchPendingLoadRequests()
+{
+}
+
+void TestRunner::clearPersistentUserStyleSheet()
+{
+}
+
+bool TestRunner::callShouldCloseOnWebView()
+{
+ return false;
+}
+
+JSStringRef TestRunner::copyDecodedHostName(JSStringRef name)
+{
+ return JSStringCreateWithUTF8CString(0);
+}
+
+void TestRunner::clearBackForwardList()
+{
+}
+
+void TestRunner::clearAllDatabases()
+{
+}
+
+void TestRunner::clearApplicationCacheForOrigin(JSStringRef name)
+{
+}
+
+void TestRunner::apiTestGoToCurrentBackForwardItem()
+{
+}
+
+void TestRunner::authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password)
+{
+}
+
+void TestRunner::abortModal()
+{
+}
+
+void TestRunner::setStorageDatabaseIdleInterval(double)
+{
+}
+
+void TestRunner::setXSSAuditorEnabled(bool flag)
+{
+}
+
+void TestRunner::setSpatialNavigationEnabled(bool)
+{
+}
+
+void TestRunner::setScrollbarPolicy(JSStringRef orientation, JSStringRef policy)
+{
+}
+
+void TestRunner::setJavaScriptCanAccessClipboard(bool flag)
+{
+}
+
+void TestRunner::setAutomaticLinkDetectionEnabled(bool flag)
+{
+}
+
+void TestRunner::setUserStyleSheetEnabled(bool flag)
+{
+}
+
+void TestRunner::setUserStyleSheetLocation(JSStringRef path)
+{
+}
+
+void TestRunner::setUseDashboardCompatibilityMode(bool flag)
+{
+}
+
+void TestRunner::setTabKeyCyclesThroughElements(bool)
+{
+}
+
+void TestRunner::setPrivateBrowsingEnabled(bool)
+{
+}
+
+void TestRunner::setPluginsEnabled(bool)
+{
+}
+
+void TestRunner::setPopupBlockingEnabled(bool)
+{
+}
+
+void TestRunner::setMockSpeechInputDumpRect(bool flag)
+{
+}
+
+void TestRunner::setPersistentUserStyleSheetLocation(JSStringRef path)
+{
+}
+
+void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
+{
+}
+
+void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef message)
+{
+}
+
+void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
+{
+}
+
+void TestRunner::setMainFrameIsFirstResponder(bool flag)
+{
+}
+
+void TestRunner::setIconDatabaseEnabled(bool)
+{
+}
+
+void TestRunner::setGeolocationPermission(bool allow)
+{
+}
+
+void TestRunner::setDefersLoading(bool flag)
+{
+ DumpRenderTreeSupportQt::setDefersLoading(DumpRenderTree::instance()->pageAdapter(), flag);
+}
+
+void TestRunner::setCacheModel(int)
+{
+}
+
+void TestRunner::setAuthorAndUserStylesEnabled(bool)
+{
+}
+
+void TestRunner::setAllowFileAccessFromFileURLs(bool)
+{
+}
+
+void TestRunner::setAppCacheMaximumSize(unsigned long long quota)
+{
+}
+
+void TestRunner::setAllowUniversalAccessFromFileURLs(bool)
+{
+}
+
+void TestRunner::setApplicationCacheOriginQuota(unsigned long long)
+{
+}
+
+void TestRunner::denyWebNotificationPermission(JSStringRef origin)
+{
+}
+
+void TestRunner::grantWebNotificationPermission(JSStringRef origin)
+{
+}
+
+void TestRunner::setValueForUser(JSContextRef, JSValueRef nodeObject, JSStringRef value)
+{
+}
+
+void TestRunner::setViewModeMediaFeature(JSStringRef)
+{
+}
+
+void TestRunner::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
+{
+}
+
+void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
+{
+}
+
+void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
+{
+}
+
+bool TestRunner::isCommandEnabled(JSStringRef name)
+{
+ return false;
+}
+
+void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
+{
+ DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld(DumpRenderTree::instance()->mainFrameAdapter(), worldID, JSStringCopyQString(script));
+}
+
+void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
+{
+}
+
+JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
+{
+ return JSStringCreateWithUTF8CString(0);
+}
+
+void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
+{
+ DumpRenderTreeSupportQt::addUserStyleSheet(DumpRenderTree::instance()->pageAdapter(), JSStringCopyQString(source));
+}
+
+void TestRunner::execCommand(JSStringRef name, JSStringRef value)
+{
+}
+
+long long TestRunner::localStorageDiskUsageForOrigin(JSStringRef originIdentifier)
+{
+ return 0;
}
-const unsigned TestRunner::maxViewWidth = 800;
-const unsigned TestRunner::maxViewHeight = 600;
diff --git a/Tools/DumpRenderTree/qt/TestRunnerQt.h b/Tools/DumpRenderTree/qt/TestRunnerQt.h
index a1c1a481f..42026e141 100644
--- a/Tools/DumpRenderTree/qt/TestRunnerQt.h
+++ b/Tools/DumpRenderTree/qt/TestRunnerQt.h
@@ -49,39 +49,24 @@
class QWebFrame;
class DumpRenderTreeSupportQt;
-namespace WebCore {
class DumpRenderTree;
-}
-class TestRunner : public QObject {
+class TestRunnerQt : public QObject {
Q_OBJECT
Q_PROPERTY(int webHistoryItemCount READ webHistoryItemCount)
- Q_PROPERTY(int workerThreadCount READ workerThreadCount)
Q_PROPERTY(bool globalFlag READ globalFlag WRITE setGlobalFlag)
public:
- TestRunner(WebCore::DumpRenderTree*);
+ TestRunnerQt(DumpRenderTree*);
- bool shouldDisallowIncreaseForApplicationCacheQuota() const { return m_disallowIncreaseForApplicationCacheQuota; }
- bool shouldDumpAsText() const { return m_textDump; }
- bool shouldDumpPixels() const { return m_shouldDumpPixels; }
- bool shouldDumpBackForwardList() const { return m_dumpBackForwardList; }
- bool shouldDumpChildrenAsText() const { return m_dumpChildrenAsText; }
- bool shouldDumpChildFrameScrollPositions() const { return m_dumpChildFrameScrollPositions; }
- bool shouldDumpDatabaseCallbacks() const { return m_dumpDatabaseCallbacks; }
- bool shouldDumpApplicationCacheDelegateCallbacks() const { return m_dumpApplicationCacheDelegateCallbacks; }
- bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
+ bool shouldDumpAsAudio() const { return m_audioDump; }
bool shouldWaitUntilDone() const { return m_waitForDone; }
bool shouldHandleErrorPages() const { return m_handleErrorPages; }
- bool canOpenWindows() const { return m_canOpenWindows; }
- bool shouldDumpTitleChanges() const { return m_dumpTitleChanges; }
bool waitForPolicy() const { return m_waitForPolicy; }
bool ignoreReqestForPermission() const { return m_ignoreDesktopNotification; }
- bool isPrinting() { return m_isPrinting; }
- void reset();
+ const QByteArray& audioData() const { return m_audioData; }
- static const unsigned int maxViewWidth;
- static const unsigned int maxViewHeight;
+ void reset();
void setTimeout(int timeout) { m_timeout = timeout; }
void setShouldTimeout(bool flag) { m_shouldTimeout = flag; }
@@ -98,20 +83,11 @@ Q_SIGNALS:
public Q_SLOTS:
void maybeDump(bool ok);
- void disallowIncreaseForApplicationCacheQuota() { m_disallowIncreaseForApplicationCacheQuota = true; }
- void dumpAsText(bool shouldDumpPixels = false);
- void dumpChildFramesAsText() { m_dumpChildrenAsText = true; }
- void dumpChildFrameScrollPositions() { m_dumpChildFrameScrollPositions = true; }
- void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; }
- void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; }
- void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
- void setCanOpenWindows() { m_canOpenWindows = true; }
- void setPrinting() { m_isPrinting = true; }
+ void dumpNotifications();
void waitUntilDone();
int webHistoryItemCount();
void keepWebHistory();
void notifyDone();
- void dumpBackForwardList() { m_dumpBackForwardList = true; }
bool globalFlag() const { return m_globalFlag; }
void setGlobalFlag(bool flag) { m_globalFlag = flag; }
void handleErrorPages() { m_handleErrorPages = true; }
@@ -128,79 +104,55 @@ public Q_SLOTS:
void setWillSendRequestClearHeader(const QStringList& headers);
void queueBackNavigation(int howFarBackward);
void queueForwardNavigation(int howFarForward);
- void queueLoad(const QString& url, const QString& target = QString());
void queueLoadHTMLString(const QString& content, const QString& baseURL = QString(), const QString& failingURL = QString());
void queueReload();
void queueLoadingScript(const QString& script);
void queueNonLoadingScript(const QString& script);
void provisionalLoad();
- void setCloseRemainingWindowsWhenComplete(bool = false) { }
int windowCount();
void ignoreLegacyWebNotificationPermissionRequests();
void simulateLegacyWebNotificationClick(const QString& title);
void grantWebNotificationPermission(const QString& origin);
void denyWebNotificationPermission(const QString& origin);
void removeAllWebNotificationPermissions();
- void simulateWebNotificationClick(const QWebElement&);
void display();
void displayInvalidatedRegion();
void clearBackForwardList();
QString pathToLocalResource(const QString& url);
- void dumpTitleChanges() { m_dumpTitleChanges = true; }
QString encodeHostName(const QString& host);
QString decodeHostName(const QString& host);
void dumpSelectionRect() const { }
void setDeveloperExtrasEnabled(bool);
- void setAsynchronousSpellCheckingEnabled(bool);
void showWebInspector();
void closeWebInspector();
void evaluateInWebInspector(long callId, const QString& script);
void removeAllVisitedLinks();
- void setFrameFlatteningEnabled(bool);
void setAllowUniversalAccessFromFileURLs(bool enable);
void setAllowFileAccessFromFileURLs(bool enable);
void setAppCacheMaximumSize(unsigned long long quota);
- void setAutofilled(const QWebElement&, bool enable);
void setValueForUser(const QWebElement&, const QString& value);
void setFixedContentsSize(int width, int height);
void setPrivateBrowsingEnabled(bool);
void setSpatialNavigationEnabled(bool);
- void setPluginsEnabled(bool flag);
void setPopupBlockingEnabled(bool);
void setPOSIXLocale(const QString& locale);
void resetLoadFinished() { m_loadFinished = false; }
void setWindowIsKey(bool);
- void setMainFrameIsFirstResponder(bool);
void setDeferMainResourceDataLoad(bool);
void setJavaScriptCanAccessClipboard(bool enable);
void setXSSAuditorEnabled(bool);
void setCaretBrowsingEnabled(bool);
void setAuthorAndUserStylesEnabled(bool);
void setViewModeMediaFeature(const QString& mode);
- void setSmartInsertDeleteEnabled(bool);
- void setSelectTrailingWhitespaceEnabled(bool);
void execCommand(const QString& name, const QString& value = QString());
bool isCommandEnabled(const QString& name) const;
- bool findString(const QString&, const QStringList& optionArray);
-
- bool pauseAnimationAtTimeOnElementWithId(const QString& animationName, double time, const QString& elementId);
- bool pauseTransitionAtTimeOnElementWithId(const QString& propertyName, double time, const QString& elementId);
- bool elementDoesAutoCompleteForElementWithId(const QString& elementId);
-
- unsigned numberOfActiveAnimations() const;
void addOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
void removeOriginAccessWhitelistEntry(const QString& sourceOrigin, const QString& destinationProtocol, const QString& destinationHost, bool allowDestinationSubdomains);
- void dispatchPendingLoadRequests();
- void disableImageLoading();
-
void clearAllApplicationCaches();
- void clearApplicationCacheForOrigin(const QString& url);
void setApplicationCacheOriginQuota(unsigned long long);
QStringList originsWithApplicationCache();
- long long applicationCacheDiskUsageForOrigin(const QString&);
- void setCacheModel(int);
void setDatabaseQuota(int size);
void clearAllDatabases();
@@ -213,15 +165,7 @@ public Q_SLOTS:
void setUserStyleSheetLocation(const QString& url);
void setUserStyleSheetEnabled(bool);
void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
- int workerThreadCount();
bool callShouldCloseOnWebView();
- // For now, this is a no-op. This may change depending on outcome of
- // https://bugs.webkit.org/show_bug.cgi?id=33333
- void setCallCloseOnWebViews() { }
- // This is a no-op - it allows us to pass
- // plugins/get-url-that-the-resource-load-delegate-will-disallow.html
- // which is a Mac-specific test.
- void addDisallowedURL(const QString&) { }
void setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma);
@@ -232,18 +176,6 @@ public Q_SLOTS:
bool isGeolocationPermissionSet() const { return m_isGeolocationPermissionSet; }
bool geolocationPermission() const { return m_geolocationPermission; }
- void addMockSpeechInputResult(const QString& result, double confidence, const QString& language);
- void setMockSpeechInputDumpRect(bool flag);
- void startSpeechInput(const QString& inputElement);
-
- void setPageVisibility(const char*);
- void resetPageVisibility();
-
- void setAutomaticLinkDetectionEnabled(bool);
-
- // Empty stub method to keep parity with object model exposed by global TestRunner.
- void abortModal() { }
-
void addURLToRedirect(const QString& origin, const QString& destination);
/*
@@ -252,30 +184,11 @@ public Q_SLOTS:
*/
void setScrollbarPolicy(const QString& orientation, const QString& policy);
- QString markerTextForListItem(const QWebElement& listItem);
- QVariantMap computedStyleIncludingVisitedInfo(const QWebElement&) const;
-
- // Simulate a request an embedding application could make, populating per-session credential storage.
- void authenticateSession(const QString& url, const QString& username, const QString& password);
-
- void evaluateScriptInIsolatedWorldAndReturnValue(int worldID, const QString& script);
- void evaluateScriptInIsolatedWorld(int worldID, const QString& script);
- void addUserStyleSheet(const QString& sourceCode);
-
- void setMinimumTimerInterval(double);
-
- void originsWithLocalStorage();
- void deleteAllLocalStorage();
- void deleteLocalStorageForOrigin(const QString& originIdentifier);
- long long localStorageDiskUsageForOrigin(const QString& originIdentifier);
- void observeStorageTrackerNotifications(unsigned number);
- void syncLocalStorage();
- void setTextDirection(const QString& directionName);
- void goBack();
- void setDefersLoading(bool);
void setAlwaysAcceptCookies(bool);
void setAlwaysBlockCookies(bool);
+ void setAudioResult(const QByteArray&);
+
private Q_SLOTS:
void processWork();
@@ -284,35 +197,27 @@ private:
private:
bool m_hasDumped;
- bool m_textDump;
- bool m_shouldDumpPixels;
+ bool m_audioDump;
bool m_disallowIncreaseForApplicationCacheQuota;
- bool m_dumpBackForwardList;
- bool m_dumpChildrenAsText;
- bool m_dumpChildFrameScrollPositions;
bool m_canOpenWindows;
bool m_waitForDone;
- bool m_dumpTitleChanges;
- bool m_dumpDatabaseCallbacks;
- bool m_dumpApplicationCacheDelegateCallbacks;
- bool m_dumpStatusCallbacks;
bool m_waitForPolicy;
bool m_handleErrorPages;
bool m_loadFinished;
bool m_globalFlag;
bool m_userStyleSheetEnabled;
bool m_isGeolocationPermissionSet;
- bool m_isPrinting;
bool m_geolocationPermission;
QUrl m_userStyleSheetLocation;
QBasicTimer m_timeoutTimer;
QWebFrame* m_topLoadingFrame;
- WebCore::DumpRenderTree* m_drt;
+ DumpRenderTree* m_drt;
QWebHistory* m_webHistory;
- QStringList m_desktopNotificationAllowedOrigins;
bool m_ignoreDesktopNotification;
+ QByteArray m_audioData;
+
bool m_shouldTimeout;
int m_timeout;
};
diff --git a/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp b/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp
index 7cf9fcaf1..2423a3b48 100644
--- a/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp
+++ b/Tools/DumpRenderTree/qt/WorkQueueItemQt.cpp
@@ -28,7 +28,10 @@
*/
#include "config.h"
#include "WorkQueueItemQt.h"
+
+#include "DumpRenderTreeQt.h"
#include "DumpRenderTreeSupportQt.h"
+#include "JSStringRefQt.h"
QWebFrame* findFrameNamed(const QString& frameName, QWebFrame* frame)
{
@@ -45,75 +48,80 @@ QWebFrame* findFrameNamed(const QString& frameName, QWebFrame* frame)
bool LoadItem::invoke() const
{
//qDebug() << ">>>LoadItem::invoke";
- Q_ASSERT(m_webPage);
+ WebPage* webPage = DumpRenderTree::instance()->webPage();
+ Q_ASSERT(webPage);
QWebFrame* frame = 0;
- const QString t = target();
- if (t.isEmpty())
- frame = m_webPage->mainFrame();
+ if (JSStringGetLength(m_target.get()))
+ frame = findFrameNamed(JSStringCopyQString(m_target.get()), webPage->mainFrame());
else
- frame = findFrameNamed(t, m_webPage->mainFrame());
+ frame = webPage->mainFrame();
if (!frame)
return false;
- frame->load(url());
+ frame->load(QUrl(JSStringCopyQString(m_url.get())));
return true;
}
bool LoadHTMLStringItem::invoke() const
{
- Q_ASSERT(m_webPage);
+ WebPage* webPage = DumpRenderTree::instance()->webPage();
+ Q_ASSERT(webPage);
- QWebFrame* frame = m_webPage->mainFrame();
+ QWebFrame* frame = webPage->mainFrame();
if (!frame)
return false;
- frame->setHtml(m_content, QUrl(m_baseURL));
+ frame->setHtml(JSStringCopyQString(m_content.get()), QUrl(JSStringCopyQString(m_baseURL.get())));
return true;
}
bool LoadAlternateHTMLStringItem::invoke() const
{
- Q_ASSERT(m_webPage);
+ WebPage* webPage = DumpRenderTree::instance()->webPage();
+ Q_ASSERT(webPage);
- QWebFrame* frame = m_webPage->mainFrame();
+ QWebFrame* frame = webPage->mainFrame();
if (!frame)
return false;
- DumpRenderTreeSupportQt::setAlternateHtml(frame->handle(), m_content, QUrl(m_baseURL), QUrl(m_failingURL));
+ DumpRenderTreeSupportQt::setAlternateHtml(frame->handle(), JSStringCopyQString(m_content.get()), QUrl(JSStringCopyQString(m_baseURL.get())), QUrl(JSStringCopyQString(m_failingURL.get())));
return true;
}
bool ReloadItem::invoke() const
{
//qDebug() << ">>>ReloadItem::invoke";
- Q_ASSERT(m_webPage);
- m_webPage->triggerAction(QWebPage::Reload);
+ WebPage* webPage = DumpRenderTree::instance()->webPage();
+ Q_ASSERT(webPage);
+ webPage->triggerAction(QWebPage::Reload);
return true;
}
bool ScriptItem::invoke() const
{
//qDebug() << ">>>ScriptItem::invoke";
- Q_ASSERT(m_webPage);
- m_webPage->mainFrame()->evaluateJavaScript(script());
+ WebPage* webPage = DumpRenderTree::instance()->webPage();
+ Q_ASSERT(webPage);
+ webPage->mainFrame()->evaluateJavaScript(JSStringCopyQString(m_script.get()));
return true;
}
bool BackForwardItem::invoke() const
{
//qDebug() << ">>>BackForwardItem::invoke";
- Q_ASSERT(m_webPage);
+ WebPage* webPage = DumpRenderTree::instance()->webPage();
+ Q_ASSERT(webPage);
if (!m_howFar)
return false;
if (m_howFar > 0) {
for (int i = 0; i != m_howFar; ++i)
- m_webPage->triggerAction(QWebPage::Forward);
+ webPage->triggerAction(QWebPage::Forward);
} else {
for (int i = 0; i != m_howFar; --i)
- m_webPage->triggerAction(QWebPage::Back);
+ webPage->triggerAction(QWebPage::Back);
}
return true;
}
diff --git a/Tools/DumpRenderTree/qt/WorkQueueItemQt.h b/Tools/DumpRenderTree/qt/WorkQueueItemQt.h
index ac7d1b37a..f57abb0e2 100644
--- a/Tools/DumpRenderTree/qt/WorkQueueItemQt.h
+++ b/Tools/DumpRenderTree/qt/WorkQueueItemQt.h
@@ -30,61 +30,14 @@
#ifndef WorkQueueItemQt_h
#define WorkQueueItemQt_h
-#include <QPointer>
-#include <QString>
+#include "WorkQueueItem.h"
#include <qwebframe.h>
#include <qwebpage.h>
-class WorkQueueItem {
-public:
- WorkQueueItem(QWebPage *page) : m_webPage(page) {}
- virtual ~WorkQueueItem() { }
- virtual bool invoke() const = 0;
-
-protected:
- QPointer<QWebPage> m_webPage;
-};
-
-class LoadItem : public WorkQueueItem {
-public:
- LoadItem(const QString &url, const QString &target, QWebPage *page)
- : WorkQueueItem(page)
- , m_url(url)
- , m_target(target)
- {
- }
-
- QString url() const { return m_url; }
- QString target() const { return m_target; }
-
- virtual bool invoke() const;
-
-private:
- QString m_url;
- QString m_target;
-};
-
-class LoadHTMLStringItem : public WorkQueueItem {
-public:
- LoadHTMLStringItem(const QString& content, const QString &baseURL, QWebPage *page)
- : WorkQueueItem(page)
- , m_content(content)
- , m_baseURL(baseURL)
- {
- }
-
-private:
- virtual bool invoke() const;
-
- QString m_content;
- QString m_baseURL;
-};
-
class LoadAlternateHTMLStringItem : public WorkQueueItem {
public:
- LoadAlternateHTMLStringItem(const QString& content, const QString& baseURL, const QString &failingURL, QWebPage *page)
- : WorkQueueItem(page)
- , m_content(content)
+ LoadAlternateHTMLStringItem(const JSRetainPtr<JSStringRef>& content, const JSRetainPtr<JSStringRef>& baseURL, const JSRetainPtr<JSStringRef>& failingURL)
+ : m_content(content)
, m_baseURL(baseURL)
, m_failingURL(failingURL)
{
@@ -93,85 +46,9 @@ public:
private:
virtual bool invoke() const;
- QString m_content;
- QString m_baseURL;
- QString m_failingURL;
-};
-
-class ReloadItem : public WorkQueueItem {
-public:
- ReloadItem(QWebPage *page)
- : WorkQueueItem(page)
- {
- }
- virtual bool invoke() const;
-};
-
-class ScriptItem : public WorkQueueItem {
-public:
- ScriptItem(const QString &script, QWebPage *page)
- : WorkQueueItem(page)
- , m_script(script)
- {
- }
-
- QString script() const { return m_script; }
-
- virtual bool invoke() const;
-
-private:
- QString m_script;
-};
-
-class LoadingScriptItem : public ScriptItem {
-public:
- LoadingScriptItem(const QString& script, QWebPage* page)
- : ScriptItem(script, page)
- {
- }
-
- virtual bool invoke() const { return ScriptItem::invoke(); }
-};
-
-class NonLoadingScriptItem : public ScriptItem {
-public:
- NonLoadingScriptItem(const QString& script, QWebPage* page)
- : ScriptItem(script, page)
- {
- }
-
- virtual bool invoke() const { ScriptItem::invoke(); return false; }
-};
-
-
-class BackForwardItem : public WorkQueueItem {
-public:
- virtual bool invoke() const;
-
-protected:
- BackForwardItem(int howFar, QWebPage *page)
- : WorkQueueItem(page)
- , m_howFar(howFar)
- {
- }
-
- int m_howFar;
-};
-
-class BackItem : public BackForwardItem {
-public:
- BackItem(unsigned howFar, QWebPage *page)
- : BackForwardItem(-howFar, page)
- {
- }
-};
-
-class ForwardItem : public BackForwardItem {
-public:
- ForwardItem(unsigned howFar, QWebPage *page)
- : BackForwardItem(howFar, page)
- {
- }
+ JSRetainPtr<JSStringRef> m_content;
+ JSRetainPtr<JSStringRef> m_baseURL;
+ JSRetainPtr<JSStringRef> m_failingURL;
};
#endif // !defined(WorkQueueItemQt_h)
diff --git a/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp b/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp
index 995c5f115..d8c89b3c6 100644
--- a/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp
+++ b/Tools/DumpRenderTree/win/AccessibilityControllerWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008, 2009, 2010 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 2009, 2010, 2013 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,11 +31,15 @@
#include "FrameLoadDelegate.h"
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JSStringRef.h>
+#include <JavaScriptCore/JSStringRefBSTR.h>
+#include <WebCore/AccessibilityObjectWrapperWin.h>
#include <WebCore/COMPtr.h>
#include <WebKit/WebKit.h>
+#include <comutil.h>
#include <oleacc.h>
#include <string>
#include <wtf/Assertions.h>
+#include <wtf/text/AtomicString.h>
using namespace std;
@@ -67,9 +71,67 @@ AccessibilityUIElement AccessibilityController::elementAtPoint(int x, int y)
return 0;
}
+static COMPtr<IAccessibleComparable> comparableObject(const COMPtr<IServiceProvider>& serviceProvider)
+{
+ COMPtr<IAccessibleComparable> comparable;
+ serviceProvider->QueryService(SID_AccessibleComparable, __uuidof(IAccessibleComparable), reinterpret_cast<void**>(&comparable));
+ return comparable;
+}
+
+static COMPtr<IAccessible> findAccessibleObjectById(AccessibilityUIElement parentObject, BSTR idAttribute)
+{
+ COMPtr<IAccessible> parentIAccessible = parentObject.platformUIElement();
+
+ COMPtr<IServiceProvider> serviceProvider(Query, parentIAccessible);
+ if (!serviceProvider)
+ return 0;
+
+ COMPtr<IAccessibleComparable> comparable = comparableObject(serviceProvider);
+ if (!comparable)
+ return 0;
+
+ VARIANT value;
+ ::VariantInit(&value);
+
+ _bstr_t elementIdAttributeKey(L"AXDRTElementIdAttribute");
+ if (SUCCEEDED(comparable->get_attribute(elementIdAttributeKey, &value))) {
+ ASSERT(V_VT(&value) == VT_BSTR);
+ if (VARCMP_EQ == ::VarBstrCmp(value.bstrVal, idAttribute, LOCALE_USER_DEFAULT, 0)) {
+ ::VariantClear(&value);
+ return parentIAccessible;
+ }
+ }
+ ::VariantClear(&value);
+
+ long childCount = parentObject.childrenCount();
+ if (!childCount)
+ return 0;
+
+ COMPtr<IAccessible> result;
+ for (long i = 0; i < childCount; ++i) {
+ AccessibilityUIElement childAtIndex = parentObject.getChildAtIndex(i);
+
+ result = findAccessibleObjectById(childAtIndex, idAttribute);
+ if (result)
+ return result;
+ }
+
+ return 0;
+}
+
AccessibilityUIElement AccessibilityController::accessibleElementById(JSStringRef id)
{
- // FIXME: implement
+ AccessibilityUIElement rootAccessibilityUIElement = rootElement();
+
+ BSTR idAttribute = JSStringCopyBSTR(id);
+
+ COMPtr<IAccessible> result = findAccessibleObjectById(rootAccessibilityUIElement, idAttribute);
+
+ ::SysFreeString(idAttribute);
+
+ if (result)
+ return AccessibilityUIElement(result);
+
return 0;
}
@@ -280,13 +342,6 @@ static void CALLBACK notificationListenerProc(HWINEVENTHOOK, DWORD event, HWND h
VariantClear(&vChild);
}
-static COMPtr<IAccessibleComparable> comparableObject(const COMPtr<IServiceProvider>& serviceProvider)
-{
- COMPtr<IAccessibleComparable> comparable;
- serviceProvider->QueryService(SID_AccessibleComparable, __uuidof(IAccessibleComparable), reinterpret_cast<void**>(&comparable));
- return comparable;
-}
-
bool AccessibilityController::addNotificationListener(JSObjectRef functionCallback)
{
return false;
diff --git a/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp b/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
index 07c28ac7f..71d9f8b25 100644
--- a/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
+++ b/Tools/DumpRenderTree/win/AccessibilityUIElementWin.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Apple Inc. All Rights Reserved.
+ * Copyright (C) 2008, 2013 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,6 +30,8 @@
#include "DumpRenderTree.h"
#include "FrameLoadDelegate.h"
#include <JavaScriptCore/JSStringRef.h>
+#include <wtf/text/WTFString.h>
+#include <comutil.h>
#include <tchar.h>
#include <string>
@@ -81,6 +83,9 @@ void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&)
void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children)
{
+ if (!m_element)
+ return;
+
long childCount;
if (FAILED(m_element->get_accChildCount(&childCount)))
return;
@@ -90,6 +95,9 @@ void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& childre
void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned location, unsigned length)
{
+ if (!m_element)
+ return;
+
long childCount;
unsigned appendedCount = 0;
if (FAILED(m_element->get_accChildCount(&childCount)))
@@ -100,6 +108,9 @@ void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>
int AccessibilityUIElement::childrenCount()
{
+ if (!m_element)
+ return 0;
+
long childCount;
m_element->get_accChildCount(&childCount);
return childCount;
@@ -130,6 +141,9 @@ AccessibilityUIElement AccessibilityUIElement::linkedUIElementAtIndex(unsigned i
AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
{
+ if (!m_element)
+ return 0;
+
COMPtr<IDispatch> child;
VARIANT vChild;
::VariantInit(&vChild);
@@ -164,11 +178,46 @@ JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
AccessibilityUIElement AccessibilityUIElement::titleUIElement()
{
- return 0;
+ COMPtr<IAccessible> platformElement = platformUIElement();
+
+ COMPtr<IAccessibleComparable> comparable = comparableObject(platformElement.get());
+ if (!comparable)
+ return 0;
+
+ VARIANT value;
+ ::VariantInit(&value);
+
+ _bstr_t titleUIElementAttributeKey(L"AXTitleUIElementAttribute");
+ if (FAILED(comparable->get_attribute(titleUIElementAttributeKey, &value))) {
+ ::VariantClear(&value);
+ return 0;
+ }
+
+ if (V_VT(&value) == VT_EMPTY) {
+ ::VariantClear(&value);
+ return 0;
+ }
+
+ ASSERT(V_VT(&value) == VT_UNKNOWN);
+
+ if (V_VT(&value) != VT_UNKNOWN) {
+ ::VariantClear(&value);
+ return 0;
+ }
+
+ COMPtr<IAccessible> titleElement(Query, value.punkVal);
+ if (value.punkVal)
+ value.punkVal->Release();
+ ::VariantClear(&value);
+
+ return titleElement;
}
AccessibilityUIElement AccessibilityUIElement::parentElement()
{
+ if (!m_element)
+ return 0;
+
COMPtr<IDispatch> parent;
m_element->get_accParent(&parent);
@@ -201,6 +250,9 @@ static VARIANT& self()
JSStringRef AccessibilityUIElement::role()
{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
VARIANT vRole;
if (FAILED(m_element->get_accRole(self(), &vRole)))
return JSStringCreateWithCharacters(0, 0);
@@ -236,6 +288,9 @@ JSStringRef AccessibilityUIElement::roleDescription()
JSStringRef AccessibilityUIElement::title()
{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
BSTR titleBSTR;
if (FAILED(m_element->get_accName(self(), &titleBSTR)) || !titleBSTR)
return JSStringCreateWithCharacters(0, 0);
@@ -246,6 +301,9 @@ JSStringRef AccessibilityUIElement::title()
JSStringRef AccessibilityUIElement::description()
{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
BSTR descriptionBSTR;
if (FAILED(m_element->get_accDescription(self(), &descriptionBSTR)) || !descriptionBSTR)
return JSStringCreateWithCharacters(0, 0);
@@ -271,6 +329,9 @@ JSStringRef AccessibilityUIElement::helpText() const
double AccessibilityUIElement::x()
{
+ if (!m_element)
+ return 0;
+
long x, y, width, height;
if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
return 0;
@@ -279,6 +340,9 @@ double AccessibilityUIElement::x()
double AccessibilityUIElement::y()
{
+ if (!m_element)
+ return 0;
+
long x, y, width, height;
if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
return 0;
@@ -287,6 +351,9 @@ double AccessibilityUIElement::y()
double AccessibilityUIElement::width()
{
+ if (!m_element)
+ return 0;
+
long x, y, width, height;
if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
return 0;
@@ -295,6 +362,9 @@ double AccessibilityUIElement::width()
double AccessibilityUIElement::height()
{
+ if (!m_element)
+ return 0;
+
long x, y, width, height;
if (FAILED(m_element->accLocation(&x, &y, &width, &height, self())))
return 0;
@@ -363,6 +433,9 @@ bool AccessibilityUIElement::isExpanded() const
bool AccessibilityUIElement::isChecked() const
{
+ if (!m_element)
+ return false;
+
VARIANT vState;
if (FAILED(m_element->get_accState(self(), &vState)))
return false;
@@ -377,6 +450,9 @@ JSStringRef AccessibilityUIElement::orientation() const
double AccessibilityUIElement::intValue() const
{
+ if (!m_element)
+ return 0;
+
BSTR valueBSTR;
if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR)
return 0;
@@ -396,7 +472,27 @@ double AccessibilityUIElement::maxValue()
return 0;
}
-bool AccessibilityUIElement::isActionSupported(JSStringRef action)
+bool AccessibilityUIElement::isPressActionSupported()
+{
+ if (!m_element)
+ return 0;
+
+ BSTR valueBSTR;
+ if (FAILED(m_element->get_accDefaultAction(self(), &valueBSTR) || !valueBSTR))
+ return false;
+
+ if (!::SysStringLen(valueBSTR))
+ return false;
+
+ return true;
+}
+
+bool AccessibilityUIElement::isIncrementActionSupported()
+{
+ return false;
+}
+
+bool AccessibilityUIElement::isDecrementActionSupported()
{
return false;
}
@@ -488,7 +584,7 @@ bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned, unsigne
return false;
}
-AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText)
+AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly)
{
return 0;
}
@@ -545,13 +641,19 @@ void AccessibilityUIElement::decrement()
void AccessibilityUIElement::showMenu()
{
+ if (!m_element)
+ return;
+
ASSERT(hasPopup());
m_element->accDoDefaultAction(self());
}
void AccessibilityUIElement::press()
{
- // FIXME: implement
+ if (!m_element)
+ return;
+
+ m_element->accDoDefaultAction(self());
}
AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
@@ -586,6 +688,9 @@ AccessibilityUIElement AccessibilityUIElement::disclosedByRow()
JSStringRef AccessibilityUIElement::accessibilityValue() const
{
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
BSTR valueBSTR;
if (FAILED(m_element->get_accValue(self(), &valueBSTR)) || !valueBSTR)
return JSStringCreateWithCharacters(0, 0);
@@ -684,21 +789,33 @@ bool AccessibilityUIElement::hasPopup() const
void AccessibilityUIElement::takeFocus()
{
+ if (!m_element)
+ return;
+
m_element->accSelect(SELFLAG_TAKEFOCUS, self());
}
void AccessibilityUIElement::takeSelection()
{
+ if (!m_element)
+ return;
+
m_element->accSelect(SELFLAG_TAKESELECTION, self());
}
void AccessibilityUIElement::addSelection()
{
+ if (!m_element)
+ return;
+
m_element->accSelect(SELFLAG_ADDSELECTION, self());
}
void AccessibilityUIElement::removeSelection()
{
+ if (!m_element)
+ return;
+
m_element->accSelect(SELFLAG_REMOVESELECTION, self());
}
diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.cpp b/Tools/DumpRenderTree/win/DumpRenderTree.cpp
index 173f34574..46c528a6d 100644
--- a/Tools/DumpRenderTree/win/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -32,6 +32,7 @@
#include "EditingDelegate.h"
#include "FrameLoadDelegate.h"
#include "HistoryDelegate.h"
+#include "JavaScriptThreading.h"
#include "PixelDumpSupport.h"
#include "PolicyDelegate.h"
#include "ResourceLoadDelegate.h"
@@ -45,7 +46,6 @@
#include <fcntl.h>
#include <io.h>
#include <math.h>
-#include <pthread.h>
#include <shlwapi.h>
#include <stdio.h>
#include <string.h>
@@ -54,16 +54,13 @@
#include <wtf/Vector.h>
#include <windows.h>
#include <CoreFoundation/CoreFoundation.h>
-#include <JavaScriptCore/JavaScriptCore.h>
+#include <WebCore/FileSystem.h>
#include <WebKit/WebKit.h>
#include <WebKit/WebKitCOMAPI.h>
#if USE(CFNETWORK)
-#include <CFNetwork/CFURLCachePriv.h>
-#endif
-
-#if USE(CFNETWORK)
#include <CFNetwork/CFHTTPCookiesPriv.h>
+#include <CFNetwork/CFURLCachePriv.h>
#endif
using namespace std;
@@ -75,8 +72,13 @@ const LPWSTR TestPluginDir = L"TestNetscapePlugin";
#endif
static LPCWSTR fontsEnvironmentVariable = L"WEBKIT_TESTFONTS";
+static LPCWSTR dumpRenderTreeTemp = L"DUMPRENDERTREE_TEMP";
#define USE_MAC_FONTS
+static CFStringRef WebDatabaseDirectoryDefaultsKey = CFSTR("WebDatabaseDirectory");
+static CFStringRef WebKitLocalCacheDefaultsKey = CFSTR("WebKitLocalCache");
+static CFStringRef WebStorageDirectoryDefaultsKey = CFSTR("WebKitLocalStorageDatabasePathPreferenceKey");
+
const LPCWSTR kDumpRenderTreeClassName = L"DumpRenderTreeWindow";
static bool dumpTree = true;
@@ -136,14 +138,14 @@ bool setAlwaysAcceptCookies(bool alwaysAcceptCookies)
static RetainPtr<CFStringRef> substringFromIndex(CFStringRef string, CFIndex index)
{
- return RetainPtr<CFStringRef>(AdoptCF, CFStringCreateWithSubstring(kCFAllocatorDefault, string, CFRangeMake(index, CFStringGetLength(string) - index)));
+ return adoptCF(CFStringCreateWithSubstring(kCFAllocatorDefault, string, CFRangeMake(index, CFStringGetLength(string) - index)));
}
wstring urlSuitableForTestResult(const wstring& urlString)
{
- RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(urlString.c_str()), urlString.length() * sizeof(wstring::value_type), kCFStringEncodingUTF16, 0));
+ RetainPtr<CFURLRef> url = adoptCF(CFURLCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(urlString.c_str()), urlString.length() * sizeof(wstring::value_type), kCFStringEncodingUTF16, 0));
- RetainPtr<CFStringRef> scheme(AdoptCF, CFURLCopyScheme(url.get()));
+ RetainPtr<CFStringRef> scheme = adoptCF(CFURLCopyScheme(url.get()));
if (scheme && CFStringCompare(scheme.get(), CFSTR("file"), kCFCompareCaseInsensitive) != kCFCompareEqualTo)
return urlString;
@@ -161,11 +163,11 @@ wstring urlSuitableForTestResult(const wstring& urlString)
if (FAILED(request->URL(requestURLString.GetAddress())))
return urlString;
- RetainPtr<CFURLRef> requestURL(AdoptCF, CFURLCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(requestURLString.GetBSTR()), requestURLString.length() * sizeof(OLECHAR), kCFStringEncodingUTF16, 0));
- RetainPtr<CFURLRef> baseURL(AdoptCF, CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault, requestURL.get()));
+ RetainPtr<CFURLRef> requestURL = adoptCF(CFURLCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(requestURLString.GetBSTR()), requestURLString.length() * sizeof(OLECHAR), kCFStringEncodingUTF16, 0));
+ RetainPtr<CFURLRef> baseURL = adoptCF(CFURLCreateCopyDeletingLastPathComponent(kCFAllocatorDefault, requestURL.get()));
- RetainPtr<CFStringRef> basePath(AdoptCF, CFURLCopyPath(baseURL.get()));
- RetainPtr<CFStringRef> path(AdoptCF, CFURLCopyPath(url.get()));
+ RetainPtr<CFStringRef> basePath = adoptCF(CFURLCopyPath(baseURL.get()));
+ RetainPtr<CFStringRef> path = adoptCF(CFURLCopyPath(url.get()));
return cfStringRefToWString(substringFromIndex(path.get(), CFStringGetLength(basePath.get())).get());
}
@@ -175,8 +177,8 @@ wstring lastPathComponent(const wstring& urlString)
if (urlString.empty())
return urlString;
- RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(urlString.c_str()), urlString.length() * sizeof(wstring::value_type), kCFStringEncodingUTF16, 0));
- RetainPtr<CFStringRef> lastPathComponent(CFURLCopyLastPathComponent(url.get()));
+ RetainPtr<CFURLRef> url = adoptCF(CFURLCreateWithBytes(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(urlString.c_str()), urlString.length() * sizeof(wstring::value_type), kCFStringEncodingUTF16, 0));
+ RetainPtr<CFStringRef> lastPathComponent = adoptCF(CFURLCopyLastPathComponent(url.get()));
return cfStringRefToWString(lastPathComponent.get());
}
@@ -192,6 +194,22 @@ static string toUTF8(const wchar_t* wideString, size_t length)
return string(utf8Vector.data(), utf8Vector.size() - 1);
}
+#if USE(CF)
+static String libraryPathForDumpRenderTree()
+{
+ DWORD size = ::GetEnvironmentVariable(dumpRenderTreeTemp, 0, 0);
+ Vector<TCHAR> buffer(size);
+ if (::GetEnvironmentVariable(dumpRenderTreeTemp, buffer.data(), buffer.size())) {
+ wstring path = buffer.data();
+ if (!path.empty() && (path[path.length() - 1] != L'\\'))
+ path.append(L"\\");
+ return String (path.data(), path.length());
+ }
+
+ return WebCore::localUserSpecificStorageDirectory();
+}
+#endif
+
string toUTF8(BSTR bstr)
{
return toUTF8(bstr, SysStringLen(bstr));
@@ -528,7 +546,7 @@ static int compareHistoryItems(const void* item1, const void* item2)
static void dumpHistoryItem(IWebHistoryItem* item, int indent, bool current)
{
- assert(item);
+ ASSERT(item);
int start = 0;
if (current) {
@@ -645,17 +663,17 @@ static void dumpBackForwardList(IWebView* webView)
if (FAILED(bfList->itemAtIndex(i, &item)))
return;
// something is wrong if the item from the last test is in the forward part of the b/f list
- assert(item != prevTestBFItem);
+ ASSERT(item != prevTestBFItem);
COMPtr<IUnknown> itemUnknown;
item->QueryInterface(&itemUnknown);
itemsToPrint.append(itemUnknown);
}
-
+
COMPtr<IWebHistoryItem> currentItem;
if (FAILED(bfList->currentItem(&currentItem)))
return;
- assert(currentItem != prevTestBFItem);
+ ASSERT(currentItem != prevTestBFItem);
COMPtr<IUnknown> currentItemUnknown;
currentItem->QueryInterface(&currentItemUnknown);
itemsToPrint.append(currentItemUnknown);
@@ -843,6 +861,7 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
preferences->setTabsToLinks(FALSE);
preferences->setShouldPrintBackgrounds(TRUE);
preferences->setLoadsImagesAutomatically(TRUE);
+ preferences->setSeamlessIFramesEnabled(TRUE);
if (persistentUserStyleSheetLocation) {
Vector<wchar_t> urlCharacters(CFStringGetLength(persistentUserStyleSheetLocation.get()));
@@ -864,7 +883,6 @@ static void resetDefaultsToConsistentValues(IWebPreferences* preferences)
prefsPrivate->setShouldPaintNativeControls(FALSE); // FIXME - need to make DRT pass with Windows native controls <http://bugs.webkit.org/show_bug.cgi?id=25592>
prefsPrivate->setJavaScriptCanAccessClipboard(TRUE);
prefsPrivate->setXSSAuditorEnabled(FALSE);
- prefsPrivate->setFrameFlatteningEnabled(FALSE);
prefsPrivate->setOfflineWebApplicationCacheEnabled(TRUE);
prefsPrivate->setLoadsSiteIconsIgnoringImageLoadingPreference(FALSE);
}
@@ -899,18 +917,10 @@ static void resetWebViewToConsistentStateBeforeTesting()
WebCoreTestSupport::resetInternalsObject(context);
}
- COMPtr<IWebViewEditing> viewEditing;
- if (SUCCEEDED(webView->QueryInterface(&viewEditing)))
- viewEditing->setSmartInsertDeleteEnabled(TRUE);
-
COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
if (!webViewPrivate)
return;
- double minimumInterval = 0;
- if (SUCCEEDED(webViewPrivate->defaultMinimumTimerInterval(&minimumInterval)))
- webViewPrivate->setMinimumTimerInterval(minimumInterval);
-
HWND viewWindow;
if (SUCCEEDED(webViewPrivate->viewWindow(reinterpret_cast<OLE_HANDLE*>(&viewWindow))) && viewWindow)
SetFocus(viewWindow);
@@ -939,16 +949,85 @@ static void sizeWebViewForCurrentTest()
unsigned width;
unsigned height;
if (isSVGW3CTest) {
- width = 480;
- height = 360;
+ width = TestRunner::w3cSVGViewWidth;
+ height = TestRunner::w3cSVGViewHeight;
} else {
- width = TestRunner::maxViewWidth;
- height = TestRunner::maxViewHeight;
+ width = TestRunner::viewWidth;
+ height = TestRunner::viewHeight;
}
::SetWindowPos(webViewWindow, 0, 0, 0, width, height, SWP_NOMOVE);
}
+static String findFontFallback(const char* pathOrUrl)
+{
+ String pathToFontFallback = WebCore::directoryName(pathOrUrl);
+
+ wchar_t fullPath[_MAX_PATH];
+ if (!_wfullpath(fullPath, pathToFontFallback.charactersWithNullTermination().data(), _MAX_PATH))
+ return emptyString();
+
+ if (!::PathIsDirectoryW(fullPath))
+ return emptyString();
+
+ String pathToCheck = fullPath;
+
+ static const String layoutTests = "LayoutTests";
+
+ // Find the layout test root on the current path:
+ size_t location = pathToCheck.find(layoutTests);
+ if (WTF::notFound == location)
+ return emptyString();
+
+ String pathToTest = pathToCheck.substring(location + layoutTests.length() + 1);
+ String possiblePathToLogue = WebCore::pathByAppendingComponent(pathToCheck.substring(0, location + layoutTests.length() + 1), "platform\\win");
+
+ Vector<String> possiblePaths;
+ possiblePaths.append(WebCore::pathByAppendingComponent(possiblePathToLogue, pathToTest));
+
+ size_t nextCandidateEnd = pathToTest.reverseFind('\\');
+ while (nextCandidateEnd && nextCandidateEnd != WTF::notFound) {
+ pathToTest = pathToTest.substring(0, nextCandidateEnd);
+ possiblePaths.append(WebCore::pathByAppendingComponent(possiblePathToLogue, pathToTest));
+ nextCandidateEnd = pathToTest.reverseFind('\\');
+ }
+
+ for (Vector<String>::iterator pos = possiblePaths.begin(); pos != possiblePaths.end(); ++pos) {
+ pathToFontFallback = WebCore::pathByAppendingComponent(*pos, "resources\\");
+
+ if (::PathIsDirectoryW(pathToFontFallback.charactersWithNullTermination().data()))
+ return pathToFontFallback;
+ }
+
+ return emptyString();
+}
+
+static void addFontFallbackIfPresent(const String& fontFallbackPath)
+{
+ if (fontFallbackPath.isEmpty())
+ return;
+
+ String fontFallback = WebCore::pathByAppendingComponent(fontFallbackPath, "Mac-compatible-font-fallback.css");
+
+ if (!::PathFileExistsW(fontFallback.charactersWithNullTermination().data()))
+ return;
+
+ ::setPersistentUserStyleSheetLocation(fontFallback.createCFString().get());
+}
+
+static void removeFontFallbackIfPresent(const String& fontFallbackPath)
+{
+ if (fontFallbackPath.isEmpty())
+ return;
+
+ String fontFallback = WebCore::pathByAppendingComponent(fontFallbackPath, "Mac-compatible-font-fallback.css");
+
+ if (!::PathFileExistsW(fontFallback.charactersWithNullTermination().data()))
+ return;
+
+ ::setPersistentUserStyleSheetLocation(0);
+}
+
static void runTest(const string& inputLine)
{
TestCommand command = parseInputLine(inputLine);
@@ -967,6 +1046,8 @@ static void runTest(const string& inputLine)
CFRelease(str);
+ String fallbackPath = findFontFallback(pathOrURL.c_str());
+
str = CFURLGetString(url);
CFIndex length = CFStringGetLength(str);
@@ -982,6 +1063,8 @@ static void runTest(const string& inputLine)
done = false;
topLoadingFrame = 0;
+ addFontFallbackIfPresent(fallbackPath);
+
sizeWebViewForCurrentTest();
gTestRunner->setIconDatabaseEnabled(false);
@@ -1073,117 +1156,13 @@ static void runTest(const string& inputLine)
}
exit:
+ removeFontFallbackIfPresent(fallbackPath);
SysFreeString(urlBStr);
::gTestRunner.clear();
return;
}
-static Boolean pthreadEqualCallback(const void* value1, const void* value2)
-{
- return (Boolean)pthread_equal(*(pthread_t*)value1, *(pthread_t*)value2);
-}
-
-static CFDictionaryKeyCallBacks pthreadKeyCallbacks = { 0, 0, 0, 0, pthreadEqualCallback, 0 };
-
-static pthread_mutex_t javaScriptThreadsMutex = PTHREAD_MUTEX_INITIALIZER;
-static bool javaScriptThreadsShouldTerminate;
-
-static const int javaScriptThreadsCount = 4;
-static CFMutableDictionaryRef javaScriptThreads()
-{
- assert(pthread_mutex_trylock(&javaScriptThreadsMutex) == EBUSY);
- static CFMutableDictionaryRef staticJavaScriptThreads;
- if (!staticJavaScriptThreads)
- staticJavaScriptThreads = CFDictionaryCreateMutable(0, 0, &pthreadKeyCallbacks, 0);
- return staticJavaScriptThreads;
-}
-
-// Loops forever, running a script and randomly respawning, until
-// javaScriptThreadsShouldTerminate becomes true.
-void* runJavaScriptThread(void* arg)
-{
- const char* const script =
- " \
- var array = []; \
- for (var i = 0; i < 10; i++) { \
- array.push(String(i)); \
- } \
- ";
-
- while (true) {
- JSGlobalContextRef ctx = JSGlobalContextCreate(0);
- JSStringRef scriptRef = JSStringCreateWithUTF8CString(script);
-
- JSValueRef exception = 0;
- JSEvaluateScript(ctx, scriptRef, 0, 0, 1, &exception);
- assert(!exception);
-
- JSGlobalContextRelease(ctx);
- JSStringRelease(scriptRef);
-
- JSGarbageCollect(ctx);
-
- pthread_mutex_lock(&javaScriptThreadsMutex);
-
- // Check for cancellation.
- if (javaScriptThreadsShouldTerminate) {
- pthread_mutex_unlock(&javaScriptThreadsMutex);
- return 0;
- }
-
- // Respawn probabilistically.
- if (rand() % 5 == 0) {
- pthread_t pthread;
- pthread_create(&pthread, 0, &runJavaScriptThread, 0);
- pthread_detach(pthread);
-
- pthread_t self = pthread_self();
- CFDictionaryRemoveValue(javaScriptThreads(), self.p);
- CFDictionaryAddValue(javaScriptThreads(), pthread.p, 0);
-
- pthread_mutex_unlock(&javaScriptThreadsMutex);
- return 0;
- }
-
- pthread_mutex_unlock(&javaScriptThreadsMutex);
- }
-}
-
-static void startJavaScriptThreads(void)
-{
- pthread_mutex_lock(&javaScriptThreadsMutex);
-
- for (int i = 0; i < javaScriptThreadsCount; i++) {
- pthread_t pthread;
- pthread_create(&pthread, 0, &runJavaScriptThread, 0);
- pthread_detach(pthread);
- CFDictionaryAddValue(javaScriptThreads(), pthread.p, 0);
- }
-
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-}
-
-static void stopJavaScriptThreads(void)
-{
- pthread_mutex_lock(&javaScriptThreadsMutex);
-
- javaScriptThreadsShouldTerminate = true;
-
- pthread_t* pthreads[javaScriptThreadsCount] = {0};
- int threadDictCount = CFDictionaryGetCount(javaScriptThreads());
- assert(threadDictCount == javaScriptThreadsCount);
- CFDictionaryGetKeysAndValues(javaScriptThreads(), (const void**)pthreads, 0);
-
- pthread_mutex_unlock(&javaScriptThreadsMutex);
-
- for (int i = 0; i < javaScriptThreadsCount; i++) {
- pthread_t* pthread = pthreads[i];
- pthread_join(*pthread, 0);
- free(pthread);
- }
-}
-
Vector<HWND>& openWindows()
{
static Vector<HWND> vector;
@@ -1198,8 +1177,8 @@ WindowToWebViewMap& windowToWebViewMap()
IWebView* createWebViewAndOffscreenWindow(HWND* webViewWindow)
{
- unsigned maxViewWidth = TestRunner::maxViewWidth;
- unsigned maxViewHeight = TestRunner::maxViewHeight;
+ unsigned maxViewWidth = TestRunner::viewWidth;
+ unsigned maxViewHeight = TestRunner::viewHeight;
HWND hostWindow = CreateWindowEx(WS_EX_TOOLWINDOW, kDumpRenderTreeClassName, TEXT("DumpRenderTree"), WS_POPUP,
-maxViewWidth, -maxViewHeight, maxViewWidth, maxViewHeight, 0, 0, GetModuleHandle(0), 0);
@@ -1286,7 +1265,7 @@ RetainPtr<CFURLCacheRef> sharedCFURLCache()
typedef CFURLCacheRef (*CFURLCacheCopySharedURLCacheProcPtr)(void);
if (CFURLCacheCopySharedURLCacheProcPtr copyCache = reinterpret_cast<CFURLCacheCopySharedURLCacheProcPtr>(GetProcAddress(module, "CFURLCacheCopySharedURLCache")))
- return RetainPtr<CFURLCacheRef>(AdoptCF, copyCache());
+ return adoptCF(copyCache());
typedef CFURLCacheRef (*CFURLCacheSharedURLCacheProcPtr)(void);
if (CFURLCacheSharedURLCacheProcPtr sharedCache = reinterpret_cast<CFURLCacheSharedURLCacheProcPtr>(GetProcAddress(module, "CFURLCacheSharedURLCache")))
@@ -1370,6 +1349,7 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, cons
standardPreferences->setJavaScriptEnabled(TRUE);
standardPreferences->setDefaultFontSize(16);
standardPreferences->setAcceleratedCompositingEnabled(true);
+ standardPreferences->setAVFoundationEnabled(TRUE);
standardPreferences->setContinuousSpellCheckingEnabled(TRUE);
if (printSupportedFeatures) {
@@ -1389,6 +1369,14 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, cons
return 0;
}
+#if USE(CF)
+ // Set up these values before creating the WebView so that the various initializations will see these preferred values.
+ String path = libraryPathForDumpRenderTree();
+ CFPreferencesSetAppValue(WebDatabaseDirectoryDefaultsKey, WebCore::pathByAppendingComponent(path, "Databases").createCFString().get(), kCFPreferencesCurrentApplication);
+ CFPreferencesSetAppValue(WebStorageDirectoryDefaultsKey, WebCore::pathByAppendingComponent(path, "LocalStorage").createCFString().get(), kCFPreferencesCurrentApplication);
+ CFPreferencesSetAppValue(WebKitLocalCacheDefaultsKey, WebCore::pathByAppendingComponent(path, "LocalCache").createCFString().get(), kCFPreferencesCurrentApplication);
+#endif
+
COMPtr<IWebView> webView(AdoptCOM, createWebViewAndOffscreenWindow(&webViewWindow));
if (!webView)
return -1;
diff --git a/Tools/DumpRenderTree/win/DumpRenderTree.vcproj b/Tools/DumpRenderTree/win/DumpRenderTree.vcproj
deleted file mode 100644
index dc815e990..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTree.vcproj
+++ /dev/null
@@ -1,760 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTree"
- ProjectGUID="{6567DFD4-D6DE-4CD5-825D-17E353D160E1}"
- RootNamespace="DumpRenderTree"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\DumpRenderTreeDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\DumpRenderTreeRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\DumpRenderTreeDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\DumpRenderTreeReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\DumpRenderTreeDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\DumpRenderTreeProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Controllers"
- >
- <File
- RelativePath="..\AccessibilityController.cpp"
- >
- </File>
- <File
- RelativePath="..\AccessibilityController.h"
- >
- </File>
- <File
- RelativePath=".\AccessibilityControllerWin.cpp"
- >
- </File>
- <File
- RelativePath=".\DRTDataObject.cpp"
- >
- </File>
- <File
- RelativePath=".\DRTDataObject.h"
- >
- </File>
- <File
- RelativePath=".\DRTDropSource.cpp"
- >
- </File>
- <File
- RelativePath=".\DRTDropSource.h"
- >
- </File>
- <File
- RelativePath=".\EventSender.cpp"
- >
- </File>
- <File
- RelativePath=".\EventSender.h"
- >
- </File>
- <File
- RelativePath="..\GCController.cpp"
- >
- </File>
- <File
- RelativePath="..\GCController.h"
- >
- </File>
- <File
- RelativePath=".\GCControllerWin.cpp"
- >
- </File>
- <File
- RelativePath="..\TestRunner.cpp"
- >
- </File>
- <File
- RelativePath="..\TestRunner.h"
- >
- </File>
- <File
- RelativePath=".\TestRunnerWin.cpp"
- >
- </File>
- <File
- RelativePath=".\TextInputController.cpp"
- >
- </File>
- <File
- RelativePath=".\TextInputController.h"
- >
- </File>
- <File
- RelativePath=".\TextInputControllerWin.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Delegates"
- >
- <File
- RelativePath=".\DRTDesktopNotificationPresenter.cpp"
- >
- </File>
- <File
- RelativePath=".\DRTDesktopNotificationPresenter.h"
- >
- </File>
- <File
- RelativePath=".\EditingDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\EditingDelegate.h"
- >
- </File>
- <File
- RelativePath=".\FrameLoadDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\FrameLoadDelegate.h"
- >
- </File>
- <File
- RelativePath=".\HistoryDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\HistoryDelegate.h"
- >
- </File>
- <File
- RelativePath=".\PolicyDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\PolicyDelegate.h"
- >
- </File>
- <File
- RelativePath=".\ResourceLoadDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\ResourceLoadDelegate.h"
- >
- </File>
- <File
- RelativePath=".\UIDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\UIDelegate.h"
- >
- </File>
- </Filter>
- <File
- RelativePath="..\AccessibilityTextMarker.cpp"
- >
- </File>
- <File
- RelativePath="..\AccessibilityTextMarker.h"
- >
- </File>
- <File
- RelativePath="..\AccessibilityUIElement.cpp"
- >
- </File>
- <File
- RelativePath="..\AccessibilityUIElement.h"
- >
- </File>
- <File
- RelativePath=".\AccessibilityUIElementWin.cpp"
- >
- </File>
- <File
- RelativePath="..\CyclicRedundancyCheck.cpp"
- >
- </File>
- <File
- RelativePath="..\CyclicRedundancyCheck.h"
- >
- </File>
- <File
- RelativePath=".\DraggingInfo.h"
- >
- </File>
- <File
- RelativePath=".\DumpRenderTree.cpp"
- >
- </File>
- <File
- RelativePath="..\DumpRenderTree.h"
- >
- </File>
- <File
- RelativePath="..\DumpRenderTreeCommon.cpp"
- >
- </File>
- <File
- RelativePath="..\DumpRenderTreePrefix.h"
- >
- </File>
- <File
- RelativePath=".\DumpRenderTreeWin.h"
- >
- </File>
- <File
- RelativePath=".\MD5.cpp"
- >
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\MD5.h"
- >
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\PixelDumpSupport.cpp"
- >
- </File>
- <File
- RelativePath="..\PixelDumpSupport.h"
- >
- </File>
- <File
- RelativePath="..\cairo\PixelDumpSupportCairo.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Production|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\cairo\PixelDumpSupportCairo.h"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Production|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\cg\PixelDumpSupportCG.cpp"
- >
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\cg\PixelDumpSupportCG.h"
- >
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCustomBuildTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\PixelDumpSupportWin.cpp"
- >
- </File>
- <File
- RelativePath="..\WorkQueue.cpp"
- >
- </File>
- <File
- RelativePath="..\WorkQueue.h"
- >
- </File>
- <File
- RelativePath="..\WorkQueueItem.h"
- >
- </File>
- <File
- RelativePath=".\WorkQueueItemWin.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeApple.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeApple.vsprops
deleted file mode 100644
index a6db765d2..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeApple.vsprops
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeApple"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\cg&quot;;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib CFNetwork$(LibraryConfigSuffix).lib"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeCFLite.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeCFLite.vsprops
deleted file mode 100644
index 7e47f38b2..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeCFLite.vsprops
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeCFLite"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="CFLite$(LibraryConfigSuffix).lib"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeCairo.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeCairo.vsprops
deleted file mode 100644
index 6a6c284f8..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeCairo.vsprops
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeCairo"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\cairo&quot;;"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="cairo.lib"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops
deleted file mode 100644
index 3ecfef70d..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeCommon.vsprops
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ProjectDir)\.&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\private&quot;;&quot;$(ConfigurationBuildDir)\Include\DumpRenderTree\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\private\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCoreTestSupport&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include\private&quot;;&quot;$(WebKitLibrariesDir)\include\pthreads&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;"
- PreprocessorDefinitions="_CONSOLE"
- DisableSpecificWarnings="4146"
- ForcedIncludeFiles="DumpRenderTreePrefix.h"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib WebCoreTestSupport$(WebKitConfigSuffix).lib pthreadVC2$(LibraryConfigSuffix).lib gdi32.lib ole32.lib oleaut32.lib user32.lib shlwapi.lib oleacc.lib comsuppw.lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
- SubSystem="1"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops
deleted file mode 100644
index a5b3fb743..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeApple.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops
deleted file mode 100644
index e09177ceb..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeApple.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops
deleted file mode 100644
index b4db6ad14..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\cURL.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeCairo.vsprops;.\DumpRenderTreeCFLite.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncher.vcproj b/Tools/DumpRenderTree/win/DumpRenderTreeLauncher.vcproj
deleted file mode 100644
index f4d0c0f16..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncher.vcproj
+++ /dev/null
@@ -1,402 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncher"
- ProjectGUID="{2974EA02-840B-4995-8719-8920A61006F1}"
- RootNamespace="DumpRenderTreeLauncher"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\DumpRenderTreeLauncherDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/SAFESEH"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\DumpRenderTreeLauncherRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/SAFESEH"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\DumpRenderTreeLauncherDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/SAFESEH"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\DumpRenderTreeLauncherDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/SAFESEH"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\DumpRenderTreeLauncherProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/SAFESEH"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\DumpRenderTreeLauncherReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/SAFESEH"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\..\win\DLLLauncher\DLLLauncherMain.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherCommon.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherCommon.vsprops
deleted file mode 100644
index f1789164b..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherCommon.vsprops
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncherCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="USE_CONSOLE_ENTRY_POINT"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib"
- OutputFile="$(OutDir)\DumpRenderTree$(WebKitConfigSuffix).exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName)Launcher.pdb"
- SubSystem="1"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebug.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebug.vsprops
deleted file mode 100644
index 4ea157893..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncherDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\DumpRenderTreeLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugAll.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugAll.vsprops
deleted file mode 100644
index 4605d79d2..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncherDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\DumpRenderTreeLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugCairoCFLite.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugCairoCFLite.vsprops
deleted file mode 100644
index 0e8487f0e..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\DumpRenderTreeLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherProduction.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherProduction.vsprops
deleted file mode 100644
index 7dd6266a8..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncherProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\DumpRenderTreeLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherRelease.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherRelease.vsprops
deleted file mode 100644
index 6e2c85c56..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncherRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\DumpRenderTreeLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeLauncherReleaseCairoCFLite.vsprops
deleted file mode 100644
index 615fd560c..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeLauncherReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeLauncherReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\DumpRenderTreeLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd b/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd
deleted file mode 100644
index 464502c21..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreePostBuild.cmd
+++ /dev/null
@@ -1,62 +0,0 @@
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
-
-if not defined ARCHIVE_BUILD (if defined PRODUCTION exit /b)
-
-mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin"
-
-if not exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" GOTO:CFLITE
-
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreVideo%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreVideo%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%CONFIGURATIONBUILDDIR%\bin\CFNetwork.resources"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin42%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb"xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc42%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-exit /b
-
-:CFLITE
-if not exist "%WEBKITLIBRARIESDIR%\bin\CFLite%LIBRARYCONFIGSUFFIX%.dll" exit /b
-
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFLite%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFLite%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFLite.resources" "%CONFIGURATIONBUILDDIR%\bin\CFLite.resources"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libcurl.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libeay32.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\ssleay32.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\cairo.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icudt46.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libicuuc.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libicuin.dll" "%CONFIGURATIONBUILDDIR%\bin"
-
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops
deleted file mode 100644
index 70d039e52..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeApple.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops
deleted file mode 100644
index 4182d56a4..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefines.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeApple.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops
deleted file mode 100644
index 113ce4620..000000000
--- a/Tools/DumpRenderTree/win/DumpRenderTreeReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="DumpRenderTreeReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\FeatureDefinesCairo.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\cURL.vsprops;.\DumpRenderTreeCommon.vsprops;.\DumpRenderTreeCairo.vsprops;.\DumpRenderTreeCFLite.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiff.vcproj b/Tools/DumpRenderTree/win/ImageDiff.vcproj
deleted file mode 100644
index 997453841..000000000
--- a/Tools/DumpRenderTree/win/ImageDiff.vcproj
+++ /dev/null
@@ -1,452 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiff"
- ProjectGUID="{59CC0547-70AC-499C-9B19-EC01C6F61137}"
- RootNamespace="ImageDiff"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\ImageDiffDebug.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\ImageDiffRelease.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\ImageDiffDebugAll.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- InheritedPropertySheets=".\ImageDiffDebugCairoCFLite.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\ImageDiffProduction.vsprops"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\ImageDiffReleaseCairoCFLite.vsprops"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\win\ImageDiffCairo.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Production|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\cg\ImageDiffCG.cpp"
- >
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\ImageDiffWin.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/DumpRenderTree/win/ImageDiffCairo.cpp b/Tools/DumpRenderTree/win/ImageDiffCairo.cpp
index d10cc14c6..d5a81b495 100644
--- a/Tools/DumpRenderTree/win/ImageDiffCairo.cpp
+++ b/Tools/DumpRenderTree/win/ImageDiffCairo.cpp
@@ -73,7 +73,7 @@ static cairo_status_t readFromData(void* closure, unsigned char* data, unsigned
static cairo_surface_t* createImageFromStdin(int bytesRemaining)
{
unsigned char buffer[s_bufferSize];
- RetainPtr<CFMutableDataRef> data(AdoptCF, CFDataCreateMutable(0, bytesRemaining));
+ RetainPtr<CFMutableDataRef> data = adoptCF(CFDataCreateMutable(0, bytesRemaining));
while (bytesRemaining > 0) {
size_t bytesToRead = min(bytesRemaining, s_bufferSize);
@@ -235,7 +235,7 @@ int main(int argc, const char* argv[])
if (difference > 0.0) {
if (diffImage) {
- RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
+ RetainPtr<CFMutableDataRef> imageData = adoptCF(CFDataCreateMutable(0, 0));
cairo_surface_write_to_png_stream(diffImage, (cairo_write_func_t)writeToData, imageData.get());
printf("Content-Length: %lu\n", CFDataGetLength(imageData.get()));
fwrite(CFDataGetBytePtr(imageData.get()), 1, CFDataGetLength(imageData.get()), stdout);
diff --git a/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops b/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops
deleted file mode 100644
index 58af6193c..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffCommon.vsprops
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\private\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
- PreprocessorDefinitions="NOMINMAX"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib CoreGraphics$(LibraryConfigSuffix).lib CoreFoundation$(LibraryConfigSuffix).lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
- SubSystem="1"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffDebug.vsprops b/Tools/DumpRenderTree/win/ImageDiffDebug.vsprops
deleted file mode 100644
index acc0d148b..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\ImageDiffCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops b/Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops
deleted file mode 100644
index ffe75acd8..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\ImageDiffCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops b/Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops
deleted file mode 100644
index cd813ef06..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\ImageDiffWinCairoCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncher.vcproj b/Tools/DumpRenderTree/win/ImageDiffLauncher.vcproj
deleted file mode 100644
index 46fce5b70..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncher.vcproj
+++ /dev/null
@@ -1,396 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncher"
- ProjectGUID="{DD7949B6-F2B4-47C2-9C42-E21E84CB1017}"
- RootNamespace="ImageDiffLauncher"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\ImageDiffLauncherDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\ImageDiffLauncherRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\ImageDiffLauncherDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\ImageDiffLauncherDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\ImageDiffLauncherProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\ImageDiffLauncherReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\..\win\DLLLauncher\DLLLauncherMain.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherCommon.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherCommon.vsprops
deleted file mode 100644
index 2b9b1613a..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherCommon.vsprops
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncherCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="USE_CONSOLE_ENTRY_POINT"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib"
- OutputFile="$(OutDir)\ImageDiff$(WebKitConfigSuffix).exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName)Launcher.pdb"
- SubSystem="1"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherDebug.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherDebug.vsprops
deleted file mode 100644
index 3bfcbd72a..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncherDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\ImageDiffLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherDebugAll.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherDebugAll.vsprops
deleted file mode 100644
index 7a96c06ec..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncherDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\ImageDiffLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherDebugCairoCFLite.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherDebugCairoCFLite.vsprops
deleted file mode 100644
index 6de4e2af8..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\ImageDiffLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherProduction.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherProduction.vsprops
deleted file mode 100644
index 0a02fb22d..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncherProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\ImageDiffLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherRelease.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherRelease.vsprops
deleted file mode 100644
index eba5d5e41..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncherRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\ImageDiffLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffLauncherReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/win/ImageDiffLauncherReleaseCairoCFLite.vsprops
deleted file mode 100644
index 16b95fe95..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffLauncherReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffLauncherReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\ImageDiffLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffProduction.vsprops b/Tools/DumpRenderTree/win/ImageDiffProduction.vsprops
deleted file mode 100644
index 89173896a..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\ImageDiffCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffRelease.vsprops b/Tools/DumpRenderTree/win/ImageDiffRelease.vsprops
deleted file mode 100644
index 0300592a8..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\ImageDiffCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops b/Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops
deleted file mode 100644
index 1b7215416..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\ImageDiffWinCairoCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/ImageDiffWinCairoCommon.vsprops b/Tools/DumpRenderTree/win/ImageDiffWinCairoCommon.vsprops
deleted file mode 100644
index 1e2a7d4da..000000000
--- a/Tools/DumpRenderTree/win/ImageDiffWinCairoCommon.vsprops
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="ImageDiffCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\include&quot;;&quot;$(ConfigurationBuildDir)\include\private&quot;;&quot;$(ConfigurationBuildDir)\include\private\JavaScriptCore&quot;;&quot;$(ConfigurationBuildDir)\include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\include&quot;;&quot;$(WebKitLibrariesDir)\include\private&quot;"
- PreprocessorDefinitions="NOMINMAX"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalOptions="/NXCOMPAT"
- AdditionalDependencies="JavaScriptCore$(WebKitDLLConfigSuffix).lib cairo$(LibraryConfigSuffix).lib libjpeg.lib libpng$(LibraryConfigSuffix).lib zdll.lib Msimg32.lib CFLite$(LibraryConfigSuffix).lib"
- SubSystem="1"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp b/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp
index 10ca5163f..f2025c66b 100644
--- a/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp
+++ b/Tools/DumpRenderTree/win/PixelDumpSupportWin.cpp
@@ -85,7 +85,7 @@ PassRefPtr<BitmapContext> createBitmapContextFromWebView(bool onscreen, bool inc
makeAlphaChannelOpaque(info.bmBits, info.bmWidth, info.bmHeight);
#if USE(CG)
- RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB());
CGContextRef context = CGBitmapContextCreate(info.bmBits, info.bmWidth, info.bmHeight, 8,
info.bmWidthBytes, colorSpace.get(), kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst);
#elif USE(CAIRO)
diff --git a/Tools/DumpRenderTree/win/TestRunnerWin.cpp b/Tools/DumpRenderTree/win/TestRunnerWin.cpp
index 3e48ade65..f1a2b2b03 100644
--- a/Tools/DumpRenderTree/win/TestRunnerWin.cpp
+++ b/Tools/DumpRenderTree/win/TestRunnerWin.cpp
@@ -137,19 +137,6 @@ JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
return 0;
}
-void TestRunner::disableImageLoading()
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebPreferences> preferences;
- if (FAILED(webView->preferences(&preferences)))
- return;
-
- preferences->setLoadsImagesAutomatically(FALSE);
-}
-
void TestRunner::dispatchPendingLoadRequests()
{
// FIXME: Implement for testing fix for 6727495
@@ -173,39 +160,6 @@ void TestRunner::keepWebHistory()
history->setOptionalSharedHistory(sharedHistory.get());
}
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, JSValueRef value)
-{
- // FIXME: Implement this.
- return JSValueMakeUndefined(context);
-}
-
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return 0;
-
- COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
- if (!webViewPrivate)
- return 0;
-
- COMPtr<IDOMElement> element;
- if (FAILED(webViewPrivate->elementFromJS(context, nodeObject, &element)))
- return 0;
-
- COMPtr<IDOMElementPrivate> elementPrivate(Query, element);
- if (!elementPrivate)
- return 0;
-
- BSTR textBSTR = 0;
- if (FAILED(elementPrivate->markerTextForListItem(&textBSTR)))
- return 0;
-
- JSRetainPtr<JSStringRef> markerText(Adopt, JSStringCreateWithBSTR(textBSTR));
- SysFreeString(textBSTR);
- return markerText;
-}
-
void TestRunner::waitForPolicyDelegate()
{
COMPtr<IWebView> webView;
@@ -238,17 +192,6 @@ size_t TestRunner::webHistoryItemCount()
return count;
}
-unsigned TestRunner::workerThreadCount() const
-{
- COMPtr<IWebWorkersPrivate> workers;
- if (FAILED(WebKitCreateInstance(CLSID_WebWorkersPrivate, 0, __uuidof(workers), reinterpret_cast<void**>(&workers))))
- return 0;
- unsigned count;
- if (FAILED(workers->workerThreadCount(&count)))
- return 0;
- return count;
-}
-
JSRetainPtr<JSStringRef> TestRunner::platformName() const
{
JSRetainPtr<JSStringRef> platformName(Adopt, JSStringCreateWithUTF8CString("win"));
@@ -359,27 +302,6 @@ void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
prefsPrivate->setAuthorAndUserStylesEnabled(flag);
}
-void TestRunner::setAutofilled(JSContextRef context, JSValueRef nodeObject, bool autofilled)
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebViewPrivate> webViewPrivate(Query, webView);
- if (!webViewPrivate)
- return;
-
- COMPtr<IDOMElement> element;
- if (FAILED(webViewPrivate->elementFromJS(context, nodeObject, &element)))
- return;
-
- COMPtr<IFormsAutoFillTransition> autofillElement(Query, element);
- if (!autofillElement)
- return;
-
- autofillElement->setAutofilled(autofilled);
-}
-
void TestRunner::setCustomPolicyDelegate(bool setDelegate, bool permissive)
{
COMPtr<IWebView> webView;
@@ -489,23 +411,6 @@ void TestRunner::setXSSAuditorEnabled(bool enabled)
prefsPrivate->setXSSAuditorEnabled(enabled);
}
-void TestRunner::setFrameFlatteningEnabled(bool enabled)
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebPreferences> preferences;
- if (FAILED(webView->preferences(&preferences)))
- return;
-
- COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
- if (!prefsPrivate)
- return;
-
- prefsPrivate->setFrameFlatteningEnabled(enabled);
-}
-
void TestRunner::setSpatialNavigationEnabled(bool enabled)
{
// FIXME: Implement for SpatialNavigation layout tests.
@@ -728,13 +633,13 @@ void TestRunner::setUserStyleSheetLocation(JSStringRef jsURL)
if (FAILED(webView->preferences(&preferences)))
return;
- RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
- RetainPtr<CFURLRef> url(AdoptCF, CFURLCreateWithString(0, urlString.get(), 0));
+ RetainPtr<CFStringRef> urlString = adoptCF(JSStringCopyCFString(0, jsURL));
+ RetainPtr<CFURLRef> url = adoptCF(CFURLCreateWithString(0, urlString.get(), 0));
if (!url)
return;
// Now copy the file system path, POSIX style.
- RetainPtr<CFStringRef> pathCF(AdoptCF, CFURLCopyFileSystemPath(url.get(), kCFURLPOSIXPathStyle));
+ RetainPtr<CFStringRef> pathCF = adoptCF(CFURLCopyFileSystemPath(url.get(), kCFURLPOSIXPathStyle));
if (!pathCF)
return;
@@ -792,7 +697,7 @@ void TestRunner::setViewModeMediaFeature(JSStringRef mode)
void TestRunner::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
{
- RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
+ RetainPtr<CFStringRef> urlString = adoptCF(JSStringCopyCFString(0, jsURL));
::setPersistentUserStyleSheetLocation(urlString.get());
}
@@ -818,32 +723,6 @@ void TestRunner::setWindowIsKey(bool flag)
::SendMessage(webViewWindow, flag ? WM_SETFOCUS : WM_KILLFOCUS, (WPARAM)::GetDesktopWindow(), 0);
}
-void TestRunner::setSmartInsertDeleteEnabled(bool flag)
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebViewEditing> viewEditing;
- if (FAILED(webView->QueryInterface(&viewEditing)))
- return;
-
- viewEditing->setSmartInsertDeleteEnabled(flag ? TRUE : FALSE);
-}
-
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebViewEditing> viewEditing;
- if (FAILED(webView->QueryInterface(&viewEditing)))
- return;
-
- viewEditing->setSelectTrailingWhitespaceEnabled(flag ? TRUE : FALSE);
-}
-
static const CFTimeInterval waitToDumpWatchdogInterval = 30.0;
static void CALLBACK waitUntilDoneWatchdogFired(HWND, UINT, UINT_PTR, DWORD)
@@ -863,32 +742,6 @@ int TestRunner::windowCount()
return openWindows().size();
}
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
- COMPtr<IDOMDocument> document;
- if (FAILED(frame->DOMDocument(&document)))
- return false;
-
- wstring idWstring = jsStringRefToWString(id);
- BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length());
- COMPtr<IDOMElement> element;
- HRESULT result = document->getElementById(idBSTR, &element);
- SysFreeString(idBSTR);
-
- if (FAILED(result))
- return false;
-
- COMPtr<IWebFramePrivate> framePrivate(Query, frame);
- if (!framePrivate)
- return false;
-
- BOOL autoCompletes;
- if (FAILED(framePrivate->elementDoesAutoComplete(element.get(), &autoCompletes)))
- return false;
-
- return autoCompletes;
-}
-
void TestRunner::execCommand(JSStringRef name, JSStringRef value)
{
wstring wName = jsStringRefToWString(name);
@@ -1026,69 +879,6 @@ void TestRunner::setAppCacheMaximumSize(unsigned long long size)
printf("ERROR: TestRunner::setAppCacheMaximumSize() not implemented\n");
}
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
- COMPtr<IDOMDocument> document;
- if (FAILED(frame->DOMDocument(&document)))
- return false;
-
- BSTR idBSTR = JSStringCopyBSTR(elementId);
- COMPtr<IDOMElement> element;
- HRESULT hr = document->getElementById(idBSTR, &element);
- SysFreeString(idBSTR);
- if (FAILED(hr))
- return false;
-
- COMPtr<IWebFramePrivate> framePrivate(Query, frame);
- if (!framePrivate)
- return false;
-
- BSTR nameBSTR = JSStringCopyBSTR(animationName);
- BOOL wasRunning = FALSE;
- hr = framePrivate->pauseAnimation(nameBSTR, element.get(), time, &wasRunning);
- SysFreeString(nameBSTR);
-
- return SUCCEEDED(hr) && wasRunning;
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- COMPtr<IDOMDocument> document;
- if (FAILED(frame->DOMDocument(&document)))
- return false;
-
- BSTR idBSTR = JSStringCopyBSTR(elementId);
- COMPtr<IDOMElement> element;
- HRESULT hr = document->getElementById(idBSTR, &element);
- SysFreeString(idBSTR);
- if (FAILED(hr))
- return false;
-
- COMPtr<IWebFramePrivate> framePrivate(Query, frame);
- if (!framePrivate)
- return false;
-
- BSTR nameBSTR = JSStringCopyBSTR(propertyName);
- BOOL wasRunning = FALSE;
- hr = framePrivate->pauseTransition(nameBSTR, element.get(), time, &wasRunning);
- SysFreeString(nameBSTR);
-
- return SUCCEEDED(hr) && wasRunning;
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- COMPtr<IWebFramePrivate> framePrivate(Query, frame);
- if (!framePrivate)
- return 0;
-
- UINT number = 0;
- if (FAILED(framePrivate->numberOfActiveAnimations(&number)))
- return 0;
-
- return number;
-}
-
static _bstr_t bstrT(JSStringRef jsString)
{
// The false parameter tells the _bstr_t constructor to adopt the BSTR we pass it.
@@ -1162,11 +952,6 @@ void TestRunner::setDeveloperExtrasEnabled(bool enabled)
prefsPrivate->setDeveloperExtrasEnabled(enabled);
}
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
- // FIXME: Implement this.
-}
-
void TestRunner::showWebInspector()
{
COMPtr<IWebView> webView;
@@ -1357,19 +1142,6 @@ void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
// FIXME: Implement.
}
-void TestRunner::setMinimumTimerInterval(double minimumTimerInterval)
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
- if (!viewPrivate)
- return;
-
- viewPrivate->setMinimumTimerInterval(minimumTimerInterval);
-}
-
void TestRunner::setTextDirection(JSStringRef direction)
{
COMPtr<IWebFramePrivate> framePrivate(Query, frame);
@@ -1431,17 +1203,12 @@ void TestRunner::setAutomaticLinkDetectionEnabled(bool)
// FIXME: Implement this.
}
-void TestRunner::sendWebIntentResponse(JSStringRef)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
+void TestRunner::setStorageDatabaseIdleInterval(double)
{
// FIXME: Implement this.
}
-void TestRunner::setStorageDatabaseIdleInterval(double)
+void TestRunner::closeIdleLocalStorageDatabases()
{
// FIXME: Implement this.
}
diff --git a/Tools/DumpRenderTree/wscript b/Tools/DumpRenderTree/wscript
deleted file mode 100644
index b1a0356fa..000000000
--- a/Tools/DumpRenderTree/wscript
+++ /dev/null
@@ -1,67 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# wxBrowser sample app build script for the waf build system
-
-import sys
-
-from settings import *
-
-include_paths = [
- os.path.join(output_dir),
- os.path.join(wk_root, 'Source', 'JavaScriptCore'),
- os.path.join(wk_root, 'Source', 'WTF'),
- os.path.join(wk_root, 'Source', 'WebCore'),
- os.path.join(wk_root, 'Source', 'WebCore', 'bindings', 'wx'),
- os.path.join(wk_root, 'Source', 'WebKit', 'wx'),
- '.',
- 'wx'
- ]
-sources = [
- 'DumpRenderTreeCommon.cpp',
- 'TestRunner.cpp',
- 'WorkQueue.cpp',
- 'wx/DumpRenderTreeWx.cpp',
- 'wx/TestRunnerWx.cpp',
- 'wx/WorkQueueItemWx.cpp'
- ]
-
-def set_options(opt):
- common_set_options(opt)
-
-def configure(conf):
- common_configure(conf)
-
-def build(bld):
- obj = bld.new_task_gen(
- features = 'cxx cprogram',
- includes = ' '.join(include_paths),
- source = sources,
- target = 'DumpRenderTree',
- uselib = 'ICU WX ' + get_config(),
- libpath = [output_dir],
- uselib_local = 'jscore wxwebkit',
- install_path = output_dir)
-
diff --git a/Tools/DumpRenderTree/wx/DumpRenderTreeWx.cpp b/Tools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
deleted file mode 100644
index cadecaf8f..000000000
--- a/Tools/DumpRenderTree/wx/DumpRenderTreeWx.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-/*
- * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
- *
- * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-#include "DumpRenderTree.h"
-
-#include "TestRunner.h"
-#include "WorkQueue.h"
-#include "WorkQueueItem.h"
-
-#include <JavaScriptCore/JavaScript.h>
-
-#include <wx/wx.h>
-#include "WebView.h"
-#include "WebFrame.h"
-#include "WebBrowserShell.h"
-
-#include <wtf/Assertions.h>
-
-#include <cassert>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-volatile bool done = true;
-volatile bool notified = false;
-static bool printSeparators = true;
-static int dumpPixelsForAllTests = false;
-static int dumpPixelsForCurrentTest;
-static int dumpTree = 1;
-time_t startTime; // to detect timeouts / failed tests
-
-using namespace std;
-using namespace WebKit;
-
-FILE* logOutput;
-
-RefPtr<TestRunner> gTestRunner;
-static WebView* webView;
-static wxTimer* idleTimer;
-
-const unsigned timeOut = 10;
-const unsigned maxViewHeight = 600;
-const unsigned maxViewWidth = 800;
-
-class LayoutWebViewEventHandler : public wxEvtHandler {
-
-public:
- LayoutWebViewEventHandler(WebView* webView)
- : m_webView(webView)
- {
- }
-
- void bindEvents()
- {
- m_webView->Connect(wxEVT_WEBVIEW_LOAD, WebViewLoadEventHandler(LayoutWebViewEventHandler::OnLoadEvent), 0, this);
- m_webView->Connect(wxEVT_WEBVIEW_JS_ALERT, WebViewAlertEventHandler(LayoutWebViewEventHandler::OnAlertEvent), 0, this);
- m_webView->Connect(wxEVT_WEBVIEW_JS_CONFIRM, WebViewConfirmEventHandler(LayoutWebViewEventHandler::OnConfirmEvent), 0, this);
- m_webView->Connect(wxEVT_WEBVIEW_JS_PROMPT, WebViewPromptEventHandler(LayoutWebViewEventHandler::OnPromptEvent), 0, this);
- m_webView->Connect(wxEVT_WEBVIEW_CONSOLE_MESSAGE, WebViewConsoleMessageEventHandler(LayoutWebViewEventHandler::OnConsoleMessageEvent), 0, this);
- m_webView->Connect(wxEVT_WEBVIEW_RECEIVED_TITLE, WebViewReceivedTitleEventHandler(LayoutWebViewEventHandler::OnReceivedTitleEvent), 0, this);
- m_webView->Connect(wxEVT_WEBVIEW_WINDOW_OBJECT_CLEARED, WebViewWindowObjectClearedEventHandler(LayoutWebViewEventHandler::OnWindowObjectClearedEvent), 0, this);
- }
-
- void OnLoadEvent(WebViewLoadEvent& event)
- {
-
- if (event.GetState() == WEBVIEW_LOAD_FAILED || event.GetState() == WEBVIEW_LOAD_STOPPED)
- done = true;
-
- if (event.GetState() == WEBVIEW_LOAD_ONLOAD_HANDLED) {
- done = true;
-
- if (!gTestRunner->waitToDump() || notified) {
- dump();
- }
- }
- }
-
- void OnAlertEvent(WebViewAlertEvent& event)
- {
- wxFprintf(stdout, "ALERT: %S\n", event.GetMessage());
- }
-
- void OnConfirmEvent(WebViewConfirmEvent& event)
- {
- wxFprintf(stdout, "CONFIRM: %S\n", event.GetMessage());
- event.SetReturnCode(1);
- }
-
- void OnPromptEvent(WebViewPromptEvent& event)
- {
- wxFprintf(stdout, "PROMPT: %S, default text: %S\n", event.GetMessage(), event.GetResponse());
- event.SetReturnCode(1);
- }
-
- void OnConsoleMessageEvent(WebViewConsoleMessageEvent& event)
- {
- fprintf(stdout, "CONSOLE MESSAGE: ");
- if (event.GetLineNumber())
- fprintf(stdout, "line %d: ", event.GetLineNumber());
- wxFprintf(stdout, "%S\n", event.GetMessage());
- }
-
- void OnReceivedTitleEvent(WebViewReceivedTitleEvent& event)
- {
- if (gTestRunner->dumpTitleChanges() && !done)
- wxFprintf(stdout, "TITLE CHANGED: '%S'\n", event.GetTitle());
- }
-
- void OnWindowObjectClearedEvent(WebViewWindowObjectClearedEvent& event)
- {
- JSValueRef exception = 0;
- gTestRunner->makeWindowObject(event.GetJSContext(), event.GetWindowObject(), &exception);
- }
-
-private:
- WebView* m_webView;
-
-};
-
-void notifyDoneFired()
-{
- notified = true;
- if (done)
- dump();
-}
-
-LayoutWebViewEventHandler* eventHandler = 0;
-
-static wxString dumpFramesAsText(WebFrame* frame)
-{
- // TODO: implement this. leaving this here so we don't forget this case.
- if (gTestRunner->dumpChildFramesAsText()) {
- }
-
- return frame->GetInnerText();
-}
-
-void dump()
-{
- if (!done)
- return;
-
- if (gTestRunner->waitToDump() && !notified)
- return;
-
- if (dumpTree) {
- const char* result = 0;
-
- bool dumpAsText = gTestRunner->dumpAsText();
- wxString str;
- if (gTestRunner->dumpAsText())
- str = dumpFramesAsText(webView->GetMainFrame());
- else
- str = webView->GetMainFrame()->GetExternalRepresentation();
-
- result = str.ToUTF8();
- if (!result) {
- const char* errorMessage;
- if (gTestRunner->dumpAsText())
- errorMessage = "WebFrame::GetInnerText";
- else
- errorMessage = "WebFrame::GetExternalRepresentation";
- printf("ERROR: 0 result from %s", errorMessage);
- } else {
- printf("%s\n", result);
- }
-
- if (gTestRunner->dumpBackForwardList()) {
- // FIXME: not implemented
- }
-
- if (printSeparators) {
- puts("#EOF");
- fputs("#EOF\n", stderr);
- fflush(stdout);
- fflush(stderr);
- }
- }
-
- if (dumpPixelsForCurrentTest
- && gTestRunner->generatePixelResults()
- && !gTestRunner->dumpDOMAsWebArchive()
- && !gTestRunner->dumpSourceAsWebArchive()) {
- // FIXME: Add support for dumping pixels
- fflush(stdout);
- }
-
- puts("#EOF");
- fflush(stdout);
- fflush(stderr);
-
- gTestRunner.clear();
-}
-
-static void runTest(const wxString inputLine)
-{
- done = false;
- time(&startTime);
-
- TestCommand command = parseInputLine(std::string(inputLine.ToAscii()));
- string& pathOrURL = command.pathOrURL;
- dumpPixelsForCurrentTest = command.shouldDumpPixels || dumpPixelsForAllTests;
-
- // CURL isn't happy if we don't have a protocol.
- size_t http = pathOrURL.find("http://");
- if (http == string::npos)
- pathOrURL.insert(0, "file://");
-
- gTestRunner = TestRunner::create(pathOrURL, command.expectedPixelHash);
- if (!gTestRunner) {
- wxTheApp->ExitMainLoop();
- }
-
- WorkQueue::shared()->clear();
- WorkQueue::shared()->setFrozen(false);
-
- webView->LoadURL(wxString(pathOrURL.c_str(), wxConvUTF8));
-
- // wait until load completes and the results are dumped
- while (!done)
- wxSafeYield();
-}
-
-class MyApp : public wxApp
-{
-public:
-
- virtual bool OnInit();
-
-private:
- wxLog* logger;
-};
-
-
-IMPLEMENT_APP(MyApp)
-
-bool MyApp::OnInit()
-{
- logOutput = fopen("output.txt", "ab");
- if (logOutput) {
- logger = new wxLogStderr(logOutput);
- wxLog::SetActiveTarget(logger);
- }
-
- wxLogMessage(wxT("Starting DumpRenderTool, %d args.\n"), argc);
-
- for (int i = 1; i < argc; ++i) {
- wxString option = wxString(argv[i]);
- if (!option.CmpNoCase(_T("--notree"))) {
- dumpTree = false;
- continue;
- }
-
- if (!option.CmpNoCase(_T("--tree"))) {
- dumpTree = true;
- continue;
- }
-
- if (!option.CmpNoCase(_T("--pixel-tests"))) {
- dumpPixelsForAllTests = true;
- continue;
- }
- }
- wxInitAllImageHandlers();
-
- // create the main application window
- WebBrowserShell* webFrame = new WebBrowserShell(_T("wxWebKit DumpRenderTree App"), "about:blank");
- SetTopWindow(webFrame);
- webView = webFrame->webview;
- webView->SetSize(wxSize(maxViewWidth, maxViewHeight));
-
- if (!eventHandler) {
- eventHandler = new LayoutWebViewEventHandler(webView);
- eventHandler->bindEvents();
- }
-
- int optind = 1;
- time(&startTime);
- wxString option_str = wxString(argv[optind]);
- if (argc == optind+1 && option_str.Find(_T("-")) == 0) {
- char filenameBuffer[2048];
- while (fgets(filenameBuffer, sizeof(filenameBuffer), stdin)) {
- wxString filename = wxString::FromUTF8(filenameBuffer);
- char* newLineCharacter = strchr(filenameBuffer, '\n');
- if (newLineCharacter)
- *newLineCharacter = '\0';
-
- if (strlen(filenameBuffer) == 0)
- return 0;
- wxLogMessage(wxT("Running test %S.\n"), filenameBuffer);
- runTest(filename);
- }
-
- } else {
- printSeparators = (optind < argc - 1 || (dumpPixelsForCurrentTest && dumpTree));
- for (int i = optind; i != argc; ++i) {
- runTest(wxTheApp->argv[1]);
- }
- }
-
- webFrame->Close();
- delete eventHandler;
-
- wxLog::SetActiveTarget(0);
- delete logger;
- fclose(logOutput);
-
- // returning false shuts the app down
- return false;
-}
diff --git a/Tools/DumpRenderTree/wx/TestRunnerWx.cpp b/Tools/DumpRenderTree/wx/TestRunnerWx.cpp
deleted file mode 100644
index 35a9137e7..000000000
--- a/Tools/DumpRenderTree/wx/TestRunnerWx.cpp
+++ /dev/null
@@ -1,619 +0,0 @@
-/*
- * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
- * Copyright (C) 2012 Apple 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
- */
-
-#include "config.h"
-#include "TestRunner.h"
-
-#include "DumpRenderTree.h"
-#include "WorkQueue.h"
-#include "WorkQueueItem.h"
-#include <JavaScriptCore/JSRetainPtr.h>
-#include <JavaScriptCore/JSStringRef.h>
-
-#include <stdio.h>
-
-
-
-TestRunner::~TestRunner()
-{
- // FIXME: implement
-}
-
-void TestRunner::addDisallowedURL(JSStringRef url)
-{
- // FIXME: implement
-}
-
-void TestRunner::clearBackForwardList()
-{
-}
-
-JSStringRef TestRunner::copyDecodedHostName(JSStringRef name)
-{
- // FIXME: implement
- return 0;
-}
-
-JSStringRef TestRunner::copyEncodedHostName(JSStringRef name)
-{
- // FIXME: implement
- return 0;
-}
-
-void TestRunner::dispatchPendingLoadRequests()
-{
- // FIXME: Implement for testing fix for 6727495
-}
-
-void TestRunner::display()
-{
-}
-
-void TestRunner::keepWebHistory()
-{
- // FIXME: implement
-}
-
-void TestRunner::notifyDone()
-{
- if (m_waitToDump && !WorkQueue::shared()->count())
- notifyDoneFired();
- m_waitToDump = false;
-}
-
-JSStringRef TestRunner::pathToLocalResource(JSContextRef context, JSStringRef url)
-{
- // Function introduced in r28690. This may need special-casing on Windows.
- return JSStringRetain(url); // Do nothing on Unix.
-}
-
-void TestRunner::queueLoad(JSStringRef url, JSStringRef target)
-{
- // FIXME: We need to resolve relative URLs here
- WorkQueue::shared()->queue(new LoadItem(url, target));
-}
-
-void TestRunner::setAcceptsEditing(bool acceptsEditing)
-{
-}
-
-void TestRunner::setAlwaysAcceptCookies(bool alwaysAcceptCookies)
-{
- // FIXME: Implement this (and restore the default value before running each test in DumpRenderTree.cpp).
-}
-
-void TestRunner::setCustomPolicyDelegate(bool, bool)
-{
- // FIXME: implement
-}
-
-void TestRunner::setMainFrameIsFirstResponder(bool flag)
-{
- // FIXME: implement
-}
-
-void TestRunner::setTabKeyCyclesThroughElements(bool cycles)
-{
- // FIXME: implement
-}
-
-void TestRunner::setUseDashboardCompatibilityMode(bool flag)
-{
- // FIXME: implement
-}
-
-void TestRunner::setUserStyleSheetEnabled(bool flag)
-{
-}
-
-void TestRunner::setUserStyleSheetLocation(JSStringRef path)
-{
-}
-
-void TestRunner::setValueForUser(JSContextRef context, JSValueRef element, JSStringRef value)
-{
- // FIXME: implement
-}
-
-void TestRunner::setViewModeMediaFeature(JSStringRef mode)
-{
- // FIXME: implement
-}
-
-void TestRunner::setWindowIsKey(bool windowIsKey)
-{
- // FIXME: implement
-}
-
-void TestRunner::setSmartInsertDeleteEnabled(bool flag)
-{
- // FIXME: implement
-}
-
-void TestRunner::setWaitToDump(bool waitUntilDone)
-{
- static const int timeoutSeconds = 10;
-
- m_waitToDump = waitUntilDone;
-}
-
-int TestRunner::windowCount()
-{
- // FIXME: implement
- return 1;
-}
-
-void TestRunner::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setJavaScriptCanAccessClipboard(bool enabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setXSSAuditorEnabled(bool enabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setFrameFlatteningEnabled(bool enabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setAllowUniversalAccessFromFileURLs(bool enabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setAllowFileAccessFromFileURLs(bool enabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setAuthorAndUserStylesEnabled(bool flag)
-{
- // FIXME: implement
-}
-
-void TestRunner::setAutofilled(JSContextRef, JSValueRef element, bool isAutofilled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setPopupBlockingEnabled(bool popupBlockingEnabled)
-{
- // FIXME: implement
-}
-
-void TestRunner::setPluginsEnabled(bool flag)
-{
- // FIXME: Implement
-}
-
-bool TestRunner::elementDoesAutoCompleteForElementWithId(JSStringRef id)
-{
- // FIXME: implement
- return false;
-}
-
-void TestRunner::execCommand(JSStringRef name, JSStringRef value)
-{
- // FIXME: implement
-}
-
-void TestRunner::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
-{
- // FIXME: implement
-}
-
-void TestRunner::clearPersistentUserStyleSheet()
-{
- // FIXME: implement
-}
-
-void TestRunner::clearAllApplicationCaches()
-{
- // FIXME: Implement to support application cache quotas.
-}
-
-void TestRunner::clearApplicationCacheForOrigin(JSStringRef url)
-{
- // FIXME: Implement to support deleting all application cache for an origin.
-}
-
-long long TestRunner::localStorageDiskUsageForOrigin(JSStringRef originIdentifier)
-{
- // FIXME: Implement to support getting disk usage in bytes for an origin.
- return 0;
-}
-
-void TestRunner::setApplicationCacheOriginQuota(unsigned long long quota)
-{
- // FIXME: Implement to support application cache quotas.
-}
-
-long long TestRunner::applicationCacheDiskUsageForOrigin(JSStringRef origin)
-{
- // FIXME: Implement to support getting disk usage by all application caches for an origin.
- return 0;
-}
-
-
-JSValueRef TestRunner::originsWithApplicationCache(JSContextRef context)
-{
- // FIXME: Implement to get origins that have application caches.
- return 0;
-}
-
-void TestRunner::clearAllDatabases()
-{
- // FIXME: implement
-}
-
-void TestRunner::setDatabaseQuota(unsigned long long quota)
-{
- // FIXME: implement
-}
-
-void TestRunner::goBack()
-{
- // FIXME: implement to enable loader/navigation-while-deferring-loads.html
-}
-
-void TestRunner::setDefersLoading(bool)
-{
- // FIXME: implement to enable loader/navigation-while-deferring-loads.html
-}
-
-void TestRunner::setDomainRelaxationForbiddenForURLScheme(bool, JSStringRef)
-{
- // FIXME: implement
-}
-
-void TestRunner::setAppCacheMaximumSize(unsigned long long size)
-{
- // FIXME: implement
-}
-
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- // FIXME: implement
- return 0;
-}
-
-unsigned TestRunner::workerThreadCount() const
-{
- // FIXME: implement
- return 0;
-}
-
-void TestRunner::setSelectTrailingWhitespaceEnabled(bool flag)
-{
- // FIXME: implement
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- // FIXME: implement
- return false;
-}
-
-void TestRunner::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
-{
- // FIXME: Implement for DeviceOrientation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=30335.
-}
-
-void TestRunner::setMockGeolocationPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
-{
- // FIXME: Implement for Geolocation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=28264.
-}
-
-void TestRunner::setMockGeolocationPositionUnavailableError(JSStringRef)
-{
- // FIXME: Implement for Geolocation layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=28264.
-}
-
-void TestRunner::setGeolocationPermission(bool allow)
-{
- // FIXME: Implement for Geolocation layout tests.
- setGeolocationPermissionCommon(allow);
-}
-
-int TestRunner::numberOfPendingGeolocationPermissionRequests()
-{
- // FIXME: Implement for Geolocation layout tests.
- return -1;
-}
-
-void TestRunner::addMockSpeechInputResult(JSStringRef result, double confidence, JSStringRef language)
-{
- // FIXME: Implement for speech input layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=39485.
-}
-
-void TestRunner::setMockSpeechInputDumpRect(bool flag)
-{
- // FIXME: Implement for speech input layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=39485.
-}
-
-void TestRunner::startSpeechInput(JSContextRef inputElement)
-{
- // FIXME: Implement for speech input layout tests.
- // See https://bugs.webkit.org/show_bug.cgi?id=39485.
-}
-
-void TestRunner::setIconDatabaseEnabled(bool iconDatabaseEnabled)
-{
- // FIXME: implement
-}
-
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
-{
- // FIXME: implement
- return false;
-}
-
-void TestRunner::setCacheModel(int)
-{
- // FIXME: implement
-}
-
-bool TestRunner::isCommandEnabled(JSStringRef /*name*/)
-{
- // FIXME: implement
- return false;
-}
-
-size_t TestRunner::webHistoryItemCount()
-{
- // FIXME: implement
- return 0;
-}
-
-void TestRunner::waitForPolicyDelegate()
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::overridePreference(JSStringRef /* key */, JSStringRef /* value */)
-{
- // FIXME: implement
-}
-
-void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
-{
- printf("TestRunner::addUserScript not implemented.\n");
-}
-
-void TestRunner::addUserStyleSheet(JSStringRef source, bool allFrames)
-{
- printf("TestRunner::addUserStyleSheet not implemented.\n");
-}
-
-void TestRunner::showWebInspector()
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::closeWebInspector()
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::evaluateInWebInspector(long callId, JSStringRef script)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::removeAllVisitedLinks()
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::evaluateScriptInIsolatedWorldAndReturnValue(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
-{
-
-}
-
-void TestRunner::evaluateScriptInIsolatedWorld(unsigned worldID, JSObjectRef globalObject, JSStringRef script)
-{
-
-}
-
-void TestRunner::disableImageLoading()
-{
-
-}
-
-void TestRunner::addOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
-{
- // FIXME: implement
-}
-
-void TestRunner::removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains)
-{
- // FIXME: implement
-}
-
-void TestRunner::setScrollbarPolicy(JSStringRef orientation, JSStringRef policy)
-{
- // FIXME: implement
-}
-
-void TestRunner::apiTestNewWindowDataLoadBaseURL(JSStringRef utf8Data, JSStringRef baseURL)
-{
-
-}
-
-void TestRunner::apiTestGoToCurrentBackForwardItem()
-{
-
-}
-
-void TestRunner::setSpatialNavigationEnabled(bool)
-{
-
-}
-
-void TestRunner::setWebViewEditable(bool)
-{
-}
-
-bool TestRunner::callShouldCloseOnWebView()
-{
- return false;
-}
-
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
-{
- return 0;
-}
-
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef, JSValueRef)
-{
- return 0;
-}
-
-void TestRunner::authenticateSession(JSStringRef, JSStringRef, JSStringRef)
-{
-}
-
-void TestRunner::abortModal()
-{
-}
-
-void TestRunner::setAsynchronousSpellCheckingEnabled(bool)
-{
- // FIXME: Implement this.
-}
-
-bool TestRunner::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
-{
- // FIXME: Implement
- return false;
-}
-
-void TestRunner::setSerializeHTTPLoads(bool)
-{
- // FIXME: Implement.
-}
-
-void TestRunner::setMinimumTimerInterval(double interval)
-{
-
-}
-
-void TestRunner::syncLocalStorage()
-{
- // FIXME: Implement.
-}
-
-void TestRunner::observeStorageTrackerNotifications(unsigned number)
-{
- // FIXME: Implement.
-}
-
-void TestRunner::deleteAllLocalStorage()
-{
- // FIXME: Implement.
-}
-
-JSValueRef TestRunner::originsWithLocalStorage(JSContextRef context)
-{
- // FIXME: Implement.
- return 0;
-}
-
-void TestRunner::deleteLocalStorageForOrigin(JSStringRef URL)
-{
- // FIXME: Implement.
-}
-
-void TestRunner::setTextDirection(JSStringRef direction)
-{
- // FIXME: Implement.
-}
-
-void TestRunner::addChromeInputField()
-{
-}
-
-void TestRunner::removeChromeInputField()
-{
-}
-
-void TestRunner::focusWebView()
-{
-}
-
-void TestRunner::setBackingScaleFactor(double)
-{
-}
-
-void TestRunner::simulateDesktopNotificationClick(JSStringRef title)
-{
- // FIXME: Implement.
-}
-
-void TestRunner::resetPageVisibility()
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::setPageVisibility(const char*)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::setAutomaticLinkDetectionEnabled(bool)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::sendWebIntentResponse(JSStringRef)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::deliverWebIntent(JSStringRef, JSStringRef, JSStringRef)
-{
- // FIXME: Implement this.
-}
-
-void TestRunner::setStorageDatabaseIdleInterval(double)
-{
- // FIXME: Implement this.
-}
diff --git a/Tools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh b/Tools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh
index eb9355b53..6c9e7450f 100755
--- a/Tools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh
+++ b/Tools/EWSTools/GoogleComputeEngine/build-chromium-ews.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2012 Google Inc. All rights reserved.
+# Copyright (c) 2013 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
@@ -11,9 +11,6 @@
# 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
@@ -32,18 +29,32 @@ echo "Usage: build-cr-linux-ews.sh BOT_NUMBER"
exit 1
fi
+CWD="$(pwd)"
+cd "$(dirname "$0")"
+
QUEUE_TYPE=chromium-ews
BOT_ID=gce-cr-linux-$1
BUGZILLA_USERNAME=webkit.review.bot@gmail.com
read -s -p "Bugzilla Password: " BUGZILLA_PASSWORD && echo
-# FIXME: We should use gcutil to find a zone that's actually up.
-ZONE=us-east-b
-IMAGE=projects/google/images/ubuntu-10-04-v20120621
+PROJECT=google.com:webkit
+ZONE=$(bash findzone.sh $PROJECT)
+IMAGE=projects/google/global/images/gcel-10-04-v20130104
+MACHINE_TYPE=n1-standard-4-d
-gcutil addinstance $BOT_ID --machine_type=standard-4-cpu-ephemeral-disk --image=$IMAGE --zone=$ZONE --wait_until_running
+gcutil --project=$PROJECT addinstance $BOT_ID --machine_type=$MACHINE_TYPE --image=$IMAGE --zone=$ZONE --wait_until_running
echo "Sleeping for 30s to let the server spin up ssh..."
sleep 30
-gcutil ssh $BOT_ID "sudo apt-get install subversion -y && svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools && cd tools && bash cold-boot.sh $QUEUE_TYPE $BOT_ID $BUGZILLA_USERNAME $BUGZILLA_PASSWORD"
+gcutil --project=$PROJECT ssh $BOT_ID "
+ sudo apt-get install subversion -y &&
+ svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools &&
+ cd tools &&
+ bash build-vm.sh &&
+ bash build-repo.sh $QUEUE_TYPE $BUGZILLA_USERNAME $BUGZILLA_PASSWORD &&
+ bash build-boot-cmd.sh \"screen -t kr ./start-queue.sh $QUEUE_TYPE $BOT_ID 10\" &&
+ bash boot.sh
+"
+
+cd "$CWD"
diff --git a/Tools/EWSTools/GoogleComputeEngine/build-commit-queue.sh b/Tools/EWSTools/GoogleComputeEngine/build-commit-queue.sh
index a94b02083..4ac73c8be 100755
--- a/Tools/EWSTools/GoogleComputeEngine/build-commit-queue.sh
+++ b/Tools/EWSTools/GoogleComputeEngine/build-commit-queue.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2012 Google Inc. All rights reserved.
+# Copyright (c) 2013 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
@@ -11,9 +11,6 @@
# 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
@@ -32,21 +29,36 @@ echo "Usage: build-commit-queue.sh BOT_NUMBER"
exit 1
fi
+CWD="$(pwd)"
+cd "$(dirname "$0")"
+
QUEUE_TYPE=commit-queue
BOT_ID=gce-cq-$1
BUGZILLA_USERNAME=webkit.review.bot@gmail.com
read -s -p "Bugzilla Password: " BUGZILLA_PASSWORD && echo
-
SVN_USERNAME=commit-queue@webkit.org
read -s -p "Subversion Password: " SVN_PASSWORD && echo
-# FIXME: We should use gcutil to find a zone that's actually up.
-ZONE=us-east-b
-IMAGE=projects/google/images/ubuntu-10-04-v20120621
+PROJECT=google.com:webkit
+ZONE=$(bash findzone.sh $PROJECT)
+IMAGE=projects/google/global/images/gcel-10-04-v20130104
+MACHINE_TYPE=n1-standard-4-d
-gcutil addinstance $BOT_ID --machine_type=standard-4-cpu-ephemeral-disk --image=$IMAGE --zone=$ZONE --wait_until_running
+gcutil --project=$PROJECT addinstance $BOT_ID --machine_type=$MACHINE_TYPE --image=$IMAGE --zone=$ZONE --wait_until_running
echo "Sleeping for 30s to let the server spin up ssh..."
sleep 30
-gcutil ssh $BOT_ID "sudo apt-get install subversion -y && svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools && cd tools && bash configure-svn-auth.sh $SVN_USERNAME $SVN_PASSWORD && bash cold-boot.sh $QUEUE_TYPE $BOT_ID $BUGZILLA_USERNAME $BUGZILLA_PASSWORD"
+gcutil --project=$PROJECT ssh $BOT_ID "
+ sudo apt-get install subversion -y &&
+ svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools &&
+ cd tools &&
+ bash configure-svn-config.sh &&
+ bash configure-svn-auth.sh $SVN_USERNAME $SVN_PASSWORD &&
+ bash build-vm.sh &&
+ bash build-repo.sh $QUEUE_TYPE $BUGZILLA_USERNAME $BUGZILLA_PASSWORD &&
+ bash build-boot-cmd.sh \"screen -t kr ./start-queue.sh $QUEUE_TYPE $BOT_ID 10\" &&
+ bash boot.sh
+"
+
+cd "$CWD"
diff --git a/Tools/RebaselineQueueServer/main.py b/Tools/EWSTools/GoogleComputeEngine/build-cr-linux-debug-ews.sh
index 4497d6306..1cf4e6902 100755
--- a/Tools/RebaselineQueueServer/main.py
+++ b/Tools/EWSTools/GoogleComputeEngine/build-cr-linux-debug-ews.sh
@@ -1,4 +1,5 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
+#!/bin/sh
+# Copyright (c) 2013 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
@@ -10,9 +11,6 @@
# 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
@@ -26,31 +24,38 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Request a modern Django
-from google.appengine.dist import use_library
-use_library('django', '1.2')
+if [[ $# -ne 1 ]];then
+echo "Usage: build-cr-linux-debug-ews.sh BOT_NUMBER"
+exit 1
+fi
-from google.appengine.ext import webapp
-from google.appengine.ext.webapp import util
+CWD="$(pwd)"
+cd "$(dirname "$0")"
-from handlers import pages
-from handlers import builderqueue
+QUEUE_TYPE=cr-linux-debug-ews
+BOT_ID=gce-cr-linux-debug-$1
+BUGZILLA_USERNAME=webkit.review.bot@gmail.com
+read -s -p "Bugzilla Password: " BUGZILLA_PASSWORD && echo
+PROJECT=google.com:webkit
+ZONE=$(bash findzone.sh $PROJECT)
+IMAGE=projects/google/global/images/gcel-10-04-v20130104
+MACHINE_TYPE=n1-standard-4-d
-def main():
- application = webapp.WSGIApplication([
- ('/', pages.Home),
- ('/builder/picker', pages.BuilderPicker),
+gcutil --project=$PROJECT addinstance $BOT_ID --machine_type=$MACHINE_TYPE --image=$IMAGE --zone=$ZONE --wait_until_running
- # Queue CRUD operations
- ('/builder/(.+)/queue/edit', builderqueue.QueueEdit),
- ('/builder/(.+)/queue/add', builderqueue.QueueAdd),
- ('/builder/(.+)/queue/remove', builderqueue.QueueRemove),
- ('/builder/(.+)/queue', builderqueue.QueueHtml),
- ('/builder/(.+)/queue/json', builderqueue.QueueJson),
- ],
- debug=True)
- util.run_wsgi_app(application)
+echo "Sleeping for 30s to let the server spin up ssh..."
+sleep 30
-if __name__ == '__main__':
- main()
+gcutil --project=$PROJECT ssh $BOT_ID "
+ sudo apt-get install subversion -y &&
+ svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools &&
+ cd tools &&
+ bash build-vm.sh &&
+ bash build-repo.sh $QUEUE_TYPE $BUGZILLA_USERNAME $BUGZILLA_PASSWORD &&
+ bash build-boot-cmd.sh \"\\
+screen -t kr ./start-queue.sh -r \\\"configure-clang-linux.sh $QUEUE_TYPE\\\" $QUEUE_TYPE $BOT_ID 10\" &&
+ bash boot.sh
+"
+
+cd "$CWD"
diff --git a/Tools/EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh b/Tools/EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh
new file mode 100755
index 000000000..6297d80cf
--- /dev/null
+++ b/Tools/EWSTools/GoogleComputeEngine/build-feeder-style-sheriffbot.sh
@@ -0,0 +1,68 @@
+#!/bin/sh
+# Copyright (c) 2013 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.
+#
+# 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.
+
+if [[ $# -ne 1 ]];then
+echo "Usage: build-feeder-style-sheriffbot.sh BOT_NUMBER"
+exit 1
+fi
+
+CWD="$(pwd)"
+cd "$(dirname "$0")"
+
+BOT_ID=gce-feeder-$1
+BUGZILLA_USERNAME=webkit.review.bot@gmail.com
+read -s -p "Bugzilla Password: " BUGZILLA_PASSWORD && echo
+read -s -p "sheriffbot IRC Password: " IRC_PASSWORD && echo
+
+PROJECT=google.com:webkit
+ZONE=$(bash findzone.sh $PROJECT)
+IMAGE=projects/google/global/images/gcel-10-04-v20130104
+MACHINE_TYPE=n1-standard-4-d
+
+gcutil --project=$PROJECT addinstance $BOT_ID --machine_type=$MACHINE_TYPE --image=$IMAGE --zone=$ZONE --wait_until_running
+
+echo "Sleeping for 30s to let the server spin up ssh..."
+sleep 30
+
+gcutil --project=$PROJECT ssh $BOT_ID "
+ sudo apt-get install subversion -y &&
+ svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools &&
+ cd tools &&
+ bash build-vm.sh &&
+ bash build-repo.sh feeder-queue $BUGZILLA_USERNAME $BUGZILLA_PASSWORD &&
+ cp -r /mnt/git/webkit-feeder-queue /mnt/git/webkit-style-queue &&
+ cp -r /mnt/git/webkit-feeder-queue /mnt/git/webkit-sheriff-bot &&
+ bash configure-svn-config.sh &&
+ bash configure-git-svn.sh sheriff-bot &&
+ bash configure-git-user.sh sheriff-bot \"Sheriff Bot\" $BUGZILLA_USERNAME &&
+ bash build-boot-cmd.sh \"\\
+screen -t fq ./start-queue.sh feeder-queue $BOT_ID 10
+screen -t sq ./start-queue.sh style-queue $BOT_ID 10
+screen -t sb ./start-queue.sh -p \\\"--irc-password=$IRC_PASSWORD\\\" sheriff-bot $BOT_ID 180\" &&
+ bash boot.sh
+"
+
+cd "$CWD"
diff --git a/Tools/EWSTools/GoogleComputeEngine/findzone.sh b/Tools/EWSTools/GoogleComputeEngine/findzone.sh
new file mode 100755
index 000000000..ac2cee5fa
--- /dev/null
+++ b/Tools/EWSTools/GoogleComputeEngine/findzone.sh
@@ -0,0 +1,5 @@
+if [[ $# -ne 1 ]]; then
+ echo "Usage: findzone.sh PROJECT"
+fi
+
+echo $(gcutil --project=$1 listzones | grep UP | awk '{print $2}' | sort | tail -1)
diff --git a/Tools/EWSTools/boot.sh b/Tools/EWSTools/boot.sh
index fb5aadde0..787e61994 100755
--- a/Tools/EWSTools/boot.sh
+++ b/Tools/EWSTools/boot.sh
@@ -27,4 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-screen -d -m -c ~/tools/screen-config
+CWD=$(pwd)
+
+cd ~/tools
+screen -d -m -c ./screen-config
+
+cd $CWD
diff --git a/Tools/gdb/webcore.py b/Tools/EWSTools/build-boot-cmd.sh
index 8dc4d8edf..b22c1fbb7 100644..100755
--- a/Tools/gdb/webcore.py
+++ b/Tools/EWSTools/build-boot-cmd.sh
@@ -1,4 +1,5 @@
-# Copyright (C) 2010, Google Inc. All rights reserved.
+#!/bin/sh
+# Copyright (c) 2013 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
@@ -26,7 +27,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# For backward compatibility.
-import webkit
-print ("webcore.py is deprecated. Please use 'import webkit' instead of "
- "'import webcore' in your ~/.gdbinit.")
+if [[ $# -ne 1 ]];then
+echo "Usage: build-boot-cmd.sh BOOT_COMMAND"
+exit 1
+fi
+
+echo "$1" > ~/tools/screen-config
diff --git a/Tools/EWSTools/build-repo.sh b/Tools/EWSTools/build-repo.sh
new file mode 100755
index 000000000..65b0d84e9
--- /dev/null
+++ b/Tools/EWSTools/build-repo.sh
@@ -0,0 +1,61 @@
+#!/bin/sh
+# Copyright (c) 2013 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.
+
+if [[ $# -ne 3 ]];then
+echo "Usage: build-repo.sh QUEUE_TYPE BUGZILLA_USERNAME BUGZILLA_PASSWORD"
+exit 1
+fi
+
+CWD=$(pwd)
+
+cd /mnt/git
+
+echo "Cloning WebKit git repository, process takes ~30m."
+echo "Note: No status output will be shown via remote pipe."
+git clone git://git.webkit.org/WebKit.git webkit-$1
+cd webkit-$1
+
+cat >> .git/config <<EOF
+[bugzilla]
+ username = $2
+ password = $3
+EOF
+
+if [[ $1 == "commit-queue" ]];then
+cat >> .git/config <<EOF
+[svn-remote "svn"]
+ url = http://svn.webkit.org/repository/webkit
+ fetch = trunk:refs/remotes/origin/master
+[user]
+ email = commit-queue@webkit.org
+ name = Commit Queue
+EOF
+fi
+
+cd $CWD
diff --git a/Tools/EWSTools/cold-boot.sh b/Tools/EWSTools/build-vm.sh
index 81516b4b0..62daca007 100755
--- a/Tools/EWSTools/cold-boot.sh
+++ b/Tools/EWSTools/build-vm.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2012 Google Inc. All rights reserved.
+# Copyright (c) 2013 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
@@ -11,9 +11,6 @@
# 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
@@ -27,13 +24,15 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-if [[ $# -ne 4 ]];then
-echo "Usage: cold-boot.sh QUEUE_TYPE BOT_ID BUGZILLA_USERNAME BUGZILLA_PASSWORD"
+if [[ $# -ne 0 ]];then
+echo "Usage: build-vm.sh"
exit 1
fi
+CWD=$(pwd)
+
# Format the disk
-cat <<EOF | sudo fdisk /dev/vdb
+cat <<EOF | sudo fdisk /dev/sdb
n
p
1
@@ -42,8 +41,8 @@ p
w
EOF
-sudo mkfs.ext4 /dev/vdb1
-sudo mount /dev/vdb1 /mnt
+sudo mkfs.ext4 /dev/sdb1
+sudo mount /dev/sdb1 /mnt
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
@@ -58,29 +57,7 @@ cd /mnt
sudo mkdir -p git
sudo chown $USER git
sudo chgrp $USER git
-cd git
-
-git clone http://git.chromium.org/external/Webkit.git
-mv Webkit webkit-$1
-cd webkit-$1
-
-cat >> .git/config <<EOF
-[bugzilla]
- username = $3
- password = $4
-EOF
-if [[ $1 == "commit-queue" ]];then
-cat >> .git/config <<EOF
-[svn-remote "svn"]
- url = http://svn.webkit.org/repository/webkit
- fetch = trunk:refs/remotes/origin/master
-[user]
- email = commit-queue@webkit.org
- name = Commit Queue
-EOF
-fi
+sudo chmod 644 /etc/hosts
-cd ~/tools
-echo "screen -t kr ./start-queue.sh" $1 $2 > screen-config
-bash boot.sh
+cd $CWD
diff --git a/Tools/EWSTools/configure-clang-linux.sh b/Tools/EWSTools/configure-clang-linux.sh
new file mode 100755
index 000000000..049c206eb
--- /dev/null
+++ b/Tools/EWSTools/configure-clang-linux.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+# Copyright (c) 2013 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.
+#
+# 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.
+
+if [[ $# -ne 1 ]];then
+ echo "Usage: configure-clang-linux.sh QUEUE_TYPE"
+ exit 1
+fi
+
+bash /mnt/git/$QUEUE_TYPE/Source/WebKit/chromium/tools/clang/scripts/update.sh
+export builddir_name=llvm
+export GYP_DEFINES='clang=1' \ No newline at end of file
diff --git a/Tools/EWSTools/configure-git-svn.sh b/Tools/EWSTools/configure-git-svn.sh
new file mode 100755
index 000000000..0416125ca
--- /dev/null
+++ b/Tools/EWSTools/configure-git-svn.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+# Copyright (c) 2013 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.
+#
+# 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.
+
+if [[ $# -ne 1 ]]; then
+ echo "Usage: configure-git-svn.sh QUEUE_TYPE"
+ exit 1
+fi
+
+QUEUE_TYPE=$1
+
+CWD="$(pwd)"
+cd /mnt/git/webkit-$QUEUE_TYPE
+
+# These commands come from the WebKit wiki: http://trac.webkit.org/wiki/UsingGitWithWebKit
+git svn init --prefix=origin/ -T trunk http://svn.webkit.org/repository/webkit
+git config --replace svn-remote.svn.fetch trunk:refs/remotes/origin/master
+git svn fetch --local
+
+cd "$CWD" \ No newline at end of file
diff --git a/Tools/EWSTools/configure-git-user.sh b/Tools/EWSTools/configure-git-user.sh
new file mode 100755
index 000000000..0c29360aa
--- /dev/null
+++ b/Tools/EWSTools/configure-git-user.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+# Copyright (c) 2013 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.
+#
+# 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.
+
+if [[ $# -ne 3 ]]; then
+ echo "Usage: configure-git-user.sh QUEUE_TYPE NAME EMAIL"
+ exit 1
+fi
+
+QUEUE_TYPE=$1
+NAME="$2"
+EMAIL=$3
+
+if [[ "$NAME" != *" "* ]]; then
+ echo "NAME parameter must contain a space."
+ exit 1
+fi
+
+cat >> /mnt/git/webkit-$QUEUE_TYPE/.git/config <<EOF
+[user]
+ name = $NAME
+ email = $EMAIL
+EOF
diff --git a/Tools/EWSTools/configure-svn-config.sh b/Tools/EWSTools/configure-svn-config.sh
new file mode 100755
index 000000000..6054e4732
--- /dev/null
+++ b/Tools/EWSTools/configure-svn-config.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (c) 2013 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.
+#
+# 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.
+
+svn export http://svn.webkit.org/repository/webkit/trunk/Tools/svn-config ~/.subversion/config
diff --git a/Tools/EWSTools/screen-config b/Tools/EWSTools/screen-config
index 5c003df2e..5a00fee96 100644
--- a/Tools/EWSTools/screen-config
+++ b/Tools/EWSTools/screen-config
@@ -1,4 +1,4 @@
-screen -t style ./start-queue.sh style-queue
-screen -t qt ./start-queue.sh qt-ews
-screen -t kr ./start-queue.sh chromium-ews
-screen -t gtk ./start-queue.sh gtk-ews
+screen -t style ./start-queue.sh style-queue 10
+screen -t qt ./start-queue.sh qt-ews 10
+screen -t kr ./start-queue.sh chromium-ews 10
+screen -t gtk ./start-queue.sh gtk-ews 10
diff --git a/Tools/Scripts/webkitpy/common/watchlist/watchlistloader.py b/Tools/EWSTools/setup-commit-queue.sh
index aa816e37c..dd17862c9 100644..100755
--- a/Tools/Scripts/webkitpy/common/watchlist/watchlistloader.py
+++ b/Tools/EWSTools/setup-commit-queue.sh
@@ -1,4 +1,6 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
+#!/bin/sh
+# Copyright (c) 2013 Google Inc. All rights reserved.
+# Copyright (C) 2013 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -10,9 +12,6 @@
# 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
@@ -26,18 +25,32 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.common.watchlist.watchlistparser import WatchListParser
+CWD="$(pwd)"
+cd "$(dirname "$0")"
+QUEUE_TYPE=commit-queue
+BUGZILLA_USERNAME=commit-queue@webkit.org
+read -s -p "Bugzilla Password: " BUGZILLA_PASSWORD && echo
+SVN_USERNAME=commit-queue@webkit.org
+read -s -p "Subversion Password: " SVN_PASSWORD && echo
-class WatchListLoader(object):
- def __init__(self, filesystem):
- self._filesystem = filesystem
+svn checkout http://svn.webkit.org/repository/webkit/trunk/Tools/EWSTools tools
+bash tools/configure-svn-config.sh
+bash tools/configure-svn-auth.sh $SVN_USERNAME $SVN_PASSWORD
- def load(self):
- config_path = self._filesystem.dirname(self._filesystem.path_to_module('webkitpy.common.config'))
- watch_list_full_path = self._filesystem.join(config_path, 'watchlist')
- if not self._filesystem.exists(watch_list_full_path):
- raise Exception('Watch list file (%s) not found.' % watch_list_full_path)
+echo "Cloning WebKit git repository, process takes ~30m."
+echo "Note: No status output will be shown via remote pipe."
+git clone git://git.webkit.org/WebKit.git WebKit
+cd WebKit
- watch_list_contents = self._filesystem.read_text_file(watch_list_full_path)
- return WatchListParser().parse(watch_list_contents)
+cat >> .git/config <<EOF
+[bugzilla]
+ username = $BUGZILLA_USERNAME
+ password = $BUGZILLA_PASSWORD
+[svn-remote "svn"]
+ url = http://svn.webkit.org/repository/webkit
+ fetch = trunk:refs/remotes/origin/master
+[user]
+ email = commit-queue@webkit.org
+ name = Commit Queue
+EOF
diff --git a/Tools/EWSTools/start-queue-mac.sh b/Tools/EWSTools/start-queue-mac.sh
new file mode 100755
index 000000000..5fc05a317
--- /dev/null
+++ b/Tools/EWSTools/start-queue-mac.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# Copyright (c) 2012 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.
+
+if [[ $# -lt 3 ]]; then
+ echo "Usage: start-queue-loop.sh QUEUE_NAME BOT_ID RESET_AFTER_ITERATION [QUEUE_PARAMS]"
+ exit 1
+fi
+
+QUEUE_NAME=$1
+BOT_ID=$2
+RESET_AFTER_ITERATION=$3
+shift 3
+QUEUE_PARAMS="$@"
+
+while :
+do
+ # Delete log files older than 14 days, move aside the main mac-ews.log file to prevent it from growing extra large.
+ cd /Volumes/Data/EWS/$QUEUE_NAME-logs
+ find . -mtime +14 -delete
+ rm $QUEUE_NAME.old
+ mv $QUEUE_NAME.log $QUEUE_NAME.old
+ cd /Volumes/Data/EWS/Webkit
+
+ # Delete WebKitBuild to force a clean build
+ rm -rf /Volumes/Data/EWS/WebKit/WebKitBuild
+
+ # This somewhat quirky sequence of steps seems to clear up all the broken
+ # git situations we've gotten ourself into in the past.
+ git clean -f # Remove any left-over layout test results, added files, etc.
+ git rebase --abort # If we got killed during a git rebase, we need to clean up.
+ git fetch origin # Avoid updating the working copy to a stale revision.
+ git checkout origin/master -f
+ git branch -D master
+ git checkout origin/master -b master
+
+ # Most queues auto-update as part of their normal operation, but updating
+ # here makes sure that we get the latest version of the master process.
+ ./Tools/Scripts/update-webkit
+
+ # test-webkitpy has code to remove orphaned .pyc files, so we
+ # run it before running webkit-patch to avoid stale .pyc files
+ # preventing webkit-patch from launching.
+ ./Tools/Scripts/test-webkitpy
+
+ # We use --exit-after-iteration to pick up any changes to webkit-patch, including
+ # changes to the contributors.json file.
+ ./Tools/Scripts/webkit-patch $QUEUE_NAME --bot-id=$BOT_ID --no-confirm --exit-after-iteration $RESET_AFTER_ITERATION $QUEUE_PARAMS
+done
diff --git a/Tools/EWSTools/start-queue-win.sh b/Tools/EWSTools/start-queue-win.sh
new file mode 100755
index 000000000..bd08cd117
--- /dev/null
+++ b/Tools/EWSTools/start-queue-win.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+export WEBKIT_BUGZILLA_USERNAME=$1
+export WEBKIT_BUGZILLA_PASSWORD=$2
+export BOT_ID=$3
+
+function error_handler()
+{
+ start_ews
+}
+
+function start_ews()
+{
+ trap 'error_handler ${LINENO} $?' ERR
+
+ while :
+ do
+ date
+ echo "TASK: cleaning up old log files."
+ cd ~/win-ews-logs
+ rm -rf win-ews.old
+ mv win-ews.log win-ews.old
+ find ~/win-ews-logs -mtime +7 -exec rm -f {} \;
+ echo "TASK: Starting up"
+ cd ~/WebKit
+ echo "TASK: Cleaning WebKitBuild"
+ rm -rf WebKitBuild
+ date
+ echo "TASK: Cleaning up"
+ svn cleanup
+ date
+ echo "TASK: svn revert -R *"
+ svn revert -R *
+ date
+ echo "TASK: svn status"
+ svn status | grep "?" | awk '{print $2}' | xargs rm -rf
+ date
+ echo "TASK: webkit-patch clean"
+ ~/WebKit/Tools/Scripts/webkit-patch clean
+ date
+ echo "TASK: svn up --non-interactive"
+ svn up --non-interactive
+ date
+ echo "TASK: kill orphaned tasks"
+ taskkill.exe /f /im cl.exe
+ echo "TASK: webkit-patch win-ews"
+ ~/WebKit/Tools/Scripts/webkit-patch win-ews --bot-id=$BOT_ID --no-confirm --exit-after-iteration 10
+ echo "TASK: kill old processes"
+ ~/WebKit/Tools/BuildSlaveSupport/kill-old-processes
+ done
+}
+
+start_ews \ No newline at end of file
diff --git a/Tools/EWSTools/start-queue.sh b/Tools/EWSTools/start-queue.sh
index 801de996f..c1d544de1 100755
--- a/Tools/EWSTools/start-queue.sh
+++ b/Tools/EWSTools/start-queue.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (c) 2012 Google Inc. All rights reserved.
+# Copyright (c) 2013 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
@@ -11,9 +11,6 @@
# 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
@@ -27,31 +24,63 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+USAGE="Usage: start-queue-loop.sh [OPTIONS] QUEUE_NAME BOT_ID RESET_AFTER_ITERATION
+ -r RESET_SCRIPT A bash script to be run every cycle just before the queue starts up again.
+ -p QUEUE_PARAMS Additional parameters to be given to the queue's execution command."
+
+while getopts "r:p:" FLAG
+do
+ case $FLAG in
+ r) RESET_SCRIPT=$OPTARG;;
+ p) QUEUE_PARAMS=$OPTARG;;
+ esac
+done
+
+shift $((OPTIND-1))
+
+if [[ "$#" -ne 3 ]]; then
+ echo "$USAGE"
+ exit 1
+fi
+
QUEUE_NAME=$1
BOT_ID=$2
+RESET_AFTER_ITERATION=$3
cd /mnt/git/webkit-$QUEUE_NAME
while :
do
- # This somewhat quirky sequence of steps seems to clear up all the broken
- # git situations we've gotten ourself into in the past.
- git clean -f # Remove any left-over layout test results, added files, etc.
- git rebase --abort # If we got killed during a git rebase, we need to clean up.
- git fetch origin # Avoid updating the working copy to a stale revision.
- git checkout origin/master -f
- git branch -D master
- git checkout origin/master -b master
-
- # Most queues auto-update as part of their normal operation, but updating
- # here makes sure that we get the latest version of the master process.
- ./Tools/Scripts/update-webkit
-
- # test-webkitpy has code to remove orphaned .pyc files, so we
- # run it before running webkit-patch to avoid stale .pyc files
- # preventing webkit-patch from launching.
- ./Tools/Scripts/test-webkitpy
-
- # We use --exit-after-iteration to pick up any changes to webkit-patch, including
- # changes to the committers.py file.
- ./Tools/Scripts/webkit-patch $QUEUE_NAME --bot-id=$BOT_ID --no-confirm --exit-after-iteration 10
+ # This clears any temporary file leaks after running tests.
+ # Not the nicest solution but it will keep the queues running instead of
+ # filling up all remaining disk space.
+ # NOTE: This will clear any Chromium browser temporary files running on the
+ # machine as well. Not advised to run this while using Chrome.
+ find /tmp -name ".org.chromium.Chromium.*" | xargs rm -rf
+
+ # This somewhat quirky sequence of steps seems to clear up all the broken
+ # git situations we've gotten ourself into in the past.
+ git clean -f -d # Remove any left-over layout test results, added files, etc.
+ git rebase --abort # If we got killed during a git rebase, we need to clean up.
+ git fetch origin # Avoid updating the working copy to a stale revision.
+ git checkout origin/master -f
+ git branch -D master
+ git checkout origin/master -b master
+
+ # Most queues auto-update as part of their normal operation, but updating
+ # here makes sure that we get the latest version of the master process.
+ ./Tools/Scripts/update-webkit
+
+ # test-webkitpy has code to remove orphaned .pyc files, so we
+ # run it before running webkit-patch to avoid stale .pyc files
+ # preventing webkit-patch from launching.
+ ./Tools/Scripts/test-webkitpy
+
+ # Run the given reset script.
+ if [[ -n "$RESET_SCRIPT" ]]; then
+ bash "$RESET_SCRIPT"
+ fi
+
+ # We use --exit-after-iteration to pick up any changes to webkit-patch, including
+ # changes to the contributors.json file.
+ ./Tools/Scripts/webkit-patch $QUEUE_NAME --bot-id=$BOT_ID --no-confirm --exit-after-iteration $RESET_AFTER_ITERATION $QUEUE_PARAMS
done
diff --git a/Tools/EWebLauncher/CMakeLists.txt b/Tools/EWebLauncher/CMakeLists.txt
index 817231df2..51266adaf 100644
--- a/Tools/EWebLauncher/CMakeLists.txt
+++ b/Tools/EWebLauncher/CMakeLists.txt
@@ -1,13 +1,13 @@
-SET(EWebLauncher_SOURCES
+set(EWebLauncher_SOURCES
${TOOLS_DIR}/EWebLauncher/url_bar.c
${TOOLS_DIR}/EWebLauncher/url_utils.c
${TOOLS_DIR}/EWebLauncher/main.c
)
-SET(EWebLauncher_LIBRARIES
- ${JavaScriptCore_LIBRARY_NAME}
- ${WebCore_LIBRARY_NAME}
- ${WebKit_LIBRARY_NAME}
+set(EWebLauncher_LIBRARIES
+ JavaScriptCore
+ WebCore
+ WebKit
${CAIRO_LIBRARIES}
${ECORE_LIBRARIES}
${ECORE_EVAS_LIBRARIES}
@@ -15,15 +15,16 @@ SET(EWebLauncher_LIBRARIES
${ECORE_X_LIBRARIES}
${EDJE_LIBRARIES}
${EINA_LIBRARIES}
+ ${EO_LIBRARIES}
${EVAS_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${LIBXSLT_LIBRARIES}
+ ${LIBXSLT_LIBRARIES} -lm
${SQLITE_LIBRARIES}
${GLIB_LIBRARIES}
${LIBSOUP_LIBRARIES}
)
-SET(EWebLauncher_INCLUDE_DIRECTORIES
+set(EWebLauncher_INCLUDE_DIRECTORIES
"${WEBKIT_DIR}/efl/ewk"
${CAIRO_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
@@ -32,16 +33,15 @@ SET(EWebLauncher_INCLUDE_DIRECTORIES
${ECORE_X_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
+ ${EO_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
-ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
+include_directories(${EWebLauncher_INCLUDE_DIRECTORIES})
+add_executable(EWebLauncher ${EWebLauncher_SOURCES})
+target_link_libraries(EWebLauncher ${EWebLauncher_LIBRARIES})
+set_target_properties(EWebLauncher PROPERTIES FOLDER "Tools")
-INCLUDE_DIRECTORIES(${EWebLauncher_INCLUDE_DIRECTORIES})
-ADD_EXECUTABLE(EWebLauncher ${EWebLauncher_SOURCES})
-TARGET_LINK_LIBRARIES(EWebLauncher ${EWebLauncher_LIBRARIES})
-SET_TARGET_PROPERTIES(EWebLauncher PROPERTIES FOLDER "Tools")
-
-ADD_DEPENDENCIES(EWebLauncher ControlTheme)
+add_dependencies(EWebLauncher ControlTheme)
diff --git a/Tools/EWebLauncher/ControlTheme/CMakeLists.txt b/Tools/EWebLauncher/ControlTheme/CMakeLists.txt
index f1407335b..52ef72e32 100644
--- a/Tools/EWebLauncher/ControlTheme/CMakeLists.txt
+++ b/Tools/EWebLauncher/ControlTheme/CMakeLists.txt
@@ -1,6 +1,6 @@
-SET(ControlTheme_DIR "${TOOLS_DIR}/EWebLauncher/ControlTheme")
+set(ControlTheme_DIR "${TOOLS_DIR}/EWebLauncher/ControlTheme")
-ADD_CUSTOM_COMMAND(
+add_custom_command(
OUTPUT ${THEME_BINARY_DIR}/entry.edj
COMMAND ${EDJE_CC_EXECUTABLE} -v ${ControlTheme_DIR}/entry.edc ${THEME_BINARY_DIR}/entry.edj
DEPENDS
@@ -8,4 +8,4 @@ ADD_CUSTOM_COMMAND(
VERBATIM
)
-ADD_CUSTOM_TARGET(ControlTheme DEPENDS ${THEME_BINARY_DIR}/entry.edj)
+add_custom_target(ControlTheme DEPENDS ${THEME_BINARY_DIR}/entry.edj)
diff --git a/Tools/EWebLauncher/main.c b/Tools/EWebLauncher/main.c
index 684800a1c..b9b5b5297 100644
--- a/Tools/EWebLauncher/main.c
+++ b/Tools/EWebLauncher/main.c
@@ -56,7 +56,7 @@
#define info(format, args...) \
do { \
if (verbose) \
- printf(format, ##args); \
+ printf(format"\n", ##args); \
} while (0)
#define MIN_ZOOM_LEVEL 0
@@ -115,6 +115,8 @@ static const Ecore_Getopt options = {
ecore_getopt_callback_ecore_evas_list_engines, NULL),
ECORE_GETOPT_CHOICE
('b', "backing-store", "choose backing store to use.", backingStores),
+ ECORE_GETOPT_STORE_DOUBLE
+ ('r', "device-pixel-ratio", "Ratio between the CSS units and device pixels."),
ECORE_GETOPT_STORE_DEF_BOOL
('c', "encoding-detector", "enable/disable encoding detector", 0),
ECORE_GETOPT_STORE_DEF_BOOL
@@ -148,6 +150,7 @@ typedef struct _User_Arguments {
char *engine;
Eina_Bool quitOption;
char *backingStore;
+ float device_pixel_ratio;
Eina_Bool enableEncodingDetector;
Eina_Bool enableTiledBackingStore;
Eina_Bool isFlattening;
@@ -323,16 +326,16 @@ on_load_finished(void *user_data, Evas_Object *webview, void *event_info)
const Ewk_Frame_Load_Error *err = (const Ewk_Frame_Load_Error *)event_info;
if (!err)
- info("Succeeded loading page.\n");
+ info("Succeeded loading page.");
else if (err->is_cancellation)
- info("Load was cancelled.\n");
+ info("Load was cancelled.");
else
- info("Failed loading page: %d %s \"%s\", url=%s\n",
+ info("Failed loading page: %d %s \"%s\", url=%s",
err->code, err->domain, err->description, err->failing_url);
currentZoom = ewk_view_zoom_get(webview);
currentZoomLevel = nearest_zoom_level_get(currentZoom);
- info("WebCore Zoom=%f, currentZoomLevel=%d\n", currentZoom, currentZoomLevel);
+ info("WebCore Zoom=%f, currentZoomLevel=%d", currentZoom, currentZoomLevel);
}
static void
@@ -429,13 +432,13 @@ static void
on_tooltip_text_set(void* user_data, Evas_Object* webview, void* event_info)
{
const char *text = (const char *)event_info;
- info("Tooltip is set: %s\n", text);
+ info("Tooltip is set: %s", text);
}
static void
on_tooltip_text_unset(void* user_data, Evas_Object* webview, void* event_info)
{
- info("Tooltip is unset\n");
+ info("Tooltip is unset");
}
static void
@@ -443,13 +446,13 @@ on_inputmethod_changed(void* user_data, Evas_Object* webview, void* event_info)
{
Eina_Bool active = (Eina_Bool)(long)event_info;
unsigned int imh;
- info("Keyboard changed: %d\n", active);
+ info("Keyboard changed: %d", active);
if (!active)
return;
imh = ewk_view_imh_get(webview);
- info(" Keyboard flags: %#.2x\n", imh);
+ info(" Keyboard flags: %#.2x", imh);
}
@@ -474,13 +477,13 @@ on_mouse_down(void* data, Evas* e, Evas_Object* webview, void* event_info)
static void
on_focus_out(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- info("the webview lost keyboard focus\n");
+ info("the webview lost keyboard focus");
}
static void
on_focus_in(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
- info("the webview gained keyboard focus\n");
+ info("the webview gained keyboard focus");
}
static void
@@ -494,12 +497,14 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
NULL
};
static int currentEncoding = -1;
- Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(e), "Control");
+ const Evas_Modifier *mod = evas_key_modifier_get(e);
+ Eina_Bool ctrlPressed = evas_key_modifier_is_set(mod, "Control");
+ Eina_Bool altPressed = evas_key_modifier_is_set(mod, "Alt");
if (!strcmp(ev->key, "Escape")) {
closeWindow(app->ee);
- } else if (!strcmp(ev->key, "F1")) {
- info("Back (F1) was pressed\n");
+ } else if (!strcmp(ev->key, "Left") && altPressed) {
+ info("Back (Alt+Left) was pressed");
if (ewk_view_back_possible(obj)) {
Ewk_History *history = ewk_view_history_get(obj);
Eina_List *list = ewk_history_back_list_get(history);
@@ -507,9 +512,9 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
ewk_history_item_list_free(list);
ewk_view_back(obj);
} else
- info("Back ignored: No back history\n");
- } else if (!strcmp(ev->key, "F2")) {
- info("Forward (F2) was pressed\n");
+ info("Back ignored: No back history");
+ } else if (!strcmp(ev->key, "Right") && altPressed) {
+ info("Forward (Alt+Right) was pressed");
if (ewk_view_forward_possible(obj)) {
Ewk_History *history = ewk_view_history_get(obj);
Eina_List *list = ewk_history_forward_list_get(history);
@@ -517,7 +522,7 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
ewk_history_item_list_free(list);
ewk_view_forward(obj);
} else
- info("Forward ignored: No forward history\n");
+ info("Forward ignored: No forward history");
} else if (!strcmp(ev->key, "F3")) {
currentEncoding++;
currentEncoding %= (sizeof(encodings) / sizeof(encodings[0]));
@@ -570,29 +575,29 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
}
} else if (!strcmp(ev->key, "F5")) {
- info("Reload (F5) was pressed, reloading.\n");
+ info("Reload (F5) was pressed, reloading.");
ewk_view_reload(obj);
} else if (!strcmp(ev->key, "F6")) {
- info("Stop (F6) was pressed, stop loading.\n");
+ info("Stop (F6) was pressed, stop loading.");
ewk_view_stop(obj);
} else if (!strcmp(ev->key, "F12")) {
Eina_Bool status = ewk_view_setting_spatial_navigation_get(obj);
ewk_view_setting_spatial_navigation_set(obj, !status);
- info("Command::keyboard navigation toggle\n");
+ info("Command::keyboard navigation toggle");
} else if ((!strcmp(ev->key, "minus") || !strcmp(ev->key, "KP_Subtract")) && ctrlPressed) {
if (currentZoomLevel > MIN_ZOOM_LEVEL && zoom_level_set(obj, currentZoomLevel - 1))
currentZoomLevel--;
- info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f\n", zoomLevels[currentZoomLevel] / 100.0);
+ info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f", zoomLevels[currentZoomLevel] / 100.0);
} else if ((!strcmp(ev->key, "equal") || !strcmp(ev->key, "KP_Add")) && ctrlPressed) {
if (currentZoomLevel < MAX_ZOOM_LEVEL && zoom_level_set(obj, currentZoomLevel + 1))
currentZoomLevel++;
- info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f\n", zoomLevels[currentZoomLevel] / 100.0);
+ info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f", zoomLevels[currentZoomLevel] / 100.0);
} else if (!strcmp(ev->key, "0") && ctrlPressed) {
if (zoom_level_set(obj, DEFAULT_ZOOM_LEVEL))
currentZoomLevel = DEFAULT_ZOOM_LEVEL;
- info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f\n", zoomLevels[currentZoomLevel] / 100.0);
+ info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f", zoomLevels[currentZoomLevel] / 100.0);
} else if (!strcmp(ev->key, "n") && ctrlPressed) {
- info("Create new window (Ctrl+n) was pressed.\n");
+ info("Create new window (Ctrl+n) was pressed.");
browserCreate("http://www.google.com", app->userArgs);
} else if (!strcmp(ev->key, "g") && ctrlPressed ) {
Evas_Coord x, y, w, h;
@@ -604,7 +609,7 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
y -= h;
w *= 4;
h *= 4;
- info("Pre-render %d,%d + %dx%d\n", x, y, w, h);
+ info("Pre-render %d,%d + %dx%d", x, y, w, h);
ewk_view_pre_render_region(obj, x, y, w, h, zoom);
} else if (!strcmp(ev->key, "r") && ctrlPressed) {
info("Pre-render 1 extra column/row with current zoom");
@@ -652,10 +657,10 @@ on_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info)
} else if (!strcmp(ev->key, "i") && ctrlPressed) {
Evas_Object *inspector_view = ewk_view_inspector_view_get(obj);
if (inspector_view) {
- info("Web Inspector close\n");
+ info("Web Inspector close");
ewk_view_inspector_close(obj);
} else {
- info("Web Inspector show\n");
+ info("Web Inspector show");
ewk_view_inspector_show(obj);
}
}
@@ -846,10 +851,10 @@ windowCreate(User_Arguments *userArgs)
if (userArgs->backingStore && !strcasecmp(userArgs->backingStore, "tiled")) {
app->browser = ewk_view_tiled_add(app->evas);
- info("backing store: tiled\n");
+ info("backing store: tiled");
} else {
app->browser = ewk_view_single_add(app->evas);
- info("backing store: single\n");
+ info("backing store: single");
ewk_view_setting_tiled_backing_store_enabled_set(app->browser, userArgs->enableTiledBackingStore);
}
@@ -861,6 +866,7 @@ windowCreate(User_Arguments *userArgs)
ewk_view_setting_local_storage_database_path_set(app->browser, userArgs->databasePath);
ewk_view_setting_enable_frame_flattening_set(app->browser, userArgs->isFlattening);
ewk_view_setting_encoding_detector_set(app->browser, userArgs->enableEncodingDetector);
+ ewk_view_device_pixel_ratio_set(app->browser, userArgs->device_pixel_ratio);
app->userArgs = userArgs;
app->url_bar = NULL;
@@ -911,7 +917,7 @@ main_signal_exit(void *data, int ev_type, void *ev)
static char *
findThemePath(const char *theme)
{
- const char *default_theme = THEME_DIR"/default.edj";
+ const char *default_theme = TEST_THEME_DIR "/default.edj";
char *rpath;
struct stat st;
@@ -936,6 +942,7 @@ parseUserArguments(int argc, char *argv[], User_Arguments *userArgs)
userArgs->engine = NULL;
userArgs->quitOption = EINA_FALSE;
userArgs->backingStore = (char *)backingStores[1];
+ userArgs->device_pixel_ratio = 1.0;
userArgs->enableEncodingDetector = EINA_FALSE;
userArgs->enableTiledBackingStore = EINA_FALSE;
userArgs->isFlattening = EINA_FALSE;
@@ -951,6 +958,7 @@ parseUserArguments(int argc, char *argv[], User_Arguments *userArgs)
ECORE_GETOPT_VALUE_STR(userArgs->engine),
ECORE_GETOPT_VALUE_BOOL(userArgs->quitOption),
ECORE_GETOPT_VALUE_STR(userArgs->backingStore),
+ ECORE_GETOPT_VALUE_DOUBLE(userArgs->device_pixel_ratio),
ECORE_GETOPT_VALUE_BOOL(userArgs->enableEncodingDetector),
ECORE_GETOPT_VALUE_BOOL(userArgs->isFlattening),
ECORE_GETOPT_VALUE_BOOL(userArgs->isFullscreen),
@@ -990,17 +998,11 @@ main(int argc, char *argv[])
User_Arguments userArgs;
- if (!ecore_evas_init())
+ if (!ewk_init())
return EXIT_FAILURE;
- if (!edje_init()) {
- ecore_evas_shutdown();
- return EXIT_FAILURE;
- }
-
if (!ecore_file_init()) {
- edje_shutdown();
- ecore_evas_shutdown();
+ ewk_shutdown();
return EXIT_FAILURE;
}
@@ -1014,7 +1016,6 @@ main(int argc, char *argv[])
if (!themePath)
return quit(EINA_FALSE, "ERROR: could not find theme.\n");
- ewk_init();
tmp = getenv("TMPDIR");
if (!tmp)
tmp = "/tmp";
@@ -1042,6 +1043,7 @@ main(int argc, char *argv[])
ecore_main_loop_begin();
+ ecore_file_shutdown();
ewk_shutdown();
return quit(EINA_TRUE, NULL);
diff --git a/Tools/EWebLauncher/url_bar.c b/Tools/EWebLauncher/url_bar.c
index 408b5acea..a1202fa5d 100644
--- a/Tools/EWebLauncher/url_bar.c
+++ b/Tools/EWebLauncher/url_bar.c
@@ -103,7 +103,7 @@ url_bar_add(Evas_Object *webView, int width)
evas_object_color_set(url_bar->area, 255, 255, 255, 255);
url_bar->entry = edje_object_add(evas);
- Eina_Bool ret = edje_object_file_set(url_bar->entry, THEME_DIR"/entry.edj", "control/entry/base/default");
+ Eina_Bool ret = edje_object_file_set(url_bar->entry, TEST_THEME_DIR "/entry.edj", "control/entry/base/default");
if (!ret) {
evas_object_del(url_bar->area);
diff --git a/Tools/GNUmakefile.am b/Tools/GNUmakefile.am
index 80ab04c2b..3f24b138d 100644
--- a/Tools/GNUmakefile.am
+++ b/Tools/GNUmakefile.am
@@ -1,6 +1,11 @@
noinst_PROGRAMS += \
+ Programs/ImageDiff
+
+if ENABLE_WEBKIT1
+noinst_PROGRAMS += \
Programs/DumpRenderTree \
Programs/GtkLauncher
+endif
# GtkLauncher
Programs_GtkLauncher_CPPFLAGS = \
@@ -21,6 +26,7 @@ Programs_GtkLauncher_CFLAGS = \
-ansi \
-fno-strict-aliasing \
$(global_cflags) \
+ $(FREETYPE_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBSOUP_CFLAGS) \
$(GSTREAMER_CFLAGS)
@@ -28,6 +34,7 @@ Programs_GtkLauncher_CFLAGS = \
Programs_GtkLauncher_LDADD = \
libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ $(FREETYPE_LIBS) \
$(GTK_LIBS) \
$(GLIB_LIBS) \
$(LIBSOUP_LIBS) \
@@ -47,32 +54,43 @@ libWebCoreInternals_la_SOURCES = \
Source/WebCore/bindings/js/JSDOMWrapper.cpp \
Source/WebCore/bindings/js/JSDOMWrapper.h \
Source/WebCore/testing/MallocStatistics.h \
+ Source/WebCore/testing/MemoryInfo.h \
Source/WebCore/testing/Internals.cpp \
Source/WebCore/testing/Internals.h \
Source/WebCore/testing/InternalSettings.cpp \
Source/WebCore/testing/InternalSettings.h \
- Source/WebCore/testing/MockPagePopupDriver.cpp \
- Source/WebCore/testing/MockPagePopupDriver.h \
+ Source/WebCore/testing/TypeConversions.h \
Source/WebCore/testing/js/WebCoreTestSupport.cpp \
Source/WebCore/testing/js/WebCoreTestSupport.h
libwebcoreinternals_built_sources += \
+ DerivedSources/WebCore/InternalSettingsGenerated.cpp \
+ DerivedSources/WebCore/InternalSettingsGenerated.h \
DerivedSources/WebCore/JSMallocStatistics.cpp \
DerivedSources/WebCore/JSMallocStatistics.h \
+ DerivedSources/WebCore/JSMemoryInfo.cpp \
+ DerivedSources/WebCore/JSMemoryInfo.h \
DerivedSources/WebCore/JSInternals.cpp \
DerivedSources/WebCore/JSInternals.h \
DerivedSources/WebCore/JSInternalSettings.cpp \
- DerivedSources/WebCore/JSInternalSettings.h
+ DerivedSources/WebCore/JSInternalSettings.h \
+ DerivedSources/WebCore/JSInternalSettingsGenerated.cpp \
+ DerivedSources/WebCore/JSInternalSettingsGenerated.h \
+ DerivedSources/WebCore/JSTypeConversions.cpp \
+ DerivedSources/WebCore/JSTypeConversions.h
nodist_libWebCoreInternals_la_SOURCES = $(libwebcoreinternals_built_sources)
BUILT_SOURCES += $(libwebcoreinternals_built_sources)
libWebCoreInternals_la_CPPFLAGS = \
$(global_cppflags) \
+ $(platform_cppflags) \
+ $(platformgtk_cppflags) \
$(webcore_cppflags) \
$(webcoregtk_cppflags) \
$(javascriptcore_cppflags) \
$(CAIRO_CFLAGS) \
+ $(FREETYPE_CFLAGS) \
$(LIBSOUP_CFLAGS) \
$(PANGO_CFLAGS) \
-I$(top_builddir)/DerivedSources \
@@ -91,6 +109,7 @@ Programs_DumpRenderTree_CPPFLAGS = \
$(global_cppflags) \
-DTOP_LEVEL_DIR=\"${shell pwd}/${srcdir}\" \
-I$(srcdir)/Tools/DumpRenderTree \
+ -I$(srcdir)/Tools/DumpRenderTree/atk \
-I$(srcdir)/Tools/DumpRenderTree/cairo \
-I$(srcdir)/Tools/DumpRenderTree/gtk \
-I$(srcdir)/Source/WebKit/gtk \
@@ -99,6 +118,8 @@ Programs_DumpRenderTree_CPPFLAGS = \
-I$(top_builddir)/DerivedSources \
-I$(top_builddir)/Source/WebKit/gtk \
$(javascriptcore_cppflags) \
+ $(platform_cppflags) \
+ $(platformgtk_cppflags) \
$(webcore_cppflags)
if TARGET_X11
@@ -108,6 +129,7 @@ Programs_DumpRenderTree_CPPFLAGS += \
endif
Programs_DumpRenderTree_SOURCES = \
+ Source/WebCore/platform/gtk/GtkVersioning.c \
Tools/DumpRenderTree/DumpRenderTree.h \
Tools/DumpRenderTree/DumpRenderTreeCommon.cpp \
Tools/DumpRenderTree/DumpRenderTreePrefix.h \
@@ -130,10 +152,12 @@ Programs_DumpRenderTree_SOURCES = \
Tools/DumpRenderTree/WorkQueue.h \
Tools/DumpRenderTree/WorkQueueItem.h \
Tools/DumpRenderTree/config.h \
+ Tools/DumpRenderTree/atk/AccessibilityCallbacks.h \
+ Tools/DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp \
+ Tools/DumpRenderTree/atk/AccessibilityControllerAtk.cpp \
+ Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp \
Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.cpp \
Tools/DumpRenderTree/cairo/PixelDumpSupportCairo.h \
- Tools/DumpRenderTree/gtk/AccessibilityCallbacks.h \
- Tools/DumpRenderTree/gtk/AccessibilityCallbacks.cpp \
Tools/DumpRenderTree/gtk/AccessibilityControllerGtk.cpp \
Tools/DumpRenderTree/gtk/AccessibilityUIElementGtk.cpp \
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp \
@@ -149,8 +173,7 @@ Programs_DumpRenderTree_SOURCES = \
Tools/DumpRenderTree/gtk/SelfScrollingWebKitWebView.h \
Tools/DumpRenderTree/gtk/TextInputController.h \
Tools/DumpRenderTree/gtk/TextInputController.cpp \
- Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp \
- Source/WebCore/platform/gtk/GtkVersioning.c
+ Tools/DumpRenderTree/gtk/WorkQueueItemGtk.cpp
Programs_DumpRenderTree_CXXFLAGS = \
$(global_cxxflags) \
@@ -167,6 +190,8 @@ Programs_DumpRenderTree_CFLAGS = \
Programs_DumpRenderTree_LDADD = \
libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ libPlatform.la \
+ libPlatformGtk.la \
libWebCorePlatform.la \
libWebCoreModules.la \
libWebCoreInternals.la \
@@ -184,10 +209,35 @@ Programs_DumpRenderTree_LDFLAGS = \
-no-fast-install \
-no-install
+# ImageDiff
+Programs_ImageDiff_CPPFLAGS = $(global_cppflags)
+
+Programs_ImageDiff_SOURCES = \
+ Tools/ImageDiff/gtk/ImageDiff.cpp
+
+Programs_ImageDiff_CXXFLAGS = \
+ $(global_cxxflags) \
+ $(global_cppflags) \
+ $(Programs_ImageDiff_CFLAGS)
+
+Programs_ImageDiff_CFLAGS = \
+ -fno-strict-aliasing \
+ $(global_cflags) \
+ $(GLOBALDEPS_CFLAGS) \
+ $(GTK_CFLAGS)
+
+Programs_ImageDiff_LDADD = \
+ $(GTK_LIBS)
+
+Programs_ImageDiff_LDFLAGS = \
+ -no-fast-install \
+ -no-install
+
# clean target
CLEANFILES += \
Programs/DumpRenderTree \
- Programs/GtkLauncher
+ Programs/GtkLauncher \
+ Programs/ImageDiff
if TARGET_X11
@@ -204,7 +254,8 @@ TestNetscapePlugin_libtestnetscapeplugin_la_CPPFLAGS = \
-I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn \
-I$(srcdir)/Tools/DumpRenderTree/TestNetscapePlugIn/unix/ForwardingHeaders \
$(global_cppflags) \
- $(javascriptcore_cppflags)
+ $(javascriptcore_cppflags) \
+ -Wno-missing-format-attribute
# For the Gtk port we want to use XP_UNIX both on X11 and Mac
if !TARGET_WIN32
@@ -224,6 +275,7 @@ TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURL.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetURLWithJavaScriptURLDestroyingPlugin.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/GetUserAgentWithNullNPPFromNPPNew.cpp \
+ Tools/DumpRenderTree/TestNetscapePlugIn/Tests/LogNPPSetWindow.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPDeallocateCalledBeforeNPShutdown.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPNewFails.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/NPPSetWindowCalledDuringDestruction.cpp \
@@ -234,6 +286,7 @@ TestNetscapePlugin_libtestnetscapeplugin_la_SOURCES = \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PassDifferentNPPStruct.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PluginScriptableNPObjectInvokeDefault.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/PrivateBrowsing.cpp \
+ Tools/DumpRenderTree/TestNetscapePlugIn/Tests/ToStringAndValueOfObject.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp \
Tools/DumpRenderTree/TestNetscapePlugIn/PluginTest.h \
@@ -256,10 +309,11 @@ CLEANFILES += TestNetscapePlugin/libtestnetscapeplugin.la
endif
check-local:
- $(top_srcdir)/Tools/Scripts/run-gtk-tests
+ $(top_srcdir)/Tools/Scripts/run-gtk-tests --timeout=-1
EXTRA_DIST += \
Tools/gtk/common.py \
+ Tools/gtk/generate-feature-defines-files \
Tools/gtk/generate-gtkdoc \
Tools/gtk/gtkdoc.py \
Tools/jhbuild/jhbuildutils.py \
@@ -272,27 +326,27 @@ docs: docs-build.stamp
.PHONY : docs
DISTCLEANFILES += docs-build.stamp
-if ENABLE_WEBKIT2
-docs-build.stamp: \
- Source/WebKit/gtk/docs/webkitenvironment.xml \
- Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
- Source/WebKit/gtk/docs/webkitgtk-sections.txt \
+docs_build_stamp_list = \
+ Source/WebKit/gtk/docs/webkitenvironment.xml
+
+if ENABLE_WEBKIT1
+docs_build_stamp_list += \
libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
+ Source/WebKit/gtk/docs/webkitgtk-sections.txt
+endif
+
+if ENABLE_WEBKIT2
+docs_build_stamp_list += \
libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml \
Source/WebKit2/UIProcess/API/gtk/docs/webkit2gtk-sections.txt
- $(srcdir)/Tools/gtk/generate-gtkdoc
- @touch docs-build.stamp
-else
-docs-build.stamp: \
- libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
- Source/WebKit/gtk/docs/webkitenvironment.xml \
- Source/WebKit/gtk/docs/webkitgtk-docs.sgml \
- Source/WebKit/gtk/docs/webkitgtk-sections.txt
- $(srcdir)/Tools/gtk/generate-gtkdoc
- @touch docs-build.stamp
endif
+docs-build.stamp: $(docs_build_stamp_list)
+ CC=$(CC) $(srcdir)/Tools/gtk/generate-gtkdoc
+ @touch docs-build.stamp
+
clean-local: doc-clean-local
doc-clean-local:
@rm -f Documentation/webkitgtk/*~ Documentation/webkitgtk*.bak
@@ -306,6 +360,7 @@ doc-maintainer-clean-local: clean
-@rmdir Documentation
install-data-local:
+if ENABLE_WEBKIT1
@installfiles=`echo ./Documentation/webkitgtk/html/*`; \
if test "$$installfiles" = './Documentation/webkitgtk/html/*'; \
then echo 1>&2 'No documentation to install' ; \
@@ -326,6 +381,7 @@ install-data-local:
$${installdir}/webkitgtk-$(DOC_MODULE_VERSION).devhelp2; \
fi; \
fi
+endif
if ENABLE_WEBKIT2
@installfiles=`echo ./Documentation/webkit2gtk/html/*`; \
if test "$$installfiles" = './Documentation/webkit2gtk/html/*'; \
@@ -348,9 +404,10 @@ if ENABLE_WEBKIT2
fi; \
fi
endif
- @$(AM_V_GEN)$(PYTHON) $(srcdir)/Tools/gtk/generate-gtkdoc --rebase --virtual-root=$${DESTDIR}
+ @$(AM_V_GEN) PKG_CONFIG=$(PKG_CONFIG) $(PYTHON) $(srcdir)/Tools/gtk/generate-gtkdoc --rebase --virtual-root=$${DESTDIR}
uninstall-local:
+if ENABLE_WEBKIT1
@DOC_MODULE_VERSION=`cat ./Documentation/webkitgtk/version.xml`; \
if test -n "$(DOC_MODULE_VERSION)"; then \
installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk-$(DOC_MODULE_VERSION)"; \
@@ -358,6 +415,7 @@ uninstall-local:
installdir="$(DESTDIR)$(HTML_DIR)/webkitgtk"; \
fi; \
rm -rf $${installdir}
+endif
if ENABLE_WEBKIT2
@DOC_MODULE_VERSION=`cat ./Documentation/webkit2gtk/version.xml`; \
if test -n "$(DOC_MODULE_VERSION)"; then \
@@ -369,6 +427,6 @@ if ENABLE_WEBKIT2
endif
if ENABLE_GTK_DOC
-all: docs-build.stamp
+noinst_DATA += docs-build.stamp
endif
diff --git a/Tools/GtkLauncher/main.c b/Tools/GtkLauncher/main.c
index 7470e1714..cef7cd399 100644
--- a/Tools/GtkLauncher/main.c
+++ b/Tools/GtkLauncher/main.c
@@ -25,9 +25,13 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "autotoolsconfig.h"
#include "LauncherInspectorWindow.h"
#include <errno.h>
+#include <gdk/gdkkeysyms.h>
+#ifdef WTF_USE_GSTREAMER
#include <gst/gst.h>
+#endif
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
@@ -104,6 +108,11 @@ static void goForwardCb(GtkWidget* widget, WebKitWebView* webView)
webkit_web_view_go_forward(webView);
}
+static void reloadCb(GtkWidget* widget, WebKitWebView* webView)
+{
+ webkit_web_view_reload(webView);
+}
+
static WebKitWebView*
createWebViewCb(WebKitWebView* webView, WebKitWebFrame* web_frame, GtkWidget* window)
{
@@ -251,19 +260,19 @@ static GtkWidget* createStatusbar()
return GTK_WIDGET(statusbar);
}
-static GtkWidget* createToolbar(GtkWidget* uriEntry, WebKitWebView* webView)
+static GtkWidget* createToolbar(GtkWidget* window, GtkWidget* uriEntry, WebKitWebView* webView)
{
GtkWidget *toolbar = gtk_toolbar_new();
-#if GTK_CHECK_VERSION(2, 15, 0)
gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL);
-#else
- gtk_toolbar_set_orientation(GTK_TOOLBAR(toolbar), GTK_ORIENTATION_HORIZONTAL);
-#endif
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_BOTH_HORIZ);
GtkToolItem *item;
+ /* Keyboard accelerators */
+ GtkAccelGroup *accelGroup = gtk_accel_group_new();
+ gtk_window_add_accel_group(GTK_WINDOW(window), accelGroup);
+
/* the back button */
item = gtk_tool_button_new_from_stock(GTK_STOCK_GO_BACK);
g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(goBackCb), webView);
@@ -274,6 +283,12 @@ static GtkWidget* createToolbar(GtkWidget* uriEntry, WebKitWebView* webView)
g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(goForwardCb), webView);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
+ /* The reload button */
+ item = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
+ g_signal_connect(G_OBJECT(item), "clicked", G_CALLBACK(reloadCb), webView);
+ gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
+ gtk_widget_add_accelerator(GTK_WIDGET(item), "clicked", accelGroup, GDK_KEY_F5, 0, GTK_ACCEL_VISIBLE);
+
/* The URL entry */
item = gtk_tool_item_new();
gtk_tool_item_set_expand(item, TRUE);
@@ -313,7 +328,7 @@ static GtkWidget* createWindow(WebKitWebView** outWebView)
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
#endif
statusbar = createStatusbar(webView);
- gtk_box_pack_start(GTK_BOX(vbox), createToolbar(uriEntry, webView), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), createToolbar(window, uriEntry, webView), FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(vbox), createBrowser(window, uriEntry, statusbar, webView, vbox), TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(vbox), statusbar, FALSE, FALSE, 0);
@@ -484,13 +499,13 @@ int main(int argc, char* argv[])
};
gtk_init(&argc, &argv);
- gst_init(&argc, &argv);
GOptionContext *context = g_option_context_new(0);
g_option_context_add_main_entries(context, commandLineOptions, 0);
g_option_context_add_group(context, gtk_get_option_group(TRUE));
+#ifdef WTF_USE_GSTREAMER
g_option_context_add_group(context, gst_init_get_option_group());
-
+#endif
webkitSettings = webkit_web_settings_new();
g_object_set(webkitSettings, "enable-developer-extras", TRUE, NULL);
if (!addWebSettingsGroupToContext(context, webkitSettings)) {
diff --git a/Tools/ImageDiff/CMakeLists.txt b/Tools/ImageDiff/CMakeLists.txt
new file mode 100644
index 000000000..6670fd574
--- /dev/null
+++ b/Tools/ImageDiff/CMakeLists.txt
@@ -0,0 +1,17 @@
+set(IMAGE_DIFF_DIR "${TOOLS_DIR}/ImageDiff")
+
+set(IMAGE_DIFF_INCLUDE_DIRECTORIES
+ ${CMAKE_BINARY_DIR}
+ ${WTF_DIR}
+)
+
+set(IMAGE_DIFF_LIBRARIES
+ WTF
+)
+
+INCLUDE_IF_EXISTS(${IMAGE_DIFF_DIR}/Platform${PORT}.cmake)
+
+include_directories(${IMAGE_DIFF_INCLUDE_DIRECTORIES})
+add_executable(ImageDiff ${IMAGE_DIFF_SOURCES})
+target_link_libraries(ImageDiff ${IMAGE_DIFF_LIBRARIES})
+set_target_properties(ImageDiff PROPERTIES FOLDER "Tools")
diff --git a/Tools/DumpRenderTree/qt/ImageDiff.pro b/Tools/ImageDiff/ImageDiff.pro
index 40bcdfb3c..f3e8a4910 100644
--- a/Tools/DumpRenderTree/qt/ImageDiff.pro
+++ b/Tools/ImageDiff/ImageDiff.pro
@@ -11,4 +11,4 @@ DESTDIR = $$ROOT_BUILD_DIR/bin
QT = core gui widgets
-SOURCES = ImageDiff.cpp
+SOURCES = qt/ImageDiff.cpp
diff --git a/Tools/ImageDiff/PlatformEfl.cmake b/Tools/ImageDiff/PlatformEfl.cmake
new file mode 100644
index 000000000..68b444428
--- /dev/null
+++ b/Tools/ImageDiff/PlatformEfl.cmake
@@ -0,0 +1,19 @@
+set(IMAGE_DIFF_SOURCES
+ ${IMAGE_DIFF_DIR}/efl/ImageDiff.cpp
+)
+
+list(APPEND IMAGE_DIFF_INCLUDE_DIRECTORIES
+ ${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
+ ${EINA_INCLUDE_DIRS}
+ ${EO_INCLUDE_DIRS}
+ ${EVAS_INCLUDE_DIRS}
+)
+
+list(APPEND IMAGE_DIFF_LIBRARIES
+ ${ECORE_EVAS_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${EINA_LIBRARIES}
+ ${EO_LIBRARIES}
+ ${EVAS_LIBRARIES}
+)
diff --git a/Tools/DumpRenderTree/efl/ImageDiff.cpp b/Tools/ImageDiff/efl/ImageDiff.cpp
index 129b6ca57..129b6ca57 100644
--- a/Tools/DumpRenderTree/efl/ImageDiff.cpp
+++ b/Tools/ImageDiff/efl/ImageDiff.cpp
diff --git a/Tools/DumpRenderTree/gtk/ImageDiff.cpp b/Tools/ImageDiff/gtk/ImageDiff.cpp
index e40c33acf..2cb9f3bce 100644
--- a/Tools/DumpRenderTree/gtk/ImageDiff.cpp
+++ b/Tools/ImageDiff/gtk/ImageDiff.cpp
@@ -157,7 +157,7 @@ void printImage(GdkPixbuf* image)
return; // Don't bail out, as we can still use the percentage output.
}
- printf("Content-Length: %"G_GSIZE_FORMAT"\n", bufferSize);
+ printf("Content-Length: %" G_GSIZE_FORMAT "\n", bufferSize);
fwrite(buffer, 1, bufferSize, stdout);
}
@@ -171,15 +171,12 @@ void printImageDifferences(GdkPixbuf* baselineImage, GdkPixbuf* actualImage)
g_object_unref(differenceImage);
}
printf("diff: %01.2f%% failed\n", difference);
- } else {
+ } else
printf("diff: %01.2f%% passed\n", difference);
- }
}
int main(int argc, char* argv[])
{
- g_type_init();
-
GError* error = 0;
GOptionContext* context = g_option_context_new("- compare two image files, printing their percentage difference and the difference image to stdout");
g_option_context_add_main_entries(context, commandLineOptionEntries, 0);
diff --git a/Tools/DumpRenderTree/qt/ImageDiff.cpp b/Tools/ImageDiff/qt/ImageDiff.cpp
index 537b63d70..816086aa6 100644
--- a/Tools/DumpRenderTree/qt/ImageDiff.cpp
+++ b/Tools/ImageDiff/qt/ImageDiff.cpp
@@ -31,7 +31,7 @@ int main(int argc, char* argv[])
{
QCoreApplication app(argc, argv);
- qreal tolerance = 0;
+ qreal tolerance = 0; // Tolerated percentage of error pixels.
QStringList args = app.arguments();
for (int i = 0; i < argc; ++i)
@@ -70,7 +70,7 @@ int main(int argc, char* argv[])
// Convert into QImage
QImage decodedImage;
decodedImage.loadFromData(data.data(), "PNG");
- decodedImage.convertToFormat(QImage::Format_ARGB32);
+ decodedImage = decodedImage.convertToFormat(QImage::Format_ARGB32);
// Place it in the right place
if (actualImage.isNull())
@@ -93,11 +93,9 @@ int main(int argc, char* argv[])
int h = actualImage.height();
QImage diffImage(w, h, QImage::Format_ARGB32);
- int count = 0;
- qreal sum = 0;
- qreal maxDistance = 0;
+ int errorCount = 0;
- for (int x = 0; x < w; ++x)
+ for (int x = 0; x < w; ++x) {
for (int y = 0; y < h; ++y) {
QRgb pixel = actualImage.pixel(x, y);
QRgb basePixel = baselineImage.pixel(x, y);
@@ -106,26 +104,19 @@ int main(int argc, char* argv[])
qreal blue = (qBlue(pixel) - qBlue(basePixel)) / static_cast<float>(qMax(255 - qBlue(basePixel), qBlue(basePixel)));
qreal alpha = (qAlpha(pixel) - qAlpha(basePixel)) / static_cast<float>(qMax(255 - qAlpha(basePixel), qAlpha(basePixel)));
qreal distance = qSqrt(red * red + green * green + blue * blue + alpha * alpha) / 2.0f;
- int gray = distance * qreal(255);
- diffImage.setPixel(x, y, qRgb(gray, gray, gray));
if (distance >= 1 / qreal(255)) {
- count++;
- sum += distance;
- maxDistance = qMax(maxDistance, distance);
- }
+ errorCount++;
+ diffImage.setPixel(x, y, qRgb(255, 0, 0));
+ } else
+ diffImage.setPixel(x, y, qRgba(qRed(basePixel), qGreen(basePixel), qBlue(basePixel), qAlpha(basePixel) * 0.5));
+ }
}
qreal difference = 0;
- if (count)
- difference = 100 * sum / static_cast<qreal>(w * h);
- if (difference <= tolerance) {
- difference = 0;
- } else {
- difference = qRound(difference * 100) / 100.0f;
- difference = qMax(difference, qreal(0.01));
- }
+ if (errorCount)
+ difference = 100 * errorCount / static_cast<qreal>(w * h);
- if (!difference)
+ if (difference <= tolerance)
fprintf(stdout, "diff: %01.2f%% passed\n", difference);
else {
QBuffer buffer;
diff --git a/Tools/Makefile b/Tools/Makefile
index adc3ae63a..57f8b74ff 100644
--- a/Tools/Makefile
+++ b/Tools/Makefile
@@ -1,5 +1,11 @@
MODULES = DumpRenderTree WebKitTestRunner MiniBrowser ../Source/ThirdParty/gtest/xcode TestWebKitAPI
+ifneq (,$(findstring iphoneos,$(SDKROOT)))
+ MODULES = ../Source/ThirdParty/gtest/xcode TestWebKitAPI
+else ifneq (,$(findstring iphonesimulator,$(SDKROOT)))
+ MODULES = DumpRenderTree ../Source/ThirdParty/gtest/xcode TestWebKitAPI
+endif
+
all:
@for dir in $(MODULES); do ${MAKE} $@ -C $$dir; exit_status=$$?; \
if [ $$exit_status -ne 0 ]; then exit $$exit_status; fi; done
diff --git a/Tools/MiniBrowser/MiniBrowser.vcproj b/Tools/MiniBrowser/MiniBrowser.vcproj
deleted file mode 100644
index 4981c6c4e..000000000
--- a/Tools/MiniBrowser/MiniBrowser.vcproj
+++ /dev/null
@@ -1,508 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowser"
- ProjectGUID="{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}"
- RootNamespace="MiniBrowser"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\Configurations\MiniBrowserDebug.vsprops"
- UseOfATL="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\Configurations\MiniBrowserRelease.vsprops"
- UseOfATL="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\Configurations\MiniBrowserDebugAll.vsprops"
- UseOfATL="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\Configurations\MiniBrowserDebugCairoCFLite.vsprops"
- UseOfATL="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\Configurations\MiniBrowserReleaseCairoCFLite.vsprops"
- UseOfATL="1"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\Configurations\MiniBrowserProduction.vsprops"
- UseOfATL="1"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\win\BrowserView.cpp"
- >
- </File>
- <File
- RelativePath=".\win\BrowserWindow.cpp"
- >
- </File>
- <File
- RelativePath=".\win\main.cpp"
- >
- </File>
- <File
- RelativePath=".\win\MiniBrowser.cpp"
- >
- </File>
- <File
- RelativePath=".\win\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Production|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\win\BrowserView.h"
- >
- </File>
- <File
- RelativePath=".\win\BrowserWindow.h"
- >
- </File>
- <File
- RelativePath=".\win\MiniBrowser.h"
- >
- </File>
- <File
- RelativePath=".\win\Resource.h"
- >
- </File>
- <File
- RelativePath=".\win\stdafx.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\win\MiniBrowser.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj b/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
index 68dadb51d..225644535 100644
--- a/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
+++ b/Tools/MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj
@@ -86,8 +86,8 @@
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
- BC8FB5A8116AA1FE0080D413 /* WebKit2.framework in Frameworks */,
0F7EB6E3134113C300F4D865 /* WebKit.framework in Frameworks */,
+ BC8FB5A8116AA1FE0080D413 /* WebKit2.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -95,8 +95,8 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 0F7EB879134113F200F4D865 /* WebKit.framework in Frameworks */,
BC20545E11C96C92008F3375 /* Cocoa.framework in Frameworks */,
+ 0F7EB879134113F200F4D865 /* WebKit.framework in Frameworks */,
BCBD384411B08AAD00E01E54 /* WebKit2.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -107,18 +107,18 @@
080E96DDFE201D6D7F000001 /* MiniBrowser */ = {
isa = PBXGroup;
children = (
- BC72B89A11E57E8A001EB4EA /* Info.plist */,
- BC329486116A92E2008635D0 /* main.m */,
256AC3D80F4B6AC300CF3369 /* AppDelegate.h */,
256AC3D90F4B6AC300CF3369 /* AppDelegate.m */,
0FE6439F161FA8940059E3FF /* BrowserWindowController.h */,
0FE643A0161FA8940059E3FF /* BrowserWindowController.m */,
+ BC72B89A11E57E8A001EB4EA /* Info.plist */,
+ BC329486116A92E2008635D0 /* main.m */,
+ 51E244F811EFCE07008228D1 /* MBToolbarItem.h */,
+ 51E244F911EFCE07008228D1 /* MBToolbarItem.m */,
0FE643A2161FAC660059E3FF /* WK1BrowserWindowController.h */,
0FE643A3161FAC660059E3FF /* WK1BrowserWindowController.m */,
BC329496116A941B008635D0 /* WK2BrowserWindowController.h */,
BC329497116A941B008635D0 /* WK2BrowserWindowController.m */,
- 51E244F811EFCE07008228D1 /* MBToolbarItem.h */,
- 51E244F911EFCE07008228D1 /* MBToolbarItem.m */,
);
name = MiniBrowser;
sourceTree = "<group>";
@@ -274,8 +274,8 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- BC72B89511E57E07001EB4EA /* MainMenu.xib in Resources */,
BC72B89611E57E0F001EB4EA /* BrowserWindow.xib in Resources */,
+ BC72B89511E57E07001EB4EA /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -294,11 +294,11 @@
buildActionMask = 2147483647;
files = (
256AC3DA0F4B6AC300CF3369 /* AppDelegate.m in Sources */,
+ 0FE643A1161FA8940059E3FF /* BrowserWindowController.m in Sources */,
BC329487116A92E2008635D0 /* main.m in Sources */,
- BC329498116A941B008635D0 /* WK2BrowserWindowController.m in Sources */,
51E244FA11EFCE07008228D1 /* MBToolbarItem.m in Sources */,
- 0FE643A1161FA8940059E3FF /* BrowserWindowController.m in Sources */,
0FE643A4161FAC660059E3FF /* WK1BrowserWindowController.m in Sources */,
+ BC329498116A941B008635D0 /* WK2BrowserWindowController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/MiniBrowser/MiniBrowserLauncher.vcproj b/Tools/MiniBrowser/MiniBrowserLauncher.vcproj
deleted file mode 100644
index 03e3481ec..000000000
--- a/Tools/MiniBrowser/MiniBrowserLauncher.vcproj
+++ /dev/null
@@ -1,396 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="MiniBrowserLauncher"
- ProjectGUID="{7AF4EBFB-CCBC-448F-A36A-8210E08D6A7D}"
- RootNamespace="MiniBrowserLauncher"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\Configurations\MiniBrowserLauncherDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\Configurations\MiniBrowserLauncherRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\Configurations\MiniBrowserLauncherDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\Configurations\MiniBrowserLauncherDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\Configurations\MiniBrowserLauncherProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\Configurations\MiniBrowserLauncherReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath="..\win\DLLLauncher\DLLLauncherMain.cpp"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/MiniBrowser/MiniBrowserPostBuild.cmd b/Tools/MiniBrowser/MiniBrowserPostBuild.cmd
deleted file mode 100644
index 9dea026b4..000000000
--- a/Tools/MiniBrowser/MiniBrowserPostBuild.cmd
+++ /dev/null
@@ -1,29 +0,0 @@
-mkdir 2>NUL "%CONFIGURATIONBUILDDIR%\bin"
-
-if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreFoundation%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CFNetwork%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CFNetwork.resources" "%CONFIGURATIONBUILDDIR%\bin\CFNetwork.resources"
-if exist "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" xcopy /y /d /e /i "%WEBKITLIBRARIESDIR%\bin\CoreFoundation.resources" "%CONFIGURATIONBUILDDIR%\bin\CoreFoundation.resources"
-if exist "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\CoreGraphics%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuin40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\icuuc40%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxml2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\libxslt%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\pthreadVC2%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\SQLite3%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\zlib1%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\objc%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-
-if exist "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.dll" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.dll" "%CONFIGURATIONBUILDDIR%\bin"
-if exist "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.pdb" xcopy /y /d "%WEBKITLIBRARIESDIR%\bin\QuartzCore%LIBRARYCONFIGSUFFIX%.pdb" "%CONFIGURATIONBUILDDIR%\bin"
-
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/MiniBrowser/MiniBrowserPreBuild.cmd b/Tools/MiniBrowser/MiniBrowserPreBuild.cmd
deleted file mode 100644
index 833ae5bfc..000000000
--- a/Tools/MiniBrowser/MiniBrowserPreBuild.cmd
+++ /dev/null
@@ -1,5 +0,0 @@
-set PATH=%SystemDrive%\cygwin\bin;%PATH%
-
-if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
-if errorlevel 1 exit 1
-echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/MiniBrowser/efl/CMakeLists.txt b/Tools/MiniBrowser/efl/CMakeLists.txt
index e39d9115c..13180762a 100644
--- a/Tools/MiniBrowser/efl/CMakeLists.txt
+++ b/Tools/MiniBrowser/efl/CMakeLists.txt
@@ -1,17 +1,24 @@
-SET(MiniBrowser_DIR "${TOOLS_DIR}/MiniBrowser/efl")
+set(MiniBrowser_DIR "${TOOLS_DIR}/MiniBrowser/efl")
-SET(MiniBrowser_SOURCES
+# Elementary is needed to build MiniBrowser
+find_package(Elementary 1.6)
+
+set(MiniBrowser_SOURCES
${TOOLS_DIR}/EWebLauncher/url_utils.c
${MiniBrowser_DIR}/main.c
)
-SET(MiniBrowser_INCLUDE_DIRECTORIES
+set(MiniBrowser_INCLUDE_DIRECTORIES
${CAIRO_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_CON_INCLUDE_DIRS}
${ECORE_FILE_INCLUDE_DIRS}
+ ${ECORE_IMF_INCLUDE_DIRS}
+ ${ECORE_INPUT_INCLUDE_DIRS}
${EDJE_INCLUDE_DIRS}
${EET_INCLUDE_DIRS}
+ ${EO_INCLUDE_DIRS}
${DBUS_INCLUDE_DIRS}
${E_DBUS_INCLUDE_DIRS}
${EFREET_INCLUDE_DIRS}
@@ -24,37 +31,33 @@ SET(MiniBrowser_INCLUDE_DIRECTORIES
${CMAKE_SOURCE_DIR}/Source
)
-SET(MiniBrowser_LIBRARIES
- ${JavaScriptCore_LIBRARY_NAME}
- ${WebCore_LIBRARY_NAME}
- ${WebKit2_LIBRARY_NAME}
+set(MiniBrowser_LIBRARIES
+ JavaScriptCore
+ WebCore
+ WebKit2
${CAIRO_LIBRARIES}
${ECORE_LIBRARIES}
${ECORE_EVAS_LIBRARIES}
${ECORE_FILE_LIBRARIES}
${EDJE_LIBRARIES}
+ ${EET_LIBRARIES}
${EINA_LIBRARIES}
${ELEMENTARY_LIBRARIES}
+ ${EO_LIBRARIES}
${EVAS_LIBRARIES}
${FONTCONFIG_LIBRARIES}
+ ${GLIB_LIBRARIES}
+ ${GLIB_GTHREAD_LIBRARIES}
${LIBSOUP_LIBRARIES}
${LIBXML2_LIBRARIES}
- ${LIBXSLT_LIBRARIES}
+ ${LIBXSLT_LIBRARIES} -lm
${OPENGL_LIBRARIES}
${SQLITE_LIBRARIES}
)
-IF (ENABLE_GLIB_SUPPORT)
- LIST(APPEND MiniBrowser_LIBRARIES
- ${GLIB_LIBRARIES}
- ${GLIB_GTHREAD_LIBRARIES}
- )
-ENDIF ()
-
-ADD_DEFINITIONS(-DTHEME_DIR=\"${THEME_BINARY_DIR}\")
-
-INCLUDE_DIRECTORIES(${MiniBrowser_INCLUDE_DIRECTORIES})
-
-ADD_EXECUTABLE(MiniBrowser ${MiniBrowser_SOURCES})
-TARGET_LINK_LIBRARIES(MiniBrowser ${MiniBrowser_LIBRARIES})
-SET_TARGET_PROPERTIES(MiniBrowser PROPERTIES FOLDER "Tools")
+if (ELEMENTARY_FOUND)
+ include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
+ add_executable(MiniBrowser ${MiniBrowser_SOURCES})
+ target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+ set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
+endif ()
diff --git a/Tools/MiniBrowser/efl/main.c b/Tools/MiniBrowser/efl/main.c
index ac38b7ec5..03f9cf8d9 100644
--- a/Tools/MiniBrowser/efl/main.c
+++ b/Tools/MiniBrowser/efl/main.c
@@ -21,6 +21,8 @@
#include "url_utils.h"
#include <Ecore.h>
#include <Ecore_Evas.h>
+#include <Ecore_Getopt.h>
+#include <Eet.h>
#include <Eina.h>
#include <Elementary.h>
#include <Evas.h>
@@ -29,24 +31,53 @@ static const char DEFAULT_URL[] = "http://www.google.com/";
static const char APP_NAME[] = "EFL MiniBrowser";
static const int TOOL_BAR_ICON_SIZE = 24;
static const int TOOL_BAR_BUTTON_SIZE = 32;
+static const int SEARCH_FIELD_SIZE = 200;
+static const int SEARCH_BUTTON_SIZE = 25;
+static const int MAX_SEARCH_COUNT = 100;
+static const int DEFAULT_SEARCH_FLAGS = EWK_FIND_OPTIONS_SHOW_HIGHLIGHT | EWK_FIND_OPTIONS_CASE_INSENSITIVE | EWK_FIND_OPTIONS_WRAP_AROUND;
+static const double TOOLTIP_DELAY_SECONDS = 1.0;
#define info(format, args...) \
do { \
if (verbose) \
- printf(format, ##args); \
+ printf(format"\n", ##args); \
} while (0)
static int verbose = 1;
static Eina_List *windows = NULL;
static char *evas_engine_name = NULL;
+static char *user_agent_string = NULL;
static Eina_Bool encoding_detector_enabled = EINA_FALSE;
static Eina_Bool frame_flattening_enabled = EINA_FALSE;
static Eina_Bool local_storage_enabled = EINA_TRUE;
+static Eina_Bool fullscreen_enabled = EINA_FALSE;
+static Eina_Bool spell_checking_enabled = EINA_FALSE;
static int window_width = 800;
static int window_height = 600;
/* Default value of device_pixel_ratio is '0' so that we don't set custom device
* scale factor unless it's required by the User. */
static double device_pixel_ratio = 0;
+static Eina_Bool legacy_behavior_enabled = EINA_FALSE;
+
+#define DEFAULT_ZOOM_LEVEL 5 // Set default zoom level to 1.0 (index 5 on zoomLevels).
+// The zoom values are chosen to be like in Mozilla Firefox 3.
+const static float zoomLevels[] = {0.3, 0.5, 0.67, 0.8, 0.9, 1.0, 1.1, 1.2, 1.33, 1.5, 1.7, 2.0, 2.4, 3.0};
+
+static Eina_Bool
+zoom_level_set(Evas_Object *webview, int level)
+{
+ if (level < 0 || level >= sizeof(zoomLevels) / sizeof(float))
+ return EINA_FALSE;
+
+ Evas_Coord ox, oy, mx, my, cx, cy;
+ evas_pointer_canvas_xy_get(evas_object_evas_get(webview), &mx, &my); // Get current mouse position on window.
+ evas_object_geometry_get(webview, &ox, &oy, NULL, NULL); // Get webview's position on window.
+ cx = mx - ox; // current x position = mouse x position - webview x position
+ cy = my - oy; // current y position = mouse y position - webview y position
+
+ Eina_Bool result = ewk_view_scale_set(webview, zoomLevels[level], cx, cy);
+ return result;
+}
static Ewk_View_Smart_Class *miniBrowserViewSmartClass()
{
@@ -54,12 +85,42 @@ static Ewk_View_Smart_Class *miniBrowserViewSmartClass()
return &ewkViewClass;
}
+typedef struct _Tooltip_Information {
+ Ecore_Timer *show_timer;
+ Eina_Bool activated;
+ Eina_Bool text_set;
+ Eina_Bool shown;
+} Tooltip_Information;
+
+typedef struct _Color_Selector {
+ Ewk_Color_Picker *ewk_picker;
+ Evas_Object *elm_selector;
+ Evas_Object *elm_selector_window;
+} Color_Selector;
+
typedef struct _Browser_Window {
Evas_Object *elm_window;
Evas_Object *ewk_view;
Evas_Object *url_bar;
Evas_Object *back_button;
Evas_Object *forward_button;
+ struct {
+ Evas_Object *elm_menu;
+ Ewk_Popup_Menu *ewk_menu;
+ } popup;
+ struct {
+ Evas_Object *search_bar;
+ Evas_Object *search_field;
+ Evas_Object *backward_button;
+ Evas_Object *forward_button;
+ } search;
+ int current_zoom_level;
+ Tooltip_Information tooltip;
+ Color_Selector color_selector;
+ struct {
+ Evas_Object *elm_menu;
+ Ewk_Context_Menu *ewk_menu;
+ } context_menu;
} Browser_Window;
typedef struct _File_Selector_Data {
@@ -87,6 +148,10 @@ static const Ecore_Getopt options = {
('e', "engine", "ecore-evas engine to use."),
ECORE_GETOPT_STORE_STR
('s', "window-size", "window size in following format (width)x(height)."),
+ ECORE_GETOPT_STORE_STR
+ ('u', "user-agent", "user agent to set."),
+ ECORE_GETOPT_STORE_DEF_BOOL
+ ('b', "legacy", "Legacy mode", EINA_FALSE),
ECORE_GETOPT_STORE_DOUBLE
('r', "device-pixel-ratio", "Ratio between the CSS units and device pixels."),
ECORE_GETOPT_CALLBACK_NOARGS
@@ -98,6 +163,12 @@ static const Ecore_Getopt options = {
('f', "flattening", "frame flattening.", EINA_FALSE),
ECORE_GETOPT_STORE_DEF_BOOL
('l', "local-storage", "HTML5 local storage support (enabled by default).", EINA_TRUE),
+ ECORE_GETOPT_STORE_DEF_BOOL
+ ('F', "full-screen", "start in full-screen.", EINA_FALSE),
+ ECORE_GETOPT_STORE_DEF_BOOL
+ ('t', "text-checking", "text spell checking enabled", EINA_TRUE),
+ ECORE_GETOPT_STORE_DEF_STR
+ ('p', "policy-cookies", "Cookies policy:\n always - always accept,\n never - never accept,\n no-third-party - don't accept third-party cookies.", "no-third-party"),
ECORE_GETOPT_VERSION
('V', "version"),
ECORE_GETOPT_COPYRIGHT
@@ -108,7 +179,8 @@ static const Ecore_Getopt options = {
}
};
-static Browser_Window *window_create(const char *url, int width, int height);
+static Eina_Stringshare *show_file_entry_dialog(Browser_Window *window, const char *label_tag, const char *default_text);
+static Browser_Window *window_create(Evas_Object* opener, const char *url, int width, int height, Eina_Bool view_mode);
static Browser_Window *window_find_with_elm_window(Evas_Object *elm_window)
{
@@ -142,11 +214,100 @@ static Browser_Window *window_find_with_ewk_view(Evas_Object *ewk_view)
return NULL;
}
+static Eina_Bool
+on_tooltip_show(void *user_data)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ window->tooltip.show_timer = NULL;
+ elm_object_tooltip_show(window->elm_window);
+ window->tooltip.shown = EINA_TRUE;
+ return ECORE_CALLBACK_CANCEL;
+}
+
+static void
+window_tooltip_hide(Browser_Window *window)
+{
+ if (window->tooltip.show_timer) {
+ ecore_timer_del(window->tooltip.show_timer);
+ window->tooltip.show_timer = NULL;
+ }
+
+ if (window->tooltip.shown) {
+ elm_object_tooltip_hide(window->elm_window);
+ window->tooltip.shown = EINA_FALSE;
+ }
+}
+
+static void
+window_tooltip_update(Browser_Window *window)
+{
+ window_tooltip_hide(window);
+
+ if (window->tooltip.activated && window->tooltip.text_set)
+ window->tooltip.show_timer = ecore_timer_add(TOOLTIP_DELAY_SECONDS, on_tooltip_show, window);
+}
+
+static void
+on_mouse_in(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ window->tooltip.activated = EINA_TRUE;
+ window_tooltip_update(window);
+}
+
+static void
+on_mouse_move(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info)
+{
+ window_tooltip_update((Browser_Window *)user_data);
+}
+
+static void
+on_mouse_out(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ window->tooltip.activated = EINA_FALSE;
+ window_tooltip_update(window);
+}
+
+static void
+on_window_resize(void *user_data, Evas *e, Evas_Object *elm_window, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ if (!window) {
+ info("ERROR: window is NULL.");
+ return;
+ }
+
+ if (window->context_menu.ewk_menu)
+ ewk_context_menu_hide(window->context_menu.ewk_menu);
+ if (window->popup.ewk_menu)
+ ewk_popup_menu_close(window->popup.ewk_menu);
+ if (window->popup.elm_menu)
+ elm_menu_close(window->popup.elm_menu);
+}
+
static void window_free(Browser_Window *window)
{
+ evas_object_event_callback_del(window->ewk_view, EVAS_CALLBACK_MOUSE_IN, on_mouse_in);
+ evas_object_event_callback_del(window->ewk_view, EVAS_CALLBACK_MOUSE_OUT, on_mouse_out);
+ evas_object_event_callback_del(window->ewk_view, EVAS_CALLBACK_MOUSE_MOVE, on_mouse_move);
+
+ evas_object_event_callback_del(window->elm_window, EVAS_CALLBACK_RESIZE, on_window_resize);
+
evas_object_del(window->ewk_view);
/* The elm_win will take care of freeing its children */
evas_object_del(window->elm_window);
+
+ if (window->tooltip.show_timer)
+ ecore_timer_del(window->tooltip.show_timer);
+
+ if (window->color_selector.elm_selector_window)
+ evas_object_del(window->color_selector.elm_selector_window);
+
free(window);
}
@@ -160,6 +321,65 @@ static void window_close(Browser_Window *window)
}
static void
+search_box_show(Browser_Window *window)
+{
+ evas_object_size_hint_min_set(window->search.search_bar, SEARCH_FIELD_SIZE + 2 * SEARCH_BUTTON_SIZE, SEARCH_BUTTON_SIZE);
+
+ evas_object_show(window->search.search_bar);
+ evas_object_show(window->search.search_field);
+ evas_object_show(window->search.backward_button);
+ evas_object_show(window->search.forward_button);
+
+ /* Grab focus from the view */
+ evas_object_focus_set(window->ewk_view, EINA_FALSE);
+ elm_object_focus_set(window->search.search_field, EINA_TRUE);
+}
+
+static void
+search_box_hide(Browser_Window *window)
+{
+ ewk_view_text_find_highlight_clear(window->ewk_view);
+
+ evas_object_size_hint_min_set(window->search.search_bar, SEARCH_FIELD_SIZE + 2 * SEARCH_BUTTON_SIZE, 0);
+ evas_object_hide(window->search.search_bar);
+ evas_object_hide(window->search.search_field);
+ evas_object_hide(window->search.backward_button);
+ evas_object_hide(window->search.forward_button);
+
+ /* Give focus back to the view */
+ elm_object_focus_set(window->search.search_field, EINA_FALSE);
+ evas_object_focus_set(window->ewk_view, EINA_TRUE);
+}
+
+static void save_page_contents_callback(Ewk_Page_Contents_Type type, const char *data, void *user_data)
+{
+ Eet_File *ef;
+ Eina_Stringshare *fileName = (Eina_Stringshare *)user_data;
+
+ if (!eina_str_has_extension(fileName, ".mht")) {
+ Eina_Strbuf *fileNameWithMht = eina_strbuf_new();
+ eina_strbuf_append_printf(fileNameWithMht, "%s.mht", fileName);
+ ef = eet_open(eina_strbuf_string_get(fileNameWithMht), EET_FILE_MODE_WRITE);
+ info("Saving file to: %s", eina_strbuf_string_get(fileNameWithMht));
+ eina_strbuf_free(fileNameWithMht);
+ } else {
+ ef = eet_open(fileName, EET_FILE_MODE_WRITE);
+ info("Saving file to: %s", fileName);
+ }
+
+ if (!ef) {
+ info("ERROR: Could not create File");
+ return;
+ }
+
+ eet_write(ef, "MHTML data", data, strlen(data), 0 /* compress */);
+ eet_close(ef);
+ info("SUCCESS: saved.");
+
+ eina_stringshare_del(fileName);
+}
+
+static void
on_key_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
@@ -171,44 +391,92 @@ on_key_down(void *user_data, Evas *e, Evas_Object *ewk_view, void *event_info)
NULL
};
static int currentEncoding = -1;
- Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(e), "Control");
+ const Evas_Modifier *mod = evas_key_modifier_get(e);
+ Eina_Bool ctrlPressed = evas_key_modifier_is_set(mod, "Control");
+ Eina_Bool altPressed = evas_key_modifier_is_set(mod, "Alt");
- if (!strcmp(ev->key, "F1")) {
- info("Back (F1) was pressed\n");
+ if (!strcmp(ev->key, "Left") && altPressed) {
+ info("Back (Alt+Left) was pressed");
if (!ewk_view_back(ewk_view))
- info("Back ignored: No back history\n");
- } else if (!strcmp(ev->key, "F2")) {
- info("Forward (F2) was pressed\n");
+ info("Back ignored: No back history");
+ } else if (!strcmp(ev->key, "Right") && altPressed) {
+ info("Forward (Alt+Right) was pressed");
if (!ewk_view_forward(ewk_view))
- info("Forward ignored: No forward history\n");
+ info("Forward ignored: No forward history");
} else if (!strcmp(ev->key, "F3")) {
currentEncoding = (currentEncoding + 1) % (sizeof(encodings) / sizeof(encodings[0]));
info("Set encoding (F3) pressed. New encoding to %s", encodings[currentEncoding]);
ewk_view_custom_encoding_set(ewk_view, encodings[currentEncoding]);
} else if (!strcmp(ev->key, "F5")) {
- info("Reload (F5) was pressed, reloading.\n");
+ info("Reload (F5) was pressed, reloading.");
ewk_view_reload(ewk_view);
} else if (!strcmp(ev->key, "F6")) {
- info("Stop (F6) was pressed, stop loading.\n");
+ info("Stop (F6) was pressed, stop loading.");
ewk_view_stop(ewk_view);
- } else if (!strcmp(ev->key, "F7")) {
+ } else if (!strcmp(ev->key, "F7")) {
Ewk_Pagination_Mode mode = ewk_view_pagination_mode_get(ewk_view);
mode = (++mode) % (EWK_PAGINATION_MODE_BOTTOM_TO_TOP + 1);
if (ewk_view_pagination_mode_set(ewk_view, mode))
- info("Change Pagination Mode (F7) was pressed, changed to: %d\n", mode);
+ info("Change Pagination Mode (F7) was pressed, changed to: %d", mode);
else
info("Change Pagination Mode (F7) was pressed, but NOT changed!");
+ } else if (!strcmp(ev->key, "F8")) {
+ info("Create souce code window (F8) was pressed.");
+ Browser_Window *window = window_create(ewk_view, ewk_view_url_get(ewk_view), 0, 0, EINA_TRUE);
+ windows = eina_list_append(windows, window);
+ } else if (!strcmp(ev->key, "F11")) {
+ info("Fullscreen (F11) was pressed, toggling window/fullscreen.");
+ elm_win_fullscreen_set(window->elm_window, !elm_win_fullscreen_get(window->elm_window));
} else if (!strcmp(ev->key, "n") && ctrlPressed) {
- info("Create new window (Ctrl+n) was pressed.\n");
- Browser_Window *window = window_create(DEFAULT_URL, 0, 0);
+ info("Create new window (Ctrl+n) was pressed.");
+ Browser_Window *window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE);
// 0 equals default width and height.
windows = eina_list_append(windows, window);
} else if (!strcmp(ev->key, "i") && ctrlPressed) {
- info("Show Inspector (Ctrl+i) was pressed.\n");
+ info("Show Inspector (Ctrl+i) was pressed.");
ewk_view_inspector_show(ewk_view);
+ } else if (!strcmp(ev->key, "f") && ctrlPressed) {
+ info("Show Search Box (Ctrl+f) was pressed.");
+ search_box_show(window);
} else if (!strcmp(ev->key, "Escape")) {
- if (elm_win_fullscreen_get(window->elm_window))
+ if (evas_object_visible_get(window->search.search_bar))
+ search_box_hide(window);
+ else if (elm_win_fullscreen_get(window->elm_window))
ewk_view_fullscreen_exit(ewk_view);
+ } else if (ctrlPressed && (!strcmp(ev->key, "minus") || !strcmp(ev->key, "KP_Subtract"))) {
+ if (zoom_level_set(ewk_view, window->current_zoom_level - 1))
+ window->current_zoom_level--;
+ info("Zoom out (Ctrl + '-') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]);
+ } else if (ctrlPressed && (!strcmp(ev->key, "equal") || !strcmp(ev->key, "KP_Add"))) {
+ if (zoom_level_set(ewk_view, window->current_zoom_level + 1))
+ window->current_zoom_level++;
+ info("Zoom in (Ctrl + '+') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]);
+ } else if (ctrlPressed && !strcmp(ev->key, "0")) {
+ if (zoom_level_set(ewk_view, DEFAULT_ZOOM_LEVEL))
+ window->current_zoom_level = DEFAULT_ZOOM_LEVEL;
+ info("Zoom to default (Ctrl + '0') was pressed, zoom level became %.2f", zoomLevels[window->current_zoom_level]);
+ } else if (ctrlPressed && !strcmp(ev->key, "s")) {
+ Eina_Strbuf *default_file = eina_strbuf_new();
+ const char *home_path = getenv("HOME");
+ const char *title = ewk_view_title_get(window->ewk_view);
+ eina_strbuf_append_printf(default_file, "%s/%s.mht", home_path ? home_path : "/home", title ? title : "title");
+ info("Pressed (CTRL + S) : Saving Current Page.");
+ Eina_Stringshare *save_file_name = show_file_entry_dialog(window, "SAVE", eina_strbuf_string_get(default_file));
+ if (!save_file_name)
+ return;
+ ewk_view_page_contents_get(ewk_view, EWK_PAGE_CONTENTS_TYPE_MHTML, save_page_contents_callback, (void *)save_file_name);
+ eina_strbuf_free(default_file);
+ } else if (ctrlPressed && !strcmp(ev->key, "l")) {
+ const char *home_path = getenv("HOME");
+ Eina_Stringshare *open_file_name = show_file_entry_dialog(window, "LOAD", home_path ? home_path : "/home");
+ if (!open_file_name)
+ return;
+ Eina_Strbuf *uri_path = eina_strbuf_new();
+ eina_strbuf_append_printf(uri_path, "file://%s", open_file_name);
+ info("pressed (CTRL + L) : Loading Page %s", eina_strbuf_string_get(uri_path));
+ ewk_view_url_set(ewk_view, eina_strbuf_string_get(uri_path));
+ eina_strbuf_free(uri_path);
+ eina_stringshare_del(open_file_name);
}
}
@@ -275,6 +543,8 @@ on_url_changed(void *user_data, Evas_Object *ewk_view, void *event_info)
elm_entry_entry_set(window->url_bar, url);
free(url);
+
+ search_box_hide(window);
}
static void
@@ -332,7 +602,7 @@ on_download_request(void *user_data, Evas_Object *ewk_view, void *event_info)
}
ewk_download_job_destination_set(download, eina_strbuf_string_get(destination_path));
- info("Downloading: %s\n", eina_strbuf_string_get(destination_path));
+ info("Downloading: %s", eina_strbuf_string_get(destination_path));
eina_strbuf_free(destination_path);
}
@@ -373,6 +643,7 @@ on_fileselector_done(void *user_data, Evas_Object *file_selector, void *event_in
static void
on_file_chooser_request(void *user_data, Evas_Object *ewk_view, void *event_info)
{
+ Evas_Object *bg;
Browser_Window *window = (Browser_Window *)user_data;
Ewk_File_Chooser_Request *request = (Ewk_File_Chooser_Request *)event_info;
@@ -382,6 +653,11 @@ on_file_chooser_request(void *user_data, Evas_Object *ewk_view, void *event_info
elm_win_title_set(elm_window, "File picker");
elm_win_modal_set(elm_window, EINA_TRUE);
+ bg = elm_bg_add(elm_window);
+ evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(elm_window, bg);
+ evas_object_show(bg);
+
File_Selector_Data *fs_data = (File_Selector_Data *)malloc(sizeof(File_Selector_Data));
fs_data->parent = window;
fs_data->elm_window = elm_window;
@@ -407,22 +683,145 @@ static void
on_download_finished(void *user_data, Evas_Object *ewk_view, void *event_info)
{
Ewk_Download_Job *download = (Ewk_Download_Job *)event_info;
- info("Download finished: %s\n", ewk_download_job_destination_get(download));
+ info("Download finished: %s", ewk_download_job_destination_get(download));
}
static void
on_download_failed(void *user_data, Evas_Object *ewk_view, void *event_info)
{
- info("Download failed!\n");
+ info("Download failed!");
}
static void
-on_favicon_received(const char *page_url, Evas_Object *icon, void *event_info)
+on_color_changed(void *data, Evas_Object *obj, void *event_info)
{
- Browser_Window *window = (Browser_Window *)event_info;
- if (strcmp(page_url, ewk_view_url_get(window->ewk_view)))
- return;
+ int r, g, b, a;
+
+ elm_colorselector_color_get(obj, &r, &g, &b, &a);
+ evas_object_color_set(data, r, g, b, a);
+}
+
+static void
+on_color_item_selected(void *data, Evas_Object *obj, void *event_info)
+{
+ int r, g, b, a;
+ Elm_Object_Item *color_item = (Elm_Object_Item *)event_info;
+
+ elm_colorselector_palette_item_color_get(color_item, &r, &g, &b, &a);
+ evas_object_color_set(data, r, g, b, a);
+}
+
+static void
+on_color_picker_ok_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+ int r, g, b, a;
+ Color_Selector *color_selector = (Color_Selector *)data;
+
+ elm_colorselector_color_get(color_selector->elm_selector, &r, &g, &b, &a);
+ ewk_color_picker_color_set(color_selector->ewk_picker, r, g, b, a);
+}
+
+static void
+on_color_picker_cancel_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+ int r, g, b, a;
+
+ ewk_color_picker_color_get(data, &r, &g, &b, &a);
+ ewk_color_picker_color_set(data, r, g, b, a);
+}
+
+static Eina_Bool
+on_color_picker_dismiss(Ewk_View_Smart_Data *sd)
+{
+ Browser_Window *window = window_find_with_ewk_view(sd->self);
+
+ evas_object_del(window->color_selector.elm_selector_window);
+ window->color_selector.elm_selector_window = NULL;
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+on_color_picker_request(Ewk_View_Smart_Data *sd, Ewk_Color_Picker *color_picker)
+{
+ int r, g, b, a;
+ Evas_Object *background, *rect, *box, *button_box, *rect_frame, *cs_frame, *ok_button, *cancel_button;
+
+ Browser_Window *window = window_find_with_ewk_view(sd->self);
+ window->color_selector.elm_selector_window = elm_win_add(window->elm_window, "color selector", ELM_WIN_BASIC);
+ window->color_selector.ewk_picker = color_picker;
+
+ elm_win_title_set(window->color_selector.elm_selector_window, "Color selector");
+
+ /* Show color view */
+ background = elm_bg_add(window->color_selector.elm_selector_window);
+ evas_object_size_hint_weight_set(background, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(window->color_selector.elm_selector_window, background);
+ evas_object_show(background);
+
+ box = elm_box_add(window->color_selector.elm_selector_window);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(window->color_selector.elm_selector_window, box);
+ evas_object_show(box);
+
+ rect_frame = elm_frame_add(window->color_selector.elm_selector_window);
+ evas_object_size_hint_weight_set(rect_frame, EVAS_HINT_EXPAND, 0.3);
+ evas_object_size_hint_align_set(rect_frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_text_set(rect_frame, "Color View");
+ elm_box_pack_end(box, rect_frame);
+ evas_object_show(rect_frame);
+
+ rect = evas_object_rectangle_add(evas_object_evas_get(window->color_selector.elm_selector_window));
+ elm_object_content_set(rect_frame, rect);
+ ewk_color_picker_color_get(window->color_selector.ewk_picker, &r, &g, &b, &a);
+ evas_object_color_set(rect, r, g, b, a);
+ evas_object_show(rect);
+
+ /* Show color selector */
+ cs_frame = elm_frame_add(window->color_selector.elm_selector_window);
+ evas_object_size_hint_weight_set(cs_frame, EVAS_HINT_EXPAND, 0.7);
+ evas_object_size_hint_align_set(cs_frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_text_set(cs_frame, "Color Selector");
+ elm_box_pack_end(box, cs_frame);
+ evas_object_show(cs_frame);
+
+ window->color_selector.elm_selector = elm_colorselector_add(window->color_selector.elm_selector_window);
+ elm_object_content_set(cs_frame, window->color_selector.elm_selector);
+ evas_object_show(window->color_selector.elm_selector);
+
+ /* OK, Cancel Buttons */
+ button_box = elm_box_add(window->color_selector.elm_selector_window);
+ elm_box_horizontal_set(button_box, EINA_TRUE);
+ evas_object_size_hint_min_set(button_box, 200, 50);
+ elm_box_pack_end(box, button_box);
+ evas_object_show(button_box);
+
+ ok_button = elm_button_add(window->color_selector.elm_selector_window);
+ elm_object_text_set(ok_button, "OK");
+ elm_box_pack_end(button_box, ok_button);
+ evas_object_show(ok_button);
+
+ cancel_button = elm_button_add(window->color_selector.elm_selector_window);
+ elm_object_text_set(cancel_button, "Cancel");
+ elm_box_pack_end(button_box, cancel_button);
+ evas_object_show(cancel_button);
+
+ evas_object_smart_callback_add(ok_button, "clicked", on_color_picker_ok_clicked, &(window->color_selector));
+ evas_object_smart_callback_add(cancel_button, "clicked", on_color_picker_cancel_clicked, window->color_selector.ewk_picker);
+ evas_object_smart_callback_add(window->color_selector.elm_selector_window, "delete,request", on_color_picker_cancel_clicked, window->color_selector.ewk_picker);
+ evas_object_smart_callback_add(window->color_selector.elm_selector, "changed", on_color_changed, rect);
+ evas_object_smart_callback_add(window->color_selector.elm_selector, "color,item,selected", on_color_item_selected, rect);
+
+ elm_win_center(window->color_selector.elm_selector_window, EINA_TRUE, EINA_TRUE);
+ evas_object_resize(window->color_selector.elm_selector_window, 350, 500);
+ evas_object_show(window->color_selector.elm_selector_window);
+
+ return EINA_TRUE;
+}
+static void
+update_view_favicon(Browser_Window *window, Evas_Object *icon)
+{
/* Remove previous icon from URL bar */
Evas_Object *old_icon = elm_object_part_content_unset(window->url_bar, "icon");
if (old_icon) {
@@ -443,16 +842,15 @@ on_favicon_received(const char *page_url, Evas_Object *icon, void *event_info)
}
static void
-on_view_icon_changed(void *user_data, Evas_Object *ewk_view, void *event_info)
+on_view_favicon_changed(void *user_data, Evas_Object *ewk_view, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
- /* Retrieve the view's favicon */
- Ewk_Context *context = ewk_view_context_get(ewk_view);
- Ewk_Favicon_Database *icon_database = ewk_context_favicon_database_get(context);
- const char *page_url = ewk_view_url_get(ewk_view);
- Evas *evas = evas_object_evas_get(ewk_view);
- ewk_favicon_database_async_icon_get(icon_database, page_url, evas, on_favicon_received, window);
+ Evas_Object* favicon = ewk_view_favicon_get(ewk_view);
+ update_view_favicon(window, favicon);
+
+ if (favicon)
+ evas_object_unref(favicon);
}
static int
@@ -498,6 +896,41 @@ on_url_bar_clicked(void *user_data, Evas_Object *url_bar, void *event_info)
}
static void
+on_search_field_aborted(void *user_data, Evas_Object *search_field, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+ search_box_hide(window);
+
+ /* Give focus back to the view */
+ view_focus_set(window, EINA_TRUE);
+}
+
+static void
+on_search_field_activated(void *user_data, Evas_Object *search_field, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ const char *markup_text = elm_entry_entry_get(search_field);
+ char *text = elm_entry_markup_to_utf8(markup_text);
+ ewk_view_text_find(window->ewk_view, text, DEFAULT_SEARCH_FLAGS, MAX_SEARCH_COUNT);
+ free(text);
+
+ /* Grab focus from the view */
+ evas_object_focus_set(window->ewk_view, EINA_FALSE);
+ elm_object_focus_set(search_field, EINA_TRUE);
+}
+
+static void
+on_search_field_clicked(void *user_data, Evas_Object *search_field, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ /* Grab focus from the view */
+ evas_object_focus_set(window->ewk_view, EINA_FALSE);
+ elm_object_focus_set(search_field, EINA_TRUE);
+}
+
+static void
on_back_button_clicked(void *user_data, Evas_Object *back_button, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
@@ -518,6 +951,26 @@ on_forward_button_clicked(void *user_data, Evas_Object *forward_button, void *ev
}
static void
+on_search_backward_button_clicked(void *user_data, Evas_Object *search_backward_button, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ char *text = elm_entry_markup_to_utf8(elm_entry_entry_get(window->search.search_field));
+ ewk_view_text_find(window->ewk_view, text, DEFAULT_SEARCH_FLAGS | EWK_FIND_OPTIONS_BACKWARDS, MAX_SEARCH_COUNT);
+ free(text);
+}
+
+static void
+on_search_forward_button_clicked(void *user_data, Evas_Object *search_forward_button, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+
+ char *text = elm_entry_markup_to_utf8(elm_entry_entry_get(window->search.search_field));
+ ewk_view_text_find(window->ewk_view, text, DEFAULT_SEARCH_FLAGS, MAX_SEARCH_COUNT);
+ free(text);
+}
+
+static void
on_refresh_button_clicked(void *user_data, Evas_Object *refresh_button, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
@@ -525,10 +978,10 @@ on_refresh_button_clicked(void *user_data, Evas_Object *refresh_button, void *ev
Evas *evas = evas_object_evas_get(refresh_button);
Eina_Bool ctrlPressed = evas_key_modifier_is_set(evas_key_modifier_get(evas), "Control");
if (ctrlPressed) {
- info("Reloading and bypassing cache...\n");
+ info("Reloading and bypassing cache...");
ewk_view_reload_bypass_cache(window->ewk_view);
} else {
- info("Reloading...\n");
+ info("Reloading...");
ewk_view_reload(window->ewk_view);
}
}
@@ -548,6 +1001,62 @@ on_ok_clicked(void *user_data, Evas_Object *obj, void *event_info)
ecore_main_loop_quit();
}
+static Eina_Stringshare *
+show_file_entry_dialog(Browser_Window *window, const char *label_tag, const char *default_text)
+{
+ Evas_Object *file_popup = elm_popup_add(window->elm_window);
+ evas_object_size_hint_weight_set(file_popup, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(file_popup);
+
+ Evas_Object *vbox = elm_box_add(file_popup);
+ evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_object_content_set(file_popup, vbox);
+ evas_object_show(vbox);
+
+ Evas_Object *label = elm_label_add(window->elm_window);
+ elm_object_text_set(label, label_tag);
+ evas_object_size_hint_weight_set(label, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(label, EVAS_HINT_FILL, 0.5);
+ evas_object_color_set(label, 23, 45, 67, 142);
+ elm_box_pack_end(vbox, label);
+ evas_object_show(label);
+
+ Evas_Object *fs_entry = elm_fileselector_entry_add(file_popup);
+ elm_fileselector_entry_is_save_set(fs_entry, EINA_TRUE);
+ evas_object_size_hint_align_set(fs_entry, EVAS_HINT_FILL, 0);
+ elm_fileselector_entry_path_set(fs_entry, default_text);
+ elm_object_text_set(fs_entry, "FileChooser");
+ elm_box_pack_end(vbox, fs_entry);
+ evas_object_show(fs_entry);
+
+ Evas_Object *hbox = elm_box_add(file_popup);
+ evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_box_horizontal_set(hbox, EINA_TRUE);
+ evas_object_size_hint_align_set(hbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(vbox, hbox);
+ evas_object_show(hbox);
+
+ Eina_Bool ok = EINA_FALSE;
+ Evas_Object *ok_button = elm_button_add(file_popup);
+ elm_object_text_set(ok_button, "OK");
+ evas_object_smart_callback_add(ok_button, "clicked", on_ok_clicked, &ok);
+ elm_box_pack_end(hbox, ok_button);
+ evas_object_show(ok_button);
+
+ Evas_Object *cancel_button = elm_button_add(file_popup);
+ elm_object_text_set(cancel_button, "Cancel");
+ evas_object_smart_callback_add(cancel_button, "clicked", quit_event_loop, NULL);
+ elm_box_pack_end(hbox, cancel_button);
+ evas_object_show(cancel_button);
+
+ ecore_main_loop_begin();
+
+ Eina_Stringshare *file_path = ok ? eina_stringshare_add(elm_fileselector_entry_path_get(fs_entry)) : NULL;
+ evas_object_del(file_popup);
+ return file_path;
+}
+
static void
on_javascript_alert(Ewk_View_Smart_Data *smartData, const char *message)
{
@@ -664,6 +1173,95 @@ on_javascript_prompt(Ewk_View_Smart_Data *smartData, const char *message, const
return prompt_text;
}
+static void
+on_popup_menu_discarded(void *user_data, Evas_Object *obj, void *event_info)
+{
+ // The user clicked outside the menu to discard it.
+ info("Popup menu was discarded.");
+ Browser_Window *window = (Browser_Window *)user_data;
+ ewk_popup_menu_close(window->popup.ewk_menu);
+}
+
+static void
+on_popup_menu_item_clicked(void *user_data, Evas_Object *obj, void *event_info)
+{
+ Browser_Window *window = (Browser_Window *)user_data;
+ Elm_Object_Item *item = (Elm_Object_Item *)event_info;
+
+ info("Selected popup menu index: %u", elm_menu_item_index_get(item));
+ ewk_popup_menu_selected_index_set(window->popup.ewk_menu, elm_menu_item_index_get(item));
+
+ // Close popup menu.
+ ewk_popup_menu_close(window->popup.ewk_menu);
+}
+
+static void
+popup_menu_populate(Evas_Object *elm_menu, Ewk_Popup_Menu *ewk_menu, void *user_data)
+{
+ const Eina_List* ewk_items = ewk_popup_menu_items_get(ewk_menu);
+
+ void *data;
+ const Eina_List *l;
+ EINA_LIST_FOREACH(ewk_items, l, data) {
+ Ewk_Popup_Menu_Item *ewk_item = (Ewk_Popup_Menu_Item *)data;
+ switch (ewk_popup_menu_item_type_get(ewk_item)) {
+ case EWK_POPUP_MENU_SEPARATOR:
+ elm_menu_item_separator_add(elm_menu, NULL);
+ break;
+ case EWK_POPUP_MENU_ITEM:
+ if (ewk_popup_menu_item_is_label_get(ewk_item)) {
+ Elm_Object_Item *item = elm_menu_item_add(elm_menu, NULL, NULL, ewk_popup_menu_item_text_get(ewk_item), NULL, NULL);
+ elm_object_item_disabled_set(item, EINA_TRUE);
+ } else {
+ Elm_Object_Item *item = elm_menu_item_add(elm_menu, NULL, NULL, ewk_popup_menu_item_text_get(ewk_item), on_popup_menu_item_clicked, user_data);
+ const char *tooltip_text = ewk_popup_menu_item_tooltip_get(ewk_item);
+ if (tooltip_text && tooltip_text[0] != '\0')
+ elm_object_item_tooltip_text_set(item, tooltip_text);
+ elm_object_item_disabled_set(item, !ewk_popup_menu_item_enabled_get(ewk_item));
+ elm_menu_item_selected_set(item, ewk_popup_menu_item_selected_get(ewk_item));
+ }
+ break;
+ default:
+ info("Unrecognized popup menu item type!");
+ break;
+ }
+ }
+}
+
+static Eina_Bool
+on_popup_menu_show(Ewk_View_Smart_Data *smartData, Eina_Rectangle rect, Ewk_Text_Direction text_direction, double page_scale_factor, Ewk_Popup_Menu *ewk_menu)
+{
+ Browser_Window *window = window_find_with_ewk_view(smartData->self);
+
+ if (window->popup.elm_menu)
+ evas_object_del(window->popup.elm_menu);
+
+ window->popup.elm_menu = elm_menu_add(window->elm_window);
+ window->popup.ewk_menu = ewk_menu;
+ evas_object_smart_callback_add(window->popup.elm_menu, "clicked", on_popup_menu_discarded, window);
+
+ popup_menu_populate(window->popup.elm_menu, ewk_menu, window);
+
+ info("Showing popup menu at (%d, %d)", rect.x, rect.y);
+ elm_menu_move(window->popup.elm_menu, rect.x, rect.y);
+ evas_object_show(window->popup.elm_menu);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+on_popup_menu_hide(Ewk_View_Smart_Data *smartData)
+{
+ Browser_Window *window = window_find_with_ewk_view(smartData->self);
+
+ if (!window->popup.elm_menu)
+ return EINA_FALSE;
+
+ elm_menu_close(window->popup.elm_menu);
+
+ return EINA_TRUE;
+}
+
static Eina_Bool on_window_geometry_get(Ewk_View_Smart_Data *sd, Evas_Coord *x, Evas_Coord *y, Evas_Coord *width, Evas_Coord *height)
{
Browser_Window *window = window_find_with_ewk_view(sd->self);
@@ -694,6 +1292,7 @@ on_fullscreen_accept(void *user_data, Evas_Object *obj, void *event_info)
PermissionData *permission_data = (PermissionData *)user_data;
evas_object_del(permission_data->permission_popup);
+ evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);
free(permission_data);
}
@@ -704,6 +1303,7 @@ on_fullscreen_deny(void *user_data, Evas_Object *obj, void *event_info)
ewk_view_fullscreen_exit(permission_data->ewk_view);
evas_object_del(permission_data->permission_popup);
+ evas_object_focus_set(permission_data->ewk_view, EINA_TRUE);
free(permission_data);
}
@@ -753,7 +1353,7 @@ static Eina_Bool on_fullscreen_exit(Ewk_View_Smart_Data *sd)
}
static Evas_Object *
-on_window_create(Ewk_View_Smart_Data *smartData, const Ewk_Window_Features *window_features)
+on_window_create(Ewk_View_Smart_Data *smartData, const char *url, const Ewk_Window_Features *window_features)
{
int x = 0;
int y = 0;
@@ -768,12 +1368,12 @@ on_window_create(Ewk_View_Smart_Data *smartData, const Ewk_Window_Features *wind
if (!height)
height = window_height;
- Browser_Window *window = window_create(NULL, width, height);
+ Browser_Window *window = window_create(smartData->self, url, width, height, EINA_FALSE);
Evas_Object *new_view = window->ewk_view;
windows = eina_list_append(windows, window);
- info("minibrowser: location(%d,%d) size=(%d,%d)\n", x, y, width, height);
+ info("minibrowser: location(%d,%d) size=(%d,%d) url=%s", x, y, width, height, url);
return new_view;
}
@@ -786,6 +1386,106 @@ on_window_close(Ewk_View_Smart_Data *smartData)
}
static void
+context_menu_item_selected_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ if (!data) {
+ info("ERROR: context menu callback data is NULL.");
+ return;
+ }
+
+ Ewk_Context_Menu_Item *ewk_item = (Ewk_Context_Menu_Item *)data;
+ info("Selected context menu item: %s.", ewk_context_menu_item_title_get(ewk_item));
+ ewk_context_menu_item_select(ewk_context_menu_item_parent_menu_get(ewk_item), ewk_item);
+ ewk_context_menu_hide(ewk_context_menu_item_parent_menu_get(ewk_item));
+}
+
+static void
+context_menu_populate(Evas_Object* context_menu, Ewk_Context_Menu *ewk_menu, Elm_Object_Item *parent_item)
+{
+ if (!context_menu || !ewk_menu) {
+ info("ERROR: necessary objects are NULL.");
+ return;
+ }
+
+ const Eina_List *list = ewk_context_menu_items_get(ewk_menu);
+ const Eina_List *l;
+ void *data;
+
+ Ewk_Context_Menu_Item *ewk_item;
+ Elm_Object_Item *elm_menu_item;
+ Evas_Object *elm_check_item;
+
+ EINA_LIST_FOREACH(list, l, data) {
+ ewk_item = (Ewk_Context_Menu_Item *)data;
+ switch (ewk_context_menu_item_type_get(ewk_item)) {
+ case EWK_ACTION_TYPE:
+ elm_menu_item = elm_menu_item_add(context_menu, parent_item, NULL, ewk_context_menu_item_title_get(ewk_item), context_menu_item_selected_cb, ewk_item);
+ break;
+ case EWK_CHECKABLE_ACTION_TYPE:
+ elm_check_item = elm_check_add(context_menu);
+ elm_menu_item = elm_menu_item_add(context_menu, parent_item, NULL, ewk_context_menu_item_title_get(ewk_item), context_menu_item_selected_cb, ewk_item);
+ elm_object_item_content_set(elm_menu_item, elm_check_item);
+ elm_check_state_set(elm_check_item, ewk_context_menu_item_checked_get(ewk_item));
+ break;
+ case EWK_SUBMENU_TYPE:
+ elm_menu_item = elm_menu_item_add(context_menu, parent_item, NULL, ewk_context_menu_item_title_get(ewk_item), NULL, ewk_item);
+ if (elm_menu_item)
+ context_menu_populate(context_menu, ewk_context_menu_item_submenu_get(ewk_item), elm_menu_item);
+ break;
+ default:
+ continue;
+ }
+ elm_object_item_disabled_set(elm_menu_item, !ewk_context_menu_item_enabled_get(ewk_item));
+ }
+}
+
+static Eina_Bool
+on_context_menu_show(Ewk_View_Smart_Data *sd, Evas_Coord x, Evas_Coord y, Ewk_Context_Menu *menu)
+{
+ Browser_Window *window = window_find_with_ewk_view(sd->self);
+
+ if (!window || !menu) {
+ info("ERROR: necessary objects are NULL.");
+ return EINA_FALSE;
+ }
+
+ window->context_menu.elm_menu = elm_menu_add(window->elm_window);
+
+ if (!window->context_menu.elm_menu) {
+ info("ERROR: could not create menu widget.");
+ return EINA_FALSE;
+ }
+
+ window->context_menu.ewk_menu = menu;
+
+ context_menu_populate(window->context_menu.elm_menu, menu, NULL);
+
+ info("Showing context menu at (%d, %d).", x, y);
+ elm_menu_move(window->context_menu.elm_menu, x, y);
+ evas_object_show(window->context_menu.elm_menu);
+
+ return EINA_TRUE;
+}
+
+static Eina_Bool
+on_context_menu_hide(Ewk_View_Smart_Data *sd)
+{
+ Browser_Window *window = window_find_with_ewk_view(sd->self);
+
+ if (!window || !window->context_menu.elm_menu) {
+ info("ERROR: necessary objects are NULL.");
+ return EINA_FALSE;
+ }
+
+ elm_menu_close(window->context_menu.elm_menu);
+ evas_object_del(window->context_menu.elm_menu);
+ window->context_menu.elm_menu = NULL;
+ window->context_menu.ewk_menu = NULL;
+
+ return EINA_TRUE;
+}
+
+static void
auth_popup_close(Auth_Data *auth_data)
{
ewk_object_unref(auth_data->request);
@@ -918,8 +1618,9 @@ on_tooltip_text_set(void *user_data, Evas_Object *obj, void *event_info)
Browser_Window *window = (Browser_Window *)user_data;
const char *message = (const char*)event_info;
- elm_object_tooltip_text_set(window->ewk_view, message);
- elm_object_tooltip_show(window->ewk_view);
+ elm_object_tooltip_text_set(window->elm_window, message);
+ window->tooltip.text_set = EINA_TRUE;
+ window_tooltip_update(window);
}
static void
@@ -927,7 +1628,9 @@ on_tooltip_text_unset(void *user_data, Evas_Object *obj, void *event_info)
{
Browser_Window *window = (Browser_Window *)user_data;
- elm_object_tooltip_unset(window->ewk_view);
+ window_tooltip_hide(window);
+ elm_object_tooltip_unset(window->elm_window);
+ window->tooltip.text_set = EINA_FALSE;
}
static void
@@ -960,14 +1663,20 @@ create_toolbar_button(Evas_Object *elm_window, const char *icon_name)
return button;
}
-static Browser_Window *window_create(const char *url, int width, int height)
+static Browser_Window *window_create(Evas_Object *opener, const char *url, int width, int height, Eina_Bool view_mode)
{
- Browser_Window *window = malloc(sizeof(Browser_Window));
+ Browser_Window *window = calloc(1, sizeof(Browser_Window));
if (!window) {
- info("ERROR: could not create browser window.\n");
+ info("ERROR: could not create browser window.");
return NULL;
}
+ /* Initialize tooltip information */
+ window->tooltip.show_timer = NULL;
+ window->tooltip.activated = EINA_FALSE;
+ window->tooltip.text_set = EINA_FALSE;
+ window->tooltip.shown = EINA_FALSE;
+
/* Create window */
window->elm_window = elm_win_add(NULL, "minibrowser-window", ELM_WIN_BASIC);
elm_win_title_set(window->elm_window, APP_NAME);
@@ -1043,6 +1752,46 @@ static Browser_Window *window_create(const char *url, int width, int height)
elm_box_pack_end(horizontal_layout, home_button);
evas_object_show(home_button);
+ /* Create Search bar */
+ window->search.search_bar = elm_box_add(window->elm_window);
+ elm_box_horizontal_set(window->search.search_bar, EINA_TRUE);
+ evas_object_size_hint_min_set(window->search.search_bar, SEARCH_FIELD_SIZE + 2 * SEARCH_BUTTON_SIZE, 0);
+ evas_object_size_hint_align_set(window->search.search_bar, 0.0, EVAS_HINT_FILL);
+ elm_box_pack_end(vertical_layout, window->search.search_bar);
+
+ /* Create Search field */
+ window->search.search_field = elm_entry_add(window->elm_window);
+ elm_entry_scrollable_set(window->search.search_field, EINA_TRUE);
+ elm_entry_scrollbar_policy_set(window->search.search_field, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+ elm_entry_single_line_set(window->search.search_field, EINA_TRUE);
+ elm_entry_cnp_mode_set(window->search.search_field, ELM_CNP_MODE_PLAINTEXT);
+ elm_entry_text_style_user_push(window->search.search_field, "DEFAULT='font_size=14'");
+ evas_object_smart_callback_add(window->search.search_field, "activated", on_search_field_activated, window);
+ evas_object_smart_callback_add(window->search.search_field, "changed", on_search_field_activated, window);
+ evas_object_smart_callback_add(window->search.search_field, "aborted", on_search_field_aborted, window);
+ evas_object_smart_callback_add(window->search.search_field, "clicked", on_search_field_clicked, window);
+ evas_object_size_hint_weight_set(window->search.search_field, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(window->search.search_field, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(window->search.search_bar, window->search.search_field);
+
+ /* Create Search backward button */
+ window->search.backward_button = create_toolbar_button(window->elm_window, "arrow_up");
+ evas_object_smart_callback_add(window->search.backward_button, "clicked", on_search_backward_button_clicked, window);
+ elm_object_disabled_set(window->search.backward_button, EINA_FALSE);
+ evas_object_size_hint_weight_set(window->search.backward_button, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(window->search.backward_button, 1.0, 0.5);
+ evas_object_size_hint_min_set(window->search.backward_button, SEARCH_BUTTON_SIZE, SEARCH_BUTTON_SIZE);
+ elm_box_pack_end(window->search.search_bar, window->search.backward_button);
+
+ /* Create Search forwardward button */
+ window->search.forward_button = create_toolbar_button(window->elm_window, "arrow_down");
+ evas_object_smart_callback_add(window->search.forward_button, "clicked", on_search_forward_button_clicked, window);
+ elm_object_disabled_set(window->search.forward_button, EINA_FALSE);
+ evas_object_size_hint_weight_set(window->search.forward_button, 0.0, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(window->search.forward_button, 1.0, 0.5);
+ evas_object_size_hint_min_set(window->search.forward_button, SEARCH_BUTTON_SIZE, SEARCH_BUTTON_SIZE);
+ elm_box_pack_end(window->search.search_bar, window->search.forward_button);
+
/* Create ewk_view */
Ewk_View_Smart_Class *ewkViewClass = miniBrowserViewSmartClass();
ewkViewClass->run_javascript_alert = on_javascript_alert;
@@ -1054,30 +1803,51 @@ static Browser_Window *window_create(const char *url, int width, int height)
ewkViewClass->fullscreen_exit = on_fullscreen_exit;
ewkViewClass->window_create = on_window_create;
ewkViewClass->window_close = on_window_close;
+ ewkViewClass->popup_menu_show = on_popup_menu_show;
+ ewkViewClass->popup_menu_hide = on_popup_menu_hide;
+ ewkViewClass->context_menu_show = on_context_menu_show;
+ ewkViewClass->context_menu_hide = on_context_menu_hide;
+ ewkViewClass->input_picker_color_request = on_color_picker_request;
+ ewkViewClass->input_picker_color_dismiss = on_color_picker_dismiss;
Evas *evas = evas_object_evas_get(window->elm_window);
- Evas_Smart *smart = evas_smart_class_new(&ewkViewClass->sc);
- window->ewk_view = ewk_view_smart_add(evas, smart, ewk_context_default_get());
- ewk_view_theme_set(window->ewk_view, THEME_DIR "/default.edj");
+ if (legacy_behavior_enabled) {
+ // Use raw WK2 api to create a view using legacy mode.
+ window->ewk_view = (Evas_Object*)WKViewCreate(evas, 0, 0);
+ } else {
+ Evas_Smart *smart = evas_smart_class_new(&ewkViewClass->sc);
+ Ewk_Context *context = opener ? ewk_view_context_get(opener) : ewk_context_default_get();
+ Ewk_Page_Group *pageGroup = opener ? ewk_view_page_group_get(opener) : ewk_page_group_create("");
+ window->ewk_view = ewk_view_smart_add(evas, smart, context, pageGroup);
+ }
+ ewk_view_theme_set(window->ewk_view, TEST_THEME_DIR "/default.edj");
if (device_pixel_ratio)
ewk_view_device_pixel_ratio_set(window->ewk_view, (float)device_pixel_ratio);
+ ewk_view_source_mode_set(window->ewk_view, view_mode);
+ ewk_view_user_agent_set(window->ewk_view, user_agent_string);
+
+ /* Set the zoom level to default */
+ window->current_zoom_level = DEFAULT_ZOOM_LEVEL;
Ewk_Settings *settings = ewk_view_settings_get(window->ewk_view);
ewk_settings_file_access_from_file_urls_allowed_set(settings, EINA_TRUE);
ewk_settings_encoding_detector_enabled_set(settings, encoding_detector_enabled);
ewk_settings_frame_flattening_enabled_set(settings, frame_flattening_enabled);
ewk_settings_local_storage_enabled_set(settings, local_storage_enabled);
- info("HTML5 local storage is %s for this view.\n", local_storage_enabled ? "enabled" : "disabled");
+ info("HTML5 local storage is %s for this view.", local_storage_enabled ? "enabled" : "disabled");
+ elm_win_fullscreen_set(window->elm_window, fullscreen_enabled);
ewk_settings_developer_extras_enabled_set(settings, EINA_TRUE);
ewk_settings_preferred_minimum_contents_width_set(settings, 0);
+ ewk_text_checker_continuous_spell_checking_enabled_set(spell_checking_enabled);
evas_object_smart_callback_add(window->ewk_view, "authentication,request", on_authentication_request, window);
evas_object_smart_callback_add(window->ewk_view, "download,failed", on_download_failed, window);
evas_object_smart_callback_add(window->ewk_view, "download,finished", on_download_finished, window);
evas_object_smart_callback_add(window->ewk_view, "download,request", on_download_request, window);
evas_object_smart_callback_add(window->ewk_view, "file,chooser,request", on_file_chooser_request, window);
- evas_object_smart_callback_add(window->ewk_view, "icon,changed", on_view_icon_changed, window);
+ evas_object_smart_callback_add(window->ewk_view, "favicon,changed", on_view_favicon_changed, window);
evas_object_smart_callback_add(window->ewk_view, "load,error", on_error, window);
+ evas_object_smart_callback_add(window->ewk_view, "load,provisional,failed", on_error, window);
evas_object_smart_callback_add(window->ewk_view, "load,progress", on_progress, window);
evas_object_smart_callback_add(window->ewk_view, "title,changed", on_title_changed, window);
evas_object_smart_callback_add(window->ewk_view, "url,changed", on_url_changed, window);
@@ -1090,20 +1860,38 @@ static Browser_Window *window_create(const char *url, int width, int height)
evas_object_size_hint_weight_set(window->ewk_view, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(window->ewk_view, EVAS_HINT_FILL, EVAS_HINT_FILL);
- elm_box_pack_end(vertical_layout, window->ewk_view);
+ elm_box_pack_before(vertical_layout, window->ewk_view, window->search.search_bar);
evas_object_show(window->ewk_view);
- if (url)
+ if (url && strcmp(url, "about:blank")) // Do not reset 'about:blank' as it would erase all previous document modifications.
ewk_view_url_set(window->ewk_view, url);
evas_object_resize(window->elm_window, width ? width : window_width, height ? height : window_height);
evas_object_show(window->elm_window);
+ search_box_hide(window);
view_focus_set(window, EINA_TRUE);
+ evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_IN, on_mouse_in, window);
+ evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_OUT, on_mouse_out, window);
+ evas_object_event_callback_add(window->ewk_view, EVAS_CALLBACK_MOUSE_MOVE, on_mouse_move, window);
+ evas_object_event_callback_add(window->elm_window, EVAS_CALLBACK_RESIZE, on_window_resize, window);
+
return window;
}
+static Ewk_Cookie_Accept_Policy
+parse_cookies_policy(const char *input_string)
+{
+ if (!strcmp(input_string, "always"))
+ return EWK_COOKIE_ACCEPT_POLICY_ALWAYS;
+ if (!strcmp(input_string, "never"))
+ return EWK_COOKIE_ACCEPT_POLICY_NEVER;
+ if (strcmp(input_string, "no-third-party"))
+ info("Unrecognized type for cookies policy: %s.", input_string);
+ return EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY;
+}
+
static void
parse_window_size(const char *input_string, int *width, int *height)
{
@@ -1136,15 +1924,21 @@ elm_main(int argc, char *argv[])
unsigned char quitOption = 0;
Browser_Window *window;
char *window_size_string = NULL;
+ char *cookies_policy_string = NULL;
Ecore_Getopt_Value values[] = {
ECORE_GETOPT_VALUE_STR(evas_engine_name),
ECORE_GETOPT_VALUE_STR(window_size_string),
+ ECORE_GETOPT_VALUE_STR(user_agent_string),
+ ECORE_GETOPT_VALUE_BOOL(legacy_behavior_enabled),
ECORE_GETOPT_VALUE_DOUBLE(device_pixel_ratio),
ECORE_GETOPT_VALUE_BOOL(quitOption),
ECORE_GETOPT_VALUE_BOOL(encoding_detector_enabled),
ECORE_GETOPT_VALUE_BOOL(frame_flattening_enabled),
ECORE_GETOPT_VALUE_BOOL(local_storage_enabled),
+ ECORE_GETOPT_VALUE_BOOL(fullscreen_enabled),
+ ECORE_GETOPT_VALUE_BOOL(spell_checking_enabled),
+ ECORE_GETOPT_VALUE_STR(cookies_policy_string),
ECORE_GETOPT_VALUE_BOOL(quitOption),
ECORE_GETOPT_VALUE_BOOL(quitOption),
ECORE_GETOPT_VALUE_BOOL(quitOption),
@@ -1178,15 +1972,18 @@ elm_main(int argc, char *argv[])
Ewk_Context *context = ewk_context_default_get();
ewk_context_favicon_database_directory_set(context, NULL);
+ if (cookies_policy_string)
+ ewk_cookie_manager_accept_policy_set(ewk_context_cookie_manager_get(context), parse_cookies_policy(cookies_policy_string));
+
if (window_size_string)
parse_window_size(window_size_string, &window_width, &window_height);
if (args < argc) {
char *url = url_from_user_input(argv[args]);
- window = window_create(url, 0, 0);
+ window = window_create(NULL, url, 0, 0, EINA_FALSE);
free(url);
} else
- window = window_create(DEFAULT_URL, 0, 0);
+ window = window_create(NULL, DEFAULT_URL, 0, 0, EINA_FALSE);
if (!window)
return quit(EINA_FALSE, "ERROR: could not create browser window.\n");
@@ -1198,3 +1995,4 @@ elm_main(int argc, char *argv[])
return quit(EINA_TRUE, NULL);
}
ELM_MAIN()
+
diff --git a/Tools/MiniBrowser/gtk/BrowserWindow.c b/Tools/MiniBrowser/gtk/BrowserWindow.c
index 86b04461d..c95f49c98 100644
--- a/Tools/MiniBrowser/gtk/BrowserWindow.c
+++ b/Tools/MiniBrowser/gtk/BrowserWindow.c
@@ -29,6 +29,7 @@
#include "BrowserDownloadsBar.h"
#include "BrowserSettingsDialog.h"
+#include <gdk/gdkkeysyms.h>
#include <string.h>
enum {
@@ -52,6 +53,8 @@ struct _BrowserWindow {
WebKitWebView *webView;
GtkWidget *downloadsBar;
GdkPixbuf *favicon;
+ GtkWidget *fullScreenMessageLabel;
+ guint fullScreenMessageLabelId;
};
struct _BrowserWindowClass {
@@ -59,6 +62,7 @@ struct _BrowserWindowClass {
};
static const char *defaultWindowTitle = "WebKitGTK+ MiniBrowser";
+static const char *miniBrowserAboutScheme = "minibrowser-about";
static const gdouble minimumZoomLevel = 0.5;
static const gdouble maximumZoomLevel = 3;
static const gdouble zoomStep = 1.2;
@@ -66,12 +70,28 @@ static gint windowCount = 0;
G_DEFINE_TYPE(BrowserWindow, browser_window, GTK_TYPE_WINDOW)
+static char *getInternalURI(const char *uri)
+{
+ // Internally we use minibrowser-about: as about: prefix is ignored by WebKit.
+ if (g_str_has_prefix(uri, "about:") && !g_str_equal(uri, "about:blank"))
+ return g_strconcat(miniBrowserAboutScheme, uri + strlen ("about"), NULL);
+
+ return g_strdup(uri);
+}
+
+static char *getExternalURI(const char *uri)
+{
+ // From the user point of view we support about: prefix.
+ if (g_str_has_prefix(uri, miniBrowserAboutScheme))
+ return g_strconcat("about", uri + strlen(miniBrowserAboutScheme), NULL);
+
+ return g_strdup(uri);
+}
+
static void browserWindowSetStatusText(BrowserWindow *window, const char *text)
{
-#if GTK_CHECK_VERSION(3, 2, 0)
gtk_label_set_text(GTK_LABEL(window->statusLabel), text);
gtk_widget_set_visible(window->statusLabel, !!text);
-#endif
}
static void resetStatusText(GtkWidget *widget, BrowserWindow *window)
@@ -114,7 +134,9 @@ static void settingsCallback(BrowserWindow *window)
static void webViewURIChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window)
{
- gtk_entry_set_text(GTK_ENTRY(window->uriEntry), webkit_web_view_get_uri(webView));
+ char *externalURI = getExternalURI(webkit_web_view_get_uri(webView));
+ gtk_entry_set_text(GTK_ENTRY(window->uriEntry), externalURI);
+ g_free(externalURI);
}
static void webViewTitleChanged(WebKitWebView *webView, GParamSpec *pspec, BrowserWindow *window)
@@ -261,6 +283,43 @@ static void webViewReadyToShow(WebKitWebView *webView, BrowserWindow *window)
gtk_widget_show(GTK_WIDGET(window));
}
+static gboolean fullScreenMessageTimeoutCallback(BrowserWindow *window)
+{
+ gtk_widget_hide(window->fullScreenMessageLabel);
+ window->fullScreenMessageLabelId = 0;
+ return FALSE;
+}
+
+static gboolean webViewEnterFullScreen(WebKitWebView *webView, BrowserWindow *window)
+{
+ gchar *titleOrURI = g_strdup(webkit_web_view_get_title(window->webView));
+ if (!titleOrURI)
+ titleOrURI = getExternalURI(webkit_web_view_get_uri(window->webView));
+ gchar *message = g_strdup_printf("%s is now full screen. Press ESC or f to exit.", titleOrURI);
+ gtk_label_set_text(GTK_LABEL(window->fullScreenMessageLabel), message);
+ g_free(titleOrURI);
+ g_free(message);
+
+ gtk_widget_show(window->fullScreenMessageLabel);
+
+ window->fullScreenMessageLabelId = g_timeout_add_seconds(2, (GSourceFunc)fullScreenMessageTimeoutCallback, window);
+ gtk_widget_hide(window->toolbar);
+
+ return FALSE;
+}
+
+static gboolean webViewLeaveFullScreen(WebKitWebView *webView, BrowserWindow *window)
+{
+ if (window->fullScreenMessageLabelId) {
+ g_source_remove(window->fullScreenMessageLabelId);
+ window->fullScreenMessageLabelId = 0;
+ }
+ gtk_widget_hide(window->fullScreenMessageLabel);
+ gtk_widget_show(window->toolbar);
+
+ return FALSE;
+}
+
static GtkWidget *webViewCreate(WebKitWebView *webView, BrowserWindow *window)
{
WebKitWebView *newWebView = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(webkit_web_view_get_context(webView)));
@@ -281,22 +340,43 @@ static gboolean webViewLoadFailed(WebKitWebView *webView, WebKitLoadEvent loadEv
static gboolean webViewDecidePolicy(WebKitWebView *webView, WebKitPolicyDecision *decision, WebKitPolicyDecisionType decisionType, BrowserWindow *window)
{
- if (decisionType != WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION)
- return FALSE;
-
- WebKitNavigationPolicyDecision *navigationDecision = WEBKIT_NAVIGATION_POLICY_DECISION(decision);
- if (webkit_navigation_policy_decision_get_navigation_type(navigationDecision) != WEBKIT_NAVIGATION_TYPE_LINK_CLICKED
- || webkit_navigation_policy_decision_get_mouse_button(navigationDecision) != 2)
+ switch (decisionType) {
+ case WEBKIT_POLICY_DECISION_TYPE_NAVIGATION_ACTION: {
+ WebKitNavigationPolicyDecision *navigationDecision = WEBKIT_NAVIGATION_POLICY_DECISION(decision);
+ if (webkit_navigation_policy_decision_get_navigation_type(navigationDecision) != WEBKIT_NAVIGATION_TYPE_LINK_CLICKED
+ || webkit_navigation_policy_decision_get_mouse_button(navigationDecision) != GDK_BUTTON_MIDDLE)
+ return FALSE;
+
+ // Opening a new window if link clicked with the middle button.
+ WebKitWebView *newWebView = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(webkit_web_view_get_context(webView)));
+ GtkWidget *newWindow = browser_window_new(newWebView, GTK_WINDOW(window));
+ webkit_web_view_load_request(newWebView, webkit_navigation_policy_decision_get_request(navigationDecision));
+ gtk_widget_show(newWindow);
+
+ webkit_policy_decision_ignore(decision);
+ return TRUE;
+ }
+ case WEBKIT_POLICY_DECISION_TYPE_RESPONSE: {
+ WebKitResponsePolicyDecision *responseDecision = WEBKIT_RESPONSE_POLICY_DECISION(decision);
+ WebKitURIResponse *response = webkit_response_policy_decision_get_response(responseDecision);
+ const char *mimeType = webkit_uri_response_get_mime_type(response);
+
+ if (webkit_web_view_can_show_mime_type(webView, mimeType))
+ return FALSE;
+
+ WebKitWebResource *mainResource = webkit_web_view_get_main_resource(webView);
+ WebKitURIRequest *request = webkit_response_policy_decision_get_request(responseDecision);
+ const char *requestURI = webkit_uri_request_get_uri(request);
+ if (g_strcmp0(webkit_web_resource_get_uri(mainResource), requestURI))
+ return FALSE;
+
+ webkit_policy_decision_download(decision);
+ return TRUE;
+ }
+ case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
+ default:
return FALSE;
-
- WebKitWebView *newWebView = WEBKIT_WEB_VIEW(webkit_web_view_new_with_context(webkit_web_view_get_context(webView)));
- webkit_web_view_set_settings(newWebView, webkit_web_view_get_settings(webView));
- GtkWidget *newWindow = browser_window_new(newWebView, GTK_WINDOW(window));
- webkit_web_view_load_request(newWebView, webkit_navigation_policy_decision_get_request(navigationDecision));
- gtk_widget_show(newWindow);
-
- webkit_policy_decision_ignore(decision);
- return TRUE;
+ }
}
static gboolean webViewDecidePermissionRequest(WebKitWebView *webView, WebKitPermissionRequest *request, BrowserWindow *window)
@@ -396,6 +476,9 @@ static void browserWindowFinalize(GObject *gObject)
window->favicon = NULL;
}
+ if (window->fullScreenMessageLabelId)
+ g_source_remove(window->fullScreenMessageLabelId);
+
G_OBJECT_CLASS(browser_window_parent_class)->finalize(gObject);
if (g_atomic_int_dec_and_test(&windowCount))
@@ -440,6 +523,11 @@ static void browser_window_init(BrowserWindow *window)
gtk_entry_set_icon_activatable(GTK_ENTRY(window->uriEntry), GTK_ENTRY_ICON_PRIMARY, FALSE);
updateUriEntryIcon(window);
+ /* Keyboard accelerators */
+ GtkAccelGroup *accelGroup = gtk_accel_group_new();
+ gtk_window_add_accel_group(GTK_WINDOW(window), accelGroup);
+ g_object_unref(accelGroup);
+
GtkWidget *toolbar = gtk_toolbar_new();
window->toolbar = toolbar;
gtk_orientable_set_orientation(GTK_ORIENTABLE(toolbar), GTK_ORIENTATION_HORIZONTAL);
@@ -483,9 +571,10 @@ static void browser_window_init(BrowserWindow *window)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
gtk_widget_show(GTK_WIDGET(item));
- item = gtk_tool_button_new_from_stock(GTK_STOCK_OK);
+ item = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
g_signal_connect_swapped(item, "clicked", G_CALLBACK(reloadCallback), window);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
+ gtk_widget_add_accelerator(GTK_WIDGET(item), "clicked", accelGroup, GDK_KEY_F5, 0, GTK_ACCEL_VISIBLE);
gtk_widget_show(GTK_WIDGET(item));
GtkWidget *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
@@ -513,13 +602,14 @@ static void browserWindowConstructed(GObject *gObject)
g_signal_connect(window->webView, "mouse-target-changed", G_CALLBACK(webViewMouseTargetChanged), window);
g_signal_connect(window->webView, "notify::zoom-level", G_CALLBACK(webViewZoomLevelChanged), window);
g_signal_connect(window->webView, "notify::favicon", G_CALLBACK(faviconChanged), window);
+ g_signal_connect(window->webView, "enter-fullscreen", G_CALLBACK(webViewEnterFullScreen), window);
+ g_signal_connect(window->webView, "leave-fullscreen", G_CALLBACK(webViewLeaveFullScreen), window);
g_signal_connect(webkit_web_view_get_context(window->webView), "download-started", G_CALLBACK(downloadStarted), window);
WebKitBackForwardList *backForwadlist = webkit_web_view_get_back_forward_list(window->webView);
g_signal_connect(backForwadlist, "changed", G_CALLBACK(backForwadlistChanged), window);
-#if GTK_CHECK_VERSION(3, 2, 0)
GtkWidget *overlay = gtk_overlay_new();
gtk_box_pack_start(GTK_BOX(window->mainBox), overlay, TRUE, TRUE, 0);
gtk_widget_show(overlay);
@@ -534,9 +624,12 @@ static void browserWindowConstructed(GObject *gObject)
gtk_overlay_add_overlay(GTK_OVERLAY(overlay), window->statusLabel);
gtk_container_add(GTK_CONTAINER(overlay), GTK_WIDGET(window->webView));
-#else
- gtk_box_pack_start(GTK_BOX(window->mainBox), GTK_WIDGET(window->webView), TRUE, TRUE, 0);
-#endif
+
+ window->fullScreenMessageLabel = gtk_label_new(NULL);
+ gtk_widget_set_halign(window->fullScreenMessageLabel, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign(window->fullScreenMessageLabel, GTK_ALIGN_CENTER);
+ gtk_widget_set_no_show_all(window->fullScreenMessageLabel, TRUE);
+ gtk_overlay_add_overlay(GTK_OVERLAY(overlay), window->fullScreenMessageLabel);
gtk_widget_show(GTK_WIDGET(window->webView));
}
@@ -582,7 +675,9 @@ void browser_window_load_uri(BrowserWindow *window, const char *uri)
g_return_if_fail(uri);
if (!g_str_has_prefix(uri, "javascript:")) {
- webkit_web_view_load_uri(window->webView, uri);
+ char *internalURI = getInternalURI(uri);
+ webkit_web_view_load_uri(window->webView, internalURI);
+ g_free(internalURI);
return;
}
diff --git a/Tools/MiniBrowser/gtk/CMakeLists.txt b/Tools/MiniBrowser/gtk/CMakeLists.txt
new file mode 100644
index 000000000..14fd82f3f
--- /dev/null
+++ b/Tools/MiniBrowser/gtk/CMakeLists.txt
@@ -0,0 +1,51 @@
+set(MINIBROWSER_DIR "${TOOLS_DIR}/MiniBrowser/gtk")
+set(DERIVED_SOURCES_MINIBROWSER_DIR "${CMAKE_BINARY_DIR}/DerivedSources/MiniBrowser")
+
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_MINIBROWSER_DIR})
+
+set(MiniBrowser_SOURCES
+ ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c
+ ${MINIBROWSER_DIR}/BrowserCellRendererVariant.h
+ ${MINIBROWSER_DIR}/BrowserCellRendererVariant.c
+ ${MINIBROWSER_DIR}/BrowserDownloadsBar.h
+ ${MINIBROWSER_DIR}/BrowserDownloadsBar.c
+ ${MINIBROWSER_DIR}/BrowserSettingsDialog.h
+ ${MINIBROWSER_DIR}/BrowserSettingsDialog.c
+ ${MINIBROWSER_DIR}/BrowserWindow.h
+ ${MINIBROWSER_DIR}/BrowserWindow.c
+ ${MINIBROWSER_DIR}/main.c
+)
+
+set(MiniBrowser_INCLUDE_DIRECTORIES
+ ${DERIVED_SOURCES_MINIBROWSER_DIR}
+ ${DERIVED_SOURCES_DIR}/webkit2gtk
+ ${DERIVED_SOURCES_DIR}/ForwardingHeaders/webkit2gtk
+ ${DERIVED_SOURCES_DIR}/ForwardingHeaders
+ ${CMAKE_SOURCE_DIR}/Source
+ ${GTK3_INCLUDE_DIRS}
+ ${GLIB_INCLUDE_DIRS}
+ ${LIBSOUP_INCLUDE_DIRS}
+)
+
+set(MiniBrowser_LIBRARIES
+ ${JavaScriptCore_LIBRARY_NAME}
+ WebKit2
+ ${GTK3_LIBRARIES}
+ ${GLIB_LIBRARIES}
+)
+
+add_custom_command(
+ OUTPUT ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c
+ ${DERIVED_SOURCES_MINIBROWSER_DIR}/Browsermarshal.h
+ MAIN_DEPENDENCY ${MINIBROWSER_DIR}/browser-marshal.list
+ COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --body > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.c
+ COMMAND glib-genmarshal --prefix=browser_marshal ${MINIBROWSER_DIR}/browser-marshal.list --header > ${DERIVED_SOURCES_MINIBROWSER_DIR}/BrowserMarshal.h
+ VERBATIM)
+
+add_definitions(-DWEBKIT_EXEC_PATH="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
+add_definitions(-DWEBKIT_INJECTED_BUNDLE_PATH="${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+
+include_directories(${MiniBrowser_INCLUDE_DIRECTORIES})
+add_executable(MiniBrowser ${MiniBrowser_SOURCES})
+target_link_libraries(MiniBrowser ${MiniBrowser_LIBRARIES})
+set_target_properties(MiniBrowser PROPERTIES FOLDER "Tools")
diff --git a/Tools/MiniBrowser/gtk/GNUmakefile.am b/Tools/MiniBrowser/gtk/GNUmakefile.am
index 50974ae2f..f42a30b79 100644
--- a/Tools/MiniBrowser/gtk/GNUmakefile.am
+++ b/Tools/MiniBrowser/gtk/GNUmakefile.am
@@ -9,10 +9,13 @@ Programs_MiniBrowser_CPPFLAGS = \
-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk \
-I$(top_builddir)/DerivedSources/WebKit2/webkit2gtk/include \
-DWEBKIT_EXEC_PATH=\"${shell pwd}/$(top_builddir)/Programs/\" \
+ -DWEBKIT_INJECTED_BUNDLE_PATH=\"${shell pwd}/$(top_builddir)/.libs\" \
$(global_cppflags) \
$(javascriptcore_cppflags) \
+ $(FREETYPE_CFLAGS) \
$(GLIB_CFLAGS) \
- $(GTK_CFLAGS)
+ $(GTK_CFLAGS) \
+ $(LIBSOUP_CFLAGS)
Programs_MiniBrowser_SOURCES = \
Tools/MiniBrowser/gtk/BrowserCellRendererVariant.h \
@@ -33,6 +36,7 @@ nodist_Programs_MiniBrowser_SOURCES = \
Programs_MiniBrowser_LDADD = \
libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ $(FREETYPE_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBSOUP_LIBS)
diff --git a/Tools/MiniBrowser/gtk/main.c b/Tools/MiniBrowser/gtk/main.c
index c7367df9c..4592d76bb 100644
--- a/Tools/MiniBrowser/gtk/main.c
+++ b/Tools/MiniBrowser/gtk/main.c
@@ -31,7 +31,19 @@
#include <string.h>
#include <webkit2/webkit2.h>
+#define MINI_BROWSER_ERROR (miniBrowserErrorQuark())
+
static const gchar **uriArguments = NULL;
+static const char *miniBrowserAboutScheme = "minibrowser-about";
+
+typedef enum {
+ MINI_BROWSER_ERROR_INVALID_ABOUT_PATH
+} MiniBrowserError;
+
+static GQuark miniBrowserErrorQuark()
+{
+ return g_quark_from_string("minibrowser-quark");
+}
static gchar *argumentToURL(const char *filename)
{
@@ -198,6 +210,33 @@ static gboolean addSettingsGroupToContext(GOptionContext *context, WebKitSetting
return TRUE;
}
+static void
+aboutURISchemeRequestCallback(WebKitURISchemeRequest *request, gpointer userData)
+{
+ GInputStream *stream;
+ gsize streamLength;
+ const gchar *path;
+ gchar *contents;
+ GError *error;
+
+ path = webkit_uri_scheme_request_get_path(request);
+ if (!g_strcmp0(path, "minibrowser")) {
+ contents = g_strdup_printf("<html><body><h1>WebKitGTK+ MiniBrowser</h1><p>The WebKit2 test browser of the GTK+ port.</p><p>WebKit version: %d.%d.%d</p></body></html>",
+ webkit_get_major_version(),
+ webkit_get_minor_version(),
+ webkit_get_micro_version());
+ streamLength = strlen(contents);
+ stream = g_memory_input_stream_new_from_data(contents, streamLength, g_free);
+
+ webkit_uri_scheme_request_finish(request, stream, streamLength, "text/html");
+ g_object_unref(stream);
+ } else {
+ error = g_error_new(MINI_BROWSER_ERROR, MINI_BROWSER_ERROR_INVALID_ABOUT_PATH, "Invalid about:%s page.", path);
+ webkit_uri_scheme_request_finish_error(request, error);
+ g_error_free(error);
+ }
+}
+
int main(int argc, char *argv[])
{
gtk_init(&argc, &argv);
@@ -226,10 +265,13 @@ int main(int argc, char *argv[])
#ifdef WEBKIT_EXEC_PATH
g_setenv("WEBKIT_INSPECTOR_PATH", WEBKIT_EXEC_PATH "resources/inspector", FALSE);
#endif /* WEBKIT_EXEC_PATH */
+ g_setenv("WEBKIT_INJECTED_BUNDLE_PATH", WEBKIT_INJECTED_BUNDLE_PATH, FALSE);
// Enable the favicon database, by specifying the default directory.
webkit_web_context_set_favicon_database_directory(webkit_web_context_get_default(), NULL);
+ webkit_web_context_register_uri_scheme(webkit_web_context_get_default(), miniBrowserAboutScheme, aboutURISchemeRequestCallback, NULL, NULL);
+
if (uriArguments) {
int i;
diff --git a/Tools/MiniBrowser/mac/BrowserWindowController.h b/Tools/MiniBrowser/mac/BrowserWindowController.h
index 7ee89197b..482184b65 100644
--- a/Tools/MiniBrowser/mac/BrowserWindowController.h
+++ b/Tools/MiniBrowser/mac/BrowserWindowController.h
@@ -46,6 +46,8 @@
- (IBAction)toggleZoomMode:(id)sender;
- (IBAction)togglePaginationMode:(id)sender;
+- (IBAction)toggleTransparentWindow:(id)sender;
+
- (IBAction)dumpSourceToConsole:(id)sender;
- (IBAction)find:(id)sender;
diff --git a/Tools/MiniBrowser/mac/MainMenu.xib b/Tools/MiniBrowser/mac/MainMenu.xib
index b713a00f5..f40e9bd2b 100644
--- a/Tools/MiniBrowser/mac/MainMenu.xib
+++ b/Tools/MiniBrowser/mac/MainMenu.xib
@@ -946,6 +946,14 @@
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
+ <object class="NSMenuItem" id="489162377">
+ <reference key="NSMenu" ref="865232259"/>
+ <string key="NSTitle">Transparent Window</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
<object class="NSMenuItem" id="624939128">
<reference key="NSMenu" ref="865232259"/>
<bool key="NSIsDisabled">YES</bool>
@@ -1468,6 +1476,14 @@
</object>
<int key="connectionID">575</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleTransparentWindow:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="489162377"/>
+ </object>
+ <int key="connectionID">578</int>
+ </object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@@ -2142,6 +2158,7 @@
<reference ref="191469404"/>
<reference ref="624939128"/>
<reference ref="15772092"/>
+ <reference ref="489162377"/>
</object>
<reference key="parent" ref="816668511"/>
</object>
@@ -2215,6 +2232,11 @@
<reference key="object" ref="552626760"/>
<reference key="parent" ref="720053764"/>
</object>
+ <object class="IBObjectRecord">
+ <int key="objectID">576</int>
+ <reference key="object" ref="489162377"/>
+ <reference key="parent" ref="865232259"/>
+ </object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
@@ -2317,6 +2339,7 @@
<string>57.IBPluginDependency</string>
<string>571.IBPluginDependency</string>
<string>573.IBPluginDependency</string>
+ <string>576.IBPluginDependency</string>
<string>58.IBPluginDependency</string>
<string>72.IBPluginDependency</string>
<string>73.IBPluginDependency</string>
@@ -2442,6 +2465,7 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@@ -2456,7 +2480,7 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
- <int key="maxID">575</int>
+ <int key="maxID">578</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -2602,6 +2626,73 @@
</object>
</object>
<object class="IBPartialClassDescription">
+ <string key="className">NSDocument</string>
+ <object class="NSMutableDictionary" key="actions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>printDocument:</string>
+ <string>revertDocumentToSaved:</string>
+ <string>runPageLayout:</string>
+ <string>saveDocument:</string>
+ <string>saveDocumentAs:</string>
+ <string>saveDocumentTo:</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ <string>id</string>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="actionInfosByName">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>printDocument:</string>
+ <string>revertDocumentToSaved:</string>
+ <string>runPageLayout:</string>
+ <string>saveDocument:</string>
+ <string>saveDocumentAs:</string>
+ <string>saveDocumentTo:</string>
+ </object>
+ <object class="NSArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBActionInfo">
+ <string key="name">printDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">revertDocumentToSaved:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">runPageLayout:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveDocument:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveDocumentAs:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ <object class="IBActionInfo">
+ <string key="name">saveDocumentTo:</string>
+ <string key="candidateClassName">id</string>
+ </object>
+ </object>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">./Classes/NSDocument.h</string>
+ </object>
+ </object>
+ <object class="IBPartialClassDescription">
<string key="className">NSDocumentController</string>
<object class="NSMutableDictionary" key="actions">
<string key="NS.key.0">_openRecentDocument:</string>
diff --git a/Tools/MiniBrowser/mac/WK1BrowserWindowController.m b/Tools/MiniBrowser/mac/WK1BrowserWindowController.m
index 273adb518..4b2428a32 100644
--- a/Tools/MiniBrowser/mac/WK1BrowserWindowController.m
+++ b/Tools/MiniBrowser/mac/WK1BrowserWindowController.m
@@ -26,6 +26,7 @@
#import "WK1BrowserWindowController.h"
#import <WebKit/WebKit.h>
+#import <WebKit/WebViewPrivate.h>
#import "AppDelegate.h"
@interface WK1BrowserWindowController ()
@@ -48,6 +49,9 @@
- (void)dealloc
{
+ [_webView setFrameLoadDelegate:nil];
+ [_webView setUIDelegate:nil];
+ [_webView setResourceLoadDelegate:nil];
[_webView release];
[super dealloc];
@@ -105,11 +109,6 @@
[_webView goForward:sender];
}
-- (BOOL)isPaginated
-{
- return NO;
-}
-
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
SEL action = [menuItem action];
@@ -129,6 +128,8 @@
[menuItem setState:_zoomTextOnly ? NSOnState : NSOffState];
else if ([menuItem action] == @selector(togglePaginationMode:))
[menuItem setState:[self isPaginated] ? NSOnState : NSOffState];
+ else if ([menuItem action] == @selector(toggleTransparentWindow:))
+ [menuItem setState:[[self window] isOpaque] ? NSOffState : NSOnState];
return YES;
}
@@ -216,8 +217,36 @@
_zoomTextOnly = !_zoomTextOnly;
}
+- (BOOL)isPaginated
+{
+ return [_webView _paginationMode] != WebPaginationModeUnpaginated;
+}
+
- (IBAction)togglePaginationMode:(id)sender
{
+ if ([self isPaginated]) {
+ [_webView _setPaginationMode:WebPaginationModeUnpaginated];
+ } else {
+ [_webView _setPaginationMode:WebPaginationModeRightToLeft];
+ [_webView _setPageLength:_webView.bounds.size.width / 2];
+ [_webView _setGapBetweenPages:10];
+ }
+}
+
+- (IBAction)toggleTransparentWindow:(id)sender
+{
+ BOOL isTransparent = ![[self window] isOpaque];
+ isTransparent = !isTransparent;
+
+ [[self window] setOpaque:!isTransparent];
+ [[self window] setHasShadow:!isTransparent];
+
+ if (isTransparent)
+ [_webView setBackgroundColor:[NSColor clearColor]];
+ else
+ [_webView setBackgroundColor:[NSColor whiteColor]];
+
+ [[self window] display];
}
- (IBAction)find:(id)sender
@@ -250,4 +279,16 @@
[[self window] setTitle:[title stringByAppendingString:@" [WK1]"]];
}
+- (void)webView:(WebView *)sender runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+ NSAlert *alert = [[NSAlert alloc] init];
+ [alert addButtonWithTitle:@"OK"];
+
+ alert.messageText = [NSString stringWithFormat:@"JavaScript alert dialog from %@.", frame.dataSource.request.URL.absoluteString];
+ alert.informativeText = message;
+
+ [alert runModal];
+ [alert release];
+}
+
@end
diff --git a/Tools/MiniBrowser/mac/WK2BrowserWindowController.m b/Tools/MiniBrowser/mac/WK2BrowserWindowController.m
index 1731eb650..bb40dbf70 100644
--- a/Tools/MiniBrowser/mac/WK2BrowserWindowController.m
+++ b/Tools/MiniBrowser/mac/WK2BrowserWindowController.m
@@ -118,6 +118,8 @@
[menuItem setState:_zoomTextOnly ? NSOnState : NSOffState];
else if ([menuItem action] == @selector(togglePaginationMode:))
[menuItem setState:[self isPaginated] ? NSOnState : NSOffState];
+ else if ([menuItem action] == @selector(toggleTransparentWindow:))
+ [menuItem setState:[[self window] isOpaque] ? NSOffState : NSOnState];
return YES;
}
@@ -266,9 +268,25 @@
}
}
+- (IBAction)toggleTransparentWindow:(id)sender
+{
+ BOOL isTransparent = _webView.drawsTransparentBackground;
+ isTransparent = !isTransparent;
+
+ [[self window] setOpaque:!isTransparent];
+ [[self window] setHasShadow:!isTransparent];
+
+ _webView.drawsTransparentBackground = isTransparent;
+
+ [[self window] display];
+}
+
- (IBAction)dumpSourceToConsole:(id)sender
{
WKPageGetSourceForFrame_b(_webView.pageRef, WKPageGetMainFrame(_webView.pageRef), ^(WKStringRef result, WKErrorRef error) {
+ if (!result)
+ return;
+
CFStringRef cfResult = WKStringCopyCFString(0, result);
LOG(@"Main frame source\n \"%@\"", (NSString *)cfResult);
CFRelease(cfResult);
@@ -638,10 +656,13 @@ static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParameters
0, // didNewFirstVisuallyNonEmptyLayout
0, // willGoToBackForwardListItem
0, // interactionOccurredWhileProcessUnresponsive
- 0, // pluginDidFail
+ 0, // pluginDidFail_deprecatedForUseWithV1
0, // didReceiveIntentForFrame
0, // registerIntentServiceForFrame
0, // didLayout
+ 0, // pluginLoadPolicy_deprecatedForUseWithV2
+ 0, // pluginDidFail
+ 0, // pluginLoadPolicy
};
WKPageSetPageLoaderClient(_webView.pageRef, &loadClient);
@@ -700,9 +721,10 @@ static void runOpenPanel(WKPageRef page, WKFrameRef frame, WKOpenPanelParameters
createNewPage,
mouseDidMoveOverElement,
0, // decidePolicyForNotificationPermissionRequest
- 0, // unavailablePluginButtonClicked
+ 0, // unavailablePluginButtonClicked_deprecatedForUseWithV1
0, // showColorPicker
0, // hideColorPicker
+ 0, // unavailablePluginButtonClicked
};
WKPageSetPageUIClient(_webView.pageRef, &uiClient);
}
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.cpp b/Tools/MiniBrowser/qt/BrowserWindow.cpp
index d9de51974..8472d5cfd 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.cpp
+++ b/Tools/MiniBrowser/qt/BrowserWindow.cpp
@@ -104,6 +104,11 @@ void BrowserWindow::focusAddressBar()
QMetaObject::invokeMethod(rootObject(), "focusAddressBar", Qt::DirectConnection);
}
+void BrowserWindow::toggleFind()
+{
+ QMetaObject::invokeMethod(rootObject(), "toggleFind", Qt::DirectConnection);
+}
+
BrowserWindow* BrowserWindow::newWindow(const QString& url)
{
BrowserWindow* window = new BrowserWindow(m_windowOptions);
@@ -113,14 +118,22 @@ BrowserWindow* BrowserWindow::newWindow(const QString& url)
void BrowserWindow::updateVisualMockTouchPoints(const QList<QTouchEvent::TouchPoint>& touchPoints)
{
+ if (touchPoints.isEmpty()) {
+ // Hide all touch indicator items.
+ foreach (QQuickItem* item, m_activeMockComponents.values())
+ item->setProperty("pressed", false);
+
+ return;
+ }
+
foreach (const QTouchEvent::TouchPoint& touchPoint, touchPoints) {
- QString mockTouchPointIdentifier = QString("mockTouchPoint%1").arg(touchPoint.id());
- QQuickItem* mockTouchPointItem = rootObject()->findChild<QQuickItem*>(mockTouchPointIdentifier, Qt::FindDirectChildrenOnly);
+ QQuickItem* mockTouchPointItem = m_activeMockComponents.value(touchPoint.id());
if (!mockTouchPointItem) {
QQmlComponent touchMockPointComponent(engine(), QUrl("qrc:///qml/MockTouchPoint.qml"));
mockTouchPointItem = qobject_cast<QQuickItem*>(touchMockPointComponent.create());
- mockTouchPointItem->setObjectName(mockTouchPointIdentifier);
+ Q_ASSERT(mockTouchPointItem);
+ m_activeMockComponents.insert(touchPoint.id(), mockTouchPointItem);
mockTouchPointItem->setProperty("pointId", QVariant(touchPoint.id()));
mockTouchPointItem->setParent(rootObject());
mockTouchPointItem->setParentItem(rootObject());
diff --git a/Tools/MiniBrowser/qt/BrowserWindow.h b/Tools/MiniBrowser/qt/BrowserWindow.h
index 0f30e2c99..2ecfc1453 100644
--- a/Tools/MiniBrowser/qt/BrowserWindow.h
+++ b/Tools/MiniBrowser/qt/BrowserWindow.h
@@ -45,6 +45,7 @@ public:
void load(const QString& url);
void reload();
void focusAddressBar();
+ void toggleFind();
QQuickWebView* webView() const;
QQuickWebViewExperimental* webViewExperimental() const;
@@ -67,6 +68,7 @@ private:
virtual void wheelEvent(QWheelEvent*);
WindowOptions* m_windowOptions;
+ QHash<int, QQuickItem*> m_activeMockComponents;
QVector<qreal> m_zoomLevels;
unsigned m_currentZoomLevel;
};
diff --git a/Tools/MiniBrowser/qt/MiniBrowser.qrc b/Tools/MiniBrowser/qt/MiniBrowser.qrc
index e21eef341..3fa6208a0 100644
--- a/Tools/MiniBrowser/qt/MiniBrowser.qrc
+++ b/Tools/MiniBrowser/qt/MiniBrowser.qrc
@@ -4,6 +4,7 @@
<file>icons/checkbox_unchecked.png</file>
<file>icons/contents_width.png</file>
<file>icons/favicon.png</file>
+ <file>icons/find.png</file>
<file>icons/folder.png</file>
<file>icons/info.png</file>
<file>icons/next.png</file>
diff --git a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
index d54cd669b..5915e7734 100644
--- a/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
+++ b/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2010 University of Szeged
+ * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
*
* All rights reserved.
*
@@ -83,7 +84,7 @@ MiniBrowserApplication::MiniBrowserApplication(int& argc, char** argv)
, m_windowOptions(this)
, m_holdingControl(false)
{
- setOrganizationName("Nokia");
+ setOrganizationName("QtProject");
setApplicationName("QtMiniBrowser");
setApplicationVersion("0.1");
@@ -110,6 +111,8 @@ bool MiniBrowserApplication::notify(QObject* target, QEvent* event)
if (!browserWindow)
return QGuiApplication::notify(target, event);
+ m_holdingControl = QGuiApplication::keyboardModifiers().testFlag(Qt::ControlModifier);
+
// In QML events are propagated through parents. But since the WebView
// may consume key events, a shortcut might never reach the top QQuickItem.
// Therefore we are checking here for shortcuts.
@@ -123,19 +126,25 @@ bool MiniBrowserApplication::notify(QObject* target, QEvent* event)
browserWindow->focusAddressBar();
return true;
}
+ if ((keyEvent->key() == Qt::Key_F && keyEvent->modifiers() == Qt::ControlModifier) || keyEvent->key() == Qt::Key_F3) {
+ browserWindow->toggleFind();
+ return true;
+ }
}
if (event->type() == QEvent::KeyRelease && static_cast<QKeyEvent*>(event)->key() == Qt::Key_Control) {
foreach (int id, m_heldTouchPoints)
- if (m_touchPoints.contains(id))
+ if (m_touchPoints.contains(id) && !QGuiApplication::mouseButtons().testFlag(Qt::MouseButton(id))) {
m_touchPoints[id].setState(Qt::TouchPointReleased);
- m_heldTouchPoints.clear();
- sendTouchEvent(browserWindow, QEvent::TouchEnd, static_cast<QKeyEvent*>(event)->timestamp());
+ m_heldTouchPoints.remove(id);
+ } else
+ m_touchPoints[id].setState(Qt::TouchPointStationary);
+
+ sendTouchEvent(browserWindow, m_heldTouchPoints.isEmpty() ? QEvent::TouchEnd : QEvent::TouchUpdate, static_cast<QKeyEvent*>(event)->timestamp());
}
if (isMouseEvent(event)) {
const QMouseEvent* const mouseEvent = static_cast<QMouseEvent*>(event);
- m_holdingControl = mouseEvent->modifiers().testFlag(Qt::ControlModifier);
QTouchEvent::TouchPoint touchPoint;
touchPoint.setPressure(1);
diff --git a/Tools/MiniBrowser/qt/UrlLoader.cpp b/Tools/MiniBrowser/qt/UrlLoader.cpp
index 8b330fdb9..a0658e983 100644
--- a/Tools/MiniBrowser/qt/UrlLoader.cpp
+++ b/Tools/MiniBrowser/qt/UrlLoader.cpp
@@ -28,6 +28,7 @@
#include "UrlLoader.h"
#include "private/qquickwebview_p.h"
+#include "private/qwebloadrequest_p.h"
#include <QDebug>
#include <QFile>
@@ -42,14 +43,14 @@ UrlLoader::UrlLoader(BrowserWindow* browserWindow, const QString& inputFileName,
m_checkIfFinishedTimer.setSingleShot(true);
connect(&m_checkIfFinishedTimer, SIGNAL(timeout()), this, SLOT(checkIfFinished()));
// loadStarted and loadFinished on QWebPage is emitted for each frame/sub-frame
- connect(m_browserWindow->webView(), SIGNAL(loadStarted()), this, SLOT(frameLoadStarted()));
- connect(m_browserWindow->webView(), SIGNAL(loadSucceeded()), this, SLOT(frameLoadFinished()));
- connect(m_browserWindow->webView(), SIGNAL(loadFailed(QDesktopWebView::ErrorType, int, const QUrl&)), this, SLOT(frameLoadFinished()));
+ connect(m_browserWindow->webView(), SIGNAL(loadingChanged(QWebLoadRequest*)), this, SLOT(loadingChanged(QWebLoadRequest*)));
+ connect(this, SIGNAL(loadStarted()), this, SLOT(frameLoadStarted()));
+ connect(this, SIGNAL(loadFinished()), this, SLOT(frameLoadFinished()));
if (timeoutSeconds) {
m_timeoutTimer.setInterval(timeoutSeconds * 1000);
m_timeoutTimer.setSingleShot(true);
- connect(m_browserWindow->webView(), SIGNAL(loadStarted()), &m_timeoutTimer, SLOT(start()));
+ connect(this, SIGNAL(loadStarted()), &m_timeoutTimer, SLOT(start()));
connect(&m_timeoutTimer, SIGNAL(timeout()), this, SLOT(loadNext()));
}
if (extraTimeSeconds) {
@@ -129,3 +130,18 @@ bool UrlLoader::getUrl(QString& qstr)
qstr = m_urls[m_index++];
return true;
}
+
+void UrlLoader::loadingChanged(QWebLoadRequest* loadRequest)
+{
+ switch (loadRequest->status()) {
+ case QQuickWebView::LoadStartedStatus:
+ emit loadStarted();
+ break;
+ case QQuickWebView::LoadStoppedStatus:
+ case QQuickWebView::LoadSucceededStatus:
+ case QQuickWebView::LoadFailedStatus:
+ default:
+ emit loadFinished();
+ break;
+ }
+}
diff --git a/Tools/MiniBrowser/qt/UrlLoader.h b/Tools/MiniBrowser/qt/UrlLoader.h
index 8ac58dfdd..a64548a02 100644
--- a/Tools/MiniBrowser/qt/UrlLoader.h
+++ b/Tools/MiniBrowser/qt/UrlLoader.h
@@ -35,6 +35,8 @@
#include <QTimer>
#include <QVector>
+class QWebLoadRequest;
+
class UrlLoader : public QObject {
Q_OBJECT
@@ -48,9 +50,12 @@ private Q_SLOTS:
void checkIfFinished();
void frameLoadStarted();
void frameLoadFinished();
+ void loadingChanged(QWebLoadRequest*);
Q_SIGNALS:
void pageLoadFinished();
+ void loadStarted();
+ void loadFinished();
private:
void loadUrlList(const QString& inputFileName);
diff --git a/Tools/MiniBrowser/qt/icons/find.png b/Tools/MiniBrowser/qt/icons/find.png
new file mode 100644
index 000000000..b76afa398
--- /dev/null
+++ b/Tools/MiniBrowser/qt/icons/find.png
Binary files differ
diff --git a/Tools/MiniBrowser/qt/qml/BrowserWindow.qml b/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
index e52b2f44b..b4b5bc092 100644
--- a/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
+++ b/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2010 University of Szeged
+ * Copyright (c) 2012 Hewlett-Packard Development Company, L.P.
*
* All rights reserved.
*
@@ -54,7 +55,163 @@ Rectangle {
addressLine.forceActiveFocus()
addressLine.selectAll()
}
+ function toggleFind() {
+ findBar.toggle()
+ }
+ Rectangle {
+ id: findBar
+ z: webView.z + 1
+ y: navigationBar.y
+ anchors {
+ left: parent.left
+ right: parent.right
+ }
+ height: navigationBar.height
+ color: "#efefef"
+ visible: y > navigationBar.y
+
+ Behavior on y {NumberAnimation {duration: 250}}
+
+ function toggle() {
+ if (y == navigationBar.y) {
+ findTextInput.forceActiveFocus()
+ y += height
+ } else {
+ webView.forceActiveFocus()
+ y = navigationBar.y
+ find("",0);
+ }
+ }
+ function find(str, options) {
+ var findOptions = options | WebViewExperimental.FindHighlightAllOccurrences
+ findOptions |= WebViewExperimental.FindWrapsAroundDocument
+ webView.experimental.findText(str, findOptions)
+ }
+
+ Connections {
+ target: webView.experimental
+ onTextFound: {
+ failedOverlay.visible = matchCount == 0
+ }
+ }
+ Item {
+ anchors.fill: parent
+ Rectangle {
+ id: inputArea
+ height: 26
+ anchors {
+ left: parent.left
+ right: prevButton.left
+ margins: 6
+ verticalCenter: parent.verticalCenter
+ }
+ color: "white"
+ border.width: 1
+ border.color: "#bfbfbf"
+ radius: 3
+ Rectangle {
+ id: failedOverlay
+ anchors.fill: parent
+ color: "red"
+ opacity: 0.5
+ radius: 6
+ visible: false
+ }
+ TextInput {
+ id: findTextInput
+ clip: true
+ selectByMouse: true
+ horizontalAlignment: TextInput.AlignLeft
+ anchors.fill: parent
+ anchors.margins: 3
+ font {
+ pointSize: 11
+ family: "Sans"
+ }
+ text: ""
+ readOnly: !findBar.visible
+ function doFind() {
+ if (!findBar.visible) {
+ return;
+ }
+ if (findTextInput.text == "") {
+ failedOverlay.visible = false
+ }
+ findBar.find(findTextInput.text)
+ }
+ onTextChanged: {
+ doFind()
+ }
+ Keys.onReturnPressed:{
+ doFind()
+ }
+ }
+ }
+ Rectangle {
+ id: prevButton
+ height: inputArea.height
+ width: height
+ anchors.right: nextButton.left
+ anchors.verticalCenter: parent.verticalCenter
+ color: "#efefef"
+ radius: 6
+
+ Image {
+ anchors.centerIn: parent
+ source: "../icons/previous.png"
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: parent.color
+ radius: parent.radius
+ opacity: 0.8
+ visible: !parent.enabled
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: { if (parent.enabled) parent.color = "#cfcfcf" }
+ onReleased: { parent.color = "#efefef" }
+ onClicked: {
+ findBar.find(findTextInput.text, WebViewExperimental.FindBackward)
+ }
+ }
+ }
+ Rectangle {
+ id: nextButton
+ height: inputArea.height
+ width: height
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ color: "#efefef"
+ radius: 6
+
+ Image {
+ anchors.centerIn: parent
+ source: "../icons/next.png"
+ }
+
+ Rectangle {
+ anchors.fill: parent
+ color: parent.color
+ radius: parent.radius
+ opacity: 0.8
+ visible: !parent.enabled
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: { if (parent.enabled) parent.color = "#cfcfcf" }
+ onReleased: { parent.color = "#efefef" }
+ onClicked: {
+ findBar.find(findTextInput.text, 0)
+ }
+ }
+ }
+ }
+ }
Rectangle {
id: navigationBar
color: "#efefef"
@@ -213,6 +370,27 @@ Rectangle {
}
Rectangle {
+ id: findButton
+ height: parent.height
+ width: height
+ color: "#efefef"
+ radius: 6
+
+ Image {
+ anchors.centerIn: parent
+ opacity: 0.6
+ source: "../icons/find.png"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ findBar.toggle()
+ }
+ }
+ }
+
+ Rectangle {
id: touchEventsButton
height: parent.height
width: height
@@ -335,7 +513,7 @@ Rectangle {
clip: false
anchors {
- top: navigationBar.bottom
+ top: findBar.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
diff --git a/Tools/MiniBrowser/win/BrowserView.cpp b/Tools/MiniBrowser/win/BrowserView.cpp
deleted file mode 100644
index 0a6858e35..000000000
--- a/Tools/MiniBrowser/win/BrowserView.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (C) 2010 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
- */
-
-#include "StdAfx.h"
-#include "BrowserView.h"
-
-#include "BrowserWindow.h"
-#include <WebKit2/WKContextPrivate.h>
-#include <WebKit2/WKURLCF.h>
-
-static const unsigned short HIGH_BIT_MASK_SHORT = 0x8000;
-
-BrowserView::BrowserView()
- : m_webView(0)
-{
-}
-
-// UI Client Callbacks
-
-static WKPageRef createNewPage(WKPageRef page, WKURLRequestRef request, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void* clientInfo)
-{
- BrowserWindow* browserWindow = BrowserWindow::create();
- browserWindow->createWindow(0, 0, 800, 600);
-
- return WKViewGetPage(browserWindow->view().webView());
-}
-
-static void showPage(WKPageRef page, const void *clientInfo)
-{
- static_cast<BrowserWindow*>(const_cast<void*>(clientInfo))->showWindow();
-}
-
-static void closePage(WKPageRef page, const void *clientInfo)
-{
-}
-
-static void runJavaScriptAlert(WKPageRef page, WKStringRef alertText, WKFrameRef frame, const void* clientInfo)
-{
-}
-
-static bool runJavaScriptConfirm(WKPageRef page, WKStringRef message, WKFrameRef frame, const void* clientInfo)
-{
- return false;
-}
-
-static WKStringRef runJavaScriptPrompt(WKPageRef page, WKStringRef message, WKStringRef defaultValue, WKFrameRef frame, const void* clientInfo)
-{
- return 0;
-}
-
-static void setStatusText(WKPageRef page, WKStringRef text, const void* clientInfo)
-{
-}
-
-static void mouseDidMoveOverElement(WKPageRef page, WKHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef userData, const void *clientInfo)
-{
-}
-
-void BrowserView::create(RECT webViewRect, BrowserWindow* parentWindow)
-{
- assert(!m_webView);
-
- static WKContextRef context = WKContextCreate();
-
- m_webView = WKViewCreate(webViewRect, context, 0, parentWindow->window());
-
- WKPageUIClient uiClient = {
- kWKPageUIClientCurrentVersion,
- parentWindow, /* clientInfo */
- 0, /* createNewPage_deprecatedForUseWithV0 */
- showPage,
- closePage,
- 0, /* takeFocus */
- 0, /* focus */
- 0, /* unfocus */
- runJavaScriptAlert,
- runJavaScriptConfirm,
- runJavaScriptPrompt,
- setStatusText,
- 0, /* mouseDidMoveOverElement_deprecatedForUseWithV0 */
- 0, /* missingPluginButtonClicked */
- 0, /* didNotHandleKeyEvent */
- 0, /* didNotHandleWheelEvent */
- 0, /* toolbarsAreVisible */
- 0, /* setToolbarsAreVisible */
- 0, /* menuBarIsVisible */
- 0, /* setMenuBarIsVisible */
- 0, /* statusBarIsVisible */
- 0, /* setStatusBarIsVisible */
- 0, /* isResizable */
- 0, /* setIsResizable */
- 0, /* getWindowFrame */
- 0, /* setWindowFrame */
- 0, /* runBeforeUnloadConfirmPanel */
- 0, /* didDraw */
- 0, /* pageDidScroll */
- 0, /* exceededDatabaseQuota */
- 0, /* runOpenPanel */
- 0, /* decidePolicyForGeolocationPermissionRequest */
- 0, /* headerHeight */
- 0, /* footerHeight */
- 0, /* drawHeader */
- 0, /* drawFooter */
- 0, /* printFrame */
- 0, /* runModal */
- 0, /* didCompleteRubberBandForMainFrame */
- 0, /* saveDataToFileInDownloadsFolder */
- 0, /* shouldInterruptJavaScript */
- createNewPage,
- mouseDidMoveOverElement,
- 0, /* decidePolicyForNotificationPermissionRequest */
- 0, /* unavailablePluginButtonClicked */
- 0, /* showColorPicker */
- 0, /* hideColorPicker */
- };
-
- WKPageSetPageUIClient(WKViewGetPage(m_webView), &uiClient);
-
- WKViewSetIsInWindow(m_webView, true);
-}
-
-void BrowserView::setFrame(RECT rect)
-{
- HWND webViewWindow = WKViewGetWindow(m_webView);
- ::SetWindowPos(webViewWindow, 0, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);
-}
-
-void BrowserView::goToURL(const std::wstring& urlString)
-{
- CFStringRef string = CFStringCreateWithCharacters(0, (const UniChar*)urlString.data(), urlString.size());
- CFStringRef escapedString = CFURLCreateStringByAddingPercentEscapes(0, string, 0, 0, kCFStringEncodingUTF8);
- CFRelease(string);
- CFURLRef cfURL = CFURLCreateWithString(0, escapedString, 0);
- CFRelease(escapedString);
-
- WKURLRef url = WKURLCreateWithCFURL(cfURL);
- CFRelease(cfURL);
-
- WKPageRef page = WKViewGetPage(m_webView);
- WKPageLoadURL(page, url);
- WKRelease(url);
-}
diff --git a/Tools/MiniBrowser/win/BrowserWindow.cpp b/Tools/MiniBrowser/win/BrowserWindow.cpp
deleted file mode 100644
index b791d5bb5..000000000
--- a/Tools/MiniBrowser/win/BrowserWindow.cpp
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * Copyright (C) 2010 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
- */
-
-#include "StdAfx.h"
-#include "BrowserWindow.h"
-#include "MiniBrowser.h"
-#include "Resource.h"
-
-#include <assert.h>
-#include <commctrl.h>
-#include <shlwapi.h>
-#include <vector>
-#include <wininet.h>
-
-using namespace std;
-
-BrowserWindow::BrowserWindow()
- : m_window(0)
- , m_rebarWindow(0)
- , m_comboBoxWindow(0)
-{
-}
-
-LRESULT CALLBACK BrowserWindow::BrowserWindowWndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
-{
- LONG_PTR longPtr = ::GetWindowLongPtr(window, 0);
-
- if (BrowserWindow* browserView = reinterpret_cast<BrowserWindow*>(longPtr))
- return browserView->wndProc(window, message, wParam, lParam);
-
- if (message == WM_CREATE) {
- LPCREATESTRUCT createStruct = reinterpret_cast<LPCREATESTRUCT>(lParam);
- BrowserWindow* browserWindow = static_cast<BrowserWindow*>(createStruct->lpCreateParams);
- browserWindow->m_window = window;
-
- ::SetWindowLongPtr(window, 0, (LONG_PTR)browserWindow);
-
- browserWindow->onCreate(createStruct);
- return 0;
- }
-
- return ::DefWindowProc(window, message, wParam, lParam);
-}
-
-LRESULT BrowserWindow::wndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam)
-{
- LRESULT lResult = 0;
- bool handled = true;
-
- switch (message) {
- case WM_ERASEBKGND:
- lResult = 1;
- break;
-
- case WM_COMMAND:
- lResult = onCommand(LOWORD(wParam), handled);
- break;
-
- case WM_SIZE:
- onSize(LOWORD(lParam), HIWORD(lParam));
- break;
-
- case WM_DESTROY:
- onDestroy();
- break;
-
- case WM_NCDESTROY:
- onNCDestroy();
- break;
-
- default:
- handled = false;
- }
-
- if (!handled)
- lResult = ::DefWindowProc(window, message, wParam, lParam);
-
- return lResult;
-}
-
-void BrowserWindow::createWindow(int x, int y, int width, int height)
-{
- assert(!m_window);
-
- // Register the class.
- WNDCLASSEX windowClass = { 0 };
- windowClass.cbSize = sizeof(windowClass);
- windowClass.style = 0;
- windowClass.lpfnWndProc = BrowserWindowWndProc;
- windowClass.cbClsExtra = 0;
- windowClass.cbWndExtra = sizeof(this);
- windowClass.hInstance = MiniBrowser::shared().instance();
- windowClass.hIcon = 0;
- windowClass.hCursor = ::LoadCursor(0, IDC_ARROW);
- windowClass.hbrBackground = (HBRUSH)::GetStockObject(WHITE_BRUSH);
- windowClass.lpszMenuName = MAKEINTRESOURCE(IDR_MAINFRAME);
- windowClass.lpszClassName = L"MiniBrowser";
- windowClass.hIconSm = 0;
-
- ::RegisterClassEx(&windowClass);
-
- ::CreateWindowW(L"MiniBrowser", L"MiniBrowser", WS_OVERLAPPEDWINDOW, x, y, width, height, 0, 0, MiniBrowser::shared().instance(), this);
-}
-
-void BrowserWindow::showWindow()
-{
- assert(m_window);
-
- ::ShowWindow(m_window, SW_SHOWNORMAL);
-}
-
-void BrowserWindow::goToURL(const std::wstring& url)
-{
- m_browserView.goToURL(url);
-}
-
-void BrowserWindow::onCreate(LPCREATESTRUCT createStruct)
-{
- // Register our window.
- MiniBrowser::shared().registerWindow(this);
-
- // Create the rebar control.
- m_rebarWindow = ::CreateWindowEx(0, REBARCLASSNAME, 0, WS_VISIBLE | WS_BORDER | WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | CCS_NODIVIDER | CCS_NOPARENTALIGN | RBS_VARHEIGHT | RBS_BANDBORDERS,
- 0, 0, 0, 0, m_window, 0, createStruct->hInstance, 0);
- REBARINFO rebarInfo = { 0 };
- rebarInfo.cbSize = sizeof(rebarInfo);
- rebarInfo.fMask = 0;
- ::SendMessage(m_rebarWindow, RB_SETBARINFO, 0, (LPARAM)&rebarInfo);
-
- // Create the combo box control.
- m_comboBoxWindow = ::CreateWindowEx(0, L"combobox", 0, WS_VISIBLE | WS_CHILD | WS_TABSTOP | WS_VSCROLL | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | CBS_AUTOHSCROLL | CBS_DROPDOWN,
- 0, 0, 0, 0, m_rebarWindow, 0, createStruct->hInstance, 0);
- SendMessage(m_comboBoxWindow, WM_SETFONT, (WPARAM)GetStockObject(DEFAULT_GUI_FONT), MAKELPARAM(TRUE, 0));
-
- REBARBANDINFO bandInfo;
- bandInfo.cbSize = sizeof(bandInfo);
- bandInfo.fMask = RBBIM_STYLE | RBBIM_TEXT | RBBIM_CHILD | RBBIM_CHILDSIZE | RBBIM_SIZE;
- bandInfo.fStyle = RBBS_CHILDEDGE | RBBS_GRIPPERALWAYS;
- bandInfo.lpText = L"Address";
- bandInfo.hwndChild = m_comboBoxWindow;
-
- RECT comboBoxRect;
- ::GetWindowRect(m_comboBoxWindow, &comboBoxRect);
- bandInfo.cx = 100;
- bandInfo.cxMinChild = comboBoxRect.right - comboBoxRect.left;
- bandInfo.cyMinChild = comboBoxRect.bottom - comboBoxRect.top;
-
- // Add the band to the rebar.
- int result = ::SendMessage(m_rebarWindow, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&bandInfo);
-
- // Create the browser view.
- RECT webViewRect = { 0, 0, 0, 0};
- m_browserView.create(webViewRect, this);
-}
-
-void BrowserWindow::onDestroy()
-{
- MiniBrowser::shared().unregisterWindow(this);
-
- // FIXME: Should we close the browser view here?
-}
-
-void BrowserWindow::onNCDestroy()
-{
- delete this;
-}
-
-void BrowserWindow::onSize(int width, int height)
-{
- RECT rebarRect;
- ::GetClientRect(m_rebarWindow, &rebarRect);
-
- // Resize the rebar.
- ::MoveWindow(m_rebarWindow, 0, 0, width, rebarRect.bottom - rebarRect.top, true);
-
- RECT webViewRect;
- webViewRect.top = rebarRect.bottom;
- webViewRect.left = 0;
- webViewRect.right = width;
- webViewRect.bottom = height;
- m_browserView.setFrame(webViewRect);
-}
-
-LRESULT BrowserWindow::onCommand(int commandID, bool& handled)
-{
- switch (commandID) {
- case ID_FILE_NEW_WINDOW:
- MiniBrowser::shared().createNewWindow();
- break;
- case ID_FILE_CLOSE:
- ::PostMessage(m_window, WM_CLOSE, 0, 0);
- break;
- case ID_DEBUG_SHOW_WEB_VIEW: {
- HMENU menu = ::GetMenu(m_window);
- bool shouldHide = ::GetMenuState(menu, ID_DEBUG_SHOW_WEB_VIEW, MF_BYCOMMAND) & MF_CHECKED;
-
- ::CheckMenuItem(menu, ID_DEBUG_SHOW_WEB_VIEW, MF_BYCOMMAND | (shouldHide ? MF_UNCHECKED : MF_CHECKED));
-
- // Show or hide the web view.
- HWND webViewWindow = WKViewGetWindow(m_browserView.webView());
- ::ShowWindow(webViewWindow, shouldHide ? SW_HIDE : SW_SHOW);
- break;
- }
- default:
- handled = false;
- }
-
- return 0;
-}
-
-bool BrowserWindow::handleMessage(const MSG* message)
-{
- if (message->hwnd != m_comboBoxWindow && !::IsChild(m_comboBoxWindow, message->hwnd))
- return false;
-
- // Look for a WM_KEYDOWN message.
- if (message->message != WM_KEYDOWN)
- return false;
-
- // Look for the VK_RETURN key.
- if (message->wParam != VK_RETURN)
- return false;
-
- std::vector<WCHAR> buffer;
- int textLength = ::GetWindowTextLength(m_comboBoxWindow);
-
- buffer.resize(textLength + 1);
- ::GetWindowText(m_comboBoxWindow, &buffer[0], buffer.size());
-
- std::wstring url(&buffer[0], buffer.size() - 1);
-
- if (url.find(L":") == std::wstring::npos)
- url = L"http://" + url;
-
- m_browserView.goToURL(url);
-
- // We handled this message.
- return true;
-}
diff --git a/Tools/MiniBrowser/win/MiniBrowser.cpp b/Tools/MiniBrowser/win/MiniBrowser.cpp
deleted file mode 100644
index 7e3d4888a..000000000
--- a/Tools/MiniBrowser/win/MiniBrowser.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2010 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
- */
-
-#include "stdafx.h"
-
-#include "BrowserWindow.h"
-#include "MiniBrowser.h"
-#include <assert.h>
-
-MiniBrowser::MiniBrowser()
- : m_instance(0)
-{
-}
-
-MiniBrowser& MiniBrowser::shared()
-{
- static MiniBrowser miniBrowser;
-
- return miniBrowser;
-}
-
-void MiniBrowser::initialize(HINSTANCE instance)
-{
- assert(!m_instance);
-
- m_instance = instance;
-}
-
-void MiniBrowser::createNewWindow()
-{
- static const wchar_t* kDefaultURLString = L"http://webkit.org/";
-
- BrowserWindow* browserWindow = BrowserWindow::create();
- browserWindow->createWindow(0, 0, 800, 600);
- browserWindow->showWindow();
- browserWindow->goToURL(kDefaultURLString);
-}
-
-void MiniBrowser::registerWindow(BrowserWindow* window)
-{
- m_browserWindows.insert(window);
-}
-
-void MiniBrowser::unregisterWindow(BrowserWindow* window)
-{
- m_browserWindows.erase(window);
-
- if (m_browserWindows.empty())
- ::PostQuitMessage(0);
-}
-
-bool MiniBrowser::handleMessage(const MSG* message)
-{
- for (std::set<BrowserWindow*>::const_iterator it = m_browserWindows.begin(), end = m_browserWindows.end(); it != end; ++it) {
- BrowserWindow* browserWindow = *it;
-
- if (browserWindow->handleMessage(message))
- return true;
- }
-
- return false;
-}
diff --git a/Tools/MiniBrowser/win/MiniBrowser.rc b/Tools/MiniBrowser/win/MiniBrowser.rc
deleted file mode 100644
index 0ff88b089..000000000
--- a/Tools/MiniBrowser/win/MiniBrowser.rc
+++ /dev/null
@@ -1,79 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-#include "winresrc.h"
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Menu
-//
-
-IDR_MAINFRAME MENU
-BEGIN
- POPUP "&File"
- BEGIN
- MENUITEM "&New Window\tCtrl+N", ID_FILE_NEW_WINDOW
- MENUITEM SEPARATOR
- MENUITEM "&Close", ID_FILE_CLOSE
- END
- POPUP "&Debug"
- BEGIN
- MENUITEM "&Show WebView", ID_DEBUG_SHOW_WEB_VIEW, CHECKED
- END
-END
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
-IDR_MAINFRAME_ACCEL ACCELERATORS
-BEGIN
- "N", ID_FILE_NEW_WINDOW, VIRTKEY, CONTROL, NOINVERT
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.\0"
-END
-
-
-3 TEXTINCLUDE
-BEGIN
- "\r\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
diff --git a/Tools/MiniBrowser/win/main.cpp b/Tools/MiniBrowser/win/main.cpp
deleted file mode 100644
index ba09c9445..000000000
--- a/Tools/MiniBrowser/win/main.cpp
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2010 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
- */
-
-#include "stdafx.h"
-
-#include "BrowserWindow.h"
-#include "MiniBrowser.h"
-#include <string>
-
-static bool shouldTranslateMessage(const MSG& msg)
-{
- // Only these four messages are actually translated by ::TranslateMessage or ::TranslateAccelerator.
- // It's useless (though harmless) to call those functions for other messages, so we always allow other messages to be translated.
- if (msg.message != WM_KEYDOWN && msg.message != WM_SYSKEYDOWN && msg.message != WM_KEYUP && msg.message != WM_SYSKEYUP)
- return true;
-
- wchar_t className[256];
- if (!::GetClassNameW(msg.hwnd, className, ARRAYSIZE(className)))
- return true;
-
- // Don't call TranslateMessage() on key events destined for a WebKit2 view, WebKit will do this if it doesn't handle the message.
- // It would be nice to use some API here instead of hard-coding the window class name.
- return wcscmp(className, L"WebKit2WebViewWindowClass");
-}
-
-BOOL WINAPI DllMain(HINSTANCE dllInstance, DWORD reason, LPVOID)
-{
- if (reason == DLL_PROCESS_ATTACH)
- MiniBrowser::shared().initialize(dllInstance);
-
- return TRUE;
-}
-
-extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpstrCmdLine, int nCmdShow)
-{
- // Create and show our initial window.
- MiniBrowser::shared().createNewWindow();
-
- MSG message;
- while (BOOL result = ::GetMessage(&message, 0, 0, 0)) {
- if (result == -1)
- break;
-
- if (shouldTranslateMessage(message))
- ::TranslateMessage(&message);
-
- if (!MiniBrowser::shared().handleMessage(&message))
- ::DispatchMessage(&message);
- }
-
- return 0;
-}
diff --git a/Tools/MiniBrowser/win/resource.h b/Tools/MiniBrowser/win/resource.h
deleted file mode 100644
index b12b906f4..000000000
--- a/Tools/MiniBrowser/win/resource.h
+++ /dev/null
@@ -1,23 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by MiniBrowser.rc
-//
-
-#define ID_FILE_NEW_WINDOW 32770
-#define ID_FILE_OPEN 32771
-#define ID_FILE_CLOSE 32772
-#define ID_DEBUG_SHOW_WEB_VIEW 32773
-
-#define IDR_MAINFRAME 128
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 132
-#define _APS_NEXT_COMMAND_VALUE 32775
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 110
-#endif
-#endif
diff --git a/Tools/QtTestBrowser/launcherwindow.cpp b/Tools/QtTestBrowser/launcherwindow.cpp
index d9dd0f93f..8badf4688 100644
--- a/Tools/QtTestBrowser/launcherwindow.cpp
+++ b/Tools/QtTestBrowser/launcherwindow.cpp
@@ -51,7 +51,7 @@
#ifndef QT_NO_SHORTCUT
#include <QMenuBar>
#endif
-#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
+#if !defined(QT_NO_PRINTPREVIEWDIALOG) && HAVE(QTPRINTSUPPORT)
#include <QPrintPreviewDialog>
#endif
#include <QSlider>
@@ -73,6 +73,11 @@
#include <QtNetwork/QNetworkDiskCache>
#endif
+struct HighlightedElement {
+ QWebElement m_element;
+ QString m_previousStyle;
+};
+
const int gExitClickArea = 80;
QVector<int> LauncherWindow::m_zoomLevels;
@@ -217,6 +222,7 @@ void LauncherWindow::applyPrefs()
settings->setAttribute(QWebSettings::TiledBackingStoreEnabled, m_windowOptions.useTiledBackingStore);
settings->setAttribute(QWebSettings::FrameFlatteningEnabled, m_windowOptions.useFrameFlattening);
settings->setAttribute(QWebSettings::WebGLEnabled, m_windowOptions.useWebGL);
+ m_windowOptions.useWebAudio = settings->testAttribute(QWebSettings::WebAudioEnabled);
if (!isGraphicsBased())
return;
@@ -312,6 +318,17 @@ void LauncherWindow::createChrome()
QAction* toggleWebGL = toolsMenu->addAction("Toggle WebGL", this, SLOT(toggleWebGL(bool)));
toggleWebGL->setCheckable(true);
toggleWebGL->setChecked(settings->testAttribute(QWebSettings::WebGLEnabled));
+#if !ENABLE(WEBGL)
+ toggleWebGL->setEnabled(false);
+#endif
+
+ QAction* toggleWebAudio = toolsMenu->addAction("Toggle WebAudio", this, SLOT(toggleWebAudio(bool)));
+ toggleWebAudio->setCheckable(true);
+#if ENABLE(WEB_AUDIO)
+ toggleWebAudio->setChecked(m_windowOptions.useWebAudio);
+#else
+ toggleWebAudio->setEnabled(false);
+#endif
QAction* spatialNavigationAction = toolsMenu->addAction("Toggle Spatial Navigation", this, SLOT(toggleSpatialNavigation(bool)));
spatialNavigationAction->setCheckable(true);
@@ -350,6 +367,8 @@ void LauncherWindow::createChrome()
toolsMenu->addAction("Select Elements...", this, SLOT(selectElements()));
+ toolsMenu->addAction("Clear selection", this, SLOT(clearSelection()));
+
QAction* showInspectorAction = toolsMenu->addAction("Show Web Inspector", m_inspector, SLOT(setVisible(bool)), QKeySequence(Qt::CTRL | Qt::ALT | Qt::Key_I));
showInspectorAction->setCheckable(true);
showInspectorAction->connect(m_inspector, SIGNAL(visibleChanged(bool)), SLOT(setChecked(bool)));
@@ -477,6 +496,10 @@ void LauncherWindow::createChrome()
#endif
toggleScrollAnimator->setChecked(false);
+ QAction* toggleJavaScriptEnabled = settingsMenu->addAction("Enable Javascript", this, SLOT(toggleJavaScriptEnabled(bool)));
+ toggleJavaScriptEnabled->setCheckable(true);
+ toggleJavaScriptEnabled->setChecked(settings->testAttribute(QWebSettings::JavascriptEnabled));
+
QAction* toggleInterruptingJavaScripteEnabled = settingsMenu->addAction("Enable interrupting js scripts", this, SLOT(toggleInterruptingJavaScriptEnabled(bool)));
toggleInterruptingJavaScripteEnabled->setCheckable(true);
toggleInterruptingJavaScripteEnabled->setChecked(false);
@@ -735,7 +758,7 @@ void LauncherWindow::toggleZoomTextOnly(bool b)
void LauncherWindow::print()
{
-#if !defined(QT_NO_PRINTER) && HAVE(QTPRINTSUPPORT)
+#if !defined(QT_NO_PRINTPREVIEWDIALOG) && HAVE(QTPRINTSUPPORT)
QPrintPreviewDialog dlg(this);
connect(&dlg, SIGNAL(paintRequested(QPrinter*)),
page()->mainFrame(), SLOT(print(QPrinter*)));
@@ -800,14 +823,25 @@ void LauncherWindow::selectElements()
QLineEdit::Normal, "a", &ok);
if (ok && !str.isEmpty()) {
+ clearSelection();
QWebElementCollection result = page()->mainFrame()->findAllElements(str);
- foreach (QWebElement e, result)
+ foreach (QWebElement e, result) {
+ HighlightedElement el = { e, e.styleProperty("background-color", QWebElement::InlineStyle) };
+ m_highlightedElements.append(el);
e.setStyleProperty("background-color", "yellow");
+ }
statusBar()->showMessage(QString("%1 element(s) selected").arg(result.count()), 5000);
}
#endif
}
+void LauncherWindow::clearSelection()
+{
+ for (int i = 0; i < m_highlightedElements.size(); ++i)
+ m_highlightedElements[i].m_element.setStyleProperty("background-color", m_highlightedElements[i].m_previousStyle);
+ m_highlightedElements.clear();
+}
+
void LauncherWindow::setDiskCache(bool enable)
{
#if !defined(QT_NO_NETWORKDISKCACHE) && !defined(QT_NO_DESKTOPSERVICES)
@@ -860,6 +894,12 @@ void LauncherWindow::toggleWebGL(bool toggle)
page()->settings()->setAttribute(QWebSettings::WebGLEnabled, toggle);
}
+void LauncherWindow::toggleWebAudio(bool toggle)
+{
+ m_windowOptions.useWebAudio = toggle;
+ page()->settings()->setAttribute(QWebSettings::WebAudioEnabled, toggle);
+}
+
void LauncherWindow::animatedFlip()
{
qobject_cast<WebViewGraphicsBased*>(m_view)->animatedFlip();
@@ -887,6 +927,11 @@ void LauncherWindow::toggleFrameFlattening(bool toggle)
page()->settings()->setAttribute(QWebSettings::FrameFlatteningEnabled, toggle);
}
+void LauncherWindow::toggleJavaScriptEnabled(bool enable)
+{
+ page()->settings()->setAttribute(QWebSettings::JavascriptEnabled, enable);
+}
+
void LauncherWindow::toggleInterruptingJavaScriptEnabled(bool enable)
{
page()->setInterruptingJavaScriptEnabled(enable);
diff --git a/Tools/QtTestBrowser/launcherwindow.h b/Tools/QtTestBrowser/launcherwindow.h
index 3de8667fa..185f21b74 100644
--- a/Tools/QtTestBrowser/launcherwindow.h
+++ b/Tools/QtTestBrowser/launcherwindow.h
@@ -60,6 +60,8 @@ class QPropertyAnimation;
class QLineEdit;
QT_END_NAMESPACE
+struct HighlightedElement;
+
class WindowOptions {
public:
WindowOptions()
@@ -68,6 +70,7 @@ public:
, useCompositing(true)
, useTiledBackingStore(false)
, useWebGL(false)
+ , useWebAudio(false)
, useFrameFlattening(false)
, cacheWebView(false)
, showFrameRate(false)
@@ -92,6 +95,7 @@ public:
bool useCompositing;
bool useTiledBackingStore;
bool useWebGL;
+ bool useWebAudio;
bool useFrameFlattening;
bool cacheWebView;
bool showFrameRate;
@@ -152,9 +156,11 @@ protected Q_SLOTS:
void toggleTiledBackingStore(bool toggle);
void toggleResizesToContents(bool toggle);
void toggleWebGL(bool toggle);
+ void toggleWebAudio(bool toggle);
void toggleSpatialNavigation(bool b);
void toggleFullScreenMode(bool enable);
void toggleFrameFlattening(bool toggle);
+ void toggleJavaScriptEnabled(bool enable);
void toggleInterruptingJavaScriptEnabled(bool enable);
void toggleJavascriptCanOpenWindows(bool enable);
void toggleAutoLoadImages(bool enable);
@@ -178,6 +184,7 @@ protected Q_SLOTS:
void animatedFlip();
void animatedYFlip();
void selectElements();
+ void clearSelection();
void showFPS(bool enable);
void showUserAgentDialog();
@@ -222,6 +229,7 @@ private:
QNetworkReply* m_reply;
#endif
QList<QTouchEvent::TouchPoint> m_touchPoints;
+ QList<HighlightedElement> m_highlightedElements;
bool m_touchMocking;
QString m_inputUrl;
diff --git a/Tools/QtTestBrowser/qttestbrowser.cpp b/Tools/QtTestBrowser/qttestbrowser.cpp
index c5b6ef0ce..9fd7d0c22 100644
--- a/Tools/QtTestBrowser/qttestbrowser.cpp
+++ b/Tools/QtTestBrowser/qttestbrowser.cpp
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
* Copyright (C) 2006 George Staikos <staikos@kde.org>
@@ -94,7 +95,7 @@ LauncherApplication::LauncherApplication(int& argc, char** argv)
, m_robotExtraTimeSeconds(0)
{
// To allow QWebInspector's configuration persistence
- setOrganizationName("Nokia");
+ setOrganizationName("QtProject");
setApplicationName("QtTestBrowser");
setApplicationVersion("0.1");
diff --git a/Tools/QueueStatusServer/app.yaml b/Tools/QueueStatusServer/app.yaml
index e320eb096..1477a3adf 100644
--- a/Tools/QueueStatusServer/app.yaml
+++ b/Tools/QueueStatusServer/app.yaml
@@ -1,5 +1,5 @@
-application: webkit-commit-queue
-version: 1
+application: webkit-queues
+version: 108593 # Bugzilla bug ID of last major change
runtime: python
api_version: 1
diff --git a/Tools/RebaselineQueueServer/handlers/__init__.py b/Tools/QueueStatusServer/config/__init__.py
index ef65bee5b..ef65bee5b 100644
--- a/Tools/RebaselineQueueServer/handlers/__init__.py
+++ b/Tools/QueueStatusServer/config/__init__.py
diff --git a/Tools/RebaselineQueueServer/model/queueentry.py b/Tools/QueueStatusServer/config/charts.py
index 6570fc062..3e38a852e 100644
--- a/Tools/RebaselineQueueServer/model/queueentry.py
+++ b/Tools/QueueStatusServer/config/charts.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -26,38 +26,36 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from google.appengine.ext import db
+patch_log_limit = 500
+# All units are represented numerically as seconds.
+one_minute = 60.0
+one_hour = one_minute * 60.0
+one_day = one_hour * 24.0
+one_month = one_day * 30.0
-class QueueEntry(db.Model):
- test = db.StringProperty()
- builder = db.StringProperty()
+# How far back to view the history, specified in seconds.
+view_range_choices = [
+ {"name": "1 day", "view_range": one_day},
+ {"name": "1 week", "view_range": one_day * 7},
+ {"name": "1 month", "view_range": one_month},
+]
- @staticmethod
- def add(builder_name, test):
- entry = QueueEntry()
- entry.builder = builder_name
- entry.test = test
- entry.put()
- return entry
+default_view_range = one_day
- @staticmethod
- def remove(builder_name, test):
- query = QueueEntry.all()
- query = query.filter('builder =', builder_name).filter('test =', test)
- for entry in query:
- entry.delete()
+_time_units = [
+ #(threshold, time unit, name)
+ (0, one_hour, "hours"),
+ (4 * one_day, one_day, "days"),
+ (3 * one_month, one_month, "months"),
+]
- @staticmethod
- def entries_for_builder(builder_name):
- query = QueueEntry.all()
- query = query.filter('builder =', builder_name)
- return query
- @staticmethod
- def builder_names():
- query = QueueEntry.all()
- builder_names = set()
- for entry in query:
- builder_names.add(entry.builder)
- return builder_names
+def get_time_unit(view_range):
+ current_threshold, current_time_unit, current_name = _time_units[0]
+ for threshold, time_unit, name in _time_units[1:]:
+ if view_range >= threshold:
+ current_time_unit, current_name = time_unit, name
+ else:
+ break
+ return current_time_unit, current_name
diff --git a/Tools/QueueStatusServer/config/logging.py b/Tools/QueueStatusServer/config/logging.py
new file mode 100644
index 000000000..b18b0712f
--- /dev/null
+++ b/Tools/QueueStatusServer/config/logging.py
@@ -0,0 +1,30 @@
+# Copyright (C) 2013 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.
+
+# Specified in seconds
+queue_log_duration = 60 * 60
diff --git a/Tools/QueueStatusServer/config/messages.py b/Tools/QueueStatusServer/config/messages.py
new file mode 100644
index 000000000..96547ab43
--- /dev/null
+++ b/Tools/QueueStatusServer/config/messages.py
@@ -0,0 +1,33 @@
+# Copyright (C) 2013 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.
+
+# These must be in sync with webkit-patch's AbstractQueue.
+pass_status = "Pass"
+fail_status = "Fail"
+retry_status = "Retry"
+error_status = "Error"
diff --git a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectorywithlocalcommits.py b/Tools/QueueStatusServer/config/queues.py
index f06f94ef4..2266eb3cc 100644
--- a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectorywithlocalcommits.py
+++ b/Tools/QueueStatusServer/config/queues.py
@@ -1,9 +1,9 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-#
+# Copyright (C) 2013 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
@@ -13,7 +13,7 @@
# * 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
@@ -26,9 +26,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.steps.cleanworkingdirectory import CleanWorkingDirectory
-
-class CleanWorkingDirectoryWithLocalCommits(CleanWorkingDirectory):
- def __init__(self, tool, options):
- # FIXME: This a bit of a hack. Consider doing this more cleanly.
- CleanWorkingDirectory.__init__(self, tool, options, allow_local_commits=True)
+# Eventually the list of queues may be stored in the data store.
+all_queue_names = [
+ "commit-queue",
+ "style-queue",
+ "qt-ews",
+ "qt-wk2-ews",
+ "gtk-ews",
+ "gtk-wk2-ews",
+ "mac-ews",
+ "mac-wk2-ews",
+ "win-ews",
+ "efl-ews",
+ "efl-wk2-ews",
+]
diff --git a/Tools/QueueStatusServer/cron.yaml b/Tools/QueueStatusServer/cron.yaml
index 09b99453b..d1b0d59c3 100644
--- a/Tools/QueueStatusServer/cron.yaml
+++ b/Tools/QueueStatusServer/cron.yaml
@@ -2,3 +2,7 @@ cron:
- description: collect the garbage
url: /gc
schedule: every 4 hours
+
+- description: Sync new queue logs up with unchanging data
+ url: /sync-queue-logs
+ schedule: every 10 minutes
diff --git a/Tools/QueueStatusServer/filters/webkit_extras.py b/Tools/QueueStatusServer/filters/webkit_extras.py
index b645f78ff..5b3c9b1de 100644
--- a/Tools/QueueStatusServer/filters/webkit_extras.py
+++ b/Tools/QueueStatusServer/filters/webkit_extras.py
@@ -36,6 +36,7 @@ register = webapp.template.create_template_register()
bug_regexp = re.compile(r"bug (?P<bug_id>\d+)")
patch_regexp = re.compile(r"patch (?P<patch_id>\d+)")
+
@register.filter
@stringfilter
def webkit_linkify(value):
@@ -43,17 +44,32 @@ def webkit_linkify(value):
value = patch_regexp.sub(r'<a href="https://bugs.webkit.org/attachment.cgi?id=\g<patch_id>&action=prettypatch">patch \g<patch_id></a>', value)
return value
+
@register.filter
@stringfilter
def webkit_bug_id(value):
return '<a href="http://webkit.org/b/%s">%s</a>' % (value, value)
+
@register.filter
@stringfilter
def webkit_attachment_id(value):
return '<a href="https://bugs.webkit.org/attachment.cgi?id=%s&action=prettypatch">%s</a>' % (value, value)
+
@register.filter
@stringfilter
def results_link(status_id):
return '<a href="/results/%s">results</a>' % status_id
+
+
+@register.filter
+@stringfilter
+def queue_status_link(queue_name, text):
+ return '<a href="/queue-status/%s">%s</a>' % (queue_name, text)
+
+
+@register.filter
+@stringfilter
+def queue_charts_link(queue_name, text):
+ return '<a href="/queue-charts/%s">%s</a>' % (queue_name, text)
diff --git a/Tools/QueueStatusServer/handlers/nextpatch.py b/Tools/QueueStatusServer/handlers/nextpatch.py
index 5f6d71dad..e5ba655dc 100644
--- a/Tools/QueueStatusServer/handlers/nextpatch.py
+++ b/Tools/QueueStatusServer/handlers/nextpatch.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -31,6 +31,7 @@ from datetime import datetime
from google.appengine.ext import db
from google.appengine.ext import webapp
+from loggers.recordpatchevent import RecordPatchEvent
from model.queues import Queue
@@ -47,11 +48,12 @@ class NextPatch(webapp.RequestHandler):
if not patch_id:
self.error(404)
return
+ RecordPatchEvent.started(patch_id, queue_name)
self.response.out.write(patch_id)
@staticmethod
def _assign_patch(key, work_item_ids):
- now = datetime.now()
+ now = datetime.utcnow()
active_work_items = db.get(key)
active_work_items.deactivate_expired(now)
next_item = active_work_items.next_item(work_item_ids, now)
diff --git a/Tools/QueueStatusServer/handlers/queuecharts.py b/Tools/QueueStatusServer/handlers/queuecharts.py
new file mode 100644
index 000000000..661102781
--- /dev/null
+++ b/Tools/QueueStatusServer/handlers/queuecharts.py
@@ -0,0 +1,151 @@
+# Copyright (C) 2013 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 calendar
+from datetime import datetime
+import itertools
+from time import time
+
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp import template
+
+from config import logging, charts
+from model.patchlog import PatchLog
+from model.queues import Queue
+from model.queuelog import QueueLog
+
+
+class QueueCharts(webapp.RequestHandler):
+ def get(self, queue_name):
+ queue_name = queue_name.lower()
+ if not Queue.queue_with_name(queue_name):
+ self.error(404)
+ return
+
+ timestamp = self._get_timestamp()
+ view_range = self._get_view_range()
+ time_unit, time_unit_name = charts.get_time_unit(view_range)
+
+ all_queue_names = map(Queue.name, Queue.all())
+
+ template_values = {
+ "all_queue_names": all_queue_names,
+ "patch_data": self._get_patch_data(queue_name, timestamp, view_range),
+ "queue_data": self._get_queue_data(queue_name, timestamp, view_range),
+ "queue_name": queue_name,
+ "seconds_ago_min": 0,
+ "seconds_ago_max": view_range,
+ "time_unit_name": time_unit_name,
+ "time_unit": time_unit,
+ "timestamp": timestamp,
+ "view_range": view_range,
+ "view_range_choices": charts.view_range_choices,
+ }
+ self.response.out.write(template.render("templates/queuecharts.html", template_values))
+
+ @classmethod
+ def _get_min_med_max(cls, values, defaults=(0, 0, 0)):
+ if not values:
+ return defaults
+ length = len(values)
+ sorted_values = sorted(values)
+ return sorted_values[0], sorted_values[length / 2], sorted_values[length - 1]
+
+ def _get_patch_data(self, queue_name, timestamp, view_range):
+ patch_logs = self._get_patch_logs(queue_name, timestamp, view_range)
+ patch_data = []
+ for patch_log in patch_logs:
+ if patch_log.process_duration and patch_log.wait_duration:
+ patch_log_timestamp = calendar.timegm(patch_log.date.utctimetuple())
+ patch_data.append({
+ "attachment_id": patch_log.attachment_id,
+ "seconds_ago": timestamp - patch_log_timestamp,
+ "process_duration": patch_log.process_duration / charts.one_minute,
+ "retry_count": patch_log.retry_count,
+ "status_update_count": patch_log.status_update_count,
+ "wait_duration": patch_log.wait_duration / charts.one_minute,
+ })
+ return patch_data
+
+ def _get_patch_logs(self, queue_name, timestamp, view_range):
+ patch_log_query = PatchLog.all()
+ patch_log_query = patch_log_query.filter("queue_name =", queue_name)
+ patch_log_query = patch_log_query.filter("date >=", datetime.utcfromtimestamp(timestamp - view_range))
+ patch_log_query = patch_log_query.filter("date <=", datetime.utcfromtimestamp(timestamp))
+ patch_log_query = patch_log_query.order("date")
+ return patch_log_query.run(limit=charts.patch_log_limit)
+
+ def _get_queue_data(self, queue_name, timestamp, view_range):
+ queue_logs = self._get_queue_logs(queue_name, timestamp, view_range)
+ queue_data = []
+ for queue_log in queue_logs:
+ queue_log_timestamp = calendar.timegm(queue_log.date.utctimetuple())
+ p_min, p_med, p_max = self._get_min_med_max(queue_log.patch_process_durations)
+ w_min, w_med, w_max = self._get_min_med_max(queue_log.patch_wait_durations)
+ queue_data.append({
+ "bots_seen": len(queue_log.bot_ids_seen),
+ "seconds_ago": timestamp - queue_log_timestamp,
+ "patch_processing_min": p_min,
+ "patch_processing_med": p_med,
+ "patch_processing_max": p_max,
+ "patch_retry_count": queue_log.patch_retry_count,
+ "patch_waiting_min": w_min,
+ "patch_waiting_med": w_med,
+ "patch_waiting_max": w_max,
+ "patches_completed": len(queue_log.patch_process_durations),
+ "patches_waiting": queue_log.max_patches_waiting,
+ "status_update_count": queue_log.status_update_count,
+ })
+ return queue_data
+
+ def _get_queue_logs(self, queue_name, timestamp, view_range):
+ queue_logs = []
+ current_timestamp = timestamp - view_range
+ while current_timestamp <= timestamp:
+ queue_logs.append(QueueLog.get_at(queue_name, logging.queue_log_duration, current_timestamp))
+ current_timestamp += logging.queue_log_duration
+ return queue_logs
+
+ @classmethod
+ def _get_time_unit(cls, view_range):
+ if view_range > charts.one_day * 2:
+ return
+
+ def _get_timestamp(self):
+ timestamp = self.request.get("timestamp")
+ try:
+ return int(timestamp)
+ except ValueError:
+ return int(time())
+
+ def _get_view_range(self):
+ view_range = self.request.get("view_range")
+ try:
+ return int(view_range)
+ except ValueError:
+ return charts.default_view_range
diff --git a/Tools/QueueStatusServer/handlers/queuestatus.py b/Tools/QueueStatusServer/handlers/queuestatus.py
index 9054fcab1..4f4e2d28b 100644
--- a/Tools/QueueStatusServer/handlers/queuestatus.py
+++ b/Tools/QueueStatusServer/handlers/queuestatus.py
@@ -104,6 +104,7 @@ class QueueStatus(webapp.RequestHandler):
statuses = self._fetch_statuses(queue, bot_id)
template_values = {
+ "queue_name": queue_name,
"page_title": self._page_title(queue, bot_id),
"work_item_rows": self._rows_for_work_items(queue),
"status_groups": self._build_status_groups(statuses),
diff --git a/Tools/QueueStatusServer/handlers/releasepatch.py b/Tools/QueueStatusServer/handlers/releasepatch.py
index 0e46e69f4..88f46b0b4 100644
--- a/Tools/QueueStatusServer/handlers/releasepatch.py
+++ b/Tools/QueueStatusServer/handlers/releasepatch.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -30,6 +30,7 @@ from google.appengine.ext import webapp, db
from google.appengine.ext.webapp import template
from handlers.updatebase import UpdateBase
+from loggers.recordpatchevent import RecordPatchEvent
from model.attachment import Attachment
from model.queues import Queue
@@ -57,6 +58,9 @@ class ReleasePatch(UpdateBase):
# Allow removing it from the queue even if there is no last_status for easier testing.
if not last_status or not last_status.is_retry_request():
queue.work_items().remove_work_item(attachment_id)
+ RecordPatchEvent.stopped(attachment_id, queue_name)
+ else:
+ RecordPatchEvent.retrying(attachment_id, queue_name)
# Always release the lock on the item.
queue.active_work_items().expire_item(attachment_id)
diff --git a/Tools/QueueStatusServer/handlers/submittoews.py b/Tools/QueueStatusServer/handlers/submittoews.py
index 248bce4a1..f7669d233 100644
--- a/Tools/QueueStatusServer/handlers/submittoews.py
+++ b/Tools/QueueStatusServer/handlers/submittoews.py
@@ -30,6 +30,7 @@ from google.appengine.ext import webapp, db
from google.appengine.ext.webapp import template
from handlers.updatebase import UpdateBase
+from loggers.recordpatchevent import RecordPatchEvent
from model.attachment import Attachment
from model.queues import Queue
@@ -57,6 +58,7 @@ class SubmitToEWS(UpdateBase):
for queue in Queue.all_ews(): # all_ews() currently includes the style-queue
if self._should_add_to_ews_queue(queue, attachment):
queue.work_items().add_work_item(attachment.id)
+ RecordPatchEvent.added(attachment.id, queue.name())
def post(self):
attachment_id = self._int_from_request("attachment_id")
diff --git a/Tools/RebaselineQueueServer/handlers/pages.py b/Tools/QueueStatusServer/handlers/syncqueuelogs.py
index 8fcf2e3b5..e2a55f933 100644
--- a/Tools/RebaselineQueueServer/handlers/pages.py
+++ b/Tools/QueueStatusServer/handlers/syncqueuelogs.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -27,21 +27,16 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from google.appengine.ext import webapp
-from google.appengine.ext.webapp import template
-from model.queueentry import QueueEntry
+from config.queues import all_queue_names
+from config.logging import queue_log_duration
+from model.queuelog import QueueLog
-class Home(webapp.RequestHandler):
+class SyncQueueLogs(webapp.RequestHandler):
def get(self):
- builder_names = QueueEntry.builder_names()
- self.response.out.write(
- template.render("templates/home.html", {
- 'builder_names': builder_names,
- }))
-
-
-class BuilderPicker(webapp.RequestHandler):
- def get(self):
- self.response.out.write(
- template.render("templates/builder-picker.html", {}))
+ for queue_name in all_queue_names:
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ if queue_log.update_max_patches_waiting():
+ queue_log.put()
+ self.response.out.write("Done!")
diff --git a/Tools/QueueStatusServer/handlers/updatestatus.py b/Tools/QueueStatusServer/handlers/updatestatus.py
index 7301101e4..b02e9876a 100644
--- a/Tools/QueueStatusServer/handlers/updatestatus.py
+++ b/Tools/QueueStatusServer/handlers/updatestatus.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -31,6 +31,8 @@ from google.appengine.ext import webapp, db
from google.appengine.ext.webapp import template
from handlers.updatebase import UpdateBase
+from loggers.recordbotevent import RecordBotEvent
+from loggers.recordpatchevent import RecordPatchEvent
from model.attachment import Attachment
from model.queuestatus import QueueStatus
@@ -62,5 +64,7 @@ class UpdateStatus(UpdateBase):
def post(self):
queue_status = self._queue_status_from_request()
queue_status.put()
- Attachment.dirty(queue_status.active_patch_id)
+ RecordBotEvent.record_activity(queue_status.queue_name, queue_status.bot_id)
+ if queue_status.active_patch_id:
+ RecordPatchEvent.updated(queue_status.active_patch_id, queue_status.queue_name, queue_status.bot_id)
self.response.out.write(queue_status.key().id())
diff --git a/Tools/QueueStatusServer/handlers/updateworkitems.py b/Tools/QueueStatusServer/handlers/updateworkitems.py
index 16a9d49e0..6b3ddedfa 100644
--- a/Tools/QueueStatusServer/handlers/updateworkitems.py
+++ b/Tools/QueueStatusServer/handlers/updateworkitems.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -30,6 +30,7 @@ from google.appengine.ext import webapp, db
from google.appengine.ext.webapp import template
from handlers.updatebase import UpdateBase
+from loggers.recordpatchevent import RecordPatchEvent
from model.queues import Queue
from model.workitems import WorkItems
@@ -41,26 +42,46 @@ class UpdateWorkItems(UpdateBase):
self.response.out.write(template.render("templates/updateworkitems.html", None))
def _parse_work_items_string(self, items_string):
- # Our parsing could be much more robust.
- item_strings = items_string.split(" ") if items_string else []
- return map(int, item_strings)
+ try:
+ item_strings = items_string.split(" ") if items_string else []
+ return map(int, item_strings)
+ except ValueError:
+ return None
+
+ def _update_work_items_from_request(self, work_items):
+ items_string = self.request.get("work_items")
+ new_work_items = self._parse_work_items_string(items_string)
+ if new_work_items == None:
+ self.response.out.write("Failed to parse work items: %s" % items_string)
+ return False
+ work_items.item_ids = new_work_items
+ work_items.date = datetime.utcnow()
+ return True
- def _work_items_from_request(self):
+ def _queue_from_request(self):
queue_name = self.request.get("queue_name")
queue = Queue.queue_with_name(queue_name)
if not queue:
self.response.out.write("\"%s\" is not in queues %s" % (queue_name, Queue.all()))
return None
+ return queue
- items_string = self.request.get("work_items")
+ def post(self):
+ queue = self._queue_from_request()
+ if not queue:
+ self.response.set_status(500)
+ return
work_items = queue.work_items()
- work_items.item_ids = self._parse_work_items_string(items_string)
- work_items.date = datetime.now()
- return work_items
+ old_items = set(work_items.item_ids)
- def post(self):
- work_items = self._work_items_from_request()
- if not work_items:
+ success = self._update_work_items_from_request(work_items)
+ if not success:
self.response.set_status(500)
return
+ new_items = set(work_items.item_ids)
work_items.put()
+
+ for work_item in new_items - old_items:
+ RecordPatchEvent.added(work_item, queue.name())
+ for work_item in old_items - new_items:
+ RecordPatchEvent.stopped(work_item, queue.name())
diff --git a/Tools/QueueStatusServer/index.yaml b/Tools/QueueStatusServer/index.yaml
index 34eb72e5a..694f77bd1 100644
--- a/Tools/QueueStatusServer/index.yaml
+++ b/Tools/QueueStatusServer/index.yaml
@@ -10,6 +10,11 @@ indexes:
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.
+- kind: PatchLog
+ properties:
+ - name: queue_name
+ - name: date
+
- kind: QueueStatus
properties:
- name: active_patch_id
diff --git a/Tools/RebaselineQueueServer/model/__init__.py b/Tools/QueueStatusServer/loggers/__init__.py
index ef65bee5b..ef65bee5b 100644
--- a/Tools/RebaselineQueueServer/model/__init__.py
+++ b/Tools/QueueStatusServer/loggers/__init__.py
diff --git a/Tools/QueueStatusServer/loggers/recordbotevent.py b/Tools/QueueStatusServer/loggers/recordbotevent.py
new file mode 100644
index 000000000..cb0e224e0
--- /dev/null
+++ b/Tools/QueueStatusServer/loggers/recordbotevent.py
@@ -0,0 +1,39 @@
+# Copyright (C) 2013 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.
+
+from config.logging import queue_log_duration
+from model.queuelog import QueueLog
+
+
+class RecordBotEvent(object):
+ @classmethod
+ def record_activity(cls, queue_name, bot_id):
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ if queue_log and bot_id not in queue_log.bot_ids_seen:
+ queue_log.bot_ids_seen.append(bot_id)
+ queue_log.put()
diff --git a/Tools/QueueStatusServer/loggers/recordpatchevent.py b/Tools/QueueStatusServer/loggers/recordpatchevent.py
new file mode 100644
index 000000000..08c57cdb6
--- /dev/null
+++ b/Tools/QueueStatusServer/loggers/recordpatchevent.py
@@ -0,0 +1,114 @@
+# Copyright (C) 2013 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.
+
+from config.logging import queue_log_duration
+from model.patchlog import PatchLog
+from model.queuelog import QueueLog
+from model.warninglog import WarningLog
+
+
+class RecordPatchEvent(object):
+ @classmethod
+ def added(cls, attachment_id, queue_name):
+ PatchLog.lookup(attachment_id, queue_name)
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ if queue_log.update_max_patches_waiting():
+ queue_log.put()
+
+ @classmethod
+ def retrying(cls, attachment_id, queue_name, bot_id=None):
+ patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
+ if not patch_log:
+ WarningLog.record("patchlog missing", "In retrying event.", attachment_id, queue_name, bot_id)
+ return
+
+ if bot_id:
+ patch_log.bot_id = bot_id
+ patch_log.retry_count += 1
+ patch_log.put()
+
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ queue_log.patch_retry_count += 1
+ queue_log.put()
+
+ @classmethod
+ def started(cls, attachment_id, queue_name, bot_id=None):
+ patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
+ if not patch_log:
+ WarningLog.record("patchlog missing", "In started event.", attachment_id, queue_name, bot_id)
+ return
+
+ # An existing wait_duration implies the patch had been started previously and is being picked up again because it had expired.
+ if not patch_log.wait_duration:
+ if bot_id:
+ patch_log.bot_id = bot_id
+ patch_log.calculate_wait_duration()
+ patch_log.put()
+
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ queue_log.patch_wait_durations.append(patch_log.wait_duration)
+ queue_log.put()
+
+ @classmethod
+ def stopped(cls, attachment_id, queue_name, bot_id=None):
+ patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
+ if not patch_log:
+ WarningLog.record("patchlog missing", "In stopped event.", attachment_id, queue_name, bot_id)
+ return
+
+ if not patch_log.wait_duration:
+ WarningLog.record("patchlog wait duration missing", "In stopped event.", attachment_id, queue_name, bot_id)
+ return
+
+ if not patch_log.finished:
+ if bot_id:
+ patch_log.bot_id = bot_id
+ patch_log.finished = True
+ patch_log.calculate_process_duration()
+ patch_log.put()
+
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ queue_log.patch_process_durations.append(patch_log.process_duration)
+ queue_log.put()
+
+ @classmethod
+ def updated(cls, attachment_id, queue_name, bot_id=None):
+ patch_log = PatchLog.lookup_if_exists(attachment_id, queue_name)
+ if not patch_log:
+ WarningLog.record("patchlog missing", "In updated event.", attachment_id, queue_name, bot_id)
+ return
+
+ if bot_id:
+ patch_log.bot_id = bot_id
+ patch_log.status_update_count += 1
+ patch_log.put()
+
+ queue_log = QueueLog.get_current(queue_name, queue_log_duration)
+ queue_log.status_update_count += 1
+ queue_log.put()
+
diff --git a/Tools/QueueStatusServer/main.py b/Tools/QueueStatusServer/main.py
index e1155ffa6..a626f8322 100644
--- a/Tools/QueueStatusServer/main.py
+++ b/Tools/QueueStatusServer/main.py
@@ -39,6 +39,7 @@ from handlers.gc import GC
from handlers.nextpatch import NextPatch
from handlers.patch import Patch
from handlers.patchstatus import PatchStatus
+from handlers.queuecharts import QueueCharts
from handlers.queuestatus import QueueStatus
from handlers.recentstatus import QueuesOverview
from handlers.releasepatch import ReleasePatch
@@ -46,6 +47,7 @@ from handlers.showresults import ShowResults
from handlers.statusbubble import StatusBubble
from handlers.submittoews import SubmitToEWS
from handlers.svnrevision import SVNRevision
+from handlers.syncqueuelogs import SyncQueueLogs
from handlers.updatestatus import UpdateStatus
from handlers.updatesvnrevision import UpdateSVNRevision
from handlers.updateworkitems import UpdateWorkItems
@@ -57,12 +59,14 @@ routes = [
('/', QueuesOverview),
('/dashboard', Dashboard),
('/gc', GC),
+ ('/sync-queue-logs', SyncQueueLogs),
(r'/patch-status/(.*)/(.*)', PatchStatus),
(r'/patch/(.*)', Patch),
(r'/submit-to-ews', SubmitToEWS),
(r'/results/(.*)', ShowResults),
(r'/status-bubble/(.*)', StatusBubble),
(r'/svn-revision/(.*)', SVNRevision),
+ (r'/queue-charts/(.*)', QueueCharts),
(r'/queue-status/(.*)/bots/(.*)', QueueStatus),
(r'/queue-status/(.*)', QueueStatus),
(r'/next-patch/(.*)', NextPatch),
diff --git a/Tools/QueueStatusServer/model/attachment.py b/Tools/QueueStatusServer/model/attachment.py
index f98f265e6..83b441edc 100644
--- a/Tools/QueueStatusServer/model/attachment.py
+++ b/Tools/QueueStatusServer/model/attachment.py
@@ -28,8 +28,6 @@
import re
-from google.appengine.api import memcache
-
from model.queues import Queue
from model.queuestatus import QueueStatus
from model.workitems import WorkItems
@@ -37,10 +35,6 @@ from model.workitems import WorkItems
class Attachment(object):
@classmethod
- def dirty(cls, attachment_id):
- memcache.delete(str(attachment_id), namespace="attachment-summary")
-
- @classmethod
def recent(cls, limit=1):
statuses = QueueStatus.all().order("-date")
# Notice that we use both a set and a list here to keep the -date ordering.
@@ -66,11 +60,7 @@ class Attachment(object):
def summary(self):
if self._summary:
return self._summary
- self._summary = memcache.get(str(self.id), namespace="attachment-summary")
- if self._summary:
- return self._summary
self._summary = self._fetch_summary()
- memcache.set(str(self.id), self._summary, namespace="attachment-summary")
return self._summary
def state_from_queue_status(self, status):
diff --git a/Tools/QueueStatusServer/model/patchlog.py b/Tools/QueueStatusServer/model/patchlog.py
new file mode 100644
index 000000000..78254da43
--- /dev/null
+++ b/Tools/QueueStatusServer/model/patchlog.py
@@ -0,0 +1,70 @@
+# Copyright (C) 2013 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.
+
+from datetime import datetime
+
+from google.appengine.ext import db
+
+
+class PatchLog(db.Model):
+ attachment_id = db.IntegerProperty()
+ queue_name = db.StringProperty()
+ date = db.DateTimeProperty(auto_now_add=True)
+ bot_id = db.StringProperty()
+ retry_count = db.IntegerProperty(default=0)
+ status_update_count = db.IntegerProperty(default=0)
+ finished = db.BooleanProperty(default=False)
+ wait_duration = db.IntegerProperty()
+ process_duration = db.IntegerProperty()
+
+ @classmethod
+ def lookup(cls, attachment_id, queue_name):
+ key = cls._generate_key(attachment_id, queue_name)
+ return cls.get_or_insert(key, attachment_id=attachment_id, queue_name=queue_name)
+
+ @classmethod
+ def lookup_if_exists(cls, attachment_id, queue_name):
+ key = cls._generate_key(attachment_id, queue_name)
+ return cls.get_by_key_name(key)
+
+ def calculate_wait_duration(self):
+ time_delta = datetime.utcnow() - self.date
+ self.wait_duration = int(self._time_delta_to_seconds(time_delta))
+
+ def calculate_process_duration(self):
+ time_delta = datetime.utcnow() - self.date
+ self.process_duration = int(self._time_delta_to_seconds(time_delta)) - (self.wait_duration or 0)
+
+ @classmethod
+ def _generate_key(cls, attachment_id, queue_name):
+ return "%s-%s" % (attachment_id, queue_name)
+
+ # Needed to support Python 2.5's lack of timedelta.total_seconds().
+ @classmethod
+ def _time_delta_to_seconds(cls, time_delta):
+ return time_delta.seconds + time_delta.days * 24 * 3600
diff --git a/Tools/QueueStatusServer/model/queuelog.py b/Tools/QueueStatusServer/model/queuelog.py
new file mode 100644
index 000000000..ee3e9def6
--- /dev/null
+++ b/Tools/QueueStatusServer/model/queuelog.py
@@ -0,0 +1,88 @@
+# Copyright (C) 2013 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.
+
+from time import time
+from datetime import datetime
+
+from google.appengine.ext import db
+
+from model.workitems import WorkItems
+from model.activeworkitems import ActiveWorkItems
+
+
+class QueueLog(db.Model):
+ date = db.DateTimeProperty()
+ # duration specifies in seconds the time period these log values apply to.
+ duration = db.IntegerProperty()
+ queue_name = db.StringProperty()
+ bot_ids_seen = db.StringListProperty()
+ max_patches_waiting = db.IntegerProperty(default=0)
+ patch_wait_durations = db.ListProperty(int)
+ patch_process_durations = db.ListProperty(int)
+ patch_retry_count = db.IntegerProperty(default=0)
+ status_update_count = db.IntegerProperty(default=0)
+
+ @staticmethod
+ def create_key(queue_name, duration, timestamp):
+ return "%s-%s-%s" % (queue_name, duration, timestamp)
+
+ @classmethod
+ def get_at(cls, queue_name, duration, timestamp):
+ timestamp = int(timestamp / duration) * duration
+ date = datetime.utcfromtimestamp(timestamp)
+ key = cls.create_key(queue_name, duration, timestamp)
+ return cls.get_or_create(key, date=date, duration=duration, queue_name=queue_name)
+
+ @classmethod
+ def get_current(cls, queue_name, duration):
+ return cls.get_at(queue_name, duration, time())
+
+ # This is to prevent page requests from generating lots of rows in the database.
+ @classmethod
+ def get_or_create(cls, key_name, **kwargs):
+ return db.run_in_transaction(cls._get_or_create_txn, key_name, **kwargs)
+
+ def update_max_patches_waiting(self):
+ patches_waiting = self._get_patches_waiting(self.queue_name)
+ if patches_waiting > self.max_patches_waiting:
+ self.max_patches_waiting = patches_waiting
+ return True
+ return False
+
+ @classmethod
+ def _get_or_create_txn(cls, key_name, **kwargs):
+ entity = cls.get_by_key_name(key_name, parent=kwargs.get('parent'))
+ if entity is None:
+ entity = cls(key_name=key_name, **kwargs)
+ return entity
+
+ @classmethod
+ def _get_patches_waiting(cls, queue_name):
+ work_items = WorkItems.lookup_by_queue(queue_name)
+ active_work_items = ActiveWorkItems.lookup_by_queue(queue_name)
+ return len(set(work_items.item_ids) - set(active_work_items.item_ids))
diff --git a/Tools/QueueStatusServer/model/queues.py b/Tools/QueueStatusServer/model/queues.py
index afdd9ea19..d71237dc8 100644
--- a/Tools/QueueStatusServer/model/queues.py
+++ b/Tools/QueueStatusServer/model/queues.py
@@ -29,39 +29,25 @@
import re
+from config.queues import all_queue_names
from model.activeworkitems import ActiveWorkItems
from model.workitems import WorkItems
class Queue(object):
-
- # Eventually the list of queues may be stored in the data store.
- _all_queue_names = [
- "commit-queue",
- "style-queue",
- "chromium-ews", # aka cr-linux-ews
- "cr-android-ews",
- "qt-ews",
- "qt-wk2-ews",
- "gtk-ews",
- "mac-ews",
- "win-ews",
- "efl-ews",
- ]
-
def __init__(self, name):
- assert(name in self._all_queue_names)
+ assert(name in all_queue_names)
self._name = name
@classmethod
def queue_with_name(cls, queue_name):
- if queue_name not in cls._all_queue_names:
+ if queue_name not in all_queue_names:
return None
return Queue(queue_name)
@classmethod
def all(cls):
- return [Queue(name) for name in cls._all_queue_names]
+ return [Queue(name) for name in all_queue_names]
@classmethod
def all_ews(cls):
@@ -82,19 +68,14 @@ class Queue(object):
# For use in status bubbles or table headers
def short_name(self):
- # HACK: chromium-ews is incorrectly named.
- short_name = self._name.replace("chromium-ews", "Cr-Linux-ews")
- short_name = short_name.replace("-ews", "")
+ short_name = self._name.replace("-ews", "")
short_name = short_name.replace("-queue", "")
return self._caplitalize_after_dash(short_name.capitalize())
def display_name(self):
- # HACK: chromium-ews is incorrectly named.
- display_name = self._name.replace("chromium-ews", "cr-linux-ews")
-
- display_name = display_name.replace("-", " ")
- display_name = display_name.replace("cr", "chromium")
+ display_name = self._name.replace("-", " ")
display_name = display_name.title()
+ display_name = display_name.replace("Wk2", "WK2")
display_name = display_name.replace("Ews", "EWS")
return display_name
diff --git a/Tools/QueueStatusServer/model/queues_unittest.py b/Tools/QueueStatusServer/model/queues_unittest.py
index 654c8a62b..2a6bd70b1 100644
--- a/Tools/QueueStatusServer/model/queues_unittest.py
+++ b/Tools/QueueStatusServer/model/queues_unittest.py
@@ -47,7 +47,6 @@ class QueueTest(unittest.TestCase):
def test_short_name(self):
self._assert_short_name("mac-ews", "Mac")
- self._assert_short_name("chromium-ews", "Cr-Linux")
self._assert_short_name("commit-queue", "Commit")
self._assert_short_name("style-queue", "Style")
@@ -56,7 +55,6 @@ class QueueTest(unittest.TestCase):
def test_display_name(self):
self._assert_display_name("mac-ews", "Mac EWS")
- self._assert_display_name("chromium-ews", "Chromium Linux EWS")
self._assert_display_name("commit-queue", "Commit Queue")
self._assert_display_name("style-queue", "Style Queue")
@@ -65,7 +63,6 @@ class QueueTest(unittest.TestCase):
def test_name_with_underscores(self):
self._assert_name_with_underscores("mac-ews", "mac_ews")
- self._assert_name_with_underscores("chromium-ews", "chromium_ews")
self._assert_name_with_underscores("commit-queue", "commit_queue")
def test_style_queue_is_ews(self):
diff --git a/Tools/QueueStatusServer/model/queuestatus.py b/Tools/QueueStatusServer/model/queuestatus.py
index 8002f8921..0f4d38b96 100644
--- a/Tools/QueueStatusServer/model/queuestatus.py
+++ b/Tools/QueueStatusServer/model/queuestatus.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -26,6 +26,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+from config import messages
from google.appengine.ext import db
from model.queuepropertymixin import QueuePropertyMixin
@@ -41,4 +42,4 @@ class QueueStatus(db.Model, QueuePropertyMixin):
results_file = db.BlobProperty()
def is_retry_request(self):
- return self.message == "Retry" # From AbstractQueue._retry_status
+ return self.message == messages.retry_status
diff --git a/Tools/EWSTools/create-webkit-git b/Tools/QueueStatusServer/model/warninglog.py
index cbf8ce4f2..b9677eb09 100755..100644
--- a/Tools/EWSTools/create-webkit-git
+++ b/Tools/QueueStatusServer/model/warninglog.py
@@ -1,5 +1,4 @@
-#/bin/bash
-# Copyright (c) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2013 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
@@ -27,16 +26,22 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# These are meant to match the instructions from:
-# http://trac.webkit.org/wiki/UsingGitWithWebKit
-cd /mnt/git
-git clone git://git.webkit.org/WebKit.git webkit
-cd webkit
+from time import time
+from datetime import datetime
-git svn init -T trunk http://svn.webkit.org/repository/webkit
-git update-ref refs/remotes/trunk origin/master
-# It's possible that this "config" step can get merged into an earlier setup step.
-git config --replace-all svn-remote.svn.fetch trunk:refs/remotes/origin/master
+from google.appengine.ext import db
-git fetch
-git svn rebase
+
+class WarningLog(db.Model):
+ date = db.DateTimeProperty(auto_now_add=True)
+ event = db.StringProperty()
+ message = db.StringProperty()
+ attachment_id = db.IntegerProperty()
+ queue_name = db.StringProperty()
+ bot_id = db.StringProperty()
+
+ @classmethod
+ def record(cls, event, message=None, attachment_id=None, queue_name=None, bot_id=None):
+ entity = cls(event=event, message=message, queue_name=queue_name, bot_id=bot_id, attachment_id=attachment_id)
+ entity.put()
+ return entity
diff --git a/Tools/QueueStatusServer/stylesheets/charts.css b/Tools/QueueStatusServer/stylesheets/charts.css
new file mode 100644
index 000000000..b841b2cd0
--- /dev/null
+++ b/Tools/QueueStatusServer/stylesheets/charts.css
@@ -0,0 +1,8 @@
+.chart {
+ margin-bottom: 40px;
+ height: 200px;
+}
+
+.choices {
+ font-size: 0.75em;
+} \ No newline at end of file
diff --git a/Tools/QueueStatusServer/templates/activebots.html b/Tools/QueueStatusServer/templates/activebots.html
index d47f45d78..8c79d730f 100644
--- a/Tools/QueueStatusServer/templates/activebots.html
+++ b/Tools/QueueStatusServer/templates/activebots.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
-<title>WebKit Queue Status</title>
+<title>WebKit Queues</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
<style>
/* Override the generic table styles from dashboard.css */
@@ -11,7 +11,7 @@ td {
</style>
</head>
<body>
-<h1>WebKit Queue Status</h1>
+<h1>WebKit Queues</h1>
<table>
<thead>
<tr>
diff --git a/Tools/QueueStatusServer/templates/queuecharts.html b/Tools/QueueStatusServer/templates/queuecharts.html
new file mode 100644
index 000000000..953debdbc
--- /dev/null
+++ b/Tools/QueueStatusServer/templates/queuecharts.html
@@ -0,0 +1,284 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>{{ queue_name }} Charts</title>
+ <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
+ <link type="text/css" rel="stylesheet" href="/stylesheets/charts.css" />
+ <script type="text/javascript" src="https://www.google.com/jsapi"></script>
+ <script type="text/javascript">
+ google.load('visualization', '1.0', {'packages':['corechart']});
+ google.setOnLoadCallback(function () {
+
+ function secondsToString(seconds) {
+ var oneSecond = 1;
+ var oneMinute = 60;
+ var oneHour = oneMinute * 60;
+ var oneDay = oneHour * 24;
+ var oneYear = oneDay * 365.25;
+ var unitArray = [
+ [oneYear, "year"],
+ [oneDay, "day"],
+ [oneHour, "hour"],
+ [oneMinute, "minute"],
+ [oneSecond, "second"],
+ ];
+ var result = "";
+ for (var i = 0; i < unitArray.length; i++) {
+ var unit = unitArray[i][0];
+ if (seconds >= unit) {
+ if (result !== "") {
+ result += " ";
+ }
+ var name = unitArray[i][1];
+ var number = Math.floor(seconds/unit);
+ result += number + " " + name + (number > 1 ? "s" : "");
+ seconds %= unit;
+ }
+ }
+ if (result === "") {
+ return "0 seconds";
+ }
+ return result;
+ }
+
+ var data, chart, options;
+
+ var timeString = new Date({{ timestamp }} * 1000).toString();
+ var timestampDiv = document.getElementById("timestamp");
+ timestampDiv.innerHTML = "Viewing from " + timeString;
+
+ options = {
+ legend: {position: "top"},
+ hAxis: {
+ title: "{{ time_unit_name|capfirst }} Ago",
+ direction: -1,
+ viewWindow: {
+ min: {{ seconds_ago_min }} / {{ time_unit }},
+ max: {{ seconds_ago_max }} / {{ time_unit }},
+ },
+ gridlines: {
+ count: 9,
+ },
+ },
+ vAxis: {
+ viewWindow: {min: 0 },
+ },
+ lineWidth: 3,
+ };
+
+ // CHART 1
+ options.colors = ["green", "red", "orange"];
+ data = new google.visualization.DataTable();
+ data.addColumn("number", "<time>");
+ data.addColumn("number", "Patches Completed");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn("number", "Patches Waiting");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn("number", "Bots (visible to server)");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addRows([
+ {% for queue_datum in queue_data %}
+ [
+ {{ queue_datum.seconds_ago }} / {{ time_unit }},
+ {{ queue_datum.patches_completed }},
+ "Patches Completed: " + {{ queue_datum.patches_completed }} + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ {{ queue_datum.patches_waiting }},
+ "Patches Waiting: " + {{ queue_datum.patches_waiting }} + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ {{ queue_datum.bots_seen }},
+ "Bots (visible to server): " + {{ queue_datum.bots_seen }} + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ ],
+ {% endfor %}
+ ]);
+ chart = new google.visualization.LineChart(document.getElementById('chart1'));
+ chart.draw(data, options);
+
+ // CHART 2
+ options.colors = ["blue", "purple"];
+ data = new google.visualization.DataTable();
+ data.addColumn("number", "<time>");
+ data.addColumn("number", "Status Updates");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn("number", "Patch Retries");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addRows([
+ {% for queue_datum in queue_data %}
+ [
+ {{ queue_datum.seconds_ago }} / {{ time_unit }},
+ {{ queue_datum.status_update_count }},
+ "Status Updates: " + {{ queue_datum.status_update_count }} + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ {{ queue_datum.patch_retry_count }},
+ "Patch Retries: " + {{ queue_datum.patch_retry_count }} + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ ],
+ {% endfor %}
+ ]);
+ chart = new google.visualization.LineChart(document.getElementById('chart2'));
+ chart.draw(data, options);
+
+ // CHART 3
+ options.colors = ["brown"];
+ options.vAxis.title = "Minutes";
+ data = new google.visualization.DataTable();
+ data.addColumn("number", "<time>");
+ data.addColumn("number", "Patch Processing Times");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn({type: "number", role: "interval"});
+ data.addColumn({type: "number", role: "interval"});
+ data.addRows([
+ {% for queue_datum in queue_data %}
+ [
+ {{ queue_datum.seconds_ago }} / {{ time_unit }},
+ {{ queue_datum.patch_processing_med }} / 60,
+ "Patch Processing Times\nMax: " + secondsToString({{ queue_datum.patch_processing_max }}) + "\nMedian: " + secondsToString({{ queue_datum.patch_processing_med }}) + "\nMin: " + secondsToString({{ queue_datum.patch_processing_min }}) + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ {{ queue_datum.patch_processing_min }} / 60,
+ {{ queue_datum.patch_processing_max }} / 60,
+ ],
+ {% endfor %}
+ ]);
+ chart = new google.visualization.LineChart(document.getElementById('chart3'));
+ chart.draw(data, options);
+
+ // CHART 4
+ options.colors = ["red"];
+ data = new google.visualization.DataTable();
+ data.addColumn("number", "<time>");
+ data.addColumn("number", "Patch Waiting Times");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn({type: "number", role: "interval"});
+ data.addColumn({type: "number", role: "interval"});
+ data.addRows([
+ {% for queue_datum in queue_data %}
+ [
+ {{ queue_datum.seconds_ago }} / {{ time_unit }},
+ {{ queue_datum.patch_waiting_med }} / 60,
+ "Patch Waiting Times\nMax: " + secondsToString({{ queue_datum.patch_waiting_max }}) + "\nMedian: " + secondsToString({{ queue_datum.patch_waiting_med }}) + "\nMin: " + secondsToString({{ queue_datum.patch_waiting_min }}) + "\n" + secondsToString({{ queue_datum.seconds_ago }}) + " ago",
+ {{ queue_datum.patch_waiting_min }} / 60,
+ {{ queue_datum.patch_waiting_max }} / 60,
+ ],
+ {% endfor %}
+ ]);
+ chart = new google.visualization.LineChart(document.getElementById('chart4'));
+ chart.draw(data, options);
+
+ function postPatchLink (selection) {
+ if (selection.length > 0 && selection[0].row !== undefined) {
+ var attachmentIdArray = [{% for patch_datum in patch_data %}{{ patch_datum.attachment_id }}, {% endfor %}];
+ var attachmentId = attachmentIdArray[selection[0].row];
+ var aTag = document.getElementById("selectedPatch");
+ aTag.innerHTML = aTag.href = "//" + window.location.host + "/patch/" + attachmentId;
+ }
+ }
+
+ // CHART 5
+ options.colors = ["brown", "red"];
+ options.hAxis.title = "{{ time_unit_name|capfirst }} Ago";
+ options.hAxis.viewWindow.min = {{ seconds_ago_min }} / {{ time_unit }};
+ options.hAxis.viewWindow.max = {{ seconds_ago_max }} / {{ time_unit }};
+ delete options.lineWidth;
+ data = new google.visualization.DataTable();
+ data.addColumn("number", "<time>");
+ data.addColumn("number", "Process Duration");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn("number", "Wait Duration");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addRows([
+ {% for patch_datum in patch_data %}
+ [
+ {{ patch_datum.seconds_ago }} / {{ time_unit }},
+ {{ patch_datum.process_duration }},
+ "Patch {{ patch_datum.attachment_id }}\n" + secondsToString({{ patch_datum.seconds_ago }}) + " ago",
+ {{ patch_datum.wait_duration }},
+ "Patch {{ patch_datum.attachment_id }}\n" + secondsToString({{ patch_datum.seconds_ago }}) + " ago",
+ ],
+ {% endfor %}
+ ]);
+ chart = new google.visualization.ScatterChart(document.getElementById('chart5'));
+ var chart5 = chart;
+ google.visualization.events.addListener(chart, "select", function () {postPatchLink(chart5.getSelection());});
+ chart.draw(data, options);
+
+ // CHART 6
+ options.colors = ["blue", "purple"];
+ delete options.vAxis.title;
+ data = new google.visualization.DataTable();
+ data.addColumn("number", "<time>");
+ data.addColumn("number", "Status Updates");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addColumn("number", "Retries");
+ data.addColumn({type: "string", role: "tooltip"});
+ data.addRows([
+ {% for patch_datum in patch_data %}
+ [
+ {{ patch_datum.seconds_ago }} / {{ time_unit }},
+ {{ patch_datum.status_update_count }},
+ "Patch {{ patch_datum.attachment_id }}\n" + secondsToString({{ patch_datum.seconds_ago }}) + " ago",
+ {{ patch_datum.retry_count }},
+ "Patch {{ patch_datum.attachment_id }}\n" + secondsToString({{ patch_datum.seconds_ago }}) + " ago",
+ ],
+ {% endfor %}
+ ]);
+ chart = new google.visualization.ScatterChart(document.getElementById('chart6'));
+ var chart6 = chart;
+ google.visualization.events.addListener(chart, "select", function () {postPatchLink(chart6.getSelection());});
+ chart.draw(data, options);
+ });
+
+ function setURLParameter (parameterName, newValue) {
+ var split;
+ split = window.location.href.split("?");
+ var url, parameterArray;
+ url = split[0];
+ if (split.length > 1) {
+ parameterArray = split[1].split("&");
+ } else {
+ parameterArray = [];
+ }
+ var setParameter = false;
+ for (var i = 0; i < parameterArray.length; i++) {
+ var currentParameterName = decodeURIComponent(parameterArray[i].split("=")[0]);
+ if (currentParameterName === parameterName) {
+ parameterArray[i] = encodeURIComponent(parameterName) + "=" + encodeURIComponent(newValue);
+ setParameter = true;
+ break;
+ }
+ }
+ if (!setParameter) {
+ parameterArray.push(encodeURIComponent(parameterName) + "=" + encodeURIComponent(newValue));
+ }console.log(parameterArray);
+ window.location.href = url + "?" + parameterArray.join("&");
+ }
+ </script>
+ </head>
+
+ <body>
+ <div class="choices">
+ {% for single_queue_name in all_queue_names %}
+ {% if single_queue_name == queue_name %}
+ {{ queue_name }}
+ {% else %}
+ {{ single_queue_name|force_escape|queue_charts_link:single_queue_name|safe }}
+ {% endif %}
+ {% if not forloop.last %} | {% endif %}
+ {% endfor %}
+ </div>
+ <h1>{{ queue_name }} Charts</h1>
+ <div>[{{ queue_name|force_escape|queue_status_link:"status"|safe }}]</div>
+ <div id="timestamp"></div>
+ <div class="choices">Viewing range:
+ {% for view_range_choice in view_range_choices %}
+ {% if view_range_choice.view_range == view_range %}
+ {{ view_range_choice.name }}
+ {% else %}
+ <a href="javascript:setURLParameter('view_range', {{ view_range_choice.view_range }})">{{ view_range_choice.name }}</a>
+ {% endif %}
+ {% if not forloop.last %} | {% endif %}
+ {% endfor %}
+ </div>
+ <div class="chart" id="chart1"></div>
+ <div class="chart" id="chart2"></div>
+ <div class="chart" id="chart3"></div>
+ <div class="chart" id="chart4"></div>
+ <div class="chart" id="chart5"></div>
+ <div class="chart" id="chart6"></div>
+ Selected patch: <a id="selectedPatch">(None)</div>
+ </body>
+</html>
diff --git a/Tools/QueueStatusServer/templates/queuestatus.html b/Tools/QueueStatusServer/templates/queuestatus.html
index f8eb61e4e..aafafbd83 100644
--- a/Tools/QueueStatusServer/templates/queuestatus.html
+++ b/Tools/QueueStatusServer/templates/queuestatus.html
@@ -9,6 +9,7 @@
<h3>Summary</h3>
<div>
+<div>[{{ queue_name|force_escape|queue_charts_link:"charts"|safe }}]</div>
Last Pass: {% if last_pass %}{{ last_pass.date|timesince }} ago{% else %}never{% endif %}
{% if not bot_id and last_pass.bot_id %}
by <a href="/queue-status/{{last_pass.queue_name}}/bots/{{last_pass.bot_id}}">{{ last_pass.bot_id }}</a>
diff --git a/Tools/QueueStatusServer/templates/statusbubble.html b/Tools/QueueStatusServer/templates/statusbubble.html
index 3d6349ab9..51a3be815 100644
--- a/Tools/QueueStatusServer/templates/statusbubble.html
+++ b/Tools/QueueStatusServer/templates/statusbubble.html
@@ -73,7 +73,7 @@ window.addEventListener("message", function(e) {
{% for bubble in bubbles %}
<a class="status {{ bubble.state }}" target="_top"
{% if bubble.status %}
- href="http://queues.webkit.org/patch/{{ bubble.attachment_id }}"
+ href="/patch/{{ bubble.attachment_id }}"
title="{{ bubble.status.date|timesince }} ago"
{% endif %}
>
diff --git a/Tools/RebaselineQueueServer/app.yaml b/Tools/RebaselineQueueServer/app.yaml
deleted file mode 100755
index c425cfd59..000000000
--- a/Tools/RebaselineQueueServer/app.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-application: rebaseline-queue
-version: 1
-runtime: python
-api_version: 1
-
-handlers:
-- url: /static
- static_dir: static
-
-- url: .*
- script: main.py
diff --git a/Tools/RebaselineQueueServer/handlers/builderqueue.py b/Tools/RebaselineQueueServer/handlers/builderqueue.py
deleted file mode 100644
index c84e07b3b..000000000
--- a/Tools/RebaselineQueueServer/handlers/builderqueue.py
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (C) 2011 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.
-
-from urllib import unquote_plus
-
-from google.appengine.ext import webapp
-from google.appengine.ext.webapp import template
-from django.utils import simplejson
-
-from model.queueentry import QueueEntry
-
-
-class QueueHandler(webapp.RequestHandler):
- def get(self, builder_name):
- self._get(unquote_plus(builder_name))
-
- def post(self, builder_name):
- self._post(unquote_plus(builder_name))
-
- def _queued_test_names(self, builder_name):
- return [entry.test for entry in QueueEntry.entries_for_builder(builder_name)]
-
- def _queue_list_url(self, builder_name):
- return '/builder/%s/queue' % builder_name
-
-
-class QueueEdit(QueueHandler):
- def _get(self, builder_name):
- test_names = self._queued_test_names(builder_name)
- self.response.out.write(
- template.render("templates/builder-queue-edit.html", {
- 'builder_name': builder_name,
- 'queued_test_names': simplejson.dumps(test_names),
- }))
-
-
-class QueueAdd(QueueHandler):
- def _post(self, builder_name):
- current_tests = set(self._queued_test_names(builder_name))
- tests = set(self.request.get_all('test')).difference(current_tests)
-
- for test in tests:
- QueueEntry.add(builder_name, test)
-
- self.redirect(self._queue_list_url(builder_name))
-
-
-class QueueRemove(QueueHandler):
- def _post(self, builder_name):
- tests = self.request.get_all('test')
-
- for test in tests:
- QueueEntry.remove(builder_name, test)
-
- self.redirect(self._queue_list_url(builder_name))
-
-
-class QueueHtml(QueueHandler):
- def _get(self, builder_name):
- self.response.out.write(
- template.render("templates/builder-queue-list.html", {
- 'builder_name': builder_name,
- 'entries': QueueEntry.entries_for_builder(builder_name),
- }))
-
-
-class QueueJson(QueueHandler):
- def _get(self, builder_name):
- queue_json = {'tests': self._queued_test_names(builder_name)}
- self.response.out.write(simplejson.dumps(queue_json))
diff --git a/Tools/RebaselineQueueServer/index.yaml b/Tools/RebaselineQueueServer/index.yaml
deleted file mode 100755
index a3b9e05e3..000000000
--- a/Tools/RebaselineQueueServer/index.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-indexes:
-
-# AUTOGENERATED
-
-# This index.yaml is automatically updated whenever the dev_appserver
-# detects that a new type of query is run. If you want to manage the
-# index.yaml file manually, remove the above marker line (the line
-# saying "# AUTOGENERATED"). If you want to manage some indexes
-# manually, move them above the marker line. The index.yaml file is
-# automatically uploaded to the admin console when you next deploy
-# your application using appcfg.py.
diff --git a/Tools/RebaselineQueueServer/static/builder-frame-empty.html b/Tools/RebaselineQueueServer/static/builder-frame-empty.html
deleted file mode 100644
index 31b91bb4f..000000000
--- a/Tools/RebaselineQueueServer/static/builder-frame-empty.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Rebaseline Queue</title>
- <link rel="stylesheet" href="/static/styles.css" type="text/css">
-</head>
-<body>
-Select a group and then a builder to see tests that are currently failing on it (if any).
-</body>
-</html>
diff --git a/Tools/RebaselineQueueServer/static/styles.css b/Tools/RebaselineQueueServer/static/styles.css
deleted file mode 100644
index a36ff3530..000000000
--- a/Tools/RebaselineQueueServer/static/styles.css
+++ /dev/null
@@ -1,71 +0,0 @@
-body {
- font-family: Helvetica, Arial, sans-serif;
- font-size: 12px;
-}
-
-h1 {
- border-bottom: solid 1px #ccc;
-}
-
-#builder-picker body,
-#add-form body {
- margin: 0;
-}
-
-#builder-picker,
-#builder-picker body {
- height: 100%;
-}
-
-#builder-picker body {
- display: -webkit-box;
- -webkit-box-orient: vertical;
-}
-
-#builder-picker-controls {
- padding: 0.5em;
- border-bottom: solid 1px black;
-}
-
-#builder-picker-controls select {
- min-width: 10em;
-}
-
-#builder-frame {
- border: 0;
- -webkit-box-flex: 1;
- display: block;
-}
-
-.status {
- font-size: 16px;
- text-align: center;
- padding: 1em;
-}
-
-.test-table {
- border-collapse: collapse;
-}
-
-.test-table caption {
- font-size: 16px;
- font-weight: bold;
- background: #eee;
- padding: .5em;
-}
-
-.test-table th {
- text-align: left;
- border-bottom: solid 1px #ccc;
- background: #eee;
- min-width: 8em;
-}
-
-.test-table tbody tr:hover {
- background: #ffa;
-}
-
-.test-table .submit-row {
- text-align: right;
- padding: 1em 0;
-}
diff --git a/Tools/RebaselineQueueServer/templates/builder-picker.html b/Tools/RebaselineQueueServer/templates/builder-picker.html
deleted file mode 100644
index 1068c042a..000000000
--- a/Tools/RebaselineQueueServer/templates/builder-picker.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html id="builder-picker">
-<head>
- <title>Rebaseline Queue: Builders</title>
- <script src="http://test-results.appspot.com/dashboards/builders.js"></script>
- <link rel="stylesheet" href="/static/styles.css" type="text/css">
-</head>
-<body>
-
-<div id="builder-picker-controls">
- <label for="builder-group">Group:</label>
- <select id="builder-group">
- <option disabled></option>
- </select>
-
- <label for="builder">Builder:</label>
- <select id="builder">
- <option disabled></option>
- </select>
-</div>
-
-<iframe src="/static/builder-frame-empty.html" id="builder-frame"></iframe>
-
-<script>
-function init()
-{
- var builderGroupMenu = document.getElementById('builder-group');
- builderGroupMenu.addEventListener(
- 'change', handleBuilderGroupSelected, false);
-
- var builderMenu = document.getElementById('builder');
- builderMenu.addEventListener(
- 'change', handleBuilderSelected, false);
-
- for (var builderGroupName in LAYOUT_TESTS_BUILDER_GROUPS) {
- var builderGroupOption = document.createElement('option');
- builderGroupOption.textContent = builderGroupOption.value =
- builderGroupName;
- builderGroupMenu.appendChild(builderGroupOption);
- }
-}
-
-function handleBuilderGroupSelected()
-{
- var builderGroupMenu = document.getElementById('builder-group');
- var builderGroupName =
- builderGroupMenu.options[builderGroupMenu.selectedIndex].value;
- var builderGroup = LAYOUT_TESTS_BUILDER_GROUPS[builderGroupName];
-
- var builderMenu = document.getElementById('builder');
- while (builderMenu.options[1]) {
- builderMenu.removeChild(builderMenu.options[1]);
- }
-
- for (var builderName in builderGroup.builders) {
- var builderOption = document.createElement('option');
- builderOption.textContent = builderOption.value = builderName;
- builderMenu.appendChild(builderOption);
- }
-}
-
-function handleBuilderSelected()
-{
- var builderMenu = document.getElementById('builder');
- var builderName = builderMenu.options[builderMenu.selectedIndex].value;
- document.getElementById('builder-frame').src =
- '/builder/' + builderName + '/queue/edit';
-}
-
-init();
-</script>
-
-</body>
-</html>
diff --git a/Tools/RebaselineQueueServer/templates/builder-queue-edit.html b/Tools/RebaselineQueueServer/templates/builder-queue-edit.html
deleted file mode 100644
index f1b58440a..000000000
--- a/Tools/RebaselineQueueServer/templates/builder-queue-edit.html
+++ /dev/null
@@ -1,190 +0,0 @@
-<!DOCTYPE html>
-<html id="add-form">
-<head>
- <title>Rebaseline Queue: Edit</title>
- <script src="http://test-results.appspot.com/dashboards/builders.js"></script>
- <link rel="stylesheet" href="/static/styles.css" type="text/css">
-</head>
-<body">
-
-<div id="loading-indicator" class="status">Loading...</div>
-
-<form method="POST" id="form-template" style="display: none">
- <table class="test-table">
- <caption></caption>
- <thead>
- <th>Test</th>
- <th>Expected</th>
- <th>Actual</th>
- <th>Results</th>
- </thead>
- <tbody></tbody>
- <tbody>
- <tr>
- <td colspan="4" class="submit-row">
- <input type="submit" value="">
- </td>
- </tr>
- </tbody>
- </table>
-</form>
-
-<script>
-var TEST_RESULTS_SERVER = 'http://test-results.appspot.com/';
-var BUILDER_TO_GROUP = {};
-for (var builderGroupName in LAYOUT_TESTS_BUILDER_GROUPS) {
- for (var builderName in LAYOUT_TESTS_BUILDER_GROUPS[builderGroupName]) {
- BUILDER_TO_GROUP[builderName] = builderGroupName;
- }
-}
-
-// Extract template parameters
-var builderName = '{{ builder_name|escapejs }}';
-var queuedTestNames = {{ queued_test_names|safe }};
-
-function init()
-{
- var builderMaster = BUILDER_TO_MASTER[builderName] || CHROMIUM_GPU_BUILDER_MASTER;
- var resultsUrl = TEST_RESULTS_SERVER + 'testfile?builder=' + builderName +
- '&master=' + builderMaster.name +
- '&testtype=layout-tests&name=full_results.json';
-
- var script = document.createElement('script');
- script.src = resultsUrl;
- document.getElementsByTagName('head')[0].appendChild(script);
-}
-
-function ADD_RESULTS(results)
-{
- var builderGroupName = BUILDER_TO_GROUP[builderName];
-
- var failingTests = [];
- var queuedTests = [];
- function processTestResult(test, results) {
- var actual = results.actual;
- var expected = results.expected;
- if (actual == expected ||
- expected.split(' ').indexOf(actual) != -1 ||
- actual == 'SKIP' ||
- actual.indexOf('PASS') != -1 ||
- (expected.indexOf('FAIL') != -1 && actual.indexOf('TIMEOUT') == -1)) {
- continue;
- }
-
- results.name = test;
-
- if (queuedTestNames.indexOf(test) != -1) {
- queuedTests.push(results);
- queuedTestNames.splice(queuedTestNames.indexOf(test), 1);
- } else {
- failingTests.push(results);
- }
- }
-
- function gatherTests(path, testTree) {
- if ('actual' in testTree) {
- processTestResult(path, testTree);
- } else {
- if (path) {
- path += '/';
- }
- for (var key in testTree) {
- gatherTests(path + key, testTree[key]);
- }
- }
- }
- gatherTests('', results.tests);
-
- // If we have remaining queued tests that are currently not failing,
- // synthesize results for them.
- queuedTestNames.forEach(function(queuedTestName) {
- queuedTests.push({
- name: queuedTestName,
- actual: 'UNKNOWN',
- expected: 'UNKNOWN'
- });
- });
-
- document.getElementById('loading-indicator').style.display = 'none';
-
- renderTestResults(
- failingTests,
- 'add',
- 'Failing tests',
- 'Add to rebaseline queue',
- 'No failing tests.');
- renderTestResults(
- queuedTests,
- 'remove',
- 'Queued tests',
- 'Remove from rebaseline queue',
- 'No queued tests.');
-}
-
-function renderTestResults(testResults, formAction, title, submitLabel, emptyMessage)
-{
- if (testResults.length == 0) {
- var emptyNode = document.createElement('div');
- emptyNode.className = 'status';
- emptyNode.textContent = emptyMessage;
- document.body.appendChild(emptyNode);
- return;
- }
-
- var form = document.getElementById('form-template').cloneNode(true);
- form.action = '/builder/' + builderName + '/queue/' + formAction;
- form.style.display = '';
- document.body.appendChild(form);
-
- var testsTable = form.querySelector('.test-table');
- testsTable.querySelector('caption').textContent = title;
- testsTable.querySelector('input[type=submit]').value = submitLabel;
-
- testResults.sort(function(a, b) {
- return a.name < b.name ? -1 : (a.name > b.name ? 1 : 0);
- });
-
- testResults.forEach(function(result) {
- var testRow = document.createElement('tr');
-
- var testCell = document.createElement('td');
- testRow.appendChild(testCell);
- var testCheckbox = document.createElement('input');
- testCheckbox.type = 'checkbox';
- testCheckbox.name = 'test';
- testCheckbox.value = result.name;
- testCheckbox.id = result.name;
- testCell.appendChild(testCheckbox);
-
- var testName = document.createElement('label');
- testName.textContent = result.name;
- testName.setAttribute('for', result.name);
- testCell.appendChild(testName);
-
- var expectedCell = document.createElement('td');
- testRow.appendChild(expectedCell);
- expectedCell.textContent = result.expected;
-
- var actualCell = document.createElement('td');
- testRow.appendChild(actualCell);
- actualCell.textContent = result.actual;
-
- var resultsCell = document.createElement('td');
- testRow.appendChild(resultsCell);
- var resultsLink = document.createElement('a');
- resultsLink.target = '_blank';
- resultsLink.href = TEST_RESULTS_SERVER +
- 'dashboards/flakiness_dashboard.html#tests=' + result.name +
- '&group=' + builderGroupName;
- resultsLink.textContent = 'Flakiness dashboard';
- resultsCell.appendChild(resultsLink);
-
- testsTable.tBodies[0].appendChild(testRow);
- });
-}
-
-init();
-</script>
-
-</body>
-</html>
diff --git a/Tools/RebaselineQueueServer/templates/builder-queue-list.html b/Tools/RebaselineQueueServer/templates/builder-queue-list.html
deleted file mode 100644
index 79fa02a63..000000000
--- a/Tools/RebaselineQueueServer/templates/builder-queue-list.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>{{ builder_name|escape }} Queue</title>
- <link rel="stylesheet" href="/static/styles.css" type="text/css">
-</head>
-<body>
-
-<h1>Queue: {{ builder_name|escape }}</h1>
-
-<ol>
-{% for entry in entries %}
- <li>
- {{ entry.test|escape }}
- </li>
-{% empty %}
- No tests found in queue.
-{% endfor %}
-</ol>
-
-<a href="/builder/{{ builder_name|escape }}/queue/edit">Edit queue</a>
-</body>
-</html>
diff --git a/Tools/RebaselineQueueServer/templates/home.html b/Tools/RebaselineQueueServer/templates/home.html
deleted file mode 100644
index c6a16ffdc..000000000
--- a/Tools/RebaselineQueueServer/templates/home.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Rebaseline Queue</title>
- <link rel="stylesheet" href="/static/styles.css" type="text/css">
-</head>
-<body>
-
-<h1>Rebaseline Queue</h1>
-
-<ul>
- <li><a href="/builder/picker">Browse and enqueue failing tests on builders</a></li>
- <li>
- Builders with enqueued tests:
- <ul>
-{% for builder_name in builder_names %}
- <li>
- <a href="/builder/{{ builder_name|escape }}/queue">{{ builder_name|escape }}</a>
- </li>
-{% empty %}
- None
-{% endfor %}
- </ul>
- </li>
-</ul>
-
-</body>
-</html>
diff --git a/Tools/Scripts/VCSUtils.pm b/Tools/Scripts/VCSUtils.pm
index b3b8ec290..305d65bc0 100644
--- a/Tools/Scripts/VCSUtils.pm
+++ b/Tools/Scripts/VCSUtils.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
# Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
# Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
# Copyright (C) 2012 Daniel Bates (dbates@intudata.com)
@@ -107,8 +107,11 @@ my $svnVersion;
# Project time zone for Cupertino, CA, US
my $changeLogTimeZone = "PST8PDT";
-my $gitDiffStartRegEx = qr#^diff --git (\w/)?(.+) (\w/)?([^\r\n]+)#;
+my $gitDiffStartRegEx = qr#^diff --git [^\r\n]+#;
+my $gitDiffStartWithPrefixRegEx = qr#^diff --git \w/(.+) \w/([^\r\n]+)#; # We suppose that --src-prefix and --dst-prefix don't contain a non-word character (\W) and end with '/'.
+my $gitDiffStartWithoutPrefixNoSpaceRegEx = qr#^diff --git (\S+) (\S+)$#;
my $svnDiffStartRegEx = qr#^Index: ([^\r\n]+)#;
+my $gitDiffStartWithoutPrefixSourceDirectoryPrefixRegExp = qr#^diff --git ([^/]+/)#;
my $svnPropertiesStartRegEx = qr#^Property changes on: ([^\r\n]+)#; # $1 is normally the same as the index path.
my $svnPropertyStartRegEx = qr#^(Modified|Name|Added|Deleted): ([^\r\n]+)#; # $2 is the name of the property.
my $svnPropertyValueStartRegEx = qr#^\s*(\+|-|Merged|Reverse-merged)\s*([^\r\n]+)#; # $2 is the start of the property's value (which may span multiple lines).
@@ -233,11 +236,33 @@ sub isGitSVN()
return $isGitSVN;
}
+sub gitDirectory()
+{
+ chomp(my $result = `git rev-parse --git-dir`);
+ return $result;
+}
+
+sub gitBisectStartBranch()
+{
+ my $bisectStartFile = File::Spec->catfile(gitDirectory(), "BISECT_START");
+ if (!-f $bisectStartFile) {
+ return "";
+ }
+ open(BISECT_START, $bisectStartFile) or die "Failed to open $bisectStartFile: $!";
+ chomp(my $result = <BISECT_START>);
+ close(BISECT_START);
+ return $result;
+}
+
sub gitBranch()
{
unless (defined $gitBranch) {
chomp($gitBranch = `git symbolic-ref -q HEAD`);
- $gitBranch = "" if exitStatus($?);
+ my $hasDetachedHead = exitStatus($?);
+ if ($hasDetachedHead) {
+ # We may be in a git bisect session.
+ $gitBranch = gitBisectStartBranch();
+ }
$gitBranch =~ s#^refs/heads/##;
$gitBranch = "" if $gitBranch eq "master";
}
@@ -302,12 +327,6 @@ sub chdirReturningRelativePath($)
return File::Spec->abs2rel($previousDirectory, $newDirectory);
}
-sub determineGitRoot()
-{
- chomp(my $gitDir = `git rev-parse --git-dir`);
- return dirname($gitDir);
-}
-
sub determineSVNRoot()
{
my $last = '';
@@ -356,7 +375,7 @@ sub determineSVNRoot()
sub determineVCSRoot()
{
if (isGit()) {
- return determineGitRoot();
+ return dirname(gitDirectory());
}
if (!isSVN()) {
@@ -615,6 +634,32 @@ sub isExecutable($)
return $fileMode % 2;
}
+# Parse the Git diff header start line.
+#
+# Args:
+# $line: "diff --git" line.
+#
+# Returns the path of the target file.
+sub parseGitDiffStartLine($)
+{
+ my $line = shift;
+ $_ = $line;
+ if (/$gitDiffStartWithPrefixRegEx/ || /$gitDiffStartWithoutPrefixNoSpaceRegEx/) {
+ return $2;
+ }
+ # Assume the diff was generated with --no-prefix (e.g. git diff --no-prefix).
+ if (!/$gitDiffStartWithoutPrefixSourceDirectoryPrefixRegExp/) {
+ # FIXME: Moving top directory file is not supported (e.g diff --git A.txt B.txt).
+ die("Could not find '/' in \"diff --git\" line: \"$line\"; only non-prefixed git diffs (i.e. not generated with --no-prefix) that move a top-level directory file are supported.");
+ }
+ my $pathPrefix = $1;
+ if (!/^diff --git \Q$pathPrefix\E.+ (\Q$pathPrefix\E.+)$/) {
+ # FIXME: Moving a file through sub directories of top directory is not supported (e.g diff --git A/B.txt C/B.txt).
+ die("Could not find '/' in \"diff --git\" line: \"$line\"; only non-prefixed git diffs (i.e. not generated with --no-prefix) that move a file between top-level directories are supported.");
+ }
+ return $1;
+}
+
# Parse the next Git diff header from the given file handle, and advance
# the handle so the last line read is the first line after the header.
#
@@ -656,12 +701,15 @@ sub parseGitDiffHeader($$)
my $indexPath;
if (/$gitDiffStartRegEx/) {
+ # Use $POSTMATCH to preserve the end-of-line character.
+ my $eol = $POSTMATCH;
+
# The first and second paths can differ in the case of copies
# and renames. We use the second file path because it is the
# destination path.
- $indexPath = adjustPathForRecentRenamings($4);
- # Use $POSTMATCH to preserve the end-of-line character.
- $_ = "Index: $indexPath$POSTMATCH"; # Convert to SVN format.
+ $indexPath = adjustPathForRecentRenamings(parseGitDiffStartLine($_));
+
+ $_ = "Index: $indexPath$eol"; # Convert to SVN format.
} else {
die("Could not parse leading \"diff --git\" line: \"$line\".");
}
@@ -690,9 +738,9 @@ sub parseGitDiffHeader($$)
$isNew = 1 if $1;
} elsif (/^similarity index (\d+)%/) {
$similarityIndex = $1;
- } elsif (/^copy from (\S+)/) {
+ } elsif (/^copy from ([^\t\r\n]+)/) {
$copiedFromPath = $1;
- } elsif (/^rename from (\S+)/) {
+ } elsif (/^rename from ([^\t\r\n]+)/) {
# FIXME: Record this as a move rather than as a copy-and-delete.
# This will simplify adding rename support to svn-unapply.
# Otherwise, the hash for a deletion would have to know
@@ -702,9 +750,17 @@ sub parseGitDiffHeader($$)
$copiedFromPath = $1;
$shouldDeleteSource = 1;
} elsif (/^--- \S+/) {
- $_ = "--- $indexPath"; # Convert to SVN format.
+ # Convert to SVN format.
+ # We emit the suffix "\t(revision 0)" to handle $indexPath which contains a space character.
+ # The patch(1) command thinks a file path is characters before a tab.
+ # This suffix make our diff more closely match the SVN diff format.
+ $_ = "--- $indexPath\t(revision 0)";
} elsif (/^\+\+\+ \S+/) {
- $_ = "+++ $indexPath"; # Convert to SVN format.
+ # Convert to SVN format.
+ # We emit the suffix "\t(working copy)" to handle $indexPath which contains a space character.
+ # The patch(1) command thinks a file path is characters before a tab.
+ # This suffix make our diff more closely match the SVN diff format.
+ $_ = "+++ $indexPath\t(working copy)";
$foundHeaderEnding = 1;
} elsif (/^GIT binary patch$/ ) {
$isBinary = 1;
@@ -1005,13 +1061,23 @@ sub parseDiff($$;$)
# Then we are in the body of the diff.
my $isChunkRange = defined(parseChunkRange($line));
$numTextChunks += 1 if $isChunkRange;
+ my $nextLine = <$fileHandle>;
+ my $willAddNewLineAtEndOfFile = defined($nextLine) && $nextLine =~ /^\\ No newline at end of file$/;
+ if ($willAddNewLineAtEndOfFile) {
+ # Diff(1) always emits a LF character preceeding the line "\ No newline at end of file".
+ # We must preserve both the added LF character and the line ending of this sentinel line
+ # or patch(1) will complain.
+ $svnText .= $line . $nextLine;
+ $line = <$fileHandle>;
+ next;
+ }
if ($indexPathEOL && !$isChunkRange) {
# The chunk range is part of the body of the diff, but its line endings should't be
# modified or patch(1) will complain. So, we only modify non-chunk range lines.
$line =~ s/\r\n|\r|\n/$indexPathEOL/g;
}
$svnText .= $line;
- $line = <$fileHandle>;
+ $line = $nextLine;
next;
} # Otherwise, we found a diff header.
@@ -1023,6 +1089,10 @@ sub parseDiff($$;$)
($headerHashRef, $line) = parseDiffHeader($fileHandle, $line);
if (!$optionsHashRef || !$optionsHashRef->{shouldNotUseIndexPathEOL}) {
+ # FIXME: We shouldn't query the file system (via firstEOLInFile()) to determine the
+ # line endings of the file indexPath. Instead, either the caller to parseDiff()
+ # should provide this information or parseDiff() should take a delegate that it
+ # can use to query for this information.
$indexPathEOL = firstEOLInFile($headerHashRef->{indexPath}) if !$headerHashRef->{isNew} && !$headerHashRef->{isBinary};
}
@@ -1815,9 +1885,6 @@ sub gitConfig($)
my ($config) = @_;
my $result = `git config $config`;
- if (($? >> 8)) {
- $result = `git repo-config $config`;
- }
chomp $result;
return $result;
}
diff --git a/Tools/Scripts/bisect-builds b/Tools/Scripts/bisect-builds
index b970db399..301d9fd85 100755
--- a/Tools/Scripts/bisect-builds
+++ b/Tools/Scripts/bisect-builds
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
+# Copyright (C) 2007, 2008, 2009, 2011, 2012, 2013 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -187,7 +187,13 @@ while (abs($endIndex - $startIndex) > 1) {
$brokenRevisions{$nightlies[$index]->{rev}} = $nightlies[$index]->{file};
delete $nightlies[$index];
$endIndex--;
- $index = $startIndex + int(($endIndex - $startIndex) / 2);
+ if (scalar(keys %brokenRevisions) % 2 == 0) {
+ # Even tries to bisect to the left
+ $index = int(($startIndex + $index) / 2);
+ } else {
+ # Odd tries to bisect to the right
+ $index = int(($index + $endIndex) / 2);
+ }
}
} while ($didReproduceBug < 0);
diff --git a/Tools/Scripts/build-api-tests b/Tools/Scripts/build-api-tests
index 09d19bf23..d3ec0bbbf 100755
--- a/Tools/Scripts/build-api-tests
+++ b/Tools/Scripts/build-api-tests
@@ -65,10 +65,8 @@ if (isAppleMacWebKit()) {
$result = buildXCodeProject("TestWebKitAPI", $clean, XcodeOptions(), @ARGV);
} elsif (isAppleWinWebKit()) {
chdir "Tools/TestWebKitAPI" or die;
- $result = buildVisualStudioProject("win/TestWebKitAPI.sln", $clean);
-} elsif (isChromium()) {
- # Chromium build everything in one shot. No need to build anything here.
- $result = 0;
+ my $solutionPath = "TestWebKitAPI.vcxproj/TestWebKitAPI.sln";
+ $result = buildVisualStudioProject($solutionPath, $clean);
} else {
die "TestWebKitAPI is not supported on this platform.\n";
}
diff --git a/Tools/Scripts/build-dumprendertree b/Tools/Scripts/build-dumprendertree
index 4e206f4bc..1ff75f7d3 100755
--- a/Tools/Scripts/build-dumprendertree
+++ b/Tools/Scripts/build-dumprendertree
@@ -44,8 +44,6 @@ Usage: $programName [options] [options to pass to build system]
--clean Clean up the build directory
--gtk Build the GTK+ port
--qt Build the Qt port
- --wx Build the wxWindows port
- --chromium Build the Chromium port
--efl Build the EFL port
EOF
@@ -70,9 +68,10 @@ my $result;
if (isAppleMacWebKit()) {
$result = buildXCodeProject("DumpRenderTree", $clean, XcodeOptions(), @ARGV);
} elsif (isAppleWinWebKit()) {
- $result = buildVisualStudioProject("DumpRenderTree.sln", $clean);
-} elsif (isQt() || isGtk() || isWx() || isChromium() || isEfl()) {
- # Qt, Gtk wxWindows, Chromium and EFL build everything in one shot. No need to build anything here.
+ my $drtSolutionPath = "DumpRenderTree.vcxproj/DumpRenderTree.sln";
+ $result = buildVisualStudioProject($drtSolutionPath, $clean);
+} elsif (isQt() || isGtk() || isEfl()) {
+ # Qt, Gtk and EFL build everything in one shot. No need to build anything here.
$result = 0;
} else {
die "Building not defined for this platform!\n";
diff --git a/Tools/Scripts/build-jsc b/Tools/Scripts/build-jsc
index 3fbf43fe1..6b29b7f21 100755
--- a/Tools/Scripts/build-jsc
+++ b/Tools/Scripts/build-jsc
@@ -82,13 +82,10 @@ sub buildMyProject
if (isAppleMacWebKit()) {
$result = system "sh", "-c", ('xcodebuild -project ' . $projectName . '.xcodeproj "$@" | grep -v setenv && exit ${PIPESTATUS[0]}'), "xcodebuild", @options, @ARGV, @coverageSupportOptions;
} elsif (isAppleWinWebKit()) {
- $result = buildVisualStudioProject("$projectName.vcproj/$projectName.sln");
+ $result = buildVisualStudioProject("$projectName.vcxproj/$projectName.submit.sln");
} elsif (isGtk()) {
checkForArgumentAndRemoveFromARGV("--gtk");
- $result = buildGtkProject($projectName, 0, @ARGV);
- } elsif (isWx()) {
- # Builds everything in one-shot. No need to build anything here.
- $result = 0;
+ $result = buildGtkProject($projectName, 0);
} else {
die "Building not defined for this platform!\n";
}
diff --git a/Tools/Scripts/build-webkit b/Tools/Scripts/build-webkit
index 3e53fa26d..69f983326 100755
--- a/Tools/Scripts/build-webkit
+++ b/Tools/Scripts/build-webkit
@@ -51,14 +51,14 @@ chdirWebKit();
my $showHelp = 0;
my $clean = 0;
-my $useGYP = 0;
my $minimal = 0;
my $installHeaders;
my $installLibs;
my $prefixPath;
my $makeArgs = "";
-my $cmakeArgs;
+my $cmakeArgs = "";
my $onlyWebKitProject = 0;
+my $noWebKit1 = 0;
my $noWebKit2 = 0;
my $coverageSupport = 0;
my $startTime = time();
@@ -107,13 +107,14 @@ my $usage = <<EOF;
Usage: $programName [options] [options to pass to build system]
--help Show this help message
--clean Cleanup the build directory
- --debug Compile in debug mode
- --gyp Use GYP-generated project files
+ --debug Compile with Debug configuration
+ --release Compile with Release configuration
+ --sdk=<sdk> Use a specific Xcode SDK (iOS and Mac only)
+ --device Use the current iphoneos.internal SDK (iOS only)
+ --simulator Use the current iphonesimulator SDK (iOS only)
--coverage Enable Code Coverage support (Mac only)
--blackberry Build the BlackBerry port on Mac/Linux
- --chromium Build the Chromium port on Mac/Win/Linux
- --chromium-android Build the Chromium port on Android
--efl Build the EFL port
--gtk Build the GTK+ port
--qt Build the Qt port
@@ -128,11 +129,12 @@ Usage: $programName [options] [options to pass to build system]
--prefix=<path> Set installation prefix to the given path (Gtk/Efl/BlackBerry only)
--makeargs=<arguments> Optional Makefile flags
--qmakearg=<arguments> Optional qmake flags (Qt only, e.g. --qmakearg="CONFIG+=webkit2" to build WebKit2)
- --cmakearg=<arguments> Optional CMake flags (e.g. --cmakearg="-DFOO=bar -DCMAKE_PREFIX_PATH=/usr/local")
+ --cmakeargs=<arguments> Optional CMake flags (e.g. --cmakeargs="-DFOO=bar -DCMAKE_PREFIX_PATH=/usr/local")
--minimal No optional features, unless explicitly enabled
--only-webkit Build only the WebKit project
+ --no-webkit1 Omit WebKit1 code from the build (Qt/EFL/GTK only)
--no-webkit2 Omit WebKit2 code from the build
EOF
@@ -140,7 +142,6 @@ EOF
my %options = (
'help' => \$showHelp,
'clean' => \$clean,
- 'gyp' => \$useGYP,
'install-headers=s' => \$installHeaders,
'install-libs=s' => \$installLibs,
'prefix=s' => \$prefixPath,
@@ -148,6 +149,7 @@ my %options = (
'cmakeargs=s' => \$cmakeArgs,
'minimal' => \$minimal,
'only-webkit' => \$onlyWebKitProject,
+ 'no-webkit1' => \$noWebKit1,
'no-webkit2' => \$noWebKit2,
'coverage' => \$coverageSupport,
);
@@ -202,23 +204,9 @@ if (!isQt() && !-d "WebKitLibraries") {
die "Error: No WebKitLibraries directory found. Please do a fresh checkout.\n";
}
-# Generate the generate project files from .gyp files
-if ($useGYP) {
- system("perl", "Tools/Scripts/generate-project-files") == 0 or die "Failed to run generate-project-files";
-}
-
my @options = ();
-# enable autotool options accordingly
-if (isGtk()) {
- @options = @ARGV;
- foreach (@features) {
- push @options, autotoolsFlag(${$_->{value}}, $_->{option});
- }
-
- push @options, "--prefix=" . $prefixPath if defined($prefixPath);
- push @options, "--makeargs=" . $makeArgs if $makeArgs;
-} elsif (isAppleMacWebKit()) {
+if (isAppleMacWebKit()) {
push @options, XcodeOptions();
sub option($$$)
@@ -239,6 +227,9 @@ if (isGtk()) {
# WebKit2 is only supported in SnowLeopard and later at present.
push @projects, ("Source/WebKit2", "Tools/MiniBrowser") if osXVersion()->{"minor"} >= 6 and !$noWebKit2;
+ # WebInspectorUI must come before WebKit and WebKit2
+ unshift @projects, ("Source/WebInspectorUI");
+
# Build Tools needed for Apple ports
push @projects, ("Tools/DumpRenderTree", "Tools/WebKitTestRunner", "Source/ThirdParty/gtest", "Tools/TestWebKitAPI");
@@ -254,6 +245,7 @@ if (isGtk()) {
push @options, "--install-headers=" . $installHeaders if defined($installHeaders);
push @options, "--install-libs=" . $installLibs if defined($installLibs);
push @options, "--makeargs=" . $makeArgs if $makeArgs;
+ push @options, "WEBKIT_CONFIG-=build_webkit1" if $noWebKit1;
push @options, "WEBKIT_CONFIG-=build_webkit2" if $noWebKit2;
if (checkForArgumentAndRemoveFromARGV("-2")) {
@@ -282,45 +274,11 @@ if (isInspectorFrontend()) {
my $result = 0;
-if (isWx()) {
- $makeArgs .= " --port=wx";
-
- downloadWafIfNeeded();
- @options = split(/ /, $makeArgs);
- @projects = ();
- $result = buildWafProject('.', $clean, @options);
- exit exitStatus($result) if exitStatus($result);
-}
-
-if (isChromium()) {
- # Currently chromium does not honour the features passed to build-webkit.
- # Until this is solved, we issue a warning about that.
- foreach (@features) {
- if (${$_->{value}} ne $_->{default}) {
- print "\n";
- print "===========================================================\n";
- print " Chromium does not honor the features passed to build-webkit.\n";
- print " The preferred way is to set up your overrides in ~/.gyp/include.gypi.\n";
- print " See https://trac.webkit.org/wiki/Chromium#Buildingwithfeaturedefines\n";
- print " on how to do that.\n";
- print "===========================================================\n";
- last;
- }
- }
-
- @options = @ARGV;
- # Chromium doesn't build by project directories.
- @projects = ();
- push @options, "--makeargs=" . $makeArgs if $makeArgs;
- $result = buildChromium($clean, @options);
- exit exitStatus($result) if exitStatus($result);
-}
-
if (isEfl()) {
# By default we build using all of the available CPUs.
$makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
- $cmakeArgs .= ($cmakeArgs ? " " : "") . "-DENABLE_WEBKIT=ON";
- $cmakeArgs .= " -DENABLE_WEBKIT2=ON" if !$noWebKit2;
+ $cmakeArgs = "-DENABLE_WEBKIT=OFF " . $cmakeArgs if $noWebKit1;
+ $cmakeArgs = "-DENABLE_WEBKIT2=OFF " . $cmakeArgs if $noWebKit2;
# We remove CMakeCache to avoid the bots to reuse cached flags when
# we enable new features. This forces a reconfiguration.
@@ -363,21 +321,25 @@ for my $dir (@projects) {
}
my $project = basename($dir);
+ my $baseProductDir = baseProductDir();
if (isGtk()) {
- if ($noWebKit2) {
- unshift(@options, "--disable-webkit2");
- }
- $result = buildGtkProject($project, $clean, @options);
+ $result = buildGtkProject($project, $clean, $prefixPath, $makeArgs, $noWebKit1, $noWebKit2, @features);
} elsif (isAppleMacWebKit()) {
my @local_options = @options;
- push @local_options, XcodeCoverageSupportOptions() if $coverageSupport && $project ne "ANGLE";
- my $useGYPProject = $useGYP && ($project =~ "WebCore|JavaScriptCore");
- my $projectPath = $useGYPProject ? "gyp/$project" : $project;
- $projectPath = $project =~ /gtest/ ? "xcode/gtest" : $project;
+ push @local_options, XcodeCoverageSupportOptions() if $coverageSupport;
+ my $projectPath = $project =~ /gtest/ ? "xcode/gtest" : $project;
$result = buildXCodeProject($projectPath, $clean, @local_options, @ARGV);
} elsif (isAppleWinWebKit()) {
if ($project eq "WebKit") {
- $result = buildVisualStudioProject("win/WebKit.vcproj/WebKit.sln", $clean);
+ my $webkitSolutionPath = "WebKit.vcxproj/WebKit.sln";
+ $result = buildVisualStudioProject($webkitSolutionPath, $clean);
+ my $vsConfiguration = configurationForVisualStudio();
+ if (usingVisualStudioExpress()) {
+ # Visual Studio Express is so lame it can't stdout build failures.
+ # So we find its logs and dump them to the console ourselves.
+ open(my $OUTPUT_HANDLE, '<', "$baseProductDir/$vsConfiguration/BuildOutput.htm") or die "Could not open build log file at $baseProductDir/$vsConfiguration/BuildOutput.htm";
+ print while (<$OUTPUT_HANDLE>);
+ }
}
}
# Various build* calls above may change the CWD.
@@ -385,15 +347,9 @@ for my $dir (@projects) {
if (exitStatus($result)) {
my $scriptDir = relativeScriptsDir();
- if (usingVisualStudioExpress()) {
- # Visual Studio Express is so lame it can't stdout build failures.
- # So we find its logs and dump them to the console ourselves.
- system(File::Spec->catfile($scriptDir, "print-vse-failure-logs"));
- }
if (isAppleWinWebKit()) {
print "\n\n===== BUILD FAILED ======\n\n";
print "Please ensure you have run $scriptDir/update-webkit to install dependencies.\n\n";
- my $baseProductDir = baseProductDir();
print "You can view build errors by checking the BuildLog.htm files located at:\n$baseProductDir/obj/<project>/<config>.\n";
}
exit exitStatus($result);
@@ -452,9 +408,7 @@ sub writeCongrats()
print "\n";
print "====================================================================\n";
print " WebKit is now built ($buildTime). \n";
- if (!isChromium()) {
- print " To run $launcherName with this newly-built code, use the\n";
- print " \"$launcherPath\" script.\n";
- }
+ print " To run $launcherName with this newly-built code, use the\n";
+ print " \"$launcherPath\" script.\n";
print "====================================================================\n";
}
diff --git a/Tools/Scripts/check-for-inappropriate-macros-in-external-headers b/Tools/Scripts/check-for-inappropriate-macros-in-external-headers
new file mode 100755
index 000000000..7e6c31f0e
--- /dev/null
+++ b/Tools/Scripts/check-for-inappropriate-macros-in-external-headers
@@ -0,0 +1,77 @@
+#!/usr/bin/env ruby
+
+# Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 script checks that the given headers in the framework build product do
+# not contain Platform.h and Compiler.h macros such as PLATFORM, COMPILER, etc.
+# This is meant to limit the exposure of the WTF headers, ensuring that if
+# clients include these headers they would not also need WTF's Platform.h.
+
+base_directory = ENV['TARGET_BUILD_DIR'] or throw "Unable to find TARGET_BUILD_DIR in the environment!"
+project_name = ENV['PROJECT_NAME'] or throw "Unable to find PROJECT_NAME in the environment!"
+$is_shallow_bundle = (ENV['SHALLOW_BUNDLE'] || "NO").upcase == "YES"
+
+$error_printed = false
+
+def print_error(msg)
+ $error_printed = true
+ STDERR.puts "ERROR: #{msg}"
+end
+
+def framework_headers_for_path(framework, path)
+ full_path = File.join Dir.pwd, framework, $is_shallow_bundle ? "" : "Versions/A/", path
+ if File.directory? full_path
+ Dir.glob "#{full_path}/**/*.h"
+ elsif File.exists? full_path
+ [full_path]
+ else
+ print_error "path '#{full_path}' for argument '#{path}' does not exist."
+ [] # Return an empty list so we can continue to check the other paths.
+ end
+end
+
+def verify_macros_in_header(header)
+ File.open(header) do |file|
+ file.each_line.with_index do |line, index|
+ # Check for the common macros from Platform.h and Compiler.h.
+ # NOTE: Negative lookahead (?!error) prevents matching "#error WebKit was not available prior to Mac OS X 10.2".
+ # NOTE: Negative lookahead (?!:2) prevents matching OS2 in macros like "defined(__OS2__)".
+ if match = /^\s*#(?!error).*?\b(PLATFORM|CPU|HAVE|OS(?!2)|USE|ENABLE|COMPILER)/.match(line)
+ print_error "'#{header}:#{index+1}' included forbidden macro '#{match[1]}' => '#{line.chomp}'"
+ end
+ end
+ end
+end
+
+
+Dir.chdir base_directory
+
+framework = "#{project_name}.framework"
+ARGV.each do |path|
+ framework_headers_for_path(framework, path).each do |header|
+ verify_macros_in_header(header)
+ end
+end
+
+exit 1 if $error_printed
diff --git a/Tools/Scripts/check-for-webkit-framework-include-consistency b/Tools/Scripts/check-for-webkit-framework-include-consistency
index 339fa7e18..fabc6922c 100755
--- a/Tools/Scripts/check-for-webkit-framework-include-consistency
+++ b/Tools/Scripts/check-for-webkit-framework-include-consistency
@@ -27,10 +27,6 @@
base_directory = ENV['TARGET_BUILD_DIR'] or throw "Unable to find TARGET_BUILD_DIR in the environment!"
is_shallow_bundle = (ENV['SHALLOW_BUNDLE'] || "NO").upcase == "YES"
-unless base_directory
- throw "Unable to find TARGET_BUILD_DIR in the environment!"
-end
-
Dir.chdir base_directory
$PERMITTED_INCLUDE_TYPES = { :public => [ :public ], :private => [ :public, :private ] }
@@ -73,9 +69,6 @@ def resolve_include(header, included_header, permitted_types)
# A header of any type including a WebCore header is a recipe for disaster.
if framework == "WebCore"
- # <rdar://problem/7718826> WebKeyGenerator.h should not include a WebCore header
- return if header =~ /\/WebKeyGenerator.h$/ and included_header_name == "WebCoreKeyGenerator.h"
-
print_error "#{header} included #{included_header}!"
return
end
diff --git a/Tools/Scripts/check-inspector-strings b/Tools/Scripts/check-inspector-strings
index 267c03a68..2408031df 100755
--- a/Tools/Scripts/check-inspector-strings
+++ b/Tools/Scripts/check-inspector-strings
@@ -44,7 +44,6 @@ from webkitpy.style.filereader import TextFileReader
from webkitpy.style.main import change_directory
_inspector_directory = "Source/WebCore/inspector/front-end"
-_devtools_directory = "Source/WebKit/chromium/src/js"
_localized_strings = "Source/WebCore/English.lproj/localizedStrings.js"
_log = logging.getLogger("check-inspector-strings")
@@ -142,7 +141,7 @@ if __name__ == "__main__":
strings_extractor = StringsExtractor([r"(WebInspector\.UIString\(.*)", r"\"((?:[^\"\\]|\\.)*?)\""])
file_reader = TextFileReader(filesystem, strings_extractor)
- file_reader.process_paths([_inspector_directory, _devtools_directory])
+ file_reader.process_paths([_inspector_directory])
localized_strings_extractor = LocalizedStringsExtractor()
localized_strings_extractor.process_file(_localized_strings)
raw_ui_strings = frozenset(strings_extractor.strings[0])
diff --git a/Tools/Scripts/detect-mismatched-virtual-const b/Tools/Scripts/detect-mismatched-virtual-const
deleted file mode 100755
index b345cb24a..000000000
--- a/Tools/Scripts/detect-mismatched-virtual-const
+++ /dev/null
@@ -1,167 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2008 Apple 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 script attempts to find instances of a problem where the signatures
-# of virtual methods fail to match because one is defined 'const', and another
-# is not. For example:
-# virtual void Base::doStuff() const;
-# virtual void Derived::doStuff();
-#
-# The lack of 'const' on the derived class gives it a different signature, and
-# it will therefore not be called when doStuff() is called on a derived object
-# via a base class pointer.
-#
-# Limitations of this script:
-# * It only works on things in the WebCore namespace
-# * Not all templatized methods may be found correctly
-# * It doesn't know anything about inheritance, or if methods are actually virtual
-# * It has lots of false positives (should add a whitelist for known-good signatures,
-# and specific methods)
-# * It's rather slow
-#
-# Added by Simon Fraser <simon.fraser@apple.com>
-#
-# Run the script like this:
-# WebKitTools/Scripts/detect-mismatched-virtual-const WebKitBuild/Debug/WebCore.framework/WebCore
-#
-# Output consists of a series of warnings like this:
-#
-# Both const and non-const versions of bgColor():
-# HTMLDocument::bgColor()
-# HTMLBodyElement::bgColor() const
-# HTMLTableElement::bgColor() const
-# HTMLTableRowElement::bgColor() const
-# HTMLTableCellElement::bgColor() const
-#
-
-use strict;
-no warnings qw /syntax/;
-
-
-my $file = $ARGV[0];
-
-print "Looking for unmatched const methods in $file\n";
-
-if (!open NM, "(nm '$file' | c++filt | sed 's/^/STDOUT:/') 2>&1 |") {
- die "Could not open $file\n";
-}
-
-my $nestedParens;
- $nestedParens = qr /
- [(]
- [^()]*
- (?:
- (??{ $nestedParens })
- [^()]*
- )*
- [)]/x;
-
-my $nestedAngleBrackets;
- $nestedAngleBrackets = qr /
- [<]
- [^<>]*
- (?:
- (??{ $nestedAngleBrackets })
- [^<>]*
- )*
- [>]/x;
-
-my $bal;
- $bal = qr /([^:]+
- (??{ $nestedAngleBrackets })?
- (??{ $nestedParens }))
- ([^()]*)$/x;
-
-my %signature_map = ();
-
-while (<NM>) {
- my $line = $_;
- chomp($line);
- if ($line =~ m/ [tT] WebCore::(.+)$/) {
- my $method = $1;
-
- if ($method =~ /$bal/) {
- my $signature = $1;
- my $const = $2 eq " const";
-
- my $class = substr($method, 0, length($method) - length($signature) - ($const ? 6 : 0));
-
-# print "line: $line\nclass: $class\nmethod: $method\nsignature: $signature\nconst: $const\n\n";
-
- my %method_info = (
- 'class' => $class,
- 'const' => $const,
- 'method' => $method,
- );
-
- push @{$signature_map{$signature}}, \%method_info;
- } else {
- print "unmatched line $method\n\n"
- }
- }
-}
-close NM;
-
-my $sig;
-for $sig (keys %signature_map) {
- #print "\n$sig\n";
-
- my @entries = @{$signature_map{$sig}};
-# print "$#entries\n";
-
- my $num_const = 0;
- my $num_not_const = 0;
- my $i;
- for $i (0 .. $#entries) {
- my $entry = @entries[$i];
-
- my $class = $entry->{'class'};
- my $const = $entry->{'const'};
-
- if ($const) {
- $num_const++;
- } else {
- $num_not_const++;
- }
- }
-
- if ($#entries > 1 && $num_const > 0 && $num_not_const > 0) {
- print "Both const and non-const versions of $sig:\n";
-
- for $i (0 .. $#entries) {
- my $entry = @entries[$i];
- my $method = $entry->{'method'};
- print "\t$method\n";
- }
-
- }
-}
-
-
-
diff --git a/Tools/Scripts/display-profiler-output b/Tools/Scripts/display-profiler-output
new file mode 100755
index 000000000..1a1deeedc
--- /dev/null
+++ b/Tools/Scripts/display-profiler-output
@@ -0,0 +1,938 @@
+#!/usr/bin/env ruby
+
+# Copyright (C) 2012, 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+
+require 'rubygems'
+
+require 'readline'
+
+begin
+ require 'json'
+ require 'highline'
+rescue LoadError
+ $stderr.puts "Error: some required gems are not installed!"
+ $stderr.puts
+ $stderr.puts "Try running:"
+ $stderr.puts
+ $stderr.puts "sudo gem install json"
+ $stderr.puts "sudo gem install highline"
+ exit 1
+end
+
+class Bytecode
+ attr_accessor :bytecodes, :bytecodeIndex, :opcode, :description, :topCounts, :bottomCounts, :machineInlinees, :osrExits
+
+ def initialize(bytecodes, bytecodeIndex, opcode, description)
+ @bytecodes = bytecodes
+ @bytecodeIndex = bytecodeIndex
+ @opcode = opcode
+ @description = description
+ @topCounts = [] # "source" counts
+ @bottomCounts = {} # "machine" counts, maps compilations to counts
+ @machineInlinees = {} # maps my compilation to a set of inlinees
+ @osrExits = []
+ end
+
+ def shouldHaveCounts?
+ @opcode != "op_call_put_result"
+ end
+
+ def addTopCount(count)
+ @topCounts << count
+ end
+
+ def addBottomCountForCompilation(count, compilation)
+ @bottomCounts[compilation] = [] unless @bottomCounts[compilation]
+ @bottomCounts[compilation] << count
+ end
+
+ def addMachineInlinee(compilation, inlinee)
+ @machineInlinees[compilation] = {} unless @machineInlinees[compilation]
+ @machineInlinees[compilation][inlinee] = true
+ end
+
+ def totalTopExecutionCount
+ sum = 0
+ @topCounts.each {
+ | value |
+ sum += value.count
+ }
+ sum
+ end
+
+ def topExecutionCount(engine)
+ sum = 0
+ @topCounts.each {
+ | value |
+ if value.engine == engine
+ sum += value.count
+ end
+ }
+ sum
+ end
+
+ def totalBottomExecutionCount
+ sum = 0
+ @bottomCounts.each_value {
+ | counts |
+ max = 0
+ counts.each {
+ | value |
+ max = [max, value.count].max
+ }
+ sum += max
+ }
+ sum
+ end
+
+ def bottomExecutionCount(engine)
+ sum = 0
+ @bottomCounts.each_pair {
+ | compilation, counts |
+ if compilation.engine == engine
+ max = 0
+ counts.each {
+ | value |
+ max = [max, value.count].max
+ }
+ sum += max
+ end
+ }
+ sum
+ end
+
+ def totalExitCount
+ sum = 0
+ @osrExits.each {
+ | exit |
+ sum += exit.count
+ }
+ sum
+ end
+end
+
+class Bytecodes
+ attr_accessor :codeHash, :inferredName, :source, :instructionCount, :machineInlineSites, :compilations
+
+ def initialize(json)
+ @codeHash = json["hash"].to_s
+ @inferredName = json["inferredName"].to_s
+ @source = json["sourceCode"].to_s
+ @instructionCount = json["instructionCount"].to_i
+ @bytecode = {}
+ json["bytecode"].each {
+ | subJson |
+ index = subJson["bytecodeIndex"].to_i
+ @bytecode[index] = Bytecode.new(self, index, subJson["opcode"].to_s, subJson["description"].to_s)
+ }
+ @machineInlineSites = {} # maps compilation to a set of origins
+ @compilations = []
+ end
+
+ def name(limit)
+ if to_s.size > limit
+ "\##{@codeHash}"
+ else
+ to_s
+ end
+ end
+
+ def to_s
+ "#{@inferredName}\##{@codeHash}"
+ end
+
+ def matches(pattern)
+ if pattern =~ /^#/
+ $~.post_match == @codeHash
+ elsif pattern =~ /#/
+ pattern == to_s
+ else
+ pattern == @inferredName or pattern == @codeHash
+ end
+ end
+
+ def each
+ @bytecode.values.sort{|a, b| a.bytecodeIndex <=> b.bytecodeIndex}.each {
+ | value |
+ yield value
+ }
+ end
+
+ def bytecode(bytecodeIndex)
+ @bytecode[bytecodeIndex]
+ end
+
+ def addMachineInlineSite(compilation, origin)
+ @machineInlineSites[compilation] = {} unless @machineInlineSites[compilation]
+ @machineInlineSites[compilation][origin] = true
+ end
+
+ def totalMachineInlineSites
+ sum = 0
+ @machineInlineSites.each_value {
+ | set |
+ sum += set.size
+ }
+ sum
+ end
+
+ def sourceMachineInlineSites
+ set = {}
+ @machineInlineSites.each_value {
+ | mySet |
+ set.merge!(mySet)
+ }
+ set.size
+ end
+
+ def totalMaxTopExecutionCount
+ max = 0
+ @bytecode.each_value {
+ | bytecode |
+ max = [max, bytecode.totalTopExecutionCount].max
+ }
+ max
+ end
+
+ def maxTopExecutionCount(engine)
+ max = 0
+ @bytecode.each_value {
+ | bytecode |
+ max = [max, bytecode.topExecutionCount(engine)].max
+ }
+ max
+ end
+
+ def totalMaxBottomExecutionCount
+ max = 0
+ @bytecode.each_value {
+ | bytecode |
+ max = [max, bytecode.totalBottomExecutionCount].max
+ }
+ max
+ end
+
+ def maxBottomExecutionCount(engine)
+ max = 0
+ @bytecode.each_value {
+ | bytecode |
+ max = [max, bytecode.bottomExecutionCount(engine)].max
+ }
+ max
+ end
+
+ def totalExitCount
+ sum = 0
+ each {
+ | bytecode |
+ sum += bytecode.totalExitCount
+ }
+ sum
+ end
+end
+
+class ProfiledBytecode
+ attr_reader :bytecodeIndex, :description
+
+ def initialize(json)
+ @bytecodeIndex = json["bytecodeIndex"].to_i
+ @description = json["description"].to_s
+ end
+end
+
+class ProfiledBytecodes
+ attr_reader :header, :bytecodes
+
+ def initialize(json)
+ @header = json["header"]
+ @bytecodes = $bytecodes[json["bytecodesID"].to_i]
+ @sequence = json["bytecode"].map {
+ | subJson |
+ ProfiledBytecode.new(subJson)
+ }
+ end
+
+ def each
+ @sequence.each {
+ | description |
+ yield description
+ }
+ end
+end
+
+def originStackFromJSON(json)
+ json.map {
+ | subJson |
+ $bytecodes[subJson["bytecodesID"].to_i].bytecode(subJson["bytecodeIndex"].to_i)
+ }
+end
+
+class CompiledBytecode
+ attr_accessor :origin, :description
+
+ def initialize(json)
+ @origin = originStackFromJSON(json["origin"])
+ @description = json["description"].to_s
+ end
+end
+
+class ExecutionCounter
+ attr_accessor :origin, :engine, :count
+
+ def initialize(origin, engine, count)
+ @origin = origin
+ @engine = engine
+ @count = count
+ end
+end
+
+class OSRExit
+ attr_reader :compilation, :origin, :codeAddresses, :exitKind, :isWatchpoint, :count
+
+ def initialize(compilation, origin, codeAddresses, exitKind, isWatchpoint, count)
+ @compilation = compilation
+ @origin = origin
+ @codeAddresses = codeAddresses
+ @exitKind = exitKind
+ @isWatchpoint = isWatchpoint
+ @count = count
+ end
+
+ def dumpForDisplay(prefix)
+ puts(prefix + "EXIT: due to #{@exitKind}, #{@count} times")
+ end
+end
+
+class Compilation
+ attr_accessor :bytecode, :engine, :descriptions, :counters, :compilationIndex
+ attr_accessor :osrExits, :profiledBytecodes, :numInlinedGetByIds, :numInlinedPutByIds
+ attr_accessor :numInlinedCalls
+
+ def initialize(json)
+ @bytecode = $bytecodes[json["bytecodesID"].to_i]
+ @bytecode.compilations << self
+ @compilationIndex = @bytecode.compilations.size
+ @engine = json["compilationKind"]
+ @descriptions = json["descriptions"].map {
+ | subJson |
+ CompiledBytecode.new(subJson)
+ }
+ @descriptions.each {
+ | description |
+ next if description.origin.empty?
+ description.origin[1..-1].each_with_index {
+ | inlinee, index |
+ description.origin[0].addMachineInlinee(self, inlinee.bytecodes)
+ inlinee.bytecodes.addMachineInlineSite(self, description.origin[0...index])
+ }
+ }
+ @counters = {}
+ json["counters"].each {
+ | subJson |
+ origin = originStackFromJSON(subJson["origin"])
+ counter = ExecutionCounter.new(origin, @engine, subJson["executionCount"].to_i)
+ @counters[origin] = counter
+ origin[-1].addTopCount(counter)
+ origin[0].addBottomCountForCompilation(counter, self)
+ }
+ @osrExits = {}
+ json["osrExits"].each {
+ | subJson |
+ osrExit = OSRExit.new(self, originStackFromJSON(subJson["origin"]),
+ json["osrExitSites"][subJson["id"]].map {
+ | value |
+ value.hex
+ }, subJson["exitKind"], subJson["isWatchpoint"],
+ subJson["count"])
+ osrExit.codeAddresses.each {
+ | codeAddress |
+ osrExits[codeAddress] = [] unless osrExits[codeAddress]
+ osrExits[codeAddress] << osrExit
+ }
+ osrExit.origin[-1].osrExits << osrExit
+ }
+ @profiledBytecodes = []
+ json["profiledBytecodes"].each {
+ | subJson |
+ @profiledBytecodes << ProfiledBytecodes.new(subJson)
+ }
+ @numInlinedGetByIds = json["numInlinedGetByIds"]
+ @numInlinedPutByIds = json["numInlinedPutByIds"]
+ @numInlinedCalls = json["numInlinedCalls"]
+ end
+
+ def counter(origin)
+ @counters[origin]
+ end
+
+ def to_s
+ "#{bytecode}-#{compilationIndex}-#{engine}"
+ end
+end
+
+class DescriptionLine
+ attr_reader :actualCountsString, :sourceCountsString, :disassembly, :shouldShow
+
+ def initialize(actualCountsString, sourceCountsString, disassembly, shouldShow)
+ @actualCountsString = actualCountsString
+ @sourceCountsString = sourceCountsString
+ @disassembly = disassembly
+ @shouldShow = shouldShow
+ end
+
+ def codeAddress
+ if @disassembly =~ /^\s*(0x[0-9a-fA-F]+):/
+ $1.hex
+ else
+ nil
+ end
+ end
+end
+
+if ARGV.length != 1
+ $stderr.puts "Usage: display-profiler-output <path to profiler output file>"
+ $stderr.puts
+ $stderr.puts "The typical usage pattern for the profiler currently looks something like:"
+ $stderr.puts
+ $stderr.puts "Path/To/jsc -p profile.json myprogram.js"
+ $stderr.puts "display-profiler-output profile.json"
+ exit 1
+end
+
+$json = JSON::parse(IO::read(ARGV[0]))
+$bytecodes = $json["bytecodes"].map {
+ | subJson |
+ Bytecodes.new(subJson)
+}
+$compilations = $json["compilations"].map {
+ | subJson |
+ Compilation.new(subJson)
+}
+$engines = ["Baseline", "DFG"]
+
+def lpad(str,chars)
+ if str.length>chars
+ str
+ else
+ "%#{chars}s"%(str)
+ end
+end
+
+def rpad(str, chars)
+ while str.length < chars
+ str += " "
+ end
+ str
+end
+
+def center(str, chars)
+ while str.length < chars
+ str += " "
+ if str.length < chars
+ str = " " + str
+ end
+ end
+ str
+end
+
+def mayBeHash(hash)
+ hash =~ /#/ or hash.size == 6
+end
+
+def sourceOnOneLine(source, limit)
+ source.gsub(/\s+/, ' ')[0...limit]
+end
+
+def screenWidth
+ if $stdin.tty?
+ HighLine::SystemExtensions.terminal_size[0]
+ else
+ 200
+ end
+end
+
+def summary(mode)
+ remaining = screenWidth
+
+ # Figure out how many columns we need for the code block names, and for counts
+ maxCount = 0
+ maxName = 0
+ $bytecodes.each {
+ | bytecodes |
+ maxCount = ([maxCount] + $engines.map {
+ | engine |
+ bytecodes.maxTopExecutionCount(engine)
+ } + $engines.map {
+ | engine |
+ bytecodes.maxBottomExecutionCount(engine)
+ }).max
+ maxName = [bytecodes.to_s.size, maxName].max
+ }
+ maxCountDigits = maxCount.to_s.size
+
+ hashCols = [[maxName, 30].min, "CodeBlock".size].max
+ remaining -= hashCols + 1
+
+ countCols = [maxCountDigits * $engines.size, "Source Counts".size].max
+ remaining -= countCols + 1
+
+ if mode == :full
+ instructionCountCols = 6
+ remaining -= instructionCountCols + 1
+
+ machineCountCols = [maxCountDigits * $engines.size, "Machine Counts".size].max
+ remaining -= machineCountCols + 1
+
+ compilationsCols = 7
+ remaining -= compilationsCols + 1
+
+ inlinesCols = 9
+ remaining -= inlinesCols + 1
+
+ exitCountCols = 7
+ remaining -= exitCountCols + 1
+
+ recentOptsCols = 12
+ remaining -= recentOptsCols + 1
+ end
+
+ if remaining > 0
+ sourceCols = remaining
+ else
+ sourceCols = nil
+ end
+
+ print(center("CodeBlock", hashCols))
+ if mode == :full
+ print(" " + center("#Instr", instructionCountCols))
+ end
+ print(" " + center("Source Counts", countCols))
+ if mode == :full
+ print(" " + center("Machine Counts", machineCountCols))
+ print(" " + center("#Compil", compilationsCols))
+ print(" " + center("Inlines", inlinesCols))
+ print(" " + center("#Exits", exitCountCols))
+ print(" " + center("Last Opts", recentOptsCols))
+ end
+ if sourceCols
+ print(" " + center("Source", sourceCols))
+ end
+ puts
+
+ print(center("", hashCols))
+ if mode == :full
+ print(" " + (" " * instructionCountCols))
+ end
+ print(" " + center("Base/DFG", countCols))
+ if mode == :full
+ print(" " + center("Base/DFG", machineCountCols))
+ print(" " + (" " * compilationsCols))
+ print(" " + center("Src/Total", inlinesCols))
+ print(" " + (" " * exitCountCols))
+ print(" " + center("Get/Put/Call", recentOptsCols))
+ end
+ puts
+ $bytecodes.sort {
+ | a, b |
+ b.totalMaxTopExecutionCount <=> a.totalMaxTopExecutionCount
+ }.each {
+ | bytecode |
+ print(center(bytecode.name(hashCols), hashCols))
+ if mode == :full
+ print(" " + center(bytecode.instructionCount.to_s, instructionCountCols))
+ end
+ print(" " +
+ center($engines.map {
+ | engine |
+ bytecode.maxTopExecutionCount(engine).to_s
+ }.join("/"), countCols))
+ if mode == :full
+ print(" " + center($engines.map {
+ | engine |
+ bytecode.maxBottomExecutionCount(engine).to_s
+ }.join("/"), machineCountCols))
+ print(" " + center(bytecode.compilations.size.to_s, compilationsCols))
+ print(" " + center(bytecode.sourceMachineInlineSites.to_s + "/" + bytecode.totalMachineInlineSites.to_s, inlinesCols))
+ print(" " + center(bytecode.totalExitCount.to_s, exitCountCols))
+ lastCompilation = bytecode.compilations[-1]
+ if lastCompilation
+ optData = [lastCompilation.numInlinedGetByIds,
+ lastCompilation.numInlinedPutByIds,
+ lastCompilation.numInlinedCalls]
+ else
+ optData = ["N/A"]
+ end
+ print(" " + center(optData.join('/'), recentOptsCols))
+ end
+ if sourceCols
+ print(" " + sourceOnOneLine(bytecode.source, sourceCols))
+ end
+ puts
+ }
+end
+
+def executeCommand(*commandArray)
+ command = commandArray[0]
+ args = commandArray[1..-1]
+ case command
+ when "help", "h", "?"
+ puts "summary (s) Print a summary of code block execution rates."
+ puts "full (f) Same as summary, but prints more information."
+ puts "source Show the source for a code block."
+ puts "bytecode (b) Show the bytecode for a code block, with counts."
+ puts "profiling (p) Show the (internal) profiling data for a code block."
+ puts "display (d) Display details for a code block."
+ puts "inlines Show all inlining stacks that the code block was on."
+ puts "help (h) Print this message."
+ puts "quit (q) Quit."
+ when "quit", "q", "exit"
+ exit 0
+ when "summary", "s"
+ summary(:summary)
+ when "full", "f"
+ summary(:full)
+ when "source"
+ if args.length != 1
+ puts "Usage: source <code block hash>"
+ return
+ end
+ $bytecodes.each {
+ | bytecode |
+ if bytecode.matches(args[0])
+ puts bytecode.source
+ end
+ }
+ when "bytecode", "b"
+ if args.length != 1
+ puts "Usage: source <code block hash>"
+ return
+ end
+
+ hash = args[0]
+
+ countCols = 10 * $engines.size
+ machineCols = 10 * $engines.size
+ pad = 1
+ while (countCols + 1 + machineCols + pad) % 8 != 0
+ pad += 1
+ end
+
+ $bytecodes.each {
+ | bytecodes |
+ next unless bytecodes.matches(hash)
+ puts(center("Source Counts", countCols) + " " + center("Machine Counts", machineCols) +
+ (" " * pad) + center("Bytecode for #{bytecodes}", screenWidth - pad - countCols - 1 - machineCols))
+ puts(center("Base/DFG", countCols) + " " + center("Base/DFG", countCols))
+ bytecodes.each {
+ | bytecode |
+ if bytecode.shouldHaveCounts?
+ countsString = $engines.map {
+ | myEngine |
+ bytecode.topExecutionCount(myEngine)
+ }.join("/")
+ machineString = $engines.map {
+ | myEngine |
+ bytecode.bottomExecutionCount(myEngine)
+ }.join("/")
+ else
+ countsString = ""
+ machineString = ""
+ end
+ puts(center(countsString, countCols) + " " + center(machineString, machineCols) + (" " * pad) + bytecode.description.chomp)
+ bytecode.osrExits.each {
+ | exit |
+ puts(center("!!!!!", countCols) + " " + center("!!!!!", machineCols) + (" " * (pad + 10)) +
+ "EXIT: in #{exit.compilation} due to #{exit.exitKind}, #{exit.count} times")
+ }
+ }
+ }
+ when "profiling", "p"
+ if args.length != 1
+ puts "Usage: profiling <code block hash>"
+ return
+ end
+
+ hash = args[0]
+
+ first = true
+ $compilations.each {
+ | compilation |
+
+ compilation.profiledBytecodes.each {
+ | profiledBytecodes |
+ if profiledBytecodes.bytecodes.matches(hash)
+ if first
+ first = false
+ else
+ puts
+ end
+
+ puts "Compilation #{compilation}:"
+ profiledBytecodes.header.each {
+ | header |
+ puts(" " * 6 + header)
+ }
+ profiledBytecodes.each {
+ | bytecode |
+ puts(" " * 8 + bytecode.description)
+ profiledBytecodes.bytecodes.bytecode(bytecode.bytecodeIndex).osrExits.each {
+ | exit |
+ if exit.compilation == compilation
+ puts(" !!!!! EXIT: due to #{exit.exitKind}, #{exit.count} times")
+ end
+ }
+ }
+ end
+ }
+ }
+ when "inlines"
+ if args.length != 1
+ puts "Usage: inlines <code block hash>"
+ return
+ end
+
+ hash = args[0]
+
+ $bytecodes.each {
+ | bytecodes |
+ next unless bytecodes.matches(hash)
+
+ # FIXME: print something useful to say more about which code block this is.
+
+ $compilations.each {
+ | compilation |
+ myOrigins = []
+ compilation.descriptions.each {
+ | description |
+ if description.origin.index {
+ | myBytecode |
+ bytecodes == myBytecode.bytecodes
+ }
+ myOrigins << description.origin
+ end
+ }
+ myOrigins.uniq!
+ myOrigins.sort! {
+ | a, b |
+ result = 0
+ [a.size, b.size].min.times {
+ | index |
+ result = a[index].bytecodeIndex <=> b[index].bytecodeIndex
+ break if result != 0
+ }
+ result
+ }
+
+ next if myOrigins.empty?
+
+ printArray = []
+ lastPrintStack = []
+
+ def originToPrintStack(origin)
+ (0...(origin.size - 1)).map {
+ | index |
+ "bc\##{origin[index].bytecodeIndex} --> #{origin[index + 1].bytecodes}"
+ }
+ end
+
+ def printStack(printArray, stack, lastStack)
+ stillCommon = true
+ stack.each_with_index {
+ | entry, index |
+ next if stillCommon and entry == lastStack[index]
+ printArray << (" " * (index + 1) + entry)
+ stillCommon = false
+ }
+ end
+
+ myOrigins.each {
+ | origin |
+ currentPrintStack = originToPrintStack(origin)
+ printStack(printArray, currentPrintStack, lastPrintStack)
+ lastPrintStack = currentPrintStack
+ }
+
+ next if printArray.empty?
+
+ puts "Compilation #{compilation}:"
+ printArray.each {
+ | entry |
+ puts entry
+ }
+ }
+ }
+ when "display", "d"
+ compilationIndex = nil
+
+ case args.length
+ when 1
+ if args[0] == "*"
+ hash = nil
+ else
+ hash = args[0]
+ end
+ engine = nil
+ when 2
+ if mayBeHash(args[0])
+ hash = args[0]
+ engine = args[1]
+ else
+ engine = args[0]
+ hash = args[1]
+ end
+ else
+ puts "Usage: summary <code block hash> <engine>"
+ return
+ end
+
+ if hash and hash =~ /-([0-9]+)-/
+ hash = $~.pre_match
+ engine = $~.post_match
+ compilationIndex = $1.to_i
+ end
+
+ if engine and not $engines.index(engine)
+ pattern = Regexp.new(Regexp.escape(engine), "i")
+ trueEngine = nil
+ $engines.each {
+ | myEngine |
+ if myEngine =~ pattern
+ trueEngine = myEngine
+ break
+ end
+ }
+ unless trueEngine
+ puts "#{engine} is not a valid engine, try #{$engines.join(' or ')}."
+ return
+ end
+ engine = trueEngine
+ end
+
+ actualCountCols = 13
+ sourceCountCols = 10 * $engines.size
+
+ first = true
+ $compilations.each {
+ | compilation |
+ next if hash and not compilation.bytecode.matches(hash)
+ next if engine and compilation.engine != engine
+ next if compilationIndex and compilation.compilationIndex != compilationIndex
+
+ if first
+ first = false
+ else
+ puts
+ end
+
+ puts("Compilation #{compilation}:")
+ puts(" Num inlined: GetByIds: #{compilation.numInlinedGetByIds} PutByIds: #{compilation.numInlinedPutByIds} Calls: #{compilation.numInlinedCalls}")
+ puts(center("Actual Counts", actualCountCols) + " " + center("Source Counts", sourceCountCols) + " " + center("Disassembly in #{compilation.engine}", screenWidth - 1 - sourceCountCols - 1 - actualCountCols))
+ puts((" " * actualCountCols) + " " + center("Base/DFG", sourceCountCols))
+
+ lines = []
+
+ compilation.descriptions.each {
+ | description |
+ # FIXME: We should have a better way of detecting things like CountExecution nodes
+ # and slow path entries in the baseline JIT.
+ if description.description =~ /CountExecution\(/ and compilation.engine == "DFG"
+ shouldShow = false
+ else
+ shouldShow = true
+ end
+ if description.origin.empty? or not description.origin[-1].shouldHaveCounts? or (compilation.engine == "Baseline" and description.description =~ /^\s*\(S\)/)
+ actualCountsString = ""
+ sourceCountsString = ""
+ else
+ actualCountsString = compilation.counter(description.origin).count.to_s
+ sourceCountsString = $engines.map {
+ | myEngine |
+ description.origin[-1].topExecutionCount(myEngine)
+ }.join("/")
+ end
+ description.description.split("\n").each {
+ | line |
+ lines << DescriptionLine.new(actualCountsString, sourceCountsString, line.chomp, shouldShow)
+ }
+ }
+
+ exitPrefix = center("!!!!!", actualCountCols) + " " + center("!!!!!", sourceCountCols) + (" " * 25)
+
+ lines.each_with_index {
+ | line, index |
+ codeAddress = line.codeAddress
+ if codeAddress
+ list = compilation.osrExits[codeAddress]
+ if list
+ list.each {
+ | exit |
+ if exit.isWatchpoint
+ exit.dumpForDisplay(exitPrefix)
+ end
+ }
+ end
+ end
+ if line.shouldShow
+ puts(center(line.actualCountsString, actualCountCols) + " " + center(line.sourceCountsString, sourceCountCols) + " " + line.disassembly)
+ end
+ if codeAddress
+ # Find the next disassembly address.
+ endIndex = index + 1
+ endAddress = nil
+ while endIndex < lines.size
+ myAddress = lines[endIndex].codeAddress
+ if myAddress
+ endAddress = myAddress
+ break
+ end
+ endIndex += 1
+ end
+
+ if endAddress
+ list = compilation.osrExits[endAddress]
+ if list
+ list.each {
+ | exit |
+ unless exit.isWatchpoint
+ exit.dumpForDisplay(exitPrefix)
+ end
+ }
+ end
+ end
+ end
+ }
+ }
+ else
+ puts "Invalid command: #{command}"
+ end
+end
+
+if $stdin.tty?
+ executeCommand("full")
+end
+
+while commandLine = Readline.readline("> ", true)
+ executeCommand(*commandLine.split)
+end
+
diff --git a/Tools/Scripts/do-webcore-rename b/Tools/Scripts/do-webcore-rename
index cd3cdee7a..281f7baad 100755
--- a/Tools/Scripts/do-webcore-rename
+++ b/Tools/Scripts/do-webcore-rename
@@ -96,13 +96,7 @@ sub wanted
my $isDOMTypeRename = 1;
my %renames = (
# Renames go here in the form of:
- "JavaScriptAudioNode" => "ScriptProcessorNode",
- "RealtimeAnalyserNode" => "AnalyserNode",
- "AudioGainNode" => "GainNode",
- "AudioPannerNode" => "PannerNode",
- "AudioChannelSplitter" => "ChannelSplitterNode",
- "AudioChannelMerger" => "ChannelMergerNode",
- "Oscillator" => "OscillatorNode",
+ "WaveTable" => "PeriodicWave",
);
my %renamesContemplatedForTheFuture = (
diff --git a/Tools/Scripts/dump-webkit-tests-run b/Tools/Scripts/dump-webkit-tests-run
new file mode 100755
index 000000000..d2339dcca
--- /dev/null
+++ b/Tools/Scripts/dump-webkit-tests-run
@@ -0,0 +1,52 @@
+#!/usr/bin/python
+import json
+import optparse
+import os
+import sys
+
+
+def main(argv):
+ parser = optparse.OptionParser(usage='%prog worker_number [path-to-stats.json]')
+ _, args = parser.parse_args(argv)
+
+ worker_number = int(args.pop(0))
+ if args:
+ if os.path.exists(args[0]):
+ with open(args[0], 'r') as fp:
+ trie = json.load(fp)
+ else:
+ print >> sys.stderr, "file not found: %s" % args[0]
+ sys.exit(1)
+ else:
+ trie = json.load(sys.stdin)
+
+ results = convert_trie_to_flat_paths(trie)
+ tests_run = []
+ for (test, result) in results.iteritems():
+ # Each result is a dict containing
+ # { 'results': [worker #, test # in worker, driver pid,
+ # test time in msecs, test + compare time in msecs]}
+ if result['results'][0] == worker_number:
+ tests_run.append((test, result['results'][1]))
+
+ print "\n".join(t[0] for t in sorted(tests_run, key=lambda t: t[1]))
+
+
+def convert_trie_to_flat_paths(trie, prefix=None):
+ # Cloned from webkitpy.layout_tests.layout_package.json_results_generator
+ # so that this code can stand alone.
+ result = {}
+ for name, data in trie.iteritems():
+ if prefix:
+ name = prefix + "/" + name
+
+ if len(data) and not "results" in data:
+ result.update(convert_trie_to_flat_paths(data, name))
+ else:
+ result[name] = data
+
+ return result
+
+
+if __name__ == '__main__':
+ main(sys.argv[1:])
diff --git a/Tools/Scripts/export-w3c-performance-wg-tests b/Tools/Scripts/export-w3c-performance-wg-tests
index aaa865915..1a41d447c 100755
--- a/Tools/Scripts/export-w3c-performance-wg-tests
+++ b/Tools/Scripts/export-w3c-performance-wg-tests
@@ -43,7 +43,7 @@ import shutil
import sys
if len(sys.argv) != 3:
- print 'USAGE: %s path_to_webkit_checkout_root path_to_webperf_checkout_root'
+ print 'USAGE: %s path_to_webkit_checkout_root path_to_webperf_checkout_root' % sys.argv[0]
sys.exit(1)
source_directory = os.path.join(sys.argv[1], 'LayoutTests', 'http', 'tests', 'w3c', 'webperf')
@@ -63,7 +63,6 @@ for directory_to_copy in directories_to_copy:
if not os.path.exists(destination_subdirectory):
os.makedirs(destination_subdirectory)
for root, dirs, files in os.walk(os.path.join(source_directory, directory_to_copy)):
- print root, dirs, files
root = os.path.relpath(root, source_directory)
for dirname in dirs:
destination_subdirectory = os.path.join(destination_directory, root, dirname)
@@ -78,3 +77,4 @@ for directory_to_copy in directories_to_copy:
for to_find, replace_with in replacements:
line = line.replace(to_find, replace_with)
out_file.write(line)
+ print 'Exported %s' % os.path.join(root, filename)
diff --git a/Tools/Scripts/extract-localizable-js-strings b/Tools/Scripts/extract-localizable-js-strings
new file mode 100755
index 000000000..b785ed3f6
--- /dev/null
+++ b/Tools/Scripts/extract-localizable-js-strings
@@ -0,0 +1,158 @@
+#!/usr/bin/perl -w
+
+# Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+
+use strict;
+
+@ARGV >= 1 or die "Usage: extract-localizable-js-strings <file to update> [ directory... ]\nDid you mean to run update-webkit-localizable-strings instead?\n";
+
+my $fileToUpdate = shift @ARGV;
+-f $fileToUpdate or die "Couldn't find file to update $fileToUpdate\n";
+
+my @directories = ();
+my @directoriesToSkip = ();
+if (@ARGV < 1) {
+ push(@directories, ".");
+} else {
+ for my $dir (@ARGV) {
+ if ($dir =~ /^-(.*)$/) {
+ push @directoriesToSkip, $1;
+ } else {
+ push @directories, $dir;
+ }
+ }
+}
+
+my $sawError = 0;
+
+my $keyCollisionCount = 0;
+
+my $quotedDirectoriesString = '"' . join('" "', @directories) . '"';
+for my $dir (@directoriesToSkip) {
+ $quotedDirectoriesString .= ' -path "' . $dir . '" -prune -o';
+}
+
+my @files = ( split "\n", `find $quotedDirectoriesString \\( -name "*.html" -o -name "*.js" \\)` );
+
+for my $file (sort @files) {
+ $file =~ s-^./--;
+
+ open SOURCE, $file or die "can't open $file\n";
+
+ while (<SOURCE>) {
+ chomp;
+
+ # Handle WebInspector strings. Prints a warning if a non-string literal is passed to WebInspector.UIString().
+ HandleUIString($1, $1, "", $file, $.) while s/WebInspector\.UIString\("([^"]+)"\)//;
+ print "$file:$.:WARNING: $&\n" while s/WebInspector\.UIString\(.*?\)//;
+
+ # Handle strings for other projects that also use this script.
+ HandleUIString($2, $2, "", $file, $.) while s/(\bclass="[^"]*l12n-tooltip[^"]*"[^>]*)title="([^"]+)"/$1/;
+ HandleUIString($1, $1, "", $file, $.) while s/\btitle="([^"]+)"([^>]*class="[^"]*l12n-tooltip[^"]*")/$2/;
+ HandleUIString($2, $2, "", $file, $.) while s/<(\w+)[^>]*\bclass="[^"]*l12n[^"]*"[^>]*>([^>]+)<\/\1>//;
+ HandleUIString($1, $1, "", $file, $.) while s/HTMLViewController\.UIString\("([^"]+)"\)//;
+ HandleUIString($1, $1, "", $file, $.) while s/\bgetLocalizedString\("([^"]+)"\)//;
+ HandleUIString($1, $1, "", $file, $.) while s/\blocalizedStrings\["([^"]+)"\]//;
+ }
+
+ close SOURCE;
+}
+
+my %stringByKey;
+my %commentByKey;
+my %fileByKey;
+my %lineByKey;
+
+sub HandleUIString
+{
+ my ($string, $key, $comment, $file, $line) = @_;
+ my $bad = 0;
+
+ if (grep { $_ == 0xFFFD } unpack "U*", $string) {
+ print "$file:$line:ERROR:string for translation has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n";
+ $bad = 1;
+ }
+
+ if ($string ne $key && grep { $_ == 0xFFFD } unpack "U*", $key) {
+ print "$file:$line:ERROR:key has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n";
+ $bad = 1;
+ }
+
+ if (grep { $_ == 0xFFFD } unpack "U*", $comment) {
+ print "$file:$line:ERROR:comment for translation has illegal UTF-8 -- most likely a problem with the Text Encoding of the source file\n";
+ $bad = 1;
+ }
+
+ if ($bad) {
+ $sawError = 1;
+ return;
+ }
+
+ if ($stringByKey{$key} && $stringByKey{$key} ne $string) {
+ print "$file:$line:encountered the same key, \"$key\", twice, with different strings\n";
+ print "$fileByKey{$key}:$lineByKey{$key}:previous occurrence\n";
+ $keyCollisionCount++;
+ return;
+ }
+
+ if ($commentByKey{$key} && $commentByKey{$key} ne $comment) {
+ print "$file:$line:encountered the same key, \"$key\", twice, with different comments\n";
+ print "$fileByKey{$key}:$lineByKey{$key}:previous occurrence\n";
+ $keyCollisionCount++;
+ return;
+ }
+
+ $fileByKey{$key} = $file;
+ $lineByKey{$key} = $line;
+ $stringByKey{$key} = $string;
+ $commentByKey{$key} = $comment;
+}
+
+print "\n" if $sawError;
+
+print "$keyCollisionCount key collisions\n" if $keyCollisionCount;
+
+if ($sawError) {
+ print "\nErrors encountered. Exiting without writing to $fileToUpdate.\n";
+ exit 1;
+}
+
+my $localizedStrings = "var localizedStrings = new Object;\n\n";
+
+for my $key (sort keys %commentByKey) {
+ $localizedStrings .= "localizedStrings[\"$key\"] = \"$stringByKey{$key}\";\n";
+}
+
+# Write out the strings file in UTF-16 with a BOM.
+utf8::decode($localizedStrings) if $^V ge v5.8;
+my $output = pack "n*", (0xFEFF, unpack "U*", $localizedStrings);
+
+if (-e "$fileToUpdate") {
+ open STRINGS, ">", "$fileToUpdate" or die;
+ print STRINGS $output;
+ close STRINGS;
+} else {
+ print "$fileToUpdate does not exist\n";
+ exit 1;
+}
diff --git a/Tools/Scripts/extract-localizable-strings b/Tools/Scripts/extract-localizable-strings
index 88f368478..946eeec50 100755
--- a/Tools/Scripts/extract-localizable-strings
+++ b/Tools/Scripts/extract-localizable-strings
@@ -43,6 +43,7 @@
# The exceptions file has a list of strings in quotes, filenames, and filename/string pairs separated by :.
use strict;
+no warnings 'deprecated';
sub UnescapeHexSequence($);
diff --git a/Tools/Scripts/filter-build-webkit b/Tools/Scripts/filter-build-webkit
index 97a732708..3a7f95ff0 100755
--- a/Tools/Scripts/filter-build-webkit
+++ b/Tools/Scripts/filter-build-webkit
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2011 Apple Inc. All rights reserved.
+# Copyright (C) 2011, 2012, 2013 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -66,17 +66,21 @@ HTMLFOOTER
sub printLine($$);
sub setLogfileOption($$);
sub setOutputFormatOption($$);
+sub shouldIgnoreLine($$);
sub usageAndExit();
# Defined in VCSUtils.
sub possiblyColored($$);
-my $showHelp;
+# Global variables used only in global scope.
my $outputPath = "&STDOUT";
-my $outputFormat = "text";
-my $useColor = -t STDOUT;
-my $unfilteredOutputPath = "build.log";
-my $logUnfilteredOutput;
+my $showHelp;
+
+# Global variables used in global and subroutine scope.
+our $logUnfilteredOutput;
+our $outputFormat = "text";
+our $unfilteredOutputPath = "build.log";
+our $useColor = -t STDOUT;
sub usageAndExit()
{
@@ -119,28 +123,12 @@ print OUTPUT_HANDLE HTML_HEADER if ($outputFormat eq "html");
my $buildFinished;
my $buildFailed = 0;
-while (my $line = <>) {
+for (my $previousLine = "", my $line = <>; $line; $previousLine = $line, $line = <>) {
print UNFILTERED_OUTPUT_HANDLE $line if $logUnfilteredOutput;
chomp($line);
- next if $line =~ /^\s*$/;
- next if $line =~ /^Build settings from command line:/;
- next if $line =~ /make: Nothing to be done for `all'\./;
- next if $line =~ /^JavaScriptCore\/create_hash_table/;
- next if $line =~ /JavaScriptCore.framework\/PrivateHeaders\/create_hash_table/;
- next if $line =~ /^JavaScriptCore\/pcre\/dftables/;
- next if $line =~ /^Creating hashtable for /;
- next if $line =~ /^Wrote output to /;
- next if $line =~ /^(touch|perl|cat|rm -f|bison|flex|python|\/usr\/bin\/g\+\+|gperf|echo|sed|if \[ \-f|WebCore\/generate-export-file) /;
- next if $line =~ /^UNDOCUMENTED: /;
- next if $line =~ /libtool.*has no symbols/;
- next if $line =~ /^# Lower case all the values, as CSS values are case-insensitive$/;
- next if $line =~ /^if sort /;
- next if $line =~ /^ /;
- next if $line =~ /^printf /;
- next if $line =~ /^offlineasm: Nothing changed/;
- next if $line =~ /^Showing first/;
+ next if shouldIgnoreLine($previousLine, $line);
if ($line =~ /^={10}/) {
printLine($line, STYLE_SUCCESS);
@@ -222,3 +210,28 @@ sub setOutputFormatOption($$)
}
$outputFormat = $value;
}
+
+sub shouldIgnoreLine($$)
+{
+ my ($previousLine, $line) = @_;
+
+ return 1 if $line =~ /^\s*$/;
+ return 1 if $line =~ /^Build settings from command line:/;
+ return 1 if $line =~ /make: Nothing to be done for `all'\./;
+ return 1 if $line =~ /^JavaScriptCore\/create_hash_table/;
+ return 1 if $line =~ /JavaScriptCore.framework\/PrivateHeaders\/create_hash_table/;
+ return 1 if $line =~ /^JavaScriptCore\/pcre\/dftables/;
+ return 1 if $line =~ /^Creating hashtable for /;
+ return 1 if $line =~ /^Wrote output to /;
+ return 1 if $line =~ /^(touch|perl|cat|rm -f|bison|flex|python|\/usr\/bin\/g\+\+|gperf|echo|sed|if \[ \-f|WebCore\/generate-export-file) /;
+ return 1 if $line =~ /^UNDOCUMENTED: /;
+ return 1 if $line =~ /libtool.*has no symbols/;
+ return 1 if $line =~ /^# Lower case all the values, as CSS values are case-insensitive$/;
+ return 1 if $line =~ /^if sort /;
+ return 1 if $line =~ /^ / && $previousLine !~ /referenced from:$/;
+ return 1 if $line =~ /^printf /;
+ return 1 if $line =~ /^offlineasm: Nothing changed/;
+ return 1 if $line =~ /^Showing first/;
+
+ return 0;
+}
diff --git a/Tools/Scripts/generate-coverage-data b/Tools/Scripts/generate-coverage-data
index d06ee99dd..2532e4f9c 100755
--- a/Tools/Scripts/generate-coverage-data
+++ b/Tools/Scripts/generate-coverage-data
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
+# Copyright (C) 2005, 2006, 2013 Apple Computer, Inc. All rights reserved.
# Copyright (C) 2007 Holger Hans Peter Freyther. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,45 +27,156 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Simple script to build, run and visualize coverage information
+# Script to build, run and visualize coverage information
use strict;
use File::Basename;
use File::Spec;
use FindBin;
use Getopt::Long qw(:config pass_through);
+use JSON;
use lib $FindBin::Bin;
-use webkitdirs;
+use List::Util qw(sum);
+use List::Util qw(max);
use POSIX;
+use webkitdirs;
+use XML::Simple;
-# Generate a name for our results
-my $svnVersion = determineCurrentSVNRevision();
-my @timeData = localtime(time);
-my $resultName = $svnVersion . "-" . join('_', @timeData);
-my @otherOptions = ();
+sub parseGcovrOutput($);
+sub getFileHitsAndBranches($);
+sub addLineCounts($$$$$$);
+sub createResultName();
+sub generateReport($);
-# Move to the source directory
-# Delete old gcov files
-# Compile WebKit and run the tests
-# Generate the coverage graph...
-# Upload
-
-$ENV{'WEBKIT_COVERAGE_BUILD'} = 1;
chdirWebKit();
+system("mkdir WebKitBuild/Coverage") if ! -d "WebKitBuild/Coverage";
-# Clean-up old files
+# Delete old gcov files
print "Cleaning up\n";
-system("if [ -d WebKitBuild ]; then find WebKitBuild -name '*.gcda' -delete; fi;") == 0 or die;
-
+system("if [ -d WebKitBuild ]; then find WebKitBuild -name '*.gcda' -delete; fi;") == 0 or die "Cannot delete old gcda files (code coverage";
print "Building and testing\n";
-system("Tools/Scripts/build-webkit", "--coverage", @ARGV) == 0 or die;
-system "Tools/Scripts/new-run-webkit-tests", "--no-launch-safari";
-system "Tools/Scripts/run-javascriptcore-tests", "--coverage", @ARGV;
+system("Tools/Scripts/build-webkit", "--clean", @ARGV) == 0 or die "Cannot clean WebKit build";
+system("Tools/Scripts/build-webkit", "--coverage", "--release", @ARGV) == 0 or die "Cannot compile WebKit with code coverage";
+system("Tools/Scripts/run-javascriptcore-tests --no-build");
+system("Tools/Scripts/run-api-tests");
+system("Tools/Scripts/run-webkit-tests");
+system("Tools/Scripts/run-webkit-tests -2");
+generateReport(createResultName());
+print "Done\n";
-# Collect the data and generate a report
-print "Collecting coverage data\n";
-system("Tools/CodeCoverage/run-generate-coverage-data", $resultName, "WebKitBuild/Coverage") == 0 or die;
-system("Tools/CodeCoverage/regenerate-coverage-display", "WebKitBuild/Coverage", "WebKitBuild/Coverage/html") == 0 or die;
+sub generateReport()
+{
+ my ($reportName) = @_;
-print "Done\n";
+ # Generate the coverage data and report
+ print "Collecting coverage data\n";
+ system("python Tools/Scripts/webkitpy/tool/gcovr --xml --output=WebKitBuild/Coverage/" . $reportName . ".xml") == 0 or die "Cannot run gcovr";
+
+ # Collect useful data from xml to json format
+ my $jsonData = encode_json(parseGcovrOutput("WebKitBuild/Coverage/$reportName.xml"));
+ open my $templateFile, "<", "Tools/CodeCoverage/results-template.html" or die "Cannot open Tools/CodeCoverage/results-template.html";
+ my $templateHtml = join("", <$templateFile>);
+ close $templateFile;
+ $templateHtml =~ s/%CoverageDataJSON%/$jsonData/;
+
+ my $reportFilename = "WebKitBuild/Coverage/$reportName.html";
+ open my $reportFile, ">", $reportFilename or die "Cannot open $reportFilename";
+ print $reportFile $templateHtml;
+ close $reportFile;
+
+ # Open the report
+ my $url = "file://" . sourceDir() . "/WebKitBuild/Coverage/$reportName.html";
+ system "open \"$url\"";
+}
+
+sub parseGcovrOutput($)
+{
+ my ($xmlData) = @_;
+ my $sourceDir = sourceDir();
+
+ my @files;
+
+ # The xml output of gcovr uses a Java-like package/class names for directories and files
+ my $packages = new XML::Simple->XMLin($xmlData)->{"packages"}->{"package"};
+
+ foreach my $packageName (keys %{$packages}) {
+ my $classes = $packages->{$packageName}->{"classes"}->{"class"};
+
+ # Perl's XML::Simple causes files to be here in the parsed xml data structure
+ # if there's only one child, even though they're a layer deeper in the xml tree
+ if ($classes->{"filename"} && $classes->{"lines"}) {
+ if ($classes->{"filename"} =~ /$sourceDir/) {
+ push(@files, getFileHitsAndBranches($classes));
+ }
+ }
+ else {
+ foreach my $key (keys %{$classes}) {
+ my $class = $classes->{$key};
+ if ($class->{"filename"} =~ /$sourceDir/) {
+ push(@files,getFileHitsAndBranches($class));
+ }
+ }
+ }
+ }
+ return \@files;
+}
+
+sub getFileHitsAndBranches($)
+{
+ my ($class) = @_;
+
+ my @hits;
+ my @hitLines;
+ my @branchesPossible;
+ my @branchesTaken;
+ my @branchLines;
+
+ my $lines = $class->{"lines"}->{"line"};
+ if (ref($lines) eq "ARRAY") {
+ foreach my $line (@$lines) {
+ addLineCounts($line, \@hits, \@hitLines, \@branchesPossible, \@branchesTaken, \@branchLines);
+ }
+ } else {
+ addLineCounts($lines, \@hits, \@hitLines, \@branchesPossible, \@branchesTaken, \@branchLines);
+ }
+
+ my $file = {};
+ $file->{"hits"} = \@hits;
+ $file->{"hitLines"} = \@hitLines;
+ $file->{"branchesPossible"} = \@branchesPossible;
+ $file->{"branchesTaken"} = \@branchesTaken;
+ $file->{"branchLines"} = \@branchLines;
+ $file->{"filename"} = substr($class->{"filename"}, length(sourceDir()));
+ $file->{"coverage"} = abs($class->{"line-rate"});
+ if (@branchLines) {
+ $file->{"branchCoverage"} = abs($class->{"branch-rate"});
+ } else {
+ $file->{"branchCoverage"} = 1;
+ }
+ $file->{"totalHeat"} = sum(@hits);
+ $file->{"maxHeat"} = max(@hits);
+ return $file;
+}
+
+sub addLineCounts($$$$$$)
+{
+ my ($line, $hits, $hitLines, $branchesPossible, $branchesTaken, $branchLines) = @_;
+ push(@$hits, int($line->{"hits"}));
+ push(@$hitLines, int($line->{"number"}));
+ if($line->{"branch"} eq "true") {
+
+ # Extract the numerator and denominator of the condition-coverage attribute, which looks like "75% (3/4)"
+ $line->{"condition-coverage"} =~ /\((.*)\/(.*)\)/;
+ push(@$branchesTaken, int($1));
+ push(@$branchesPossible, int($2));
+ push(@$branchLines, int($line->{"number"}));
+ }
+}
+
+sub createResultName()
+{
+ my $svnVersion = determineCurrentSVNRevision();
+ my @timeData = localtime(time);
+ return $svnVersion . "-" . join('_', @timeData);
+}
diff --git a/Tools/Scripts/import-w3c-performance-wg-tests b/Tools/Scripts/import-w3c-performance-wg-tests
index e48e26188..caddde7f7 100755
--- a/Tools/Scripts/import-w3c-performance-wg-tests
+++ b/Tools/Scripts/import-w3c-performance-wg-tests
@@ -42,7 +42,7 @@ import os
import sys
if len(sys.argv) != 3:
- print 'USAGE: %s path_to_webperf_checkout_root path_to_webkit_checkout_root'
+ print 'USAGE: %s path_to_webperf_checkout_root path_to_webkit_checkout_root' % sys.argv[0]
sys.exit(1)
source_directory = os.path.join(sys.argv[1], 'tests')
diff --git a/Tools/Scripts/import-w3c-tests b/Tools/Scripts/import-w3c-tests
new file mode 100755
index 000000000..bb72096c0
--- /dev/null
+++ b/Tools/Scripts/import-w3c-tests
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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 sys
+
+from webkitpy.w3c import test_importer
+
+
+sys.exit(test_importer.main(sys.argv[1:], sys.stdout, sys.stderr))
diff --git a/Tools/BuildSlaveSupport/chromium/remove-crash-logs b/Tools/Scripts/lint-test-expectations
index 4f999c4d1..c56eb77db 100755
--- a/Tools/BuildSlaveSupport/chromium/remove-crash-logs
+++ b/Tools/Scripts/lint-test-expectations
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (C) 2012 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
@@ -27,15 +27,11 @@
# (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
import sys
-if __name__ == '__main__':
- if sys.platform == 'linux2':
- os.system('rm -rf /tmp/.org.chromium.*')
- elif sys.platform == 'darwin':
- import Foundation
- os.system('rm -rf %s' % os.path.join(Foundation.NSTemporaryDirectory(),
- '.org.chromium.*'))
- elif 'win' in sys.platform:
- os.system('for /d %d in (%TEMP%\scoped_dir*) do rd /s /q "%d"')
+from webkitpy.common import version_check
+from webkitpy.layout_tests import lint_test_expectations
+
+
+sys.exit(lint_test_expectations.main(sys.argv[1:], sys.stdout, sys.stderr))
+
diff --git a/Tools/Scripts/new-run-webkit-httpd b/Tools/Scripts/new-run-webkit-httpd
index 9ace3e1b8..921e77971 100755
--- a/Tools/Scripts/new-run-webkit-httpd
+++ b/Tools/Scripts/new-run-webkit-httpd
@@ -61,7 +61,7 @@ def run(options):
raise 'Specifying port requires also a root.'
host = Host()
# FIXME: Make this work with other ports as well.
- port_obj = host.port_factory.get(port_name='chromium', options=options)
+ port_obj = host.port_factory.get(port_name='win', options=options)
httpd = http_server.Lighttpd(port_obj,
tempfile.gettempdir(),
port=options.port,
diff --git a/Tools/Scripts/new-run-webkit-websocketserver b/Tools/Scripts/new-run-webkit-websocketserver
index 15ed1f99e..25c9537f2 100755
--- a/Tools/Scripts/new-run-webkit-websocketserver
+++ b/Tools/Scripts/new-run-webkit-websocketserver
@@ -36,6 +36,7 @@ import tempfile
from webkitpy.common.host import Host
from webkitpy.layout_tests.servers import websocket_server
+from webkitpy.port import platform_options
def main():
@@ -71,6 +72,11 @@ def main():
option_parser.add_option('-v', '--verbose', action='store_true',
default=False,
help='Include debug-level logging.')
+
+ option_group = optparse.OptionGroup(option_parser, "Platform options")
+ option_group.add_options(platform_options())
+ option_parser.add_option_group(option_group)
+
options, args = option_parser.parse_args()
if not options.port:
@@ -97,8 +103,7 @@ def main():
kwds['pidfile'] = options.pidfile
host = Host()
- # FIXME: Make this work with other ports as well.
- port_obj = host.port_factory.get(port_name='chromium', options=options)
+ port_obj = host.port_factory.get(options.platform, options=options)
pywebsocket = websocket_server.PyWebSocket(port_obj, options.output_dir, **kwds)
log_level = logging.WARN
diff --git a/Tools/Scripts/old-run-webkit-tests b/Tools/Scripts/old-run-webkit-tests
index e4803c9c6..ed201acce 100755
--- a/Tools/Scripts/old-run-webkit-tests
+++ b/Tools/Scripts/old-run-webkit-tests
@@ -141,6 +141,7 @@ my $guardMalloc = '';
# an IPv6 environment. See https://bugs.webkit.org/show_bug.cgi?id=37104.
my $httpdPort = 8000;
my $httpdSSLPort = 8443;
+my $httpdAuxiliaryPort = 8080; # Port used by various tests in http/tests/security.
my $ignoreMetrics = 0;
my $webSocketPort = 8880;
# wss is disabled until all platforms support pyOpenSSL.
@@ -194,13 +195,12 @@ if (isWindows()) {
exit 1;
}
-# Default to --no-http for wx for now.
-$testHTTP = 0 if (isWx());
-
my $perlInterpreter = "perl";
my $expectedTag = "expected";
my $mismatchTag = "mismatch";
+my $refTag = "ref";
+my $notrefTag = "notref";
my $actualTag = "actual";
my $prettyDiffTag = "pretty-diff";
my $diffsTag = "diffs";
@@ -234,8 +234,6 @@ if (isAppleMacWebKit()) {
$platform = "qt";
} elsif (isGtk()) {
$platform = "gtk";
-} elsif (isWx()) {
- $platform = "wx";
} elsif (isWinCairo()) {
$platform = "wincairo";
} elsif (isCygwin() || isWindows()) {
@@ -293,6 +291,7 @@ Usage: $programName [options] [testdir|testpath ...]
-i|--ignore-tests Comma-separated list of directories or tests to ignore
--iterations n Number of times to run the set of tests (e.g. ABCABCABC)
--[no-]launch-safari Launch (or do not launch) Safari to display test results (default: $launchSafariDefault)
+ --[no-]show-results Same as --[no-]launch-safari
-l|--leaks Enable leaks checking
--[no-]new-test-results Generate results for new tests
--nthly n Restart DumpRenderTree every n tests (default: $testsPerDumpTool)
@@ -358,6 +357,7 @@ my $getOptionsResult = GetOptions(
'reverse' => \$reverseTests,
'root=s' => \$root,
'sample-on-timeout!' => \$runSample,
+ 'show-results!' => \$launchSafari,
'singly|1' => sub { $testsPerDumpTool = 1; },
'skipped=s' => \&validateSkippedArg,
'slowest' => \$report10Slowest,
@@ -1581,12 +1581,17 @@ sub configureAndOpenHTTPDIfNeeded()
{
return if $isHttpdOpen;
my $absTestResultsDirectory = resolveAndMakeTestResultsDirectory();
- my $listen = "127.0.0.1:$httpdPort";
my @args = (
"-c", "CustomLog \"$absTestResultsDirectory/access_log.txt\" common",
"-c", "ErrorLog \"$absTestResultsDirectory/error_log.txt\"",
- "-C", "Listen $listen"
);
+ foreach ($httpdPort, $httpdAuxiliaryPort, $httpdSSLPort) {
+ # We listen to both IPv4 and IPv6 loop-back addresses, but
+ # ignore requests to 8000 from random users on network.
+ # See <https://bugs.webkit.org/show_bug.cgi?id=37104>.
+ push @args, ("-C", "Listen 127.0.0.1:$_");
+ push @args, ("-C", "Listen [::1]:$_");
+ }
my @defaultArgs = getDefaultConfigForTestDirectory($testDirectory);
@args = (@defaultArgs, @args);
@@ -2630,15 +2635,18 @@ sub isUsedInReftest($)
my $filename = $_[0];
my @extensions = ('html','shtml','xml','xhtml','htm','php','svg','mht','pl');
my $extensionsJoined = join("|", @extensions);
- my $extensionExpression = "-$expectedTag(-$mismatchTag)?\\.(".$extensionsJoined.")\$";
-
- if ($filename =~ /$extensionExpression/) {
+ my $suffixExtensionExpression = "-($expectedTag|$refTag|$notrefTag)(-$mismatchTag)?\\.(".$extensionsJoined.")\$";
+ my $prefixExtensionExpression = "^($refTag|$notrefTag)-";
+ if ($filename =~ /$suffixExtensionExpression/ || $filename =~ /$prefixExtensionExpression/) {
return 1;
}
my $base = stripExtension($filename);
-
+
foreach my $extension (@extensions) {
- if (-f "$base-$expectedTag.$extension" || -f "$base-$expectedTag-$mismatchTag.$extension") {
+ if (-f "$base-$expectedTag.$extension" ||
+ -f "$base-$refTag.$extension" || -f "$base-$notrefTag.$extension" ||
+ -f "$base-$expectedTag-$mismatchTag.$extension" ||
+ -f "$refTag-$base.$extension" || -f "$notrefTag-$base.$extension") {
return 1;
}
}
@@ -2825,16 +2833,23 @@ sub setUpWindowsCrashLogSaving()
return;
}
- my $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{PROGRAMFILES}), "Debugging Tools for Windows (x86)", "ntsd.exe");
- unless (-f $ntsdPath) {
- $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{ProgramW6432}), "Debugging Tools for Windows (x64)", "ntsd.exe");
- unless (-f $ntsdPath) {
- $ntsdPath = File::Spec->catfile(toCygwinPath($ENV{SYSTEMROOT}), "system32", "ntsd.exe");
- unless (-f $ntsdPath) {
- print STDERR "Can't find ntsd.exe. Crash logs will not be saved.\nSee <http://trac.webkit.org/wiki/BuildingOnWindows#GettingCrashLogs>.\n";
- return;
- }
+ my @possiblePaths = (
+ File::Spec->catfile(toCygwinPath($ENV{PROGRAMFILES}), "Windows Kits", "8.0", "Debuggers", "x64", "ntsd.exe"),
+ File::Spec->catfile(toCygwinPath($ENV{PROGRAMFILES}), "Windows Kits", "8.0", "Debuggers", "x86", "ntsd.exe"),
+ File::Spec->catfile(toCygwinPath($ENV{PROGRAMFILES}), "Debugging Tools for Windows (x86)", "ntsd.exe"),
+ File::Spec->catfile(toCygwinPath($ENV{ProgramW6432}), "Debugging Tools for Windows (x64)", "ntsd.exe"),
+ File::Spec->catfile(toCygwinPath($ENV{SYSTEMROOT}), "system32", "ntsd.exe"),
+ );
+
+ my $ntsdPath = shift @possiblePaths;
+
+ while (not -f $ntsdPath) {
+ if (!@possiblePaths) {
+ print STDERR "Can't find ntsd.exe. Crash logs will not be saved.\nSee <http://trac.webkit.org/wiki/BuildingOnWindows#GettingCrashLogs>.\n";
+ return;
}
+
+ $ntsdPath = shift @possiblePaths;
}
# If we used -c (instead of -cf) we could pass the commands directly on the command line. But
diff --git a/Tools/Scripts/pdevenv b/Tools/Scripts/pdevenv
deleted file mode 100755
index 464372850..000000000
--- a/Tools/Scripts/pdevenv
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use warnings;
-
-use File::Temp qw/tempfile/;
-use FindBin;
-
-use lib $FindBin::Bin;
-use webkitdirs;
-
-my ($fh, $path) = tempfile(UNLINK => 0, SUFFIX => '.cmd') or die;
-
-chomp(my $vcBin = `cygpath -w "$FindBin::Bin/../vcbin"`);
-chomp(my $scriptsPath = `cygpath -w "$FindBin::Bin"`);
-
-my $vsToolsVar;
-if ($ENV{'VS80COMNTOOLS'}) {
- $vsToolsVar = "VS80COMNTOOLS";
-} elsif ($ENV{'VS90COMNTOOLS'}) {
- $vsToolsVar = "VS90COMNTOOLS";
-} else {
- print "*************************************************************\n";
- print "Cannot find Visual Studio tools dir.\n";
- print "Please ensure that \$VS80COMNTOOLS or \$VS90COMNTOOLS\n";
- print "is set to a valid location.\n";
- print "*************************************************************\n";
- die;
-}
-
-print $fh "\@echo off\n\n";
-print $fh "call \"\%" . $vsToolsVar . "\%\\vsvars32.bat\"\n\n";
-print $fh "set PATH=$vcBin;$scriptsPath;\%PATH\%\n\n";
-
-print $fh "IF EXIST \"\%VSINSTALLDIR\%\\Common7\\IDE\\devenv.com\" (devenv.com /useenv " . join(" ", @ARGV) . ") ELSE ";
-print $fh "VCExpress.exe /useenv " . join(" ", @ARGV) . "\n";
-
-
-close $fh;
-
-chmod 0755, $path;
-
-chomp($path = `cygpath -w -s '$path'`);
-
-exec("cmd /c \"call $path\"");
diff --git a/Tools/Scripts/prepare-ChangeLog b/Tools/Scripts/prepare-ChangeLog
index a3816e2dc..e6e7897b0 100755
--- a/Tools/Scripts/prepare-ChangeLog
+++ b/Tools/Scripts/prepare-ChangeLog
@@ -83,6 +83,8 @@ sub generateNewChangeLogs($$$$$$$$$$$);
sub getLatestChangeLogs($);
sub get_function_line_ranges($$);
sub get_function_line_ranges_for_cpp($$);
+sub delete_namespaces_from_ranges_for_cpp(\@\@);
+sub is_function_in_namespace($$);
sub get_function_line_ranges_for_java($$);
sub get_function_line_ranges_for_javascript($$);
sub get_function_line_ranges_for_perl($$);
@@ -499,7 +501,6 @@ sub generateNewChangeLogs($$$$$$$$$$$)
print CHANGE_LOG normalizeLineEndings("\n", $endl);
print CHANGE_LOG normalizeLineEndings(" Reviewed by $reviewer.\n\n", $endl);
- print CHANGE_LOG normalizeLineEndings(" Additional information of the change such as approach, rationale. Please add per-function descriptions below (OOPS!).\n\n", $endl);
if ($prefix =~ m/WebCore/ || `pwd` =~ m/WebCore/) {
if (@$addedRegressionTests) {
@@ -649,6 +650,7 @@ sub get_function_line_ranges_for_cpp($$)
my $next_word_could_be_namespace = 0;
my $potential_namespace = "";
my @namespaces;
+ my @all_namespaces;
while (<$file_handle>) {
# Handle continued multi-line comment.
@@ -812,6 +814,7 @@ sub get_function_line_ranges_for_cpp($$)
if ($potential_namespace) {
push @namespaces, $potential_namespace;
+ push @all_namespaces, $potential_namespace;
$potential_namespace = "";
$name = $namespaces[-1];
$namespace_start = $. + 1;
@@ -927,10 +930,27 @@ sub get_function_line_ranges_for_cpp($$)
warn "mismatched parentheses in $file_name\n" if $in_parentheses;
- return @ranges;
+ return delete_namespaces_from_ranges_for_cpp(@ranges, @all_namespaces);
}
+# Take in references to an array of line ranges for C functions in a given file
+# and an array of namespaces declared in that file and return an updated
+# list of line ranges with the namespaces removed.
+
+sub delete_namespaces_from_ranges_for_cpp(\@\@)
+{
+ my ($ranges, $namespaces) = @_;
+ return grep {!is_function_in_namespace($namespaces, $$_[2])} @$ranges;
+}
+
+
+sub is_function_in_namespace($$)
+{
+ my ($namespaces, $function_name) = @_;
+ return grep {$_ eq $function_name} @$namespaces;
+}
+
# Read a file and get all the line ranges of the things that look like Java
# classes, interfaces and methods.
diff --git a/Tools/Scripts/print-msvc-project-dependencies b/Tools/Scripts/print-msvc-project-dependencies
deleted file mode 100755
index dbc8402b3..000000000
--- a/Tools/Scripts/print-msvc-project-dependencies
+++ /dev/null
@@ -1,143 +0,0 @@
-#!/usr/bin/perl -w
-
-# Copyright (C) 2008 Apple 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.
-
-use strict;
-use File::Basename;
-
-sub printDependencyTree($);
-
-my $basename = basename($0);
-@ARGV or die "Usage: $basename sln1 [sln2 sln3...]";
-
-foreach my $sln (@ARGV) {
- printDependencyTree($sln);
-}
-
-exit;
-
-sub printDependencyTree($)
-{
- my ($sln) = @_;
-
- unless (-f $sln) {
- warn "Warning: Can't find $sln; skipping\n";
- return;
- }
-
- unless (open SLN, "<", $sln) {
- warn "Warning: Can't open $sln; skipping\n";
- return;
- }
-
- my %projectsByUUID = ();
- my $currentProject;
-
- my $state = "initial";
- foreach my $line (<SLN>) {
- if ($state eq "initial") {
- if ($line =~ /^Project\([^\)]+\) = "([^"]+)", "[^"]+", "([^"]+)"\r?$/) {
- my $name = $1;
- my $uuid = $2;
- if (exists $projectsByUUID{$uuid}) {
- warn "Warning: Project $name appears more than once in $sln; using first definition\n";
- next;
- }
- $currentProject = {
- name => $name,
- uuid => $uuid,
- dependencies => {},
- };
- $projectsByUUID{$uuid} = $currentProject;
-
- $state = "inProject";
- }
-
- next;
- }
-
- if ($state eq "inProject") {
- defined($currentProject) or die;
-
- if ($line =~ /^\s*ProjectSection\(ProjectDependencies\) = postProject\r?$/) {
- $state = "inDependencies";
- } elsif ($line =~ /^EndProject\r?$/) {
- $currentProject = undef;
- $state = "initial";
- }
-
- next;
- }
-
- if ($state eq "inDependencies") {
- defined($currentProject) or die;
-
- if ($line =~ /^\s*({[^}]+}) = ({[^}]+})\r?$/) {
- my $uuid1 = $1;
- my $uuid2 = $2;
- if (exists $currentProject->{dependencies}->{$uuid1}) {
- warn "Warning: UUID $uuid1 listed more than once as dependency of project ", $currentProject->{name}, "\n";
- next;
- }
-
- $uuid1 eq $uuid2 or warn "Warning: UUIDs in depedency section of project ", $currentProject->{name}, " don't match: $uuid1 $uuid2; using first UUID\n";
-
- $currentProject->{dependencies}->{$uuid1} = 1;
- } elsif ($line =~ /^\s*EndProjectSection\r?$/) {
- $state = "inProject";
- }
-
- next;
- }
- }
-
- close SLN or warn "Warning: Can't close $sln\n";
-
- my %projectsNotDependedUpon = %projectsByUUID;
- CANDIDATE: foreach my $candidateUUID (keys %projectsByUUID) {
- foreach my $projectUUID (keys %projectsByUUID) {
- next if $candidateUUID eq $projectUUID;
- foreach my $dependencyUUID (keys %{$projectsByUUID{$projectUUID}->{dependencies}}) {
- if ($candidateUUID eq $dependencyUUID) {
- delete $projectsNotDependedUpon{$candidateUUID};
- next CANDIDATE;
- }
- }
- }
- }
-
- foreach my $project (values %projectsNotDependedUpon) {
- printProjectAndDependencies($project, 0, \%projectsByUUID);
- }
-}
-
-sub printProjectAndDependencies
-{
- my ($project, $indentLevel, $projectsByUUID) = @_;
-
- print " " x $indentLevel, $project->{name}, "\n";
- foreach my $dependencyUUID (keys %{$project->{dependencies}}) {
- printProjectAndDependencies($projectsByUUID->{$dependencyUUID}, $indentLevel + 1, $projectsByUUID);
- }
-}
diff --git a/Tools/Scripts/print-vse-failure-logs b/Tools/Scripts/print-vse-failure-logs
deleted file mode 100755
index 7580465dd..000000000
--- a/Tools/Scripts/print-vse-failure-logs
+++ /dev/null
@@ -1,113 +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.
-#
-# This is a very simple script designed to crawl the build directory
-# for visual studio express build logs and print them to stdout.
-
-from __future__ import with_statement
-
-import codecs
-import os
-import re
-
-from webkitpy.common.checkout import scm
-from webkitpy.common.system.executive import Executive
-from webkitpy.thirdparty import BeautifulSoup
-
-
-class PrintVisualStudioExpressLogs(object):
- def __init__(self):
- self._executive = Executive()
-
- def _find_buildlogs(self, build_directory):
- build_log_paths = []
- for dirpath, dirnames, filenames in os.walk(build_directory):
- for file_name in filenames:
- if file_name == "BuildLog.htm":
- file_path = os.path.join(dirpath, file_name)
- build_log_paths.append(file_path)
- return build_log_paths
-
- def _build_order(self):
- """Returns a list of project names in the order in which they are built."""
- script_path = os.path.join(self._scripts_directory(), "print-msvc-project-dependencies")
- sln_path = os.path.join(scm.find_checkout_root(), "WebKit", "win", "WebKit.vcproj", "WebKit.sln")
- lines = self._executive.run_command([script_path, sln_path]).splitlines()
- order = [line.strip() for line in lines if line.find("Folder") == -1]
- order.reverse()
- return order
-
- def _sort_buildlogs(self, log_paths):
- build_order = self._build_order()
- def sort_key(log_path):
- project_name = os.path.basename(os.path.dirname(os.path.dirname(log_path)))
- try:
- index = build_order.index(project_name)
- except ValueError:
- # If the project isn't in the list, sort it after all items that
- # are in the list.
- index = len(build_order)
- # Sort first by build order, then by project name
- return (index, project_name)
- return sorted(log_paths, key=sort_key)
-
- def _obj_directory(self):
- build_directory_script_path = os.path.join(self._scripts_directory(), "webkit-build-directory")
- # FIXME: ports/webkit.py should provide the build directory in a nice API.
- # NOTE: The windows VSE build does not seem to use different directories
- # for Debug and Release.
- build_directory = self._executive.run_command([build_directory_script_path, "--top-level"]).rstrip()
- return os.path.join(build_directory, "obj")
-
- def _scripts_directory(self):
- return os.path.dirname(__file__)
-
- def _relevant_text(self, log):
- soup = BeautifulSoup.BeautifulSoup(log)
- # The Output Window table is where the useful output starts in the build log.
- output_window_table = soup.find(text=re.compile("Output Window")).findParent("table")
- result = []
- for table in [output_window_table] + output_window_table.findNextSiblings("table"):
- result.extend([text.replace("&nbsp;", "") for text in table.findAll(text=True)])
- result.append("\n")
- return "".join(result)
-
- def main(self):
- build_log_paths = self._sort_buildlogs(self._find_buildlogs(self._obj_directory()))
-
- print "Found %s Visual Studio Express Build Logs:\n%s" % (len(build_log_paths), "\n".join(build_log_paths))
-
- for build_log_path in build_log_paths:
- print "%s:\n" % build_log_path
- with codecs.open(build_log_path, "r", "utf-16") as build_log:
- print self._relevant_text(build_log)
-
-
-if __name__ == '__main__':
- PrintVisualStudioExpressLogs().main()
diff --git a/Tools/Scripts/run-api-tests b/Tools/Scripts/run-api-tests
index ca71ac541..ca548fb0a 100755
--- a/Tools/Scripts/run-api-tests
+++ b/Tools/Scripts/run-api-tests
@@ -52,6 +52,7 @@ my $showHelp = 0;
my $verbose = 0;
my $dumpTests = 0;
my $build = 1;
+my $root;
my $buildDefault = $build ? "build" : "do not build";
my @testsFailed;
my @testsTimedOut;
@@ -63,14 +64,15 @@ Usage: $programName [options] [suite or test prefixes]
-v|--verbose Verbose output
-d|--dump-tests Dump the names of testcases without running them
--[no-]build Build (or do not build) unit tests prior to running (default: $buildDefault)
- --chromium Run the Chromium port on Mac/Win/Linux
+ --root= Path to the pre-built root containing TestWebKitAPI
EOF
GetOptions(
'help' => \$showHelp,
'verbose|v' => \$verbose,
'dump|d' => \$dumpTests,
- 'build!' => \$build
+ 'build!' => \$build,
+ 'root=s' => \$root
);
if ($showHelp) {
@@ -80,19 +82,9 @@ if ($showHelp) {
setConfiguration();
-# When running TestWebKitAPI for Chromium on Android, defer to the test runner in
-# Chromium as we can't execute the binary locally.
-if (isChromiumAndroid()) {
- my @runTestCommand = ('build/android/run_tests.py', '--verbose', '--webkit', '--exit_code', '--out-directory', sourceDir() . '/out', '-s', 'TestWebKitAPI');
- if (configuration() eq "Release") {
- push @runTestCommand, '--release';
- }
-
- chdir(sourceDir() . '/Source/WebKit/chromium') or die $!;
- exit exitStatus(system(@runTestCommand));
-}
+setConfigurationProductDir(Cwd::abs_path($root)) if (defined($root));
-buildTestTool() if $build;
+buildTestTool() if $build && !defined($root);
setPathForRunningWebKitApp(\%ENV);
my @testsToRun = listAllTests();
@@ -107,7 +99,7 @@ exit runTestsBySuite(@testsToRun, $verbose);
sub isSupportedPlatform()
{
- return isAppleMacWebKit() || isAppleWinWebKit() || isChromium();
+ return isAppleMacWebKit() || isAppleWinWebKit();
}
sub dumpTestsBySuite(\@)
@@ -273,6 +265,8 @@ sub listAllTests()
if ($line =~ m/\.$/) {
$suite = $line; # "SuiteName."
} else {
+ # Disabling WebKit2 API test on Windows since we will be disabling WebKit2 on Windows.
+ next if (isAppleWinWebKit() && $suite =~ m/WebKit2*/);
$line =~ s/^\s*//; # "TestName"
push @tests, $suite . $line; # "SuiteName.TestName"
}
diff --git a/Tools/Scripts/run-bindings-tests b/Tools/Scripts/run-bindings-tests
index a0785e405..a516d11ac 100755
--- a/Tools/Scripts/run-bindings-tests
+++ b/Tools/Scripts/run-bindings-tests
@@ -43,7 +43,6 @@ def main(argv):
generators = [
'JS',
- 'V8',
'ObjC',
'GObject',
'CPP'
diff --git a/Tools/Scripts/run-chromium-webkit-unit-tests b/Tools/Scripts/run-chromium-webkit-unit-tests
deleted file mode 100755
index 114f77af7..000000000
--- a/Tools/Scripts/run-chromium-webkit-unit-tests
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/usr/bin/perl -w
-# 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.
-
-use strict;
-use File::Spec;
-use FindBin;
-use lib $FindBin::Bin;
-use webkitdirs;
-use VCSUtils;
-
-setConfiguration();
-
-# Defer to Android's test runners for running webkit_unit_tests on a device.
-if (checkForArgumentAndRemoveFromARGV('--platform=chromium-android')) {
- my @runTestCommand = ('build/android/run_tests.py', '--verbose', '--webkit', '--exit_code', '--out-directory', sourceDir() . '/out', '-s', 'webkit_unit_tests');
- if (configuration() eq "Release") {
- push @runTestCommand, '--release';
- }
-
- chdir(sourceDir() . '/Source/WebKit/chromium') or die $!;
- exit exitStatus(system(@runTestCommand));
-}
-
-push(@ARGV, "--chromium");
-my $pathToBinary = productDir() . "/webkit_unit_tests";
-exit exitStatus(system ($pathToBinary, @ARGV));
diff --git a/Tools/Scripts/run-efl-tests b/Tools/Scripts/run-efl-tests
index 52d119a12..cb6df5b7b 100755
--- a/Tools/Scripts/run-efl-tests
+++ b/Tools/Scripts/run-efl-tests
@@ -48,6 +48,9 @@ if ($xvfb_pid == 0) {
} else {
setConfiguration();
+ # Manually add this for jhbuildWrapperPrefixIfNeeded().
+ push(@ARGV, "--efl");
+
my $returnCode = exitStatus(generateBuildSystemFromCMakeProject("Efl", undef, cmakeBasedPortArguments()));
exit($returnCode) if $returnCode;
diff --git a/Tools/Scripts/run-gtk-tests b/Tools/Scripts/run-gtk-tests
index b24cb24e7..883ed56e0 100755
--- a/Tools/Scripts/run-gtk-tests
+++ b/Tools/Scripts/run-gtk-tests
@@ -62,26 +62,32 @@ class TestRunner:
SKIPPED = [
SkippedTest("unittests/testdownload", "/webkit/download/not-found", "Test fails in GTK Linux 64-bit Release bot", 82329),
- SkippedTest("unittests/testwebview", "/webkit/webview/icon-uri", "Test times out in GTK Linux 64-bit Release bot", 82328),
- SkippedTest("unittests/testwebresource", "/webkit/webresource/sub_resource_loading", "Test fails in GTK Linux 64-bit Release bot", 82330),
SkippedTest("unittests/testwebinspector", "/webkit/webinspector/close-and-inspect", "Test is flaky in GTK Linux 32-bit Release bot", 82869),
- SkippedTest("WebKit2APITests/TestWebKitWebView", "/webkit2/WebKitWebView/mouse-target", "Test is flaky in GTK Linux 32-bit Release bot", 82866),
+ SkippedTest("unittests/testwebresource", "/webkit/webresource/loading", "Test fails", 104689),
+ SkippedTest("unittests/testwebresource", "/webkit/webresource/sub_resource_loading", "Test fails in GTK Linux 64-bit Release bot", 82330),
+ SkippedTest("unittests/testwebview", "/webkit/webview/icon-uri", "Test times out in GTK Linux 64-bit Release bot", 82328),
+ SkippedTest("unittests/testatk", "/webkit/atk/getTextInParagraphAndBodyModerate", "Test fails", 105538),
SkippedTest("WebKit2APITests/TestResources", "/webkit2/WebKitWebView/resources", "Test is flaky in GTK Linux 32-bit Release bot", 82868),
- SkippedTest("WebKit2APITests/TestWebKitFindController", "/webkit2/WebKitFindController/hide", "Test always fails in Xvfb", 89810),
SkippedTest("WebKit2APITests/TestWebKitAccessibility", "/webkit2/WebKitAccessibility/atspi-basic-hierarchy", "Test fails", 100408),
- SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.WKConnection", "Tests fail and time out out", 84959),
- SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.RestoreSessionStateContainingFormData", "Session State is not implemented in GTK+ port", 84960),
- SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.SpacebarScrolling", "Test fails", 84961),
+ SkippedTest("WebKit2APITests/TestWebKitWebView", SkippedTest.ENTIRE_SUITE, "Test times out after r150890", 117689),
+ SkippedTest("WebKit2APITests/TestContextMenu", SkippedTest.ENTIRE_SUITE, "Test times out after r150890", 117689),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.CanHandleRequest", "Test fails", 88453),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.MouseMoveAfterCrash", "Test is flaky", 85066),
SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.NewFirstVisuallyNonEmptyLayoutForImages", "Test is flaky", 85066),
SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.NewFirstVisuallyNonEmptyLayoutFrames", "Test fails", 85037),
- SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.MouseMoveAfterCrash", "Test is flaky", 85066),
- SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.CanHandleRequest", "Test fails", 88453),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.RestoreSessionStateContainingFormData", "Session State is not implemented in GTK+ port", 84960),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.SpacebarScrolling", "Test fails", 84961),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.WKConnection", "Tests fail and time out out", 84959),
SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.WKPageGetScaleFactorNotZero", "Test fails and times out", 88455),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.ForceRepaint", "Test times out", 105532),
+ SkippedTest("TestWebKitAPI/TestWebKit2", "WebKit2.ReloadPageAfterCrash", "Test flakily times out", 110129),
]
def __init__(self, options, tests=[]):
self._options = options
- self._programs_path = common.build_path("Programs")
+ self._build_type = "Debug" if self._options.debug else "Release"
+
+ self._programs_path = common.build_path_for_build_types((self._build_type,), "Programs")
self._tests = self._get_tests(tests)
self._skipped_tests = TestRunner.SKIPPED
if not sys.stdout.isatty():
@@ -154,7 +160,7 @@ class TestRunner:
self._test_env["WEBKIT_INSPECTOR_PATH"] = os.path.abspath(os.path.join(self._programs_path, 'resources', 'inspector'))
self._test_env['GSETTINGS_BACKEND'] = 'memory'
self._test_env["TEST_WEBKIT_API_WEBKIT2_RESOURCES_PATH"] = common.top_level_path("Tools", "TestWebKitAPI", "Tests", "WebKit2")
- self._test_env["TEST_WEBKIT_API_WEBKIT2_INJECTED_BUNDLE_PATH"] = common.build_path("Libraries")
+ self._test_env["TEST_WEBKIT_API_WEBKIT2_INJECTED_BUNDLE_PATH"] = common.build_path_for_build_types((self._build_type,), "Libraries")
self._test_env["WEBKIT_EXEC_PATH"] = self._programs_path
try:
@@ -333,19 +339,21 @@ class TestRunner:
if failed_tests:
names = [test.replace(self._programs_path, '', 1) for test in failed_tests]
- sys.stdout.write("Tests failed: %s\n" % ", ".join(names))
+ sys.stdout.write("Tests failed (%d): %s\n" % (len(names), ", ".join(names)))
sys.stdout.flush()
if timed_out_tests:
names = [test.replace(self._programs_path, '', 1) for test in timed_out_tests]
- sys.stdout.write("Tests that timed out: %s\n" % ", ".join(names))
+ sys.stdout.write("Tests that timed out (%d): %s\n" % (len(names), ", ".join(names)))
sys.stdout.flush()
if self._skipped_tests and self._options.skipped_action == 'skip':
- sys.stdout.write("Tests skipped:\n%s\n" % "\n".join([str(skipped) for skipped in self._skipped_tests]))
+ sys.stdout.write("Tests skipped (%d):\n%s\n" %
+ (len(self._skipped_tests),
+ "\n".join([str(skipped) for skipped in self._skipped_tests])))
sys.stdout.flush()
- return len(failed_tests)
+ return len(failed_tests) + len(timed_out_tests)
if __name__ == "__main__":
if not jhbuildutils.enter_jhbuild_environment_if_available("gtk"):
diff --git a/Tools/Scripts/run-javascriptcore-tests b/Tools/Scripts/run-javascriptcore-tests
index 9cb4c483b..8b79f2514 100755
--- a/Tools/Scripts/run-javascriptcore-tests
+++ b/Tools/Scripts/run-javascriptcore-tests
@@ -140,11 +140,16 @@ chdir "tests/mozilla" or die "Failed to switch directory to 'tests/mozilla'\n";
printf "Running: jsDriver.pl -e squirrelfish -s %s -f actual.html %s\n", jscPath($productDir), join(" ", @jsArgs);
my @jsDriverCmd = ("perl", "jsDriver.pl", "-e", "squirrelfish", "-s", jscPath($productDir), "-f", "actual.html", @jsArgs);
if (isGtk() || isEfl()) {
- my $jhbuildPrefix = sourceDir() . "/Tools/";
- $jhbuildPrefix .= isEfl() ? "efl" : "";
- $jhbuildPrefix .= isGtk() ? "gtk" : "";
- $jhbuildPrefix .= "/run-with-jhbuild";
- unshift(@jsDriverCmd, $jhbuildPrefix);
+ my @jhbuildPrefix = sourceDir() . "/Tools/jhbuild/jhbuild-wrapper";
+
+ if (isEfl()) {
+ push(@jhbuildPrefix, '--efl');
+ } elsif (isGtk()) {
+ push(@jhbuildPrefix, '--gtk');
+ }
+ push(@jhbuildPrefix, 'run');
+
+ unshift(@jsDriverCmd, @jhbuildPrefix);
}
my $result = system(@jsDriverCmd);
exit exitStatus($result) if $result;
diff --git a/Tools/Scripts/run-jsc b/Tools/Scripts/run-jsc
index e5341c1d3..82943c0a1 100755
--- a/Tools/Scripts/run-jsc
+++ b/Tools/Scripts/run-jsc
@@ -42,7 +42,6 @@ my $count = 1;
my $verbose = 0;
GetOptions("count|c=i" => \$count,
"verbose|v" => \$verbose);
-die "$usage\n" if (@ARGV < 1);
my $jsc = jscProductDir() . "/jsc @ARGV";
$jsc .= " 2> " . File::Spec->devnull() unless $verbose;
diff --git a/Tools/Scripts/run-launcher b/Tools/Scripts/run-launcher
index eca07f6f3..66886fe0b 100755
--- a/Tools/Scripts/run-launcher
+++ b/Tools/Scripts/run-launcher
@@ -69,25 +69,18 @@ if (isQt()) {
} else {
unshift(@ARGV, catdir($launcherPath, "Programs", "GtkLauncher"));
}
- $launcherPath = catdir(sourceDir(), "Tools", "gtk", "run-with-jhbuild");
+ $launcherPath = catdir(sourceDir(), "Tools", "jhbuild", "jhbuild-wrapper");
+ unshift(@ARGV, ("--gtk", "run"));
}
-
+
if (isEfl()) {
if (isWK2()) {
unshift(@ARGV, catdir($launcherPath, "bin", "MiniBrowser"));
} else {
unshift(@ARGV, catdir($launcherPath, "bin", "EWebLauncher"));
}
- $launcherPath = catdir(sourceDir(), "Tools", "efl", "run-with-jhbuild");
- }
-
- if (isWx()) {
- if (isDarwin()) {
- $launcherPath = catdir($launcherPath, 'wxBrowser.app', 'Contents', 'MacOS', 'wxBrowser');
- } else {
- $ENV{LD_LIBRARY_PATH} = $ENV{LD_LIBRARY_PATH} ? "$productDir:$ENV{LD_LIBRARY_PATH}" : $productDir;
- $launcherPath = catdir($launcherPath, 'wxBrowser');
- }
+ $launcherPath = catdir(sourceDir(), "Tools", "jhbuild", "jhbuild-wrapper");
+ unshift(@ARGV, ("--efl", "run"));
}
print "Starting webkit launcher.\n";
diff --git a/Tools/Scripts/run-qtwebkit-tests b/Tools/Scripts/run-qtwebkit-tests
index ded87c5fa..ea8d4093c 100755
--- a/Tools/Scripts/run-qtwebkit-tests
+++ b/Tools/Scripts/run-qtwebkit-tests
@@ -44,7 +44,7 @@ class Options(Log):
def __init__(self, args):
Log.__init__(self, "Options")
log = self._log
- opt = OptionParser("%prog [options] PathToSearch.\nTry -h or --help.")
+ opt = OptionParser("%prog [options] [PathToSearch].\nTry -h or --help.")
opt.add_option("-j", "--parallel-level", action="store", type="int",
dest="parallel_level", default=None,
help="Number of parallel processes executing the Qt's tests. Default: cpu count.")
@@ -69,6 +69,12 @@ class Options(Log):
opt.add_option("-t", "--timeout", action="store", type="int",
dest="timeout", default=0,
help="Timeout in seconds for each testsuite. Zero value means that there is not timeout. Default: %default.")
+ opt.add_option("--release", action="store_true", dest="release", default=True,
+ help="Run API tests in WebKitBuild/Release/... directory. It is ignored if PathToSearch is passed.")
+ opt.add_option("--debug", action="store_false", dest="release",
+ help="Run API tests in WebKitBuild/Debug/... directory. It is ignored if PathToSearch is passed.")
+ opt.add_option("-2", "--webkit2", action="store_true", dest="webkit2", default=False,
+ help="Run WebKit2 API tests. Default: Run WebKit1 API tests. It is ignored if PathToSearch is passed.")
self._o, self._a = opt.parse_args(args)
verbose = self._o.verbose
@@ -83,18 +89,34 @@ class Options(Log):
else:
logging.basicConfig(level=logging.INFO,)
log.warn("Bad verbose level, switching to default.")
+
+ if self._o.release:
+ configuration = "Release"
+ else:
+ configuration = "Debug"
+
+ if self._o.webkit2:
+ test_directory = "WebKit2/UIProcess/API/qt/tests/"
+ else:
+ test_directory = "WebKit/qt/tests/"
+
try:
- if not os.path.exists(self._a[0]):
+ if len(self._a) == 0:
+ self._o.path = "WebKitBuild/%s/Source/%s" % (configuration, test_directory)
+ else:
+ if len(self._a) > 1:
+ raise IndexError("Only one directory should be provided.")
+ self._o.path = self._a[0]
+
+ if not os.path.exists(self._o.path):
raise Exception("Given path doesn't exist.")
- if len(self._a) > 1:
- raise IndexError("Only one directory could be provided.")
- self._o.path = self._a[0]
except IndexError:
log.error("Bad usage. Please try -h or --help.")
sys.exit(1)
except Exception:
- log.error("Path '%s' doesn't exist", self._a[0])
+ log.error("Path '%s' doesn't exist", self._o.path)
sys.exit(2)
+
if self._o.developer:
if not self._o.parallel_level is None:
log.warn("Developer mode sets parallel-level option to one.")
diff --git a/Tools/Scripts/run-sunspider b/Tools/Scripts/run-sunspider
index 1b60a7532..4aec3010d 100755
--- a/Tools/Scripts/run-sunspider
+++ b/Tools/Scripts/run-sunspider
@@ -38,9 +38,6 @@ my $configuration = configuration();
my $root;
my $testRuns = 10; # This number may be different from what sunspider defaults to (that's OK)
-my $runShark = 0;
-my $runShark20 = 0;
-my $runSharkCache = 0;
my $runInstruments = 0;
my $suite = "";
my $ubench = 0;
@@ -59,9 +56,6 @@ Usage: $programName [options] [options to pass to build system]
--root Path to root tools build
--runs Number of times to run tests (default: $testRuns)
--tests Only run tests matching provided pattern
- --shark Sample with the Mac OS X "Shark" performance testing tool (implies --runs=1)
- --shark20 Like --shark, but with a 20 microsecond sampling interval
- --shark-cache Like --shark, but performs a L2 cache-miss sample instead of time sample
--instruments Sample with the Mac OS X "Instruments" tool (Time Profile) (implies --runs=1)
--suite Select a specific benchmark suite. The default is sunspider-0.9.1
--ubench Use microbenchmark suite instead of regular tests. Same as --suite=ubench
@@ -73,9 +67,6 @@ EOF
GetOptions('root=s' => sub { my ($x, $value) = @_; $root = $value; setConfigurationProductDir(Cwd::abs_path($root)); },
'runs=i' => \$testRuns,
'set-baseline' => \$setBaseline,
- 'shark' => \$runShark,
- 'shark20' => \$runShark20,
- 'shark-cache' => \$runSharkCache,
'instruments' => \$runInstruments,
'suite=s' => \$suite,
'ubench' => \$ubench,
@@ -125,9 +116,6 @@ setupEnvironmentForExecution($productDir);
my @args = ("--shell", jscPath($productDir), "--runs", $testRuns);
# This code could be removed if we chose to pass extra args to sunspider instead of Xcode
push @args, "--set-baseline" if $setBaseline;
-push @args, "--shark" if $runShark;
-push @args, "--shark20" if $runShark20;
-push @args, "--shark-cache" if $runSharkCache;
push @args, "--instruments" if $runInstruments;
push @args, "--suite=${suite}" if $suite;
push @args, "--ubench" if $ubench;
diff --git a/Tools/Scripts/run-webkit-httpd b/Tools/Scripts/run-webkit-httpd
index 8fb1887d4..af4d4f375 100755
--- a/Tools/Scripts/run-webkit-httpd
+++ b/Tools/Scripts/run-webkit-httpd
@@ -89,7 +89,7 @@ my @args = (
"-X",
# Disable Keep-Alive support. Makes testing in multiple browsers easier (no need to wait
# for another browser's connection to expire).
- "-c", "KeepAlive 0"
+ "-c", "KeepAlive off"
);
my @defaultArgs = getDefaultConfigForTestDirectory($testDirectory);
diff --git a/Tools/Scripts/run-webkit-tests b/Tools/Scripts/run-webkit-tests
index 4bb8f3944..fd507e49a 100755
--- a/Tools/Scripts/run-webkit-tests
+++ b/Tools/Scripts/run-webkit-tests
@@ -57,28 +57,12 @@ sub runningOnBuildBot()
sub useNewRunWebKitTests()
{
- # NRWT Windows support still needs work: https://bugs.webkit.org/show_bug.cgi?id=38756
- return 0 if (isWindows() or isCygwin()) and !isChromium();
# NRWT does not support qt-arm: https://bugs.webkit.org/show_bug.cgi?id=64086
return 0 if isQt() and isARM();
# All other platforms should use NRWT by default.
return 1;
}
-sub platformIsReadyForParallelTesting()
-{
- # NRWT is able to run the tests in parallel, ORWT was not.
- # When we run the tests in parallel, tests which (incorrectly)
- # interact with each other can start failing.
- # To reduce the failure burden during the transition individual
- # platforms can opt-in to parallel test execution by default.
-
- # We believe all platforms are ready for default parallel testing except
- # Qt, as Qt runs more than one build-slave per-server.
- # Ossy has asked me to blacklist Qt for now.
- return !isQt();
-}
-
my $script = "perl";
my $harnessName = "old-run-webkit-tests";
@@ -86,12 +70,6 @@ if (useNewRunWebKitTests()) {
$script = "python";
$harnessName = "new-run-webkit-tests";
- if (!grep(/--child-processes/, @ARGV) and !platformIsReadyForParallelTesting()) {
- push(@ARGV, "--child-processes=1");
- print "Running new-run-webkit-tests with one child process.\n";
- print "For more parallelism, run new-run-webkit-tests directly.\n";
- }
-
if (runningOnBuildBot()) {
push(@ARGV, "--debug-rwt-logging");
}
@@ -112,10 +90,6 @@ if (isQt()) {
push(@ARGV, "--gtk");
} elsif (isEfl()) {
push(@ARGV, "--efl");
-} elsif (isChromiumAndroid()) {
- push(@ARGV, "--chromium-android");
-} elsif (isChromium()) {
- push(@ARGV, "--chromium");
} elsif (isWinCairo()) {
push(@ARGV, "--wincairo");
}
diff --git a/Tools/Scripts/sampstat b/Tools/Scripts/sampstat
new file mode 100755
index 000000000..72ba2b70d
--- /dev/null
+++ b/Tools/Scripts/sampstat
@@ -0,0 +1,98 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2007, 2012 Apple 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 COMPUTER, 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 COMPUTER, 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.
+
+import math
+import sys
+import re
+import fileinput
+from optparse import OptionParser
+
+usage = "usage: %prog [options] [FILES]\n Compute the mean and 95% confidence interval of a sample set.\n Standard input or files must contain two or more decimal numbers, one per line."
+parser = OptionParser(usage=usage)
+parser.add_option("-u", "--unit", dest="unit", default="",
+ help="assume values are in units of UNIT", metavar="UNIT")
+parser.add_option("-v", "--verbose",
+ action="store_true", dest="verbose", default=False,
+ help="print all values (with units)")
+(options, files) = parser.parse_args()
+
+def sum(items):
+ return reduce(lambda x,y: x+y, items)
+
+def arithmeticMean(items):
+ return sum(items) / len(items)
+
+def standardDeviation(mean, items):
+ deltaSquares = [(item - mean) ** 2 for item in items]
+ return math.sqrt(sum(deltaSquares) / (len(items) - 1))
+
+def standardError(stdDev, items):
+ return stdDev / math.sqrt(len(items))
+
+# t-distribution for 2-sided 95% confidence intervals
+tDistribution = [float('NaN'), float('NaN'), 12.71, 4.30, 3.18, 2.78, 2.57, 2.45, 2.36, 2.31, 2.26, 2.23, 2.20, 2.18, 2.16, 2.14, 2.13, 2.12, 2.11, 2.10, 2.09, 2.09, 2.08, 2.07, 2.07, 2.06, 2.06, 2.06, 2.05, 2.05, 2.05, 2.04, 2.04, 2.04, 2.03, 2.03, 2.03, 2.03, 2.03, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.96]
+tMax = len(tDistribution)
+tLimit = 1.96
+
+def tDist(n):
+ if n > tMax:
+ return tLimit
+ return tDistribution[n]
+
+def twoSidedConfidenceInterval(items):
+ mean = arithmeticMean(items)
+ stdDev = standardDeviation(mean, items)
+ stdErr = standardError(stdDev, items)
+ return tDist(len(items)) * stdErr
+
+results = []
+
+decimalNumberPattern = re.compile(r"\d+\.?\d*")
+for line in fileinput.input(files):
+ match = re.search(decimalNumberPattern, line)
+ if match:
+ results.append(float(match.group(0)))
+
+if len(results) == 0:
+ parser.print_help()
+ quit()
+
+
+mean = arithmeticMean(results)
+confidenceInterval = twoSidedConfidenceInterval(results)
+confidencePercent = 100 * confidenceInterval / mean
+
+if options.verbose:
+ length = 7
+ for item in results:
+ line = " %.2f %s" % (item, options.unit)
+ print line
+ length = len(line) if len(line) > length else length
+
+ print "-" * length
+
+prefix = "Mean: " if options.verbose else ""
+print "%s%.2f %s +/- %.2f %s (%.1f%%)" % (prefix, mean, options.unit, confidenceInterval, options.unit, confidencePercent)
+
diff --git a/Tools/Scripts/svn-create-patch b/Tools/Scripts/svn-create-patch
index b830f9bd3..06e016893 100755
--- a/Tools/Scripts/svn-create-patch
+++ b/Tools/Scripts/svn-create-patch
@@ -101,16 +101,9 @@ for my $path (keys %paths) {
my $svnRoot = determineSVNRoot();
my $prefix = chdirReturningRelativePath($svnRoot);
-my $patchSize = 0;
-
-# Generate the diffs, in a order chosen for easy reviewing.
+# Generate the diffs, in an order chosen for ease of reviewing.
for my $path (sort patchpathcmp values %diffFiles) {
- $patchSize += generateDiff($path, $prefix);
-}
-
-if ($patchSize > 20480) {
- print STDERR "WARNING: Patch's size is " . int($patchSize/1024) . " kbytes.\n";
- print STDERR "Patches 20k or smaller are more likely to be reviewed. Larger patches may sit unreviewed for a long time.\n";
+ generateDiff($path, $prefix);
}
exit 0;
@@ -245,7 +238,6 @@ sub generateDiff($$)
print "\n" if ($patch && $patch =~ m/\n\S+$/m);
outputBinaryContent($file);
}
- return length($patch);
}
sub generateFileList($\%)
diff --git a/Tools/Scripts/test-webkit-scripts b/Tools/Scripts/test-webkit-scripts
index 781e8ce0f..baba0598f 100755
--- a/Tools/Scripts/test-webkit-scripts
+++ b/Tools/Scripts/test-webkit-scripts
@@ -28,7 +28,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-"""Run unit tests of WebKit's Perl and Python scripts."""
+"""Run unit tests of WebKit's Perl, Python, and Ruby scripts."""
# The docstring above is passed as the "description" to the OptionParser
# used in this script's __main__ block.
@@ -72,11 +72,12 @@ class ScriptsTester(object):
self.run_test_script('Perl scripts', self.script_path('test-webkitperl'))
self.run_test_script('Python scripts', self.script_path('test-webkitpy'),
['--all'] if options.all else None)
+ self.run_test_script('Ruby scripts', self.script_path('test-webkitruby'))
# FIXME: Display a cumulative indication of success or failure.
# In addition, call sys.exit() with 0 or 1 depending on that
# cumulative success or failure.
- print('Note: Perl and Python results appear separately above.')
+ print('Note: Perl, Python, and Ruby results appear separately above.')
if __name__ == '__main__':
diff --git a/Tools/Scripts/test-webkitruby b/Tools/Scripts/test-webkitruby
new file mode 100755
index 000000000..cd04a0ab5
--- /dev/null
+++ b/Tools/Scripts/test-webkitruby
@@ -0,0 +1,34 @@
+#!/usr/bin/env ruby
+
+# Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+
+$exit_code = 0;
+
+Dir.chdir File.dirname(__FILE__)
+Dir.glob("./webkitruby/*/*.rb").each do |test|
+ puts %x{ '#{test}' }
+ $exit_code = 1 if $?.exitstatus != 0
+end
+
+exit $exit_code
diff --git a/Tools/Scripts/update-sources-list.py b/Tools/Scripts/update-sources-list.py
deleted file mode 100755
index 2a4a5eff0..000000000
--- a/Tools/Scripts/update-sources-list.py
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2007 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# Make sure any port-independent files added to the Bakefile are
-# added to GTK, QT, etc. so that file updates can happen in one place.
-
-import os, sys
-from xml.dom import minidom
-
-scriptDir = os.path.abspath(sys.path[0])
-wkroot = os.path.abspath(os.path.join(scriptDir, "../.."))
-
-def getWebCoreFilesDict():
- """
- This method parses the WebCoreSources.bkl file, which has a list of all sources not specific
- to any port, and returns the result as a dictionary with items of the form
- (groupName, groupFiles).
- """
- sources = {}
- sources_prefix = "WEBCORE_"
- filepath = os.path.join(wkroot, "Source", "WebCore", "WebCoreSources.bkl")
- assert(os.path.exists(filepath))
-
- doc = minidom.parse(filepath)
- for sourceGroup in doc.getElementsByTagName("set"):
- groupName = ""
- if sourceGroup.attributes.has_key("var"):
- groupName = sourceGroup.attributes["var"].value
- groupName = groupName.replace(sources_prefix, "")
-
- sourcesList = []
- for node in sourceGroup.childNodes:
- if node.nodeType == node.TEXT_NODE:
- sourcesText = node.nodeValue.strip()
- sourcesList = sourcesText.split("\n")
-
- assert(groupName != "")
- assert(sourcesList != [])
-
- sources[groupName] = sourcesList
-
- return sources
-
-def generateWebCoreSourcesGTKAndQT(sources):
- """
- Convert the dictionary obtained from getWebCoreFilesDict() into a Unix makefile syntax,
- which IIUC is suitable for both GTK and QT build systems. To take advantage of this,
- QT and GTK would have to include the file "WebCore/sources.inc" into their makefiles.
- """
- makefileString = ""
-
- for key in sources.keys():
- makefileString += key + "+="
- for source in sources[key]:
- makefileString += " \\\n\t\t" + source.strip()
-
- makefileString += "\n\n"
-
- makefileString += "BASE_SOURCES +="
- for key in sources.keys():
- makefileString += " \\\n\t\t" + key
-
- outfile = os.path.join(wkroot, "Source", "WebCore", "sources.inc")
- sourcefile = open(outfile, "w")
- sourcefile.write(makefileString)
- sourcefile.close()
-
-sources = getWebCoreFilesDict()
-generateWebCoreSourcesGTKAndQT(sources)
-
-# Coming soon - MSVC and hopefully XCode support!
diff --git a/Tools/Scripts/update-webkit b/Tools/Scripts/update-webkit
index 6ba8044f4..485eb748b 100755
--- a/Tools/Scripts/update-webkit
+++ b/Tools/Scripts/update-webkit
@@ -45,12 +45,7 @@ sub runGitUpdate();
# Handle options
my $quiet = '';
my $showHelp;
-my $useGYP = 0;
-my $useMake = 0;
-my $useNinja = 0;
-determineIsChromium();
-determineIsChromiumAndroid();
determineIsQt();
determineIsWinCairo();
@@ -59,33 +54,18 @@ chdirWebKit();
my $getOptionsResult = GetOptions(
'h|help' => \$showHelp,
'q|quiet' => \$quiet,
- 'gyp' => \$useGYP,
- 'make' => \$useMake,
- 'ninja' => \$useNinja,
);
if (!$getOptionsResult || $showHelp) {
print STDERR <<__END__;
Usage: @{[ basename($0) ]} [options]
- --chromium also update dependencies of the chromium port
- --make generate the Makefile-based build system (Chromium only)
- --ninja generate the ninja-based build system (Chromium only)
- --chromium-android also update dependencies of the chromium port for Android
-h|--help show the help message
-q|--quiet pass -q to svn update for quiet updates
- --gyp generate project files from gyp after update
--wincairo also update dependencies of the WinCairo port
__END__
exit 1;
}
-if ($useMake) {
- $ENV{"GYP_GENERATORS"} = "make";
-}
-if ($useNinja) {
- $ENV{"GYP_GENERATORS"} = "ninja";
-}
-
my @svnOptions = ();
push @svnOptions, '-q' if $quiet;
@@ -101,11 +81,6 @@ if (-d "../Internal") {
print "Updating Internal\n" unless $quiet;
runSvnUpdate() if isSVNDirectory(".");
runGitUpdate() if isGitDirectory(".");
-} elsif (isChromium()) {
- my @chromiumUpdateArgs = ("perl", "Tools/Scripts/update-webkit-chromium");
- push @chromiumUpdateArgs, "--chromium-android" if isChromiumAndroid();
- push @chromiumUpdateArgs, "--force" if forceChromiumUpdate();
- system(@chromiumUpdateArgs) == 0 or die $!;
} elsif (isAppleWinWebKit()) {
system("perl", "Tools/Scripts/update-webkit-auxiliary-libs") == 0 or die;
if (isWinCairo()) {
@@ -116,11 +91,6 @@ if (-d "../Internal") {
setupAppleWinEnv() if isAppleWinWebKit();
-if ($useGYP) {
- print "Generating Project Files\n";
- system("perl", "Tools/Scripts/generate-project-files") == 0 or die "Failed to run generate-project-files";
-}
-
exit 0;
sub runSvnUpdate()
diff --git a/Tools/Scripts/update-webkit-chromium b/Tools/Scripts/update-webkit-chromium
deleted file mode 100755
index b21d09ec5..000000000
--- a/Tools/Scripts/update-webkit-chromium
+++ /dev/null
@@ -1,96 +0,0 @@
-#!/usr/bin/perl -w
-# Copyright (C) 2009 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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.
-
-# Update script for the WebKit Chromium Port.
-
-use File::Path;
-use FindBin;
-use Getopt::Long;
-use lib $FindBin::Bin;
-use webkitdirs;
-
-determineIsChromiumAndroid();
-
-chdirWebKit();
-chdir("Source/WebKit/chromium") or die $!;
-
-# Find gclient or install it.
-my $gclientPath;
-if (commandExists('gclient')) {
- $gclientPath = 'gclient';
-} elsif (-e 'depot_tools/gclient') {
- $gclientPath = 'depot_tools/gclient';
-} else {
- print "Installing chromium's depot_tools...\n";
- system("svn co http://src.chromium.org/svn/trunk/tools/depot_tools") == 0 or die $1;
- $gclientPath = 'depot_tools/gclient';
-}
-
-if (! -e ".gclient") {
- # If .gclient configuration file doesn't exist, create it.
- print "Configuring gclient...\n";
- system($gclientPath,
- "config",
- "--spec=solutions=[{'name':'./','url':None}]") == 0 or die $!;
-}
-
-# When building Chromium for Android, the envsetup.sh script needs to be
-# executed prior to project file generation. We need to tell gyp_webkit to do
-# that, as it's a Chromium file and may not be available yet right now.
-if (isChromiumAndroid()) {
- $ENV{WEBKIT_ANDROID_BUILD} = 1;
-}
-
-my $force = 0;
-GetOptions(
- 'force' => \$force,
-);
-
-# Execute gclient sync.
-print "Updating chromium port dependencies using gclient...\n";
-my @gclientArgs = ($gclientPath, "sync");
-push @gclientArgs, "--force" if $force;
-# --reset could delete modified files if necessary to sync.
-push @gclientArgs, "--reset" if $force;
-push @gclientArgs, "--delete_unversioned_trees" if $force;
-push @gclientArgs, "--deps=unix,android" if isChromiumAndroid();
-
-my $cmd = join(" ",@gclientArgs);
-my $max_attempts = 3;
-my $rc = -1;
-
-# The following will call glient up to $max_attempts times before
-# it gives up and fails. We need this because glcient can fail
-# for several reasons, some of which are transient (flakiness).
-
-for (1 .. $max_attempts) {
- $rc = system($cmd);
- print "Re-trying '" . $cmd . "'\n" if $rc != 0;
- last if $rc == 0;
-}
-
-die "Error: '$cmd' failed $max_attempts tries and returned " . $rc if ($rc);
diff --git a/Tools/Scripts/update-webkit-dependency b/Tools/Scripts/update-webkit-dependency
index 71d46728f..2654229cc 100755
--- a/Tools/Scripts/update-webkit-dependency
+++ b/Tools/Scripts/update-webkit-dependency
@@ -67,7 +67,7 @@ my $prefixInZip = shift;
my $sourceDir = sourceDir();
my $file = getLibraryName($libsURL);
my $zipFile = "$file.zip";
-my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
+my $webkitLibrariesDir = toUnixPath($ENV{'WEBKIT_LIBRARIES'}) || "$sourceDir/WebKitLibraries/win";
my $tmpRelativeDir = File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1);
my $tmpAbsDir = File::Spec->rel2abs($tmpRelativeDir);
diff --git a/Tools/Scripts/update-webkit-libs-jhbuild b/Tools/Scripts/update-webkit-libs-jhbuild
index 51605bded..74dd7b6c5 100755
--- a/Tools/Scripts/update-webkit-libs-jhbuild
+++ b/Tools/Scripts/update-webkit-libs-jhbuild
@@ -101,8 +101,6 @@ sub runJhbuild
sub cleanJhbuild()
{
- runJhbuild("clean");
-
# If the configuration changed, dependencies may have been removed.
# Since we lack a granular way of uninstalling those we wipe out the
# jhbuild root and start from scratch.
@@ -110,6 +108,10 @@ sub cleanJhbuild()
if (system("rm -rf $jhbuildPath/Root") ne 0) {
die "Cleaning jhbuild root failed!";
}
+
+ if (system("rm -rf $jhbuildPath/Source") ne 0) {
+ die "Cleaning jhbuild sources failed!";
+ }
}
delete $ENV{AR_FLAGS} if exists $ENV{AR_FLAGS};
@@ -122,7 +124,7 @@ if (-e getJhbuildPath() && jhbuildConfigurationChanged()) {
cleanJhbuild();
}
+saveJhbuildMd5();
+
print "Updating " . $prettyPlatform{$platform} . " port dependencies using jhbuild...\n";
runJhbuild("build");
-
-saveJhbuildMd5();
diff --git a/Tools/Scripts/update-webkit-localizable-strings b/Tools/Scripts/update-webkit-localizable-strings
index ceb25a58a..8a537bffb 100755
--- a/Tools/Scripts/update-webkit-localizable-strings
+++ b/Tools/Scripts/update-webkit-localizable-strings
@@ -1,6 +1,6 @@
#!/usr/bin/perl -w
-# Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+# Copyright (C) 2006, 2007, 2013 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -35,11 +35,15 @@ use lib $FindBin::Bin;
use webkitdirs;
# WebKit and WebKit2 strings go into WebCore's Localizable.strings.
-my @directoriesToScan = ("Source/WebCore", "Source/WebKit/mac", "Source/WebKit/win", "Source/WebKit2", "-Source/WebCore/icu", "-Source/WebKit/mac/icu");
-my $fileToUpdate = "Source/WebCore/English.lproj/Localizable.strings";
+my @webKitDirectoriesToScan = ("Source/WebCore", "Source/WebKit/mac", "Source/WebKit/win", "Source/WebKit2", "-Source/WebCore/icu", "-Source/WebKit/mac/icu");
+my @webInspectorUIDirectoriesToScan = ("Source/WebInspectorUI/UserInterface");
+
+my $webCoreFileToUpdate = "Source/WebCore/English.lproj/Localizable.strings";
+my $webInspectorUIFileToUpdate = "Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js";
@ARGV == 0 or die "Usage: " . basename($0) . "\n";
chdirWebKit();
-system "Tools/Scripts/extract-localizable-strings", "-", $fileToUpdate, @directoriesToScan;
+system "Tools/Scripts/extract-localizable-strings", "-", $webCoreFileToUpdate, @webKitDirectoriesToScan;
+system "Tools/Scripts/extract-localizable-js-strings", $webInspectorUIFileToUpdate, @webInspectorUIDirectoriesToScan;
diff --git a/Tools/Scripts/update-webkit-support-libs b/Tools/Scripts/update-webkit-support-libs
index afced1d28..37f3ac9da 100755
--- a/Tools/Scripts/update-webkit-support-libs
+++ b/Tools/Scripts/update-webkit-support-libs
@@ -46,7 +46,7 @@ my $file = "WebKitSupportLibrary";
my $zipFile = "$file.zip";
my $zipDirectory = toUnixPath($ENV{'WEBKITSUPPORTLIBRARIESZIPDIR'}) || $sourceDir;
my $pathToZip = File::Spec->catfile($zipDirectory, $zipFile);
-my $webkitLibrariesDir = toUnixPath($ENV{'WEBKITLIBRARIESDIR'}) || "$sourceDir/WebKitLibraries/win";
+my $webkitLibrariesDir = toUnixPath($ENV{'WEBKIT_LIBRARIES'}) || "$sourceDir/WebKitLibraries/win";
my $versionFile = $file . "Version";
my $pathToVersionFile = File::Spec->catfile($webkitLibrariesDir, $versionFile);
my $tmpRelativeDir = File::Temp::tempdir("webkitlibsXXXXXXX", TMPDIR => 1, CLEANUP => 1);
diff --git a/Tools/Scripts/update-webkit-wincairo-libs b/Tools/Scripts/update-webkit-wincairo-libs
index 52d052e72..4a2bb0f35 100755
--- a/Tools/Scripts/update-webkit-wincairo-libs
+++ b/Tools/Scripts/update-webkit-wincairo-libs
@@ -35,7 +35,7 @@ use FindBin;
my $file = "WinCairoRequirements";
my $zipFile = "$file.zip";
-my $winCairoLibsURL = "http://dl.dropbox.com/u/39598926/$zipFile";
+my $winCairoLibsURL = "https://dl.dropboxusercontent.com/u/39598926/$zipFile";
my $command = "$FindBin::Bin/update-webkit-dependency";
system("perl", $command, $winCairoLibsURL, ".") == 0 or die;
diff --git a/Tools/Scripts/validate-committer-lists b/Tools/Scripts/validate-committer-lists
index 96763d430..62ff9bc52 100755
--- a/Tools/Scripts/validate-committer-lists
+++ b/Tools/Scripts/validate-committer-lists
@@ -31,6 +31,7 @@
# Checks Python's known list of committers against lists.webkit.org and SVN history.
+import logging
import os
import subprocess
import re
@@ -39,7 +40,6 @@ from datetime import date, datetime, timedelta
from optparse import OptionParser
from webkitpy.common.config.committers import CommitterList
-from webkitpy.common.system.deprecated_logging import log, error
from webkitpy.common.checkout.scm import Git
from webkitpy.common.net.bugzilla import Bugzilla
@@ -47,6 +47,7 @@ from webkitpy.common.net.bugzilla import Bugzilla
# so this import should always succeed.
from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
+_log = logging.getLogger(__name__)
def print_list_if_non_empty(title, list_to_print):
if not list_to_print:
@@ -58,8 +59,8 @@ def print_list_if_non_empty(title, list_to_print):
class CommitterListFromMailingList(object):
- committers_list_url = "http://lists.webkit.org/mailman/roster.cgi/webkit-committers"
- reviewers_list_url = "http://lists.webkit.org/mailman/roster.cgi/webkit-reviewers"
+ committers_list_url = "http://lists.webkit.org/mailman/roster/webkit-committers"
+ reviewers_list_url = "http://lists.webkit.org/mailman/roster/webkit-reviewers"
def _fetch_emails_from_page(self, url):
page = urllib2.urlopen(url)
@@ -101,7 +102,7 @@ class CommitterListFromMailingList(object):
print_list_if_non_empty("Committers missing from %s:" % list_name, missing_from_mailing_list)
users_missing_from_committers = self._emails_not_found_in_committer_list(committer_list.committers(), committer_emails)
- print_list_if_non_empty("Subcribers to %s missing from committer.py:" % list_name, users_missing_from_committers)
+ print_list_if_non_empty("Subcribers to %s missing from contributors.json:" % list_name, users_missing_from_committers)
reviewer_emails = self._fetch_emails_from_page(self.reviewers_list_url)
@@ -111,10 +112,10 @@ class CommitterListFromMailingList(object):
print_list_if_non_empty("Reviewers missing from %s:" % list_name, missing_from_mailing_list)
missing_from_reviewers = self._emails_not_found_in_committer_list(committer_list.reviewers(), reviewer_emails)
- print_list_if_non_empty("Subcribers to %s missing from reviewers in committer.py:" % list_name, missing_from_reviewers)
+ print_list_if_non_empty("Subcribers to %s missing from reviewers in contributors.json:" % list_name, missing_from_reviewers)
missing_from_committers = self._emails_not_found_in_committer_list(committer_list.committers(), reviewer_emails)
- print_list_if_non_empty("Subcribers to %s completely missing from committers.py" % list_name, missing_from_committers)
+ print_list_if_non_empty("Subcribers to %s completely missing from contributors.json:" % list_name, missing_from_committers)
class CommitterListFromGit(object):
@@ -173,7 +174,8 @@ class CommitterListFromGit(object):
match_result = line_regexp.match(output_line)
if not match_result:
- error("Failed to match line: %s" % output_line)
+ _log.error("Failed to match line: %s" % output_line)
+ exit(1)
last_commit_dates[match_result.group('author')] = float(match_result.group('timestamp'))
def _fill_in_emails_for_old_logins(self):
@@ -194,7 +196,7 @@ class CommitterListFromGit(object):
# No known email mapping, likely not an active committer. We could log here.
continue
- # log("%s -> %s" % (author, author_email)) # For sanity checking.
+ # _log.info("%s -> %s" % (author, author_email)) # For sanity checking.
no_email_commit_time = self._last_commit_time_by_author_cache.get(author)
email_commit_time = self._last_commit_time_by_author_cache.get(author_email)
# We compare the timestamps for extra sanity even though we could assume commits before email address were used for login are always going to be older.
@@ -228,11 +230,11 @@ class CommitterListFromGit(object):
self._print_three_column_row(column_widths, (str(last_commit_date), author, committer_record))
def print_committers_missing_from_committer_list(self, committer_list):
- missing_from_committers_py = []
+ missing_from_contributors_json = []
last_commit_time_by_author = self._last_commit_by_author()
for author in last_commit_time_by_author:
if not committer_list.committer_by_email(author):
- missing_from_committers_py.append(author)
+ missing_from_contributors_json.append(author)
never_committed = []
for committer in committer_list.committers():
@@ -242,8 +244,8 @@ class CommitterListFromGit(object):
else:
never_committed.append(committer)
- print_list_if_non_empty("Historical committers missing from committer.py:", missing_from_committers_py)
- print_list_if_non_empty("Committers in committer.py who have never committed:", never_committed)
+ print_list_if_non_empty("Historical committers missing from contributors.json:", missing_from_contributors_json)
+ print_list_if_non_empty("Committers in contributors.json who have never committed:", never_committed)
class CommitterListBugzillaChecker(object):
@@ -272,7 +274,7 @@ def main():
print """\n\nWARNING: validate-committer-lists requires a git checkout.
The following checks are disabled:
- List of committers ordered by last commit
- - List of historical committers missing from committers.py
+ - List of historical committers missing from contributors.json
"""
return 1
svn_committer_list = CommitterListFromGit()
diff --git a/Tools/Scripts/webkit-build-directory b/Tools/Scripts/webkit-build-directory
index d5085b594..d19ce0418 100755
--- a/Tools/Scripts/webkit-build-directory
+++ b/Tools/Scripts/webkit-build-directory
@@ -47,8 +47,6 @@ Usage: $programName [options]
--top-level Show the top-level build directory
--blackberry Find the build directory for the BlackBerry port on Mac/Linux
- --chromium Find the build directory for the Chromium port on Mac/Win/Linux
- --chromium-android Find the build directory for the Chromium port on Android
--efl Find the build directory for the EFL port
--gtk Find the build directory for the GTK+ port
--qt Find the build directory for the Qt port
diff --git a/Tools/Scripts/webkit-tools-completion.sh b/Tools/Scripts/webkit-tools-completion.sh
index d83a5a6ce..a57a1aba5 100755
--- a/Tools/Scripts/webkit-tools-completion.sh
+++ b/Tools/Scripts/webkit-tools-completion.sh
@@ -111,4 +111,4 @@ complete -F _webkit-patch_complete webkit-patch
complete -o default -W "--continue --fix-merged --help --no-continue --no-warnings --warnings -c -f -h -w" resolve-ChangeLogs
complete -o default -W "--bug --diff --git-commit --git-index --git-reviewer --help --no-update --no-write --open --update --write -d -h -o" prepare-ChangeLog
complete -W "--clean --debug --help -h" build-webkit
-complete -o default -W "--add-platform-exceptions --complex-text --configuration --guard-malloc --help --http --ignore-tests --launch-safari --leaks --merge-leak-depth --new-test-results --no-http --no-launch-safari --no-new-test-results --no-sample-on-timeout --no-strip-editing-callbacks --pixel-tests --platform --port --quiet --random --reset-results --results-directory --reverse --root --sample-on-timeout --singly --skipped --slowest --strict --strip-editing-callbacks --threaded --timeout --tolerance --use-remote-links-to-tests --valgrind --verbose -1 -c -g -h -i -l -m -o -p -q -t -v" run-webkit-tests
+complete -o default -W "--add-platform-exceptions --complex-text --configuration --guard-malloc --help --http --ignore-tests --launch-safari --leaks --merge-leak-depth --new-test-results --no-http --no-show-results --no-new-test-results --no-sample-on-timeout --no-strip-editing-callbacks --pixel-tests --platform --port --quiet --random --reset-results --results-directory --reverse --root --sample-on-timeout --singly --skipped --slowest --strict --strip-editing-callbacks --threaded --timeout --tolerance --use-remote-links-to-tests --valgrind --verbose -1 -c -g -h -i -l -m -o -p -q -t -v" run-webkit-tests
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm
index 619a76e19..cc30b16f5 100755
--- a/Tools/Scripts/webkitdirs.pm
+++ b/Tools/Scripts/webkitdirs.pm
@@ -80,6 +80,7 @@ my $numberOfCPUs;
my $baseProductDir;
my @baseProductDirOption;
my $configuration;
+my $xcodeSDK;
my $configurationForVisualStudio;
my $configurationProductDir;
my $sourceDir;
@@ -93,15 +94,8 @@ my $qmakebin = "qmake"; # Allow override of the qmake binary from $PATH
my $isGtk;
my $isWinCE;
my $isWinCairo;
-my $isWx;
my $isEfl;
-my @wxArgs;
my $isBlackBerry;
-my $isChromium;
-my $isChromiumAndroid;
-my $isChromiumMacMake;
-my $isChromiumNinja;
-my $forceChromiumUpdate;
my $isInspectorFrontend;
my $isWK2;
my $shouldTargetWebProcess;
@@ -110,7 +104,10 @@ my $shouldUseGuardMalloc;
my $xcodeVersion;
# Variables for Win32 support
+my $programFilesPath;
my $vcBuildPath;
+my $vsInstallDir;
+my $vsVersion;
my $windowsSourceDir;
my $winVersion;
my $willUseVCExpressWhenBuilding = 0;
@@ -186,7 +183,7 @@ sub determineBaseProductDir
determineSourceDir();
my $setSharedPrecompsDir;
- $baseProductDir = $ENV{"WEBKITOUTPUTDIR"};
+ $baseProductDir = $ENV{"WEBKIT_OUTPUTDIR"};
if (!defined($baseProductDir) and isAppleMacWebKit()) {
# Silently remove ~/Library/Preferences/xcodebuild.plist which can
@@ -221,14 +218,6 @@ sub determineBaseProductDir
}
undef $baseProductDir unless $baseProductDir =~ /^\//;
- } elsif (isChromium()) {
- if (isLinux() || isChromiumAndroid() || isChromiumMacMake()) {
- $baseProductDir = "$sourceDir/out";
- } elsif (isDarwin()) {
- $baseProductDir = "$sourceDir/Source/WebKit/chromium/xcodebuild";
- } elsif (isWindows() || isCygwin()) {
- $baseProductDir = "$sourceDir/Source/WebKit/chromium/build";
- }
}
if (!defined($baseProductDir)) { # Port-specific checks failed, use default
@@ -240,7 +229,7 @@ sub determineBaseProductDir
$baseProductDir = "$baseProductDir/" . $archInfo{"cpuDir"};
}
- if (isGit() && isGitBranchBuild() && !isChromium()) {
+ if (isGit() && isGitBranchBuild()) {
my $branch = gitBranch();
$baseProductDir = "$baseProductDir/$branch";
}
@@ -258,7 +247,7 @@ sub determineBaseProductDir
if (isCygwin()) {
my $dosBuildPath = `cygpath --windows \"$baseProductDir\"`;
chomp $dosBuildPath;
- $ENV{"WEBKITOUTPUTDIR"} = $dosBuildPath;
+ $ENV{"WEBKIT_OUTPUTDIR"} = $dosBuildPath;
my $unixBuildPath = `cygpath --unix \"$baseProductDir\"`;
chomp $unixBuildPath;
$baseProductDir = $unixBuildPath;
@@ -288,8 +277,8 @@ sub determineConfiguration
}
if ($configuration && isWinCairo()) {
- unless ($configuration =~ /_Cairo_CFLite$/) {
- $configuration .= "_Cairo_CFLite";
+ unless ($configuration =~ /_WinCairo$/) {
+ $configuration .= "_WinCairo";
}
}
}
@@ -301,10 +290,11 @@ sub determineArchitecture
$architecture = "";
determineBaseProductDir();
+ determineXcodeSDK();
if (isGtk()) {
determineConfigurationProductDir();
- my $host_triple = `grep -E '^host = ' $configurationProductDir/GNUmakefile`;
+ my $host_triple = `grep -E '^host = ' $configurationProductDir/GNUmakefile 2> /dev/null`;
if ($host_triple =~ m/^host = ([^-]+)-/) {
# We have a configured build tree; use it.
$architecture = $1;
@@ -317,9 +307,15 @@ sub determineArchitecture
if ($architecture) {
chomp $architecture;
} else {
- my $supports64Bit = `sysctl -n hw.optional.x86_64`;
- chomp $supports64Bit;
- $architecture = 'x86_64' if $supports64Bit;
+ if (not defined $xcodeSDK or $xcodeSDK =~ /^(\/$|macosx)/) {
+ my $supports64Bit = `sysctl -n hw.optional.x86_64`;
+ chomp $supports64Bit;
+ $architecture = 'x86_64' if $supports64Bit;
+ } elsif ($xcodeSDK =~ /^iphonesimulator/) {
+ $architecture = 'i386';
+ } elsif ($xcodeSDK =~ /^iphoneos/) {
+ $architecture = 'armv7';
+ }
}
} elsif (isEfl()) {
my $host_processor = "";
@@ -388,14 +384,70 @@ sub argumentsForConfiguration()
push(@args, '--efl') if isEfl();
push(@args, '--wincairo') if isWinCairo();
push(@args, '--wince') if isWinCE();
- push(@args, '--wx') if isWx();
push(@args, '--blackberry') if isBlackBerry();
- push(@args, '--chromium') if isChromium() && !isChromiumAndroid();
- push(@args, '--chromium-android') if isChromiumAndroid();
push(@args, '--inspector-frontend') if isInspectorFrontend();
return @args;
}
+sub determineXcodeSDK
+{
+ return if defined $xcodeSDK;
+ for (my $i = 0; $i <= $#ARGV; $i++) {
+ my $opt = $ARGV[$i];
+ if ($opt =~ /^--sdk$/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = splice(@ARGV, $i, 1);
+ } elsif ($opt =~ /^--device$/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = 'iphoneos.internal';
+ } elsif ($opt =~ /^--sim(ulator)?/i) {
+ splice(@ARGV, $i, 1);
+ $xcodeSDK = 'iphonesimulator';
+ }
+ }
+}
+
+sub xcodeSDK
+{
+ determineXcodeSDK();
+ return $xcodeSDK;
+}
+
+sub programFilesPath
+{
+ return $programFilesPath if defined $programFilesPath;
+
+ $programFilesPath = $ENV{'PROGRAMFILES(X86)'} || $ENV{'PROGRAMFILES'} || "C:\\Program Files";
+
+ return $programFilesPath;
+}
+
+sub visualStudioInstallDir
+{
+ return $vsInstallDir if defined $vsInstallDir;
+
+ if ($ENV{'VSINSTALLDIR'}) {
+ $vsInstallDir = $ENV{'VSINSTALLDIR'};
+ $vsInstallDir =~ s|[\\/]$||;
+ } else {
+ $vsInstallDir = File::Spec->catdir(programFilesPath(), "Microsoft Visual Studio 10.0");
+ }
+ chomp($vsInstallDir = `cygpath "$vsInstallDir"`) if isCygwin();
+
+ return $vsInstallDir;
+}
+
+sub visualStudioVersion
+{
+ return $vsVersion if defined $vsVersion;
+
+ my $installDir = visualStudioInstallDir();
+
+ $vsVersion = ($installDir =~ /Microsoft Visual Studio ([0-9]+\.[0-9]*)/) ? $1 : "8";
+
+ return $vsVersion;
+}
+
sub determineConfigurationForVisualStudio
{
return if defined $configurationForVisualStudio;
@@ -408,9 +460,9 @@ sub usesPerConfigurationBuildDirectory
{
# [Gtk] We don't have Release/Debug configurations in straight
# autotool builds (non build-webkit). In this case and if
- # WEBKITOUTPUTDIR exist, use that as our configuration dir. This will
+ # WEBKIT_OUTPUTDIR exist, use that as our configuration dir. This will
# allows us to run run-webkit-tests without using build-webkit.
- return ($ENV{"WEBKITOUTPUTDIR"} && isGtk()) || isAppleWinWebKit();
+ return ($ENV{"WEBKIT_OUTPUTDIR"} && isGtk()) || isAppleWinWebKit();
}
sub determineConfigurationProductDir
@@ -418,8 +470,9 @@ sub determineConfigurationProductDir
return if defined $configurationProductDir;
determineBaseProductDir();
determineConfiguration();
- if (isAppleWinWebKit() && !isWx()) {
- $configurationProductDir = File::Spec->catdir($baseProductDir, configurationForVisualStudio(), "bin");
+ if (isAppleWinWebKit()) {
+ my $binDir = "bin32";
+ $configurationProductDir = File::Spec->catdir($baseProductDir, configurationForVisualStudio(), $binDir);
} else {
if (usesPerConfigurationBuildDirectory()) {
$configurationProductDir = "$baseProductDir";
@@ -520,7 +573,12 @@ sub XcodeOptions
determineBaseProductDir();
determineConfiguration();
determineArchitecture();
- return (@baseProductDirOption, "-configuration", $configuration, "ARCHS=$architecture", argumentsForXcode());
+ determineXcodeSDK();
+
+ my @sdkOption = ($xcodeSDK ? "SDKROOT=$xcodeSDK" : ());
+ my @architectureOption = ($architecture ? "ARCHS=$architecture" : ());
+
+ return (@baseProductDirOption, "-configuration", $configuration, @architectureOption, @sdkOption, argumentsForXcode());
}
sub XcodeOptionString
@@ -538,9 +596,6 @@ sub XcodeCoverageSupportOptions()
my @coverageSupportOptions = ();
push @coverageSupportOptions, "GCC_GENERATE_TEST_COVERAGE_FILES=YES";
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 -lgcov";
return @coverageSupportOptions;
}
@@ -553,22 +608,22 @@ sub determinePassedConfiguration
for my $i (0 .. $#ARGV) {
my $opt = $ARGV[$i];
- if ($opt =~ /^--debug$/i || $opt =~ /^--devel/i) {
+ if ($opt =~ /^--debug$/i) {
splice(@ARGV, $i, 1);
$passedConfiguration = "Debug";
- $passedConfiguration .= "_Cairo_CFLite" if (isWinCairo() && isCygwin());
+ $passedConfiguration .= "_WinCairo" if (isWinCairo() && isCygwin());
return;
}
- if ($opt =~ /^--release$/i || $opt =~ /^--deploy/i) {
+ if ($opt =~ /^--release$/i) {
splice(@ARGV, $i, 1);
$passedConfiguration = "Release";
- $passedConfiguration .= "_Cairo_CFLite" if (isWinCairo() && isCygwin());
+ $passedConfiguration .= "_WinCairo" if (isWinCairo() && isCygwin());
return;
}
if ($opt =~ /^--profil(e|ing)$/i) {
splice(@ARGV, $i, 1);
$passedConfiguration = "Profiling";
- $passedConfiguration .= "_Cairo_CFLite" if (isWinCairo() && isCygwin());
+ $passedConfiguration .= "_WinCairo" if (isWinCairo() && isCygwin());
return;
}
}
@@ -606,7 +661,7 @@ sub determinePassedArchitecture
my $opt = $ARGV[$i];
if ($opt =~ /^--32-bit$/i) {
splice(@ARGV, $i, 1);
- if (isAppleMacWebKit() || isWx()) {
+ if (isAppleMacWebKit()) {
$passedArchitecture = `arch`;
chomp $passedArchitecture;
}
@@ -645,6 +700,11 @@ sub setArchitecture
$architecture = $passedArchitecture if $passedArchitecture;
}
+sub skipSafariExecutableEntitlementChecks
+{
+ return `defaults read /Library/Preferences/org.webkit.BuildConfiguration SkipSafariExecutableEntitlementChecks 2>/dev/null` eq "1\n";
+}
+
sub executableHasEntitlements
{
my $executablePath = shift;
@@ -657,8 +717,11 @@ sub safariPathFromSafariBundle
if (isAppleMacWebKit()) {
my $safariPath = "$safariBundle/Contents/MacOS/Safari";
+ return $safariPath if skipSafariExecutableEntitlementChecks();
+
my $safariForWebKitDevelopmentPath = "$safariBundle/Contents/MacOS/SafariForWebKitDevelopment";
return $safariForWebKitDevelopmentPath if -f $safariForWebKitDevelopmentPath && executableHasEntitlements($safariPath);
+
return $safariPath;
}
return $safariBundle if isAppleWinWebKit();
@@ -714,16 +777,18 @@ sub builtDylibPathForName
{
my $libraryName = shift;
determineConfigurationProductDir();
- if (isChromium()) {
- return "$configurationProductDir/$libraryName";
- }
+
if (isBlackBerry()) {
my $libraryExtension = $libraryName =~ /^WebKit$/i ? ".so" : ".a";
return "$configurationProductDir/$libraryName/lib" . lc($libraryName) . $libraryExtension;
}
if (isQt()) {
my $isSearchingForWebCore = $libraryName =~ "WebCore";
- $libraryName = "QtWebKitWidgets";
+ if (isDarwin()) {
+ $libraryName = "QtWebKitWidgets";
+ } else {
+ $libraryName = "Qt5WebKitWidgets";
+ }
my $result;
if (isDarwin() and -d "$configurationProductDir/lib/$libraryName.framework") {
$result = "$configurationProductDir/lib/$libraryName.framework/$libraryName";
@@ -759,12 +824,9 @@ sub builtDylibPathForName
return $result;
}
- if (isWx()) {
- return "$configurationProductDir/libwxwebkit.dylib";
- }
if (isGtk()) {
# WebKitGTK+ for GTK2, WebKitGTK+ for GTK3, and WebKit2 respectively.
- my @libraries = ("libwebkitgtk-1.0", "libwebkitgtk-3.0", "libwebkit2gtk-1.0");
+ my @libraries = ("libwebkitgtk-1.0", "libwebkitgtk-3.0", "libwebkit2gtk-3.0");
my $extension = isDarwin() ? ".dylib" : ".so";
foreach $libraryName (@libraries) {
@@ -774,6 +836,9 @@ sub builtDylibPathForName
return "NotFound";
}
if (isEfl()) {
+ if (isWK2()) {
+ return "$configurationProductDir/lib/libewebkit2.so";
+ }
return "$configurationProductDir/lib/libewebkit.so";
}
if (isWinCE()) {
@@ -919,8 +984,8 @@ sub determineIsQt()
return;
}
- # The presence of QTDIR only means Qt if --gtk or --wx or --efl or --blackberry or --chromium or --wincairo are not on the command-line
- if (isGtk() || isWx() || isEfl() || isBlackBerry() || isChromium() || isWinCairo()) {
+ # The presence of QTDIR only means Qt if --gtk or --efl or --blackberry or --wincairo are not on the command-line
+ if (isGtk() || isEfl() || isBlackBerry() || isWinCairo()) {
$isQt = 0;
return;
}
@@ -1001,14 +1066,17 @@ sub blackberryCMakeArguments()
push @cmakeExtraOptions, "-DENABLE_GLES2=1" unless $ENV{"DISABLE_GLES2"};
my @includeSystemDirectories;
- push @includeSystemDirectories, File::Spec->catdir($stageInc, "grskia", "skia");
- push @includeSystemDirectories, File::Spec->catdir($stageInc, "grskia");
- push @includeSystemDirectories, File::Spec->catdir($stageInc, "harfbuzz");
+ push @includeSystemDirectories, File::Spec->catdir($stageInc, "harfbuzzng");
push @includeSystemDirectories, File::Spec->catdir($stageInc, "imf");
+ # We only use jpeg-turbo for device build
+ push @includeSystemDirectories, File::Spec->catdir($stageInc, "jpeg-turbo") if $arch=~/arm/;
push @includeSystemDirectories, $stageInc;
push @includeSystemDirectories, File::Spec->catdir($stageInc, "browser", "platform");
+ push @includeSystemDirectories, File::Spec->catdir($stageInc, "browser", "platform", "graphics");
push @includeSystemDirectories, File::Spec->catdir($stageInc, "browser", "qsk");
push @includeSystemDirectories, File::Spec->catdir($stageInc, "ots");
+ push @includeSystemDirectories, File::Spec->catdir($stageInc, "iType", "common");
+ push @includeSystemDirectories, File::Spec->catdir($stageInc, "iType", "port", "nto");
my @cxxFlags;
push @cxxFlags, "-Wl,-rpath-link,$stageLib";
@@ -1092,35 +1160,6 @@ sub determineIsWinCE()
$isWinCE = checkForArgumentAndRemoveFromARGV("--wince");
}
-sub isWx()
-{
- determineIsWx();
- return $isWx;
-}
-
-sub determineIsWx()
-{
- return if defined($isWx);
- $isWx = checkForArgumentAndRemoveFromARGV("--wx");
-}
-
-sub getWxArgs()
-{
- if (!@wxArgs) {
- @wxArgs = ("");
- my $rawWxArgs = "";
- foreach my $opt (@ARGV) {
- if ($opt =~ /^--wx-args/i ) {
- @ARGV = grep(!/^--wx-args/i, @ARGV);
- $rawWxArgs = $opt;
- $rawWxArgs =~ s/--wx-args=//i;
- }
- }
- @wxArgs = split(/,/, $rawWxArgs);
- }
- return @wxArgs;
-}
-
# Determine if this is debian, ubuntu, linspire, or something similar.
sub isDebianBased()
{
@@ -1132,92 +1171,6 @@ sub isFedoraBased()
return -e "/etc/fedora-release";
}
-sub isChromium()
-{
- determineIsChromium();
- determineIsChromiumAndroid();
- return $isChromium || $isChromiumAndroid;
-}
-
-sub determineIsChromium()
-{
- return if defined($isChromium);
- $isChromium = checkForArgumentAndRemoveFromARGV("--chromium");
- if ($isChromium) {
- $forceChromiumUpdate = checkForArgumentAndRemoveFromARGV("--force-update");
- }
-}
-
-sub isChromiumAndroid()
-{
- determineIsChromiumAndroid();
- return $isChromiumAndroid;
-}
-
-sub determineIsChromiumAndroid()
-{
- return if defined($isChromiumAndroid);
- $isChromiumAndroid = checkForArgumentAndRemoveFromARGV("--chromium-android");
-}
-
-sub isChromiumMacMake()
-{
- determineIsChromiumMacMake();
- return $isChromiumMacMake;
-}
-
-sub determineIsChromiumMacMake()
-{
- return if defined($isChromiumMacMake);
-
- my $hasUpToDateMakefile = 0;
- if (-e 'Makefile.chromium') {
- unless (-e 'Source/WebKit/chromium/WebKit.xcodeproj') {
- $hasUpToDateMakefile = 1;
- } else {
- $hasUpToDateMakefile = stat('Makefile.chromium')->mtime > stat('Source/WebKit/chromium/WebKit.xcodeproj')->mtime;
- }
- }
- $isChromiumMacMake = isDarwin() && $hasUpToDateMakefile;
-}
-
-sub isChromiumNinja()
-{
- determineIsChromiumNinja();
- return $isChromiumNinja;
-}
-
-sub determineIsChromiumNinja()
-{
- return if defined($isChromiumNinja);
-
- my $config = configuration();
-
- my $hasUpToDateNinjabuild = 0;
- if (-e "out/$config/build.ninja") {
- my $statNinja = stat("out/$config/build.ninja")->mtime;
-
- my $statXcode = 0;
- if (-e 'Source/WebKit/chromium/WebKit.xcodeproj') {
- $statXcode = stat('Source/WebKit/chromium/WebKit.xcodeproj')->mtime;
- }
-
- my $statMake = 0;
- if (-e 'Makefile.chromium') {
- $statMake = stat('Makefile.chromium')->mtime;
- }
-
- $hasUpToDateNinjabuild = $statNinja > $statXcode && $statNinja > $statMake;
- }
- $isChromiumNinja = $hasUpToDateNinjabuild;
-}
-
-sub forceChromiumUpdate()
-{
- determineIsChromium();
- return $forceChromiumUpdate;
-}
-
sub isWinCairo()
{
determineIsWinCairo();
@@ -1302,7 +1255,7 @@ sub isFreeBSD()
sub isARM()
{
- return $Config{archname} =~ /^arm-/;
+ return $Config{archname} =~ /^arm[v\-]/;
}
sub isCrossCompilation()
@@ -1321,7 +1274,7 @@ sub isCrossCompilation()
sub isAppleWebKit()
{
- return !(isQt() or isGtk() or isWx() or isChromium() or isEfl() or isWinCE() or isBlackBerry());
+ return !(isQt() or isGtk() or isEfl() or isWinCE() or isBlackBerry());
}
sub isAppleMacWebKit()
@@ -1496,7 +1449,7 @@ sub relativeScriptsDir()
sub launcherPath()
{
my $relativeScriptsPath = relativeScriptsDir();
- if (isGtk() || isQt() || isWx() || isEfl() || isWinCE()) {
+ if (isGtk() || isQt() || isEfl() || isWinCE()) {
return "$relativeScriptsPath/run-launcher";
} elsif (isAppleWebKit()) {
return "$relativeScriptsPath/run-safari";
@@ -1509,8 +1462,6 @@ sub launcherName()
return "GtkLauncher";
} elsif (isQt()) {
return "QtTestBrowser";
- } elsif (isWx()) {
- return "wxBrowser";
} elsif (isAppleWebKit()) {
return "Safari";
} elsif (isEfl()) {
@@ -1543,7 +1494,7 @@ sub checkRequiredSystemConfig
print "http://developer.apple.com/tools/xcode\n";
print "*************************************************************\n";
}
- } elsif (isGtk() or isQt() or isWx() or isEfl()) {
+ } elsif (isGtk() or isQt() or isEfl()) {
my @cmds = qw(bison gperf);
if (isQt() and isWindows()) {
push @cmds, "win_flex";
@@ -1587,6 +1538,11 @@ sub windowsSourceDir()
return $windowsSourceDir;
}
+sub windowsSourceSourceDir()
+{
+ return windowsSourceDir() . "\\Source";
+}
+
sub windowsLibrariesDir()
{
return windowsSourceDir() . "\\WebKitLibraries\\win";
@@ -1616,28 +1572,32 @@ sub setupAppleWinEnv()
}
# Those environment variables must be set to be able to build inside Visual Studio.
- $variablesToSet{WEBKITLIBRARIESDIR} = windowsLibrariesDir() unless $ENV{WEBKITLIBRARIESDIR};
- $variablesToSet{WEBKITOUTPUTDIR} = windowsOutputDir() unless $ENV{WEBKITOUTPUTDIR};
+ $variablesToSet{WEBKIT_LIBRARIES} = windowsLibrariesDir() unless $ENV{WEBKIT_LIBRARIES};
+ $variablesToSet{WEBKIT_OUTPUTDIR} = windowsOutputDir() unless $ENV{WEBKIT_OUTPUTDIR};
foreach my $variable (keys %variablesToSet) {
print "Setting the Environment Variable '" . $variable . "' to '" . $variablesToSet{$variable} . "'\n\n";
system qw(regtool -s set), '\\HKEY_CURRENT_USER\\Environment\\' . $variable, $variablesToSet{$variable};
- $restartNeeded ||= $variable eq "WEBKITLIBRARIESDIR" || $variable eq "WEBKITOUTPUTDIR";
+ $restartNeeded ||= $variable eq "WEBKIT_LIBRARIES" || $variable eq "WEBKIT_OUTPUTDIR";
}
if ($restartNeeded) {
print "Please restart your computer before attempting to build inside Visual Studio.\n\n";
}
} else {
- if (!$ENV{'WEBKITLIBRARIESDIR'}) {
- print "Warning: You must set the 'WebKitLibrariesDir' environment variable\n";
- print " to be able build WebKit from within Visual Studio.\n";
- print " Make sure that 'WebKitLibrariesDir' points to the\n";
+ if (!$ENV{'WEBKIT_LIBRARIES'}) {
+ # VS2010 (and newer) version. This will replace the VS2005 version as part of
+ # https://bugs.webkit.org/show_bug.cgi?id=109472.
+ print "Warning: You must set the 'WebKit_Libraries' environment variable\n";
+ print " to be able build WebKit from within Visual Studio 2010 and newer.\n";
+ print " Make sure that 'WebKit_Libraries' points to the\n";
print " 'WebKitLibraries/win' directory, not the 'WebKitLibraries/' directory.\n\n";
}
- if (!$ENV{'WEBKITOUTPUTDIR'}) {
- print "Warning: You must set the 'WebKitOutputDir' environment variable\n";
- print " to be able build WebKit from within Visual Studio.\n\n";
+ if (!$ENV{'WEBKIT_OUTPUTDIR'}) {
+ # VS2010 (and newer) version. This will replace the VS2005 version as part of
+ # https://bugs.webkit.org/show_bug.cgi?id=109472.
+ print "Warning: You must set the 'WebKit_OutputDir' environment variable\n";
+ print " to be able build WebKit from within Visual Studio 2010 and newer.\n\n";
}
}
}
@@ -1647,22 +1607,16 @@ sub setupCygwinEnv()
return if !isCygwin() && !isWindows();
return if $vcBuildPath;
- my $vsInstallDir;
- my $programFilesPath = $ENV{'PROGRAMFILES(X86)'} || $ENV{'PROGRAMFILES'} || "C:\\Program Files";
- if ($ENV{'VSINSTALLDIR'}) {
- $vsInstallDir = $ENV{'VSINSTALLDIR'};
- } else {
- $vsInstallDir = File::Spec->catdir($programFilesPath, "Microsoft Visual Studio 8");
- }
- chomp($vsInstallDir = `cygpath "$vsInstallDir"`) if isCygwin();
- $vcBuildPath = File::Spec->catfile($vsInstallDir, qw(Common7 IDE devenv.com));
+ my $programFilesPath = programFilesPath();
+ $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.com));
if (-e $vcBuildPath) {
- # Visual Studio is installed; we can use pdevenv to build.
- # FIXME: Make pdevenv work with non-Cygwin Perl.
- $vcBuildPath = File::Spec->catfile(sourceDir(), qw(Tools Scripts pdevenv)) if isCygwin();
+ # Visual Studio is installed;
+ if (visualStudioVersion() eq "10") {
+ $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE devenv.exe));
+ }
} else {
# Visual Studio not found, try VC++ Express
- $vcBuildPath = File::Spec->catfile($vsInstallDir, qw(Common7 IDE VCExpress.exe));
+ $vcBuildPath = File::Spec->catfile(visualStudioInstallDir(), qw(Common7 IDE VCExpress.exe));
if (! -e $vcBuildPath) {
print "*************************************************************\n";
print "Cannot find '$vcBuildPath'\n";
@@ -1684,32 +1638,37 @@ sub setupCygwinEnv()
print "*************************************************************\n";
die;
}
-
- unless ($ENV{WEBKITLIBRARIESDIR}) {
- $ENV{'WEBKITLIBRARIESDIR'} = File::Spec->catdir($sourceDir, "WebKitLibraries", "win");
- chomp($ENV{WEBKITLIBRARIESDIR} = `cygpath -wa '$ENV{WEBKITLIBRARIESDIR}'`) if isCygwin();
- }
print "Building results into: ", baseProductDir(), "\n";
- print "WEBKITOUTPUTDIR is set to: ", $ENV{"WEBKITOUTPUTDIR"}, "\n";
- print "WEBKITLIBRARIESDIR is set to: ", $ENV{"WEBKITLIBRARIESDIR"}, "\n";
+ print "WEBKIT_OUTPUTDIR is set to: ", $ENV{"WEBKIT_OUTPUTDIR"}, "\n";
+ print "WEBKIT_LIBRARIES is set to: ", $ENV{"WEBKIT_LIBRARIES"}, "\n";
}
sub dieIfWindowsPlatformSDKNotInstalled
{
my $registry32Path = "/proc/registry/";
my $registry64Path = "/proc/registry64/";
- my $windowsPlatformSDKRegistryEntry = "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1";
+ my @windowsPlatformSDKRegistryEntries = (
+ "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v8.0A",
+ "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v8.0",
+ "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v7.1A",
+ "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v7.0A",
+ "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MicrosoftSDK/InstalledSDKs/D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1",
+ );
# FIXME: It would be better to detect whether we are using 32- or 64-bit Windows
# and only check the appropriate entry. But for now we just blindly check both.
- return if (-e $registry32Path . $windowsPlatformSDKRegistryEntry) || (-e $registry64Path . $windowsPlatformSDKRegistryEntry);
+ my $recommendedPlatformSDK = $windowsPlatformSDKRegistryEntries[0];
+
+ while (@windowsPlatformSDKRegistryEntries) {
+ my $windowsPlatformSDKRegistryEntry = shift @windowsPlatformSDKRegistryEntries;
+ return if (-e $registry32Path . $windowsPlatformSDKRegistryEntry) || (-e $registry64Path . $windowsPlatformSDKRegistryEntry);
+ }
print "*************************************************************\n";
- print "Cannot find registry entry '$windowsPlatformSDKRegistryEntry'.\n";
- print "Please download and install the Microsoft Windows Server 2003 R2\n";
- print "Platform SDK from <http://www.microsoft.com/downloads/details.aspx?\n";
- print "familyid=0baf2b35-c656-4969-ace8-e4c0c0716adb&displaylang=en>.\n\n";
+ print "Cannot find registry entry '$recommendedPlatformSDK'.\n";
+ print "Please download and install the Microsoft Windows SDK\n";
+ print "from <http://www.microsoft.com/en-us/download/details.aspx?id=8279>.\n\n";
print "Then follow step 2 in the Windows section of the \"Installing Developer\n";
print "Tools\" instructions at <http://www.webkit.org/building/tools.html>.\n";
print "*************************************************************\n";
@@ -1798,50 +1757,6 @@ sub buildVisualStudioProject
return system @command;
}
-sub downloadWafIfNeeded
-{
- # get / update waf if needed
- my $waf = "$sourceDir/Tools/waf/waf";
- my $wafURL = 'http://wxwebkit.kosoftworks.com/downloads/deps/waf';
- if (!-f $waf) {
- my $result = system "curl -o $waf $wafURL";
- chmod 0755, $waf;
- }
-}
-
-sub buildWafProject
-{
- my ($project, $shouldClean, @options) = @_;
-
- # set the PYTHONPATH for waf
- my $pythonPath = $ENV{'PYTHONPATH'};
- if (!defined($pythonPath)) {
- $pythonPath = '';
- }
- my $sourceDir = sourceDir();
- my $newPythonPath = "$sourceDir/Tools/waf/build:$pythonPath";
- if (isCygwin()) {
- $newPythonPath = `cygpath --mixed --path $newPythonPath`;
- }
- $ENV{'PYTHONPATH'} = $newPythonPath;
-
- print "Building $project\n";
-
- my $wafCommand = "$sourceDir/Tools/waf/waf";
- if ($ENV{'WXWEBKIT_WAF'}) {
- $wafCommand = $ENV{'WXWEBKIT_WAF'};
- }
- if (isCygwin()) {
- $wafCommand = `cygpath --windows "$wafCommand"`;
- chomp($wafCommand);
- }
- if ($shouldClean) {
- return system $wafCommand, "uninstall", "clean", "distclean";
- }
-
- return system $wafCommand, 'configure', 'build', 'install', @options;
-}
-
sub retrieveQMakespecVar
{
my $mkspec = $_[0];
@@ -1901,9 +1816,13 @@ sub autotoolsFlag($$)
sub runAutogenForAutotoolsProjectIfNecessary($@)
{
- my ($dir, $prefix, $sourceDir, $project, @buildArgs) = @_;
+ my ($dir, $prefix, $sourceDir, $project, $joinedOverridableFeatures, @buildArgs) = @_;
+
+ # Always enable introspection when building WebKitGTK+.
+ unshift(@buildArgs, "--enable-introspection");
+
+ my $joinedBuildArgs = join(" ", @buildArgs);
- my $argumentsFile = "previous-autogen-arguments.txt";
if (-e "GNUmakefile") {
# Just assume that build-jsc will never be used to reconfigure JSC. Later
# we can go back and make this more complicated if the demand is there.
@@ -1911,8 +1830,9 @@ sub runAutogenForAutotoolsProjectIfNecessary($@)
return;
}
- # We only run autogen.sh again if the arguments passed have changed.
- if (!mustReRunAutogen($sourceDir, $argumentsFile, @buildArgs)) {
+ # Run autogen.sh again if either the features overrided by build-webkit or build arguments have changed.
+ if (!mustReRunAutogen($sourceDir, "WebKitFeatureOverrides.txt", $joinedOverridableFeatures)
+ && !mustReRunAutogen($sourceDir, "previous-autogen-arguments.txt", $joinedBuildArgs)) {
return;
}
}
@@ -1923,8 +1843,12 @@ sub runAutogenForAutotoolsProjectIfNecessary($@)
# Only for WebKit, write the autogen.sh arguments to a file so that we can detect
# when they change and automatically re-run it.
if ($project eq 'WebKit') {
- open(AUTOTOOLS_ARGUMENTS, ">$argumentsFile");
- print AUTOTOOLS_ARGUMENTS join(" ", @buildArgs);
+ open(OVERRIDABLE_FEATURES, ">WebKitFeatureOverrides.txt");
+ print OVERRIDABLE_FEATURES $joinedOverridableFeatures;
+ close(OVERRIDABLE_FEATURES);
+
+ open(AUTOTOOLS_ARGUMENTS, ">previous-autogen-arguments.txt");
+ print AUTOTOOLS_ARGUMENTS $joinedBuildArgs;
close(AUTOTOOLS_ARGUMENTS);
}
@@ -1942,10 +1866,7 @@ sub runAutogenForAutotoolsProjectIfNecessary($@)
# Prefix the command with jhbuild run.
unshift(@buildArgs, "$relSourceDir/autogen.sh");
- my $jhbuildWrapperPrefix = jhbuildWrapperPrefixIfNeeded();
- if ($jhbuildWrapperPrefix) {
- unshift(@buildArgs, $jhbuildWrapperPrefix);
- }
+ unshift(@buildArgs, jhbuildWrapperPrefixIfNeeded());
if (system(@buildArgs) ne 0) {
die "Calling autogen.sh failed!\n";
}
@@ -1953,29 +1874,34 @@ sub runAutogenForAutotoolsProjectIfNecessary($@)
sub getJhbuildPath()
{
- return join('/', baseProductDir(), "Dependencies");
+ my @jhbuildPath = File::Spec->splitdir(baseProductDir());
+ if (isGit() && isGitBranchBuild() && gitBranch()) {
+ pop(@jhbuildPath);
+ }
+ push(@jhbuildPath, "Dependencies");
+ return File::Spec->catdir(@jhbuildPath);
}
sub mustReRunAutogen($@)
{
- my ($sourceDir, $filename, @currentArguments) = @_;
+ my ($sourceDir, $filename, $currentContents) = @_;
if (! -e $filename) {
return 1;
}
- open(AUTOTOOLS_ARGUMENTS, $filename);
- chomp(my $previousArguments = <AUTOTOOLS_ARGUMENTS>);
- close(AUTOTOOLS_ARGUMENTS);
+ open(CONTENTS_FILE, $filename);
+ chomp(my $previousContents = <CONTENTS_FILE>);
+ close(CONTENTS_FILE);
# We only care about the WebKit2 argument when we are building WebKit itself.
# build-jsc never passes --enable-webkit2, so if we didn't do this, autogen.sh
# would run for every single build on the bots, since it runs both build-webkit
# and build-jsc.
- my $joinedCurrentArguments = join(" ", @currentArguments);
- if ($previousArguments ne $joinedCurrentArguments) {
- print "Previous autogen arguments were: $previousArguments\n\n";
- print "New autogen arguments are: $joinedCurrentArguments\n";
+ if ($previousContents ne $currentContents) {
+ print "Contents for file $filename have changed.\n";
+ print "Previous contents were: $previousContents\n\n";
+ print "New contents are: $currentContents\n";
return 1;
}
@@ -1984,12 +1910,11 @@ sub mustReRunAutogen($@)
sub buildAutotoolsProject($@)
{
- my ($project, $clean, @buildParams) = @_;
+ my ($project, $clean, $prefix, $makeArgs, $noWebKit1, $noWebKit2, @features) = @_;
my $make = 'make';
my $dir = productDir();
my $config = passedConfiguration() || configuration();
- my $prefix;
# Use rm to clean the build directory since distclean may miss files
if ($clean && -d $dir) {
@@ -2005,19 +1930,45 @@ sub buildAutotoolsProject($@)
return 0;
}
- my @buildArgs = ();
- my $makeArgs = $ENV{"WebKitMakeArguments"} || "";
- for my $i (0 .. $#buildParams) {
- my $opt = $buildParams[$i];
- if ($opt =~ /^--makeargs=(.*)/i ) {
- $makeArgs = $makeArgs . " " . $1;
- } elsif ($opt =~ /^--prefix=(.*)/i ) {
- $prefix = $1;
- } else {
- push @buildArgs, $opt;
+ my @buildArgs = @ARGV;
+ if ($noWebKit1) {
+ unshift(@buildArgs, "--disable-webkit1");
+ }
+ if ($noWebKit2) {
+ unshift(@buildArgs, "--disable-webkit2");
+ }
+
+ # Configurable features listed here should be kept in sync with the
+ # features for which there exists a configuration option in configure.ac.
+ my %configurableFeatures = (
+ "battery-status" => 1,
+ "gamepad" => 1,
+ "geolocation" => 1,
+ "svg" => 1,
+ "svg-fonts" => 1,
+ "video" => 1,
+ "webgl" => 1,
+ "web-audio" => 1,
+ );
+
+ # These features are ones which build-webkit cannot control, typically because
+ # they can only be active when we have the proper dependencies.
+ my %unsetFeatures = (
+ "accelerated-2d-canvas" => 1,
+ );
+
+ my @overridableFeatures = ();
+ foreach (@features) {
+ if ($configurableFeatures{$_->{option}}) {
+ push @buildArgs, autotoolsFlag(${$_->{value}}, $_->{option});;
+ } elsif (!$unsetFeatures{$_->{option}}) {
+ push @overridableFeatures, $_->{define} . "=" . (${$_->{value}} ? "1" : "0");
}
}
+ $makeArgs = $makeArgs || "";
+ $makeArgs = $makeArgs . " " . $ENV{"WebKitMakeArguments"} if $ENV{"WebKitMakeArguments"};
+
# Automatically determine the number of CPUs for make only
# if make arguments haven't already been specified.
if ($makeArgs eq "") {
@@ -2042,9 +1993,6 @@ sub buildAutotoolsProject($@)
push @buildArgs, "--disable-debug";
}
- # Enable unstable features when building through build-webkit.
- push @buildArgs, "--enable-unstable-features";
-
if (checkForArgumentAndRemoveFromArrayRef("--update-gtk", \@buildArgs)) {
# Force autogen to run, to catch the possibly updated libraries.
system("rm -f previous-autogen-arguments.txt");
@@ -2055,22 +2003,21 @@ sub buildAutotoolsProject($@)
# If GNUmakefile exists, don't run autogen.sh unless its arguments
# have changed. The makefile should be smart enough to track autotools
# dependencies and re-run autogen.sh when build files change.
- runAutogenForAutotoolsProjectIfNecessary($dir, $prefix, $sourceDir, $project, @buildArgs);
+ my $joinedOverridableFeatures = join(" ", @overridableFeatures);
+ runAutogenForAutotoolsProjectIfNecessary($dir, $prefix, $sourceDir, $project, $joinedOverridableFeatures, @buildArgs);
- my $runWithJhbuild = jhbuildWrapperPrefixIfNeeded();
+ my $runWithJhbuild = join(" ", jhbuildWrapperPrefixIfNeeded());
if (system("$runWithJhbuild $make $makeArgs") ne 0) {
die "\nFailed to build WebKit using '$make'!\n";
}
chdir ".." or die;
- if ($project eq 'WebKit' && !isCrossCompilation()) {
+ if ($project eq 'WebKit' && !isCrossCompilation() && !($noWebKit1 && $noWebKit2)) {
my @docGenerationOptions = ("$sourceDir/Tools/gtk/generate-gtkdoc", "--skip-html");
push(@docGenerationOptions, productDir());
- if ($runWithJhbuild) {
- unshift(@docGenerationOptions, $runWithJhbuild);
- }
+ unshift(@docGenerationOptions, jhbuildWrapperPrefixIfNeeded());
if (system(@docGenerationOptions)) {
die "\n gtkdoc did not build without warnings\n";
@@ -2083,14 +2030,18 @@ sub buildAutotoolsProject($@)
sub jhbuildWrapperPrefixIfNeeded()
{
if (-e getJhbuildPath()) {
+ my @prefix = (File::Spec->catfile(sourceDir(), "Tools", "jhbuild", "jhbuild-wrapper"));
if (isEfl()) {
- return File::Spec->catfile(sourceDir(), "Tools", "efl", "run-with-jhbuild");
+ push(@prefix, "--efl");
} elsif (isGtk()) {
- return File::Spec->catfile(sourceDir(), "Tools", "gtk", "run-with-jhbuild");
+ push(@prefix, "--gtk");
}
+ push(@prefix, "run");
+
+ return @prefix;
}
- return "";
+ return ();
}
sub removeCMakeCache()
@@ -2117,6 +2068,8 @@ sub generateBuildSystemFromCMakeProject
} elsif ($config =~ /debug/i) {
push @args, "-DCMAKE_BUILD_TYPE=Debug";
}
+ # Don't warn variables which aren't used by cmake ports.
+ push @args, "--no-warn-unused-cli";
push @args, @cmakeArgs if @cmakeArgs;
push @args, $additionalCMakeArgs if $additionalCMakeArgs;
@@ -2131,7 +2084,7 @@ sub generateBuildSystemFromCMakeProject
# We call system("cmake @args") instead of system("cmake", @args) so that @args is
# parsed for shell metacharacters.
- my $wrapper = jhbuildWrapperPrefixIfNeeded() . " ";
+ my $wrapper = join(" ", jhbuildWrapperPrefixIfNeeded()) . " ";
my $returnCode = system($wrapper . "cmake @args");
chdir($originalWorkingDirectory);
@@ -2151,7 +2104,7 @@ sub buildCMakeGeneratedProject($)
# We call system("cmake @args") instead of system("cmake", @args) so that @args is
# parsed for shell metacharacters. In particular, $makeArgs may contain such metacharacters.
- my $wrapper = jhbuildWrapperPrefixIfNeeded() . " ";
+ my $wrapper = join(" ", jhbuildWrapperPrefixIfNeeded()) . " ";
return system($wrapper . "cmake @args");
}
@@ -2190,7 +2143,7 @@ sub buildCMakeProjectOrExit($$$$@)
sub cmakeBasedPortArguments()
{
return blackberryCMakeArguments() if isBlackBerry();
- return ('-DCMAKE_WINCE_SDK="STANDARDSDK_500 (ARMV4I)"') if isWinCE();
+ return ('-G "Visual Studio 8 2005 STANDARDSDK_500 (ARMV4I)"') if isWinCE();
return ();
}
@@ -2241,7 +2194,7 @@ sub buildQMakeProjects
}
# Automatically determine the number of CPUs for make only if this make argument haven't already been specified.
- if ($make eq "make" && $makeargs !~ /-j\s*\d+/i && (!defined $ENV{"MAKEFLAGS"} || ($ENV{"MAKEFLAGS"} !~ /-j\s*\d+/i ))) {
+ if ($make eq "make" && $makeargs !~ /-[^\s]*?j\s*\d+/i && (!defined $ENV{"MAKEFLAGS"} || ($ENV{"MAKEFLAGS"} !~ /-[^\s]*?j\s*\d+/i ))) {
$makeargs .= " -j" . numberOfCPUs();
}
@@ -2324,6 +2277,11 @@ sub buildQMakeProjects
my $maybeNeedsCleanBuild = 0;
my $needsIncrementalBuild = 0;
+ # Full incremental build (run qmake) needed on buildbots and EWS bots always.
+ if (grep(/CONFIG\+=buildbot/,@buildParams)) {
+ $needsIncrementalBuild = 1;
+ }
+
if ($svnRevision ne $previousSvnRevision) {
print "Last built revision was " . $previousSvnRevision .
", now at revision $svnRevision. Full incremental build needed.\n";
@@ -2401,129 +2359,13 @@ EOF
sub buildGtkProject
{
- my ($project, $clean, @buildArgs) = @_;
+ my ($project, $clean, $prefix, $makeArgs, $noWebKit1, $noWebKit2, @features) = @_;
if ($project ne "WebKit" and $project ne "JavaScriptCore" and $project ne "WTF") {
die "Unsupported project: $project. Supported projects: WebKit, JavaScriptCore, WTF\n";
}
- return buildAutotoolsProject($project, $clean, @buildArgs);
-}
-
-sub buildChromiumMakefile($$@)
-{
- my ($target, $clean, @options) = @_;
- if ($clean) {
- return system qw(rm -rf out);
- }
- my $config = configuration();
- my $numCpus = numberOfCPUs();
- my $makeArgs;
- for (@options) {
- $makeArgs = $1 if /^--makeargs=(.*)/i;
- }
- $makeArgs = "-j$numCpus" if not $makeArgs;
- my $command .= "make -fMakefile.chromium $makeArgs BUILDTYPE=$config $target";
-
- print "$command\n";
- return system $command;
-}
-
-sub buildChromiumNinja($$@)
-{
- # rm -rf out requires rerunning gyp, so don't support --clean for now.
- my ($target, @options) = @_;
- my $config = configuration();
- my $makeArgs = "";
- for (@options) {
- $makeArgs = $1 if /^--makeargs=(.*)/i;
- }
- my $command = "";
-
- # Find ninja.
- my $ninjaPath;
- if (commandExists('ninja')) {
- $ninjaPath = 'ninja';
- } elsif (-e 'Source/WebKit/chromium/depot_tools/ninja') {
- $ninjaPath = 'Source/WebKit/chromium/depot_tools/ninja';
- } else {
- die "ninja not found. Install chromium's depot_tools by running update-webkit first\n";
- }
-
- $command .= "$ninjaPath -C out/$config $target $makeArgs";
-
- print "$command\n";
- return system $command;
-}
-
-sub buildChromiumVisualStudioProject($$)
-{
- my ($projectPath, $clean) = @_;
-
- my $config = configuration();
- my $action = "/build";
- $action = "/clean" if $clean;
-
- # Find Visual Studio installation.
- my $vsInstallDir;
- my $programFilesPath = $ENV{'PROGRAMFILES'} || "C:\\Program Files";
- if ($ENV{'VSINSTALLDIR'}) {
- $vsInstallDir = $ENV{'VSINSTALLDIR'};
- } else {
- $vsInstallDir = "$programFilesPath/Microsoft Visual Studio 8";
- }
- $vsInstallDir =~ s,\\,/,g;
- $vsInstallDir = `cygpath "$vsInstallDir"` if isCygwin();
- chomp $vsInstallDir;
- $vcBuildPath = "$vsInstallDir/Common7/IDE/devenv.com";
- if (! -e $vcBuildPath) {
- # Visual Studio not found, try VC++ Express
- $vcBuildPath = "$vsInstallDir/Common7/IDE/VCExpress.exe";
- if (! -e $vcBuildPath) {
- print "*************************************************************\n";
- print "Cannot find '$vcBuildPath'\n";
- print "Please execute the file 'vcvars32.bat' from\n";
- print "'$programFilesPath\\Microsoft Visual Studio 8\\VC\\bin\\'\n";
- print "to setup the necessary environment variables.\n";
- print "*************************************************************\n";
- die;
- }
- }
-
- # Create command line and execute it.
- my @command = ($vcBuildPath, $projectPath, $action, $config);
- print "Building results into: ", baseProductDir(), "\n";
- print join(" ", @command), "\n";
- return system @command;
-}
-
-sub buildChromium($@)
-{
- my ($clean, @options) = @_;
-
- # We might need to update DEPS or re-run GYP if things have changed.
- if (checkForArgumentAndRemoveFromArrayRef("--update-chromium", \@options)) {
- my @updateCommand = ("perl", "Tools/Scripts/update-webkit-chromium", "--force");
- push @updateCommand, "--chromium-android" if isChromiumAndroid();
- system(@updateCommand) == 0 or die $!;
- }
-
- my $result = 1;
- if (isDarwin() && !isChromiumAndroid() && !isChromiumMacMake() && !isChromiumNinja()) {
- # Mac build - builds the root xcode project.
- $result = buildXCodeProject("Source/WebKit/chromium/All", $clean, "-configuration", configuration(), @options);
- } elsif (isCygwin() || isWindows()) {
- # Windows build - builds the root visual studio solution.
- $result = buildChromiumVisualStudioProject("Source/WebKit/chromium/All.sln", $clean);
- } elsif (isChromiumNinja() && !isChromiumAndroid()) {
- $result = buildChromiumNinja("all", $clean, @options);
- } elsif (isLinux() || isChromiumAndroid() || isChromiumMacMake()) {
- # Linux build - build using make.
- $result = buildChromiumMakefile("all", $clean, @options);
- } else {
- print STDERR "This platform is not supported by chromium.\n";
- }
- return $result;
+ return buildAutotoolsProject($project, $clean, $prefix, $makeArgs, $noWebKit1, $noWebKit2, @features);
}
sub appleApplicationSupportPath
@@ -2640,7 +2482,7 @@ sub execMacWebKitAppForDebugging($)
die "Targetting the Web Process is not compatible with using an XPC Service for the Web Process at this time.";
}
- my $webProcessShimPath = File::Spec->catfile($productDir, "WebProcessShim.dylib");
+ my $webProcessShimPath = File::Spec->catfile($productDir, "SecItemShim.dylib");
my $webProcessPath = File::Spec->catdir($productDir, "WebProcess.app");
my $webKit2ExecutablePath = File::Spec->catfile($productDir, "WebKit2.framework", "WebKit2");
@@ -2658,15 +2500,6 @@ sub debugSafari
execMacWebKitAppForDebugging(safariPath());
}
- if (isAppleWinWebKit()) {
- setupCygwinEnv();
- my $productDir = productDir();
- chomp($ENV{WEBKITNIGHTLY} = `cygpath -wa "$productDir"`);
- my $safariPath = safariPath();
- chomp($safariPath = `cygpath -wa "$safariPath"`);
- return system { $vcBuildPath } $vcBuildPath, "/debugexe", "\"$safariPath\"", @ARGV;
- }
-
return 1; # Unsupported platform; can't debug Safari on this platform.
}
@@ -2680,7 +2513,7 @@ sub runSafari
if (isAppleWinWebKit()) {
my $result;
my $productDir = productDir();
- my $webKitLauncherPath = File::Spec->catfile(productDir(), "WebKit.exe");
+ my $webKitLauncherPath = File::Spec->catfile(productDir(), "WinLauncher.exe");
return system { $webKitLauncherPath } $webKitLauncherPath, @ARGV;
}
diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm
index c104d1f31..0e39102ed 100644
--- a/Tools/Scripts/webkitperl/FeatureList.pm
+++ b/Tools/Scripts/webkitperl/FeatureList.pm
@@ -44,35 +44,42 @@ BEGIN {
my (
$threeDRenderingSupport,
$accelerated2DCanvasSupport,
- $animationAPISupport,
$batteryStatusSupport,
$blobSupport,
+ $canvasPathSupport,
+ $canvasProxySupport,
$channelMessagingSupport,
$cspNextSupport,
- $css3BackgroundSupport,
$css3ConditionalRulesSupport,
$css3TextSupport,
+ $css3TextLineBreakSupport,
+ $css4ImagesSupport,
$cssBoxDecorationBreakSupport,
$cssDeviceAdaptation,
$cssExclusionsSupport,
$cssFiltersSupport,
- $cssHierarchiesSupport,
$cssImageOrientationSupport,
$cssImageResolutionSupport,
+ $cssImageSetSupport,
$cssRegionsSupport,
$cssShadersSupport,
+ $cssShapesSupport,
+ $cssStickyPositionSupport,
$cssCompositingSupport,
+ $cssAnimationsTransformsUnprefixedSupport,
$cssVariablesSupport,
$customSchemeHandlerSupport,
$dataTransferItemsSupport,
- $datalistSupport,
- $detailsSupport,
+ $datalistElementSupport,
+ $detailsElementSupport,
$deviceOrientationSupport,
$dialogElementSupport,
$directoryUploadSupport,
+ $dom4EventsConstructor,
$downloadAttributeSupport,
$fileSystemSupport,
$filtersSupport,
+ $fontLoadEventsSupport,
$ftpDirSupport,
$fullscreenAPISupport,
$gamepadSupport,
@@ -80,7 +87,6 @@ my (
$highDPICanvasSupport,
$icondatabaseSupport,
$iframeSeamlessSupport,
- $imageResizerSupport,
$indexedDatabaseSupport,
$inputSpeechSupport,
$inputTypeColorSupport,
@@ -102,72 +108,79 @@ my (
$mediaSourceSupport,
$mediaStatisticsSupport,
$mediaStreamSupport,
- $meterTagSupport,
+ $meterElementSupport,
$mhtmlSupport,
$microdataSupport,
- $mutationObserversSupport,
+ $mouseCursorScaleSupport,
$netscapePluginAPISupport,
$networkInfoSupport,
+ $nosniffSupport,
$notificationsSupport,
$orientationEventsSupport,
$pageVisibilityAPISupport,
- $progressTagSupport,
+ $performanceTimelineSupport,
+ $progressElementSupport,
$proximityEventsSupport,
$quotaSupport,
$resolutionMediaQuerySupport,
$registerProtocolHandlerSupport,
$requestAnimationFrameSupport,
+ $resourceTimingSupport,
$scriptedSpeechSupport,
+ $seccompFiltersSupport,
$shadowDOMSupport,
$sharedWorkersSupport,
$sqlDatabaseSupport,
$styleScopedSupport,
+ $suidLinuxSandbox,
$svgDOMObjCBindingsSupport,
$svgFontsSupport,
$svgSupport,
$systemMallocSupport,
- $templateTagSupport,
+ $templateElementSupport,
$textAutosizingSupport,
$tiledBackingStoreSupport,
+ $threadedHTMLParserSupport,
$touchEventsSupport,
$touchSliderSupport,
$touchIconLoadingSupport,
+ $userTimingSupport,
$vibrationSupport,
$videoSupport,
$videoTrackSupport,
$webglSupport,
$webAudioSupport,
- $webIntentsSupport,
- $webIntentsTagSupport,
$webSocketsSupport,
$webTimingSupport,
$workersSupport,
- $xhrResponseBlobSupport,
$xhrTimeoutSupport,
$xsltSupport,
);
my @features = (
{ option => "3d-rendering", desc => "Toggle 3D Rendering support",
- define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() || isQt()), value => \$threeDRenderingSupport },
+ define => "ENABLE_3D_RENDERING", default => (isAppleMacWebKit() || isGtk() || isEfl()), value => \$threeDRenderingSupport },
{ option => "accelerated-2d-canvas", desc => "Toggle Accelerated 2D Canvas support",
define => "ENABLE_ACCELERATED_2D_CANVAS", default => 0, value => \$accelerated2DCanvasSupport },
- { option => "animation-api", desc => "Toggle Animation API support",
- define => "ENABLE_ANIMATION_API", default => (isBlackBerry() || isEfl()), value => \$animationAPISupport },
-
{ option => "battery-status", desc => "Toggle Battery Status support",
define => "ENABLE_BATTERY_STATUS", default => (isEfl() || isBlackBerry()), value => \$batteryStatusSupport },
{ option => "blob", desc => "Toggle Blob support",
- define => "ENABLE_BLOB", default => (isAppleMacWebKit() || isGtk() || isChromium() || isBlackBerry() || isEfl()), value => \$blobSupport },
+ define => "ENABLE_BLOB", default => (isAppleMacWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$blobSupport },
+
+ { option => "canvas-path", desc => "Toggle Canvas Path support",
+ define => "ENABLE_CANVAS_PATH", default => 1, value => \$canvasPathSupport },
+
+ { option => "canvas-proxy", desc => "Toggle CanvasProxy support",
+ define => "ENABLE_CANVAS_PROXY", default => 0, value => \$canvasProxySupport },
{ option => "channel-messaging", desc => "Toggle Channel Messaging support",
define => "ENABLE_CHANNEL_MESSAGING", default => 1, value => \$channelMessagingSupport },
{ option => "csp-next", desc => "Toggle Content Security Policy 1.1 support",
- define => "ENABLE_CSP_NEXT", default => 0, value => \$cspNextSupport },
+ define => "ENABLE_CSP_NEXT", default => isGtk(), value => \$cspNextSupport },
{ option => "css-device-adaptation", desc => "Toggle CSS Device Adaptation support",
define => "ENABLE_CSS_DEVICE_ADAPTATION", default => isEfl(), value => \$cssDeviceAdaptation },
@@ -175,26 +188,32 @@ my @features = (
{ option => "css-exclusions", desc => "Toggle CSS Exclusions support",
define => "ENABLE_CSS_EXCLUSIONS", default => 1, value => \$cssExclusionsSupport },
+ { option => "css-shapes", desc => "Toggle CSS Shapes support",
+ define => "ENABLE_CSS_SHAPES", default => 1, value => \$cssShapesSupport },
+
{ option => "css-filters", desc => "Toggle CSS Filters support",
define => "ENABLE_CSS_FILTERS", default => isAppleWebKit() || isBlackBerry(), value => \$cssFiltersSupport },
- { option => "css3-background", desc => "Toggle CSS3 Background support",
- define => "ENABLE_CSS3_BACKGROUND", default => 0, value => \$css3BackgroundSupport },
-
{ option => "css3-conditional-rules", desc => "Toggle CSS3 Conditional Rules support (i.e. \@supports)",
define => "ENABLE_CSS3_CONDITIONAL_RULES", default => 0, value => \$css3ConditionalRulesSupport },
{ option => "css3-text", desc => "Toggle CSS3 Text support",
- define => "ENABLE_CSS3_TEXT", default => isEfl(), value => \$css3TextSupport },
+ define => "ENABLE_CSS3_TEXT", default => (isEfl() || isGtk()), value => \$css3TextSupport },
+
+ { option => "css3-text-line-break", desc => "Toggle CSS3 Text Line Break support",
+ define => "ENABLE_CSS3_TEXT_LINE_BREAK", default => 0, value => \$css3TextLineBreakSupport },
{ option => "css-box-decoration-break", desc => "Toggle CSS box-decoration-break support",
define => "ENABLE_CSS_BOX_DECORATION_BREAK", default => 1, value => \$cssBoxDecorationBreakSupport },
{ option => "css-image-orientation", desc => "Toggle CSS image-orientation support",
- define => "ENABLE_CSS_IMAGE_ORIENTATION", default => 0, value => \$cssImageOrientationSupport },
+ define => "ENABLE_CSS_IMAGE_ORIENTATION", default => isGtk(), value => \$cssImageOrientationSupport },
{ option => "css-image-resolution", desc => "Toggle CSS image-resolution support",
- define => "ENABLE_CSS_IMAGE_RESOLUTION", default => 0, value => \$cssImageResolutionSupport },
+ define => "ENABLE_CSS_IMAGE_RESOLUTION", default => (isBlackBerry() || isGtk()), value => \$cssImageResolutionSupport },
+
+ { option => "css-image-set", desc => "Toggle CSS image-set support",
+ define => "ENABLE_CSS_IMAGE_SET", default => (isEfl() || isGtk()), value => \$cssImageSetSupport },
{ option => "css-regions", desc => "Toggle CSS Regions support",
define => "ENABLE_CSS_REGIONS", default => 1, value => \$cssRegionsSupport },
@@ -202,33 +221,42 @@ my @features = (
{ option => "css-shaders", desc => "Toggle CSS Shaders support",
define => "ENABLE_CSS_SHADERS", default => isAppleMacWebKit(), value => \$cssShadersSupport },
+ { option => "css-sticky-position", desc => "Toggle CSS sticky position support",
+ define => "ENABLE_CSS_STICKY_POSITION", default => (isGtk() || isEfl()), value => \$cssStickyPositionSupport },
+
{ option => "css-compositing", desc => "Toggle CSS Compositing support",
define => "ENABLE_CSS_COMPOSITING", default => isAppleWebKit(), value => \$cssCompositingSupport },
+ { option => "css-transforms-animations-unprefixed", desc => "Toggle support for unprefixed CSS animations and transforms",
+ define => "ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED", default => 1, value => \$cssAnimationsTransformsUnprefixedSupport },
+
{ option => "css-variables", desc => "Toggle CSS Variable support",
- define => "ENABLE_CSS_VARIABLES", default => (isBlackBerry() || isEfl()), value => \$cssVariablesSupport },
+ define => "ENABLE_CSS_VARIABLES", default => (isBlackBerry() || isEfl() || isGtk()), value => \$cssVariablesSupport },
{ option => "custom-scheme-handler", desc => "Toggle Custom Scheme Handler support",
define => "ENABLE_CUSTOM_SCHEME_HANDLER", default => (isBlackBerry() || isEfl()), value => \$customSchemeHandlerSupport },
- { option => "datalist", desc => "Toggle Datalist support",
- define => "ENABLE_DATALIST_ELEMENT", default => isEfl(), value => \$datalistSupport },
+ { option => "datalist-element", desc => "Toggle Datalist Element support",
+ define => "ENABLE_DATALIST_ELEMENT", default => isEfl(), value => \$datalistElementSupport },
{ option => "data-transfer-items", desc => "Toggle Data Transfer Items support",
define => "ENABLE_DATA_TRANSFER_ITEMS", default => 0, value => \$dataTransferItemsSupport },
- { option => "details", desc => "Toggle Details support",
- define => "ENABLE_DETAILS_ELEMENT", default => 1, value => \$detailsSupport },
+ { option => "details-element", desc => "Toggle Details Element support",
+ define => "ENABLE_DETAILS_ELEMENT", default => 1, value => \$detailsElementSupport },
{ option => "device-orientation", desc => "Toggle Device Orientation support",
define => "ENABLE_DEVICE_ORIENTATION", default => isBlackBerry(), value => \$deviceOrientationSupport },
- { option => "dialog", desc => "Toggle Dialog Element support",
+ { option => "dialog-element", desc => "Toggle Dialog Element support",
define => "ENABLE_DIALOG_ELEMENT", default => 0, value => \$dialogElementSupport },
{ option => "directory-upload", desc => "Toggle Directory Upload support",
define => "ENABLE_DIRECTORY_UPLOAD", default => 0, value => \$directoryUploadSupport },
+ { option => "dom4-events-constructor", desc => "Expose DOM4 Events constructors",
+ define => "ENABLE_DOM4_EVENTS_CONSTRUCTOR", default => (isAppleWebKit() || isGtk() || isEfl()), value => \$dom4EventsConstructor },
+
{ option => "download-attribute", desc => "Toggle Download Attribute support",
define => "ENABLE_DOWNLOAD_ATTRIBUTE", default => (isBlackBerry() || isEfl()), value => \$downloadAttributeSupport },
@@ -236,16 +264,19 @@ my @features = (
define => "ENABLE_FILE_SYSTEM", default => isBlackBerry(), value => \$fileSystemSupport },
{ option => "filters", desc => "Toggle Filters support",
- define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isQt() || isEfl() || isBlackBerry()), value => \$filtersSupport },
+ define => "ENABLE_FILTERS", default => (isAppleWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$filtersSupport },
+
+ { option => "font-load-events", desc => "Toggle Font Load Events support",
+ define => "ENABLE_FONT_LOAD_EVENTS", default => 0, value => \$fontLoadEventsSupport },
{ option => "ftpdir", desc => "Toggle FTP Directory support",
define => "ENABLE_FTPDIR", default => !isWinCE(), value => \$ftpDirSupport },
{ option => "fullscreen-api", desc => "Toggle Fullscreen API support",
- define => "ENABLE_FULLSCREEN_API", default => (isAppleMacWebKit() || isEfl() || isGtk() || isBlackBerry() || isQt()), value => \$fullscreenAPISupport },
+ define => "ENABLE_FULLSCREEN_API", default => (isAppleMacWebKit() || isEfl() || isGtk() || isBlackBerry()), value => \$fullscreenAPISupport },
{ option => "gamepad", desc => "Toggle Gamepad support",
- define => "ENABLE_GAMEPAD", default => (isEfl() || isGtk() || isQt()), value => \$gamepadSupport },
+ define => "ENABLE_GAMEPAD", default => (isEfl() || isGtk()), value => \$gamepadSupport },
{ option => "geolocation", desc => "Toggle Geolocation support",
define => "ENABLE_GEOLOCATION", default => (isAppleWebKit() || isGtk() || isBlackBerry()), value => \$geolocationSupport },
@@ -260,19 +291,19 @@ my @features = (
define => "ENABLE_IFRAME_SEAMLESS", default => 1, value => \$iframeSeamlessSupport },
{ option => "indexed-database", desc => "Toggle Indexed Database support",
- define => "ENABLE_INDEXED_DATABASE", default => 0, value => \$indexedDatabaseSupport },
+ define => "ENABLE_INDEXED_DATABASE", default => (isGtk() || isEfl()), value => \$indexedDatabaseSupport },
{ option => "input-speech", desc => "Toggle Input Speech support",
define => "ENABLE_INPUT_SPEECH", default => 0, value => \$inputSpeechSupport },
{ option => "input-type-color", desc => "Toggle Input Type Color support",
- define => "ENABLE_INPUT_TYPE_COLOR", default => (isBlackBerry() || isEfl() || isQt()), value => \$inputTypeColorSupport },
+ define => "ENABLE_INPUT_TYPE_COLOR", default => (isBlackBerry() || isEfl()), value => \$inputTypeColorSupport },
{ option => "input-type-date", desc => "Toggle Input Type Date support",
define => "ENABLE_INPUT_TYPE_DATE", default => 0, value => \$inputTypeDateSupport },
- { option => "input-type-datetime", desc => "Toggle Input Type Datetime support",
- define => "ENABLE_INPUT_TYPE_DATETIME", default => 0, value => \$inputTypeDatetimeSupport },
+ { option => "input-type-datetime", desc => "Toggle broken Input Type Datetime support",
+ define => "ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE", default => 0, value => \$inputTypeDatetimeSupport },
{ option => "input-type-datetimelocal", desc => "Toggle Input Type Datetimelocal support",
define => "ENABLE_INPUT_TYPE_DATETIMELOCAL", default => 0, value => \$inputTypeDatetimelocalSupport },
@@ -296,7 +327,7 @@ my @features = (
define => "ENABLE_LEGACY_NOTIFICATIONS", default => isBlackBerry(), value => \$legacyNotificationsSupport },
{ option => "legacy-vendor-prefixes", desc => "Toggle Legacy Vendor Prefix support",
- define => "ENABLE_LEGACY_VENDOR_PREFIXES", default => !isChromium(), value => \$legacyVendorPrefixSupport },
+ define => "ENABLE_LEGACY_VENDOR_PREFIXES", default => 1, value => \$legacyVendorPrefixSupport },
{ option => "legacy-web-audio", desc => "Toggle Legacy Web Audio support",
define => "ENABLE_LEGACY_WEB_AUDIO", default => 1, value => \$legacyWebAudioSupport },
@@ -304,11 +335,8 @@ my @features = (
{ option => "link-prefetch", desc => "Toggle Link Prefetch support",
define => "ENABLE_LINK_PREFETCH", default => (isGtk() || isEfl()), value => \$linkPrefetchSupport },
- { option => "link-prerender", desc => "Toggle Link Prerender support",
- define => "ENABLE_LINK_PRERENDER", default => 0, value => \$linkPrerenderSupport },
-
{ option => "mathml", desc => "Toggle MathML support",
- define => "ENABLE_MATHML", default => 1, value => \$mathmlSupport },
+ define => "ENABLE_MATHML", default => !isBlackBerry(), value => \$mathmlSupport },
{ option => "media-capture", desc => "Toggle Media Capture support",
define => "ENABLE_MEDIA_CAPTURE", default => isEfl(), value => \$mediaCaptureSupport },
@@ -320,19 +348,19 @@ my @features = (
define => "ENABLE_MEDIA_STATISTICS", default => 0, value => \$mediaStatisticsSupport },
{ option => "media-stream", desc => "Toggle Media Stream support",
- define => "ENABLE_MEDIA_STREAM", default => (isChromium() || isGtk() || isBlackBerry()), value => \$mediaStreamSupport },
+ define => "ENABLE_MEDIA_STREAM", default => isBlackBerry(), value => \$mediaStreamSupport },
- { option => "meter-tag", desc => "Toggle Meter Tag support",
- define => "ENABLE_METER_ELEMENT", default => !isAppleWinWebKit(), value => \$meterTagSupport },
+ { option => "meter-element", desc => "Toggle Meter Element support",
+ define => "ENABLE_METER_ELEMENT", default => !isAppleWinWebKit(), value => \$meterElementSupport },
{ option => "mhtml", desc => "Toggle MHTML support",
- define => "ENABLE_MHTML", default => isGtk(), value => \$mhtmlSupport },
+ define => "ENABLE_MHTML", default => (isGtk() || isEfl()), value => \$mhtmlSupport },
{ option => "microdata", desc => "Toggle Microdata support",
- define => "ENABLE_MICRODATA", default => (isEfl() || isBlackBerry()), value => \$microdataSupport },
+ define => "ENABLE_MICRODATA", default => (isEfl() || isBlackBerry() || isGtk()), value => \$microdataSupport },
- { option => "mutation-observers", desc => "Toggle Mutation Observers support",
- define => "ENABLE_MUTATION_OBSERVERS", default => 1, value => \$mutationObserversSupport },
+ { option => "mouse-cursor-scale", desc => "Toggle Scaled mouse cursor support",
+ define => "ENABLE_MOUSE_CURSOR_SCALE", default => isEfl(), value => \$mouseCursorScaleSupport },
{ option => "navigator-content-utils", desc => "Toggle Navigator Content Utils support",
define => "ENABLE_NAVIGATOR_CONTENT_UTILS", default => (isBlackBerry() || isEfl()), value => \$registerProtocolHandlerSupport },
@@ -343,6 +371,9 @@ my @features = (
{ option => "network-info", desc => "Toggle Network Info support",
define => "ENABLE_NETWORK_INFO", default => (isEfl() || isBlackBerry()), value => \$networkInfoSupport },
+ { option => "nosniff", desc => "Toggle support for 'X-Content-Type-Options: nosniff'",
+ define => "ENABLE_NOSNIFF", default => 0, value => \$nosniffSupport },
+
{ option => "notifications", desc => "Toggle Notifications support",
define => "ENABLE_NOTIFICATIONS", default => isBlackBerry(), value => \$notificationsSupport },
@@ -350,10 +381,13 @@ my @features = (
define => "ENABLE_ORIENTATION_EVENTS", default => isBlackBerry(), value => \$orientationEventsSupport },
{ option => "page-visibility-api", desc => "Toggle Page Visibility API support",
- define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl()), value => \$pageVisibilityAPISupport },
+ define => "ENABLE_PAGE_VISIBILITY_API", default => (isBlackBerry() || isEfl() || isGtk()), value => \$pageVisibilityAPISupport },
+
+ { option => "performance-timeline", desc => "Toggle Performance Timeline support",
+ define => "ENABLE_PERFORMANCE_TIMELINE", default => isGtk(), value => \$performanceTimelineSupport },
- { option => "progress-tag", desc => "Toggle Progress Tag support",
- define => "ENABLE_PROGRESS_ELEMENT", default => 1, value => \$progressTagSupport },
+ { option => "progress-element", desc => "Toggle Progress Element support",
+ define => "ENABLE_PROGRESS_ELEMENT", default => 1, value => \$progressElementSupport },
{ option => "proximity-events", desc => "Toggle Proximity Events support",
define => "ENABLE_PROXIMITY_EVENTS", default => 0, value => \$proximityEventsSupport },
@@ -362,16 +396,22 @@ my @features = (
define => "ENABLE_QUOTA", default => 0, value => \$quotaSupport },
{ option => "resolution-media-query", desc => "Toggle resolution media query support",
- define => "ENABLE_RESOLUTION_MEDIA_QUERY", default => (isEfl() || isQt()), value => \$resolutionMediaQuerySupport },
+ define => "ENABLE_RESOLUTION_MEDIA_QUERY", default => isEfl(), value => \$resolutionMediaQuerySupport },
+
+ { option => "resource-timing", desc => "Toggle Resource Timing support",
+ define => "ENABLE_RESOURCE_TIMING", default => isGtk(), value => \$resourceTimingSupport },
{ option => "request-animation-frame", desc => "Toggle Request Animation Frame support",
define => "ENABLE_REQUEST_ANIMATION_FRAME", default => (isAppleMacWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$requestAnimationFrameSupport },
+ { option => "seccomp-filters", desc => "Toggle Seccomp Filter sandbox",
+ define => "ENABLE_SECCOMP_FILTERS", default => 0, value => \$seccompFiltersSupport },
+
{ option => "scripted-speech", desc => "Toggle Scripted Speech support",
define => "ENABLE_SCRIPTED_SPEECH", default => 0, value => \$scriptedSpeechSupport },
{ option => "shadow-dom", desc => "Toggle Shadow DOM support",
- define => "ENABLE_SHADOW_DOM", default => (isGtk() || isEfl()), value => \$shadowDOMSupport },
+ define => "ENABLE_SHADOW_DOM", default => 0, value => \$shadowDOMSupport },
{ option => "shared-workers", desc => "Toggle Shared Workers support",
define => "ENABLE_SHARED_WORKERS", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$sharedWorkersSupport },
@@ -380,31 +420,34 @@ my @features = (
define => "ENABLE_SQL_DATABASE", default => 1, value => \$sqlDatabaseSupport },
{ option => "style-scoped", desc => "Toggle Style Scoped support",
- define => "ENABLE_STYLE_SCOPED", default => isBlackBerry(), value => \$styleScopedSupport },
+ define => "ENABLE_STYLE_SCOPED", default => (isBlackBerry() || isGtk()), value => \$styleScopedSupport },
+
+ { option => "suid-linux-sandbox", desc => "Toggle suid sandbox for linux",
+ define => "ENABLE_SUID_SANDBOX_LINUX", default => 0, value => \$suidLinuxSandbox },
{ option => "svg", desc => "Toggle SVG support",
define => "ENABLE_SVG", default => 1, value => \$svgSupport },
- { option => "svg-dom-objc-bindings", desc => "Toggle SVG DOM ObjC Bindings support",
- define => "ENABLE_SVG_DOM_OBJC_BINDINGS", default => isAppleMacWebKit(), value => \$svgDOMObjCBindingsSupport },
-
{ option => "svg-fonts", desc => "Toggle SVG Fonts support",
define => "ENABLE_SVG_FONTS", default => 1, value => \$svgFontsSupport },
{ option => "system-malloc", desc => "Toggle system allocator instead of TCmalloc",
- define => "USE_SYSTEM_MALLOC", default => isWinCE(), value => \$systemMallocSupport },
+ define => "USE_SYSTEM_MALLOC", default => (isBlackBerry() || isWinCE()), value => \$systemMallocSupport },
- { option => "template-tag", desc => "Toggle Templates Tag support",
- define => "ENABLE_TEMPLATE_ELEMENT", default => !isAppleWinWebKit(), value => \$templateTagSupport },
+ { option => "template-element", desc => "Toggle HTMLTemplateElement support",
+ define => "ENABLE_TEMPLATE_ELEMENT", default => (isEfl() || isGtk()), value => \$templateElementSupport },
{ option => "text-autosizing", desc => "Toggle Text Autosizing support",
- define => "ENABLE_TEXT_AUTOSIZING", default => 0, value => \$textAutosizingSupport },
+ define => "ENABLE_TEXT_AUTOSIZING", default => isBlackBerry(), value => \$textAutosizingSupport },
{ option => "tiled-backing-store", desc => "Toggle Tiled Backing Store support",
- define => "WTF_USE_TILED_BACKING_STORE", default => (isQt() || isEfl()), value => \$tiledBackingStoreSupport },
+ define => "WTF_USE_TILED_BACKING_STORE", default => isEfl(), value => \$tiledBackingStoreSupport },
+
+ { option => "threaded-html-parser", desc => "Toggle threaded HTML parser support",
+ define => "ENABLE_THREADED_HTML_PARSER", default => 0, value => \$threadedHTMLParserSupport },
{ option => "touch-events", desc => "Toggle Touch Events support",
- define => "ENABLE_TOUCH_EVENTS", default => (isQt() || isBlackBerry() || isEfl()), value => \$touchEventsSupport },
+ define => "ENABLE_TOUCH_EVENTS", default => (isBlackBerry() || isEfl()), value => \$touchEventsSupport },
{ option => "touch-slider", desc => "Toggle Touch Slider support",
define => "ENABLE_TOUCH_SLIDER", default => isBlackBerry(), value => \$touchSliderSupport },
@@ -412,6 +455,9 @@ my @features = (
{ option => "touch-icon-loading", desc => "Toggle Touch Icon Loading Support",
define => "ENABLE_TOUCH_ICON_LOADING", default => 0, value => \$touchIconLoadingSupport },
+ { option => "user-timing", desc => "Toggle User Timing support",
+ define => "ENABLE_USER_TIMING", default => isGtk(), value => \$userTimingSupport },
+
{ option => "vibration", desc => "Toggle Vibration support",
define => "ENABLE_VIBRATION", default => (isEfl() || isBlackBerry()), value => \$vibrationSupport },
@@ -422,16 +468,10 @@ my @features = (
define => "ENABLE_VIDEO_TRACK", default => (isAppleWebKit() || isGtk() || isEfl() || isBlackBerry()), value => \$videoTrackSupport },
{ option => "webgl", desc => "Toggle WebGL support",
- define => "ENABLE_WEBGL", default => (isAppleMacWebKit() || isGtk()), value => \$webglSupport },
+ define => "ENABLE_WEBGL", default => (isAppleMacWebKit() || isGtk() || isEfl()), value => \$webglSupport },
{ option => "web-audio", desc => "Toggle Web Audio support",
- define => "ENABLE_WEB_AUDIO", default => 0, value => \$webAudioSupport },
-
- { option => "web-intents", desc => "Toggle Web Intents support",
- define => "ENABLE_WEB_INTENTS", default => isEfl(), value => \$webIntentsSupport },
-
- { option => "web-intents-tag", desc => "Toggle Web Intents Tag support",
- define => "ENABLE_WEB_INTENTS_TAG", default => isEfl(), value => \$webIntentsTagSupport },
+ define => "ENABLE_WEB_AUDIO", default => (isEfl() || isGtk()), value => \$webAudioSupport },
{ option => "web-sockets", desc => "Toggle Web Sockets support",
define => "ENABLE_WEB_SOCKETS", default => 1, value => \$webSocketsSupport },
@@ -442,9 +482,6 @@ my @features = (
{ option => "workers", desc => "Toggle Workers support",
define => "ENABLE_WORKERS", default => (isAppleWebKit() || isGtk() || isBlackBerry() || isEfl()), value => \$workersSupport },
- { option => "xhr-response-blob", desc => "Toggle XHR Response BLOB support",
- define => "ENABLE_XHR_RESPONSE_BLOB", default => isBlackBerry(), value => \$xhrResponseBlobSupport },
-
{ option => "xhr-timeout", desc => "Toggle XHR Timeout support",
define => "ENABLE_XHR_TIMEOUT", default => (isEfl() || isGtk() || isAppleMacWebKit()), value => \$xhrTimeoutSupport },
diff --git a/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl b/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
index d4165620b..5b30fcbb8 100644
--- a/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
+++ b/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl
@@ -980,11 +980,11 @@ index f5d5e74..3b6aa92 100644
END
expectedReturn => [
[{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: Makefile
index f5d5e74..3b6aa92 100644
---- Makefile
-+++ Makefile
+--- Makefile\t(revision 0)
++++ Makefile\t(working copy)
@@ -1,1 +1,1 @@ public:
END
indexPath => "Makefile",
@@ -1008,11 +1008,11 @@ index 863339f..db418b2 100644
END
expectedReturn => [
[{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo
index 863339f..db418b2 100644
---- foo
-+++ foo
+--- foo\t(revision 0)
++++ foo\t(working copy)
@@ -1 +1,2 @@
Passed
+
@@ -1039,12 +1039,12 @@ index d45dd40..3494526 100644
END
expectedReturn => [
[{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo.h
new file mode 100644
index 0000000..3c9f114
---- foo.h
-+++ foo.h
+--- foo.h\t(revision 0)
++++ foo.h\t(working copy)
@@ -0,0 +1,34 @@
+<html>
END
@@ -1071,12 +1071,12 @@ index d45dd40..3494526 100644
END
expectedReturn => [
[{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo
deleted file mode 100644
index 1e50d1d..0000000
---- foo
-+++ foo
+--- foo\t(revision 0)
++++ foo\t(working copy)
@@ -1,1 +0,0 @@
-line1
END
@@ -1103,11 +1103,11 @@ Index: Makefile_new
END
expectedReturn => [
[{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: Makefile
index f5d5e74..3b6aa92 100644
---- Makefile
-+++ Makefile
+--- Makefile\t(revision 0)
++++ Makefile\t(working copy)
@@ -1,1 +1,1 @@ public:
Index: Makefile_new
===================================================================
@@ -1199,14 +1199,14 @@ END
indexPath => "foo_new",
isGit => 1,
numTextChunks => 1,
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo_new
similarity index 99%
rename from foo
rename to foo_new
index 1e50d1d..1459d21 100644
---- foo_new
-+++ foo_new
+--- foo_new\t(revision 0)
++++ foo_new\t(working copy)
@@ -15,3 +15,4 @@ release r deployment dep deploy:
line1
line2
diff --git a/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl b/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl
index ee9fff903..2b1d1a201 100644
--- a/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl
+++ b/Tools/Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl -w
#
# Copyright (C) 2011 Research In Motion Limited. All rights reserved.
+# Copyright (C) 2013 Apple Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -26,6 +27,33 @@ use POSIX qw/getcwd/;
use Test::More;
use VCSUtils;
+# We should consider moving escapeNewLineCharacters() and toMacLineEndings()
+# to VCSUtils.pm if they're useful in other places.
+sub escapeNewLineCharacters($)
+{
+ my ($text) = @_;
+ my @characters = split(//, $text);
+ my $result = "";
+ foreach (@characters) {
+ if (/^\r$/) {
+ $result .= '\r';
+ next;
+ }
+ if (/^\n$/) {
+ $result .= '\n';
+ }
+ $result .= $_;
+ }
+ return $result;
+}
+
+sub toMacLineEndings($)
+{
+ my ($text) = @_;
+ $text =~ s/\n/\r/g;
+ return $text;
+}
+
my $gitDiffHeaderForNewFile = <<EOF;
diff --git a/Makefile b/Makefile
new file mode 100644
@@ -43,20 +71,20 @@ index 756e864..04d2ae1 100644
@@ -1,3 +1,4 @@
EOF
-my $svnConvertedGitDiffHeader = <<EOF;
+my $svnConvertedGitDiffHeader = <<"EOF";
Index: Makefile
index 756e864..04d2ae1 100644
---- Makefile
-+++ Makefile
+--- Makefile\t(revision 0)
++++ Makefile\t(working copy)
@@ -1,3 +1,4 @@
EOF
-my $svnConvertedGitDiffHeaderForNewFile = <<EOF;
+my $svnConvertedGitDiffHeaderForNewFile = <<"EOF";
Index: Makefile
new file mode 100644
index 0000000..756e864
---- Makefile
-+++ Makefile
+--- Makefile\t(revision 0)
++++ Makefile\t(working copy)
@@ -0,0 +1,17 @@
EOF
@@ -92,6 +120,7 @@ EOF
my $mockDir = File::Temp->tempdir("parseDiffXXXX", CLEANUP => 1);
writeToFile(File::Spec->catfile($mockDir, "MakefileWithUnixEOL"), $MakefileContents);
writeToFile(File::Spec->catfile($mockDir, "MakefileWithWindowsEOL"), toWindowsLineEndings($MakefileContents));
+writeToFile(File::Spec->catfile($mockDir, "MakefileWithMacEOL"), toMacLineEndings($MakefileContents));
# The array of test cases.
my @testCaseHashRefs = (
@@ -145,6 +174,76 @@ undef],
},
{
# New test
+ diffName => "SVN: Patch adds Windows newline to EOF and IndexPath has Windows line endings",
+ inputText => <<"EOF",
+Index: MakefileWithWindowsEOL
+===================================================================
+--- MakefileWithWindowsEOL (revision 53052)
++++ MakefileWithWindowsEOL (working copy)
+@@ -1,3 +1,4 @@\r
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r
+ \r
+-all:
+\\ No newline at end of file
++all:\r
++\r
+EOF
+ expectedReturn => [
+[{
+ # Same as input text
+ svnConvertedText => <<"EOF",
+Index: MakefileWithWindowsEOL
+===================================================================
+--- MakefileWithWindowsEOL (revision 53052)
++++ MakefileWithWindowsEOL (working copy)
+@@ -1,3 +1,4 @@\r
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r
+ \r
+-all:
+\\ No newline at end of file
++all:\r
++\r
+EOF
+ indexPath => "MakefileWithWindowsEOL",
+ isSvn => 1,
+ numTextChunks => 1,
+ sourceRevision => 53052
+}],
+undef],
+ expectedNextLine => undef,
+},
+{
+ # New test
+ diffName => "SVN: Patch adds Mac newline to EOF and IndexPath has Mac line endings",
+ inputText => <<"EOF",
+Index: MakefileWithMacEOL
+===================================================================
+--- MakefileWithMacEOL (revision 53052)
++++ MakefileWithMacEOL (working copy)
+@@ -1,3 +1,4 @@\r MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r \r-all:
+\\ No newline at end of file
++all:\r+\r
+EOF
+ expectedReturn => [
+[{
+ # Same as input text
+ svnConvertedText => q(Index: MakefileWithMacEOL
+===================================================================
+--- MakefileWithMacEOL (revision 53052)
++++ MakefileWithMacEOL (working copy)
+@@ -1,3 +1,4 @@\r MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r \r-all:
+\\ No newline at end of file
++all:\r+\r),
+ indexPath => "MakefileWithMacEOL",
+ isSvn => 1,
+ numTextChunks => 1,
+ sourceRevision => 53052
+}],
+undef],
+ expectedNextLine => undef,
+},
+{
+ # New test
diffName => "SVN: Patch with Unix line endings and IndexPath has Windows line endings",
inputText => substituteString($svnDiffHeader, "Makefile", "MakefileWithWindowsEOL") . $diffBody,
expectedReturn => [
@@ -235,6 +334,74 @@ undef],
},
{
# New test
+ diffName => "Git: Patch adds newline to EOF with Windows line endings and IndexPath has Windows line endings",
+ inputText => <<"EOF",
+diff --git a/MakefileWithWindowsEOL b/MakefileWithWindowsEOL
+index e7e8475..ae16fc3 100644
+--- a/MakefileWithWindowsEOL
++++ b/MakefileWithWindowsEOL
+@@ -1,3 +1,4 @@\r
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r
+ \r
+-all:
+\\ No newline at end of file
++all:\r
++\r
+EOF
+ expectedReturn => [
+[{
+ # Same as input text
+ svnConvertedText => <<"EOF",
+Index: MakefileWithWindowsEOL
+index e7e8475..ae16fc3 100644
+--- MakefileWithWindowsEOL\t(revision 0)
++++ MakefileWithWindowsEOL\t(working copy)
+@@ -1,3 +1,4 @@\r
+ MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r
+ \r
+-all:
+\\ No newline at end of file
++all:\r
++\r
+EOF
+ indexPath => "MakefileWithWindowsEOL",
+ isGit => 1,
+ numTextChunks => 1
+}],
+undef],
+ expectedNextLine => undef,
+},
+{
+ # New test
+ diffName => "Git: Patch adds Mac newline to EOF and IndexPath has Mac line endings",
+ inputText => <<"EOF",
+diff --git a/MakefileWithMacEOL b/MakefileWithMacEOL
+index e7e8475..ae16fc3 100644
+--- a/MakefileWithMacEOL
++++ b/MakefileWithMacEOL
+@@ -1,3 +1,4 @@\r MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r \r-all:
+\\ No newline at end of file
++all:\r+\r
+EOF
+ expectedReturn => [
+[{
+ # Same as input text
+ svnConvertedText => qq(Index: MakefileWithMacEOL
+index e7e8475..ae16fc3 100644
+--- MakefileWithMacEOL\t(revision 0)
++++ MakefileWithMacEOL\t(working copy)
+@@ -1,3 +1,4 @@\r MODULES = JavaScriptCore JavaScriptGlue WebCore WebKit WebKitTools\r \r-all:
+\\ No newline at end of file
++all:\r+\r),
+ indexPath => "MakefileWithMacEOL",
+ isGit => 1,
+ numTextChunks => 1
+}],
+undef],
+ expectedNextLine => undef,
+},
+{
+ # New test
diffName => "Git: Patch with Unix line endings and IndexPath has Windows line endings",
inputText => substituteString($gitDiffHeader, "Makefile", "MakefileWithWindowsEOL") . $diffBody,
expectedReturn => [
@@ -294,6 +461,8 @@ foreach my $testCase (@testCaseHashRefs) {
my @got = VCSUtils::parseDiff($fileHandle, $line);
my $expectedReturn = $testCase->{expectedReturn};
+ $got[0][0]->{svnConvertedText} = escapeNewLineCharacters($got[0][0]->{svnConvertedText});
+ $expectedReturn->[0][0]->{svnConvertedText} = escapeNewLineCharacters($expectedReturn->[0][0]->{svnConvertedText});
is_deeply(\@got, $expectedReturn, "$testNameStart return value.");
my $gotNextLine = <$fileHandle>;
diff --git a/Tools/Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl b/Tools/Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl
index bc0d4d41c..841e28387 100644
--- a/Tools/Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl
+++ b/Tools/Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl
@@ -45,11 +45,35 @@ index f5d5e74..3b6aa92 100644
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo.h
index f5d5e74..3b6aa92 100644
---- foo.h
-+++ foo.h
+--- foo.h\t(revision 0)
++++ foo.h\t(working copy)
+END
+ indexPath => "foo.h",
+},
+"@@ -1 +1 @@\n"],
+ expectedNextLine => "-file contents\n",
+},
+{
+ diffName => "Modified file using --src-prefix and --dst-prefix option",
+ inputText => <<'END',
+diff --git s/foo.h d/foo.h
+index f5d5e74..3b6aa92 100644
+--- s/foo.h
++++ d/foo.h
+@@ -1 +1 @@
+-file contents
++new file contents
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<"END",
+Index: foo.h
+index f5d5e74..3b6aa92 100644
+--- foo.h\t(revision 0)
++++ foo.h\t(working copy)
END
indexPath => "foo.h",
},
@@ -57,6 +81,54 @@ END
expectedNextLine => "-file contents\n",
},
{ # New test
+ diffName => "Modified file which have space characters in path",
+ inputText => <<'END',
+diff --git a/foo bar.h b/foo bar.h
+index f5d5e74..3b6aa92 100644
+--- a/foo bar.h
++++ b/foo bar.h
+@@ -1 +1 @@
+-file contents
++new file contents
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<"END",
+Index: foo bar.h
+index f5d5e74..3b6aa92 100644
+--- foo bar.h\t(revision 0)
++++ foo bar.h\t(working copy)
+END
+ indexPath => "foo bar.h",
+},
+"@@ -1 +1 @@\n"],
+ expectedNextLine => "-file contents\n",
+},
+{ # New test
+ diffName => "Modified file which have space characters in path using --no-prefix",
+ inputText => <<'END',
+diff --git directory/foo bar.h directory/foo bar.h
+index f5d5e74..3b6aa92 100644
+--- directory/foo bar.h
++++ directory/foo bar.h
+@@ -1 +1 @@
+-file contents
++new file contents
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<"END",
+Index: directory/foo bar.h
+index f5d5e74..3b6aa92 100644
+--- directory/foo bar.h\t(revision 0)
++++ directory/foo bar.h\t(working copy)
+END
+ indexPath => "directory/foo bar.h",
+},
+"@@ -1 +1 @@\n"],
+ expectedNextLine => "-file contents\n",
+},
+{ # New test
diffName => "new file",
inputText => <<'END',
diff --git a/foo.h b/foo.h
@@ -69,12 +141,12 @@ index 0000000..3c9f114
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo.h
new file mode 100644
index 0000000..3c9f114
---- foo.h
-+++ foo.h
+--- foo.h\t(revision 0)
++++ foo.h\t(working copy)
END
indexPath => "foo.h",
isNew => 1,
@@ -97,12 +169,12 @@ index d45dd40..3494526 100644
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo
deleted file mode 100644
index 1e50d1d..0000000
---- foo
-+++ foo
+--- foo\t(revision 0)
++++ foo\t(working copy)
END
indexPath => "foo",
isDeletion => 1,
@@ -110,6 +182,34 @@ END
"@@ -1,1 +0,0 @@\n"],
expectedNextLine => "-line1\n",
},
+{
+ diffName => "delete file which have space characters in path using --no-prefix",
+ inputText => <<'END',
+diff --git directory/foo bar.h directory/foo bar.h
+deleted file mode 100644
+index 1e50d1d..0000000
+--- directory/foo bar.h
++++ /dev/null
+@@ -1,1 +0,0 @@
+-line1
+diff --git a/configure.ac b/configure.ac
+index d45dd40..3494526 100644
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<"END",
+Index: directory/foo bar.h
+deleted file mode 100644
+index 1e50d1d..0000000
+--- directory/foo bar.h\t(revision 0)
++++ directory/foo bar.h\t(working copy)
+END
+ indexPath => "directory/foo bar.h",
+ isDeletion => 1,
+},
+"@@ -1,1 +0,0 @@\n"],
+ expectedNextLine => "-line1\n",
+},
{ # New test
diffName => "using --no-prefix",
inputText => <<'END',
@@ -122,11 +222,11 @@ index c925780..9e65c43 100644
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo.h
index c925780..9e65c43 100644
---- foo.h
-+++ foo.h
+--- foo.h\t(revision 0)
++++ foo.h\t(working copy)
END
indexPath => "foo.h",
},
@@ -160,6 +260,30 @@ END
"diff --git a/bar b/bar\n"],
expectedNextLine => "index d45dd40..3494526 100644\n",
},
+{
+ diffName => "copy file which have space characters in path using --no-prefix (with similarity index 100%)",
+ inputText => <<'END',
+diff --git directory/foo bar.h directory/foo baz.h
+similarity index 100%
+copy from directory/foo bar.h
+copy to directory/foo baz.h
+diff --git a/bar b/bar
+index d45dd40..3494526 100644
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<'END',
+Index: directory/foo baz.h
+similarity index 100%
+copy from directory/foo bar.h
+copy to directory/foo baz.h
+END
+ copiedFromPath => "directory/foo bar.h",
+ indexPath => "directory/foo baz.h",
+},
+"diff --git a/bar b/bar\n"],
+ expectedNextLine => "index d45dd40..3494526 100644\n",
+},
{ # New test
diffName => "copy (with similarity index < 100%)",
inputText => <<'END',
@@ -210,6 +334,31 @@ END
"diff --git a/bar b/bar\n"],
expectedNextLine => "index d45dd40..3494526 100644\n",
},
+{
+ diffName => "rename file which have space characters in path using --no-prefix (with similarity index 100%)",
+ inputText => <<'END',
+diff --git directory/foo bar.h directory/foo baz.h
+similarity index 100%
+rename from directory/foo bar.h
+rename to directory/foo baz.h
+diff --git a/bar b/bar
+index d45dd40..3494526 100644
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<'END',
+Index: directory/foo baz.h
+similarity index 100%
+rename from directory/foo bar.h
+rename to directory/foo baz.h
+END
+ copiedFromPath => "directory/foo bar.h",
+ indexPath => "directory/foo baz.h",
+ shouldDeleteSource => 1,
+},
+"diff --git a/bar b/bar\n"],
+ expectedNextLine => "index d45dd40..3494526 100644\n",
+},
{ # New test
diffName => "rename (with similarity index < 100%)",
inputText => <<'END',
@@ -230,14 +379,14 @@ index d45dd40..3494526 100644
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo_new
similarity index 99%
rename from foo
rename to foo_new
index 1e50d1d..1459d21 100644
---- foo_new
-+++ foo_new
+--- foo_new\t(revision 0)
++++ foo_new\t(working copy)
END
copiedFromPath => "foo",
indexPath => "foo_new",
@@ -359,11 +508,11 @@ index d03e242..435ad3a 100755
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo
index d03e242..435ad3a 100755
---- foo
-+++ foo
+--- foo\t(revision 0)
++++ foo\t(working copy)
END
indexPath => "foo",
},
@@ -429,12 +578,12 @@ index 0000000..d03e242
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo
new file mode 100755
index 0000000..d03e242
---- foo
-+++ foo
+--- foo\t(revision 0)
++++ foo\t(working copy)
END
executableBitDelta => 1,
indexPath => "foo",
@@ -458,12 +607,12 @@ index d03e242..0000000
END
expectedReturn => [
{
- svnConvertedText => <<'END',
+ svnConvertedText => <<"END",
Index: foo
deleted file mode 100755
index d03e242..0000000
---- foo
-+++ foo
+--- foo\t(revision 0)
++++ foo\t(working copy)
END
executableBitDelta => -1,
indexPath => "foo",
@@ -472,6 +621,37 @@ END
"@@ -1 +0,0 @@\n"],
expectedNextLine => "-file contents\n",
},
+{
+ # svn-apply rejected https://bug-111042-attachments.webkit.org/attachment.cgi?id=190663
+ diffName => "Modified file which have space characters in path. svn-apply rejected attachment #190663.",
+ inputText => <<'END',
+diff --git a/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme b/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme
+index 72d60effb9bbba0520e520ec3c1aa43f348c6997..b7924b96d5978c1ad1053dca7e554023235d9a16 100644
+--- a/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme
++++ b/WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme
+@@ -161,7 +161,7 @@
+ <EnvironmentVariables>
+ <EnvironmentVariable
+ key = "DYLD_INSERT_LIBRARIES"
+- value = "$(BUILT_PRODUCTS_DIR)/WebProcessShim.dylib"
++ value = "$(BUILT_PRODUCTS_DIR)/SecItemShim.dylib"
+ isEnabled = "YES">
+ </EnvironmentVariable>
+ </EnvironmentVariables>
+END
+ expectedReturn => [
+{
+ svnConvertedText => <<"END",
+Index: WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme
+index 72d60effb9bbba0520e520ec3c1aa43f348c6997..b7924b96d5978c1ad1053dca7e554023235d9a16 100644
+--- WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme\t(revision 0)
++++ WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme\t(working copy)
+END
+ indexPath => "WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme",
+},
+"@@ -161,7 +161,7 @@\n"],
+ expectedNextLine => " <EnvironmentVariables>\n",
+},
);
my $testCasesCount = @testCaseHashRefs;
diff --git a/Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl b/Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl
new file mode 100644
index 000000000..0970e9aa2
--- /dev/null
+++ b/Tools/Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl
@@ -0,0 +1,120 @@
+#!/usr/bin/perl -w
+#
+# Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 script tests parts of filter-build-webkit.
+# This script runs the unittests specified in @testFiles.
+
+use strict;
+use warnings;
+
+use English;
+use FindBin;
+use Test::More;
+use lib File::Spec->catdir($FindBin::Bin, "..");
+use LoadAsModule qw(FilterBuildWebKit filter-build-webkit);
+
+sub description($);
+
+@FilterBuildWebKit::EXPORT_OK = qw(shouldIgnoreLine);
+FilterBuildWebKit->import(@FilterBuildWebKit::EXPORT_OK);
+
+#
+# Test whitespace
+#
+is(shouldIgnoreLine("", ""), 1, "Ignored: empty line");
+is(shouldIgnoreLine("", " "), 1, "Ignored: one space");
+is(shouldIgnoreLine("", "\t"), 1, "Ignored: one tab");
+
+#
+# Test input that should be ignored regardless of previous line
+#
+my @expectIgnoredLines = split(/$INPUT_RECORD_SEPARATOR/, <<'END');
+make: Nothing to be done for `all'.
+JavaScriptCore/create_hash_table JavaScriptCore/runtime/ArrayConstructor.cpp -i > ArrayConstructor.lut.h
+Creating hashtable for JavaScriptCore/runtime/ArrayConstructor.cpp
+Wrote output to /Volumes/Data/Build/Release/DerivedSources/WebCore/ExportFileGenerator.cpp
+/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: /Volumes/Data/Build/ANGLE.build/Release/ANGLE.build/Objects-normal/i386/debug.o has no symbols
+Showing first 200 notices only
+printf "WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl\nWebCore/Modules/encryptedmedia/MediaKeyNeededEvent.idl\nWebCore/Modules/encryptedmedia/MediaKeySession.idl\nWebCore/Modules/encryptedmedia/MediaKeys.idl\nWebCore/Modules/filesystem/DOMFileSystem.idl\nWebCore/Modules/filesystem/DOMFileSystemSync.idl\nWebCore/Modules/filesystem/DOMWindowFileSystem.idl\nWebCore/Modules/filesystem/DirectoryEntry.idl\nWebCore/Modules/filesystem/DirectoryEntrySync.idl\nWebCore/Modules/filesystem/DirectoryReader.idl\nWebCore/Modules/filesystem/DirectoryReaderSync.idl\nWebCore/Modules/filesystem/EntriesCallback.idl\nWebCore/Modules/filesystem/Entry.idl\nWebCore/Modules/filesystem/EntryArray.idl\nWebCore/Modules/filesystem/EntryArraySync.idl\nWebCore/Modules/filesystem/EntryCallback.idl\nWebCore/Modules/filesystem/EntrySync.idl\nWebCore/Modules/filesystem/ErrorCallback.idl\nWebCore/Modules/filesystem/FileCallback.idl\nWebCore/Modules/filesystem/FileEntry.idl\nWebCore/Modules/filesystem/FileEntrySync.idl\nWebCore/Modules/filesystem/FileSystemCallback.idl\nWebCore/Modules/filesystem/FileWriter.idl\nWebCore/Modules/filesystem/FileWriterCallback.idl\nWebCore/Modules/filesystem/FileWriterSync.idl\nWebCore/Modules/filesystem/Metadata.idl\nWebCore/Modules/filesystem/MetadataCallback.idl\nWebCore/Modules/filesystem/WorkerContextFileSystem.idl\nWebCore/Modules/geolocation/Coordinates.idl\nWebCore/Modules/geolocation/Geolocation.idl\nWebCore/Modules/geolocation/Geoposition.idl\nWebCore/Modules/geolocation/NavigatorGeolocation.idl\nWebCore/Modules/geolocation/PositionCallback.idl\nWebCore/Modules/geolocation/PositionError.idl\nWebCore/Modules/geolocation/PositionErrorCallback.idl\nWebCore/Modules/indexeddb/DOMWindowIndexedDatabase.idl\nWebCore/Modules/indexeddb/IDBAny.idl\nWebCore/Modules/indexeddb/IDBCursor.idl\nWebCore/Modules/indexeddb/IDBDatabase.idl\nWebCore/Modules/indexeddb/IDBFactory.idl\nWebCore/Modules/indexeddb/IDBIndex.idl\nWebCore/Modules/indexeddb/IDBKeyRange.idl\nWebCore/Modules/indexeddb/IDBObjectStore.idl\nWebCore/Modules/indexeddb/IDBRequest.idl\nWebCore/Modules/indexeddb/IDBTransaction.idl\nWebCore/Modules/indexeddb/IDBVersionChangeEvent.idl\nWebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl\nWebCore/Modules/mediasource/MediaSource.idl\nWebCore/Modules/mediasource/SourceBuffer.idl\nWebCore/Modules/mediasource/SourceBufferList.idl\nWebCore/Modules/notifications/DOMWindowNotifications.idl\nWebCore/Modules/notifications/Notification.idl\nWebCore/Modules/notifications/NotificationCenter.idl\nWebCore/Modules/notifications/NotificationPermissionCallback.idl\nWebCore/Modules/notifications/WorkerContextNotifications.idl\nWebCore/Modules/quota/DOMWindowQuota.idl\nWebCore/Modules/quota/NavigatorStorageQuota.idl\nWebCore/Modules/quota/StorageInfo.idl\nWebCore/Modules/quota/StorageErrorCallback.idl\nWebCore/Modules/quota/StorageQuota.idl\nWebCore/Modules/quota/StorageQuotaCallback.idl\nWebCore/Modules/quota/StorageUsageCallback.idl\nWebCore/Modules/quota/WorkerNavigatorStorageQuota.idl\nWebCore/Modules/speech/DOMWindowSpeechSynthesis.idl\nWebCore/Modules/speech/SpeechSynthesis.idl\nWebCore/Modules/speech/SpeechSynthesisEvent.idl\nWebCore/Modules/speech/SpeechSynthesisUtterance.idl\nWebCore/Modules/speech/SpeechSynthesisVoice.idl\nWebCore/Modules/webaudio/AudioBuffer.idl\nWebCore/Modules/webaudio/AudioBufferCallback.idl\nWebCore/Modules/webaudio/AudioBufferSourceNode.idl\nWebCore/Modules/webaudio/ChannelMergerNode.idl\nWebCore/Modules/webaudio/ChannelSplitterNode.idl\nWebCore/Modules/webaudio/AudioContext.idl\nWebCore/Modules/webaudio/AudioDestinationNode.idl\nWebCore/Modules/webaudio/GainNode.idl\nWebCore/Modules/webaudio/AudioListener.idl\nWebCore/Modules/webaudio/AudioNode.idl\nWebCore/Modules/webaudio/PannerNode.idl\nWebCore/Modules/webaudio/AudioParam.idl\nWebCore/Modules/webaudio/AudioProcessingEvent.idl\nWebCore/Modules/webaudio/BiquadFilterNode.idl\nWebCore/Modules/webaudio/ConvolverNode.idl\nWebCore/Modules/webaudio/DOMWindowWebAudio.idl\nWebCore/Modules/webaudio/DelayNode.idl\nWebCore/Modules/webaudio/DynamicsCompressorNode.idl\nWebCore/Modules/webaudio/ScriptProcessorNode.idl\nWebCore/Modules/webaudio/MediaElementAudioSourceNode.idl\nWebCore/Modules/webaudio/MediaStreamAudioSourceNode.idl\nWebCore/Modules/webaudio/OscillatorNode.idl\nWebCore/Modules/webaudio/OfflineAudioContext.idl\nWebCore/Modules/webaudio/OfflineAudioCompletionEvent.idl\nWebCore/Modules/webaudio/AnalyserNode.idl\nWebCore/Modules/webaudio/WaveShaperNode.idl\nWebCore/Modules/webaudio/WaveTable.idl\nWebCore/Modules/webdatabase/DOMWindowWebDatabase.idl\nWebCore/Modules/webdatabase/Database.idl\nWebCore/Modules/webdatabase/DatabaseCallback.idl\nWebCore/Modules/webdatabase/DatabaseSync.idl\nWebCore/Modules/webdatabase/SQLError.idl\nWebCore/Modules/webdatabase/SQLException.idl\nWebCore/Modules/webdatabase/SQLResultSet.idl\nWebCore/Modules/webdatabase/SQLResultSetRowList.idl\nWebCore/Modules/webdatabase/SQLStatementCallback.idl\nWebCore/Modules/webdatabase/SQLStatementErrorCallback.idl\nWebCore/Modules/webdatabase/SQLTransaction.idl\nWebCore/Modules/webdatabase/SQLTransactionCallback.idl\nWebCore/Modules/webdatabase/SQLTransactionErrorCallback.idl\nWebCore/Modules/webdatabase/SQLTransactionSync.idl\nWebCore/Modules/webdatabase/SQLTransactionSyncCallback.idl\nWebCore/Modules/webdatabase/WorkerContextWebDatabase.idl\nWebCore/Modules/websockets/CloseEvent.idl\nWebCore/Modules/websockets/DOMWindowWebSocket.idl\nWebCore/Modules/websockets/WebSocket.idl\nWebCore/Modules/websockets/WorkerContextWebSocket.idl\nWebCore/css/CSSCharsetRule.idl\nWebCore/css/CSSFontFaceLoadEvent.idl\nWebCore/css/CSSFontFaceRule.idl\nWebCore/css/CSSHostRule.idl\nWebCore/css/CSSImportRule.idl\nWebCore/css/CSSMediaRule.idl\nWebCore/css/CSSPageRule.idl\nWebCore/css/CSSPrimitiveValue.idl\nWebCore/css/CSSRule.idl\nWebCore/css/CSSRuleList.idl\nWebCore/css/CSSStyleDeclaration.idl\nWebCore/css/CSSStyleRule.idl\nWebCore/css/CSSStyleSheet.idl\nWebCore/css/CSSSupportsRule.idl\nWebCore/css/CSSUnknownRule.idl\nWebCore/css/CSSValue.idl\nWebCore/css/CSSValueList.idl\nWebCore/css/Counter.idl\nWebCore/css/DOMWindowCSS.idl\nWebCore/css/FontLoader.idl\nWebCore/css/MediaList.idl\nWebCore/css/MediaQueryList.idl\nWebCore/css/MediaQueryListListener.idl\nWebCore/css/RGBColor.idl\nWebCore/css/Rect.idl\nWebCore/css/StyleMedia.idl\nWebCore/css/StyleSheet.idl\nWebCore/css/StyleSheetList.idl\nWebCore/css/WebKitCSSFilterValue.idl\nWebCore/css/WebKitCSSFilterRule.idl\nWebCore/css/WebKitCSSKeyframeRule.idl\nWebCore/css/WebKitCSSKeyframesRule.idl\nWebCore/css/WebKitCSSMatrix.idl\nWebCore/css/WebKitCSSMixFunctionValue.idl\nWebCore/css/WebKitCSSRegionRule.idl\nWebCore/css/WebKitCSSTransformValue.idl\nWebCore/css/WebKitCSSViewportRule.idl\nWebCore/dom/Attr.idl\nWebCore/dom/BeforeLoadEvent.idl\nWebCore/dom/CDATASection.idl\nWebCore/dom/CharacterData.idl\nWebCore/dom/ClientRect.idl\nWebCore/dom/ClientRectList.idl\nWebCore/dom/Clipboard.idl\nWebCore/dom/Comment.idl\nWebCore/dom/CompositionEvent.idl\nWebCore/dom/CustomElementConstructor.idl\nWebCore/dom/CustomEvent.idl\nWebCore/dom/DOMCoreException.idl\nWebCore/dom/DOMError.idl\nWebCore/dom/DOMImplementation.idl\nWebCore/dom/DOMStringList.idl\nWebCore/dom/DOMStringMap.idl\nWebCore/dom/DataTransferItem.idl\nWebCore/dom/DataTransferItemList.idl\nWebCore/dom/DeviceMotionEvent.idl\nWebCore/dom/DeviceOrientationEvent.idl\nWebCore/dom/Document.idl\nWebCore/dom/DocumentFragment.idl\nWebCore/dom/DocumentType.idl\nWebCore/dom/Element.idl\nWebCore/dom/Entity.idl\nWebCore/dom/EntityReference.idl\nWebCore/dom/ErrorEvent.idl\nWebCore/dom/Event.idl\nWebCore/dom/EventException.idl\nWebCore/dom/EventListener.idl\nWebCore/dom/EventTarget.idl\nWebCore/dom/FocusEvent.idl\nWebCore/dom/HashChangeEvent.idl\nWebCore/dom/KeyboardEvent.idl\nWebCore/dom/MessageChannel.idl\nWebCore/dom/MessageEvent.idl\nWebCore/dom/MessagePort.idl\nWebCore/dom/MouseEvent.idl\nWebCore/dom/MutationEvent.idl\nWebCore/dom/MutationObserver.idl\nWebCore/dom/MutationRecord.idl\nWebCore/dom/DOMNamedFlowCollection.idl\nWebCore/dom/NamedNodeMap.idl\nWebCore/dom/Node.idl\nWebCore/dom/NodeFilter.idl\nWebCore/dom/NodeIterator.idl\nWebCore/dom/NodeList.idl\nWebCore/dom/Notation.idl\nWebCore/dom/OverflowEvent.idl\nWebCore/dom/PageTransitionEvent.idl\nWebCore/dom/PopStateEvent.idl\nWebCore/dom/ProcessingInstruction.idl\nWebCore/dom/ProgressEvent.idl\nWebCore/dom/ProgressEvent.idl\nWebCore/dom/PropertyNodeList.idl\nWebCore/dom/Range.idl\nWebCore/dom/RangeException.idl\nWebCore/dom/RequestAnimationFrameCallback.idl\nWebCore/dom/ShadowRoot.idl\nWebCore/dom/StringCallback.idl\nWebCore/dom/Text.idl\nWebCore/dom/TextEvent.idl\nWebCore/dom/Touch.idl\nWebCore/dom/TouchEvent.idl\nWebCore/dom/TouchList.idl\nWebCore/dom/TransitionEvent.idl\nWebCore/dom/TreeWalker.idl\nWebCore/dom/UIEvent.idl\nWebCore/dom/WebKitAnimationEvent.idl\nWebCore/dom/WebKitNamedFlow.idl\nWebCore/dom/WebKitTransitionEvent.idl\nWebCore/dom/WheelEvent.idl\nWebCore/fileapi/Blob.idl\nWebCore/fileapi/File.idl\nWebCore/fileapi/FileError.idl\nWebCore/fileapi/FileException.idl\nWebCore/fileapi/FileList.idl\nWebCore/fileapi/FileReader.idl\nWebCore/fileapi/FileReaderSync.idl\nWebCore/html/DOMFormData.idl\nWebCore/html/DOMSettableTokenList.idl\nWebCore/html/DOMTokenList.idl\nWebCore/html/DOMURL.idl\nWebCore/html/HTMLAllCollection.idl\nWebCore/html/HTMLAnchorElement.idl\nWebCore/html/HTMLAppletElement.idl\nWebCore/html/HTMLAreaElement.idl\nWebCore/html/HTMLAudioElement.idl\nWebCore/html/HTMLBRElement.idl\nWebCore/html/HTMLBaseElement.idl\nWebCore/html/HTMLBaseFontElement.idl\nWebCore/html/HTMLBodyElement.idl\nWebCore/html/HTMLButtonElement.idl\nWebCore/html/HTMLCanvasElement.idl\nWebCore/html/HTMLCollection.idl\nWebCore/html/HTMLDListElement.idl\nWebCore/html/HTMLDataListElement.idl\nWebCore/html/HTMLDetailsElement.idl\nWebCore/html/HTMLDialogElement.idl\nWebCore/html/HTMLDirectoryElement.idl\nWebCore/html/HTMLDivElement.idl\nWebCore/html/HTMLDocument.idl\nWebCore/html/HTMLElement.idl\nWebCore/html/HTMLEmbedElement.idl\nWebCore/html/HTMLFieldSetElement.idl\nWebCore/html/HTMLFontElement.idl\nWebCore/html/HTMLFormControlsCollection.idl\nWebCore/html/HTMLFormElement.idl\nWebCore/html/HTMLFrameElement.idl\nWebCore/html/HTMLFrameSetElement.idl\nWebCore/html/HTMLHRElement.idl\nWebCore/html/HTMLHeadElement.idl\nWebCore/html/HTMLHeadingElement.idl\nWebCore/html/HTMLHtmlElement.idl\nWebCore/html/HTMLIFrameElement.idl\nWebCore/html/HTMLImageElement.idl\nWebCore/html/HTMLInputElement.idl\nWebCore/html/HTMLKeygenElement.idl\nWebCore/html/HTMLLIElement.idl\nWebCore/html/HTMLLabelElement.idl\nWebCore/html/HTMLLegendElement.idl\nWebCore/html/HTMLLinkElement.idl\nWebCore/html/HTMLMapElement.idl\nWebCore/html/HTMLMarqueeElement.idl\nWebCore/html/HTMLMediaElement.idl\nWebCore/html/HTMLMenuElement.idl\nWebCore/html/HTMLMetaElement.idl\nWebCore/html/HTMLMeterElement.idl\nWebCore/html/HTMLModElement.idl\nWebCore/html/HTMLOListElement.idl\nWebCore/html/HTMLObjectElement.idl\nWebCore/html/HTMLOptGroupElement.idl\nWebCore/html/HTMLOptionElement.idl\nWebCore/html/HTMLOptionsCollection.idl\nWebCore/html/HTMLOutputElement.idl\nWebCore/html/HTMLParagraphElement.idl\nWebCore/html/HTMLParamElement.idl\nWebCore/html/HTMLPreElement.idl\nWebCore/html/HTMLProgressElement.idl\nWebCore/html/HTMLPropertiesCollection.idl\nWebCore/html/HTMLQuoteElement.idl\nWebCore/html/HTMLScriptElement.idl\nWebCore/html/HTMLSelectElement.idl\nWebCore/html/HTMLSourceElement.idl\nWebCore/html/HTMLSpanElement.idl\nWebCore/html/HTMLStyleElement.idl\nWebCore/html/HTMLTableCaptionElement.idl\nWebCore/html/HTMLTableCellElement.idl\nWebCore/html/HTMLTableColElement.idl\nWebCore/html/HTMLTableElement.idl\nWebCore/html/HTMLTableRowElement.idl\nWebCore/html/HTMLTableSectionElement.idl\nWebCore/html/HTMLTemplateElement.idl\nWebCore/html/HTMLTextAreaElement.idl\nWebCore/html/HTMLTitleElement.idl\nWebCore/html/HTMLTrackElement.idl\nWebCore/html/HTMLUListElement.idl\nWebCore/html/HTMLUnknownElement.idl\nWebCore/html/HTMLVideoElement.idl\nWebCore/html/ImageData.idl\nWebCore/html/MediaController.idl\nWebCore/html/MediaError.idl\nWebCore/html/MediaKeyError.idl\nWebCore/html/MediaKeyEvent.idl\nWebCore/html/MicroDataItemValue.idl\nWebCore/html/RadioNodeList.idl\nWebCore/html/TextMetrics.idl\nWebCore/html/TimeRanges.idl\nWebCore/html/ValidityState.idl\nWebCore/html/VoidCallback.idl\nWebCore/html/canvas/ArrayBuffer.idl\nWebCore/html/canvas/ArrayBufferView.idl\nWebCore/html/canvas/CanvasGradient.idl\nWebCore/html/canvas/CanvasPattern.idl\nWebCore/html/canvas/CanvasProxy.idl\nWebCore/html/canvas/CanvasRenderingContext.idl\nWebCore/html/canvas/CanvasRenderingContext2D.idl\nWebCore/html/canvas/DataView.idl\nWebCore/html/canvas/DOMPath.idl\nWebCore/html/canvas/EXTDrawBuffers.idl\nWebCore/html/canvas/EXTTextureFilterAnisotropic.idl\nWebCore/html/canvas/Float32Array.idl\nWebCore/html/canvas/Float64Array.idl\nWebCore/html/canvas/Int16Array.idl\nWebCore/html/canvas/Int32Array.idl\nWebCore/html/canvas/Int8Array.idl\nWebCore/html/canvas/OESElementIndexUint.idl\nWebCore/html/canvas/OESStandardDerivatives.idl\nWebCore/html/canvas/OESTextureFloat.idl\nWebCore/html/canvas/OESTextureHalfFloat.idl\nWebCore/html/canvas/OESVertexArrayObject.idl\nWebCore/html/canvas/Uint16Array.idl\nWebCore/html/canvas/Uint32Array.idl\nWebCore/html/canvas/Uint8Array.idl\nWebCore/html/canvas/Uint8ClampedArray.idl\nWebCore/html/canvas/WebGLActiveInfo.idl\nWebCore/html/canvas/WebGLBuffer.idl\nWebCore/html/canvas/WebGLCompressedTextureATC.idl\nWebCore/html/canvas/WebGLCompressedTexturePVRTC.idl\nWebCore/html/canvas/WebGLCompressedTextureS3TC.idl\nWebCore/html/canvas/WebGLContextAttributes.idl\nWebCore/html/canvas/WebGLContextEvent.idl\nWebCore/html/canvas/WebGLDepthTexture.idl\nWebCore/html/canvas/WebGLFramebuffer.idl\nWebCore/html/canvas/WebGLLoseContext.idl\nWebCore/html/canvas/WebGLProgram.idl\nWebCore/html/canvas/WebGLRenderbuffer.idl\nWebCore/html/canvas/WebGLRenderingContext.idl\nWebCore/html/canvas/WebGLShader.idl\nWebCore/html/canvas/WebGLShaderPrecisionFormat.idl\nWebCore/html/canvas/WebGLTexture.idl\nWebCore/html/canvas/WebGLUniformLocation.idl\nWebCore/html/canvas/WebGLVertexArrayObjectOES.idl\nWebCore/html/shadow/HTMLContentElement.idl\nWebCore/html/shadow/HTMLShadowElement.idl\nWebCore/html/track/TextTrack.idl\nWebCore/html/track/TextTrackCue.idl\nWebCore/html/track/TextTrackCueList.idl\nWebCore/html/track/TextTrackList.idl\nWebCore/html/track/TrackEvent.idl\nWebCore/inspector/InjectedScriptHost.idl\nWebCore/inspector/InspectorFrontendHost.idl\nWebCore/inspector/ScriptProfile.idl\nWebCore/inspector/ScriptProfileNode.idl\nWebCore/loader/appcache/DOMApplicationCache.idl\nWebCore/page/AbstractView.idl\nWebCore/page/BarInfo.idl\nWebCore/page/Console.idl\nWebCore/page/Crypto.idl\nWebCore/page/DOMSecurityPolicy.idl\nWebCore/page/DOMSelection.idl\nWebCore/page/DOMWindow.idl\nWebCore/page/EventSource.idl\nWebCore/page/History.idl\nWebCore/page/Location.idl\nWebCore/page/Navigator.idl\nWebCore/page/Performance.idl\nWebCore/page/PerformanceNavigation.idl\nWebCore/page/PerformanceTiming.idl\nWebCore/page/Screen.idl\nWebCore/page/SpeechInputEvent.idl\nWebCore/page/SpeechInputResult.idl\nWebCore/page/SpeechInputResultList.idl\nWebCore/page/WebKitPoint.idl\nWebCore/page/WorkerNavigator.idl\nWebCore/plugins/DOMMimeType.idl\nWebCore/plugins/DOMMimeTypeArray.idl\nWebCore/plugins/DOMPlugin.idl\nWebCore/plugins/DOMPluginArray.idl\nWebCore/storage/Storage.idl\nWebCore/storage/StorageEvent.idl\nWebCore/svg/ElementTimeControl.idl\nWebCore/svg/SVGAElement.idl\nWebCore/svg/SVGAltGlyphDefElement.idl\nWebCore/svg/SVGAltGlyphElement.idl\nWebCore/svg/SVGAltGlyphItemElement.idl\nWebCore/svg/SVGAngle.idl\nWebCore/svg/SVGAnimateColorElement.idl\nWebCore/svg/SVGAnimateElement.idl\nWebCore/svg/SVGAnimateMotionElement.idl\nWebCore/svg/SVGAnimateTransformElement.idl\nWebCore/svg/SVGAnimatedAngle.idl\nWebCore/svg/SVGAnimatedBoolean.idl\nWebCore/svg/SVGAnimatedEnumeration.idl\nWebCore/svg/SVGAnimatedInteger.idl\nWebCore/svg/SVGAnimatedLength.idl\nWebCore/svg/SVGAnimatedLengthList.idl\nWebCore/svg/SVGAnimatedNumber.idl\nWebCore/svg/SVGAnimatedNumberList.idl\nWebCore/svg/SVGAnimatedPreserveAspectRatio.idl\nWebCore/svg/SVGAnimatedRect.idl\nWebCore/svg/SVGAnimatedString.idl\nWebCore/svg/SVGAnimatedTransformList.idl\nWebCore/svg/SVGAnimationElement.idl\nWebCore/svg/SVGCircleElement.idl\nWebCore/svg/SVGClipPathElement.idl\nWebCore/svg/SVGColor.idl\nWebCore/svg/SVGComponentTransferFunctionElement.idl\nWebCore/svg/SVGCursorElement.idl\nWebCore/svg/SVGDefsElement.idl\nWebCore/svg/SVGDescElement.idl\nWebCore/svg/SVGDocument.idl\nWebCore/svg/SVGElement.idl\nWebCore/svg/SVGElementInstance.idl\nWebCore/svg/SVGElementInstanceList.idl\nWebCore/svg/SVGEllipseElement.idl\nWebCore/svg/SVGException.idl\nWebCore/svg/SVGExternalResourcesRequired.idl\nWebCore/svg/SVGFEBlendElement.idl\nWebCore/svg/SVGFEColorMatrixElement.idl\nWebCore/svg/SVGFEComponentTransferElement.idl\nWebCore/svg/SVGFECompositeElement.idl\nWebCore/svg/SVGFEConvolveMatrixElement.idl\nWebCore/svg/SVGFEDiffuseLightingElement.idl\nWebCore/svg/SVGFEDisplacementMapElement.idl\nWebCore/svg/SVGFEDistantLightElement.idl\nWebCore/svg/SVGFEDropShadowElement.idl\nWebCore/svg/SVGFEFloodElement.idl\nWebCore/svg/SVGFEFuncAElement.idl\nWebCore/svg/SVGFEFuncBElement.idl\nWebCore/svg/SVGFEFuncGElement.idl\nWebCore/svg/SVGFEFuncRElement.idl\nWebCore/svg/SVGFEGaussianBlurElement.idl\nWebCore/svg/SVGFEImageElement.idl\nWebCore/svg/SVGFEMergeElement.idl\nWebCore/svg/SVGFEMergeNodeElement.idl\nWebCore/svg/SVGFEMorphologyElement.idl\nWebCore/svg/SVGFEOffsetElement.idl\nWebCore/svg/SVGFEPointLightElement.idl\nWebCore/svg/SVGFESpecularLightingElement.idl\nWebCore/svg/SVGFESpotLightElement.idl\nWebCore/svg/SVGFETileElement.idl\nWebCore/svg/SVGFETurbulenceElement.idl\nWebCore/svg/SVGFilterElement.idl\nWebCore/svg/SVGFilterPrimitiveStandardAttributes.idl\nWebCore/svg/SVGFitToViewBox.idl\nWebCore/svg/SVGFontElement.idl\nWebCore/svg/SVGFontFaceElement.idl\nWebCore/svg/SVGFontFaceFormatElement.idl\nWebCore/svg/SVGFontFaceNameElement.idl\nWebCore/svg/SVGFontFaceSrcElement.idl\nWebCore/svg/SVGFontFaceUriElement.idl\nWebCore/svg/SVGForeignObjectElement.idl\nWebCore/svg/SVGGElement.idl\nWebCore/svg/SVGGlyphElement.idl\nWebCore/svg/SVGGlyphRefElement.idl\nWebCore/svg/SVGGradientElement.idl\nWebCore/svg/SVGHKernElement.idl\nWebCore/svg/SVGImageElement.idl\nWebCore/svg/SVGLangSpace.idl\nWebCore/svg/SVGLength.idl\nWebCore/svg/SVGLengthList.idl\nWebCore/svg/SVGLineElement.idl\nWebCore/svg/SVGLinearGradientElement.idl\nWebCore/svg/SVGLocatable.idl\nWebCore/svg/SVGMPathElement.idl\nWebCore/svg/SVGMarkerElement.idl\nWebCore/svg/SVGMaskElement.idl\nWebCore/svg/SVGMatrix.idl\nWebCore/svg/SVGMetadataElement.idl\nWebCore/svg/SVGMissingGlyphElement.idl\nWebCore/svg/SVGNumber.idl\nWebCore/svg/SVGNumberList.idl\nWebCore/svg/SVGPaint.idl\nWebCore/svg/SVGPathElement.idl\nWebCore/svg/SVGPathSeg.idl\nWebCore/svg/SVGPathSegArcAbs.idl\nWebCore/svg/SVGPathSegArcRel.idl\nWebCore/svg/SVGPathSegClosePath.idl\nWebCore/svg/SVGPathSegCurvetoCubicAbs.idl\nWebCore/svg/SVGPathSegCurvetoCubicRel.idl\nWebCore/svg/SVGPathSegCurvetoCubicSmoothAbs.idl\nWebCore/svg/SVGPathSegCurvetoCubicSmoothRel.idl\nWebCore/svg/SVGPathSegCurvetoQuadraticAbs.idl\nWebCore/svg/SVGPathSegCurvetoQuadraticRel.idl\nWebCore/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl\nWebCore/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl\nWebCore/svg/SVGPathSegLinetoAbs.idl\nWebCore/svg/SVGPathSegLinetoHorizontalAbs.idl\nWebCore/svg/SVGPathSegLinetoHorizontalRel.idl\nWebCore/svg/SVGPathSegLinetoRel.idl\nWebCore/svg/SVGPathSegLinetoVerticalAbs.idl\nWebCore/svg/SVGPathSegLinetoVerticalRel.idl\nWebCore/svg/SVGPathSegList.idl\nWebCore/svg/SVGPathSegMovetoAbs.idl\nWebCore/svg/SVGPathSegMovetoRel.idl\nWebCore/svg/SVGPatternElement.idl\nWebCore/svg/SVGPoint.idl\nWebCore/svg/SVGPointList.idl\nWebCore/svg/SVGPolygonElement.idl\nWebCore/svg/SVGPolylineElement.idl\nWebCore/svg/SVGPreserveAspectRatio.idl\nWebCore/svg/SVGRadialGradientElement.idl\nWebCore/svg/SVGRect.idl\nWebCore/svg/SVGRectElement.idl\nWebCore/svg/SVGRenderingIntent.idl\nWebCore/svg/SVGSVGElement.idl\nWebCore/svg/SVGScriptElement.idl\nWebCore/svg/SVGSetElement.idl\nWebCore/svg/SVGStopElement.idl\nWebCore/svg/SVGStringList.idl\nWebCore/svg/SVGStyleElement.idl\nWebCore/svg/SVGStyledElement.idl\nWebCore/svg/SVGSwitchElement.idl\nWebCore/svg/SVGSymbolElement.idl\nWebCore/svg/SVGTRefElement.idl\nWebCore/svg/SVGTSpanElement.idl\nWebCore/svg/SVGTests.idl\nWebCore/svg/SVGTextContentElement.idl\nWebCore/svg/SVGTextElement.idl\nWebCore/svg/SVGTextPathElement.idl\nWebCore/svg/SVGTextPositioningElement.idl\nWebCore/svg/SVGTitleElement.idl\nWebCore/svg/SVGTransform.idl\nWebCore/svg/SVGTransformList.idl\nWebCore/svg/SVGTransformable.idl\nWebCore/svg/SVGURIReference.idl\nWebCore/svg/SVGUnitTypes.idl\nWebCore/svg/SVGUseElement.idl\nWebCore/svg/SVGVKernElement.idl\nWebCore/svg/SVGViewElement.idl\nWebCore/svg/SVGViewSpec.idl\nWebCore/svg/SVGZoomAndPan.idl\nWebCore/svg/SVGZoomEvent.idl\nWebCore/testing/Internals.idl\nWebCore/testing/InternalSettings.idl\nWebCore/testing/MallocStatistics.idl\nWebCore/testing/MemoryInfo.idl\nWebCore/testing/TypeConversions.idl\nWebCore/workers/AbstractWorker.idl\nWebCore/workers/DedicatedWorkerContext.idl\nWebCore/workers/SharedWorker.idl\nWebCore/workers/SharedWorkerContext.idl\nWebCore/workers/Worker.idl\nWebCore/workers/WorkerContext.idl\nWebCore/workers/WorkerLocation.idl\nWebCore/xml/DOMParser.idl\nWebCore/xml/XMLHttpRequest.idl\nWebCore/xml/XMLHttpRequestException.idl\nWebCore/xml/XMLHttpRequestProgressEvent.idl\nWebCore/xml/XMLHttpRequestUpload.idl\nWebCore/xml/XMLSerializer.idl\nWebCore/xml/XPathEvaluator.idl\nWebCore/xml/XPathException.idl\nWebCore/xml/XPathExpression.idl\nWebCore/xml/XPathNSResolver.idl\nWebCore/xml/XPathResult.idl\nWebCore/xml/XSLTProcessor.idl\nInternalSettingsGenerated.idl\nWebCore/inspector/JavaScriptCallFrame.idl\n" > ./idl_files.tmp
+perl JavaScriptCore/docs/make-bytecode-docs.pl JavaScriptCore/interpreter/Interpreter.cpp docs/bytecode.html
+cat WebCore/css/CSSPropertyNames.in WebCore/css/SVGCSSPropertyNames.in > CSSPropertyNames.in
+rm -f ./idl_files.tmp
+python JavaScriptCore/KeywordLookupGenerator.py JavaScriptCore/parser/Keywords.table > KeywordLookup.h
+sed -e s/\<WebCore/\<WebKit/ -e s/DOMDOMImplementation/DOMImplementation/ /Volumes/Data/Build/Release/WebCore.framework/PrivateHeaders/DOM.h > /Volumes/Data/Build/Release/WebKit.framework/Versions/A/Headers/DOM.h
+END
+
+for my $line (@expectIgnoredLines) {
+ is(shouldIgnoreLine("", $line), 1, description("Ignored: " . $line));
+}
+
+#
+# Test input starting with four spaces
+#
+my @buildSettingsLines = split(/$INPUT_RECORD_SEPARATOR/, <<'END');
+Build settings from command line:
+ ARCHS = i386 x86_64
+ OBJROOT = /Volumes/Data/Build
+ ONLY_ACTIVE_ARCH = NO
+ SHARED_PRECOMPS_DIR = /Volumes/Data/Build/PrecompiledHeaders
+ SYMROOT = /Volumes/Data/Build
+END
+
+for my $i (0..scalar(@buildSettingsLines) - 1) {
+ my $previousLine = $i ? $buildSettingsLines[$i - 1] : "";
+ my $line = $buildSettingsLines[$i];
+ is(shouldIgnoreLine($previousLine, $line), 1, description("Ignored: " . $line));
+}
+
+#
+# Test input for undefined symbols error message
+#
+my @undefinedSymbolsLines = split(/$INPUT_RECORD_SEPARATOR/, <<'END');
+Undefined symbols for architecture x86_64:
+ "__ZN6WebKit12WebPageProxy28exposedRectChangedTimerFiredEPN7WebCore5TimerIS0_EE", referenced from:
+ __ZN6WebKit12WebPageProxyC2EPNS_10PageClientEN3WTF10PassRefPtrINS_15WebProcessProxyEEEPNS_12WebPageGroupEy in WebPageProxy.o
+ld: symbol(s) not found for architecture x86_64
+clang: error: linker command failed with exit code 1 (use -v to see invocation)
+END
+
+for my $i (0..scalar(@undefinedSymbolsLines) - 1) {
+ my $previousLine = $i ? $undefinedSymbolsLines[$i - 1] : "";
+ my $line = $undefinedSymbolsLines[$i];
+ is(shouldIgnoreLine($previousLine, $line), 0, description("Printed: " . $line));
+}
+
+done_testing();
+
+sub description($)
+{
+ my ($line) = @_;
+
+ my $maxLineLength = 200;
+ my $ellipsis = "...";
+ my $truncateLength = $maxLineLength - length($ellipsis);
+
+ my $description = length($line) > $maxLineLength ? substr($line, 0, $truncateLength) : $line;
+ $description .= $ellipsis if length($line) != length($description);
+
+ return $description;
+}
diff --git a/Tools/Scripts/webkitperl/httpd.pm b/Tools/Scripts/webkitperl/httpd.pm
index 58ff108d3..f61dfa00b 100644
--- a/Tools/Scripts/webkitperl/httpd.pm
+++ b/Tools/Scripts/webkitperl/httpd.pm
@@ -90,6 +90,14 @@ sub hasHTTPD
return system(@command) == 0;
}
+sub getApacheVersion
+{
+ my $httpdPath = getHTTPDPath();
+ my $version = `$httpdPath -v`;
+ $version =~ s/.*Server version: Apache\/(\d+\.\d+).*/$1/s;
+ return $version;
+}
+
sub getDefaultConfigForTestDirectory
{
my ($testDirectory) = @_;
@@ -112,11 +120,14 @@ sub getDefaultConfigForTestDirectory
"-c", "TypesConfig \"$typesConfig\"",
# Apache wouldn't run CGIs with permissions==700 otherwise
"-c", "User \"#$<\"",
- "-c", "LockFile \"$httpdLockFile\"",
"-c", "PidFile \"$httpdPidFile\"",
"-c", "ScoreBoardFile \"$httpdScoreBoardFile\"",
);
+ if (getApacheVersion() eq "2.2") {
+ push(@httpdArgs, "-c", "LockFile \"$httpdLockFile\"");
+ }
+
# FIXME: Enable this on Windows once <rdar://problem/5345985> is fixed
# The version of Apache we use with Cygwin does not support SSL
my $sslCertificate = "$testDirectory/http/conf/webkit-httpd.pem";
@@ -134,6 +145,7 @@ sub getHTTPDConfigPathForTestDirectory
my $httpdConfig;
my $httpdPath = getHTTPDPath();
my $httpdConfDirectory = "$testDirectory/http/conf/";
+ my $apacheVersion = getApacheVersion();
if (isCygwin()) {
my $libPHP4DllPath = "/usr/lib/apache/libphp4.dll";
@@ -144,9 +156,9 @@ sub getHTTPDConfigPathForTestDirectory
}
$httpdConfig = "cygwin-httpd.conf"; # This is an apache 1.3 config.
} elsif (isDebianBased()) {
- $httpdConfig = "apache2-debian-httpd.conf";
+ $httpdConfig = "debian-httpd-$apacheVersion.conf";
} elsif (isFedoraBased()) {
- $httpdConfig = "fedora-httpd.conf"; # This is an apache2 config, despite the name.
+ $httpdConfig = "fedora-httpd-$apacheVersion.conf";
} else {
# All other ports use apache2, so just use our default apache2 config.
$httpdConfig = "apache2-httpd.conf";
diff --git a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt
index d94b07406..c58560e98 100644
--- a/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt
+++ b/Tools/Scripts/webkitperl/prepare-ChangeLog_unittest/resources/cpp_unittests-expected.txt
@@ -138,11 +138,6 @@
'Class2::func25'
],
[
- '158',
- '159',
- 'Class1'
- ],
- [
'162',
'164',
'Class1::func26'
@@ -183,11 +178,6 @@
'Class103::Class103'
],
[
- '204',
- '205',
- 'Struct1'
- ],
- [
'208',
'210',
'Struct1::func29'
@@ -198,159 +188,34 @@
'Struct2::func30'
],
[
- '219',
- '219',
- 'NameSpace1'
- ],
- [
'220',
'222',
'NameSpace1::func30'
],
[
- '223',
- '223',
- 'NameSpace1'
- ],
- [
- '228',
- '228',
- 'NameSpace2'
- ],
- [
'229',
'231',
'NameSpace1::NameSpace2::func31'
],
[
- '232',
- '232',
- 'NameSpace2'
- ],
- [
- '237',
- '240',
- 'Class104'
- ],
- [
- '244',
- '249',
- 'Class105'
- ],
- [
- '253',
- '254',
- 'Class106'
- ],
- [
'255',
'259',
'Class106::func32'
],
[
- '260',
- '261',
- 'Class106'
- ],
- [
'262',
'266',
'Class106::func33'
],
[
- '267',
- '268',
- 'Class106'
- ],
- [
- '272',
- '273',
- 'NameSpace3'
- ],
- [
- '275',
- '276',
- 'NameSpace4'
- ],
- [
- '278',
- '279',
- 'NameSpace3'
- ],
- [
- '283',
- '284',
- 'NameSpace5'
- ],
- [
- '286',
- '287',
- 'NameSpace6'
- ],
- [
- '289',
- '290',
- 'Class107'
- ],
- [
'291',
'295',
'NameSpace5::NameSpace6::Class107::func34'
],
[
- '296',
- '297',
- 'Class107'
- ],
- [
- '299',
- '300',
- 'NameSpace6'
- ],
- [
- '302',
- '303',
- 'NameSpace5'
- ],
- [
- '307',
- '307',
- 'Class108'
- ],
- [
'308',
'320',
'Class108::func35'
],
- [
- '321',
- '321',
- 'Class108'
- ],
- [
- '340',
- '354',
- 'NameSpace7'
- ],
- [
- '356',
- '369',
- 'NameSpace8'
- ],
- [
- '371',
- '371',
- 'NameSpace7'
- ],
- [
- '373',
- '386',
- 'Class109'
- ],
- [
- '388',
- '388',
- 'NameSpace7'
- ]
]
}
diff --git a/Tools/Scripts/webkitpy/bindings/main.py b/Tools/Scripts/webkitpy/bindings/main.py
index 15884bb73..9c82b9ae6 100644
--- a/Tools/Scripts/webkitpy/bindings/main.py
+++ b/Tools/Scripts/webkitpy/bindings/main.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -62,7 +61,7 @@ class BindingsTests:
exit_code = e.exit_code
return exit_code
- def generate_supplemental_dependency(self, input_directory, supplemental_dependency_file):
+ def generate_supplemental_dependency(self, input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, sharedworkerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file):
idl_files_list = tempfile.mkstemp()
for input_file in os.listdir(input_directory):
(name, extension) = os.path.splitext(input_file)
@@ -77,7 +76,10 @@ class BindingsTests:
'--idlFilesList', idl_files_list[1],
'--defines', '',
'--supplementalDependencyFile', supplemental_dependency_file,
- '--idlAttributesFile', 'WebCore/bindings/scripts/IDLAttributes.txt']
+ '--windowConstructorsFile', window_constructors_file,
+ '--workerGlobalScopeConstructorsFile', workerglobalscope_constructors_file,
+ '--sharedWorkerGlobalScopeConstructorsFile', sharedworkerglobalscope_constructors_file,
+ '--dedicatedWorkerGlobalScopeConstructorsFile', dedicatedworkerglobalscope_constructors_file]
exit_code = 0
try:
@@ -152,9 +154,17 @@ class BindingsTests:
input_directory = os.path.join('WebCore', 'bindings', 'scripts', 'test')
supplemental_dependency_file = tempfile.mkstemp()[1]
- if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file):
+ window_constructors_file = tempfile.mkstemp()[1]
+ workerglobalscope_constructors_file = tempfile.mkstemp()[1]
+ sharedworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
+ dedicatedworkerglobalscope_constructors_file = tempfile.mkstemp()[1]
+ if self.generate_supplemental_dependency(input_directory, supplemental_dependency_file, window_constructors_file, workerglobalscope_constructors_file, sharedworkerglobalscope_constructors_file, dedicatedworkerglobalscope_constructors_file):
print 'Failed to generate a supplemental dependency file.'
os.remove(supplemental_dependency_file)
+ os.remove(window_constructors_file)
+ os.remove(workerglobalscope_constructors_file)
+ os.remove(sharedworkerglobalscope_constructors_file)
+ os.remove(dedicatedworkerglobalscope_constructors_file)
return -1
for generator in self.generators:
@@ -164,6 +174,10 @@ class BindingsTests:
all_tests_passed = False
os.remove(supplemental_dependency_file)
+ os.remove(window_constructors_file)
+ os.remove(workerglobalscope_constructors_file)
+ os.remove(sharedworkerglobalscope_constructors_file)
+ os.remove(dedicatedworkerglobalscope_constructors_file)
print ''
if all_tests_passed:
print 'All tests PASS!'
diff --git a/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py b/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
index a5fd06568..dcd649a5a 100644
--- a/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/baselineoptimizer_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer
from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -61,25 +61,24 @@ class BaselineOptimizerTest(unittest.TestCase):
def test_move_baselines(self):
host = MockHost()
- host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-win/another/test-expected.txt', 'result A')
- host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium-mac/another/test-expected.txt', 'result A')
- host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt', 'result B')
+ host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac-lion/another/test-expected.txt', 'result A')
+ host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac-lion-wk2/another/test-expected.txt', 'result A')
+ host.filesystem.write_binary_file('/mock-checkout/LayoutTests/platform/mac/another/test-expected.txt', 'result B')
baseline_optimizer = BaselineOptimizer(host, host.port_factory.all_port_names())
baseline_optimizer._move_baselines('another/test-expected.txt', {
- 'LayoutTests/platform/chromium-win': 'aaa',
- 'LayoutTests/platform/chromium-mac': 'aaa',
- 'LayoutTests/platform/chromium': 'bbb',
+ 'LayoutTests/platform/mac-lion': 'aaa',
+ 'LayoutTests/platform/mac-lion-wk2': 'aaa',
+ 'LayoutTests/platform/mac': 'bbb',
}, {
- 'LayoutTests/platform/chromium': 'aaa',
+ 'LayoutTests/platform/mac': 'aaa',
})
- self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/LayoutTests/platform/chromium/another/test-expected.txt'), 'result A')
+ self.assertEqual(host.filesystem.read_binary_file('/mock-checkout/LayoutTests/platform/mac/another/test-expected.txt'), 'result A')
- def test_chromium_linux_redundant_with_win(self):
+ def test_efl(self):
self._assertOptimization({
- 'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-linux': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
+ 'LayoutTests/platform/efl': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
}, {
- 'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
+ 'LayoutTests/platform/efl': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
})
def test_no_add_mac_future(self):
@@ -87,21 +86,10 @@ class BaselineOptimizerTest(unittest.TestCase):
'LayoutTests/platform/mac': '29a1715a6470d5dd9486a142f609708de84cdac8',
'LayoutTests/platform/win-xp': '453e67177a75b2e79905154ece0efba6e5bfb65d',
'LayoutTests/platform/mac-lion': 'c43eaeb358f49d5e835236ae23b7e49d7f2b089f',
- 'LayoutTests/platform/chromium-mac': 'a9ba153c700a94ae1b206d8e4a75a621a89b4554',
}, {
'LayoutTests/platform/mac': '29a1715a6470d5dd9486a142f609708de84cdac8',
'LayoutTests/platform/win-xp': '453e67177a75b2e79905154ece0efba6e5bfb65d',
'LayoutTests/platform/mac-lion': 'c43eaeb358f49d5e835236ae23b7e49d7f2b089f',
- 'LayoutTests/platform/chromium-mac': 'a9ba153c700a94ae1b206d8e4a75a621a89b4554',
- })
-
- def test_chromium_covers_mac_win_linux(self):
- self._assertOptimization({
- 'LayoutTests/platform/chromium-mac': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- 'LayoutTests/platform/chromium-linux': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
- }, {
- 'LayoutTests/platform/chromium': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
})
def test_mac_future(self):
@@ -124,13 +112,11 @@ class BaselineOptimizerTest(unittest.TestCase):
'LayoutTests/platform/mac': '2',
'LayoutTests/platform/gtk': '3',
'LayoutTests/platform/qt': '4',
- 'LayoutTests/platform/chromium': '5',
}, {
'LayoutTests/platform/win': '1',
'LayoutTests/platform/mac': '2',
'LayoutTests/platform/gtk': '3',
'LayoutTests/platform/qt': '4',
- 'LayoutTests/platform/chromium': '5',
})
def test_common_directory_includes_root(self):
@@ -139,17 +125,12 @@ class BaselineOptimizerTest(unittest.TestCase):
self._assertOptimizationFailed({
'LayoutTests/platform/gtk': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
'LayoutTests/platform/qt': 'bcbd457d545986b7abf1221655d722363079ac87',
- 'LayoutTests/platform/chromium-win': '3764ac11e1f9fbadd87a90a2e40278319190a0d3',
'LayoutTests/platform/mac': 'e8608763f6241ddacdd5c1ef1973ba27177d0846',
})
self._assertOptimization({
- 'LayoutTests/platform/chromium-win': '23a30302a6910f8a48b1007fa36f3e3158341834',
'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
- 'LayoutTests/platform/chromium-mac': '23a30302a6910f8a48b1007fa36f3e3158341834',
- 'LayoutTests/platform/chromium': '1',
}, {
- 'LayoutTests/platform/chromium': '23a30302a6910f8a48b1007fa36f3e3158341834',
'LayoutTests': '9c876f8c3e4cc2aef9519a6c1174eb3432591127',
})
@@ -159,35 +140,22 @@ class BaselineOptimizerTest(unittest.TestCase):
if sys.platform == 'win32':
return
self._assertOptimization({
- 'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac': '5daa78e55f05d9f0d1bb1f32b0cd1bc3a01e9364',
- 'LayoutTests/platform/chromium-win-xp': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac-lion': '7ad045ece7c030e2283c5d21d9587be22bcba56e',
- 'LayoutTests/platform/chromium-win': 'f83af9732ce74f702b8c9c4a3d9a4c6636b8d3bd',
'LayoutTests/platform/win-xp': '5b1253ef4d5094530d5f1bc6cdb95c90b446bec7',
- 'LayoutTests/platform/chromium-linux': 'f52fcdde9e4be8bd5142171cd859230bd4471036',
}, {
- 'LayoutTests/platform/chromium-win': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac': '5daa78e55f05d9f0d1bb1f32b0cd1bc3a01e9364',
- 'LayoutTests/platform/chromium-win-xp': '462d03b9c025db1b0392d7453310dbee5f9a9e74',
'LayoutTests/platform/mac-lion': '7ad045ece7c030e2283c5d21d9587be22bcba56e',
- 'LayoutTests/platform/chromium-win': 'f83af9732ce74f702b8c9c4a3d9a4c6636b8d3bd',
'LayoutTests/platform/win-xp': '5b1253ef4d5094530d5f1bc6cdb95c90b446bec7',
- 'LayoutTests/platform/chromium-linux': 'f52fcdde9e4be8bd5142171cd859230bd4471036'
})
def test_virtual_ports_filtered(self):
self._assertOptimization({
- 'LayoutTests/platform/chromium-mac': '1',
- 'LayoutTests/platform/chromium-mac-snowleopard': '1',
- 'LayoutTests/platform/chromium-win': '2',
'LayoutTests/platform/gtk': '3',
'LayoutTests/platform/efl': '3',
'LayoutTests/platform/qt': '4',
'LayoutTests/platform/mac': '5',
}, {
- 'LayoutTests/platform/chromium-mac': '1',
- 'LayoutTests/platform/chromium-win': '2',
'LayoutTests': '3',
'LayoutTests/platform/qt': '4',
'LayoutTests/platform/mac': '5',
diff --git a/Tools/Scripts/webkitpy/common/checkout/changelog.py b/Tools/Scripts/webkitpy/common/checkout/changelog.py
index c5cf42c79..47c6b64c5 100644
--- a/Tools/Scripts/webkitpy/common/checkout/changelog.py
+++ b/Tools/Scripts/webkitpy/common/checkout/changelog.py
@@ -28,14 +28,13 @@
#
# WebKit's Python module for parsing and modifying ChangeLog files
-import codecs
-import fileinput # inplace file editing for set_reviewer_in_changelog
import logging
import re
+from StringIO import StringIO
import textwrap
from webkitpy.common.config.committers import CommitterList
-from webkitpy.common.config.committers import Account
+from webkitpy.common.system.filesystem import FileSystem
import webkitpy.common.config.urls as config_urls
_log = logging.getLogger(__name__)
@@ -64,6 +63,8 @@ class ChangeLogEntry(object):
# e.g. * Source/WebCore/page/EventHandler.cpp: Implement FooBarQuux.
touched_files_regexp = r'^\s*\*\s*(?P<file>[A-Za-z0-9_\-\./\\]+)\s*\:'
+ # e.g. (ChangeLogEntry.touched_functions): Added.
+ touched_functions_regexp = r'^\s*\((?P<function>[^)]*)\):'
# e.g. Reviewed by Darin Adler.
# (Discard everything after the first period to match more invalid lines.)
@@ -102,14 +103,16 @@ class ChangeLogEntry(object):
# e.g. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@96161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svn_id_regexp = r'git-svn-id: http://svn.webkit.org/repository/webkit/trunk@(?P<svnid>\d+) '
+ split_names_regexp = r'\s*(?:,(?:\s+and\s+|&)?|(?:^|\s+)and\s+|&&|[/+&])\s*'
+
def __init__(self, contents, committer_list=CommitterList(), revision=None):
self._contents = contents
self._committer_list = committer_list
self._revision = revision
self._parse_entry()
- @staticmethod
- def _parse_reviewer_text(text):
+ @classmethod
+ def _parse_reviewer_text(cls, text):
match = re.search(ChangeLogEntry.reviewed_by_regexp, text, re.MULTILINE | re.IGNORECASE)
if not match:
# There are cases where people omit "by". We match it only if reviewer part looked nice
@@ -129,7 +132,7 @@ class ChangeLogEntry(object):
if not len(reviewer_text):
return None, None
- reviewer_list = ChangeLogEntry._split_contributor_names(reviewer_text)
+ reviewer_list = ChangeLogEntry._split_reviewer_names(reviewer_text)
# Get rid of "reviewers" like "even though this is just a..." in "Reviewed by Sam Weinig, even though this is just a..."
# and "who wrote the original code" in "Noam Rosenthal, who wrote the original code"
@@ -137,9 +140,17 @@ class ChangeLogEntry(object):
return reviewer_text, reviewer_list
- @staticmethod
- def _split_contributor_names(text):
- return re.split(r'\s*(?:,(?:\s+and\s+|&)?|(?:^|\s+)and\s+|&&|[/+&])\s*', text)
+ @classmethod
+ def _split_reviewer_names(cls, text):
+ return re.split(ChangeLogEntry.split_names_regexp, text)
+
+ @classmethod
+ def _split_author_names_with_emails(cls, text):
+ regex = '>' + ChangeLogEntry.split_names_regexp
+ names = re.split(regex, text)
+ if len(names) > 1:
+ names = [name + ">" for name in names[:-1]] + [names[-1]]
+ return names
def _fuzz_match_reviewers(self, reviewers_text_list):
if not reviewers_text_list:
@@ -148,24 +159,54 @@ class ChangeLogEntry(object):
# Flatten lists and get rid of any reviewers with more than one candidate.
return [reviewers[0] for reviewers in list_of_reviewers if len(reviewers) == 1]
- @staticmethod
- def _parse_author_name_and_email(author_name_and_email):
+ @classmethod
+ def _parse_author_name_and_email(cls, author_name_and_email):
match = re.match(r'(?P<name>.+?)\s+<(?P<email>[^>]+)>', author_name_and_email)
return {'name': match.group("name"), 'email': match.group("email")}
- @staticmethod
- def _parse_author_text(text):
+ @classmethod
+ def _parse_author_text(cls, text):
if not text:
return []
- authors = ChangeLogEntry._split_contributor_names(text)
+ authors = cls._split_author_names_with_emails(text)
assert(authors and len(authors) >= 1)
- return [ChangeLogEntry._parse_author_name_and_email(author) for author in authors]
+ return [cls._parse_author_name_and_email(author) for author in authors]
+
+ @classmethod
+ def _parse_touched_functions(cls, text):
+ result = {}
+ cur_file = None
+ for line in text.splitlines():
+ file_match = re.match(cls.touched_files_regexp, line)
+ if file_match:
+ cur_file = file_match.group("file")
+ result[cur_file] = []
+ func_match = re.match(cls.touched_functions_regexp, line)
+ if func_match and cur_file:
+ result[cur_file].append(func_match.group("function"))
+ return result
+
+ @classmethod
+ def _parse_bug_description(cls, text):
+ # If line 4 is a bug url, line 3 is the bug description.
+ # It's too hard to guess in other cases, so we return None.
+ lines = text.splitlines()
+ if len(lines) < 4:
+ return None
+ for bug_url in (config_urls.bug_url_short, config_urls.bug_url_long):
+ if re.match("^\s*" + bug_url + "$", lines[3]):
+ return lines[2].strip()
+ return None
def _parse_entry(self):
match = re.match(self.date_line_regexp, self._contents, re.MULTILINE)
if not match:
_log.warning("Creating invalid ChangeLogEntry:\n%s" % self._contents)
+ self._date_line = match.group()
+ self._date = match.group("date")
+ self._bug_description = self._parse_bug_description(self._contents)
+
# FIXME: group("name") does not seem to be Unicode? Probably due to self._contents not being unicode.
self._author_text = match.group("authors") if match else None
self._authors = ChangeLogEntry._parse_author_text(self._author_text)
@@ -175,6 +216,13 @@ class ChangeLogEntry(object):
self._author = self._committer_list.contributor_by_email(self.author_email()) or self._committer_list.contributor_by_name(self.author_name())
self._touched_files = re.findall(self.touched_files_regexp, self._contents, re.MULTILINE)
+ self._touched_functions = self._parse_touched_functions(self._contents)
+
+ def date_line(self):
+ return self._date_line
+
+ def date(self):
+ return self._date
def author_text(self):
return self._author_text
@@ -220,69 +268,75 @@ class ChangeLogEntry(object):
def bug_id(self):
return parse_bug_id_from_changelog(self._contents)
+ def bug_description(self):
+ return self._bug_description
+
def touched_files(self):
return self._touched_files
+ # Returns a dict from file name to lists of function names.
+ def touched_functions(self):
+ return self._touched_functions
+
+ def touched_files_text(self):
+ match = re.search(self.touched_files_regexp, self._contents, re.MULTILINE)
+ return self._contents[match.start():].lstrip("\n\r") if match else ""
+
+ # Determine if any text has been added to the section on touched files
+ def is_touched_files_text_clean(self):
+ file_line_end = r"( (Added|Removed|(Copied|Renamed) from [A-Za-z0-9_\-./\\]+).)?$"
+ for line in self.touched_files_text().splitlines():
+ if re.match(self.touched_files_regexp + file_line_end, line):
+ continue
+ if re.match(self.touched_functions_regexp + "$", line):
+ continue
+ return False
+ return True
# FIXME: Various methods on ChangeLog should move into ChangeLogEntry instead.
class ChangeLog(object):
- def __init__(self, path):
+ def __init__(self, path, filesystem=None):
self.path = path
+ self._filesystem = filesystem or FileSystem()
_changelog_indent = " " * 8
- @staticmethod
- def parse_latest_entry_from_file(changelog_file):
- """changelog_file must be a file-like object which returns
- unicode strings. Use codecs.open or StringIO(unicode())
- to pass file objects to this class."""
- date_line_regexp = re.compile(ChangeLogEntry.date_line_regexp)
- rolled_over_regexp = re.compile(ChangeLogEntry.rolled_over_regexp)
- entry_lines = []
- # The first line should be a date line.
- first_line = changelog_file.readline()
- assert(isinstance(first_line, unicode))
- if not date_line_regexp.match(first_line):
+ @classmethod
+ def parse_latest_entry_from_file(cls, changelog_file):
+ try:
+ return next(cls.parse_entries_from_file(changelog_file))
+ except StopIteration, e:
return None
- entry_lines.append(first_line)
-
- for line in changelog_file:
- # If we've hit the next entry, return.
- if date_line_regexp.match(line) or rolled_over_regexp.match(line):
- # Remove the extra newline at the end
- return ChangeLogEntry(''.join(entry_lines[:-1]))
- entry_lines.append(line)
- return None # We never found a date line!
svn_blame_regexp = re.compile(r'^(\s*(?P<revision>\d+) [^ ]+)\s*(?P<line>.*?\n)')
- @staticmethod
- def _separate_revision_and_line(line):
- match = ChangeLog.svn_blame_regexp.match(line)
+ @classmethod
+ def _separate_revision_and_line(cls, line):
+ match = cls.svn_blame_regexp.match(line)
if not match:
return None, line
return int(match.group('revision')), match.group('line')
- @staticmethod
- def parse_entries_from_file(changelog_file):
+ @classmethod
+ def parse_entries_from_file(cls, changelog_file):
"""changelog_file must be a file-like object which returns
- unicode strings. Use codecs.open or StringIO(unicode())
- to pass file objects to this class."""
+ unicode strings, e.g. from StringIO(unicode()) or
+ fs.open_text_file_for_reading()"""
date_line_regexp = re.compile(ChangeLogEntry.date_line_regexp)
rolled_over_regexp = re.compile(ChangeLogEntry.rolled_over_regexp)
# The first line should be a date line.
- revision, first_line = ChangeLog._separate_revision_and_line(changelog_file.readline())
+ revision, first_line = cls._separate_revision_and_line(changelog_file.readline())
assert(isinstance(first_line, unicode))
- if not date_line_regexp.match(ChangeLog.svn_blame_regexp.sub('', first_line)):
+ if not date_line_regexp.match(cls.svn_blame_regexp.sub('', first_line)):
raise StopIteration
entry_lines = [first_line]
revisions_in_entry = {revision: 1} if revision != None else None
for line in changelog_file:
if revisions_in_entry:
- revision, line = ChangeLog._separate_revision_and_line(line)
+ revision, line = cls._separate_revision_and_line(line)
if rolled_over_regexp.match(line):
break
@@ -303,7 +357,7 @@ class ChangeLog(object):
def latest_entry(self):
# ChangeLog files are always UTF-8, we read them in as such to support Reviewers with unicode in their names.
- changelog_file = codecs.open(self.path, "r", "utf-8")
+ changelog_file = self._filesystem.open_text_file_for_reading(self.path)
try:
return self.parse_latest_entry_from_file(changelog_file)
finally:
@@ -331,20 +385,22 @@ class ChangeLog(object):
first_boilerplate_line_regexp = re.compile(
"%sNeed a short description \(OOPS!\)\." % self._changelog_indent)
removing_boilerplate = False
- # inplace=1 creates a backup file and re-directs stdout to the file
- for line in fileinput.FileInput(self.path, inplace=1):
- if first_boilerplate_line_regexp.search(line):
- message_lines = self._wrap_lines(message)
- print first_boilerplate_line_regexp.sub(message_lines, line),
- # Remove all the ChangeLog boilerplate before the first changed
- # file.
- removing_boilerplate = True
- elif removing_boilerplate:
- if line.find('*') >= 0: # each changed file is preceded by a *
- removing_boilerplate = False
-
- if not removing_boilerplate:
- print line,
+ result = StringIO()
+ with self._filesystem.open_text_file_for_reading(self.path) as file:
+ for line in file:
+ if first_boilerplate_line_regexp.search(line):
+ message_lines = self._wrap_lines(message)
+ result.write(first_boilerplate_line_regexp.sub(message_lines, line))
+ # Remove all the ChangeLog boilerplate before the first changed
+ # file.
+ removing_boilerplate = True
+ elif removing_boilerplate:
+ if line.find('*') >= 0: # each changed file is preceded by a *
+ removing_boilerplate = False
+
+ if not removing_boilerplate:
+ result.write(line)
+ self._filesystem.write_text_file(self.path, result.getvalue())
def set_reviewer(self, reviewer):
latest_entry = self.latest_entry()
@@ -355,25 +411,49 @@ class ChangeLog(object):
if not found_nobody and not reviewer_text:
bug_url_number_of_items = len(re.findall(config_urls.bug_url_long, latest_entry_contents, re.MULTILINE))
bug_url_number_of_items += len(re.findall(config_urls.bug_url_short, latest_entry_contents, re.MULTILINE))
- for line in fileinput.FileInput(self.path, inplace=1):
- found_bug_url = re.search(config_urls.bug_url_long, line)
- if not found_bug_url:
- found_bug_url = re.search(config_urls.bug_url_short, line)
- print line,
- if found_bug_url:
- if bug_url_number_of_items == 1:
- print "\n Reviewed by %s." % (reviewer.encode("utf-8"))
- bug_url_number_of_items -= 1
+ result = StringIO()
+ with self._filesystem.open_text_file_for_reading(self.path) as file:
+ for line in file:
+ found_bug_url = re.search(config_urls.bug_url_long, line)
+ if not found_bug_url:
+ found_bug_url = re.search(config_urls.bug_url_short, line)
+ result.write(line)
+ if found_bug_url:
+ if bug_url_number_of_items == 1:
+ result.write("\n Reviewed by %s.\n" % reviewer)
+ bug_url_number_of_items -= 1
+ self._filesystem.write_text_file(self.path, result.getvalue())
else:
- # inplace=1 creates a backup file and re-directs stdout to the file
- for line in fileinput.FileInput(self.path, inplace=1):
- # Trailing comma suppresses printing newline
- print line.replace("NOBODY (OOPS!)", reviewer.encode("utf-8")),
+ data = self._filesystem.read_text_file(self.path)
+ newdata = data.replace("NOBODY (OOPS!)", reviewer)
+ self._filesystem.write_text_file(self.path, newdata)
def set_short_description_and_bug_url(self, short_description, bug_url):
message = "%s\n%s%s" % (short_description, self._changelog_indent, bug_url)
bug_boilerplate = "%sNeed the bug URL (OOPS!).\n" % self._changelog_indent
- for line in fileinput.FileInput(self.path, inplace=1):
- line = line.replace("Need a short description (OOPS!).", message.encode("utf-8"))
- if line != bug_boilerplate:
- print line,
+ result = StringIO()
+ with self._filesystem.open_text_file_for_reading(self.path) as file:
+ for line in file:
+ line = line.replace("Need a short description (OOPS!).", message)
+ if line != bug_boilerplate:
+ result.write(line)
+ self._filesystem.write_text_file(self.path, result.getvalue())
+
+ def delete_entries(self, num_entries):
+ date_line_regexp = re.compile(ChangeLogEntry.date_line_regexp)
+ rolled_over_regexp = re.compile(ChangeLogEntry.rolled_over_regexp)
+ entries = 0
+ result = StringIO()
+ with self._filesystem.open_text_file_for_reading(self.path) as file:
+ for line in file:
+ if date_line_regexp.match(line):
+ entries += 1
+ elif rolled_over_regexp.match(line):
+ entries = num_entries + 1
+ if entries > num_entries:
+ result.write(line)
+ self._filesystem.write_text_file(self.path, result.getvalue())
+
+ def prepend_text(self, text):
+ data = self._filesystem.read_text_file(self.path)
+ self._filesystem.write_text_file(self.path, text + data)
diff --git a/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py b/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
index fa2339f45..05b21e0d3 100644
--- a/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/changelog_unittest.py
@@ -26,18 +26,18 @@
# (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 codecs
-import os
-import tempfile
-import unittest
+import unittest2 as unittest
from StringIO import StringIO
+from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.checkout.changelog import *
class ChangeLogTest(unittest.TestCase):
+ _changelog_path = 'Tools/ChangeLog'
+
_example_entry = u'''2009-08-17 Peter Kasting <pkasting@google.com>
Reviewed by Tor Arne Vestb\xf8.
@@ -236,17 +236,31 @@ class ChangeLogTest(unittest.TestCase):
changelog_file = StringIO(self._example_changelog)
parsed_entries = list(ChangeLog.parse_entries_from_file(changelog_file))
self.assertEqual(len(parsed_entries), 9)
+ self.assertEqual(parsed_entries[0].date_line(), u"2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>")
+ self.assertEqual(parsed_entries[0].date(), "2009-08-17")
self.assertEqual(parsed_entries[0].reviewer_text(), "David Levin")
+ self.assertEqual(parsed_entries[0].is_touched_files_text_clean(), False)
+ self.assertEqual(parsed_entries[1].date_line(), "2009-08-16 David Kilzer <ddkilzer@apple.com>")
+ self.assertEqual(parsed_entries[1].date(), "2009-08-16")
self.assertEqual(parsed_entries[1].author_email(), "ddkilzer@apple.com")
+ self.assertEqual(parsed_entries[1].touched_files_text(), " * Scripts/bugzilla-tool:\n * Scripts/modules/scm.py:\n")
+ self.assertEqual(parsed_entries[1].is_touched_files_text_clean(), True)
self.assertEqual(parsed_entries[2].reviewer_text(), "Mark Rowe")
self.assertEqual(parsed_entries[2].touched_files(), ["DumpRenderTree/mac/DumpRenderTreeWindow.mm"])
+ self.assertEqual(parsed_entries[2].touched_functions(), {"DumpRenderTree/mac/DumpRenderTreeWindow.mm": ["-[DumpRenderTreeWindow close]"]})
+ self.assertEqual(parsed_entries[2].is_touched_files_text_clean(), False)
self.assertEqual(parsed_entries[3].author_name(), "Benjamin Poulain")
self.assertEqual(parsed_entries[3].touched_files(), ["platform/cf/KURLCFNet.cpp", "platform/mac/KURLMac.mm",
"WebCoreSupport/ChromeClientEfl.cpp", "ewk/ewk_private.h", "ewk/ewk_view.cpp"])
+ self.assertEqual(parsed_entries[3].touched_functions(), {"platform/cf/KURLCFNet.cpp": ["WebCore::createCFURLFromBuffer", "WebCore::KURL::createCFURL"],
+ "platform/mac/KURLMac.mm": ["WebCore::KURL::operator NSURL *", "WebCore::KURL::createCFURL"],
+ "WebCoreSupport/ChromeClientEfl.cpp": ["WebCore::ChromeClientEfl::closeWindowSoon"], "ewk/ewk_private.h": [], "ewk/ewk_view.cpp": []})
+ self.assertEqual(parsed_entries[3].bug_description(), "[Mac] ResourceRequest's nsURLRequest() does not differentiate null and empty URLs with CFNetwork")
self.assertEqual(parsed_entries[4].reviewer_text(), "David Hyatt")
+ self.assertIsNone(parsed_entries[4].bug_description())
self.assertEqual(parsed_entries[5].reviewer_text(), "Adam Roben")
self.assertEqual(parsed_entries[6].reviewer_text(), "Tony Chang")
- self.assertEqual(parsed_entries[7].reviewer_text(), None)
+ self.assertIsNone(parsed_entries[7].reviewer_text())
self.assertEqual(parsed_entries[8].reviewer_text(), 'Darin Adler')
def test_parse_log_entries_from_annotated_file(self):
@@ -439,6 +453,10 @@ class ChangeLogTest(unittest.TestCase):
[('New Contributor', 'new@webkit.org'), ('Noob', 'noob@webkit.org')])
self._assert_parse_authors('Adam Barth <abarth@webkit.org> && Benjamin Poulain <bpoulain@apple.com>',
[('Adam Barth', 'abarth@webkit.org'), ('Benjamin Poulain', 'bpoulain@apple.com')])
+ self._assert_parse_authors(u'Pawe\u0142 Hajdan, Jr. <phajdan.jr@chromium.org>',
+ [(u'Pawe\u0142 Hajdan, Jr.', u'phajdan.jr@chromium.org')])
+ self._assert_parse_authors(u'Pawe\u0142 Hajdan, Jr. <phajdan.jr@chromium.org>, Adam Barth <abarth@webkit.org>',
+ [(u'Pawe\u0142 Hajdan, Jr.', u'phajdan.jr@chromium.org'), (u'Adam Barth', u'abarth@webkit.org')])
def _assert_has_valid_reviewer(self, reviewer_line, expected):
self.assertEqual(self._entry_with_reviewer(reviewer_line).has_valid_reviewer(), expected)
@@ -454,6 +472,48 @@ class ChangeLogTest(unittest.TestCase):
self._assert_has_valid_reviewer("Rubber stamped by Eric Seidel.", True)
self._assert_has_valid_reviewer("Unreviewed build fix.", True)
+ def test_is_touched_files_text_clean(self):
+ tests = [
+ ('''2013-01-30 Timothy Loh <timloh@chromium.com>
+
+ Make ChangeLogEntry detect annotations by prepare-ChangeLog (Added/Removed/Copied from/Renamed from) as clean.
+ https://bugs.webkit.org/show_bug.cgi?id=108433
+
+ * Scripts/webkitpy/common/checkout/changelog.py:
+ (ChangeLogEntry.is_touched_files_text_clean):
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_is_touched_files_text_clean):
+''', True),
+ ('''2013-01-10 Alan Cutter <alancutter@chromium.org>
+
+ Perform some file operations (automatically added comments).
+
+ * QueueStatusServer/config/charts.py: Copied from Tools/QueueStatusServer/model/queuelog.py.
+ (get_time_unit):
+ * QueueStatusServer/handlers/queuecharts.py: Added.
+ (QueueCharts):
+ * Scripts/webkitpy/tool/bot/testdata/webkit_sheriff_0.js: Removed.
+ * EWSTools/build-vm.sh: Renamed from Tools/EWSTools/cold-boot.sh.
+''', True),
+ ('''2013-01-30 Timothy Loh <timloh@chromium.com>
+
+ Add unit test (manually added comment).
+
+ * Scripts/webkitpy/common/checkout/changelog_unittest.py:
+ (test_is_touched_files_text_clean): Added.
+''', False),
+ ('''2013-01-30 Timothy Loh <timloh@chromium.com>
+
+ Add file (manually added comment).
+
+ * Scripts/webkitpy/common/checkout/super_changelog.py: Copied from the internet.
+''', False),
+ ]
+
+ for contents, expected_result in tests:
+ entry = ChangeLogEntry(contents)
+ self.assertEqual(entry.is_touched_files_text_clean(), expected_result)
+
def test_latest_entry_parse(self):
changelog_contents = u"%s\n%s" % (self._example_entry, self._example_changelog)
changelog_file = StringIO(changelog_contents)
@@ -462,7 +522,9 @@ class ChangeLogTest(unittest.TestCase):
self.assertEqual(latest_entry.author_name(), "Peter Kasting")
self.assertEqual(latest_entry.author_email(), "pkasting@google.com")
self.assertEqual(latest_entry.reviewer_text(), u"Tor Arne Vestb\xf8")
- self.assertEqual(latest_entry.touched_files(), ["DumpRenderTree/win/DumpRenderTree.vcproj", "DumpRenderTree/win/ImageDiff.vcproj", "DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj"])
+ touched_files = ["DumpRenderTree/win/DumpRenderTree.vcproj", "DumpRenderTree/win/ImageDiff.vcproj", "DumpRenderTree/win/TestNetscapePlugin/TestNetscapePlugin.vcproj"]
+ self.assertEqual(latest_entry.touched_files(), touched_files)
+ self.assertEqual(latest_entry.touched_functions(), dict((f, []) for f in touched_files))
self.assertTrue(latest_entry.reviewer()) # Make sure that our UTF8-based lookup of Tor works.
@@ -473,19 +535,6 @@ class ChangeLogTest(unittest.TestCase):
self.assertEqual(latest_entry.contents(), self._example_entry)
self.assertEqual(latest_entry.author_name(), "Peter Kasting")
- @staticmethod
- def _write_tmp_file_with_contents(byte_array):
- assert(isinstance(byte_array, str))
- (file_descriptor, file_path) = tempfile.mkstemp() # NamedTemporaryFile always deletes the file on close in python < 2.6
- with os.fdopen(file_descriptor, "w") as file:
- file.write(byte_array)
- return file_path
-
- @staticmethod
- def _read_file_contents(file_path, encoding):
- with codecs.open(file_path, "r", encoding) as file:
- return file.read()
-
# FIXME: We really should be getting this from prepare-ChangeLog itself.
_new_entry_boilerplate = '''2009-08-19 Eric Seidel <eric@webkit.org>
@@ -536,50 +585,83 @@ class ChangeLogTest(unittest.TestCase):
'''
def test_set_reviewer(self):
+ fs = MockFileSystem()
+
changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
reviewer_name = 'Test Reviewer'
- ChangeLog(changelog_path).set_reviewer(reviewer_name)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
+ fs.write_text_file(self._changelog_path, changelog_contents)
+ ChangeLog(self._changelog_path, fs).set_reviewer(reviewer_name)
+ actual_contents = fs.read_text_file(self._changelog_path)
expected_contents = changelog_contents.replace('NOBODY (OOPS!)', reviewer_name)
- os.remove(changelog_path)
self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_line, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents_without_reviewer_line.encode("utf-8"))
- ChangeLog(changelog_path).set_reviewer(reviewer_name)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
- os.remove(changelog_path)
+ fs.write_text_file(self._changelog_path, changelog_contents_without_reviewer_line)
+ ChangeLog(self._changelog_path, fs).set_reviewer(reviewer_name)
+ actual_contents = fs.read_text_file(self._changelog_path)
self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
changelog_contents_without_reviewer_line = u"%s\n%s" % (self._new_entry_boilerplate_without_reviewer_multiple_bugurl, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents_without_reviewer_line.encode("utf-8"))
- ChangeLog(changelog_path).set_reviewer(reviewer_name)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
+ fs.write_text_file(self._changelog_path, changelog_contents_without_reviewer_line)
+ ChangeLog(self._changelog_path, fs).set_reviewer(reviewer_name)
+ actual_contents = fs.read_text_file(self._changelog_path)
changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_multiple_bugurl, self._example_changelog)
expected_contents = changelog_contents.replace('NOBODY (OOPS!)', reviewer_name)
- os.remove(changelog_path)
self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
def test_set_short_description_and_bug_url(self):
+ fs = MockFileSystem()
+
changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate_with_bugurl, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
+ fs.write_text_file(self._changelog_path, changelog_contents)
short_description = "A short description"
bug_url = "http://example.com/b/2344"
- ChangeLog(changelog_path).set_short_description_and_bug_url(short_description, bug_url)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
+ ChangeLog(self._changelog_path, fs).set_short_description_and_bug_url(short_description, bug_url)
+ actual_contents = fs.read_text_file(self._changelog_path)
expected_message = "%s\n %s" % (short_description, bug_url)
expected_contents = changelog_contents.replace("Need a short description (OOPS!).", expected_message)
- os.remove(changelog_path)
self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
+ fs.write_text_file(self._changelog_path, changelog_contents)
short_description = "A short description 2"
bug_url = "http://example.com/b/2345"
- ChangeLog(changelog_path).set_short_description_and_bug_url(short_description, bug_url)
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
+ ChangeLog(self._changelog_path, fs).set_short_description_and_bug_url(short_description, bug_url)
+ actual_contents = fs.read_text_file(self._changelog_path)
expected_message = "%s\n %s" % (short_description, bug_url)
expected_contents = changelog_contents.replace("Need a short description (OOPS!).\n Need the bug URL (OOPS!).", expected_message)
- os.remove(changelog_path)
+ self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
+
+ def test_delete_entries(self):
+ fs = MockFileSystem()
+ fs.write_text_file(self._changelog_path, self._example_changelog)
+ ChangeLog(self._changelog_path, fs).delete_entries(8)
+ actual_contents = fs.read_text_file(self._changelog_path)
+ expected_contents = """2011-10-11 Antti Koivisto <antti@apple.com>
+
+ Resolve regular and visited link style in a single pass
+ https://bugs.webkit.org/show_bug.cgi?id=69838
+
+ Reviewed by Darin Adler
+
+ We can simplify and speed up selector matching by removing the recursive matching done
+ to generate the style for the :visited pseudo selector. Both regular and visited link style
+ can be generated in a single pass through the style selector.
+
+== Rolled over to ChangeLog-2009-06-16 ==
+"""
+ self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
+
+ ChangeLog(self._changelog_path, fs).delete_entries(2)
+ actual_contents = fs.read_text_file(self._changelog_path)
+ expected_contents = "== Rolled over to ChangeLog-2009-06-16 ==\n"
+ self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
+
+
+ def test_prepend_text(self):
+ fs = MockFileSystem()
+ fs.write_text_file(self._changelog_path, self._example_changelog)
+ ChangeLog(self._changelog_path, fs).prepend_text(self._example_entry + "\n")
+ actual_contents = fs.read_text_file(self._changelog_path)
+ expected_contents = self._example_entry + "\n" + self._example_changelog
self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
diff --git a/Tools/Scripts/webkitpy/common/checkout/checkout.py b/Tools/Scripts/webkitpy/common/checkout/checkout.py
index fb686f4d6..60e15b29c 100644
--- a/Tools/Scripts/webkitpy/common/checkout/checkout.py
+++ b/Tools/Scripts/webkitpy/common/checkout/checkout.py
@@ -32,7 +32,6 @@ from webkitpy.common.config import urls
from webkitpy.common.checkout.changelog import ChangeLog, parse_bug_id_from_changelog
from webkitpy.common.checkout.commitinfo import CommitInfo
from webkitpy.common.checkout.scm import CommitMessage
-from webkitpy.common.checkout.deps import DEPS
from webkitpy.common.memoized import memoized
from webkitpy.common.system.executive import ScriptError
@@ -135,10 +134,10 @@ class Checkout(object):
def suggested_reviewers(self, git_commit, changed_files=None):
changed_files = self.modified_non_changelogs(git_commit, changed_files)
- commit_infos = self.recent_commit_infos_for_files(changed_files)
- reviewers = [commit_info.reviewer() for commit_info in commit_infos if commit_info.reviewer()]
- reviewers.extend([commit_info.author() for commit_info in commit_infos if commit_info.author() and commit_info.author().can_review])
- return sorted(set(reviewers))
+ commit_infos = sorted(self.recent_commit_infos_for_files(changed_files), key=lambda info: info.revision(), reverse=True)
+ reviewers = filter(lambda person: person and person.can_review, sum(map(lambda info: [info.reviewer(), info.author()], commit_infos), []))
+ unique_reviewers = reduce(lambda suggestions, reviewer: suggestions + [reviewer if reviewer not in suggestions else None], reviewers, [])
+ return filter(lambda reviewer: reviewer, unique_reviewers)
def bug_id_for_this_commit(self, git_commit, changed_files=None):
try:
@@ -146,9 +145,6 @@ class Checkout(object):
except ScriptError, e:
pass # We might not have ChangeLogs.
- def chromium_deps(self):
- return DEPS(self._scm.absolute_path(self._filesystem.join("Source", "WebKit", "chromium", "DEPS")))
-
def apply_patch(self, patch):
# It's possible that the patch was not made from the root directory.
# We should detect and handle that case.
diff --git a/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py b/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py
index 3c050aeb9..8a17145ca 100644
--- a/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py
+++ b/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py
@@ -26,7 +26,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from .deps_mock import MockDEPS
from .commitinfo import CommitInfo
# FIXME: These imports are wrong, we should use a shared MockCommittersList.
@@ -103,9 +102,6 @@ class MockCheckout(object):
def commit_message_for_this_commit(self, git_commit, changed_files=None):
return MockCommitMessage()
- def chromium_deps(self):
- return MockDEPS()
-
def apply_patch(self, patch):
pass
diff --git a/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py b/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
index a3b47c95e..587798e77 100644
--- a/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py
@@ -30,12 +30,13 @@ import codecs
import os
import shutil
import tempfile
-import unittest
+import unittest2 as unittest
from .checkout import Checkout
from .changelog import ChangeLogEntry
from .scm import CommitMessage, SCMDetector
from .scm.scm_mock import MockSCM
+from webkitpy.common.webkit_finder import WebKitFinder
from webkitpy.common.system.executive import Executive, ScriptError
from webkitpy.common.system.filesystem import FileSystem # FIXME: This should not be needed.
from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -102,6 +103,7 @@ Second part of this complicated change by me, Tor Arne Vestb\u00f8!
self.temp_dir = str(self.filesystem.mkdtemp(suffix="changelogs"))
self.old_cwd = self.filesystem.getcwd()
self.filesystem.chdir(self.temp_dir)
+ self.webkit_base = WebKitFinder(self.filesystem).webkit_base()
# Trick commit-log-editor into thinking we're in a Subversion working copy so it won't
# complain about not being able to figure out what SCM is in use.
@@ -130,7 +132,7 @@ Second part of this complicated change by me, Tor Arne Vestb\u00f8!
return executive.run_command(*args, **kwargs)
detector = SCMDetector(self.filesystem, executive)
- real_scm = detector.detect_scm_system(self.old_cwd)
+ real_scm = detector.detect_scm_system(self.webkit_base)
mock_scm = MockSCM()
mock_scm.run = mock_run
@@ -141,7 +143,7 @@ Second part of this complicated change by me, Tor Arne Vestb\u00f8!
commit_message = checkout.commit_message_for_this_commit(git_commit=None, return_stderr=True)
# Throw away the first line - a warning about unknown VCS root.
commit_message.message_lines = commit_message.message_lines[1:]
- self.assertEqual(commit_message.message(), self.expected_commit_message)
+ self.assertMultiLineEqual(commit_message.message(), self.expected_commit_message)
class CheckoutTest(unittest.TestCase):
@@ -160,7 +162,7 @@ class CheckoutTest(unittest.TestCase):
checkout = self._make_checkout()
checkout._scm.contents_at_revision = mock_contents_at_revision
entry = checkout._latest_entry_for_changelog_at_revision("foo", "bar")
- self.assertEqual(entry.contents(), _changelog1entry1)
+ self.assertMultiLineEqual(entry.contents(), _changelog1entry1) # Pylint is confused about this line, pylint: disable=E1101
# FIXME: This tests a hack around our current changed_files handling.
# Right now changelog_entries_for_revision tries to fetch deleted files
@@ -191,10 +193,10 @@ class CheckoutTest(unittest.TestCase):
self.assertEqual(commitinfo.bug_id(), 36629)
self.assertEqual(commitinfo.author_name(), u"Tor Arne Vestb\u00f8")
self.assertEqual(commitinfo.author_email(), "vestbo@webkit.org")
- self.assertEqual(commitinfo.reviewer_text(), None)
- self.assertEqual(commitinfo.reviewer(), None)
+ self.assertIsNone(commitinfo.reviewer_text())
+ self.assertIsNone(commitinfo.reviewer())
self.assertEqual(commitinfo.committer_email(), "committer@example.com")
- self.assertEqual(commitinfo.committer(), None)
+ self.assertIsNone(commitinfo.committer())
self.assertEqual(commitinfo.to_json(), {
'bug_id': 36629,
'author_email': 'vestbo@webkit.org',
@@ -207,7 +209,7 @@ class CheckoutTest(unittest.TestCase):
})
checkout.changelog_entries_for_revision = lambda revision, changed_files=None: []
- self.assertEqual(checkout.commit_info_for_revision(1), None)
+ self.assertIsNone(checkout.commit_info_for_revision(1))
def test_bug_id_for_revision(self):
checkout = self._make_checkout()
@@ -247,11 +249,6 @@ class CheckoutTest(unittest.TestCase):
reviewer_names = [reviewer.full_name for reviewer in reviewers]
self.assertEqual(reviewer_names, [u'Tor Arne Vestb\xf8'])
- def test_chromium_deps(self):
- checkout = self._make_checkout()
- checkout._scm.checkout_root = "/foo/bar"
- self.assertEqual(checkout.chromium_deps()._path, '/foo/bar/Source/WebKit/chromium/DEPS')
-
def test_apply_patch(self):
checkout = self._make_checkout()
checkout._executive = MockExecutive(should_log=True)
diff --git a/Tools/Scripts/webkitpy/common/checkout/commitinfo.py b/Tools/Scripts/webkitpy/common/checkout/commitinfo.py
index cba3fdd64..79cb79f7c 100644
--- a/Tools/Scripts/webkitpy/common/checkout/commitinfo.py
+++ b/Tools/Scripts/webkitpy/common/checkout/commitinfo.py
@@ -45,7 +45,7 @@ class CommitInfo(object):
return self._revision
def committer(self):
- return self._committer # None if committer isn't in committers.py
+ return self._committer # None if committer isn't in contributors.json
def committer_email(self):
return self._committer_email
diff --git a/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py b/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py
index f58e6f1ea..826673de6 100644
--- a/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/commitinfo_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.checkout.commitinfo import CommitInfo
from webkitpy.common.config.committers import CommitterList, Committer, Reviewer
diff --git a/Tools/Scripts/webkitpy/common/checkout/deps.py b/Tools/Scripts/webkitpy/common/checkout/deps.py
deleted file mode 100644
index 2f3a8731e..000000000
--- a/Tools/Scripts/webkitpy/common/checkout/deps.py
+++ /dev/null
@@ -1,61 +0,0 @@
-# Copyright (C) 2011, 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.
-#
-# WebKit's Python module for parsing and modifying ChangeLog files
-
-import codecs
-import fileinput
-import re
-import textwrap
-
-
-class DEPS(object):
-
- _variable_regexp = r"\s+'%s':\s+'(?P<value>\d+)'"
-
- def __init__(self, path):
- # FIXME: This should take a FileSystem object.
- self._path = path
-
- def read_variable(self, name):
- pattern = re.compile(self._variable_regexp % name)
- for line in fileinput.FileInput(self._path):
- match = pattern.match(line)
- if match:
- return int(match.group("value"))
-
- def write_variable(self, name, value):
- pattern = re.compile(self._variable_regexp % name)
- replacement_line = " '%s': '%s'" % (name, value)
- # inplace=1 creates a backup file and re-directs stdout to the file
- for line in fileinput.FileInput(self._path, inplace=1):
- if pattern.match(line):
- print replacement_line
- continue
- # Trailing comma suppresses printing newline
- print line,
diff --git a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
index 2ed552c45..3a9ea9224 100644
--- a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+++ b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
@@ -58,7 +58,7 @@ def git_diff_to_svn_diff(line):
# These regexp patterns should be compiled once instead of every time.
conversion_patterns = (("^diff --git \w/(.+) \w/(?P<FilePath>.+)", lambda matched: "Index: " + matched.group('FilePath') + "\n"),
("^new file.*", lambda matched: "\n"),
- ("^index [0-9a-f]{7}\.\.[0-9a-f]{7} [0-9]{6}", lambda matched: "===================================================================\n"),
+ ("^index (([0-9a-f]{7}\.\.[0-9a-f]{7})|([0-9a-f]{40}\.\.[0-9a-f]{40})) [0-9]{6}", lambda matched: "===================================================================\n"),
("^--- \w/(?P<FilePath>.+)", lambda matched: "--- " + matched.group('FilePath') + "\n"),
("^\+\+\+ \w/(?P<FilePath>.+)", lambda matched: "+++ " + matched.group('FilePath') + "\n"))
@@ -69,19 +69,27 @@ def git_diff_to_svn_diff(line):
return line
+# This function exists so we can unittest get_diff_converter function
+def svn_diff_to_svn_diff(line):
+ return line
+
+
# FIXME: This method belongs on DiffParser
-def get_diff_converter(first_diff_line):
+def get_diff_converter(lines):
"""Gets a converter function of diff lines.
Args:
- first_diff_line: The first filename line of a diff file.
- If this line is git formatted, we'll return a
- converter from git to SVN.
+ lines: The lines of a diff file.
+ If this line is git formatted, we'll return a
+ converter from git to SVN.
"""
- if match(r"^diff --git \w/", first_diff_line):
- return git_diff_to_svn_diff
- return lambda input: input
-
+ for i, line in enumerate(lines[:-1]):
+ # Stop when we find the first patch
+ if line[:3] == "+++" and lines[i + 1] == "---":
+ break
+ if match(r"^diff --git \w/", line):
+ return git_diff_to_svn_diff
+ return svn_diff_to_svn_diff
_INITIAL_STATE = 1
_DECLARED_FILE_PATH = 2
@@ -142,10 +150,9 @@ class DiffParser(object):
current_file = None
old_diff_line = None
new_diff_line = None
+ transform_line = get_diff_converter(diff_input)
for line in diff_input:
line = line.rstrip("\n")
- if state == _INITIAL_STATE:
- transform_line = get_diff_converter(line)
line = transform_line(line)
file_declaration = match(r"^Index: (?P<FilePath>.+)", line)
diff --git a/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py b/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py
index cba0f249e..78dab26bc 100644
--- a/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/diff_parser_unittest.py
@@ -26,13 +26,16 @@
# (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 unittest
+import cStringIO as StringIO
+import unittest2 as unittest
import diff_parser
import re
from webkitpy.common.checkout.diff_test_data import DIFF_TEST_DATA
class DiffParserTest(unittest.TestCase):
+ maxDiff = None
+
def test_diff_parser(self, parser = None):
if not parser:
parser = diff_parser.DiffParser(DIFF_TEST_DATA.splitlines())
@@ -75,6 +78,42 @@ class DiffParserTest(unittest.TestCase):
self.assertEqual(1, len(diff.lines))
self.assertEqual((0, 1), diff.lines[0][0:2])
+ def test_diff_converter(self):
+ comment_lines = [
+ "Hey guys,\n",
+ "\n",
+ "See my awesome patch below!\n",
+ "\n",
+ " - Cool Hacker\n",
+ "\n",
+ ]
+
+ revision_lines = [
+ "Subversion Revision 289799\n",
+ ]
+
+ svn_diff_lines = [
+ "Index: Tools/Scripts/webkitpy/common/checkout/diff_parser.py\n",
+ "===================================================================\n",
+ "--- Tools/Scripts/webkitpy/common/checkout/diff_parser.py\n",
+ "+++ Tools/Scripts/webkitpy/common/checkout/diff_parser.py\n",
+ "@@ -59,6 +59,7 @@ def git_diff_to_svn_diff(line):\n",
+ ]
+ self.assertEqual(diff_parser.get_diff_converter(svn_diff_lines), diff_parser.svn_diff_to_svn_diff)
+ self.assertEqual(diff_parser.get_diff_converter(comment_lines + svn_diff_lines), diff_parser.svn_diff_to_svn_diff)
+ self.assertEqual(diff_parser.get_diff_converter(revision_lines + svn_diff_lines), diff_parser.svn_diff_to_svn_diff)
+
+ git_diff_lines = [
+ "diff --git a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py\n",
+ "index 3c5b45b..0197ead 100644\n",
+ "--- a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py\n",
+ "+++ b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py\n",
+ "@@ -59,6 +59,7 @@ def git_diff_to_svn_diff(line):\n",
+ ]
+ self.assertEqual(diff_parser.get_diff_converter(git_diff_lines), diff_parser.git_diff_to_svn_diff)
+ self.assertEqual(diff_parser.get_diff_converter(comment_lines + git_diff_lines), diff_parser.git_diff_to_svn_diff)
+ self.assertEqual(diff_parser.get_diff_converter(revision_lines + git_diff_lines), diff_parser.git_diff_to_svn_diff)
+
def test_git_mnemonicprefix(self):
p = re.compile(r' ([a|b])/')
@@ -90,5 +129,47 @@ class DiffParserTest(unittest.TestCase):
patch = p.sub(lambda x: " %s/" % prefix[x.group(1)], DIFF_TEST_DATA)
self.test_diff_parser(diff_parser.DiffParser(patch.splitlines()))
-if __name__ == '__main__':
- unittest.main()
+ def test_git_diff_to_svn_diff(self):
+ output = """\
+Index: Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+===================================================================
+--- Tools/Scripts/webkitpy/common/checkout/diff_parser.py
++++ Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+@@ -59,6 +59,7 @@ def git_diff_to_svn_diff(line):
+ A
+ B
+ C
++D
+ E
+ F
+"""
+
+ inputfmt = StringIO.StringIO("""\
+diff --git a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+index 2ed552c4555db72df16b212547f2c125ae301a04..72870482000c0dba64ce4300ed782c03ee79b74f 100644
+--- a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
++++ b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+@@ -59,6 +59,7 @@ def git_diff_to_svn_diff(line):
+ A
+ B
+ C
++D
+ E
+ F
+""")
+ shortfmt = StringIO.StringIO("""\
+diff --git a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+index b48b162..f300960 100644
+--- a/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
++++ b/Tools/Scripts/webkitpy/common/checkout/diff_parser.py
+@@ -59,6 +59,7 @@ def git_diff_to_svn_diff(line):
+ A
+ B
+ C
++D
+ E
+ F
+""")
+
+ self.assertMultiLineEqual(output, ''.join(diff_parser.git_diff_to_svn_diff(x) for x in shortfmt.readlines()))
+ self.assertMultiLineEqual(output, ''.join(diff_parser.git_diff_to_svn_diff(x) for x in inputfmt.readlines()))
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/detection_unittest.py b/Tools/Scripts/webkitpy/common/checkout/scm/detection_unittest.py
index 1d7484826..593f093c4 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/detection_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/detection_unittest.py
@@ -28,7 +28,7 @@
# (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 unittest
+import unittest2 as unittest
from .detection import SCMDetector
from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -42,7 +42,10 @@ class SCMDetectorTest(unittest.TestCase):
executive = MockExecutive(should_log=True)
detector = SCMDetector(filesystem, executive)
- expected_logs = "MOCK run_command: ['svn', 'info'], cwd=/\nMOCK run_command: ['git', 'rev-parse', '--is-inside-work-tree'], cwd=/\n"
+ expected_logs = """\
+MOCK run_command: ['svn', 'info'], cwd=/
+MOCK run_command: ['git', 'rev-parse', '--is-inside-work-tree'], cwd=/
+"""
scm = OutputCapture().assert_outputs(self, detector.detect_scm_system, ["/"], expected_logs=expected_logs)
- self.assertEqual(scm, None)
+ self.assertIsNone(scm)
# FIXME: This should make a synthetic tree and test SVN and Git detection in that tree.
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/git.py b/Tools/Scripts/webkitpy/common/checkout/scm/git.py
index 6313256d8..58eda7032 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/git.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/git.py
@@ -27,6 +27,7 @@
# (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 datetime
import logging
import os
import re
@@ -41,16 +42,12 @@ from .svn import SVN, SVNRepository
_log = logging.getLogger(__name__)
-def run_command(*args, **kwargs):
- # FIXME: This should not be a global static.
- # New code should use Executive.run_command directly instead
- return Executive().run_command(*args, **kwargs)
-
-
class AmbiguousCommitError(Exception):
- def __init__(self, num_local_commits, working_directory_is_clean):
+ def __init__(self, num_local_commits, has_working_directory_changes):
+ Exception.__init__(self, "Found %s local commits and the working directory is %s" % (
+ num_local_commits, ["clean", "not clean"][has_working_directory_changes]))
self.num_local_commits = num_local_commits
- self.working_directory_is_clean = working_directory_is_clean
+ self.has_working_directory_changes = has_working_directory_changes
class Git(SCM, SVNRepository):
@@ -126,12 +123,13 @@ class Git(SCM, SVNRepository):
return filepath.replace(root_end_with_slash, '')
@classmethod
- def read_git_config(cls, key, cwd=None):
+ def read_git_config(cls, key, cwd=None, executive=None):
# FIXME: This should probably use cwd=self.checkout_root.
# Pass --get-all for cases where the config has multiple values
# Pass the cwd if provided so that we can handle the case of running webkit-patch outside of the working directory.
# FIXME: This should use an Executive.
- return run_command([cls.executable_name, "config", "--get-all", key], error_handler=Executive.ignore_error, cwd=cwd).rstrip('\n')
+ executive = executive or Executive()
+ return executive.run_command([cls.executable_name, "config", "--get-all", key], error_handler=Executive.ignore_error, cwd=cwd).rstrip('\n')
@staticmethod
def commit_success_regexp():
@@ -146,13 +144,13 @@ class Git(SCM, SVNRepository):
def rebase_in_progress(self):
return self._filesystem.exists(self.absolute_path(self._filesystem.join('.git', 'rebase-apply')))
- def working_directory_is_clean(self):
- return self._run_git(['diff', 'HEAD', '--no-renames', '--name-only']) == ""
+ def has_working_directory_changes(self):
+ return self._run_git(['diff', 'HEAD', '--no-renames', '--name-only']) != ""
- def clean_working_directory(self):
- # Could run git clean here too, but that wouldn't match working_directory_is_clean
- self._run_git(['reset', '--hard', 'HEAD'])
- # Aborting rebase even though this does not match working_directory_is_clean
+ def discard_working_directory_changes(self):
+ # Could run git clean here too, but that wouldn't match subversion
+ self._run_git(['reset', 'HEAD', '--hard'])
+ # Aborting rebase even though this does not match subversion
if self.rebase_in_progress():
self._run_git(['rebase', '--abort'])
@@ -164,8 +162,8 @@ class Git(SCM, SVNRepository):
def _status_regexp(self, expected_types):
return '^(?P<status>[%s])\t(?P<filename>.+)$' % expected_types
- def add_list(self, paths, return_exit_code=False):
- return self._run_git(["add"] + paths, return_exit_code=return_exit_code)
+ def add_list(self, paths):
+ self._run_git(["add"] + paths)
def delete_list(self, paths):
return self._run_git(["rm", "-f"] + paths)
@@ -182,7 +180,7 @@ class Git(SCM, SVNRepository):
def _upstream_branch(self):
current_branch = self._current_branch()
- return self._branch_from_ref(self.read_git_config('branch.%s.merge' % current_branch, cwd=self.checkout_root).strip())
+ return self._branch_from_ref(self.read_git_config('branch.%s.merge' % current_branch, cwd=self.checkout_root, executive=self._executive).strip())
def merge_base(self, git_commit):
if git_commit:
@@ -248,14 +246,33 @@ class Git(SCM, SVNRepository):
def display_name(self):
return "git"
+ def _most_recent_log_matching(self, grep_str, path):
+ # We use '--grep=' + foo rather than '--grep', foo because
+ # git 1.7.0.4 (and earlier) didn't support the separate arg.
+ return self._run_git(['log', '-1', '--grep=' + grep_str, '--date=iso', self.find_checkout_root(path)])
+
def svn_revision(self, path):
- _log.debug('Running git.head_svn_revision... (Temporary logging message)')
- git_log = self._run_git(['log', '-25', path])
+ git_log = self._most_recent_log_matching('git-svn-id:', path)
match = re.search("^\s*git-svn-id:.*@(?P<svn_revision>\d+)\ ", git_log, re.MULTILINE)
if not match:
return ""
return str(match.group('svn_revision'))
+ def timestamp_of_revision(self, path, revision):
+ git_log = self._most_recent_log_matching('git-svn-id:.*@%s' % revision, path)
+ match = re.search("^Date:\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-])(\d{2})(\d{2})$", git_log, re.MULTILINE)
+ if not match:
+ return ""
+
+ # Manually modify the timezone since Git doesn't have an option to show it in UTC.
+ # Git also truncates milliseconds but we're going to ignore that for now.
+ time_with_timezone = datetime.datetime(int(match.group(1)), int(match.group(2)), int(match.group(3)),
+ int(match.group(4)), int(match.group(5)), int(match.group(6)), 0)
+
+ sign = 1 if match.group(7) == '+' else -1
+ time_without_timezone = time_with_timezone - datetime.timedelta(hours=sign * int(match.group(8)), minutes=int(match.group(9)))
+ return time_without_timezone.strftime('%Y-%m-%dT%H:%M:%SZ')
+
def prepend_svn_revision(self, diff):
revision = self.head_svn_revision()
if not revision:
@@ -293,6 +310,9 @@ class Git(SCM, SVNRepository):
@memoized
def git_commit_from_svn_revision(self, svn_revision):
+ # FIXME: https://bugs.webkit.org/show_bug.cgi?id=111668
+ # We should change this to run git log --grep 'git-svn-id' instead
+ # so that we don't require git+svn to be set up.
git_commit = self._run_git_svn_find_rev('r%s' % svn_revision)
if not git_commit:
# FIXME: Alternatively we could offer to update the checkout? Or return None?
@@ -334,30 +354,30 @@ class Git(SCM, SVNRepository):
def revert_files(self, file_paths):
self._run_git(['checkout', 'HEAD'] + file_paths)
- def _assert_can_squash(self, working_directory_is_clean):
- squash = Git.read_git_config('webkit-patch.commit-should-always-squash', cwd=self.checkout_root)
+ def _assert_can_squash(self, has_working_directory_changes):
+ squash = self.read_git_config('webkit-patch.commit-should-always-squash', cwd=self.checkout_root, executive=self._executive)
should_squash = squash and squash.lower() == "true"
if not should_squash:
# Only warn if there are actually multiple commits to squash.
num_local_commits = len(self.local_commits())
- if num_local_commits > 1 or (num_local_commits > 0 and not working_directory_is_clean):
- raise AmbiguousCommitError(num_local_commits, working_directory_is_clean)
+ if num_local_commits > 1 or (num_local_commits > 0 and has_working_directory_changes):
+ raise AmbiguousCommitError(num_local_commits, has_working_directory_changes)
def commit_with_message(self, message, username=None, password=None, git_commit=None, force_squash=False, changed_files=None):
# Username is ignored during Git commits.
- working_directory_is_clean = self.working_directory_is_clean()
+ has_working_directory_changes = self.has_working_directory_changes()
if git_commit:
# Special-case HEAD.. to mean working-copy changes only.
if git_commit.upper() == 'HEAD..':
- if working_directory_is_clean:
+ if not has_working_directory_changes:
raise ScriptError(message="The working copy is not modified. --git-commit=HEAD.. only commits working copy changes.")
self.commit_locally_with_message(message)
return self._commit_on_branch(message, 'HEAD', username=username, password=password)
# Need working directory changes to be committed so we can checkout the merge branch.
- if not working_directory_is_clean:
+ if has_working_directory_changes:
# FIXME: webkit-patch land will modify the ChangeLogs to correct the reviewer.
# That will modify the working-copy and cause us to hit this error.
# The ChangeLog modification could be made to modify the existing local commit.
@@ -365,7 +385,7 @@ class Git(SCM, SVNRepository):
return self._commit_on_branch(message, git_commit, username=username, password=password)
if not force_squash:
- self._assert_can_squash(working_directory_is_clean)
+ self._assert_can_squash(has_working_directory_changes)
self._run_git(['reset', '--soft', self.remote_merge_base()])
self.commit_locally_with_message(message)
return self.push_local_commits_to_server(username=username, password=password)
@@ -406,7 +426,7 @@ class Git(SCM, SVNRepository):
commit_succeeded = False
finally:
# And then swap back to the original branch and clean up.
- self.clean_working_directory()
+ self.discard_working_directory_changes()
self._run_git(['checkout', '-q', branch_name])
self.delete_branch(MERGE_BRANCH_NAME)
@@ -435,7 +455,7 @@ class Git(SCM, SVNRepository):
def remote_branch_ref(self):
# Use references so that we can avoid collisions, e.g. we don't want to operate on refs/heads/trunk if it exists.
- remote_branch_refs = Git.read_git_config('svn-remote.svn.fetch', cwd=self.checkout_root)
+ remote_branch_refs = self.read_git_config('svn-remote.svn.fetch', cwd=self.checkout_root, executive=self._executive)
if not remote_branch_refs:
remote_master_ref = 'refs/remotes/origin/master'
if not self._branch_ref_exists(remote_master_ref):
@@ -452,8 +472,8 @@ class Git(SCM, SVNRepository):
def push_local_commits_to_server(self, username=None, password=None):
dcommit_command = ['svn', 'dcommit']
- if (not username or not password) and not self.has_authorization_for_realm(SVN.svn_server_realm):
- raise AuthenticationError(SVN.svn_server_host, prompt_for_password=True)
+ if (not username or not password) and not self.has_authorization_for_realm(self.svn_server_realm):
+ raise AuthenticationError(self.svn_server_host, prompt_for_password=True)
if username:
dcommit_command.extend(["--username", username])
output = self._run_git(dcommit_command, error_handler=commit_error_handler, input=password)
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/scm.py b/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
index 7d6e1804d..b005ea239 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
@@ -90,26 +90,6 @@ class SCM:
def script_path(self, script_name):
return self._filesystem.join(self.scripts_directory(), script_name)
- def ensure_clean_working_directory(self, force_clean):
- if self.working_directory_is_clean():
- return
- if not force_clean:
- print self.run(self.status_command(), error_handler=Executive.ignore_error, cwd=self.checkout_root)
- raise ScriptError(message="Working directory has modifications, pass --force-clean or --no-clean to continue.")
- _log.info("Cleaning working directory")
- self.clean_working_directory()
-
- def ensure_no_local_commits(self, force):
- if not self.supports_local_commits():
- return
- commits = self.local_commits()
- if not len(commits):
- return
- if not force:
- _log.error("Working directory has local commits, pass --force-clean to continue.")
- sys.exit(1)
- self.discard_local_commits()
-
def run_status_and_extract_filenames(self, status_command, status_regexp):
filenames = []
# We run with cwd=self.checkout_root so that returned-paths are root-relative.
@@ -147,19 +127,13 @@ class SCM:
def commit_success_regexp():
SCM._subclass_must_implement()
- def working_directory_is_clean(self):
- self._subclass_must_implement()
-
- def clean_working_directory(self):
- self._subclass_must_implement()
-
def status_command(self):
self._subclass_must_implement()
- def add(self, path, return_exit_code=False):
- self.add_list([path], return_exit_code)
+ def add(self, path):
+ self.add_list([path])
- def add_list(self, paths, return_exit_code=False):
+ def add_list(self, paths):
self._subclass_must_implement()
def delete(self, path):
@@ -193,6 +167,10 @@ class SCM:
return self.svn_revision(self.checkout_root)
def svn_revision(self, path):
+ """Returns the latest svn revision found in the checkout."""
+ self._subclass_must_implement()
+
+ def timestamp_of_revision(self, path, revision):
self._subclass_must_implement()
def create_patch(self, git_commit=None, changed_files=None):
@@ -231,12 +209,28 @@ class SCM:
def svn_blame(self, path):
self._subclass_must_implement()
+ def has_working_directory_changes(self):
+ self._subclass_must_implement()
+
+ def discard_working_directory_changes(self):
+ self._subclass_must_implement()
+
+ #--------------------------------------------------------------------------
# Subclasses must indicate if they support local commits,
# but the SCM baseclass will only call local_commits methods when this is true.
@staticmethod
def supports_local_commits():
SCM._subclass_must_implement()
+ def local_commits(self):
+ return []
+
+ def has_local_commits(self):
+ return len(self.local_commits()) > 0
+
+ def discard_local_commits(self):
+ return
+
def remote_merge_base(self):
SCM._subclass_must_implement()
@@ -244,8 +238,12 @@ class SCM:
_log.error("Your source control manager does not support local commits.")
sys.exit(1)
- def discard_local_commits(self):
- pass
+ def local_changes_exist(self):
+ return (self.supports_local_commits() and self.has_local_commits()) or self.has_working_directory_changes()
- def local_commits(self):
- return []
+ def discard_local_changes(self):
+ if self.has_working_directory_changes():
+ self.discard_working_directory_changes()
+
+ if self.has_local_commits():
+ self.discard_local_commits()
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py b/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
index 9c5d3af0d..c5d10fcb1 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
@@ -38,21 +38,28 @@ class MockSCM(object):
self._filesystem = filesystem or MockFileSystem()
self._executive = executive or MockExecutive()
- def add(self, destination_path, return_exit_code=False):
- self.add_list([destination_path], return_exit_code)
+ def add(self, destination_path):
+ self.add_list([destination_path])
- def add_list(self, destination_paths, return_exit_code=False):
+ def add_list(self, destination_paths):
self.added_paths.update(set(destination_paths))
- if return_exit_code:
- return 0
- def ensure_clean_working_directory(self, force_clean):
+ def has_working_directory_changes(self):
+ return False
+
+ def discard_working_directory_changes(self):
pass
def supports_local_commits(self):
return True
- def ensure_no_local_commits(self, force_clean):
+ def has_local_commits(self):
+ return False
+
+ def discard_local_commits(self):
+ pass
+
+ def discard_local_changes(self):
pass
def exists(self, path):
@@ -75,6 +82,9 @@ class MockSCM(object):
def svn_revision(self, path):
return '5678'
+ def timestamp_of_revision(self, path, revision):
+ return '2013-02-01 08:48:05 +0000'
+
def create_patch(self, git_commit, changed_files=None):
return "Patch1"
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py b/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
index cff254e63..15432f0e8 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
@@ -40,7 +40,7 @@ import sys
import subprocess
import tempfile
import time
-import unittest
+import unittest2 as unittest
import urllib
import shutil
@@ -49,14 +49,15 @@ from webkitpy.common.checkout.checkout import Checkout
from webkitpy.common.config.committers import Committer # FIXME: This should not be needed
from webkitpy.common.net.bugzilla import Attachment # FIXME: This should not be needed
from webkitpy.common.system.executive import Executive, ScriptError
+from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.executive_mock import MockExecutive
-
from .git import Git, AmbiguousCommitError
from .detection import detect_scm_system
from .scm import SCM, CheckoutNeedsUpdate, commit_error_handler, AuthenticationError
from .svn import SVN
+
# We cache the mock SVN repo so that we don't create it again for each call to an SVNTest or GitTest test_ method.
# We store it in a global variable so that we can delete this cached repo on exit(3).
# FIXME: Remove this once we migrate to Python 2.7. Unittest in Python 2.7 supports module-specific setup and teardown functions.
@@ -125,7 +126,7 @@ def _git_diff(*args):
# Exists to share svn repository creation code between the git and svn tests
-class SVNTestRepository:
+class SVNTestRepository(object):
@classmethod
def _svn_add(cls, path):
run_command(["svn", "add", path])
@@ -248,7 +249,7 @@ class SCMClassTests(unittest.TestCase):
command_returns_non_zero = ['/bin/sh', '--invalid-option']
# Test when the input pipe process fails.
input_process = subprocess.Popen(command_returns_non_zero, stdout=subprocess.PIPE, stderr=self.dev_null)
- self.assertTrue(input_process.poll() != 0)
+ self.assertNotEqual(input_process.poll(), 0)
self.assertRaises(ScriptError, run_command, ['grep', 'bar'], input=input_process.stdout)
# Test when the run_command process fails.
@@ -299,18 +300,18 @@ class SCMTest(unittest.TestCase):
def _shared_test_changed_files(self):
write_into_file_at_path("test_file", "changed content")
- self.assertEqual(self.scm.changed_files(), ["test_file"])
+ self.assertItemsEqual(self.scm.changed_files(), ["test_file"])
write_into_file_at_path("test_dir/test_file3", "new stuff")
- self.assertEqual(self.scm.changed_files(), ["test_dir/test_file3", "test_file"])
+ self.assertItemsEqual(self.scm.changed_files(), ["test_dir/test_file3", "test_file"])
old_cwd = os.getcwd()
os.chdir("test_dir")
# Validate that changed_files does not change with our cwd, see bug 37015.
- self.assertEqual(self.scm.changed_files(), ["test_dir/test_file3", "test_file"])
+ self.assertItemsEqual(self.scm.changed_files(), ["test_dir/test_file3", "test_file"])
os.chdir(old_cwd)
def _shared_test_added_files(self):
write_into_file_at_path("test_file", "changed content")
- self.assertEqual(self.scm.added_files(), [])
+ self.assertItemsEqual(self.scm.added_files(), [])
write_into_file_at_path("added_file", "new stuff")
self.scm.add("added_file")
@@ -327,11 +328,11 @@ class SCMTest(unittest.TestCase):
added_files = self.scm.added_files()
if "added_dir" in added_files:
added_files.remove("added_dir")
- self.assertEqual(added_files, ["added_dir/added_file2", "added_file", "added_file3", "added_file4"])
+ self.assertItemsEqual(added_files, ["added_dir/added_file2", "added_file", "added_file3", "added_file4"])
- # Test also to make sure clean_working_directory removes added files
- self.scm.clean_working_directory()
- self.assertEqual(self.scm.added_files(), [])
+ # Test also to make sure discard_working_directory_changes removes added files
+ self.scm.discard_working_directory_changes()
+ self.assertItemsEqual(self.scm.added_files(), [])
self.assertFalse(os.path.exists("added_file"))
self.assertFalse(os.path.exists("added_file3"))
self.assertFalse(os.path.exists("added_file4"))
@@ -342,9 +343,9 @@ class SCMTest(unittest.TestCase):
changed_files = self.scm.changed_files_for_revision(3)
if "test_dir" in changed_files:
changed_files.remove("test_dir")
- self.assertEqual(changed_files, ["test_dir/test_file3", "test_file"])
- self.assertEqual(sorted(self.scm.changed_files_for_revision(4)), sorted(["test_file", "test_file2"])) # Git and SVN return different orders.
- self.assertEqual(self.scm.changed_files_for_revision(2), ["test_file"])
+ self.assertItemsEqual(changed_files, ["test_dir/test_file3", "test_file"])
+ self.assertItemsEqual(self.scm.changed_files_for_revision(4), ["test_file", "test_file2"]) # Git and SVN return different orders.
+ self.assertItemsEqual(self.scm.changed_files_for_revision(2), ["test_file"])
def _shared_test_contents_at_revision(self):
self.assertEqual(self.scm.contents_at_revision("test_file", 3), "test1test2")
@@ -362,7 +363,7 @@ class SCMTest(unittest.TestCase):
self.assertRaises(ScriptError, self.scm.contents_at_revision, "does_not_exist", 2)
def _shared_test_revisions_changing_file(self):
- self.assertEqual(self.scm.revisions_changing_file("test_file"), [5, 4, 3, 2])
+ self.assertItemsEqual(self.scm.revisions_changing_file("test_file"), [5, 4, 3, 2])
self.assertRaises(ScriptError, self.scm.revisions_changing_file, "non_existent_file")
def _shared_test_committer_email_for_revision(self):
@@ -377,10 +378,10 @@ class SCMTest(unittest.TestCase):
def _shared_test_diff_for_revision(self):
# Patch formats are slightly different between svn and git, so just regexp for things we know should be there.
r3_patch = self.scm.diff_for_revision(4)
- self.assertTrue(re.search('test3', r3_patch))
- self.assertFalse(re.search('test4', r3_patch))
- self.assertTrue(re.search('test2', r3_patch))
- self.assertTrue(re.search('test2', self.scm.diff_for_revision(3)))
+ self.assertRegexpMatches(r3_patch, 'test3')
+ self.assertNotRegexpMatches(r3_patch, 'test4')
+ self.assertRegexpMatches(r3_patch, 'test2')
+ self.assertRegexpMatches(self.scm.diff_for_revision(3), 'test2')
def _shared_test_svn_apply_git_patch(self):
self._setup_webkittools_scripts_symlink(self.scm)
@@ -409,7 +410,7 @@ HcmV?d00001
added = read_from_path('fizzbuzz7.gif', encoding=None)
self.assertEqual(512, len(added))
self.assertTrue(added.startswith('GIF89a'))
- self.assertTrue('fizzbuzz7.gif' in self.scm.changed_files())
+ self.assertIn('fizzbuzz7.gif', self.scm.changed_files())
# The file already exists.
self.assertRaises(ScriptError, self.checkout.apply_patch, self._create_patch(git_binary_addition))
@@ -436,7 +437,7 @@ ptUl-ZG<%a~#LwkIWv&q!KSCH7tQ8cJDiw+|GV?MN)RjY50RTb-xvT&H
self.checkout.apply_patch(self._create_patch(git_binary_modification))
modified = read_from_path('fizzbuzz7.gif', encoding=None)
self.assertEqual('foobar\n', modified)
- self.assertTrue('fizzbuzz7.gif' in self.scm.changed_files())
+ self.assertIn('fizzbuzz7.gif', self.scm.changed_files())
# Applying the same modification should fail.
self.assertRaises(ScriptError, self.checkout.apply_patch, self._create_patch(git_binary_modification))
@@ -454,7 +455,7 @@ OcmYex&reD$;sO8*F9L)B
"""
self.checkout.apply_patch(self._create_patch(git_binary_deletion))
self.assertFalse(os.path.exists('fizzbuzz7.gif'))
- self.assertFalse('fizzbuzz7.gif' in self.scm.changed_files())
+ self.assertNotIn('fizzbuzz7.gif', self.scm.changed_files())
# Cannot delete again.
self.assertRaises(ScriptError, self.checkout.apply_patch, self._create_patch(git_binary_deletion))
@@ -463,15 +464,15 @@ OcmYex&reD$;sO8*F9L)B
os.mkdir("added_dir")
write_into_file_at_path("added_dir/added_file", "new stuff")
self.scm.add("added_dir/added_file")
- self.assertTrue("added_dir/added_file" in self.scm.added_files())
+ self.assertIn("added_dir/added_file", self.scm.added_files())
def _shared_test_delete_recursively(self):
os.mkdir("added_dir")
write_into_file_at_path("added_dir/added_file", "new stuff")
self.scm.add("added_dir/added_file")
- self.assertTrue("added_dir/added_file" in self.scm.added_files())
+ self.assertIn("added_dir/added_file", self.scm.added_files())
self.scm.delete("added_dir/added_file")
- self.assertFalse("added_dir" in self.scm.added_files())
+ self.assertNotIn("added_dir", self.scm.added_files())
def _shared_test_delete_recursively_or_not(self):
os.mkdir("added_dir")
@@ -479,10 +480,10 @@ OcmYex&reD$;sO8*F9L)B
write_into_file_at_path("added_dir/another_added_file", "more new stuff")
self.scm.add("added_dir/added_file")
self.scm.add("added_dir/another_added_file")
- self.assertTrue("added_dir/added_file" in self.scm.added_files())
- self.assertTrue("added_dir/another_added_file" in self.scm.added_files())
+ self.assertIn("added_dir/added_file", self.scm.added_files())
+ self.assertIn("added_dir/another_added_file", self.scm.added_files())
self.scm.delete("added_dir/added_file")
- self.assertTrue("added_dir/another_added_file" in self.scm.added_files())
+ self.assertIn("added_dir/another_added_file", self.scm.added_files())
def _shared_test_exists(self, scm, commit_function):
os.chdir(scm.checkout_root)
@@ -626,6 +627,7 @@ class SVNTest(SCMTest):
SVNTestRepository.setup(self)
os.chdir(self.svn_checkout_path)
self.scm = detect_scm_system(self.svn_checkout_path)
+ self.scm.svn_server_realm = None
# For historical reasons, we test some checkout code here too.
self.checkout = Checkout(self.scm)
@@ -661,9 +663,8 @@ class SVNTest(SCMTest):
self.assertEqual("%s\n" % os.path.realpath(scm.checkout_root), patch_contents) # Add a \n because echo adds a \n.
def test_detection(self):
- scm = detect_scm_system(self.svn_checkout_path)
- self.assertEqual(scm.display_name(), "svn")
- self.assertEqual(scm.supports_local_commits(), False)
+ self.assertEqual(self.scm.display_name(), "svn")
+ self.assertEqual(self.scm.supports_local_commits(), False)
def test_apply_small_binary_patch(self):
patch_contents = """Index: test_file.swf
@@ -687,15 +688,14 @@ Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
self.assertEqual(actual_contents, expected_contents)
def test_apply_svn_patch(self):
- scm = detect_scm_system(self.svn_checkout_path)
patch = self._create_patch(_svn_diff("-r5:4"))
- self._setup_webkittools_scripts_symlink(scm)
- Checkout(scm).apply_patch(patch)
+ self._setup_webkittools_scripts_symlink(self.scm)
+ Checkout(self.scm).apply_patch(patch)
def test_commit_logs(self):
# Commits have dates and usernames in them, so we can't just direct compare.
- self.assertTrue(re.search('fourth commit', self.scm.last_svn_commit_log()))
- self.assertTrue(re.search('second commit', self.scm.svn_commit_log(3)))
+ self.assertRegexpMatches(self.scm.last_svn_commit_log(), 'fourth commit')
+ self.assertRegexpMatches(self.scm.svn_commit_log(3), 'second commit')
def _shared_test_commit_with_message(self, username=None):
write_into_file_at_path('test_file', 'more test content')
@@ -716,7 +716,12 @@ Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA==
self._shared_test_commit_with_message("dbates@webkit.org")
def test_commit_without_authorization(self):
- self.scm.has_authorization_for_realm = lambda realm: False
+ # FIXME: https://bugs.webkit.org/show_bug.cgi?id=111669
+ # This test ends up looking in the actal $HOME/.subversion for authorization,
+ # which makes it fragile. For now, set it to use a realm that won't be authorized,
+ # but we should really plumb through a fake_home_dir here like we do in
+ # test_has_authorization_for_realm.
+ self.scm.svn_server_realm = '<http://svn.example.com:80> Example'
self.assertRaises(AuthenticationError, self._shared_test_commit_with_message)
def test_has_authorization_for_realm_using_credentials_with_passtype(self):
@@ -756,13 +761,12 @@ END
self.assertTrue(self._test_has_authorization_for_realm_using_credentials(SVN.svn_server_realm, credentials))
def _test_has_authorization_for_realm_using_credentials(self, realm, credentials):
- scm = detect_scm_system(self.svn_checkout_path)
fake_home_dir = tempfile.mkdtemp(suffix="fake_home_dir")
svn_config_dir_path = os.path.join(fake_home_dir, ".subversion")
os.mkdir(svn_config_dir_path)
fake_webkit_auth_file = os.path.join(svn_config_dir_path, "fake_webkit_auth_file")
write_into_file_at_path(fake_webkit_auth_file, credentials)
- result = scm.has_authorization_for_realm(realm, home_directory=fake_home_dir)
+ result = self.scm.has_authorization_for_realm(realm, home_directory=fake_home_dir)
os.remove(fake_webkit_auth_file)
os.rmdir(svn_config_dir_path)
os.rmdir(fake_home_dir)
@@ -783,11 +787,10 @@ END
self.assertFalse(self._test_has_authorization_for_realm_using_credentials(SVN.svn_server_realm, credentials))
def test_not_have_authorization_for_realm_when_missing_credentials_file(self):
- scm = detect_scm_system(self.svn_checkout_path)
fake_home_dir = tempfile.mkdtemp(suffix="fake_home_dir")
svn_config_dir_path = os.path.join(fake_home_dir, ".subversion")
os.mkdir(svn_config_dir_path)
- self.assertFalse(scm.has_authorization_for_realm(SVN.svn_server_realm, home_directory=fake_home_dir))
+ self.assertFalse(self.scm.has_authorization_for_realm(SVN.svn_server_realm, home_directory=fake_home_dir))
os.rmdir(svn_config_dir_path)
os.rmdir(fake_home_dir)
@@ -824,13 +827,13 @@ END
def test_delete(self):
os.chdir(self.svn_checkout_path)
self.scm.delete("test_file")
- self.assertTrue("test_file" in self.scm.deleted_files())
+ self.assertIn("test_file", self.scm.deleted_files())
def test_delete_list(self):
os.chdir(self.svn_checkout_path)
self.scm.delete_list(["test_file", "test_file2"])
- self.assertTrue("test_file" in self.scm.deleted_files())
- self.assertTrue("test_file2" in self.scm.deleted_files())
+ self.assertIn("test_file", self.scm.deleted_files())
+ self.assertIn("test_file2", self.scm.deleted_files())
def test_delete_recursively(self):
self._shared_test_delete_recursively()
@@ -867,8 +870,8 @@ END
write_into_file_at_path("test_file", "changed content")
diff = self.scm.diff_for_file('test_file')
- self.assertTrue("-some content" in diff)
- self.assertTrue("+changed content" in diff)
+ self.assertIn("-some content", diff)
+ self.assertIn("+changed content", diff)
def clean_bogus_dir(self):
self.bogus_dir = self.scm._bogus_dir_name()
@@ -888,13 +891,17 @@ END
self.assertFalse(os.path.exists(self.bogus_dir))
def test_svn_lock(self):
- svn_root_lock_path = ".svn/lock"
- write_into_file_at_path(svn_root_lock_path, "", "utf-8")
- # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here.
- self.assertRaises(ScriptError, run_command, ['svn', 'update'])
- self.scm.clean_working_directory()
- self.assertFalse(os.path.exists(svn_root_lock_path))
- run_command(['svn', 'update']) # Should succeed and not raise.
+ if self.scm.svn_version() >= "1.7":
+ # the following technique with .svn/lock then svn update doesn't work with subversion client 1.7 or later
+ pass
+ else:
+ svn_root_lock_path = ".svn/lock"
+ write_into_file_at_path(svn_root_lock_path, "", "utf-8")
+ # webkit-patch uses a Checkout object and runs update-webkit, just use svn update here.
+ self.assertRaises(ScriptError, run_command, ['svn', 'update'])
+ self.scm.discard_working_directory_changes()
+ self.assertFalse(os.path.exists(svn_root_lock_path))
+ run_command(['svn', 'update']) # Should succeed and not raise.
def test_exists(self):
self._shared_test_exists(self.scm, self.scm.commit_with_message)
@@ -946,7 +953,7 @@ class GitTest(SCMTest):
scm.commit_locally_with_message('message')
patch = scm.create_patch()
- self.assertFalse(re.search(r'Subversion Revision:', patch))
+ self.assertNotRegexpMatches(patch, r'Subversion Revision:')
def test_orderfile(self):
os.mkdir("Tools")
@@ -1008,7 +1015,7 @@ class GitTest(SCMTest):
def test_head_svn_revision(self):
scm = detect_scm_system(self.untracking_checkout_path)
- # If we cloned a git repo tracking an SVG repo, this would give the same result as
+ # If we cloned a git repo tracking an SVN repo, this would give the same result as
# self._shared_test_head_svn_revision().
self.assertEqual(scm.head_svn_revision(), '')
@@ -1019,8 +1026,8 @@ class GitTest(SCMTest):
scm.commit_locally_with_message('message')
patch = scm.create_patch()
- self.assertFalse(re.search(r'rename from ', patch))
- self.assertFalse(re.search(r'rename to ', patch))
+ self.assertNotRegexpMatches(patch, r'rename from ')
+ self.assertNotRegexpMatches(patch, r'rename to ')
class GitSVNTest(SCMTest):
@@ -1042,6 +1049,7 @@ class GitSVNTest(SCMTest):
SVNTestRepository.setup(self)
self._setup_git_checkout()
self.scm = detect_scm_system(self.git_checkout_path)
+ self.scm.svn_server_realm = None
# For historical reasons, we test some checkout code here too.
self.checkout = Checkout(self.scm)
@@ -1050,9 +1058,8 @@ class GitSVNTest(SCMTest):
self._tear_down_git_checkout()
def test_detection(self):
- scm = detect_scm_system(self.git_checkout_path)
- self.assertEqual(scm.display_name(), "git")
- self.assertEqual(scm.supports_local_commits(), True)
+ self.assertEqual(self.scm.display_name(), "git")
+ self.assertEqual(self.scm.supports_local_commits(), True)
def test_read_git_config(self):
key = 'test.git-config'
@@ -1085,7 +1092,7 @@ class GitSVNTest(SCMTest):
run_command(['git', 'checkout', '-b', 'bar'])
self.scm.delete_branch(new_branch)
- self.assertFalse(re.search(r'foo', run_command(['git', 'branch'])))
+ self.assertNotRegexpMatches(run_command(['git', 'branch']), r'foo')
def test_remote_merge_base(self):
# Diff to merge-base should include working-copy changes,
@@ -1096,8 +1103,8 @@ class GitSVNTest(SCMTest):
diff_to_common_base = _git_diff(self.scm.remote_branch_ref() + '..')
diff_to_merge_base = _git_diff(self.scm.remote_merge_base())
- self.assertFalse(re.search(r'foo', diff_to_common_base))
- self.assertTrue(re.search(r'foo', diff_to_merge_base))
+ self.assertNotRegexpMatches(diff_to_common_base, r'foo')
+ self.assertRegexpMatches(diff_to_merge_base, r'foo')
def test_rebase_in_progress(self):
svn_test_file = os.path.join(self.svn_checkout_path, 'test_file')
@@ -1111,45 +1118,39 @@ class GitSVNTest(SCMTest):
# --quiet doesn't make git svn silent, so use run_silent to redirect output
self.assertRaises(ScriptError, run_silent, ['git', 'svn', '--quiet', 'rebase']) # Will fail due to a conflict leaving us mid-rebase.
- scm = detect_scm_system(self.git_checkout_path)
- self.assertTrue(scm.rebase_in_progress())
+ self.assertTrue(self.scm.rebase_in_progress())
# Make sure our cleanup works.
- scm.clean_working_directory()
- self.assertFalse(scm.rebase_in_progress())
+ self.scm.discard_working_directory_changes()
+ self.assertFalse(self.scm.rebase_in_progress())
# Make sure cleanup doesn't throw when no rebase is in progress.
- scm.clean_working_directory()
+ self.scm.discard_working_directory_changes()
def test_commitish_parsing(self):
- scm = detect_scm_system(self.git_checkout_path)
-
# Multiple revisions are cherry-picked.
- self.assertEqual(len(scm.commit_ids_from_commitish_arguments(['HEAD~2'])), 1)
- self.assertEqual(len(scm.commit_ids_from_commitish_arguments(['HEAD', 'HEAD~2'])), 2)
+ self.assertEqual(len(self.scm.commit_ids_from_commitish_arguments(['HEAD~2'])), 1)
+ self.assertEqual(len(self.scm.commit_ids_from_commitish_arguments(['HEAD', 'HEAD~2'])), 2)
# ... is an invalid range specifier
- self.assertRaises(ScriptError, scm.commit_ids_from_commitish_arguments, ['trunk...HEAD'])
+ self.assertRaises(ScriptError, self.scm.commit_ids_from_commitish_arguments, ['trunk...HEAD'])
def test_commitish_order(self):
- scm = detect_scm_system(self.git_checkout_path)
-
commit_range = 'HEAD~3..HEAD'
- actual_commits = scm.commit_ids_from_commitish_arguments([commit_range])
+ actual_commits = self.scm.commit_ids_from_commitish_arguments([commit_range])
expected_commits = []
expected_commits += reversed(run_command(['git', 'rev-list', commit_range]).splitlines())
self.assertEqual(actual_commits, expected_commits)
def test_apply_git_patch(self):
- scm = detect_scm_system(self.git_checkout_path)
# We carefullly pick a diff which does not have a directory addition
# as currently svn-apply will error out when trying to remove directories
# in Git: https://bugs.webkit.org/show_bug.cgi?id=34871
patch = self._create_patch(_git_diff('HEAD..HEAD^'))
- self._setup_webkittools_scripts_symlink(scm)
- Checkout(scm).apply_patch(patch)
+ self._setup_webkittools_scripts_symlink(self.scm)
+ Checkout(self.scm).apply_patch(patch)
def test_commit_text_parsing(self):
write_into_file_at_path('test_file', 'more test content')
@@ -1159,12 +1160,11 @@ class GitSVNTest(SCMTest):
def test_commit_with_message_working_copy_only(self):
write_into_file_at_path('test_file_commit1', 'more test content')
run_command(['git', 'add', 'test_file_commit1'])
- scm = detect_scm_system(self.git_checkout_path)
- commit_text = scm.commit_with_message("yet another test commit")
+ commit_text = self.scm.commit_with_message("yet another test commit")
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def _local_commit(self, filename, contents, message):
write_into_file_at_path(filename, contents)
@@ -1192,112 +1192,102 @@ class GitSVNTest(SCMTest):
def test_revisions_changing_files_with_local_commit(self):
self._one_local_commit()
- self.assertEqual(self.scm.revisions_changing_file('test_file_commit1'), [])
+ self.assertItemsEqual(self.scm.revisions_changing_file('test_file_commit1'), [])
def test_commit_with_message(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- self.assertRaises(AmbiguousCommitError, scm.commit_with_message, "yet another test commit")
- commit_text = scm.commit_with_message("yet another test commit", force_squash=True)
+ self.assertRaises(AmbiguousCommitError, self.scm.commit_with_message, "yet another test commit")
+ commit_text = self.scm.commit_with_message("yet another test commit", force_squash=True)
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit2', svn_log))
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit2')
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def test_commit_with_message_git_commit(self):
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- commit_text = scm.commit_with_message("another test commit", git_commit="HEAD^")
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ commit_text = self.scm.commit_with_message("another test commit", git_commit="HEAD^")
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
- self.assertFalse(re.search(r'test_file_commit2', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
+ self.assertNotRegexpMatches(svn_log, r'test_file_commit2')
def test_commit_with_message_git_commit_range(self):
self._three_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- commit_text = scm.commit_with_message("another test commit", git_commit="HEAD~2..HEAD")
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ commit_text = self.scm.commit_with_message("another test commit", git_commit="HEAD~2..HEAD")
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertFalse(re.search(r'test_file_commit0', svn_log))
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
- self.assertTrue(re.search(r'test_file_commit2', svn_log))
+ self.assertNotRegexpMatches(svn_log, r'test_file_commit0')
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
+ self.assertRegexpMatches(svn_log, r'test_file_commit2')
def test_commit_with_message_only_local_commit(self):
self._one_local_commit()
- scm = detect_scm_system(self.git_checkout_path)
- commit_text = scm.commit_with_message("another test commit")
+ commit_text = self.scm.commit_with_message("another test commit")
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def test_commit_with_message_multiple_local_commits_and_working_copy(self):
self._two_local_commits()
write_into_file_at_path('test_file_commit1', 'working copy change')
- scm = detect_scm_system(self.git_checkout_path)
- self.assertRaises(AmbiguousCommitError, scm.commit_with_message, "another test commit")
- commit_text = scm.commit_with_message("another test commit", force_squash=True)
+ self.assertRaises(AmbiguousCommitError, self.scm.commit_with_message, "another test commit")
+ commit_text = self.scm.commit_with_message("another test commit", force_squash=True)
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit2', svn_log))
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit2')
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def test_commit_with_message_git_commit_and_working_copy(self):
self._two_local_commits()
write_into_file_at_path('test_file_commit1', 'working copy change')
- scm = detect_scm_system(self.git_checkout_path)
- self.assertRaises(ScriptError, scm.commit_with_message, "another test commit", git_commit="HEAD^")
+ self.assertRaises(ScriptError, self.scm.commit_with_message, "another test commit", git_commit="HEAD^")
def test_commit_with_message_multiple_local_commits_always_squash(self):
+ run_command(['git', 'config', 'webkit-patch.commit-should-always-squash', 'true'])
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- scm._assert_can_squash = lambda working_directory_is_clean: True
- commit_text = scm.commit_with_message("yet another test commit")
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ commit_text = self.scm.commit_with_message("yet another test commit")
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit2', svn_log))
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit2')
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def test_commit_with_message_multiple_local_commits(self):
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- self.assertRaises(AmbiguousCommitError, scm.commit_with_message, "yet another test commit")
- commit_text = scm.commit_with_message("yet another test commit", force_squash=True)
+ self.assertRaises(AmbiguousCommitError, self.scm.commit_with_message, "yet another test commit")
+ commit_text = self.scm.commit_with_message("yet another test commit", force_squash=True)
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertTrue(re.search(r'test_file_commit2', svn_log))
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertRegexpMatches(svn_log, r'test_file_commit2')
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def test_commit_with_message_not_synced(self):
run_command(['git', 'checkout', '-b', 'my-branch', 'trunk~3'])
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- self.assertRaises(AmbiguousCommitError, scm.commit_with_message, "another test commit")
- commit_text = scm.commit_with_message("another test commit", force_squash=True)
+ self.assertRaises(AmbiguousCommitError, self.scm.commit_with_message, "another test commit")
+ commit_text = self.scm.commit_with_message("another test commit", force_squash=True)
- self.assertEqual(scm.svn_revision_from_commit_text(commit_text), '6')
+ self.assertEqual(self.scm.svn_revision_from_commit_text(commit_text), '6')
svn_log = run_command(['git', 'svn', 'log', '--limit=1', '--verbose'])
- self.assertFalse(re.search(r'test_file2', svn_log))
- self.assertTrue(re.search(r'test_file_commit2', svn_log))
- self.assertTrue(re.search(r'test_file_commit1', svn_log))
+ self.assertNotRegexpMatches(svn_log, r'test_file2')
+ self.assertRegexpMatches(svn_log, r'test_file_commit2')
+ self.assertRegexpMatches(svn_log, r'test_file_commit1')
def test_commit_with_message_not_synced_with_conflict(self):
run_command(['git', 'checkout', '-b', 'my-branch', 'trunk~3'])
self._local_commit('test_file2', 'asdf', 'asdf commit')
- scm = detect_scm_system(self.git_checkout_path)
# There's a conflict between trunk and the test_file2 modification.
- self.assertRaises(ScriptError, scm.commit_with_message, "another test commit", force_squash=True)
+ self.assertRaises(ScriptError, self.scm.commit_with_message, "another test commit", force_squash=True)
def test_upstream_branch(self):
run_command(['git', 'checkout', '-t', '-b', 'my-branch'])
@@ -1318,96 +1308,85 @@ class GitSVNTest(SCMTest):
def test_create_patch_local_plus_working_copy(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch()
- self.assertTrue(re.search(r'test_file_commit1', patch))
- self.assertTrue(re.search(r'test_file_commit2', patch))
+ patch = self.scm.create_patch()
+ self.assertRegexpMatches(patch, r'test_file_commit1')
+ self.assertRegexpMatches(patch, r'test_file_commit2')
def test_create_patch(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch()
- self.assertTrue(re.search(r'test_file_commit2', patch))
- self.assertTrue(re.search(r'test_file_commit1', patch))
- self.assertTrue(re.search(r'Subversion Revision: 5', patch))
+ patch = self.scm.create_patch()
+ self.assertRegexpMatches(patch, r'test_file_commit2')
+ self.assertRegexpMatches(patch, r'test_file_commit1')
+ self.assertRegexpMatches(patch, r'Subversion Revision: 5')
def test_create_patch_after_merge(self):
run_command(['git', 'checkout', '-b', 'dummy-branch', 'trunk~3'])
self._one_local_commit()
run_command(['git', 'merge', 'trunk'])
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch()
- self.assertTrue(re.search(r'test_file_commit1', patch))
- self.assertTrue(re.search(r'Subversion Revision: 5', patch))
+ patch = self.scm.create_patch()
+ self.assertRegexpMatches(patch, r'test_file_commit1')
+ self.assertRegexpMatches(patch, r'Subversion Revision: 5')
def test_create_patch_with_changed_files(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch(changed_files=['test_file_commit2'])
- self.assertTrue(re.search(r'test_file_commit2', patch))
+ patch = self.scm.create_patch(changed_files=['test_file_commit2'])
+ self.assertRegexpMatches(patch, r'test_file_commit2')
def test_create_patch_with_rm_and_changed_files(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
os.remove('test_file_commit1')
- patch = scm.create_patch()
- patch_with_changed_files = scm.create_patch(changed_files=['test_file_commit1', 'test_file_commit2'])
+ patch = self.scm.create_patch()
+ patch_with_changed_files = self.scm.create_patch(changed_files=['test_file_commit1', 'test_file_commit2'])
self.assertEqual(patch, patch_with_changed_files)
def test_create_patch_git_commit(self):
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch(git_commit="HEAD^")
- self.assertTrue(re.search(r'test_file_commit1', patch))
- self.assertFalse(re.search(r'test_file_commit2', patch))
+ patch = self.scm.create_patch(git_commit="HEAD^")
+ self.assertRegexpMatches(patch, r'test_file_commit1')
+ self.assertNotRegexpMatches(patch, r'test_file_commit2')
def test_create_patch_git_commit_range(self):
self._three_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch(git_commit="HEAD~2..HEAD")
- self.assertFalse(re.search(r'test_file_commit0', patch))
- self.assertTrue(re.search(r'test_file_commit2', patch))
- self.assertTrue(re.search(r'test_file_commit1', patch))
+ patch = self.scm.create_patch(git_commit="HEAD~2..HEAD")
+ self.assertNotRegexpMatches(patch, r'test_file_commit0')
+ self.assertRegexpMatches(patch, r'test_file_commit2')
+ self.assertRegexpMatches(patch, r'test_file_commit1')
def test_create_patch_working_copy_only(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch(git_commit="HEAD....")
- self.assertFalse(re.search(r'test_file_commit1', patch))
- self.assertTrue(re.search(r'test_file_commit2', patch))
+ patch = self.scm.create_patch(git_commit="HEAD....")
+ self.assertNotRegexpMatches(patch, r'test_file_commit1')
+ self.assertRegexpMatches(patch, r'test_file_commit2')
def test_create_patch_multiple_local_commits(self):
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch()
- self.assertTrue(re.search(r'test_file_commit2', patch))
- self.assertTrue(re.search(r'test_file_commit1', patch))
+ patch = self.scm.create_patch()
+ self.assertRegexpMatches(patch, r'test_file_commit2')
+ self.assertRegexpMatches(patch, r'test_file_commit1')
def test_create_patch_not_synced(self):
run_command(['git', 'checkout', '-b', 'my-branch', 'trunk~3'])
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- patch = scm.create_patch()
- self.assertFalse(re.search(r'test_file2', patch))
- self.assertTrue(re.search(r'test_file_commit2', patch))
- self.assertTrue(re.search(r'test_file_commit1', patch))
+ patch = self.scm.create_patch()
+ self.assertNotRegexpMatches(patch, r'test_file2')
+ self.assertRegexpMatches(patch, r'test_file_commit2')
+ self.assertRegexpMatches(patch, r'test_file_commit1')
def test_create_binary_patch(self):
# Create a git binary patch and check the contents.
- scm = detect_scm_system(self.git_checkout_path)
test_file_name = 'binary_file'
test_file_path = os.path.join(self.git_checkout_path, test_file_name)
file_contents = ''.join(map(chr, range(256)))
write_into_file_at_path(test_file_path, file_contents, encoding=None)
run_command(['git', 'add', test_file_name])
- patch = scm.create_patch()
- self.assertTrue(re.search(r'\nliteral 0\n', patch))
- self.assertTrue(re.search(r'\nliteral 256\n', patch))
+ patch = self.scm.create_patch()
+ self.assertRegexpMatches(patch, r'\nliteral 0\n')
+ self.assertRegexpMatches(patch, r'\nliteral 256\n')
# Check if we can apply the created patch.
run_command(['git', 'rm', '-f', test_file_name])
- self._setup_webkittools_scripts_symlink(scm)
+ self._setup_webkittools_scripts_symlink(self.scm)
self.checkout.apply_patch(self._create_patch(patch))
self.assertEqual(file_contents, read_from_path(test_file_path, encoding=None))
@@ -1415,73 +1394,67 @@ class GitSVNTest(SCMTest):
write_into_file_at_path(test_file_path, file_contents, encoding=None)
run_command(['git', 'add', test_file_name])
run_command(['git', 'commit', '-m', 'binary diff'])
- patch_from_local_commit = scm.create_patch('HEAD')
- self.assertTrue(re.search(r'\nliteral 0\n', patch_from_local_commit))
- self.assertTrue(re.search(r'\nliteral 256\n', patch_from_local_commit))
+
+ patch_from_local_commit = self.scm.create_patch('HEAD')
+ self.assertRegexpMatches(patch_from_local_commit, r'\nliteral 0\n')
+ self.assertRegexpMatches(patch_from_local_commit, r'\nliteral 256\n')
def test_changed_files_local_plus_working_copy(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files()
- self.assertTrue('test_file_commit1' in files)
- self.assertTrue('test_file_commit2' in files)
+ files = self.scm.changed_files()
+ self.assertIn('test_file_commit1', files)
+ self.assertIn('test_file_commit2', files)
# working copy should *not* be in the list.
- files = scm.changed_files('trunk..')
- self.assertTrue('test_file_commit1' in files)
- self.assertFalse('test_file_commit2' in files)
+ files = self.scm.changed_files('trunk..')
+ self.assertIn('test_file_commit1', files)
+ self.assertNotIn('test_file_commit2', files)
# working copy *should* be in the list.
- files = scm.changed_files('trunk....')
- self.assertTrue('test_file_commit1' in files)
- self.assertTrue('test_file_commit2' in files)
+ files = self.scm.changed_files('trunk....')
+ self.assertIn('test_file_commit1', files)
+ self.assertIn('test_file_commit2', files)
def test_changed_files_git_commit(self):
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files(git_commit="HEAD^")
- self.assertTrue('test_file_commit1' in files)
- self.assertFalse('test_file_commit2' in files)
+ files = self.scm.changed_files(git_commit="HEAD^")
+ self.assertIn('test_file_commit1', files)
+ self.assertNotIn('test_file_commit2', files)
def test_changed_files_git_commit_range(self):
self._three_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files(git_commit="HEAD~2..HEAD")
- self.assertTrue('test_file_commit0' not in files)
- self.assertTrue('test_file_commit1' in files)
- self.assertTrue('test_file_commit2' in files)
+ files = self.scm.changed_files(git_commit="HEAD~2..HEAD")
+ self.assertNotIn('test_file_commit0', files)
+ self.assertIn('test_file_commit1', files)
+ self.assertIn('test_file_commit2', files)
def test_changed_files_working_copy_only(self):
self._one_local_commit_plus_working_copy_changes()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files(git_commit="HEAD....")
- self.assertFalse('test_file_commit1' in files)
- self.assertTrue('test_file_commit2' in files)
+ files = self.scm.changed_files(git_commit="HEAD....")
+ self.assertNotIn('test_file_commit1', files)
+ self.assertIn('test_file_commit2', files)
def test_changed_files_multiple_local_commits(self):
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files()
- self.assertTrue('test_file_commit2' in files)
- self.assertTrue('test_file_commit1' in files)
+ files = self.scm.changed_files()
+ self.assertIn('test_file_commit2', files)
+ self.assertIn('test_file_commit1', files)
def test_changed_files_not_synced(self):
run_command(['git', 'checkout', '-b', 'my-branch', 'trunk~3'])
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files()
- self.assertFalse('test_file2' in files)
- self.assertTrue('test_file_commit2' in files)
- self.assertTrue('test_file_commit1' in files)
+ files = self.scm.changed_files()
+ self.assertNotIn('test_file2', files)
+ self.assertIn('test_file_commit2', files)
+ self.assertIn('test_file_commit1', files)
def test_changed_files_not_synced(self):
run_command(['git', 'checkout', '-b', 'my-branch', 'trunk~3'])
self._two_local_commits()
- scm = detect_scm_system(self.git_checkout_path)
- files = scm.changed_files()
- self.assertFalse('test_file2' in files)
- self.assertTrue('test_file_commit2' in files)
- self.assertTrue('test_file_commit1' in files)
+ files = self.scm.changed_files()
+ self.assertNotIn('test_file2', files)
+ self.assertIn('test_file_commit2', files)
+ self.assertIn('test_file_commit1', files)
def test_changed_files(self):
self._shared_test_changed_files()
@@ -1499,15 +1472,15 @@ class GitSVNTest(SCMTest):
# equivalent to 'git diff my-branch..HEAD, should not include working changes
files = self.scm.changed_files(git_commit='UPSTREAM..')
- self.assertFalse('test_file_commit1' in files)
- self.assertTrue('test_file_commit2' in files)
- self.assertFalse('test_file_commit0' in files)
+ self.assertNotIn('test_file_commit1', files)
+ self.assertIn('test_file_commit2', files)
+ self.assertNotIn('test_file_commit0', files)
# equivalent to 'git diff my-branch', *should* include working changes
files = self.scm.changed_files(git_commit='UPSTREAM....')
- self.assertFalse('test_file_commit1' in files)
- self.assertTrue('test_file_commit2' in files)
- self.assertTrue('test_file_commit0' in files)
+ self.assertNotIn('test_file_commit1', files)
+ self.assertIn('test_file_commit2', files)
+ self.assertIn('test_file_commit0', files)
def test_contents_at_revision(self):
self._shared_test_contents_at_revision()
@@ -1527,13 +1500,13 @@ class GitSVNTest(SCMTest):
def test_delete(self):
self._two_local_commits()
self.scm.delete('test_file_commit1')
- self.assertTrue("test_file_commit1" in self.scm.deleted_files())
+ self.assertIn("test_file_commit1", self.scm.deleted_files())
def test_delete_list(self):
self._two_local_commits()
self.scm.delete_list(["test_file_commit1", "test_file_commit2"])
- self.assertTrue("test_file_commit1" in self.scm.deleted_files())
- self.assertTrue("test_file_commit2" in self.scm.deleted_files())
+ self.assertIn("test_file_commit1", self.scm.deleted_files())
+ self.assertIn("test_file_commit2", self.scm.deleted_files())
def test_delete_recursively(self):
self._shared_test_delete_recursively()
@@ -1546,8 +1519,7 @@ class GitSVNTest(SCMTest):
def test_to_object_name(self):
relpath = 'test_file_commit1'
- fullpath = os.path.join(self.git_checkout_path, relpath)
- self._two_local_commits()
+ fullpath = os.path.realpath(os.path.join(self.git_checkout_path, relpath))
self.assertEqual(relpath, self.scm.to_object_name(fullpath))
def test_show_head(self):
@@ -1568,33 +1540,40 @@ class GitSVNTest(SCMTest):
diff = self.scm.diff_for_file('test_file_commit1')
cached_diff = self.scm.diff_for_file('test_file_commit1')
- self.assertTrue("+Updated" in diff)
- self.assertTrue("-more test content" in diff)
+ self.assertIn("+Updated", diff)
+ self.assertIn("-more test content", diff)
self.scm.add('test_file_commit1')
cached_diff = self.scm.diff_for_file('test_file_commit1')
- self.assertTrue("+Updated" in cached_diff)
- self.assertTrue("-more test content" in cached_diff)
+ self.assertIn("+Updated", cached_diff)
+ self.assertIn("-more test content", cached_diff)
def test_exists(self):
- scm = detect_scm_system(self.git_checkout_path)
- self._shared_test_exists(scm, scm.commit_locally_with_message)
+ self._shared_test_exists(self.scm, self.scm.commit_locally_with_message)
# We need to split off more of these SCM tests to use mocks instead of the filesystem.
# This class is the first part of that.
class GitTestWithMock(unittest.TestCase):
+ maxDiff = None
+
def make_scm(self, logging_executive=False):
# We do this should_log dance to avoid logging when Git.__init__ runs sysctl on mac to check for 64-bit support.
- scm = Git(cwd=None, executive=MockExecutive())
+ scm = Git(cwd=".", executive=MockExecutive(), filesystem=MockFileSystem())
+ scm.read_git_config = lambda *args, **kw: "MOCKKEY:MOCKVALUE"
scm._executive._should_log = logging_executive
return scm
def test_create_patch(self):
scm = self.make_scm(logging_executive=True)
- expected_stderr = "MOCK run_command: ['git', 'merge-base', u'refs/remotes/origin/master', 'HEAD'], cwd=%(checkout)s\nMOCK run_command: ['git', 'diff', '--binary', '--no-ext-diff', '--full-index', '-M', 'MOCK output of child process', '--'], cwd=%(checkout)s\nMOCK run_command: ['git', 'log', '-25'], cwd=None\n" % {'checkout': scm.checkout_root}
- OutputCapture().assert_outputs(self, scm.create_patch, expected_stderr=expected_stderr)
+ expected_stderr = """\
+MOCK run_command: ['git', 'merge-base', 'MOCKVALUE', 'HEAD'], cwd=%(checkout)s
+MOCK run_command: ['git', 'diff', '--binary', '--no-color', '--no-ext-diff', '--full-index', '--no-renames', '', 'MOCK output of child process', '--'], cwd=%(checkout)s
+MOCK run_command: ['git', 'rev-parse', '--show-toplevel'], cwd=%(checkout)s
+MOCK run_command: ['git', 'log', '-1', '--grep=git-svn-id:', '--date=iso', './MOCK output of child process/MOCK output of child process'], cwd=%(checkout)s
+""" % {'checkout': scm.checkout_root}
+ OutputCapture().assert_outputs(self, scm.create_patch, expected_logs=expected_stderr)
def test_push_local_commits_to_server_with_username_and_password(self):
self.assertEqual(self.make_scm().push_local_commits_to_server(username='dbates@webkit.org', password='blah'), "MOCK output of child process")
@@ -1608,5 +1587,14 @@ class GitTestWithMock(unittest.TestCase):
def test_push_local_commits_to_server_without_username_and_with_password(self):
self.assertRaises(AuthenticationError, self.make_scm().push_local_commits_to_server, {'password': 'blah'})
-if __name__ == '__main__':
- unittest.main()
+ def test_timestamp_of_revision(self):
+ scm = self.make_scm()
+ scm.find_checkout_root = lambda path: ''
+ scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000'
+ self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-02-08T08:05:49Z')
+
+ scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130'
+ self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-02-07T23:32:03Z')
+
+ scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800'
+ self.assertEqual(scm.timestamp_of_revision('some-path', '12345'), '2013-02-08T09:55:21Z')
diff --git a/Tools/Scripts/webkitpy/common/checkout/scm/svn.py b/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
index 1323b702c..c146f5d32 100644
--- a/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
+++ b/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
@@ -29,8 +29,10 @@
import logging
import os
+import random
import re
import shutil
+import string
import sys
import tempfile
@@ -43,9 +45,16 @@ _log = logging.getLogger(__name__)
# A mixin class that represents common functionality for SVN and Git-SVN.
-class SVNRepository:
+class SVNRepository(object):
+ # FIXME: These belong in common.config.urls
+ svn_server_host = "svn.webkit.org"
+ svn_server_realm = "<http://svn.webkit.org:80> Mac OS Forge"
+
def has_authorization_for_realm(self, realm, home_directory=os.getenv("HOME")):
- # ignore false positives for methods implemented in the mixee class. pylint: disable-msg=E1101
+ # If we are working on a file:// repository realm will be None
+ if realm is None:
+ return True
+ # ignore false positives for methods implemented in the mixee class. pylint: disable=E1101
# Assumes find and grep are installed.
if not os.path.isdir(os.path.join(home_directory, ".subversion")):
return False
@@ -63,9 +72,6 @@ class SVNRepository:
class SVN(SCM, SVNRepository):
- # FIXME: These belong in common.config.urls
- svn_server_host = "svn.webkit.org"
- svn_server_realm = "<http://svn.webkit.org:80> Mac OS Forge"
executable_name = "svn"
@@ -106,7 +112,7 @@ class SVN(SCM, SVNRepository):
match = re.search("^%s: (?P<value>.+)$" % field_name, info_output, re.MULTILINE)
if not match:
raise ScriptError(script_args=svn_info_args, message='svn info did not contain a %s.' % field_name)
- return match.group('value')
+ return match.group('value').rstrip('\r')
def find_checkout_root(self, path):
uuid = self.find_uuid(path)
@@ -134,10 +140,11 @@ class SVN(SCM, SVNRepository):
def svn_version(self):
return self._run_svn(['--version', '--quiet'])
- def working_directory_is_clean(self):
- return self._run_svn(["diff"], cwd=self.checkout_root, decode_output=False) == ""
+ def has_working_directory_changes(self):
+ # FIXME: What about files which are not committed yet?
+ return self._run_svn(["diff"], cwd=self.checkout_root, decode_output=False) != ""
- def clean_working_directory(self):
+ def discard_working_directory_changes(self):
# Make sure there are no locks lying around from a previously aborted svn invocation.
# This is slightly dangerous, as it's possible the user is running another svn process
# on this checkout at the same time. However, it's much more likely that we're running
@@ -174,10 +181,20 @@ class SVN(SCM, SVNRepository):
return
self.add(path)
- def add_list(self, paths, return_exit_code=False):
+ def add_list(self, paths):
for path in paths:
self._add_parent_directories(os.path.dirname(os.path.abspath(path)))
- return self._run_svn(["add"] + paths, return_exit_code=return_exit_code)
+ if self.svn_version() >= "1.7":
+ # For subversion client 1.7 and later, need to add '--parents' option to ensure intermediate directories
+ # are added; in addition, 1.7 returns an exit code of 1 from svn add if one or more of the requested
+ # adds are already under version control, including intermediate directories subject to addition
+ # due to --parents
+ svn_add_args = ['svn', 'add', '--parents'] + paths
+ exit_code = self.run(svn_add_args, return_exit_code=True)
+ if exit_code and exit_code != 1:
+ raise ScriptError(script_args=svn_add_args, exit_code=exit_code)
+ else:
+ self._run_svn(["add"] + paths)
def _delete_parent_directories(self, path):
if not self.in_working_directory(path):
@@ -239,6 +256,13 @@ class SVN(SCM, SVNRepository):
def svn_revision(self, path):
return self.value_from_svn_info(path, 'Revision')
+ def timestamp_of_revision(self, path, revision):
+ # We use --xml to get timestamps like 2013-02-08T08:18:04.964409Z
+ repository_root = self.value_from_svn_info(self.checkout_root, 'Repository Root')
+ info_output = Executive().run_command([self.executable_name, 'log', '-r', revision, '--xml', repository_root], cwd=path).rstrip()
+ match = re.search(r"^<date>(?P<value>.+)</date>\r?$", info_output, re.MULTILINE)
+ return match.group('value')
+
# FIXME: This method should be on Checkout.
def create_patch(self, git_commit=None, changed_files=None):
"""Returns a byte array (str()) representing the patch file.
@@ -266,11 +290,12 @@ class SVN(SCM, SVNRepository):
return self._run_svn(['diff', '-c', revision])
def _bogus_dir_name(self):
+ rnd = ''.join(random.sample(string.ascii_letters, 5))
if sys.platform.startswith("win"):
parent_dir = tempfile.gettempdir()
else:
parent_dir = sys.path[0] # tempdir is not secure.
- return os.path.join(parent_dir, "temp_svn_config")
+ return os.path.join(parent_dir, "temp_svn_config_" + rnd)
def _setup_bogus_dir(self, log):
self._bogus_dir = self._bogus_dir_name()
diff --git a/Tools/Scripts/webkitpy/common/config/committers.py b/Tools/Scripts/webkitpy/common/config/committers.py
index e49eebf52..62a09329e 100644
--- a/Tools/Scripts/webkitpy/common/config/committers.py
+++ b/Tools/Scripts/webkitpy/common/config/committers.py
@@ -29,9 +29,18 @@
#
# WebKit's Python module for committer and reviewer validation.
+import fnmatch
+import json
+
from webkitpy.common.editdistance import edit_distance
+from webkitpy.common.memoized import memoized
+from webkitpy.common.system.filesystem import FileSystem
+
+
+# The list of contributors have been moved to contributors.json
-class Account(object):
+
+class Contributor(object):
def __init__(self, name, email_or_emails, irc_nickname_or_nicknames=None):
assert(name)
assert(email_or_emails)
@@ -54,6 +63,9 @@ class Account(object):
return self.emails[0]
def __str__(self):
+ return unicode(self).encode('utf-8')
+
+ def __unicode__(self):
return '"%s" <%s>' % (self.full_name, self.emails[0])
def contains_string(self, search_string):
@@ -69,11 +81,17 @@ class Account(object):
return True
return False
-
-class Contributor(Account):
- def __init__(self, name, email_or_emails, irc_nickname=None):
- Account.__init__(self, name, email_or_emails, irc_nickname)
- self.is_contributor = True
+ def matches_glob(self, glob_string):
+ if fnmatch.fnmatch(self.full_name, glob_string):
+ return True
+ if self.irc_nicknames:
+ for nickname in self.irc_nicknames:
+ if fnmatch.fnmatch(nickname, glob_string):
+ return True
+ for email in self.emails:
+ if fnmatch.fnmatch(email, glob_string):
+ return True
+ return False
class Committer(Contributor):
@@ -88,490 +106,20 @@ class Reviewer(Committer):
self.can_review = True
-# This is a list of email addresses that have bugzilla accounts but are not
-# used for contributing (such as mailing lists).
-
-
-watchers_who_are_not_contributors = [
- Account("Chromium Compositor Bugs", ["cc-bugs@chromium.org"], ""),
- Account("Chromium Media Reviews", ["feature-media-reviews@chromium.org"], ""),
- Account("David Levin", ["levin+threading@chromium.org"], ""),
- Account("David Levin", ["levin+watchlist@chromium.org"], ""),
- Account("Kent Tamura", ["tkent+wkapi@chromium.org"], ""),
-]
-
-
-# This is a list of people (or bots) who are neither committers nor reviewers, but get
-# frequently CC'ed by others on Bugzilla bugs, so their names should be
-# supported by autocomplete. No review needed to add to the list.
-
-
-contributors_who_are_not_committers = [
- Contributor("Adobe Bug Tracker", "WebkitBugTracker@adobe.com"),
- Contributor("Aharon Lanin", "aharon@google.com"),
- Contributor("Alan Stearns", "stearns@adobe.com", "astearns"),
- Contributor("Alejandro Pineiro", "apinheiro@igalia.com"),
- Contributor("Alexey Marinichev", ["amarinichev@chromium.org", "amarinichev@google.com"], "amarinichev"),
- Contributor("Andras Piroska", "pandras@inf.u-szeged.hu", "andris88"),
- Contributor("Andrei Bucur", "abucur@adobe.com", "abucur"),
- Contributor("Anne van Kesteren", "annevankesteren+webkit@gmail.com", "annevk"),
- Contributor("Annie Sullivan", "sullivan@chromium.org", "annie"),
- Contributor("Aryeh Gregor", "ayg@aryeh.name", "AryehGregor"),
- Contributor("Balazs Ankes", "bank@inf.u-szeged.hu", "abalazs"),
- Contributor("Brian Salomon", "bsalomon@google.com"),
- Contributor("Commit Queue", "commit-queue@webkit.org"),
- Contributor("Daniel Sievers", "sievers@chromium.org"),
- Contributor("David Dorwin", "ddorwin@chromium.org", "ddorwin"),
- Contributor("David Reveman", "reveman@chromium.org", "reveman"),
- Contributor("Dongsung Huang", "luxtella@company100.net", "Huang"),
- Contributor("Douglas Davidson", "ddavidso@apple.com"),
- Contributor("Edward O'Connor", "eoconnor@apple.com", "hober"),
- Contributor("Elliott Sprehn", "esprehn@chromium.org", "esprehn"),
- Contributor("Eric Penner", "epenner@chromium.org", "epenner"),
- Contributor("Felician Marton", ["felician@inf.u-szeged.hu", "marton.felician.zoltan@stud.u-szeged.hu"], "Felician"),
- Contributor("Finnur Thorarinsson", ["finnur@chromium.org", "finnur.webkit@gmail.com"], "finnur"),
- Contributor("Forms Bugs", "forms-bugs@chromium.org"),
- Contributor("Glenn Adams", "glenn@skynav.com", "gasubic"),
- Contributor("Gabor Ballabas", "gaborb@inf.u-szeged.hu", "bgabor"),
- Contributor("Grace Kloba", "klobag@chromium.org", "klobag"),
- Contributor("Greg Simon", "gregsimon@chromium.org", "gregsimon"),
- Contributor("Gregg Tavares", ["gman@google.com", "gman@chromium.org"], "gman"),
- Contributor("Hao Zheng", "zhenghao@chromium.org"),
- Contributor("Harald Alvestrand", "hta@google.com", "hta"),
- Contributor("Ian Hickson", "ian@hixie.ch", "hixie"),
- Contributor("Janos Badics", "jbadics@inf.u-szeged.hu", "dicska"),
- Contributor("Jonathan Backer", "backer@chromium.org", "backer"),
- Contributor("Jeff Timanus", ["twiz@chromium.org", "twiz@google.com"], "twiz"),
- Contributor("Jing Zhao", "jingzhao@chromium.org"),
- Contributor("Joanmarie Diggs", "jdiggs@igalia.com"),
- Contributor("John Bates", ["jbates@google.com", "jbates@chromium.org"], "jbates"),
- Contributor("John Bauman", ["jbauman@chromium.org", "jbauman@google.com"], "jbauman"),
- Contributor("John Mellor", "johnme@chromium.org", "johnme"),
- Contributor("Kulanthaivel Palanichamy", "kulanthaivel@codeaurora.org", "kvel"),
- Contributor("Kiran Muppala", "cmuppala@apple.com", "kiranm"),
- Contributor("Mihai Balan", "mibalan@adobe.com", "miChou"),
- Contributor("Min Qin", "qinmin@chromium.org"),
- Contributor("Nandor Huszka", "hnandor@inf.u-szeged.hu", "hnandor"),
- Contributor("Oliver Varga", ["voliver@inf.u-szeged.hu", "Varga.Oliver@stud.u-szeged.hu"], "TwistO"),
- Contributor("Peter Gal", "galpeter@inf.u-szeged.hu", "elecro"),
- Contributor("Peter Linss", "peter.linss@hp.com", "plinss"),
- Contributor("Pravin D", "pravind.2k4@gmail.com", "pravind"),
- Contributor("Radar WebKit Bug Importer", "webkit-bug-importer@group.apple.com"),
- Contributor("Raul Hudea", "rhudea@adobe.com", "rhudea"),
- Contributor("Roland Takacs", "rtakacs@inf.u-szeged.hu", "rtakacs"),
- Contributor(u"Sami Ky\u00f6stil\u00e4", "skyostil@chromium.org", "skyostil"),
- Contributor("Szilard Ledan-Muntean", "szledan@inf.u-szeged.hu", "szledan"),
- Contributor("Tab Atkins", ["tabatkins@google.com", "jackalmage@gmail.com"], "tabatkins"),
- Contributor("Tamas Czene", ["tczene@inf.u-szeged.hu", "Czene.Tamas@stud.u-szeged.hu"], "tczene"),
- Contributor("Tien-Ren Chen", "trchen@chromium.org", "trchen"),
- Contributor("WebKit Review Bot", "webkit.review.bot@gmail.com", "sheriff-bot"),
- Contributor("Web Components Team", "webcomponents-bugzilla@chromium.org"),
- Contributor("Wyatt Carss", ["wcarss@chromium.org", "wcarss@google.com"], "wcarss"),
- Contributor("Zeev Lieber", "zlieber@chromium.org"),
- Contributor("Zoltan Arvai", "zarvai@inf.u-szeged.hu", "azbest_hu"),
- Contributor("Zsolt Feher", "feherzs@inf.u-szeged.hu", "Smith"),
-]
-
-
-# This is intended as a canonical, machine-readable list of all non-reviewer
-# committers for WebKit. If your name is missing here and you are a committer,
-# please add it. No review needed. All reviewers are committers, so this list
-# is only of committers who are not reviewers.
-
-
-committers_unable_to_review = [
- Committer("Aaron Boodman", "aa@chromium.org", "aboodman"),
- Committer("Adam Bergkvist", "adam.bergkvist@ericsson.com", "adambe"),
- Committer("Adam Kallai", "kadam@inf.u-szeged.hu", "kadam"),
- Committer("Adam Klein", "adamk@chromium.org", "aklein"),
- Committer("Adam Langley", "agl@chromium.org", "agl"),
- Committer("Ademar de Souza Reis Jr", ["ademar.reis@gmail.com", "ademar@webkit.org"], "ademar"),
- Committer("Albert J. Wong", "ajwong@chromium.org"),
- Committer("Alec Flett", ["alecflett@chromium.org", "alecflett@google.com"], "alecf"),
- Committer(u"Alexander F\u00e6r\u00f8y", ["ahf@0x90.dk", "alexander.faeroy@nokia.com"], "ahf"),
- Committer("Alexander Kellett", ["lypanov@mac.com", "a-lists001@lypanov.net", "lypanov@kde.org"], "lypanov"),
- Committer("Alexandre Elias", ["aelias@chromium.org", "aelias@google.com"], "aelias"),
- Committer("Alexandru Chiculita", "achicu@adobe.com", "achicu"),
- Committer("Alice Boxhall", "aboxhall@chromium.org", "aboxhall"),
- Committer("Allan Sandfeld Jensen", ["allan.jensen@digia.com", "kde@carewolf.com", "sandfeld@kde.org", "allan.jensen@nokia.com"], "carewolf"),
- Committer("Alok Priyadarshi", "alokp@chromium.org", "alokp"),
- Committer("Ami Fischman", ["fischman@chromium.org", "fischman@google.com"], "fischman"),
- Committer("Amruth Raj", "amruthraj@motorola.com", "amruthraj"),
- Committer("Andre Boule", "aboule@apple.com"),
- Committer("Andrei Popescu", "andreip@google.com", "andreip"),
- Committer("Andrew Wellington", ["andrew@webkit.org", "proton@wiretapped.net"], "proton"),
- Committer("Andrew Scherkus", "scherkus@chromium.org", "scherkus"),
- Committer("Andrey Adaykin", "aandrey@chromium.org", "aandrey"),
- Committer("Andrey Kosyakov", "caseq@chromium.org", "caseq"),
- Committer("Andras Becsi", ["abecsi@webkit.org", "andras.becsi@digia.com"], "bbandix"),
- Committer("Andy Wingo", "wingo@igalia.com", "wingo"),
- Committer("Anna Cavender", "annacc@chromium.org", "annacc"),
- Committer("Anthony Ricaud", "rik@webkit.org", "rik"),
- Committer("Antoine Labour", "piman@chromium.org", "piman"),
- Committer("Anton D'Auria", "adauria@apple.com", "antonlefou"),
- Committer("Anton Muhin", "antonm@chromium.org", "antonm"),
- Committer("Arko Saha", "arko@motorola.com", "arkos"),
- Committer("Arvid Nilsson", "anilsson@rim.com", "anilsson"),
- Committer("Balazs Kelemen", "kbalazs@webkit.org", "kbalazs"),
- Committer("Ben Murdoch", "benm@google.com", "benm"),
- Committer("Ben Wells", "benwells@chromium.org", "benwells"),
- Committer("Benjamin C Meyer", ["ben@meyerhome.net", "ben@webkit.org", "bmeyer@rim.com"], "icefox"),
- Committer("Benjamin Kalman", ["kalman@chromium.org", "kalman@google.com"], "kalman"),
- Committer("Benjamin Otte", ["otte@gnome.org", "otte@webkit.org"], "otte"),
- Committer("Bill Budge", ["bbudge@chromium.org", "bbudge@gmail.com"], "bbudge"),
- Committer("Brett Wilson", "brettw@chromium.org", "brettx"),
- Committer("Bruno de Oliveira Abinader", ["bruno.abinader@basyskom.com", "brunoabinader@gmail.com"], "abinader"),
- Committer("Cameron McCormack", ["cam@mcc.id.au", "cam@webkit.org"], "heycam"),
- Committer("Carol Szabo", ["carol@webkit.org", "carol.szabo@nokia.com"], "cszabo1"),
- Committer("Cary Clark", ["caryclark@google.com", "caryclark@chromium.org"], "caryclark"),
- Committer("Charles Reis", "creis@chromium.org", "creis"),
- Committer("Charles Wei", ["charles.wei@torchmobile.com.cn"], "cswei"),
- Committer("Chris Evans", ["cevans@google.com", "cevans@chromium.org"]),
- Committer("Chris Guillory", ["ctguil@chromium.org", "chris.guillory@google.com"], "ctguil"),
- Committer("Chris Petersen", "cpetersen@apple.com", "cpetersen"),
- Committer("Christian Dywan", ["christian@twotoasts.de", "christian@webkit.org", "christian@lanedo.com"]),
- Committer("Christophe Dumez", ["christophe.dumez@intel.com", "dchris@gmail.com"], "chris-qBT"),
- Committer("Collin Jackson", "collinj@webkit.org", "collinjackson"),
- Committer("Cris Neckar", "cdn@chromium.org", "cneckar"),
- Committer("Dan Winship", "danw@gnome.org", "danw"),
- Committer("Dana Jansens", "danakj@chromium.org", "danakj"),
- Committer("Daniel Cheng", "dcheng@chromium.org", "dcheng"),
- Committer("Dave Barton", "dbarton@mathscribe.com", "davebarton"),
- Committer("Dave Tharp", "dtharp@codeaurora.org", "dtharp"),
- Committer("David Michael Barr", ["davidbarr@chromium.org", "davidbarr@google.com", "b@rr-dav.id.au"], "barrbrain"),
- Committer("David Grogan", ["dgrogan@chromium.org", "dgrogan@google.com"], "dgrogan"),
- Committer("David Smith", ["catfish.man@gmail.com", "dsmith@webkit.org"], "catfishman"),
- Committer("Diego Gonzalez", ["diegohcg@webkit.org", "diego.gonzalez@openbossa.org"], "diegohcg"),
- Committer("Dinu Jacob", "dinu.s.jacob@intel.com", "dsjacob"),
- Committer("Dmitry Lomov", ["dslomov@google.com", "dslomov@chromium.org"], "dslomov"),
- Committer("Dominic Cooney", ["dominicc@chromium.org", "dominicc@google.com"], "dominicc"),
- Committer("Dominic Mazzoni", ["dmazzoni@google.com", "dmazzoni@chromium.org"], "dmazzoni"),
- Committer(u"Dominik R\u00f6ttsches", ["dominik.rottsches@intel.com", "d-r@roettsches.de"], "drott"),
- Committer("Drew Wilson", "atwilson@chromium.org", "atwilson"),
- Committer("Eli Fidler", ["eli@staikos.net", "efidler@rim.com"], "efidler"),
- Committer("Elliot Poger", "epoger@chromium.org", "epoger"),
- Committer("Erik Arvidsson", "arv@chromium.org", "arv"),
- Committer("Eric Roman", "eroman@chromium.org", "eroman"),
- Committer("Eric Uhrhane", "ericu@chromium.org", "ericu"),
- Committer("Evan Martin", "evan@chromium.org", "evmar"),
- Committer("Evan Stade", "estade@chromium.org", "estade"),
- Committer("Fady Samuel", "fsamuel@chromium.org", "fsamuel"),
- Committer("Feng Qian", "feng@chromium.org"),
- Committer("Florin Malita", ["fmalita@chromium.org", "fmalita@google.com"], "fmalita"),
- Committer("Fumitoshi Ukai", "ukai@chromium.org", "ukai"),
- Committer("Gabor Loki", "loki@webkit.org", "loki04"),
- Committer("Gabor Rapcsanyi", ["rgabor@webkit.org", "rgabor@inf.u-szeged.hu"], "rgabor"),
- Committer("Gavin Peters", ["gavinp@chromium.org", "gavinp@webkit.org", "gavinp@google.com"], "gavinp"),
- Committer("Girish Ramakrishnan", ["girish@forwardbias.in", "ramakrishnan.girish@gmail.com"], "girishr"),
- Committer("Graham Dennis", ["Graham.Dennis@gmail.com", "gdennis@webkit.org"]),
- Committer("Greg Bolsinga", "bolsinga@apple.com"),
- Committer("Grzegorz Czajkowski", "g.czajkowski@samsung.com", "grzegorz"),
- Committer("Hans Wennborg", "hans@chromium.org", "hwennborg"),
- Committer("Hayato Ito", "hayato@chromium.org", "hayato"),
- Committer("Hironori Bono", "hbono@chromium.org", "hbono"),
- Committer("Helder Correia", "helder.correia@nokia.com", "helder"),
- Committer("Hin-Chung Lam", ["hclam@google.com", "hclam@chromium.org"]),
- Committer("Hugo Parente Lima", "hugo.lima@openbossa.org", "hugopl"),
- Committer("Ian Vollick", "vollick@chromium.org", "vollick"),
- Committer("Igor Trindade Oliveira", ["igor.oliveira@webkit.org", "igor.o@sisa.samsung.com"], "igoroliveira"),
- Committer("Ilya Sherman", "isherman@chromium.org", "isherman"),
- Committer("Ilya Tikhonovsky", "loislo@chromium.org", "loislo"),
- Committer("Ivan Krsti\u0107", "ike@apple.com"),
- Committer("Jacky Jiang", ["jkjiang@webkit.org", "zkjiang008@gmail.com", "zhajiang@rim.com"], "jkjiang"),
- Committer("Jakob Petsovits", ["jpetsovits@rim.com", "jpetso@gmx.at"], "jpetso"),
- Committer("Jakub Wieczorek", "jwieczorek@webkit.org", "fawek"),
- Committer("James Hawkins", ["jhawkins@chromium.org", "jhawkins@google.com"], "jhawkins"),
- Committer("James Kozianski", ["koz@chromium.org", "koz@google.com"], "koz"),
- Committer("James Simonsen", "simonjam@chromium.org", "simonjam"),
- Committer("Jarred Nicholls", ["jarred@webkit.org", "jarred@sencha.com"], "jarrednicholls"),
- Committer("Jason Liu", ["jason.liu@torchmobile.com.cn", "jasonliuwebkit@gmail.com"], "jasonliu"),
- Committer("Jay Civelli", "jcivelli@chromium.org", "jcivelli"),
- Committer("Jeff Miller", "jeffm@apple.com", "jeffm7"),
- Committer("Jeffrey Pfau", ["jeffrey@endrift.com", "jpfau@apple.com"], "jpfau"),
- Committer("Jenn Braithwaite", "jennb@chromium.org", "jennb"),
- Committer("Jens Alfke", ["snej@chromium.org", "jens@apple.com"]),
- Committer("Jer Noble", "jer.noble@apple.com", "jernoble"),
- Committer("Jeremy Moskovich", ["playmobil@google.com", "jeremy@chromium.org"], "jeremymos"),
- Committer("Jesus Sanchez-Palencia", ["jesus@webkit.org", "jesus.palencia@openbossa.org"], "jeez_"),
- Committer("Jia Pu", "jpu@apple.com"),
- Committer("Joe Thomas", "joethomas@motorola.com", "joethomas"),
- Committer("John Abd-El-Malek", "jam@chromium.org", "jam"),
- Committer("John Gregg", ["johnnyg@google.com", "johnnyg@chromium.org"], "johnnyg"),
- Committer("John Knottenbelt", "jknotten@chromium.org", "jknotten"),
- Committer("Johnny Ding", ["jnd@chromium.org", "johnnyding.webkit@gmail.com"], "johnnyding"),
- Committer("Jon Lee", "jonlee@apple.com", "jonlee"),
- Committer("Jonathan Dong", ["jonathan.dong@torchmobile.com.cn"], "jondong"),
- Committer("Joone Hur", ["joone@webkit.org", "joone.hur@intel.com"], "joone"),
- Committer("Joost de Valk", ["joost@webkit.org", "webkit-dev@joostdevalk.nl"], "Altha"),
- Committer("Joshua Bell", ["jsbell@chromium.org", "jsbell@google.com"], "jsbell"),
- Committer("Julie Parent", ["jparent@google.com", "jparent@chromium.org"], "jparent"),
- Committer("Jungshik Shin", "jshin@chromium.org"),
- Committer("Justin Novosad", ["junov@google.com", "junov@chromium.org"], "junov"),
- Committer("Justin Schuh", "jschuh@chromium.org", "jschuh"),
- Committer("Kaustubh Atrawalkar", ["kaustubh@motorola.com"], "silverroots"),
- Committer("Keishi Hattori", "keishi@webkit.org", "keishi"),
- Committer("Kelly Norton", "knorton@alum.mit.edu"),
- Committer("Ken Buchanan", "kenrb@chromium.org", "kenrb"),
- Committer("Kenichi Ishibashi", "bashi@chromium.org", "bashi"),
- Committer("Kenji Imasaki", "imasaki@chromium.org", "imasaki"),
- Committer("Kent Hansen", "kent.hansen@nokia.com", "khansen"),
- Committer("Kihong Kwon", "kihong.kwon@samsung.com", "kihong"),
- Committer(u"Kim Gr\u00f6nholm", "kim.1.gronholm@nokia.com"),
- Committer("Kimmo Kinnunen", ["kimmo.t.kinnunen@nokia.com", "kimmok@iki.fi", "ktkinnun@webkit.org"], "kimmok"),
- Committer("Kinuko Yasuda", "kinuko@chromium.org", "kinuko"),
- Committer("Konrad Piascik", "kpiascik@rim.com", "kpiascik"),
- Committer("Kristof Kosztyo", "kkristof@inf.u-szeged.hu", "kkristof"),
- Committer("Krzysztof Kowalczyk", "kkowalczyk@gmail.com"),
- Committer("Kwang Yul Seo", ["skyul@company100.net", "kseo@webkit.org"], "kseo"),
- Committer("Lauro Neto", "lauro.neto@openbossa.org", "lmoura"),
- Committer("Leandro Gracia Gil", "leandrogracia@chromium.org", "leandrogracia"),
- Committer("Leandro Pereira", ["leandro@profusion.mobi", "leandro@webkit.org"], "acidx"),
- Committer("Leo Yang", ["leoyang@rim.com", "leoyang@webkit.org", "leoyang.webkit@gmail.com"], "leoyang"),
- Committer("Li Yin", ["li.yin@intel.com"], "liyin"),
- Committer("Lucas De Marchi", ["demarchi@webkit.org", "lucas.demarchi@profusion.mobi"], "demarchi"),
- Committer("Lucas Forschler", ["lforschler@apple.com"], "lforschler"),
- Committer("Luciano Wolf", "luciano.wolf@openbossa.org", "luck"),
- Committer("Luke Macpherson", ["macpherson@chromium.org", "macpherson@google.com"], "macpherson"),
- Committer("Mads Ager", "ager@chromium.org"),
- Committer("Mahesh Kulkarni", ["mahesh.kulkarni@nokia.com", "maheshk@webkit.org"], "maheshk"),
- Committer("Marcus Voltis Bulach", "bulach@chromium.org"),
- Committer("Mario Sanchez Prada", ["mario@webkit.org"], "msanchez"),
- Committer("Mark Lam", "mark.lam@apple.com", "mlam"),
- Committer("Mary Wu", ["mary.wu@torchmobile.com.cn", "wwendy2007@gmail.com"], "marywu"),
- Committer("Matt Delaney", "mdelaney@apple.com"),
- Committer("Matt Falkenhagen", "falken@chromium.org", "falken"),
- Committer("Matt Lilek", ["mlilek@apple.com", "webkit@mattlilek.com", "pewtermoose@webkit.org"], "pewtermoose"),
- Committer("Matt Perry", "mpcomplete@chromium.org"),
- Committer("Maxime Britto", ["maxime.britto@gmail.com", "britto@apple.com"]),
- Committer("Maxime Simon", ["simon.maxime@gmail.com", "maxime.simon@webkit.org"], "maxime.simon"),
- Committer(u"Michael Br\u00fcning", ["michaelbruening@gmail.com", "michael.bruning@digia.com", "michael.bruning@nokia.com"], "mibrunin"),
- Committer("Michael Nordman", "michaeln@google.com", "michaeln"),
- Committer("Michelangelo De Simone", "michelangelo@webkit.org", "michelangelo"),
- Committer("Mihnea Ovidenie", "mihnea@adobe.com", "mihnea"),
- Committer("Mike Belshe", ["mbelshe@chromium.org", "mike@belshe.com"]),
- Committer("Mike Fenton", ["mifenton@rim.com", "mike.fenton@torchmobile.com"], "mfenton"),
- Committer("Mike Lawther", "mikelawther@chromium.org", "mikelawther"),
- Committer("Mike Reed", "reed@google.com", "reed"),
- Committer("Mike Thole", ["mthole@mikethole.com", "mthole@apple.com"]),
- Committer("Mike West", ["mkwst@chromium.org", "mike@mikewest.org"], "mkwst"),
- Committer("Mikhail Naganov", "mnaganov@chromium.org"),
- Committer("Naoki Takano", ["honten@chromium.org", "takano.naoki@gmail.com"], "honten"),
- Committer("Nat Duca", ["nduca@chromium.org", "nduca@google.com"], "nduca"),
- Committer("Nayan Kumar K", ["nayankk@motorola.com", "nayankk@gmail.com"], "xc0ffee"),
- Committer("Nico Weber", ["thakis@chromium.org", "thakis@google.com"], "thakis"),
- Committer("Nima Ghanavatian", ["nghanavatian@rim.com", "nima.ghanavatian@gmail.com"], "nghanavatian"),
- Committer("Noel Gordon", ["noel.gordon@gmail.com", "noel@chromium.org", "noel@google.com"], "noel"),
- Committer("Pam Greene", "pam@chromium.org", "pamg"),
- Committer("Patrick Gansterer", ["paroga@paroga.com", "paroga@webkit.org"], "paroga"),
- Committer("Pavel Podivilov", "podivilov@chromium.org", "podivilov"),
- Committer("Peter Beverloo", ["peter@chromium.org", "peter@webkit.org", "beverloo@google.com"], "beverloo"),
- Committer("Peter Kasting", ["pkasting@google.com", "pkasting@chromium.org"], "pkasting"),
- Committer("Peter Varga", ["pvarga@webkit.org", "pvarga@inf.u-szeged.hu"], "stampho"),
- Committer("Philip Rogers", ["pdr@google.com", "pdr@chromium.org"], "pdr"),
- Committer("Pierre d'Herbemont", ["pdherbemont@free.fr", "pdherbemont@apple.com"], "pdherbemont"),
- Committer("Pierre-Olivier Latour", "pol@apple.com", "pol"),
- Committer("Pierre Rossi", "pierre.rossi@gmail.com", "elproxy"),
- Committer("Pratik Solanki", "psolanki@apple.com", "psolanki"),
- Committer("Qi Zhang", "qi.zhang02180@gmail.com", "qi"),
- Committer("Rafael Antognolli", "antognolli@profusion.mobi", "antognolli"),
- Committer("Rafael Brandao", "rafael.lobo@openbossa.org", "rafaelbrandao"),
- Committer("Rafael Weinstein", "rafaelw@chromium.org", "rafaelw"),
- Committer("Raphael Kubo da Costa", ["rakuco@webkit.org", "rakuco@FreeBSD.org", "raphael.kubo.da.costa@intel.com"], "rakuco"),
- Committer("Ravi Kasibhatla", "ravi.kasibhatla@motorola.com", "kphanee"),
- Committer("Renata Hodovan", "reni@webkit.org", "reni"),
- Committer("Robert Hogan", ["robert@webkit.org", "robert@roberthogan.net", "lists@roberthogan.net"], "mwenge"),
- Committer("Robert Kroeger", "rjkroege@chromium.org", "rjkroege"),
- Committer("Roger Fong", "roger_fong@apple.com", "rfong"),
- Committer("Roland Steiner", "rolandsteiner@chromium.org"),
- Committer("Ryuan Choi", "ryuan.choi@samsung.com", "ryuan"),
- Committer("Satish Sampath", "satish@chromium.org"),
- Committer("Scott Violet", "sky@chromium.org", "sky"),
- Committer("Sergio Villar Senin", ["svillar@igalia.com", "sergio@webkit.org"], "svillar"),
- Committer("Shawn Singh", "shawnsingh@chromium.org", "shawnsingh"),
- Committer("Shinya Kawanaka", "shinyak@chromium.org", "shinyak"),
- Committer("Siddharth Mathur", "siddharth.mathur@nokia.com", "simathur"),
- Committer("Simon Pena", "spena@igalia.com", "spenap"),
- Committer("Stephen Chenney", "schenney@chromium.org", "schenney"),
- Committer("Steve Lacey", "sjl@chromium.org", "stevela"),
- Committer("Taiju Tsuiki", "tzik@chromium.org", "tzik"),
- Committer("Takashi Sakamoto", "tasak@google.com", "tasak"),
- Committer("Takashi Toyoshima", "toyoshim@chromium.org", "toyoshim"),
- Committer("Terry Anderson", "tdanderson@chromium.org", "tdanderson"),
- Committer("Thiago Marcos P. Santos", ["tmpsantos@gmail.com", "thiago.santos@intel.com"], "tmpsantos"),
- Committer("Thomas Sepez", "tsepez@chromium.org", "tsepez"),
- Committer("Tom Hudson", ["tomhudson@google.com", "tomhudson@chromium.org"], "tomhudson"),
- Committer("Tom Zakrajsek", "tomz@codeaurora.org", "tomz"),
- Committer("Tommy Widenflycht", "tommyw@google.com", "tommyw"),
- 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("Viatcheslav Ostapenko", ["ostap73@gmail.com", "v.ostapenko@samsung.com", "v.ostapenko@sisa.samsung.com"], "ostap"),
- Committer("Victor Carbune", "victor@rosedu.org", "vcarbune"),
- Committer("Victor Wang", "victorw@chromium.org", "victorw"),
- Committer("Victoria Kirst", ["vrk@chromium.org", "vrk@google.com"], "vrk"),
- Committer("Vincent Scheib", "scheib@chromium.org", "scheib"),
- Committer("Vineet Chaudhary", "rgf748@motorola.com", "vineetc"),
- Committer("Vitaly Repeshko", "vitalyr@chromium.org"),
- Committer("Vivek Galatage", ["vivekg@webkit.org", "vivek.vg@samsung.com"], "vivekg"),
- Committer("William Siegrist", "wsiegrist@apple.com", "wms"),
- Committer("W. James MacLean", "wjmaclean@chromium.org", "seumas"),
- Committer("Xianzhu Wang", ["wangxianzhu@chromium.org", "phnixwxz@gmail.com", "wangxianzhu@google.com"], "wangxianzhu"),
- Committer("Xiaomei Ji", "xji@chromium.org", "xji"),
- Committer("Yael Aharon", "yael@webkit.org", "yael"),
- Committer("Yaar Schnitman", ["yaar@chromium.org", "yaar@google.com"]),
- Committer("Yi Shen", ["yi.4.shen@nokia.com", "shenyi2006@gmail.com"]),
- Committer("Yongjun Zhang", ["yongjun.zhang@nokia.com", "yongjun_zhang@apple.com"]),
- Committer("Yoshifumi Inoue", "yosin@chromium.org", "yosin"),
- Committer("Yuqiang Xian", "yuqiang.xian@intel.com"),
- Committer("Yuzo Fujishima", "yuzo@google.com", "yuzo"),
- Committer("Zalan Bujtas", ["zbujtas@gmail.com", "zalan.bujtas@nokia.com"], "zalan"),
- Committer("Zeno Albisser", ["zeno@webkit.org", "zeno.albisser@nokia.com"], "zalbisser"),
- Committer("Zhenyao Mo", "zmo@google.com", "zhenyao"),
- Committer("Zoltan Horvath", ["zoltan@webkit.org", "hzoltan@inf.u-szeged.hu", "horvath.zoltan.6@stud.u-szeged.hu"], "zoltan"),
- Committer(u"\u017dan Dober\u0161ek", "zandobersek@gmail.com", "zdobersek"),
-]
-
-
-# This is intended as a canonical, machine-readable list of all reviewers for
-# WebKit. If your name is missing here and you are a reviewer, please add it.
-# No review needed.
-
-
-reviewers_list = [
- Reviewer("Abhishek Arya", "inferno@chromium.org", "inferno-sec"),
- Reviewer("Ada Chan", "adachan@apple.com", "chanada"),
- Reviewer("Adam Barth", "abarth@webkit.org", "abarth"),
- Reviewer("Adam Roben", ["aroben@webkit.org", "aroben@apple.com"], "aroben"),
- Reviewer("Adam Treat", ["treat@kde.org", "treat@webkit.org", "atreat@rim.com"], "manyoso"),
- Reviewer("Adele Peterson", "adele@apple.com", "adele"),
- Reviewer("Adrienne Walker", ["enne@google.com", "enne@chromium.org"], "enne"),
- Reviewer("Alejandro G. Castro", ["alex@igalia.com", "alex@webkit.org"], "alexg__"),
- Reviewer("Alexander Pavlov", ["apavlov@chromium.org", "pavlov81@gmail.com"], "apavlov"),
- Reviewer("Alexey Proskuryakov", ["ap@webkit.org", "ap@apple.com"], "ap"),
- Reviewer("Alexis Menard", ["alexis@webkit.org", "menard@kde.org"], "darktears"),
- Reviewer("Alice Liu", "alice.liu@apple.com", "aliu"),
- Reviewer("Alp Toker", ["alp@nuanti.com", "alp@atoker.com", "alp@webkit.org"], "alp"),
- Reviewer("Anders Carlsson", ["andersca@apple.com", "acarlsson@apple.com"], "andersca"),
- Reviewer("Andreas Kling", ["akling@apple.com", "kling@webkit.org", "awesomekling@apple.com", "andreas.kling@nokia.com"], "kling"),
- Reviewer("Andy Estes", "aestes@apple.com", "estes"),
- Reviewer("Antonio Gomes", ["tonikitoo@webkit.org", "agomes@rim.com"], "tonikitoo"),
- Reviewer("Antti Koivisto", ["koivisto@iki.fi", "antti@apple.com", "antti.j.koivisto@nokia.com"], "anttik"),
- Reviewer("Ariya Hidayat", ["ariya.hidayat@gmail.com", "ariya@sencha.com", "ariya@webkit.org"], "ariya"),
- Reviewer("Benjamin Poulain", ["benjamin@webkit.org", "benjamin.poulain@nokia.com", "ikipou@gmail.com"], "benjaminp"),
- Reviewer("Beth Dakin", "bdakin@apple.com", "dethbakin"),
- Reviewer("Brady Eidson", "beidson@apple.com", "bradee-oh"),
- Reviewer("Brent Fulgham", "bfulgham@webkit.org", "bfulgham"),
- Reviewer("Brian Weinstein", "bweinstein@apple.com", "bweinstein"),
- Reviewer("Caio Marcelo de Oliveira Filho", ["cmarcelo@webkit.org", "caio.oliveira@openbossa.org"], "cmarcelo"),
- Reviewer("Cameron Zwarich", ["zwarich@apple.com", "cwzwarich@apple.com", "cwzwarich@webkit.org"]),
- Reviewer("Carlos Garcia Campos", ["cgarcia@igalia.com", "carlosgc@gnome.org", "carlosgc@webkit.org"], "KaL"),
- Reviewer("Chang Shu", ["cshu@webkit.org", "c.shu@sisa.samsung.com"], "cshu"),
- 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("Chris Rogers", "crogers@google.com", "crogers"),
- Reviewer(u"Csaba Osztrogon\u00e1c", "ossy@webkit.org", "ossy"),
- Reviewer("Dan Bernstein", ["mitz@webkit.org", "mitz@apple.com"], "mitzpettel"),
- Reviewer("Daniel Bates", ["dbates@webkit.org", "dbates@rim.com"], "dydz"),
- Reviewer("Darin Adler", "darin@apple.com", "darin"),
- Reviewer("Darin Fisher", ["fishd@chromium.org", "darin@chromium.org"], "fishd"),
- Reviewer("David Harrison", "harrison@apple.com", "harrison"),
- Reviewer("David Hyatt", "hyatt@apple.com", ["dhyatt", "hyatt"]),
- Reviewer("David Kilzer", ["ddkilzer@webkit.org", "ddkilzer@apple.com"], "ddkilzer"),
- Reviewer("David Levin", "levin@chromium.org", "dave_levin"),
- Reviewer("Dean Jackson", "dino@apple.com", "dino"),
- Reviewer("Dimitri Glazkov", "dglazkov@chromium.org", "dglazkov"),
- Reviewer("Dirk Pranke", "dpranke@chromium.org", "dpranke"),
- Reviewer("Dirk Schulze", "krit@webkit.org", "krit"),
- Reviewer("Dmitry Titov", "dimich@chromium.org", "dimich"),
- Reviewer("Don Melton", "gramps@apple.com", "gramps"),
- Reviewer("Dumitru Daniliuc", "dumi@chromium.org", "dumi"),
- Reviewer("Emil A Eklund", "eae@chromium.org", "eae"),
- Reviewer("Enrica Casucci", "enrica@apple.com", "enrica"),
- Reviewer("Eric Carlson", "eric.carlson@apple.com", "eric_carlson"),
- Reviewer("Eric Seidel", "eric@webkit.org", "eseidel"),
- Reviewer("Filip Pizlo", "fpizlo@apple.com", "pizlo"),
- Reviewer("Gavin Barraclough", "barraclough@apple.com", "gbarra"),
- Reviewer("Geoffrey Garen", "ggaren@apple.com", "ggaren"),
- Reviewer("George Staikos", ["staikos@kde.org", "staikos@webkit.org"]),
- Reviewer("Gustavo Noronha Silva", ["gns@gnome.org", "kov@webkit.org", "gustavo.noronha@collabora.co.uk", "gustavo.noronha@collabora.com"], "kov"),
- Reviewer("Gyuyoung Kim", ["gyuyoung.kim@samsung.com", "gyuyoung.kim@webkit.org"], "gyuyoung"),
- Reviewer("Hajime Morita", ["morrita@google.com", "morrita@chromium.org"], "morrita"),
- Reviewer("Holger Freyther", ["zecke@selfish.org", "zecke@webkit.org"], "zecke"),
- Reviewer("James Robinson", ["jamesr@chromium.org", "jamesr@google.com"], "jamesr"),
- Reviewer("Jan Alonzo", ["jmalonzo@gmail.com", "jmalonzo@webkit.org"], "janm"),
- Reviewer("Jeremy Orlow", ["jorlow@webkit.org", "jorlow@chromium.org"], "jorlow"),
- Reviewer("Jessie Berlin", ["jberlin@webkit.org", "jberlin@apple.com"], "jessieberlin"),
- Reviewer("Jian Li", "jianli@chromium.org", "jianli"),
- Reviewer("Jocelyn Turcotte", ["jocelyn.turcotte@digia.com", "jocelyn.turcotte@nokia.com"], "jturcotte"),
- Reviewer("Jochen Eisinger", "jochen@chromium.org", "jochen__"),
- Reviewer("John Sullivan", "sullivan@apple.com", "sullivan"),
- Reviewer("Jon Honeycutt", "jhoneycutt@apple.com", "jhoneycutt"),
- Reviewer("Joseph Pecoraro", ["joepeck@webkit.org", "pecoraro@apple.com"], "JoePeck"),
- Reviewer("Julien Chaffraix", ["jchaffraix@webkit.org", "julien.chaffraix@gmail.com", "jchaffraix@google.com", "jchaffraix@codeaurora.org"], "jchaffraix"),
- Reviewer("Justin Garcia", "justin.garcia@apple.com", "justing"),
- Reviewer("Ken Kocienda", "kocienda@apple.com"),
- Reviewer("Kenneth Rohde Christiansen", ["kenneth@webkit.org", "kenneth.r.christiansen@intel.com", "kenneth.christiansen@gmail.com"], ["kenneth_", "kenneth", "kenne"]),
- Reviewer("Kenneth Russell", ["kbr@google.com", "kbr@chromium.org"], ["kbr_google", "kbrgg"]),
- Reviewer("Kent Tamura", ["tkent@chromium.org", "tkent@google.com"], "tkent"),
- Reviewer("Kentaro Hara", ["haraken@chromium.org"], "haraken"),
- Reviewer("Kevin Decker", "kdecker@apple.com", "superkevin"),
- Reviewer("Kevin McCullough", "kmccullough@apple.com", "maculloch"),
- Reviewer("Kevin Ollivier", ["kevino@theolliviers.com", "kevino@webkit.org"], "kollivier"),
- Reviewer("Lars Knoll", ["lars@trolltech.com", "lars@kde.org", "lars.knoll@nokia.com"], "lars"),
- Reviewer("Laszlo Gombos", ["laszlo.gombos@webkit.org", "l.gombos@samsung.com", "laszlo.1.gombos@nokia.com"], "lgombos"),
- Reviewer("Levi Weintraub", ["leviw@chromium.org", "leviw@google.com", "lweintraub@apple.com"], "leviw"),
- Reviewer("Luiz Agostini", ["luiz@webkit.org", "luiz.agostini@openbossa.org"], "lca"),
- Reviewer("Maciej Stachowiak", "mjs@apple.com", "othermaciej"),
- Reviewer("Mark Hahnenberg", "mhahnenberg@apple.com", "mhahnenberg"),
- Reviewer("Mark Rowe", "mrowe@apple.com", "bdash"),
- Reviewer("Martin Robinson", ["mrobinson@webkit.org", "mrobinson@igalia.com", "martin.james.robinson@gmail.com"], "mrobinson"),
- Reviewer("Michael Saboff", "msaboff@apple.com", "msaboff"),
- Reviewer("Mihai Parparita", "mihaip@chromium.org", "mihaip"),
- Reviewer("Nate Chapin", "japhet@chromium.org", ["japhet", "natechapin"]),
- Reviewer("Nikolas Zimmermann", ["zimmermann@kde.org", "zimmermann@physik.rwth-aachen.de", "zimmermann@webkit.org", "nzimmermann@rim.com"], "wildfox"),
- Reviewer("Noam Rosenthal", ["noam@webkit.org", "noam.rosenthal@nokia.com"], "noamr"),
- Reviewer("Ojan Vafai", "ojan@chromium.org", "ojan"),
- Reviewer("Oliver Hunt", "oliver@apple.com", "olliej"),
- Reviewer("Pavel Feldman", ["pfeldman@chromium.org", "pfeldman@google.com"], "pfeldman"),
- Reviewer("Philippe Normand", ["pnormand@igalia.com", "philn@webkit.org", "philn@igalia.com"], ["philn-tp", "pnormand"]),
- Reviewer("Richard Williamson", "rjw@apple.com", "rjw"),
- Reviewer("Rob Buis", ["rwlbuis@gmail.com", "rwlbuis@webkit.org", "rbuis@rim.com"], "rwlbuis"),
- Reviewer("Ryosuke Niwa", "rniwa@webkit.org", "rniwa"),
- Reviewer("Sam Weinig", ["sam@webkit.org", "weinig@apple.com"], "weinig"),
- Reviewer("Shinichiro Hamaji", "hamaji@chromium.org", "hamaji"),
- Reviewer("Simon Fraser", "simon.fraser@apple.com", "smfr"),
- Reviewer("Simon Hausmann", ["hausmann@webkit.org", "hausmann@kde.org", "simon.hausmann@digia.com"], "tronical"),
- Reviewer("Stephanie Lewis", "slewis@apple.com", "sundiamonde"),
- Reviewer("Stephen White", "senorblanco@chromium.org", "senorblanco"),
- Reviewer("Steve Block", "steveblock@google.com", "steveblock"),
- Reviewer("Steve Falkenburg", "sfalken@apple.com", "sfalken"),
- Reviewer("Tim Omernick", "timo@apple.com"),
- Reviewer("Timothy Hatcher", ["timothy@apple.com", "timothy@hatcher.name"], "xenon"),
- Reviewer("Tim Horton", "timothy_horton@apple.com", "thorton"),
- Reviewer("Tony Chang", "tony@chromium.org", "tony^work"),
- Reviewer("Tony Gentilcore", "tonyg@chromium.org", "tonyg-cr"),
- Reviewer(u"Tor Arne Vestb\u00f8", ["vestbo@webkit.org", "tor.arne.vestbo@nokia.com"], "torarne"),
- Reviewer("Vicki Murley", "vicki@apple.com"),
- Reviewer("Vsevolod Vlasov", "vsevik@chromium.org", "vsevik"),
- Reviewer("Xan Lopez", ["xan.lopez@gmail.com", "xan@gnome.org", "xan@webkit.org", "xlopez@igalia.com"], "xan"),
- Reviewer("Yong Li", ["yoli@rim.com", "yong.li.webkit@gmail.com"], "yoli"),
- Reviewer("Yury Semikhatsky", "yurys@chromium.org", "yurys"),
- Reviewer("Yuta Kitamura", "yutak@chromium.org", "yutak"),
- Reviewer("Zack Rusin", "zack@kde.org", "zackr"),
- Reviewer("Zoltan Herczeg", ["zherczeg@webkit.org", "zherczeg@inf.u-szeged.hu"], "zherczeg"),
-]
-
class CommitterList(object):
# Committers and reviewers are passed in to allow easy testing
def __init__(self,
- committers=committers_unable_to_review,
- reviewers=reviewers_list,
- contributors=contributors_who_are_not_committers,
- watchers=watchers_who_are_not_contributors):
- self._accounts = watchers + contributors + committers + reviewers
+ committers=[],
+ reviewers=[],
+ contributors=[]):
+ # FIXME: These arguments only exist for testing. Clean it up.
+ if not (committers or reviewers or contributors):
+ loaded_data = self.load_json()
+ contributors = loaded_data['Contributors']
+ committers = loaded_data['Committers']
+ reviewers = loaded_data['Reviewers']
+
self._contributors = contributors + committers + reviewers
self._committers = committers + reviewers
self._reviewers = reviewers
@@ -579,8 +127,18 @@ class CommitterList(object):
self._accounts_by_email = {}
self._accounts_by_login = {}
- def accounts(self):
- return self._accounts
+ @staticmethod
+ @memoized
+ def load_json():
+ filesystem = FileSystem()
+ json_path = filesystem.join(filesystem.dirname(filesystem.path_to_module('webkitpy.common.config')), 'contributors.json')
+ contributors = json.loads(filesystem.read_text_file(json_path))
+
+ return {
+ 'Contributors': [Contributor(name, data.get('emails'), data.get('nicks')) for name, data in contributors['Contributors'].iteritems()],
+ 'Committers': [Committer(name, data.get('emails'), data.get('nicks')) for name, data in contributors['Committers'].iteritems()],
+ 'Reviewers': [Reviewer(name, data.get('emails'), data.get('nicks')) for name, data in contributors['Reviewers'].iteritems()],
+ }
def contributors(self):
return self._contributors
@@ -601,7 +159,7 @@ class CommitterList(object):
def _email_to_account_map(self):
if not len(self._accounts_by_email):
- for account in self._accounts:
+ for account in self._contributors:
for email in account.emails:
assert(email not in self._accounts_by_email) # We should never have duplicate emails.
self._accounts_by_email[email] = account
@@ -609,18 +167,13 @@ class CommitterList(object):
def _login_to_account_map(self):
if not len(self._accounts_by_login):
- for account in self._accounts:
+ for account in self._contributors:
if account.emails:
login = account.bugzilla_email()
assert(login not in self._accounts_by_login) # We should never have duplicate emails.
self._accounts_by_login[login] = account
return self._accounts_by_login
- def _contributor_only(self, record):
- if record and not record.is_contributor:
- return None
- return record
-
def _committer_only(self, record):
if record and not record.can_commit:
return None
@@ -642,7 +195,8 @@ class CommitterList(object):
return None
def contributors_by_search_string(self, string):
- return filter(lambda contributor: contributor.contains_string(string), self.contributors())
+ glob_matches = filter(lambda contributor: contributor.matches_glob(string), self.contributors())
+ return glob_matches or filter(lambda contributor: contributor.contains_string(string), self.contributors())
def contributors_by_email_username(self, string):
string = string + '@'
@@ -673,7 +227,7 @@ class CommitterList(object):
string_in_lowercase = string.lower()
# 1. Exact match for fullname, email and irc_nicknames
- account = self.contributor_by_name(string_in_lowercase) or self.account_by_email(string_in_lowercase) or self.contributor_by_irc_nickname(string_in_lowercase)
+ account = self.contributor_by_name(string_in_lowercase) or self.contributor_by_email(string_in_lowercase) or self.contributor_by_irc_nickname(string_in_lowercase)
if account:
return [account], 0
@@ -706,20 +260,14 @@ class CommitterList(object):
return [], len(string)
return contributorWithMinDistance, minDistance
- def account_by_login(self, login):
- return self._login_to_account_map().get(login.lower()) if login else None
-
- def account_by_email(self, email):
+ def contributor_by_email(self, email):
return self._email_to_account_map().get(email.lower()) if email else None
def contributor_by_name(self, name):
return self._name_to_contributor_map().get(name.lower()) if name else None
- def contributor_by_email(self, email):
- return self._contributor_only(self.account_by_email(email))
-
def committer_by_email(self, email):
- return self._committer_only(self.account_by_email(email))
+ return self._committer_only(self.contributor_by_email(email))
def reviewer_by_email(self, email):
- return self._reviewer_only(self.account_by_email(email))
+ return self._reviewer_only(self.contributor_by_email(email))
diff --git a/Tools/Scripts/webkitpy/common/config/committers_unittest.py b/Tools/Scripts/webkitpy/common/config/committers_unittest.py
index 1c8c86a1a..f23c5fbda 100644
--- a/Tools/Scripts/webkitpy/common/config/committers_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/committers_unittest.py
@@ -25,22 +25,20 @@
# (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 unittest
-from webkitpy.common.config.committers import Account, CommitterList, Contributor, Committer, Reviewer
+import unittest2 as unittest
+from webkitpy.common.config.committers import CommitterList, Contributor, Committer, Reviewer
class CommittersTest(unittest.TestCase):
def test_committer_lookup(self):
- account = Account('Test Zero', ['zero@test.com', 'zero@gmail.com'], 'zero')
committer = Committer('Test One', 'one@test.com', 'one')
reviewer = Reviewer('Test Two', ['two@test.com', 'Two@rad.com', 'so_two@gmail.com'])
contributor = Contributor('Test Three', ['Three@test.com'], 'three')
contributor_with_two_nicknames = Contributor('Other Four', ['otherfour@webkit.org', 'otherfour@webkit2.org'], ['four', 'otherfour'])
contributor_with_same_email_username = Contributor('Yet Another Four', ['otherfour@webkit.com'], ['yetanotherfour'])
- committer_list = CommitterList(watchers=[account], committers=[committer], reviewers=[reviewer],
+ committer_list = CommitterList(committers=[committer], reviewers=[reviewer],
contributors=[contributor, contributor_with_two_nicknames, contributor_with_same_email_username])
# Test valid committer, reviewer and contributor lookup
- self.assertEqual(committer_list.account_by_email('zero@test.com'), account)
self.assertEqual(committer_list.committer_by_email('one@test.com'), committer)
self.assertEqual(committer_list.reviewer_by_email('two@test.com'), reviewer)
self.assertEqual(committer_list.committer_by_email('two@test.com'), reviewer)
@@ -51,7 +49,7 @@ class CommittersTest(unittest.TestCase):
# Test valid committer, reviewer and contributor lookup
self.assertEqual(committer_list.committer_by_name("Test One"), committer)
self.assertEqual(committer_list.committer_by_name("Test Two"), reviewer)
- self.assertEqual(committer_list.committer_by_name("Test Three"), None)
+ self.assertIsNone(committer_list.committer_by_name("Test Three"))
self.assertEqual(committer_list.contributor_by_name("Test Three"), contributor)
self.assertEqual(committer_list.contributor_by_name("test one"), committer)
self.assertEqual(committer_list.contributor_by_name("test two"), reviewer)
@@ -60,23 +58,15 @@ class CommittersTest(unittest.TestCase):
# Test that the first email is assumed to be the Bugzilla email address (for now)
self.assertEqual(committer_list.committer_by_email('two@rad.com').bugzilla_email(), 'two@test.com')
- # Test lookup by login email address
- self.assertEqual(committer_list.account_by_login('zero@test.com'), account)
- self.assertEqual(committer_list.account_by_login('zero@gmail.com'), None)
- self.assertEqual(committer_list.account_by_login('one@test.com'), committer)
- self.assertEqual(committer_list.account_by_login('two@test.com'), reviewer)
- self.assertEqual(committer_list.account_by_login('Two@rad.com'), None)
- self.assertEqual(committer_list.account_by_login('so_two@gmail.com'), None)
-
# Test that a known committer is not returned during reviewer lookup
- self.assertEqual(committer_list.reviewer_by_email('one@test.com'), None)
- self.assertEqual(committer_list.reviewer_by_email('three@test.com'), None)
+ self.assertIsNone(committer_list.reviewer_by_email('one@test.com'))
+ self.assertIsNone(committer_list.reviewer_by_email('three@test.com'))
# and likewise that a known contributor is not returned for committer lookup.
- self.assertEqual(committer_list.committer_by_email('three@test.com'), None)
+ self.assertIsNone(committer_list.committer_by_email('three@test.com'))
# Test that unknown email address fail both committer and reviewer lookup
- self.assertEqual(committer_list.committer_by_email('bar@bar.com'), None)
- self.assertEqual(committer_list.reviewer_by_email('bar@bar.com'), None)
+ self.assertIsNone(committer_list.committer_by_email('bar@bar.com'))
+ self.assertIsNone(committer_list.reviewer_by_email('bar@bar.com'))
# Test that emails returns a list.
self.assertEqual(committer.emails, ['one@test.com'])
@@ -95,6 +85,8 @@ class CommittersTest(unittest.TestCase):
self.assertEqual(committer_list.contributors_by_search_string('test'), [contributor, committer, reviewer])
self.assertEqual(committer_list.contributors_by_search_string('rad'), [reviewer])
self.assertEqual(committer_list.contributors_by_search_string('Two'), [reviewer])
+ self.assertEqual(committer_list.contributors_by_search_string('otherfour'), [contributor_with_two_nicknames])
+ self.assertEqual(committer_list.contributors_by_search_string('*otherfour*'), [contributor_with_two_nicknames, contributor_with_same_email_username])
self.assertEqual(committer_list.contributors_by_email_username("one"), [committer])
self.assertEqual(committer_list.contributors_by_email_username("four"), [])
@@ -109,6 +101,11 @@ class CommittersTest(unittest.TestCase):
expected_names = [name_of_expected_contributor] if name_of_expected_contributor else []
self.assertEqual(([contributor.full_name for contributor in contributors], distance), (expected_names, expected_distance))
+ # Test that the string representation of a Contributor supports unicode
+ def test_contributor_encoding(self):
+ committer_encoding = Contributor(u'\u017dan M\u00fcller', 'zmuller@example.com', 'zmuller')
+ self.assertTrue(str(committer_encoding))
+
# Basic testing of the edit distance matching ...
def test_contributors_by_fuzzy_match(self):
self._assert_fuzz_match('Geoff Garen', 'Geoffrey Garen', 3)
diff --git a/Tools/Scripts/webkitpy/common/config/committervalidator.py b/Tools/Scripts/webkitpy/common/config/committervalidator.py
index 6cec3da8c..89a4866be 100644
--- a/Tools/Scripts/webkitpy/common/config/committervalidator.py
+++ b/Tools/Scripts/webkitpy/common/config/committervalidator.py
@@ -78,18 +78,20 @@ class CommitterValidator(object):
attachment_id,
additional_comment_text=None):
comment_text = "Rejecting attachment %s from commit-queue." % attachment_id
+ if additional_comment_text:
+ comment_text += "\n\n%s" % additional_comment_text
self.host.bugs.set_flag_on_attachment(attachment_id,
"commit-queue",
"-",
- comment_text,
- additional_comment_text)
+ comment_text)
def reject_patch_from_review_queue(self,
attachment_id,
additional_comment_text=None):
comment_text = "Rejecting attachment %s from review queue." % attachment_id
+ if additional_comment_text:
+ comment_text += "\n\n%s" % additional_comment_text
self.host.bugs.set_flag_on_attachment(attachment_id,
'review',
'-',
- comment_text,
- additional_comment_text)
+ comment_text)
diff --git a/Tools/Scripts/webkitpy/common/config/committervalidator_unittest.py b/Tools/Scripts/webkitpy/common/config/committervalidator_unittest.py
index 232f0771e..e8aa88721 100644
--- a/Tools/Scripts/webkitpy/common/config/committervalidator_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/committervalidator_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
from .committervalidator import CommitterValidator
@@ -41,4 +41,4 @@ 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 Tools/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)
+ self.assertMultiLineEqual(validator._flag_permission_rejection_message("foo@foo.com", "review"), expected_messsage)
diff --git a/Tools/Scripts/webkitpy/common/config/contributionareas.py b/Tools/Scripts/webkitpy/common/config/contributionareas.py
index b48df2a55..effcd22a0 100644
--- a/Tools/Scripts/webkitpy/common/config/contributionareas.py
+++ b/Tools/Scripts/webkitpy/common/config/contributionareas.py
@@ -131,7 +131,6 @@ contribution_areas = [
_Area('Scrollbars', ['scroll']),
_Area('Security'), # Probably need more tokens
# FIXME: 'Shadow DOM'
- _Area('Skia'),
_Area('Soup Network Backend', ['soup']),
# FIXME: 'Spell Checking' just need tokens
_Area('Tables', ['htmltable', 'rendertable']),
@@ -144,7 +143,6 @@ contribution_areas = [
_Area('The QtWebKit Port', ['qt']),
_Area('The WinCE Port', ['wince']),
_Area('The WinCairo Port', ['cairo']),
- _Area('The wxWebKit Port', ['wx']),
_Area('Threading', ['thread']),
_Area('Tools'),
_Area('Touch Support', ['touch']),
diff --git a/Tools/Scripts/webkitpy/common/config/contributionareas_unittest.py b/Tools/Scripts/webkitpy/common/config/contributionareas_unittest.py
index c3960d9c1..17d4fe718 100644
--- a/Tools/Scripts/webkitpy/common/config/contributionareas_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/contributionareas_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from .contributionareas import _Intersection
from .contributionareas import _Area
diff --git a/Tools/Scripts/webkitpy/common/config/contributors.json b/Tools/Scripts/webkitpy/common/config/contributors.json
new file mode 100644
index 000000000..d2fb18910
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/config/contributors.json
@@ -0,0 +1,4184 @@
+{
+ "Committers" : {
+ "Aaron Boodman" : {
+ "emails" : [
+ "aa@chromium.org"
+ ],
+ "nicks" : [
+ "aboodman"
+ ]
+ },
+ "Aaron Colwell" : {
+ "emails" : [
+ "acolwell@chromium.org"
+ ],
+ "nicks" : [
+ "acolwell"
+ ]
+ },
+ "Adam Bergkvist" : {
+ "emails" : [
+ "adam.bergkvist@ericsson.com"
+ ],
+ "nicks" : [
+ "adambe"
+ ]
+ },
+ "Adam Kallai" : {
+ "emails" : [
+ "kadam@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "kadam"
+ ]
+ },
+ "Adam Klein" : {
+ "emails" : [
+ "adamk@chromium.org"
+ ],
+ "nicks" : [
+ "aklein"
+ ]
+ },
+ "Adam Langley" : {
+ "emails" : [
+ "agl@chromium.org"
+ ],
+ "expertise" : "All Chromium Linux Code (yes, all of it)",
+ "nicks" : [
+ "agl"
+ ]
+ },
+ "Ademar de Souza Reis Jr" : {
+ "emails" : [
+ "ademar.reis@gmail.com",
+ "ademar@webkit.org"
+ ],
+ "nicks" : [
+ "ademar"
+ ]
+ },
+ "Adenilson Cavalcanti" : {
+ "emails" : [
+ "cavalcantii@gmail.com"
+ ],
+ "nicks" : [
+ "Savago"
+ ]
+ },
+ "Albert J. Wong" : {
+ "emails" : [
+ "ajwong@chromium.org"
+ ]
+ },
+ "Alec Flett" : {
+ "emails" : [
+ "alecflett@chromium.org",
+ "alecflett@google.com"
+ ],
+ "nicks" : [
+ "alecf"
+ ]
+ },
+ "Alex Christensen" : {
+ "emails" : [
+ "achristensen@apple.com",
+ "alex.christensen@flexsim.com"
+ ],
+ "expertise" : "Win64",
+ "nicks" : [
+ "alexchristensen"
+ ]
+ },
+ "Alexander F\u00e6r\u00f8y" : {
+ "emails" : [
+ "ahf@0x90.dk",
+ "alexander.faeroy@nokia.com"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "ahf"
+ ]
+ },
+ "Alexander Kellett" : {
+ "emails" : [
+ "lypanov@mac.com",
+ "a-lists001@lypanov.net",
+ "lypanov@kde.org"
+ ],
+ "nicks" : [
+ "lypanov"
+ ]
+ },
+ "Alexandre Elias" : {
+ "emails" : [
+ "aelias@chromium.org",
+ "aelias@google.com"
+ ],
+ "nicks" : [
+ "aelias"
+ ]
+ },
+ "Alice Boxhall" : {
+ "emails" : [
+ "aboxhall@chromium.org"
+ ],
+ "nicks" : [
+ "aboxhall"
+ ]
+ },
+ "Alok Priyadarshi" : {
+ "emails" : [
+ "alokp@chromium.org"
+ ],
+ "nicks" : [
+ "alokp"
+ ]
+ },
+ "Ami Fischman" : {
+ "emails" : [
+ "fischman@chromium.org",
+ "fischman@google.com"
+ ],
+ "nicks" : [
+ "fischman"
+ ]
+ },
+ "Amruth Raj" : {
+ "emails" : [
+ "amruthraj@motorola.com"
+ ],
+ "nicks" : [
+ "amruthraj"
+ ]
+ },
+ "Andras Becsi" : {
+ "emails" : [
+ "abecsi@webkit.org",
+ "andras.becsi@digia.com"
+ ],
+ "expertise" : "The QtWebKit Port, Tools, Layout and Rendering",
+ "nicks" : [
+ "bbandix"
+ ]
+ },
+ "Andre Boule" : {
+ "emails" : [
+ "aboule@apple.com"
+ ]
+ },
+ "Andrei Bucur" : {
+ "emails" : [
+ "abucur@adobe.com"
+ ],
+ "nicks" : [
+ "abucur"
+ ]
+ },
+ "Andrei Popescu" : {
+ "emails" : [
+ "andreip@google.com"
+ ],
+ "nicks" : [
+ "andreip"
+ ]
+ },
+ "Andrew Lo" : {
+ "emails" : [
+ "anlo@blackberry.com",
+ "anlo@rim.com",
+ "andrewlo@gmail.com"
+ ],
+ "nicks" : [
+ "andrewlo"
+ ]
+ },
+ "Andrew Scherkus" : {
+ "emails" : [
+ "scherkus@chromium.org"
+ ],
+ "nicks" : [
+ "scherkus"
+ ]
+ },
+ "Andrew Wellington" : {
+ "emails" : [
+ "andrew@webkit.org",
+ "proton@wiretapped.net"
+ ],
+ "nicks" : [
+ "proton"
+ ]
+ },
+ "Andrey Adaykin" : {
+ "emails" : [
+ "aandrey@chromium.org"
+ ],
+ "expertise" : "Developer Tools, Web Inspector",
+ "nicks" : [
+ "aandrey"
+ ]
+ },
+ "Andrey Kosyakov" : {
+ "emails" : [
+ "caseq@chromium.org"
+ ],
+ "nicks" : [
+ "caseq"
+ ]
+ },
+ "Andy Wingo" : {
+ "emails" : [
+ "wingo@igalia.com"
+ ],
+ "expertise" : "JavaScriptCore, the WebKitGTK+ port",
+ "nicks" : [
+ "wingo"
+ ]
+ },
+ "Anna Cavender" : {
+ "emails" : [
+ "annacc@chromium.org"
+ ],
+ "nicks" : [
+ "annacc"
+ ]
+ },
+ "Anthony Ricaud" : {
+ "emails" : [
+ "rik@webkit.org"
+ ],
+ "expertise" : "Web Inspector",
+ "nicks" : [
+ "rik"
+ ]
+ },
+ "Antoine Labour" : {
+ "emails" : [
+ "piman@chromium.org"
+ ],
+ "nicks" : [
+ "piman"
+ ]
+ },
+ "Antoine Quint" : {
+ "emails" : [
+ "graouts@apple.com"
+ ],
+ "nicks" : [
+ "graouts"
+ ]
+ },
+ "Anton D'Auria" : {
+ "emails" : [
+ "adauria@apple.com"
+ ],
+ "nicks" : [
+ "antonlefou"
+ ]
+ },
+ "Anton Muhin" : {
+ "emails" : [
+ "antonm@chromium.org"
+ ],
+ "nicks" : [
+ "antonm"
+ ]
+ },
+ "Arko Saha" : {
+ "emails" : [
+ "arko@motorola.com"
+ ],
+ "nicks" : [
+ "arkos"
+ ]
+ },
+ "Arno Renevier" : {
+ "emails" : [
+ "a.renevier@samsung.com"
+ ],
+ "nicks" : [
+ "arno"
+ ]
+ },
+ "Arpita Bahuguna" : {
+ "emails" : [
+ "a.bah@samsung.com"
+ ],
+ "nicks" : [
+ "arpitab"
+ ]
+ },
+ "Arvid Nilsson" : {
+ "emails" : [
+ "anilsson@blackberry.com",
+ "anilsson@rim.com"
+ ],
+ "nicks" : [
+ "anilsson"
+ ]
+ },
+ "Balazs Kelemen" : {
+ "emails" : [
+ "kbalazs@webkit.org",
+ "b.kelemen@sisa.samsung.com"
+ ],
+ "expertise" : "The QtWebKit Port, WebKit2",
+ "nicks" : [
+ "kbalazs"
+ ]
+ },
+ "Bear Travis" : {
+ "emails" : [
+ "betravis@adobe.com"
+ ],
+ "nicks" : [
+ "betravis"
+ ]
+ },
+ "Ben Murdoch" : {
+ "emails" : [
+ "benm@google.com"
+ ],
+ "nicks" : [
+ "benm"
+ ]
+ },
+ "Ben Wells" : {
+ "emails" : [
+ "benwells@chromium.org"
+ ],
+ "nicks" : [
+ "benwells"
+ ]
+ },
+ "Benjamin C Meyer" : {
+ "emails" : [
+ "ben@meyerhome.net",
+ "ben@webkit.org"
+ ],
+ "nicks" : [
+ "icefox"
+ ]
+ },
+ "Benjamin Kalman" : {
+ "emails" : [
+ "kalman@chromium.org",
+ "kalman@google.com"
+ ],
+ "nicks" : [
+ "kalman"
+ ]
+ },
+ "Benjamin Otte" : {
+ "emails" : [
+ "otte@gnome.org",
+ "otte@webkit.org"
+ ],
+ "expertise" : "WebKitGTK+ port, GTK+ lead developer",
+ "nicks" : [
+ "otte"
+ ]
+ },
+ "Bill Budge" : {
+ "emails" : [
+ "bbudge@chromium.org",
+ "bbudge@gmail.com"
+ ],
+ "nicks" : [
+ "bbudge"
+ ]
+ },
+ "Brett Wilson" : {
+ "emails" : [
+ "brettw@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Graphics, Skia, URL Parsing",
+ "nicks" : [
+ "brettx"
+ ]
+ },
+ "Bruno de Oliveira Abinader" : {
+ "emails" : [
+ "bruno.d@partner.samsung.com",
+ "bruno.abinader@basyskom.com",
+ "brunoabinader@gmail.com"
+ ],
+ "expertise" : "The QtWebKit Port, CSS, Layout and Rendering",
+ "nicks" : [
+ "abinader"
+ ]
+ },
+ "Byungwoo Lee" : {
+ "emails" : [
+ "bw80.lee@samsung.com",
+ "bw80.lee@gmail.com"
+ ],
+ "expertise" : "The EFLWebKit Port",
+ "nicks" : [
+ "byungwoo"
+ ]
+ },
+ "Cameron McCormack" : {
+ "emails" : [
+ "cam@mcc.id.au",
+ "cam@webkit.org"
+ ],
+ "nicks" : [
+ "heycam"
+ ]
+ },
+ "Carol Szabo" : {
+ "emails" : [
+ "carol@webkit.org",
+ "carol.szabo@nokia.com"
+ ],
+ "nicks" : [
+ "cszabo1"
+ ]
+ },
+ "Cary Clark" : {
+ "emails" : [
+ "caryclark@google.com",
+ "caryclark@chromium.org"
+ ],
+ "nicks" : [
+ "caryclark"
+ ]
+ },
+ "Charles Reis" : {
+ "emails" : [
+ "creis@chromium.org"
+ ],
+ "nicks" : [
+ "creis"
+ ]
+ },
+ "Charles Wei" : {
+ "emails" : [
+ "charles.wei@torchmobile.com.cn"
+ ],
+ "nicks" : [
+ "cswei"
+ ]
+ },
+ "Chris Evans" : {
+ "emails" : [
+ "cevans@google.com",
+ "cevans@chromium.org"
+ ],
+ "expertise" : "Security"
+ },
+ "Chris Guillory" : {
+ "emails" : [
+ "ctguil@chromium.org",
+ "chris.guillory@google.com"
+ ],
+ "nicks" : [
+ "ctguil"
+ ]
+ },
+ "Chris Petersen" : {
+ "emails" : [
+ "cpetersen@apple.com"
+ ],
+ "expertise" : "Performance testing, Qualification testing",
+ "nicks" : [
+ "cpetersen"
+ ]
+ },
+ "Christian Dywan" : {
+ "emails" : [
+ "christian@twotoasts.de",
+ "christian@webkit.org",
+ "christian@lanedo.com"
+ ]
+ },
+ "Claudio Saavedra" : {
+ "emails" : [
+ "csaavedra@igalia.com"
+ ],
+ "expertise" : "WebKitGTK+ port, Epiphany developer, HTML Editing",
+ "nicks" : [
+ "claudio___"
+ ]
+ },
+ "Collin Jackson" : {
+ "emails" : [
+ "collinj@webkit.org"
+ ],
+ "nicks" : [
+ "collinjackson"
+ ]
+ },
+ "Cris Neckar" : {
+ "emails" : [
+ "cdn@chromium.org"
+ ],
+ "nicks" : [
+ "cneckar"
+ ]
+ },
+ "Dan Winship" : {
+ "emails" : [
+ "danw@gnome.org"
+ ],
+ "nicks" : [
+ "danw"
+ ]
+ },
+ "Dana Jansens" : {
+ "emails" : [
+ "danakj@chromium.org"
+ ],
+ "nicks" : [
+ "danakj"
+ ]
+ },
+ "Daniel Cheng" : {
+ "emails" : [
+ "dcheng@chromium.org"
+ ],
+ "nicks" : [
+ "dcheng"
+ ]
+ },
+ "Dave Barton" : {
+ "emails" : [
+ "dbarton@mathscribe.com"
+ ],
+ "expertise" : "MathML",
+ "nicks" : [
+ "davebarton"
+ ]
+ },
+ "Dave Tharp" : {
+ "emails" : [
+ "dtharp@codeaurora.org"
+ ],
+ "nicks" : [
+ "dtharp"
+ ]
+ },
+ "David Farler" : {
+ "emails" : [
+ "dfarler@apple.com"
+ ],
+ "nicks" : [
+ "dfarler"
+ ]
+ },
+ "David Grogan" : {
+ "emails" : [
+ "dgrogan@chromium.org",
+ "dgrogan@google.com"
+ ],
+ "expertise" : "IndexedDB",
+ "nicks" : [
+ "dgrogan"
+ ]
+ },
+ "David Michael Barr" : {
+ "emails" : [
+ "davidbarr@chromium.org",
+ "davidbarr@google.com",
+ "b@rr-dav.id.au"
+ ],
+ "nicks" : [
+ "barrbrain"
+ ]
+ },
+ "David Smith" : {
+ "emails" : [
+ "catfish.man@gmail.com",
+ "dsmith@webkit.org"
+ ],
+ "nicks" : [
+ "catfishman"
+ ]
+ },
+ "Diego Gonzalez" : {
+ "emails" : [
+ "diegohcg@webkit.org",
+ "diego.gonzalez@openbossa.org"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "diegohcg"
+ ]
+ },
+ "Dinu Jacob" : {
+ "emails" : [
+ "dinu.s.jacob@intel.com"
+ ],
+ "nicks" : [
+ "dsjacob"
+ ]
+ },
+ "Dmitry Gorbik" : {
+ "emails" : [
+ "dgorbik@apple.com"
+ ],
+ "nicks" : [
+ "dgorbik"
+ ]
+ },
+ "Dmitry Lomov" : {
+ "emails" : [
+ "dslomov@google.com",
+ "dslomov@chromium.org"
+ ],
+ "expertise" : "V8 bindings, Workers, gtest ",
+ "nicks" : [
+ "dslomov"
+ ]
+ },
+ "Dominic Cooney" : {
+ "emails" : [
+ "dominicc@chromium.org",
+ "dominicc@google.com"
+ ],
+ "nicks" : [
+ "dominicc"
+ ]
+ },
+ "Dominic Mazzoni" : {
+ "emails" : [
+ "dmazzoni@google.com",
+ "dmazzoni@chromium.org"
+ ],
+ "nicks" : [
+ "dmazzoni"
+ ]
+ },
+ "Dominik R\u00f6ttsches" : {
+ "emails" : [
+ "dominik.rottsches@intel.com",
+ "d-r@roettsches.de"
+ ],
+ "expertise" : "WebKit EFL, Cairo HarfBuzz Support, GraphicsContextCairo",
+ "nicks" : [
+ "drott"
+ ]
+ },
+ "Dongseong Hwang" : {
+ "emails" : [
+ "dongseong.hwang@intel.com",
+ "luxtella@gmail.com",
+ "luxtella@company100.net"
+ ],
+ "expertise" : "Accelerated Compositing, Canvas, CSS Shaders",
+ "nicks" : [
+ "dshwang"
+ ]
+ },
+ "Dongwoo Joshua Im" : {
+ "emails" : [
+ "dw.im@samsung.com",
+ "dwim79@gmail.com"
+ ],
+ "expertise" : "The EFLWebKit Port",
+ "nicks" : [
+ "dwim"
+ ]
+ },
+ "Drew Wilson" : {
+ "emails" : [
+ "atwilson@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Workers, MessagePorts",
+ "nicks" : [
+ "atwilson"
+ ]
+ },
+ "Eli Fidler" : {
+ "emails" : [
+ "efidler@blackberry.com",
+ "efidler@rim.com"
+ ],
+ "nicks" : [
+ "efidler"
+ ]
+ },
+ "Elliot Poger" : {
+ "emails" : [
+ "epoger@chromium.org"
+ ],
+ "expertise" : "Skia",
+ "nicks" : [
+ "epoger"
+ ]
+ },
+ "Eric Roman" : {
+ "emails" : [
+ "eroman@chromium.org"
+ ],
+ "expertise" : "The Chromium Port",
+ "nicks" : [
+ "eroman"
+ ]
+ },
+ "Eric Uhrhane" : {
+ "emails" : [
+ "ericu@chromium.org"
+ ],
+ "nicks" : [
+ "ericu"
+ ]
+ },
+ "Erik Arvidsson" : {
+ "emails" : [
+ "arv@chromium.org"
+ ],
+ "nicks" : [
+ "arv"
+ ]
+ },
+ "Eugene Klyuchnikov" : {
+ "emails" : [
+ "eustas@chromium.org"
+ ],
+ "nicks" : [
+ "eustas"
+ ]
+ },
+ "Evan Martin" : {
+ "emails" : [
+ "evan@chromium.org"
+ ],
+ "nicks" : [
+ "evmar"
+ ]
+ },
+ "Evan Stade" : {
+ "emails" : [
+ "estade@chromium.org"
+ ],
+ "nicks" : [
+ "estade"
+ ]
+ },
+ "Fady Samuel" : {
+ "emails" : [
+ "fsamuel@chromium.org"
+ ],
+ "nicks" : [
+ "fsamuel"
+ ]
+ },
+ "Feng Qian" : {
+ "emails" : [
+ "feng@chromium.org"
+ ]
+ },
+ "Florin Malita" : {
+ "emails" : [
+ "fmalita@chromium.org",
+ "fmalita@google.com"
+ ],
+ "expertise" : "SVG (Scalable Vector Graphics)",
+ "nicks" : [
+ "fmalita"
+ ]
+ },
+ "Fumitoshi Ukai" : {
+ "emails" : [
+ "ukai@chromium.org"
+ ],
+ "expertise" : "WebSockets, The Chromium Port",
+ "nicks" : [
+ "ukai"
+ ]
+ },
+ "Gabor Loki" : {
+ "emails" : [
+ "loki@webkit.org"
+ ],
+ "expertise" : "The QtWebKit Port, ARM JIT, Qt BuildBot",
+ "nicks" : [
+ "loki04"
+ ]
+ },
+ "Gabor Rapcsanyi" : {
+ "emails" : [
+ "rgabor@webkit.org",
+ "rgabor@inf.u-szeged.hu"
+ ],
+ "expertise" : "The QtWebKit Port, Qt BuildBot, Tools",
+ "nicks" : [
+ "rgabor"
+ ]
+ },
+ "Gavin Peters" : {
+ "emails" : [
+ "gavinp@chromium.org",
+ "gavinp@webkit.org",
+ "gavinp@google.com"
+ ],
+ "expertise" : "The Chromium Port, Resource Loading",
+ "nicks" : [
+ "gavinp"
+ ]
+ },
+ "Girish Ramakrishnan" : {
+ "emails" : [
+ "girish@forwardbias.in",
+ "ramakrishnan.girish@gmail.com"
+ ],
+ "expertise" : "The QtWebKit Port, Plug-ins",
+ "nicks" : [
+ "girishr"
+ ]
+ },
+ "Glenn Adams" : {
+ "emails" : [
+ "glenn@skynav.com"
+ ],
+ "expertise" : "CSS, CSSOM, Complex Script Layout, Line Breaking",
+ "nicks" : [
+ "gasubic"
+ ]
+ },
+ "Graham Dennis" : {
+ "emails" : [
+ "Graham.Dennis@gmail.com",
+ "gdennis@webkit.org"
+ ]
+ },
+ "Greg Bolsinga" : {
+ "emails" : [
+ "bolsinga@apple.com"
+ ]
+ },
+ "Gregg Tavares" : {
+ "emails" : [
+ "gman@chromium.org",
+ "gman@google.com"
+ ],
+ "expertise" : "WebGL, CanvasProxy",
+ "nicks" : [
+ "gman"
+ ]
+ },
+ "Grzegorz Czajkowski" : {
+ "emails" : [
+ "g.czajkowski@samsung.com"
+ ],
+ "expertise" : "WebKit-EFL API, Layout Test support",
+ "nicks" : [
+ "grzegorz"
+ ]
+ },
+ "Hans Muller" : {
+ "emails" : [
+ "giles_joplin@yahoo.com",
+ "hmuller@adobe.com"
+ ],
+ "expertise" : "CSS Exclusions",
+ "nicks" : [
+ "hansmuller"
+ ]
+ },
+ "Hans Wennborg" : {
+ "emails" : [
+ "hans@chromium.org"
+ ],
+ "nicks" : [
+ "hwennborg"
+ ]
+ },
+ "Hayato Ito" : {
+ "emails" : [
+ "hayato@chromium.org"
+ ],
+ "expertise" : "Shadow DOM, Event Handling, Reftests",
+ "nicks" : [
+ "hayato"
+ ]
+ },
+ "Helder Correia" : {
+ "emails" : [
+ "helder.correia@nokia.com"
+ ],
+ "expertise" : "The QtWebKit Port, Canvas",
+ "nicks" : [
+ "helder"
+ ]
+ },
+ "Hin-Chung Lam" : {
+ "emails" : [
+ "hclam@google.com",
+ "hclam@chromium.org"
+ ],
+ "expertise" : "HTML5 Video, Accelerated Compositing (Chromium Port)"
+ },
+ "Hironori Bono" : {
+ "emails" : [
+ "hbono@chromium.org"
+ ],
+ "nicks" : [
+ "hbono"
+ ]
+ },
+ "Hugo Parente Lima" : {
+ "emails" : [
+ "hugo.lima@openbossa.org"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "hugopl"
+ ]
+ },
+ "Ian Vollick" : {
+ "emails" : [
+ "vollick@chromium.org"
+ ],
+ "expertise" : "Graphics, Animations",
+ "nicks" : [
+ "vollick"
+ ]
+ },
+ "Igor Trindade Oliveira" : {
+ "emails" : [
+ "igor.oliveira@webkit.org",
+ "igor.o@sisa.samsung.com"
+ ],
+ "expertise" : "Animations, Accelerated Compositing, WebKitEFL",
+ "nicks" : [
+ "igoroliveira"
+ ]
+ },
+ "Ilya Sherman" : {
+ "emails" : [
+ "isherman@chromium.org"
+ ],
+ "nicks" : [
+ "isherman"
+ ]
+ },
+ "Ilya Tikhonovsky" : {
+ "emails" : [
+ "loislo@chromium.org"
+ ],
+ "nicks" : [
+ "loislo"
+ ]
+ },
+ "Ivan Ivan Krsti\u0107" : {
+ "emails" : [
+ "ike@apple.com"
+ ]
+ },
+ "Jacky Jiang" : {
+ "emails" : [
+ "jkjiang@webkit.org",
+ "zkjiang008@gmail.com",
+ "zhajiang@blackberry.com",
+ "zhajiang@rim.com"
+ ],
+ "expertise" : "The BlackBerry Port, Mobile Viewport Handling",
+ "nicks" : [
+ "jkjiang"
+ ]
+ },
+ "Jakob Petsovits" : {
+ "emails" : [
+ "jpetsovits@blackberry.com",
+ "jpetsovits@rim.com",
+ "jpetso@gmx.at"
+ ],
+ "expertise" : "The platform layer, OpenVG graphics backend",
+ "nicks" : [
+ "jpetso"
+ ]
+ },
+ "Jakub Wieczorek" : {
+ "emails" : [
+ "jwieczorek@webkit.org"
+ ],
+ "nicks" : [
+ "fawek"
+ ]
+ },
+ "James Hawkins" : {
+ "emails" : [
+ "jhawkins@chromium.org",
+ "jhawkins@google.com"
+ ],
+ "nicks" : [
+ "jhawkins"
+ ]
+ },
+ "James Kozianski" : {
+ "emails" : [
+ "koz@chromium.org",
+ "koz@google.com"
+ ],
+ "nicks" : [
+ "koz"
+ ]
+ },
+ "James Simonsen" : {
+ "emails" : [
+ "simonjam@chromium.org"
+ ],
+ "nicks" : [
+ "simonjam"
+ ]
+ },
+ "Janos Badics" : {
+ "emails" : [
+ "jbadics@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "dicska"
+ ]
+ },
+ "Jarred Nicholls" : {
+ "emails" : [
+ "jarred@webkit.org",
+ "jarred@sencha.com"
+ ],
+ "nicks" : [
+ "jarrednicholls"
+ ]
+ },
+ "Jason Liu" : {
+ "emails" : [
+ "jason.liu@torchmobile.com.cn",
+ "jasonliuwebkit@gmail.com"
+ ],
+ "nicks" : [
+ "jasonliu"
+ ]
+ },
+ "Jay Civelli" : {
+ "emails" : [
+ "jcivelli@chromium.org"
+ ],
+ "nicks" : [
+ "jcivelli"
+ ]
+ },
+ "Jeff Miller" : {
+ "emails" : [
+ "jeffm@apple.com"
+ ],
+ "nicks" : [
+ "jeffm7"
+ ]
+ },
+ "Jeffrey Pfau" : {
+ "emails" : [
+ "jpfau@apple.com"
+ ],
+ "nicks" : [
+ "jpfau"
+ ]
+ },
+ "Jenn Braithwaite" : {
+ "emails" : [
+ "jennb@chromium.org"
+ ],
+ "nicks" : [
+ "jennb"
+ ]
+ },
+ "Jens Alfke" : {
+ "emails" : [
+ "snej@chromium.org",
+ "jens@apple.com"
+ ]
+ },
+ "Jeremy Moskovich" : {
+ "emails" : [
+ "playmobil@google.com",
+ "jeremy@chromium.org"
+ ],
+ "expertise" : "The Chromium Port on OS X",
+ "nicks" : [
+ "jeremymos"
+ ]
+ },
+ "Jesus Sanchez-Palencia" : {
+ "emails" : [
+ "jesus@webkit.org",
+ "jesus.palencia@openbossa.org"
+ ],
+ "expertise" : "The QtWebKit port",
+ "nicks" : [
+ "jeez_"
+ ]
+ },
+ "Jia Pu" : {
+ "emails" : [
+ "jpu@apple.com"
+ ]
+ },
+ "Joanmarie Diggs" : {
+ "emails" : [
+ "jdiggs@igalia.com"
+ ],
+ "expertise" : "Accessibility, WebKitGTK+",
+ "nicks" : [
+ "joanie"
+ ]
+ },
+ "Joe Thomas" : {
+ "emails" : [
+ "joethomas@motorola.com"
+ ],
+ "nicks" : [
+ "joethomas"
+ ]
+ },
+ "John Abd-El-Malek" : {
+ "emails" : [
+ "jam@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Plug-ins, Workers",
+ "nicks" : [
+ "jam"
+ ]
+ },
+ "John Gregg" : {
+ "emails" : [
+ "johnnyg@google.com",
+ "johnnyg@chromium.org"
+ ],
+ "nicks" : [
+ "johnnyg"
+ ]
+ },
+ "John Knottenbelt" : {
+ "emails" : [
+ "jknotten@chromium.org"
+ ],
+ "nicks" : [
+ "jknotten"
+ ]
+ },
+ "Johnny Ding" : {
+ "emails" : [
+ "jnd@chromium.org",
+ "johnnyding.webkit@gmail.com"
+ ],
+ "nicks" : [
+ "johnnyding"
+ ]
+ },
+ "Jon Lee" : {
+ "emails" : [
+ "jonlee@apple.com"
+ ],
+ "expertise" : "Forms, Notifications",
+ "nicks" : [
+ "jonlee"
+ ]
+ },
+ "Jonathan Dong" : {
+ "emails" : [
+ "jonathan.dong.webkit@gmail.com",
+ "jonathan.dong@torchmobile.com.cn"
+ ],
+ "expertise" : "The BlackBerry Port",
+ "nicks" : [
+ "jondong"
+ ]
+ },
+ "Joone Hur" : {
+ "emails" : [
+ "joone@webkit.org",
+ "joone.hur@intel.com"
+ ],
+ "expertise" : "The WebKitGtk+ port",
+ "nicks" : [
+ "joone"
+ ]
+ },
+ "Joost de Valk" : {
+ "emails" : [
+ "joost@webkit.org",
+ "webkit-dev@joostdevalk.nl"
+ ],
+ "nicks" : [
+ "Altha"
+ ]
+ },
+ "Joshua Bell" : {
+ "emails" : [
+ "jsbell@chromium.org",
+ "jsbell@google.com"
+ ],
+ "nicks" : [
+ "jsbell"
+ ]
+ },
+ "Julie Parent" : {
+ "emails" : [
+ "jparent@google.com",
+ "jparent@chromium.org"
+ ],
+ "expertise" : "HTML Editing",
+ "nicks" : [
+ "jparent"
+ ]
+ },
+ "Jungshik Shin" : {
+ "emails" : [
+ "jshin@chromium.org"
+ ]
+ },
+ "Justin Novosad" : {
+ "emails" : [
+ "junov@google.com",
+ "junov@chromium.org"
+ ],
+ "nicks" : [
+ "junov"
+ ]
+ },
+ "Justin Schuh" : {
+ "emails" : [
+ "jschuh@chromium.org"
+ ],
+ "expertise" : "Security",
+ "nicks" : [
+ "jschuh"
+ ]
+ },
+ "Kangil Han" : {
+ "emails" : [
+ "kangil.han@samsung.com",
+ "kangil.han@gmail.com"
+ ],
+ "expertise" : "The EFLWebKit Port",
+ "nicks" : [
+ "kangil"
+ ]
+ },
+ "Karen Grunberg" : {
+ "emails" : [
+ "kareng@chromium.org"
+ ],
+ "nicks" : [
+ "kareng"
+ ]
+ },
+ "Kalyan Kondapally" : {
+ "emails" : [
+ "kalyan.kondapally@intel.com",
+ "kondapallykalyan@gmail.com"
+ ],
+ "nicks" : [
+ "kalyank"
+ ]
+ },
+ "Kaustubh Atrawalkar" : {
+ "emails" : [
+ "kaustubh@motorola.com"
+ ],
+ "nicks" : [
+ "silverroots"
+ ]
+ },
+ "Keishi Hattori" : {
+ "emails" : [
+ "keishi@webkit.org"
+ ],
+ "expertise" : "Web Inspector",
+ "nicks" : [
+ "keishi"
+ ]
+ },
+ "Kelly Norton" : {
+ "emails" : [
+ "knorton@alum.mit.edu"
+ ]
+ },
+ "Ken Buchanan" : {
+ "emails" : [
+ "kenrb@chromium.org"
+ ],
+ "nicks" : [
+ "kenrb"
+ ]
+ },
+ "Kenichi Ishibashi" : {
+ "emails" : [
+ "bashi@chromium.org"
+ ],
+ "nicks" : [
+ "bashi"
+ ]
+ },
+ "Kenji Imasaki" : {
+ "emails" : [
+ "imasaki@chromium.org"
+ ],
+ "nicks" : [
+ "imasaki"
+ ]
+ },
+ "Kent Hansen" : {
+ "emails" : [
+ "kent.hansen@nokia.com"
+ ],
+ "expertise" : "The QtWebKit Port, JavaScript/ECMAScript",
+ "nicks" : [
+ "khansen"
+ ]
+ },
+ "Kihong Kwon" : {
+ "emails" : [
+ "kihong.kwon@samsung.com"
+ ],
+ "expertise" : "Device APIs(Battery Status, Vibration...), The EFLWebKit Port",
+ "nicks" : [
+ "kihong"
+ ]
+ },
+ "Kim Gr\u00f6nholm" : {
+ "emails" : [
+ "kim.1.gronholm@nokia.com"
+ ]
+ },
+ "Kimmo Kinnunen" : {
+ "emails" : [
+ "kimmo.t.kinnunen@nokia.com",
+ "kimmok@iki.fi",
+ "ktkinnun@webkit.org"
+ ],
+ "nicks" : [
+ "kimmok"
+ ]
+ },
+ "Kinuko Yasuda" : {
+ "emails" : [
+ "kinuko@chromium.org"
+ ],
+ "nicks" : [
+ "kinuko"
+ ]
+ },
+ "Kiran Muppala" : {
+ "emails" : [
+ "cmuppala@apple.com"
+ ],
+ "nicks" : [
+ "kiranm"
+ ]
+ },
+ "Konrad Piascik" : {
+ "emails" : [
+ "kpiascik@blackberry.com",
+ "kpiascik@rim.com"
+ ],
+ "expertise" : "The BlackBerry Port, Web Inspector",
+ "nicks" : [
+ "kpiascik"
+ ]
+ },
+ "Kristof Kosztyo" : {
+ "emails" : [
+ "kkristof@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "kkristof"
+ ]
+ },
+ "Krzysztof Kowalczyk" : {
+ "emails" : [
+ "kkowalczyk@gmail.com"
+ ]
+ },
+ "Kwang Yul Seo" : {
+ "emails" : [
+ "skyul@company100.com",
+ "skyul@company100.net",
+ "kseo@webkit.org"
+ ],
+ "expertise" : "HTML Parsing, Networking, WebKit2",
+ "nicks" : [
+ "kseo"
+ ]
+ },
+ "Lauro Neto" : {
+ "emails" : [
+ "lauro.neto@openbossa.org"
+ ],
+ "nicks" : [
+ "lmoura"
+ ]
+ },
+ "Leandro Gracia Gil" : {
+ "emails" : [
+ "leandrogracia@chromium.org"
+ ],
+ "nicks" : [
+ "leandrogracia"
+ ]
+ },
+ "Leandro Pereira" : {
+ "emails" : [
+ "leandro@profusion.mobi",
+ "leandro@webkit.org"
+ ],
+ "nicks" : [
+ "acidx"
+ ]
+ },
+ "Leo Yang" : {
+ "emails" : [
+ "leoyang@blackberry.com",
+ "leoyang@rim.com",
+ "leoyang@webkit.org",
+ "leoyang.webkit@gmail.com"
+ ],
+ "expertise" : "The BlackBerry Port",
+ "nicks" : [
+ "leoyang"
+ ]
+ },
+ "Li Yin" : {
+ "emails" : [
+ "li.yin@intel.com"
+ ],
+ "expertise" : "WebSocket, WebAudio",
+ "nicks" : [
+ "liyin"
+ ]
+ },
+ "Lucas De Marchi" : {
+ "emails" : [
+ "demarchi@webkit.org",
+ "lucas.demarchi@profusion.mobi"
+ ],
+ "nicks" : [
+ "demarchi"
+ ]
+ },
+ "Lucas Forschler" : {
+ "emails" : [
+ "lforschler@apple.com"
+ ],
+ "nicks" : [
+ "lforschler"
+ ]
+ },
+ "Luciano Wolf" : {
+ "emails" : [
+ "luciano.wolf@openbossa.org"
+ ],
+ "nicks" : [
+ "luck"
+ ]
+ },
+ "Luke Macpherson" : {
+ "emails" : [
+ "macpherson@chromium.org",
+ "macpherson@google.com"
+ ],
+ "nicks" : [
+ "macpherson"
+ ]
+ },
+ "Mads Ager" : {
+ "emails" : [
+ "ager@chromium.org"
+ ],
+ "expertise" : "V8"
+ },
+ "Mahesh Kulkarni" : {
+ "emails" : [
+ "mahesh.kulkarni@nokia.com",
+ "maheshk@webkit.org"
+ ],
+ "expertise" : "The Qt port, Geolocation",
+ "nicks" : [
+ "maheshk"
+ ]
+ },
+ "Marcelo Lira" : {
+ "emails" : [
+ "marcelo.lira@openbossa.org",
+ "setanta@gmail.com"
+ ],
+ "nicks" : [
+ "setanta"
+ ]
+ },
+ "Marcus Voltis Bulach" : {
+ "emails" : [
+ "bulach@chromium.org"
+ ]
+ },
+ "Mario Sanchez Prada" : {
+ "emails" : [
+ "mario@webkit.org",
+ "mario.prada@samsung.com"
+ ],
+ "expertise" : "WebKitGTK+, a11y, Epiphany/WebKit Contributor",
+ "nicks" : [
+ "msanchez"
+ ]
+ },
+ "Mark Lam" : {
+ "emails" : [
+ "mark.lam@apple.com"
+ ],
+ "nicks" : [
+ "mlam"
+ ]
+ },
+ "Mark Pilgrim" : {
+ "emails" : [
+ "pilgrim@chromium.org"
+ ],
+ "nicks" : [
+ "pilgrim_google"
+ ]
+ },
+ "Mary Wu" : {
+ "emails" : [
+ "mawu@blackberry.com",
+ "wwendy2007@gmail.com"
+ ],
+ "nicks" : [
+ "marywu"
+ ]
+ },
+ "Matt Delaney" : {
+ "emails" : [
+ "mdelaney@apple.com"
+ ]
+ },
+ "Matt Falkenhagen" : {
+ "emails" : [
+ "falken@chromium.org"
+ ],
+ "nicks" : [
+ "falken"
+ ]
+ },
+ "Matt Lilek" : {
+ "emails" : [
+ "mlilek@apple.com",
+ "webkit@mattlilek.com",
+ "pewtermoose@webkit.org"
+ ],
+ "nicks" : [
+ "pewtermoose"
+ ]
+ },
+ "Matt Perry" : {
+ "emails" : [
+ "mpcomplete@chromium.org"
+ ]
+ },
+ "Max Vujovic" : {
+ "emails" : [
+ "mvujovic@adobe.com",
+ "maxvujovic@gmail.com"
+ ],
+ "expertise" : "CSS Shaders, CSS Filters",
+ "nicks" : [
+ "mvujovic"
+ ]
+ },
+ "Maxime Britto" : {
+ "emails" : [
+ "maxime.britto@gmail.com",
+ "britto@apple.com"
+ ]
+ },
+ "Maxime Simon" : {
+ "emails" : [
+ "simon.maxime@gmail.com",
+ "maxime.simon@webkit.org"
+ ],
+ "expertise" : "The Haiku Port",
+ "nicks" : [
+ "maxime.simon"
+ ]
+ },
+ "Michael Br\u00fcning" : {
+ "emails" : [
+ "michael.bruning@digia.com",
+ "michaelbruening@gmail.com"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "mibrunin"
+ ]
+ },
+ "Michael Nordman" : {
+ "emails" : [
+ "michaeln@google.com"
+ ],
+ "nicks" : [
+ "michaeln"
+ ]
+ },
+ "Michael Pruett" : {
+ "emails" : [
+ "michael@68k.org"
+ ],
+ "nicks" : [
+ "mpruett"
+ ]
+ },
+ "Michelangelo De Simone" : {
+ "emails" : [
+ "michelangelo@webkit.org"
+ ],
+ "expertise" : "HTML Forms, ValidityState",
+ "nicks" : [
+ "michelangelo"
+ ]
+ },
+ "Mihnea Ovidenie" : {
+ "emails" : [
+ "mihnea@adobe.com"
+ ],
+ "nicks" : [
+ "mihnea"
+ ]
+ },
+ "Mike Belshe" : {
+ "emails" : [
+ "mbelshe@chromium.org",
+ "mike@belshe.com"
+ ]
+ },
+ "Mike Fenton" : {
+ "emails" : [
+ "mifenton@blackberry.com",
+ "mifenton@rim.com",
+ "mike.fenton@torchmobile.com"
+ ],
+ "nicks" : [
+ "mfenton"
+ ]
+ },
+ "Mike Lawther" : {
+ "emails" : [
+ "mikelawther@chromium.org"
+ ],
+ "nicks" : [
+ "mikelawther"
+ ]
+ },
+ "Mike Reed" : {
+ "emails" : [
+ "reed@google.com"
+ ],
+ "nicks" : [
+ "reed"
+ ]
+ },
+ "Mike Thole" : {
+ "emails" : [
+ "mthole@mikethole.com",
+ "mthole@apple.com"
+ ],
+ "expertise" : "The Chromium Port"
+ },
+ "Mike West" : {
+ "emails" : [
+ "mkwst@chromium.org",
+ "mike@mikewest.org"
+ ],
+ "expertise" : "Content Security Policy, Chromium",
+ "nicks" : [
+ "mkwst"
+ ]
+ },
+ "Mikhail Naganov" : {
+ "emails" : [
+ "mnaganov@chromium.org"
+ ]
+ },
+ "Mikhail Pozdnyakov" : {
+ "emails" : [
+ "mikhail.pozdnyakov@intel.com"
+ ],
+ "nicks" : [
+ "MPozdnyakov"
+ ]
+ },
+ "Naoki Takano" : {
+ "emails" : [
+ "honten@chromium.org",
+ "takano.naoki@gmail.com"
+ ],
+ "expertise" : "Forms, Autofill and popup window between WebKit and Chromium port",
+ "nicks" : [
+ "honten"
+ ]
+ },
+ "Nat Duca" : {
+ "emails" : [
+ "nduca@chromium.org",
+ "nduca@google.com"
+ ],
+ "nicks" : [
+ "nduca"
+ ]
+ },
+ "Nayan Kumar K" : {
+ "emails" : [
+ "nayankk@motorola.com",
+ "nayankk@gmail.com"
+ ],
+ "nicks" : [
+ "xc0ffee"
+ ]
+ },
+ "Nima Ghanavatian" : {
+ "emails" : [
+ "nghanavatian@blackberry.com",
+ "nghanavatian@rim.com",
+ "nima.ghanavatian@gmail.com"
+ ],
+ "nicks" : [
+ "nghanavatian"
+ ]
+ },
+ "Noel Gordon" : {
+ "emails" : [
+ "noel.gordon@gmail.com",
+ "noel@chromium.org",
+ "noel@google.com"
+ ],
+ "nicks" : [
+ "noel"
+ ]
+ },
+ "Pablo Flouret" : {
+ "emails" : [
+ "pablof@motorola.com",
+ "pf@parb.es"
+ ],
+ "nicks" : [
+ "pablof"
+ ]
+ },
+ "Pam Greene" : {
+ "emails" : [
+ "pam@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Chromium's Tools and Test Infrastructure",
+ "nicks" : [
+ "pamg"
+ ]
+ },
+ "Patrick Gansterer" : {
+ "emails" : [
+ "paroga@paroga.com",
+ "paroga@webkit.org"
+ ],
+ "expertise" : "CMake build system, The WinCE Port",
+ "nicks" : [
+ "paroga"
+ ]
+ },
+ "Pavel Podivilov" : {
+ "emails" : [
+ "podivilov@chromium.org"
+ ],
+ "nicks" : [
+ "podivilov"
+ ]
+ },
+ "Peter Beverloo" : {
+ "emails" : [
+ "peter@chromium.org",
+ "peter@webkit.org",
+ "beverloo@google.com"
+ ],
+ "nicks" : [
+ "beverloo"
+ ]
+ },
+ "Peter Kasting" : {
+ "emails" : [
+ "pkasting@google.com",
+ "pkasting@chromium.org"
+ ],
+ "expertise" : "Image Decoders, Scrollbars, The Chromium port",
+ "nicks" : [
+ "pkasting"
+ ]
+ },
+ "Peter Varga" : {
+ "emails" : [
+ "pvarga@webkit.org",
+ "pvarga@inf.u-szeged.hu"
+ ],
+ "expertise" : "JavaScriptCore Regular Expressions",
+ "nicks" : [
+ "stampho"
+ ]
+ },
+ "Pierre Rossi" : {
+ "emails" : [
+ "pierre.rossi@gmail.com"
+ ],
+ "nicks" : [
+ "elproxy"
+ ]
+ },
+ "Pierre d'Herbemont" : {
+ "emails" : [
+ "pdherbemont@free.fr",
+ "pdherbemont@apple.com"
+ ],
+ "expertise" : "Media Elements",
+ "nicks" : [
+ "pdherbemont"
+ ]
+ },
+ "Pierre-Olivier Latour" : {
+ "emails" : [
+ "pol@apple.com"
+ ],
+ "nicks" : [
+ "pol"
+ ]
+ },
+ "Pratik Solanki" : {
+ "emails" : [
+ "psolanki@apple.com"
+ ],
+ "nicks" : [
+ "psolanki"
+ ]
+ },
+ "Pravin D" : {
+ "emails" : [
+ "pravind@webkit.org",
+ "pravin.d@samsung.com"
+ ],
+ "nicks" : [
+ "pravind"
+ ]
+ },
+ "Qi Zhang" : {
+ "emails" : [
+ "qi.zhang02180@gmail.com"
+ ],
+ "nicks" : [
+ "qi"
+ ]
+ },
+ "Rafael Antognolli" : {
+ "emails" : [
+ "antognolli@profusion.mobi"
+ ],
+ "nicks" : [
+ "antognolli"
+ ]
+ },
+ "Rafael Brandao" : {
+ "emails" : [
+ "rafael.lobo@webkit.org"
+ ],
+ "nicks" : [
+ "rafaelbrandao"
+ ]
+ },
+ "Rafael Weinstein" : {
+ "emails" : [
+ "rafaelw@chromium.org"
+ ],
+ "nicks" : [
+ "rafaelw"
+ ]
+ },
+ "Raphael Kubo da Costa" : {
+ "emails" : [
+ "rakuco@webkit.org",
+ "rakuco@FreeBSD.org",
+ "raphael.kubo.da.costa@intel.com"
+ ],
+ "expertise" : "CMake build system, The EFLWebKit port",
+ "nicks" : [
+ "rakuco"
+ ]
+ },
+ "Ravi Kasibhatla" : {
+ "emails" : [
+ "ravi.kasibhatla@motorola.com"
+ ],
+ "nicks" : [
+ "kphanee"
+ ]
+ },
+ "Raymond Toy" : {
+ "emails" : [
+ "rtoy@google.com",
+ "rtoy@chromium.org"
+ ],
+ "nicks" : [
+ "rtoy"
+ ]
+ },
+ "Renata Hodovan" : {
+ "emails" : [
+ "reni@webkit.org"
+ ],
+ "nicks" : [
+ "reni"
+ ]
+ },
+ "Robert Hogan" : {
+ "emails" : [
+ "robert@webkit.org",
+ "robert@roberthogan.net",
+ "lists@roberthogan.net"
+ ],
+ "nicks" : [
+ "rhogan"
+ ]
+ },
+ "Robert Kroeger" : {
+ "emails" : [
+ "rjkroege@chromium.org"
+ ],
+ "nicks" : [
+ "rjkroege"
+ ]
+ },
+ "Roger Fong" : {
+ "emails" : [
+ "roger_fong@apple.com"
+ ],
+ "nicks" : [
+ "rfong"
+ ]
+ },
+ "Roland Steiner" : {
+ "emails" : [
+ "rolandsteiner@chromium.org"
+ ]
+ },
+ "Ryuan Choi" : {
+ "emails" : [
+ "ryuan.choi@samsung.com",
+ "ryuan.choi@gmail.com"
+ ],
+ "expertise" : "The EFLWebKit Port",
+ "nicks" : [
+ "ryuan"
+ ]
+ },
+ "Sadrul Habib Chowdhury" : {
+ "emails" : [
+ "sadrul@chromium.org"
+ ],
+ "nicks" : [
+ "sadrul",
+ "sadrulhc"
+ ]
+ },
+ "Sami Ky\u00f6stil\u00e4" : {
+ "emails" : [
+ "skyostil@chromium.org"
+ ],
+ "nicks" : [
+ "skyostil"
+ ]
+ },
+ "Satish Sampath" : {
+ "emails" : [
+ "satish@chromium.org"
+ ]
+ },
+ "Scott Violet" : {
+ "emails" : [
+ "sky@chromium.org"
+ ],
+ "expertise" : "The Chromium Port",
+ "nicks" : [
+ "sky"
+ ]
+ },
+ "Sergio Villar Senin" : {
+ "emails" : [
+ "svillar@igalia.com",
+ "sergio@webkit.org"
+ ],
+ "expertise" : "WebKitGTK+ port, WebKit2",
+ "nicks" : [
+ "svillar"
+ ]
+ },
+ "Shawn Singh" : {
+ "emails" : [
+ "shawnsingh@chromium.org"
+ ],
+ "nicks" : [
+ "shawnsingh"
+ ]
+ },
+ "Shinya Kawanaka" : {
+ "emails" : [
+ "shinyak@chromium.org"
+ ],
+ "nicks" : [
+ "shinyak"
+ ]
+ },
+ "Siddharth Mathur" : {
+ "emails" : [
+ "siddharth.mathur@nokia.com"
+ ],
+ "nicks" : [
+ "simathur"
+ ]
+ },
+ "Silvia Pfeiffer" : {
+ "emails" : [
+ "silviapf@chromium.org"
+ ],
+ "expertise" : "Media elements & controls, track element & WebVTT",
+ "nicks" : [
+ "silvia"
+ ]
+ },
+ "Simon Pena" : {
+ "emails" : [
+ "simon.pena@samsung.com",
+ "spenap@gmail.com",
+ "spena@igalia.com"
+ ],
+ "nicks" : [
+ "spenap"
+ ]
+ },
+ "Steve Lacey" : {
+ "emails" : [
+ "sjl@chromium.org"
+ ],
+ "nicks" : [
+ "stevela"
+ ]
+ },
+ "Sudarsana Nagineni" : {
+ "emails" : [
+ "naginenis@gmail.com",
+ "sudarsana.nagineni@linux.intel.com",
+ "sudarsana.nagineni@intel.com"
+ ],
+ "expertise" : "The EFLWebKit port, Memory Leaks",
+ "nicks" : [
+ "babu"
+ ]
+ },
+ "Szilard Ledan-Muntean" : {
+ "emails" : [
+ "szledan@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "szledan"
+ ]
+ },
+ "Taiju Tsuiki" : {
+ "emails" : [
+ "tzik@chromium.org"
+ ],
+ "nicks" : [
+ "tzik"
+ ]
+ },
+ "Takashi Sakamoto" : {
+ "emails" : [
+ "tasak@google.com"
+ ],
+ "nicks" : [
+ "tasak"
+ ]
+ },
+ "Takashi Toyoshima" : {
+ "emails" : [
+ "toyoshim@chromium.org",
+ "toyoshim+watchlist@chromium.org"
+ ],
+ "expertise" : "WebSocket",
+ "nicks" : [
+ "toyoshim"
+ ]
+ },
+ "Terry Anderson" : {
+ "emails" : [
+ "tdanderson@chromium.org"
+ ],
+ "nicks" : [
+ "tdanderson"
+ ]
+ },
+ "Thiago Marcos P. Santos" : {
+ "emails" : [
+ "tmpsantos@gmail.com",
+ "thiago.santos@intel.com"
+ ],
+ "expertise" : "CSS Device Adaptation, CMake build system, The EFLWebKit port",
+ "nicks" : [
+ "tmpsantos"
+ ]
+ },
+ "Thomas Sepez" : {
+ "emails" : [
+ "tsepez@chromium.org"
+ ],
+ "nicks" : [
+ "tsepez"
+ ]
+ },
+ "Tom Hudson" : {
+ "emails" : [
+ "tomhudson@google.com",
+ "tomhudson@chromium.org"
+ ],
+ "nicks" : [
+ "tomhudson"
+ ]
+ },
+ "Tom Zakrajsek" : {
+ "emails" : [
+ "tomz@codeaurora.org"
+ ],
+ "nicks" : [
+ "tomz"
+ ]
+ },
+ "Tommy Widenflycht" : {
+ "emails" : [
+ "tommyw@google.com"
+ ],
+ "nicks" : [
+ "tommyw"
+ ]
+ },
+ "Trey Matteson" : {
+ "emails" : [
+ "trey@usa.net"
+ ],
+ "nicks" : [
+ "trey"
+ ]
+ },
+ "Tristan O'Tierney" : {
+ "emails" : [
+ "tristan@otierney.net",
+ "tristan@apple.com"
+ ]
+ },
+ "Vangelis Kokkevis" : {
+ "emails" : [
+ "vangelis@chromium.org"
+ ],
+ "nicks" : [
+ "vangelis"
+ ]
+ },
+ "Viatcheslav Ostapenko" : {
+ "emails" : [
+ "ostap73@gmail.com",
+ "sl.ostapenko@samsung.com",
+ "ostapenko.viatcheslav@nokia.com"
+ ],
+ "nicks" : [
+ "ostap"
+ ]
+ },
+ "Victor Carbune" : {
+ "emails" : [
+ "vcarbune@chromium.org",
+ "victor@rosedu.org"
+ ],
+ "expertise" : "HTML5 <Track>",
+ "nicks" : [
+ "vcarbune"
+ ]
+ },
+ "Victor Wang" : {
+ "emails" : [
+ "victorw@chromium.org"
+ ],
+ "nicks" : [
+ "victorw"
+ ]
+ },
+ "Victoria Kirst" : {
+ "emails" : [
+ "vrk@chromium.org",
+ "vrk@google.com"
+ ],
+ "nicks" : [
+ "vrk"
+ ]
+ },
+ "Vincent Scheib" : {
+ "emails" : [
+ "scheib@chromium.org"
+ ],
+ "nicks" : [
+ "scheib"
+ ]
+ },
+ "Vineet Chaudhary" : {
+ "emails" : [
+ "rgf748@motorola.com"
+ ],
+ "nicks" : [
+ "vineetc"
+ ]
+ },
+ "Vitaly Repeshko" : {
+ "emails" : [
+ "vitalyr@chromium.org"
+ ]
+ },
+ "Vivek Galatage" : {
+ "emails" : [
+ "vivekg@webkit.org",
+ "vivek.vg@samsung.com"
+ ],
+ "expertise" : "Web Inspector",
+ "nicks" : [
+ "vivekg"
+ ]
+ },
+ "W. James MacLean" : {
+ "emails" : [
+ "wjmaclean@chromium.org"
+ ],
+ "nicks" : [
+ "seumas"
+ ]
+ },
+ "William Siegrist" : {
+ "emails" : [
+ "wsiegrist@apple.com"
+ ],
+ "expertise" : "webkit.org",
+ "nicks" : [
+ "wms"
+ ]
+ },
+ "Xianzhu Wang" : {
+ "emails" : [
+ "wangxianzhu@chromium.org",
+ "phnixwxz@gmail.com",
+ "wangxianzhu@google.com"
+ ],
+ "nicks" : [
+ "wangxianzhu"
+ ]
+ },
+ "Xiaohai Wei" : {
+ "emails" : [
+ "james.wei@intel.com",
+ "wistoch@chromium.org"
+ ],
+ "expertise" : "WebAudio/ChromiumAndroidx86",
+ "nicks" : [
+ "wistoch"
+ ]
+ },
+ "Xiaomei Ji" : {
+ "emails" : [
+ "xji@chromium.org"
+ ],
+ "nicks" : [
+ "xji"
+ ]
+ },
+ "Xingnan Wang" : {
+ "emails" : [
+ "xingnan.wang@intel.com"
+ ],
+ "nicks" : [
+ "xingnan"
+ ]
+ },
+ "Yaar Schnitman" : {
+ "emails" : [
+ "yaar@chromium.org",
+ "yaar@google.com"
+ ]
+ },
+ "Yael Aharon" : {
+ "emails" : [
+ "yael@webkit.org"
+ ],
+ "nicks" : [
+ "yael"
+ ]
+ },
+ "Yi Shen" : {
+ "emails" : [
+ "max.hong.shen@gmail.com",
+ "yi.shen@sisa.samsung.com",
+ "yi.4.shen@nokia.com"
+ ]
+ },
+ "Yongjun Zhang" : {
+ "emails" : [
+ "yongjun_zhang@apple.com",
+ "yongjun.zhang@nokia.com"
+ ]
+ },
+ "Yoshifumi Inoue" : {
+ "emails" : [
+ "yosin@chromium.org"
+ ],
+ "expertise" : "HTML5 Forms especially for multiple-fields UI, charset encoding, decimal arithmetic",
+ "nicks" : [
+ "yosin"
+ ]
+ },
+ "Yuqiang Xian" : {
+ "emails" : [
+ "yuqiang.xian@intel.com"
+ ],
+ "expertise" : "JavaScriptCore"
+ },
+ "Yuzo Fujishima" : {
+ "emails" : [
+ "yuzo@google.com"
+ ],
+ "nicks" : [
+ "yuzo"
+ ]
+ },
+ "Zalan Bujtas" : {
+ "emails" : [
+ "zalan@apple.com",
+ "zbujtas@gmail.com",
+ "zalan.bujtas@nokia.com"
+ ],
+ "expertise" : "Frame flattening",
+ "nicks" : [
+ "zalan"
+ ]
+ },
+ "Zeno Albisser" : {
+ "emails" : [
+ "zeno@webkit.org",
+ "zeno.albisser@nokia.com",
+ "zeno.albisser@digia.com"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "zalbisser"
+ ]
+ },
+ "Zhenyao Mo" : {
+ "emails" : [
+ "zmo@google.com"
+ ],
+ "nicks" : [
+ "zhenyao"
+ ]
+ },
+ "Zoltan Arvai" : {
+ "emails" : [
+ "zarvai@inf.u-szeged.hu"
+ ],
+ "expertise" : "The QtWebKit Port, QtWebKit Build Environment",
+ "nicks" : [
+ "azbest_hu"
+ ]
+ },
+ "Zoltan Horvath" : {
+ "emails" : [
+ "zoltan@webkit.org",
+ "hzoltan@inf.u-szeged.hu",
+ "horvath.zoltan.6@stud.u-szeged.hu"
+ ],
+ "expertise" : "The QtWebKit Port, Custom Allocation Framework, PerformanceTests - memory measurements",
+ "nicks" : [
+ "zoltan"
+ ]
+ },
+ "\u017dan Dober\u0161ek" : {
+ "emails" : [
+ "zandobersek@gmail.com",
+ "zdobersek@igalia.com"
+ ],
+ "nicks" : [
+ "zdobersek"
+ ]
+ }
+ },
+ "Contributors" : {
+ "Adobe Bug Tracker" : {
+ "emails" : [
+ "WebkitBugTracker@adobe.com"
+ ]
+ },
+ "Aharon Lanin" : {
+ "emails" : [
+ "aharon@google.com"
+ ]
+ },
+ "Alan Cutter" : {
+ "emails" : [
+ "alancutter@chromium.org"
+ ],
+ "nicks" : [
+ "alancutter"
+ ]
+ },
+ "Alan Stearns" : {
+ "emails" : [
+ "stearns@adobe.com"
+ ],
+ "nicks" : [
+ "astearns"
+ ]
+ },
+ "Alejandro Pineiro" : {
+ "emails" : [
+ "apinheiro@igalia.com"
+ ]
+ },
+ "Alexey Marinichev" : {
+ "emails" : [
+ "amarinichev@chromium.org",
+ "amarinichev@google.com"
+ ],
+ "nicks" : [
+ "amarinichev"
+ ]
+ },
+ "Andras Piroska" : {
+ "emails" : [
+ "pandras@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "andris88"
+ ]
+ },
+ "Anne van Kesteren" : {
+ "emails" : [
+ "annevk@annevk.nl"
+ ],
+ "nicks" : [
+ "annevk"
+ ]
+ },
+ "Annie Sullivan" : {
+ "emails" : [
+ "sullivan@chromium.org"
+ ],
+ "nicks" : [
+ "annie"
+ ]
+ },
+ "Anton Obzhirov" : {
+ "emails" : [
+ "a.obzhirov@samsung.com"
+ ],
+ "nicks" : [
+ "aobzhirov"
+ ]
+ },
+ "Anton Vayvod" : {
+ "emails" : [
+ "avayvod@chromium.org"
+ ],
+ "nicks" : [
+ "avayvod"
+ ]
+ },
+ "Aryeh Gregor" : {
+ "emails" : [
+ "ayg@aryeh.name"
+ ],
+ "nicks" : [
+ "AryehGregor"
+ ]
+ },
+ "Balazs Ankes" : {
+ "emails" : [
+ "bank@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "abalazs"
+ ]
+ },
+ "Bem Jones-Bey" : {
+ "emails" : [
+ "bjonesbe@adobe.com"
+ ],
+ "nicks" : [
+ "bemjb"
+ ]
+ },
+ "Brian Salomon" : {
+ "emails" : [
+ "bsalomon@google.com"
+ ]
+ },
+ "Christian Biesinger" : {
+ "emails" : [
+ "cbiesinger@chromium.org"
+ ],
+ "nicks" : [
+ "cbiesinger"
+ ]
+ },
+ "Commit Queue" : {
+ "emails" : [
+ "commit-queue@webkit.org"
+ ]
+ },
+ "Daniel Sievers" : {
+ "emails" : [
+ "sievers@chromium.org"
+ ]
+ },
+ "David Dorwin" : {
+ "emails" : [
+ "ddorwin@chromium.org"
+ ],
+ "nicks" : [
+ "ddorwin"
+ ]
+ },
+ "David Reveman" : {
+ "emails" : [
+ "reveman@chromium.org"
+ ],
+ "nicks" : [
+ "reveman"
+ ]
+ },
+ "Douglas Davidson" : {
+ "emails" : [
+ "ddavidso@apple.com"
+ ]
+ },
+ "Douglas Stockwell" : {
+ "emails" : [
+ "dstockwell@chromium.org"
+ ],
+ "nicks" : [
+ "dstockwell"
+ ]
+ },
+ "Edward O'Connor" : {
+ "emails" : [
+ "eoconnor@apple.com"
+ ],
+ "nicks" : [
+ "hober"
+ ]
+ },
+ "Eric Penner" : {
+ "emails" : [
+ "epenner@chromium.org"
+ ],
+ "nicks" : [
+ "epenner"
+ ]
+ },
+ "Felician Marton" : {
+ "emails" : [
+ "felician@inf.u-szeged.hu",
+ "marton.felician.zoltan@stud.u-szeged.hu"
+ ],
+ "nicks" : [
+ "Felician"
+ ]
+ },
+ "Frédéric Wang" : {
+ "emails" : [
+ "fred.wang@free.fr"
+ ],
+ "nicks" : [
+ "fredw"
+ ]
+ },
+ "Finnur Thorarinsson" : {
+ "emails" : [
+ "finnur@chromium.org",
+ "finnur.webkit@gmail.com"
+ ],
+ "nicks" : [
+ "finnur"
+ ]
+ },
+ "Forms Bugs" : {
+ "emails" : [
+ "forms-bugs@chromium.org"
+ ]
+ },
+ "Gabor Ballabas" : {
+ "emails" : [
+ "gaborb@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "bgabor"
+ ]
+ },
+ "Grace Kloba" : {
+ "emails" : [
+ "klobag@chromium.org"
+ ],
+ "nicks" : [
+ "klobag"
+ ]
+ },
+ "Greg Simon" : {
+ "emails" : [
+ "gregsimon@chromium.org"
+ ],
+ "nicks" : [
+ "gregsimon"
+ ]
+ },
+ "Gwang Yoon Hwang" : {
+ "emails" : [
+ "ryumiel@company100.net",
+ "ryumiel@company100.com"
+ ],
+ "nicks" : [
+ "ryumiel"
+ ]
+ },
+ "Hao Zheng" : {
+ "emails" : [
+ "zhenghao@chromium.org"
+ ]
+ },
+ "Harald Alvestrand" : {
+ "emails" : [
+ "hta@google.com"
+ ],
+ "nicks" : [
+ "hta"
+ ]
+ },
+ "Ian Hickson" : {
+ "emails" : [
+ "ian@hixie.ch"
+ ],
+ "nicks" : [
+ "hixie"
+ ]
+ },
+ "Jae Hyun Park" : {
+ "emails" : [
+ "jae.park@company100.net"
+ ],
+ "nicks" : [
+ "jaepark"
+ ]
+ },
+ "James Craig" : {
+ "emails" : [
+ "james@cookiecrook.com",
+ "jcraig@apple.com"
+ ],
+ "nicks" : [
+ "jcraig"
+ ]
+ },
+ "Jeff Timanus" : {
+ "emails" : [
+ "twiz@chromium.org",
+ "twiz@google.com"
+ ],
+ "nicks" : [
+ "twiz"
+ ]
+ },
+ "Jing Zhao" : {
+ "emails" : [
+ "jingzhao@chromium.org"
+ ]
+ },
+ "John Bates" : {
+ "emails" : [
+ "jbates@google.com",
+ "jbates@chromium.org"
+ ],
+ "nicks" : [
+ "jbates"
+ ]
+ },
+ "John Bauman" : {
+ "emails" : [
+ "jbauman@chromium.org",
+ "jbauman@google.com"
+ ],
+ "nicks" : [
+ "jbauman"
+ ]
+ },
+ "John Mellor" : {
+ "emails" : [
+ "johnme@chromium.org"
+ ],
+ "nicks" : [
+ "johnme"
+ ]
+ },
+ "Jonathan Backer" : {
+ "emails" : [
+ "backer@chromium.org"
+ ],
+ "nicks" : [
+ "backer"
+ ]
+ },
+ "Koji Hara" : {
+ "emails" : [
+ "kojih@chromium.org"
+ ],
+ "nicks" : [
+ "kojih"
+ ]
+ },
+ "Koji Ishii" : {
+ "emails" : [
+ "kojiishi@gmail.com"
+ ]
+ },
+ "Kulanthaivel Palanichamy" : {
+ "emails" : [
+ "kulanthaivel@codeaurora.org"
+ ],
+ "nicks" : [
+ "kvel"
+ ]
+ },
+ "Lia Chen" : {
+ "emails" : [
+ "liachen@rim.com"
+ ]
+ },
+ "Mihai Balan" : {
+ "emails" : [
+ "mibalan@adobe.com"
+ ],
+ "nicks" : [
+ "miChou"
+ ]
+ },
+ "Mihai Maerean" : {
+ "emails" : [
+ "mmaerean@adobe.com"
+ ],
+ "nicks" : [
+ "mmaerean"
+ ]
+ },
+ "Min Qin" : {
+ "emails" : [
+ "qinmin@chromium.org"
+ ]
+ },
+ "Nandor Huszka" : {
+ "emails" : [
+ "hnandor@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "hnandor"
+ ]
+ },
+ "Nils Barth" : {
+ "emails" : [
+ "nbarth@chromium.org"
+ ],
+ "nicks" : [
+ "nbarth"
+ ]
+ },
+ "Oliver Varga" : {
+ "emails" : [
+ "voliver@inf.u-szeged.hu",
+ "Varga.Oliver@stud.u-szeged.hu"
+ ],
+ "nicks" : [
+ "TwistO"
+ ]
+ },
+ "Peter Gal" : {
+ "emails" : [
+ "galpeter@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "elecro"
+ ]
+ },
+ "Peter Linss" : {
+ "emails" : [
+ "peter.linss@hp.com"
+ ],
+ "nicks" : [
+ "plinss"
+ ]
+ },
+ "Radar WebKit Bug Importer" : {
+ "emails" : [
+ "webkit-bug-importer@group.apple.com"
+ ]
+ },
+ "Radu Stavila" : {
+ "emails" : [
+ "stavila@adobe.com"
+ ],
+ "nicks" : [
+ "radustavila"
+ ]
+ },
+ "Raul Hudea" : {
+ "emails" : [
+ "rhudea@adobe.com"
+ ],
+ "nicks" : [
+ "rhudea"
+ ]
+ },
+ "Roland Takacs" : {
+ "emails" : [
+ "rtakacs@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "rtakacs"
+ ]
+ },
+ "Tab Atkins" : {
+ "emails" : [
+ "tabatkins@google.com",
+ "jackalmage@gmail.com"
+ ],
+ "nicks" : [
+ "tabatkins"
+ ]
+ },
+ "Tamas Czene" : {
+ "emails" : [
+ "tczene@inf.u-szeged.hu",
+ "Czene.Tamas@stud.u-szeged.hu"
+ ],
+ "nicks" : [
+ "tczene"
+ ]
+ },
+ "Tien-Ren Chen" : {
+ "emails" : [
+ "trchen@chromium.org"
+ ],
+ "nicks" : [
+ "trchen"
+ ]
+ },
+ "Tim 'mithro' Ansell" : {
+ "emails" : [
+ "mithro@mithis.com"
+ ],
+ "nicks" : [
+ "mithro"
+ ]
+ },
+ "Tim Volodine" : {
+ "emails" : [
+ "timvolodine@chromium.org"
+ ],
+ "nicks" : [
+ "timvolodine"
+ ]
+ },
+ "Web Components Team" : {
+ "emails" : [
+ "webcomponents-bugzilla@chromium.org"
+ ]
+ },
+ "WebKit Review Bot" : {
+ "emails" : [
+ "webkit.review.bot@gmail.com"
+ ],
+ "nicks" : [
+ "sheriff-bot"
+ ]
+ },
+ "Wyatt Carss" : {
+ "emails" : [
+ "wcarss@chromium.org",
+ "wcarss@google.com"
+ ],
+ "nicks" : [
+ "wcarss"
+ ]
+ },
+ "Zeev Lieber" : {
+ "emails" : [
+ "zlieber@chromium.org"
+ ]
+ },
+ "Zsolt Feher" : {
+ "emails" : [
+ "feherzs@inf.u-szeged.hu"
+ ],
+ "nicks" : [
+ "Smith"
+ ]
+ }
+ },
+ "Reviewers" : {
+ "Abhishek Arya" : {
+ "emails" : [
+ "inferno@chromium.org"
+ ],
+ "expertise" : "Security, Layout and Rendering",
+ "nicks" : [
+ "inferno-sec"
+ ]
+ },
+ "Ada Chan" : {
+ "emails" : [
+ "adachan@apple.com"
+ ],
+ "expertise" : "WebKit on Windows",
+ "nicks" : [
+ "chanada"
+ ]
+ },
+ "Adam Barth" : {
+ "emails" : [
+ "abarth@webkit.org"
+ ],
+ "expertise" : "Security, HTML parser, webkit-patch, FrameLoader (sadly), V8 Bindings, The Chromium Port",
+ "nicks" : [
+ "abarth"
+ ]
+ },
+ "Adam Roben" : {
+ "emails" : [
+ "aroben@webkit.org",
+ "aroben@apple.com"
+ ],
+ "expertise" : "Plug-ins and Java (Win, General), WebKit API (Win), Windows build system, General Windows port issues, Developer Tools (Web Inspector), Tools",
+ "nicks" : [
+ "aroben"
+ ]
+ },
+ "Adam Treat" : {
+ "emails" : [
+ "treat@kde.org",
+ "treat@webkit.org"
+ ],
+ "expertise" : "The QtWebKit Port, The HTML Parser/Tokenizer, The platform layer, Image loading and painting, ScrollView and friends",
+ "nicks" : [
+ "manyoso"
+ ]
+ },
+ "Adele Peterson" : {
+ "emails" : [
+ "adele@apple.com"
+ ],
+ "expertise" : "HTML Forms, Security, Layout and Rendering, Web Compatibility (General)",
+ "nicks" : [
+ "adele"
+ ]
+ },
+ "Adrienne Walker" : {
+ "emails" : [
+ "enne@google.com",
+ "enne@chromium.org"
+ ],
+ "nicks" : [
+ "enne"
+ ]
+ },
+ "Alejandro G. Castro" : {
+ "emails" : [
+ "alex@igalia.com",
+ "alex@webkit.org"
+ ],
+ "expertise" : "WebKitGTK+, Cairo graphics backend, ShadowBlur rendering, Epiphany/WebKit Contributor",
+ "nicks" : [
+ "alexg__"
+ ]
+ },
+ "Alexander Pavlov" : {
+ "emails" : [
+ "apavlov@chromium.org",
+ "pavlov81@gmail.com"
+ ],
+ "expertise" : "Developer Tools, Web Inspector, CSS OM",
+ "nicks" : [
+ "apavlov"
+ ]
+ },
+ "Alexandru Chiculita" : {
+ "emails" : [
+ "achicu@adobe.com"
+ ],
+ "expertise" : "CSS Regions, CSS Exclusions, CSS Filters, CSS Custom Filters",
+ "nicks" : [
+ "achicu"
+ ]
+ },
+ "Alexey Proskuryakov" : {
+ "emails" : [
+ "ap@webkit.org",
+ "ap@apple.com"
+ ],
+ "nicks" : [
+ "ap"
+ ]
+ },
+ "Alexis Menard" : {
+ "emails" : [
+ "alexis@webkit.org",
+ "menard@kde.org",
+ "alexis.menard@openbossa.org"
+ ],
+ "expertise" : "The QtWebKit Port, CSS, CSS shorthands, HTML5 Media Elements",
+ "nicks" : [
+ "darktears"
+ ]
+ },
+ "Alice Liu" : {
+ "emails" : [
+ "alice.liu@apple.com"
+ ],
+ "expertise" : "HTML Editing, Memory Use / Leaks, Core DOM, Web Compatibility (Web Apps), Web Compatibility (General), Bug Mastery, Web Accessibility",
+ "nicks" : [
+ "aliu"
+ ]
+ },
+ "Allan Sandfeld Jensen" : {
+ "emails" : [
+ "allan.jensen@digia.com",
+ "kde@carewolf.com",
+ "sandfeld@kde.org",
+ "allan.jensen@nokia.com"
+ ],
+ "expertise" : "QtWebKit, CSS Selectors, Touch Adjustment, Hit Testing",
+ "nicks" : [
+ "carewolf"
+ ]
+ },
+ "Alp Toker" : {
+ "emails" : [
+ "alp@nuanti.com",
+ "alp@atoker.com",
+ "alp@webkit.org"
+ ],
+ "expertise" : "GTK+ WebKit Port, Cairo graphics backend (including canvas, SVG), CURL HTTP backend",
+ "nicks" : [
+ "alp"
+ ]
+ },
+ "Anders Carlsson" : {
+ "emails" : [
+ "andersca@apple.com",
+ "acarlsson@apple.com"
+ ],
+ "expertise" : "Storage, Networking, Core DOM, Plug-ins and Java (Win, General), XML, JavaScript/ECMAScript",
+ "nicks" : [
+ "andersca"
+ ]
+ },
+ "Andreas Kling" : {
+ "emails" : [
+ "akling@apple.com",
+ "kling@webkit.org",
+ "awesomekling@apple.com",
+ "andreas.kling@nokia.com"
+ ],
+ "expertise" : "CSS, HTML DOM, Core DOM, Canvas, JavaScript DOM bindings, Memory use",
+ "nicks" : [
+ "kling"
+ ]
+ },
+ "Andy Estes" : {
+ "emails" : [
+ "aestes@apple.com"
+ ],
+ "expertise" : "Layout and rendering, plug-in loading, HTML parsing, web compatibility",
+ "nicks" : [
+ "estes"
+ ]
+ },
+ "Antonio Gomes" : {
+ "emails" : [
+ "tonikitoo@webkit.org",
+ "a1.gomes@sisa.samsung.com",
+ "antonio.netto@samsung.com",
+ "antonio.gomes@openbossa.org"
+ ],
+ "expertise" : "{BlackBerry, EFL, Qt}WebKit ports, Hit testing, Touch/Event handling, Rendering and scrolling",
+ "nicks" : [
+ "tonikitoo"
+ ]
+ },
+ "Antti Koivisto" : {
+ "emails" : [
+ "koivisto@iki.fi",
+ "antti@apple.com",
+ "antti.j.koivisto@nokia.com"
+ ],
+ "expertise" : "HTML DOM, Core DOM, Loader, Cache, CSS OM, style resolve, performance",
+ "nicks" : [
+ "anttik"
+ ]
+ },
+ "Ariya Hidayat" : {
+ "emails" : [
+ "ariya.hidayat@gmail.com",
+ "ariya@sencha.com",
+ "ariya@webkit.org"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "ariya"
+ ]
+ },
+ "Benjamin Poulain" : {
+ "emails" : [
+ "benjamin@webkit.org",
+ "bpoulain@apple.com",
+ "benjamin.poulain@nokia.com",
+ "ikipou@gmail.com"
+ ],
+ "expertise" : "The Rendering, Performance, Mobile stuff, Touch support.",
+ "nicks" : [
+ "benjaminp"
+ ]
+ },
+ "Beth Dakin" : {
+ "emails" : [
+ "bdakin@apple.com"
+ ],
+ "expertise" : "CSS (Cascading Style Sheets), Layout and Rendering, Resolution-Independence, HTML Parsing, Tables, Web Accessibility",
+ "nicks" : [
+ "dethbakin"
+ ]
+ },
+ "Brady Eidson" : {
+ "emails" : [
+ "beidson@apple.com"
+ ],
+ "expertise" : "Networking, Storage, WebCore icon database, Back/forward cache, History",
+ "nicks" : [
+ "bradee-oh"
+ ]
+ },
+ "Brent Fulgham" : {
+ "emails" : [
+ "bfulgham@webkit.org",
+ "bfulgham@apple.com"
+ ],
+ "expertise" : "The WinCairo Port, WebKit on Windows",
+ "nicks" : [
+ "bfulgham"
+ ]
+ },
+ "Brian Weinstein" : {
+ "emails" : [
+ "bweinstein@apple.com"
+ ],
+ "expertise" : "WebKit on Windows, Tools",
+ "nicks" : [
+ "bweinstein"
+ ]
+ },
+ "Caio Marcelo de Oliveira Filho" : {
+ "emails" : [
+ "cmarcelo@webkit.org",
+ "cmarcelo@gmail.com",
+ "caio.oliveira@openbossa.org"
+ ],
+ "nicks" : [
+ "cmarcelo"
+ ]
+ },
+ "Cameron Zwarich" : {
+ "emails" : [
+ "zwarich@apple.com",
+ "cwzwarich@apple.com",
+ "cwzwarich@webkit.org"
+ ]
+ },
+ "Carlos Garcia Campos" : {
+ "emails" : [
+ "cgarcia@igalia.com",
+ "carlosgc@gnome.org",
+ "carlosgc@webkit.org"
+ ],
+ "expertise" : "The WebKitGTK+ Port, WebKit2, Glib unicode backend, GTK+ contributor, Epiphany contributor",
+ "nicks" : [
+ "KaL"
+ ]
+ },
+ "Chang Shu" : {
+ "emails" : [
+ "cshu@webkit.org",
+ "c.shu@sisa.samsung.com"
+ ],
+ "expertise" : "JavaScript DOM bindings, WebKit2, QtWebKit port",
+ "nicks" : [
+ "cshu"
+ ]
+ },
+ "Chris Blumenberg" : {
+ "emails" : [
+ "cblu@apple.com"
+ ],
+ "nicks" : [
+ "cblu"
+ ]
+ },
+ "Chris Fleizach" : {
+ "emails" : [
+ "cfleizach@apple.com"
+ ],
+ "expertise" : "Accessibility",
+ "nicks" : [
+ "cfleizach"
+ ]
+ },
+ "Chris Jerdonek" : {
+ "emails" : [
+ "cjerdonek@webkit.org"
+ ],
+ "nicks" : [
+ "cjerdonek"
+ ]
+ },
+ "Chris Marrin" : {
+ "emails" : [
+ "cmarrin@apple.com"
+ ],
+ "nicks" : [
+ "cmarrin"
+ ]
+ },
+ "Chris Rogers" : {
+ "emails" : [
+ "crogers@google.com"
+ ],
+ "nicks" : [
+ "crogers"
+ ]
+ },
+ "Christophe Dumez" : {
+ "emails" : [
+ "dchris@gmail.com",
+ "ch.dumez@sisa.samsung.com",
+ "christophe.dumez@intel.com"
+ ],
+ "expertise" : "The EFLWebKit Port, Bindings generator",
+ "nicks" : [
+ "cdumez"
+ ]
+ },
+ "Csaba Osztrogon\u00e1c" : {
+ "emails" : [
+ "ossy@webkit.org"
+ ],
+ "nicks" : [
+ "ossy"
+ ]
+ },
+ "Dan Bernstein" : {
+ "emails" : [
+ "mitz@webkit.org",
+ "mitz@apple.com"
+ ],
+ "expertise" : "Layout and Rendering, Bidirectional text",
+ "nicks" : [
+ "mitzpettel"
+ ]
+ },
+ "Daniel Bates" : {
+ "emails" : [
+ "dbates@webkit.org"
+ ],
+ "expertise" : "XSSAuditor, Drag and Drop, Tools, Perl, svn-apply/unapply",
+ "nicks" : [
+ "dydz"
+ ]
+ },
+ "Darin Adler" : {
+ "emails" : [
+ "darin@apple.com"
+ ],
+ "expertise" : "HTML Forms, WebKit API (Mac, Win), HTML Editing, Performance, JavaScript/ECMAScript, Text Encoding, Core DOM, HTML DOM, Canvas, JavaScript DOM Bindings, ObjC DOM Bindings, Basic types and data structures, Tools, New Features / Standards Support, General (probably a good backup on most topics even if not specifically an expert)",
+ "nicks" : [
+ "darin"
+ ]
+ },
+ "Darin Fisher" : {
+ "emails" : [
+ "fishd@chromium.org",
+ "darin@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, WebKit API (Chromium), Page Loading",
+ "nicks" : [
+ "fishd"
+ ]
+ },
+ "David Harrison" : {
+ "emails" : [
+ "harrison@apple.com"
+ ],
+ "expertise" : "HTML Editing, Accessibility",
+ "nicks" : [
+ "harrison"
+ ]
+ },
+ "David Hyatt" : {
+ "emails" : [
+ "hyatt@apple.com"
+ ],
+ "expertise" : "Layout and Rendering, CSS (Cascading Style Sheets), HTML Forms, Tables, Text Layout, Fonts, MathML, Memory Cache, HTMLDOM, Core DOM, HTML Parsing, New Features / Standards Support, XML, XSLT, Printing",
+ "nicks" : [
+ "dhyatt",
+ "hyatt"
+ ]
+ },
+ "David Kilzer" : {
+ "emails" : [
+ "ddkilzer@webkit.org",
+ "ddkilzer@apple.com"
+ ],
+ "expertise" : "iPhone port, Xcode build system, Tools, Perl, git, WebArchive",
+ "nicks" : [
+ "ddkilzer"
+ ]
+ },
+ "David Levin" : {
+ "emails" : [
+ "levin@chromium.org"
+ ],
+ "nicks" : [
+ "dave_levin"
+ ]
+ },
+ "Dean Jackson" : {
+ "emails" : [
+ "dino@apple.com"
+ ],
+ "expertise" : "Transforms, Transitions, Animations, Filters",
+ "nicks" : [
+ "dino"
+ ]
+ },
+ "Dimitri Glazkov" : {
+ "emails" : [
+ "dglazkov@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Shadow DOM, DOM, HTML Forms, Shadow DOM, Web Components, V8 Bindings, InspectorController, garden-o-matic",
+ "nicks" : [
+ "dglazkov"
+ ]
+ },
+ "Dirk Pranke" : {
+ "emails" : [
+ "dpranke@chromium.org"
+ ],
+ "expertise" : "Build/test infrastructure (stuff under Tools/Scripts)",
+ "nicks" : [
+ "dpranke"
+ ]
+ },
+ "Dirk Schulze" : {
+ "emails" : [
+ "krit@webkit.org"
+ ],
+ "expertise" : "Cairo graphics backend, Canvas, SVG (Scalable Vector Graphics)",
+ "nicks" : [
+ "krit"
+ ]
+ },
+ "Dmitry Titov" : {
+ "emails" : [
+ "dimich@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Workers, Timers, Threading",
+ "nicks" : [
+ "dimich"
+ ]
+ },
+ "Don Melton" : {
+ "emails" : [
+ "gramps@apple.com"
+ ],
+ "nicks" : [
+ "gramps"
+ ]
+ },
+ "Dumitru Daniliuc" : {
+ "emails" : [
+ "dumi@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, WebSQLDatabases",
+ "nicks" : [
+ "dumi"
+ ]
+ },
+ "Elliott Sprehn" : {
+ "emails" : [
+ "esprehn@chromium.org",
+ "esprehn+autocc@chromium.org"
+ ],
+ "expertise" : "Layout and Rendering, V8/JSC Bindings, Generated content, Shadow DOM, Web Compatibility (General)",
+ "nicks" : [
+ "esprehn"
+ ]
+ },
+ "Emil A Eklund" : {
+ "emails" : [
+ "eae@chromium.org"
+ ],
+ "expertise" : "Layout and rendering, Core DOM, HTML DOM",
+ "nicks" : [
+ "eae"
+ ]
+ },
+ "Enrica Casucci" : {
+ "emails" : [
+ "enrica@apple.com"
+ ],
+ "expertise" : "HTML Editing, Drag and drop, Input methods",
+ "nicks" : [
+ "enrica"
+ ]
+ },
+ "Eric Carlson" : {
+ "emails" : [
+ "eric.carlson@apple.com"
+ ],
+ "expertise" : "HTML5 Media Elements",
+ "nicks" : [
+ "eric_carlson"
+ ]
+ },
+ "Eric Seidel" : {
+ "emails" : [
+ "eric@webkit.org"
+ ],
+ "expertise" : "The Rendering Engine, Commit Queue, Memory Leaks, webkit-patch, The Chromium Port",
+ "nicks" : [
+ "eseidel"
+ ]
+ },
+ "Filip Pizlo" : {
+ "emails" : [
+ "fpizlo@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript",
+ "nicks" : [
+ "pizlo"
+ ]
+ },
+ "Gavin Barraclough" : {
+ "emails" : [
+ "barraclough@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript",
+ "nicks" : [
+ "gbarra"
+ ]
+ },
+ "Geoffrey Garen" : {
+ "emails" : [
+ "ggaren@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript, Performance, Memory Use / Leaks, Memory Cache, Core DOM, HTML DOM, JavaScript DOM Bindings, Web Compatibility (General), JavaScriptCore C API, FastMalloc",
+ "nicks" : [
+ "ggaren"
+ ]
+ },
+ "George Staikos" : {
+ "emails" : [
+ "staikos@kde.org",
+ "staikos@webkit.org"
+ ],
+ "expertise" : "Core KHTML Contributor, The QtWebKit Port"
+ },
+ "Gustavo Noronha Silva" : {
+ "emails" : [
+ "gns@gnome.org",
+ "kov@webkit.org",
+ "gustavo.noronha@collabora.co.uk",
+ "gustavo.noronha@collabora.com"
+ ],
+ "expertise" : "WebKitGTK+ API, Soup HTTP backend, Debian Packaging, A little bit of Epiphany",
+ "nicks" : [
+ "kov"
+ ]
+ },
+ "Gyuyoung Kim" : {
+ "emails" : [
+ "gyuyoung.kim@samsung.com",
+ "gyuyoung.kim@webkit.org"
+ ],
+ "expertise" : "The EFLWebKit Port",
+ "nicks" : [
+ "gyuyoung"
+ ]
+ },
+ "Hajime Morrita" : {
+ "emails" : [
+ "morrita@google.com",
+ "morrita@chromium.org"
+ ],
+ "nicks" : [
+ "morrita"
+ ]
+ },
+ "Holger Freyther" : {
+ "emails" : [
+ "zecke@selfish.org",
+ "zecke@webkit.org"
+ ],
+ "expertise" : "The QtWebKit Port, The GTK+ WebKit Port",
+ "nicks" : [
+ "zecke"
+ ]
+ },
+ "James Robinson" : {
+ "emails" : [
+ "jamesr@chromium.org",
+ "jamesr@google.com"
+ ],
+ "expertise" : "Layout, rendering, the Chromium port.",
+ "nicks" : [
+ "jamesr"
+ ]
+ },
+ "Jan Alonzo" : {
+ "emails" : [
+ "jmalonzo@gmail.com",
+ "jmalonzo@webkit.org"
+ ],
+ "expertise" : "The WebKitGtk Port, Autotools Build",
+ "nicks" : [
+ "janm"
+ ]
+ },
+ "Jer Noble" : {
+ "emails" : [
+ "jer.noble@apple.com"
+ ],
+ "nicks" : [
+ "jernoble"
+ ]
+ },
+ "Jeremy Orlow" : {
+ "emails" : [
+ "jorlow@webkit.org",
+ "jorlow@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, DOM Storage (i.e., LocalStorage and SessionStorage)",
+ "nicks" : [
+ "jorlow"
+ ]
+ },
+ "Jessie Berlin" : {
+ "emails" : [
+ "jberlin@webkit.org",
+ "jberlin@apple.com"
+ ],
+ "nicks" : [
+ "jessieberlin"
+ ]
+ },
+ "Jian Li" : {
+ "emails" : [
+ "jianli@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Workers, File API, FormData",
+ "nicks" : [
+ "jianli"
+ ]
+ },
+ "Jocelyn Turcotte" : {
+ "emails" : [
+ "jocelyn.turcotte@digia.com",
+ "jocelyn.turcotte@nokia.com"
+ ],
+ "expertise" : "The QtWebKit port, Tools, Loader, Rendering, Accelerated Compositing",
+ "nicks" : [
+ "jturcotte"
+ ]
+ },
+ "Jochen Eisinger" : {
+ "emails" : [
+ "jochen@chromium.org",
+ "jochen@chromium.or"
+ ],
+ "nicks" : [
+ "jochen__"
+ ]
+ },
+ "John Sullivan" : {
+ "emails" : [
+ "sullivan@apple.com"
+ ],
+ "expertise" : "Safari UI, Printing",
+ "nicks" : [
+ "sullivan"
+ ]
+ },
+ "Jon Honeycutt" : {
+ "emails" : [
+ "jhoneycutt@apple.com"
+ ],
+ "expertise" : "WebKit on Windows, Plug-ins, Windows accessibility",
+ "nicks" : [
+ "jhoneycutt"
+ ]
+ },
+ "Joseph Pecoraro" : {
+ "emails" : [
+ "joepeck@webkit.org",
+ "pecoraro@apple.com"
+ ],
+ "expertise" : "Web Inspector",
+ "nicks" : [
+ "JoePeck"
+ ]
+ },
+ "Julien Chaffraix" : {
+ "emails" : [
+ "jchaffraix@webkit.org",
+ "julien.chaffraix@gmail.com",
+ "jchaffraix@google.com",
+ "jchaffraix@codeaurora.org"
+ ],
+ "expertise" : "Layout and rendering, Tables, XMLHttpRequest",
+ "nicks" : [
+ "jchaffraix"
+ ]
+ },
+ "Justin Garcia" : {
+ "emails" : [
+ "justin.garcia@apple.com"
+ ],
+ "expertise" : "Multipart Mixed Replace, HTML Editing",
+ "nicks" : [
+ "justing"
+ ]
+ },
+ "Ken Kocienda" : {
+ "emails" : [
+ "kocienda@apple.com"
+ ]
+ },
+ "Kenneth Rohde Christiansen" : {
+ "emails" : [
+ "kenneth@webkit.org",
+ "kenneth.r.christiansen@intel.com",
+ "kenneth.christiansen@gmail.com"
+ ],
+ "expertise" : "WebKit/WebKit2 API, The Qt and EFL WebKit Port, Mobile Adaptions, Frame Flattening, Mobile Viewport Handling, Input methods.",
+ "nicks" : [
+ "kenneth_",
+ "kenneth",
+ "kenne"
+ ]
+ },
+ "Kenneth Russell" : {
+ "emails" : [
+ "kbr@google.com",
+ "kbr@chromium.org"
+ ],
+ "expertise" : " WebGL (Chromium and Safari ports), Canvas",
+ "nicks" : [
+ "kbr_google",
+ "kbrgg"
+ ]
+ },
+ "Kent Tamura" : {
+ "emails" : [
+ "tkent@chromium.org",
+ "tkent@google.com"
+ ],
+ "expertise" : "HTML Forms, DumpRenderTree for Chromium, The Chromium Port",
+ "nicks" : [
+ "tkent"
+ ]
+ },
+ "Kentaro Hara" : {
+ "emails" : [
+ "haraken@chromium.org"
+ ],
+ "expertise" : "V8 bindings, JSC bindings, Perl scripts, Garbage collection, DOM lifetime",
+ "nicks" : [
+ "haraken"
+ ]
+ },
+ "Kevin Decker" : {
+ "emails" : [
+ "kdecker@apple.com"
+ ],
+ "expertise" : "Safari UI, Plug-ins and Java (Mac, General), Enterprise Application Compatibility",
+ "nicks" : [
+ "superkevin"
+ ]
+ },
+ "Kevin McCullough" : {
+ "emails" : [
+ "kmccullough@apple.com"
+ ],
+ "expertise" : " JavaScript/ECMAScript, Developer Tools (Web Inspector, JavaScript Profilier), Web Compatibility (Web Apps)",
+ "nicks" : [
+ "maculloch"
+ ]
+ },
+ "Kevin Ollivier" : {
+ "emails" : [
+ "kevino@theolliviers.com",
+ "kevino@webkit.org"
+ ],
+ "expertise" : "The wxWebKit Port, Bakefile build system",
+ "nicks" : [
+ "kollivier"
+ ]
+ },
+ "Lars Knoll" : {
+ "emails" : [
+ "lars@trolltech.com",
+ "lars@kde.org",
+ "lars.knoll@nokia.com"
+ ],
+ "expertise" : "Original author of KHTML which WebKit is based on, The QtWebKit Port, Layout and Rendering, CSS (Cascading Style Sheets), HTML Forms, Tables, HTML DOM, Core DOM, HTML Parsing",
+ "nicks" : [
+ "lars"
+ ]
+ },
+ "Laszlo Gombos" : {
+ "emails" : [
+ "laszlo.gombos@webkit.org",
+ "l.gombos@samsung.com",
+ "laszlo.gombos@gmail.com",
+ "laszlo.1.gombos@nokia.com"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "lgombos"
+ ]
+ },
+ "Levi Weintraub" : {
+ "emails" : [
+ "leviw@chromium.org",
+ "leviw@google.com",
+ "lweintraub@apple.com"
+ ],
+ "expertise" : "Layout (bidi and line layout, sub-pixel positioning), svg, editing",
+ "nicks" : [
+ "leviw"
+ ]
+ },
+ "Luiz Agostini" : {
+ "emails" : [
+ "luiz@webkit.org",
+ "luiz.agostini@openbossa.org"
+ ],
+ "expertise" : "The QtWebKit Port",
+ "nicks" : [
+ "lca"
+ ]
+ },
+ "Maciej Stachowiak" : {
+ "emails" : [
+ "mjs@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript, Performance, Security, Basic types and data structures, FastMalloc, DOM Bindings for JavaScript, Core DOM, HTML DOM, JavaScript DOM Bindings, WebKit API (Mac, Win), HTML Editing, Networking, Tools, New Features / Standards Support, General (probably a good backup on most topics even if not specifically an expert)",
+ "nicks" : [
+ "othermaciej"
+ ]
+ },
+ "Mark Hahnenberg" : {
+ "emails" : [
+ "mhahnenberg@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript",
+ "nicks" : [
+ "mhahnenberg"
+ ]
+ },
+ "Mark Rowe" : {
+ "emails" : [
+ "mrowe@apple.com"
+ ],
+ "expertise" : "Build/Release Engineering, Malloc, FastMalloc",
+ "nicks" : [
+ "bdash"
+ ]
+ },
+ "Martin Robinson" : {
+ "emails" : [
+ "mrobinson@webkit.org",
+ "mrobinson@igalia.com",
+ "martin.james.robinson@gmail.com"
+ ],
+ "expertise" : "The WebKitGTK+ Port, Cairo graphics backend, soup HTTP backend",
+ "nicks" : [
+ "mrobinson"
+ ]
+ },
+ "Michael Saboff" : {
+ "emails" : [
+ "msaboff@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript",
+ "nicks" : [
+ "msaboff"
+ ]
+ },
+ "Mihai Parparita" : {
+ "emails" : [
+ "mihaip@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, Layout tests, History",
+ "nicks" : [
+ "mihaip"
+ ]
+ },
+ "Nate Chapin" : {
+ "emails" : [
+ "japhet@chromium.org"
+ ],
+ "expertise" : "The Chromium Port, V8 Bindings",
+ "nicks" : [
+ "japhet",
+ "natechapin"
+ ]
+ },
+ "Nico Weber" : {
+ "emails" : [
+ "thakis@chromium.org",
+ "thakis@google.com"
+ ],
+ "expertise" : "The Chromium Port, Graphics, Skia, CoreGraphics",
+ "nicks" : [
+ "thakis"
+ ]
+ },
+ "Nikolas Zimmermann" : {
+ "emails" : [
+ "zimmermann@kde.org",
+ "zimmermann@physik.rwth-aachen.de",
+ "zimmermann@webkit.org",
+ "nzimmermann@blackberry.com",
+ "nzimmermann@rim.com"
+ ],
+ "expertise" : "Core KHTML contributor, The QtWebKit Port, Text Layout, JavaScript DOM bindings, Code generation in general, XML, SVG (Scalable Vector Graphics)",
+ "nicks" : [
+ "wildfox"
+ ]
+ },
+ "Noam Rosenthal" : {
+ "emails" : [
+ "noam@webkit.org",
+ "noam.rosenthal@nokia.com"
+ ],
+ "expertise" : "TextureMapper, graphics for the Qt port",
+ "nicks" : [
+ "noamr"
+ ]
+ },
+ "Ojan Vafai" : {
+ "emails" : [
+ "ojan@chromium.org",
+ "ojan.autocc@gmail.com"
+ ],
+ "expertise" : "Selections, Editing, webkit-patch, run-webkit-tests, The Chromium port, HTML Forms, Layout and Rendering, Web Compatibility (General) ",
+ "nicks" : [
+ "ojan"
+ ]
+ },
+ "Oliver Hunt" : {
+ "emails" : [
+ "oliver@apple.com"
+ ],
+ "expertise" : "JavaScript/ECMAScript, FastMalloc",
+ "nicks" : [
+ "olliej"
+ ]
+ },
+ "Pavel Feldman" : {
+ "emails" : [
+ "pfeldman@chromium.org",
+ "pfeldman@google.com"
+ ],
+ "expertise" : "Developer Tools, Web Inspector",
+ "nicks" : [
+ "pfeldman"
+ ]
+ },
+ "Philip Rogers" : {
+ "emails" : [
+ "pdr@google.com",
+ "pdr@chromium.org"
+ ],
+ "expertise" : "SVG (Scalable Vector Graphics)",
+ "nicks" : [
+ "pdr"
+ ]
+ },
+ "Philippe Normand" : {
+ "emails" : [
+ "pnormand@igalia.com",
+ "philn@webkit.org",
+ "philn@igalia.com"
+ ],
+ "expertise" : "WebKitGTK+, Media support (focused on the GStreamer implementation)",
+ "nicks" : [
+ "philn"
+ ]
+ },
+ "Richard Williamson" : {
+ "emails" : [
+ "rjw@apple.com"
+ ],
+ "nicks" : [
+ "rjw"
+ ]
+ },
+ "Rob Buis" : {
+ "emails" : [
+ "rwlbuis@gmail.com",
+ "rwlbuis@webkit.org",
+ "rbuis@blackberry.com",
+ "rbuis@rim.com"
+ ],
+ "expertise" : "KDE contributor, The QtWebKit Port, SVG (Scalable Vector Graphics)",
+ "nicks" : [
+ "rwlbuis"
+ ]
+ },
+ "Ryosuke Niwa" : {
+ "emails" : [
+ "rniwa@webkit.org"
+ ],
+ "expertise" : "HTML Editing, Core DOM, HTML DOM, Event Handling",
+ "nicks" : [
+ "rniwa"
+ ]
+ },
+ "Sam Weinig" : {
+ "emails" : [
+ "sam@webkit.org",
+ "weinig@apple.com"
+ ],
+ "expertise" : "HTML DOM, Core DOM, DOM Bindings (JavaScript, Objective-C and COM), Security, DumpRenderTree",
+ "nicks" : [
+ "weinig"
+ ]
+ },
+ "Shinichiro Hamaji" : {
+ "emails" : [
+ "hamaji@chromium.org"
+ ],
+ "expertise" : "CSS (Cascading Style Sheets), Tools",
+ "nicks" : [
+ "hamaji"
+ ]
+ },
+ "Simon Fraser" : {
+ "emails" : [
+ "simon.fraser@apple.com"
+ ],
+ "expertise" : "Accelerated Compositing, Transitions and Animations, CSS Transforms",
+ "nicks" : [
+ "smfr"
+ ]
+ },
+ "Simon Hausmann" : {
+ "emails" : [
+ "hausmann@webkit.org",
+ "hausmann@kde.org",
+ "simon.hausmann@digia.com"
+ ],
+ "expertise" : "The QtWebKit Port, Former KHTML contributor",
+ "nicks" : [
+ "tronical"
+ ]
+ },
+ "Stephanie Lewis" : {
+ "emails" : [
+ "slewis@apple.com"
+ ],
+ "expertise" : "Performance Testing, Tools",
+ "nicks" : [
+ "sundiamonde"
+ ]
+ },
+ "Stephen Chenney" : {
+ "emails" : [
+ "schenney@chromium.org"
+ ],
+ "expertise" : "SVG (Scalable Vector Graphics)",
+ "nicks" : [
+ "schenney"
+ ]
+ },
+ "Stephen White" : {
+ "emails" : [
+ "senorblanco@chromium.org"
+ ],
+ "expertise" : "Skia port, GPU acceleration",
+ "nicks" : [
+ "senorblanco"
+ ]
+ },
+ "Steve Block" : {
+ "emails" : [
+ "steveblock@chromium.org",
+ "steveblock@google.com"
+ ],
+ "expertise" : "Geolocation, Android Port",
+ "nicks" : [
+ "steveblock"
+ ]
+ },
+ "Steve Falkenburg" : {
+ "emails" : [
+ "sfalken@apple.com"
+ ],
+ "expertise" : "WebKit on Windows",
+ "nicks" : [
+ "sfalken"
+ ]
+ },
+ "Tim Horton" : {
+ "emails" : [
+ "thorton@apple.com",
+ "timothy_horton@apple.com"
+ ],
+ "expertise" : "SVG/Canvas/Graphics, WebKit2",
+ "nicks" : [
+ "thorton"
+ ]
+ },
+ "Tim Omernick" : {
+ "emails" : [
+ "timo@apple.com"
+ ]
+ },
+ "Timothy Hatcher" : {
+ "emails" : [
+ "timothy@apple.com",
+ "timothy@hatcher.name"
+ ],
+ "expertise" : "WebKit API (Mac), WebKit Web Site, Developer Tools (Web Inspector, JavaScript Debugger)",
+ "nicks" : [
+ "xenon"
+ ]
+ },
+ "Tony Chang" : {
+ "emails" : [
+ "tony@chromium.org"
+ ],
+ "expertise" : "Chromium Linux, Editing, Drag and Drop",
+ "nicks" : [
+ "tony^work"
+ ]
+ },
+ "Tony Gentilcore" : {
+ "emails" : [
+ "tonyg@chromium.org"
+ ],
+ "expertise" : "HTML5 parsing, Web Timing",
+ "nicks" : [
+ "tonyg-cr"
+ ]
+ },
+ "Tor Arne Vestb\u00f8" : {
+ "emails" : [
+ "vestbo@webkit.org",
+ "tor.arne.vestbo@nokia.com"
+ ],
+ "expertise" : "The QtWebKit Port, HTML5 Media Elements, Plug-ins, Tools",
+ "nicks" : [
+ "torarne"
+ ]
+ },
+ "Vicki Murley" : {
+ "emails" : [
+ "vicki@apple.com"
+ ]
+ },
+ "Vsevolod Vlasov" : {
+ "emails" : [
+ "vsevik@chromium.org"
+ ],
+ "expertise" : "Developer Tools, Web Inspector",
+ "nicks" : [
+ "vsevik"
+ ]
+ },
+ "Xan Lopez" : {
+ "emails" : [
+ "xan.lopez@gmail.com",
+ "xan@gnome.org",
+ "xan@webkit.org",
+ "xlopez@igalia.com"
+ ],
+ "expertise" : "WebKitGTK+, Soup HTTP Backend, libsoup Contributor, WebKit a11y (focused on the ATK implementation), Epiphany/WebKit maintainer",
+ "nicks" : [
+ "xan"
+ ]
+ },
+ "Yong Li" : {
+ "emails" : [
+ "yong.li.webkit@outlook.com"
+ ],
+ "nicks" : [
+ "yong"
+ ]
+ },
+ "Yury Semikhatsky" : {
+ "emails" : [
+ "yurys@chromium.org"
+ ],
+ "expertise" : "Developer Tools, Web Inspector",
+ "nicks" : [
+ "yurys"
+ ]
+ },
+ "Yuta Kitamura" : {
+ "emails" : [
+ "yutak@chromium.org"
+ ],
+ "expertise" : "WebSocket, The Chromium Port",
+ "nicks" : [
+ "yutak"
+ ]
+ },
+ "Zack Rusin" : {
+ "emails" : [
+ "zack@kde.org"
+ ],
+ "expertise" : "Core KHTML contributor, The QtWebKit Port",
+ "nicks" : [
+ "zackr"
+ ]
+ },
+ "Zoltan Herczeg" : {
+ "emails" : [
+ "zherczeg@webkit.org",
+ "zherczeg@inf.u-szeged.hu"
+ ],
+ "expertise" : "The QtWebKit Port, JIT (ARM), SVG, optimizations (SMP, SIMD), Graphics",
+ "nicks" : [
+ "zherczeg"
+ ]
+ }
+ }
+}
diff --git a/Tools/Scripts/webkitpy/common/config/ews.json b/Tools/Scripts/webkitpy/common/config/ews.json
new file mode 100644
index 000000000..b85cf7ce7
--- /dev/null
+++ b/Tools/Scripts/webkitpy/common/config/ews.json
@@ -0,0 +1,56 @@
+{
+ "GTK EWS": {
+ "port": "gtk",
+ "watchers": [
+ "xan.lopez@gmail.com"
+ ]
+ },
+ "GTK WK2 EWS": {
+ "port": "gtk-wk2",
+ "watchers": [
+ "xan.lopez@gmail.com"
+ ]
+ },
+ "EFL EWS": {
+ "port": "efl",
+ "watchers": [
+ "gyuyoung.kim@webkit.org"
+ ]
+ },
+ "EFL WK2 EWS": {
+ "port": "efl-wk2",
+ "watchers": [
+ "gyuyoung.kim@webkit.org"
+ ]
+ },
+ "Qt EWS": {
+ "port": "qt",
+ "watchers": [
+ "webkit-ews@sed.inf.u-szeged.hu"
+ ]
+ },
+ "Qt WK2 EWS": {
+ "port": "qt-wk2",
+ "watchers": [
+ "webkit-ews@sed.inf.u-szeged.hu"
+ ]
+ },
+ "Win EWS": {
+ "port": "win",
+ "runTests": true
+ },
+ "Mac EWS": {
+ "port": "mac",
+ "watchers": [
+ "rniwa@webkit.org"
+ ],
+ "runTests": true
+ },
+ "Mac WK2 EWS": {
+ "port": "mac-wk2",
+ "watchers": [
+ "rniwa@webkit.org"
+ ],
+ "runTests": true
+ }
+}
diff --git a/Tools/Scripts/webkitpy/common/config/irc.py b/Tools/Scripts/webkitpy/common/config/irc.py
index 950c573ad..8e198c610 100644
--- a/Tools/Scripts/webkitpy/common/config/irc.py
+++ b/Tools/Scripts/webkitpy/common/config/irc.py
@@ -27,5 +27,5 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
server="irc.freenode.net"
-port=6667
+port=6665
channel="#webkit"
diff --git a/Tools/Scripts/webkitpy/common/config/ports.py b/Tools/Scripts/webkitpy/common/config/ports.py
index f6f3db0c8..0c20dae51 100644
--- a/Tools/Scripts/webkitpy/common/config/ports.py
+++ b/Tools/Scripts/webkitpy/common/config/ports.py
@@ -61,14 +61,15 @@ class DeprecatedPort(object):
@staticmethod
def port(port_name):
ports = {
- "chromium": ChromiumPort,
- "chromium-android": ChromiumAndroidPort,
- "chromium-xvfb": ChromiumXVFBPort,
"gtk": GtkPort,
+ "gtk-wk2": GtkWK2Port,
"mac": MacPort,
+ "mac-wk2": MacWK2Port,
"win": WinPort,
"qt": QtPort,
+ "qt-wk2": QtWK2Port,
"efl": EflPort,
+ "efl-wk2": EflWK2Port,
}
default_port = {
"Windows": WinPort,
@@ -116,20 +117,29 @@ class DeprecatedPort(object):
def run_perl_unittests_command(self):
return self.script_shell_command("test-webkitperl")
- def layout_tests_results_path(self):
- return os.path.join(self.results_directory, "full_results.json")
-
- def unit_tests_results_path(self):
- return os.path.join(self.results_directory, "webkit_unit_tests_output.xml")
+ def run_bindings_tests_command(self):
+ return self.script_shell_command("run-bindings-tests")
class MacPort(DeprecatedPort):
port_flag_name = "mac"
+class MacWK2Port(DeprecatedPort):
+ port_flag_name = "mac-wk2"
+
+ def run_webkit_tests_command(self):
+ command = super(MacWK2Port, self).run_webkit_tests_command()
+ command.append("-2")
+ return command
+
+
class WinPort(DeprecatedPort):
port_flag_name = "win"
+ def run_bindings_tests_command(self):
+ return None
+
class GtkPort(DeprecatedPort):
port_flag_name = "gtk"
@@ -138,6 +148,7 @@ class GtkPort(DeprecatedPort):
command = super(GtkPort, self).build_webkit_command(build_style=build_style)
command.append("--gtk")
command.append("--update-gtk")
+ command.append("--no-webkit2")
command.append(super(GtkPort, self).makeArgs())
return command
@@ -147,73 +158,75 @@ class GtkPort(DeprecatedPort):
return command
+class GtkWK2Port(DeprecatedPort):
+ port_flag_name = "gtk-wk2"
+
+ def build_webkit_command(self, build_style=None):
+ command = super(GtkWK2Port, self).build_webkit_command(build_style=build_style)
+ command.append("--gtk")
+ command.append("--update-gtk")
+ command.append("--no-webkit1")
+ command.append(super(GtkWK2Port, self).makeArgs())
+ return command
+
+ def run_webkit_tests_command(self):
+ command = super(GtkWK2Port, self).run_webkit_tests_command()
+ command.append("--gtk")
+ command.append("-2")
+ return command
+
+
class QtPort(DeprecatedPort):
port_flag_name = "qt"
def build_webkit_command(self, build_style=None):
command = super(QtPort, self).build_webkit_command(build_style=build_style)
command.append("--qt")
+ command.append("--no-webkit2")
command.append(super(QtPort, self).makeArgs())
return command
-
-class EflPort(DeprecatedPort):
- port_flag_name = "efl"
-
- def build_webkit_command(self, build_style=None):
- command = super(EflPort, self).build_webkit_command(build_style=build_style)
- command.append("--efl")
- command.append("--update-efl")
- command.append(super(EflPort, self).makeArgs())
+ def run_webkit_tests_command(self):
+ command = super(QtPort, self).run_webkit_tests_command()
+ command.append("--qt")
return command
-class ChromiumPort(DeprecatedPort):
- port_flag_name = "chromium"
-
- def update_webkit_command(self, non_interactive=False):
- command = super(ChromiumPort, self).update_webkit_command(non_interactive=non_interactive)
- command.append("--chromium")
- if non_interactive:
- command.append("--force-update")
- return command
+class QtWK2Port(DeprecatedPort):
+ port_flag_name = "qt-wk2"
def build_webkit_command(self, build_style=None):
- command = super(ChromiumPort, self).build_webkit_command(build_style=build_style)
- command.append("--chromium")
- command.append("--update-chromium")
+ command = super(QtWK2Port, self).build_webkit_command(build_style=build_style)
+ command.append("--qt")
+ command.append(super(QtWK2Port, self).makeArgs())
return command
def run_webkit_tests_command(self):
- # Note: This could be run-webkit-tests now.
- command = self.script_shell_command("new-run-webkit-tests")
- command.append("--chromium")
- command.append("--skip-failing-tests")
+ command = super(QtWK2Port, self).run_webkit_tests_command()
+ command.append("--qt")
+ command.append("-2")
return command
- def run_webkit_unit_tests_command(self):
- return self.script_shell_command("run-chromium-webkit-unit-tests")
-
- def run_javascriptcore_tests_command(self):
- return None
-
-
-class ChromiumAndroidPort(ChromiumPort):
- port_flag_name = "chromium-android"
- def update_webkit_command(self, non_interactive=False):
- command = super(ChromiumAndroidPort, self).update_webkit_command(non_interactive=non_interactive)
- command.append("--chromium-android")
- return command
+class EflPort(DeprecatedPort):
+ port_flag_name = "efl"
def build_webkit_command(self, build_style=None):
- command = super(ChromiumAndroidPort, self).build_webkit_command(build_style=build_style)
- command.append("--chromium-android")
+ command = super(EflPort, self).build_webkit_command(build_style=build_style)
+ command.append("--efl")
+ command.append("--update-efl")
+ command.append("--no-webkit2")
+ command.append(super(EflPort, self).makeArgs())
return command
-class ChromiumXVFBPort(ChromiumPort):
- port_flag_name = "chromium-xvfb"
+class EflWK2Port(DeprecatedPort):
+ port_flag_name = "efl-wk2"
- def run_webkit_tests_command(self):
- return ["xvfb-run"] + super(ChromiumXVFBPort, self).run_webkit_tests_command()
+ def build_webkit_command(self, build_style=None):
+ command = super(EflWK2Port, self).build_webkit_command(build_style=build_style)
+ command.append("--efl")
+ command.append("--update-efl")
+ command.append("--no-webkit1")
+ command.append(super(EflWK2Port, self).makeArgs())
+ return command
diff --git a/Tools/Scripts/webkitpy/common/config/ports_mock.py b/Tools/Scripts/webkitpy/common/config/ports_mock.py
index 1d1431115..779796cd8 100644
--- a/Tools/Scripts/webkitpy/common/config/ports_mock.py
+++ b/Tools/Scripts/webkitpy/common/config/ports_mock.py
@@ -28,17 +28,9 @@
class MockPort(object):
- results_directory = "/mock-results"
-
def name(self):
return "MockPort"
- def layout_tests_results_path(self):
- return "/mock-results/full_results.json"
-
- def unit_tests_results_path(self):
- return "/mock-results/webkit_unit_tests_output.xml"
-
def check_webkit_style_command(self):
return ["mock-check-webkit-style"]
@@ -65,3 +57,6 @@ class MockPort(object):
def run_webkit_tests_command(self):
return ['mock-run-webkit-tests']
+
+ def run_bindings_tests_command(self):
+ return ['mock-run-bindings-tests']
diff --git a/Tools/Scripts/webkitpy/common/config/ports_unittest.py b/Tools/Scripts/webkitpy/common/config/ports_unittest.py
index 58d58d473..daca54a68 100644
--- a/Tools/Scripts/webkitpy/common/config/ports_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/ports_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2009, Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.config.ports import *
@@ -43,34 +42,28 @@ class DeprecatedPortTest(unittest.TestCase):
def test_gtk_port(self):
self.assertEqual(GtkPort().flag(), "--port=gtk")
self.assertEqual(GtkPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--gtk"])
- self.assertEqual(GtkPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--gtk", "--update-gtk", DeprecatedPort().makeArgs()])
- self.assertEqual(GtkPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--gtk", "--update-gtk", DeprecatedPort().makeArgs()])
+ self.assertEqual(GtkPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--gtk", "--update-gtk", "--no-webkit2", DeprecatedPort().makeArgs()])
+ self.assertEqual(GtkPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--gtk", "--update-gtk", "--no-webkit2", DeprecatedPort().makeArgs()])
+
+ def test_gtk_wk2_port(self):
+ self.assertEqual(GtkWK2Port().flag(), "--port=gtk-wk2")
+ self.assertEqual(GtkWK2Port().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--gtk", "-2"])
+ self.assertEqual(GtkWK2Port().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--gtk", "--update-gtk", "--no-webkit1", DeprecatedPort().makeArgs()])
+ self.assertEqual(GtkWK2Port().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--gtk", "--update-gtk", "--no-webkit1", DeprecatedPort().makeArgs()])
def test_efl_port(self):
self.assertEqual(EflPort().flag(), "--port=efl")
- self.assertEqual(EflPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--efl", "--update-efl", DeprecatedPort().makeArgs()])
- self.assertEqual(EflPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--efl", "--update-efl", DeprecatedPort().makeArgs()])
+ self.assertEqual(EflPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--efl", "--update-efl", "--no-webkit2", DeprecatedPort().makeArgs()])
+ self.assertEqual(EflPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--efl", "--update-efl", "--no-webkit2", DeprecatedPort().makeArgs()])
def test_qt_port(self):
self.assertEqual(QtPort().flag(), "--port=qt")
- self.assertEqual(QtPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests"))
- self.assertEqual(QtPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--qt", DeprecatedPort().makeArgs()])
- self.assertEqual(QtPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--qt", DeprecatedPort().makeArgs()])
-
- def test_chromium_port(self):
- self.assertEqual(ChromiumPort().flag(), "--port=chromium")
- self.assertEqual(ChromiumPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("new-run-webkit-tests") + ["--chromium", "--skip-failing-tests"])
- self.assertEqual(ChromiumPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--chromium", "--update-chromium"])
- self.assertEqual(ChromiumPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--chromium", "--update-chromium"])
- self.assertEqual(ChromiumPort().update_webkit_command(), DeprecatedPort().script_shell_command("update-webkit") + ["--chromium"])
-
- def test_chromium_android_port(self):
- self.assertEqual(ChromiumAndroidPort().build_webkit_command(), ChromiumPort().build_webkit_command() + ["--chromium-android"])
- self.assertEqual(ChromiumAndroidPort().update_webkit_command(), ChromiumPort().update_webkit_command() + ["--chromium-android"])
-
- def test_chromium_xvfb_port(self):
- self.assertEqual(ChromiumXVFBPort().run_webkit_tests_command(), ['xvfb-run'] + DeprecatedPort().script_shell_command('new-run-webkit-tests') + ['--chromium', '--skip-failing-tests'])
-
+ self.assertEqual(QtPort().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--qt"])
+ self.assertEqual(QtPort().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--qt", "--no-webkit2", DeprecatedPort().makeArgs()])
+ self.assertEqual(QtPort().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--qt", "--no-webkit2", DeprecatedPort().makeArgs()])
-if __name__ == '__main__':
- unittest.main()
+ def test_qt_wk2_port(self):
+ self.assertEqual(QtWK2Port().flag(), "--port=qt-wk2")
+ self.assertEqual(QtWK2Port().run_webkit_tests_command(), DeprecatedPort().script_shell_command("run-webkit-tests") + ["--qt", "-2"])
+ self.assertEqual(QtWK2Port().build_webkit_command(), DeprecatedPort().script_shell_command("build-webkit") + ["--qt", DeprecatedPort().makeArgs()])
+ self.assertEqual(QtWK2Port().build_webkit_command(build_style="debug"), DeprecatedPort().script_shell_command("build-webkit") + ["--debug", "--qt", DeprecatedPort().makeArgs()])
diff --git a/Tools/Scripts/webkitpy/common/config/urls.py b/Tools/Scripts/webkitpy/common/config/urls.py
index 88ad373a1..311f25061 100644
--- a/Tools/Scripts/webkitpy/common/config/urls.py
+++ b/Tools/Scripts/webkitpy/common/config/urls.py
@@ -37,10 +37,6 @@ def view_revision_url(revision_number):
return "http://trac.webkit.org/changeset/%s" % revision_number
-def chromium_results_zip_url(builder_name):
- return 'http://build.chromium.org/f/chromium/layout_test_results/%s/layout-test-results.zip' % builder_name
-
-chromium_lkgr_url = "http://chromium-status.appspot.com/lkgr"
contribution_guidelines = "http://webkit.org/coding/contributing.html"
bug_server_domain = "webkit.org"
@@ -54,9 +50,6 @@ attachment_url = _bug_server_regex + r"attachment\.cgi\?id=(?P<attachment_id>\d+
direct_attachment_url = r"https?://bug-(?P<bug_id>\d+)-attachments.%s/attachment\.cgi\?id=(?P<attachment_id>\d+)" % bug_server_domain
buildbot_url = "http://build.webkit.org"
-chromium_buildbot_url = "http://build.chromium.org/p/chromium.webkit"
-
-omahaproxy_url = "http://omahaproxy.appspot.com/"
def parse_bug_id(string):
if not string:
diff --git a/Tools/Scripts/webkitpy/common/config/urls_unittest.py b/Tools/Scripts/webkitpy/common/config/urls_unittest.py
index b4bf8978a..c1a082ccb 100644
--- a/Tools/Scripts/webkitpy/common/config/urls_unittest.py
+++ b/Tools/Scripts/webkitpy/common/config/urls_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from .urls import parse_bug_id, parse_attachment_id
@@ -42,12 +42,12 @@ class URLsTest(unittest.TestCase):
self.assertEqual(12345, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?id=12345excludefield=attachmentdata&ctype=xml"))
# Our url parser is super-fragile, but at least we're testing it.
- self.assertEqual(None, parse_bug_id("http://www.webkit.org/b/12345"))
- self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345"))
- self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345&excludefield=attachmentdata"))
- self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=12345"))
- self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&ctype=xml&id=12345"))
- self.assertEqual(None, parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&id=12345&ctype=xml"))
+ self.assertIsNone(parse_bug_id("http://www.webkit.org/b/12345"))
+ self.assertIsNone(parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345"))
+ self.assertIsNone(parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&id=12345&excludefield=attachmentdata"))
+ self.assertIsNone(parse_bug_id("http://bugs.webkit.org/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id=12345"))
+ self.assertIsNone(parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&ctype=xml&id=12345"))
+ self.assertIsNone(parse_bug_id("http://bugs.webkit.org/show_bug.cgi?excludefield=attachmentdata&id=12345&ctype=xml"))
def test_parse_attachment_id(self):
self.assertEqual(12345, parse_attachment_id("https://bugs.webkit.org/attachment.cgi?id=12345&action=review"))
diff --git a/Tools/Scripts/webkitpy/common/config/watchlist b/Tools/Scripts/webkitpy/common/config/watchlist
index 75f709b76..c247c2dd3 100755..100644
--- a/Tools/Scripts/webkitpy/common/config/watchlist
+++ b/Tools/Scripts/webkitpy/common/config/watchlist
@@ -1,5 +1,3 @@
-# -*- mode: Python;-*-
-#
# When editing this file, please run the following command to make sure you
# haven't introduced any syntax errors:
#
@@ -12,17 +10,6 @@
#
{
"DEFINITIONS": {
- "ChromiumGraphics": {
- "filename": r"Source/WebCore/platform/graphics/chromium/",
- },
- "ChromiumPublicApi": {
- "filename": r"Source/WebKit/chromium/public/"
- r"|Source/Platform/chromium/public/"
- r"|Tools/DumpRenderTree/chromium/TestRunner/public",
- },
- "ChromiumTestRunner": {
- "filename": r"Tools/DumpRenderTree/chromium/TestRunner",
- },
"AppleMacPublicApi": {
"filename": r"Source/WebCore/bindings/objc/PublicDOMInterfaces.h"
},
@@ -33,30 +20,22 @@
r"|Source/WebCore/html/shadow/(SliderThumbElement|TextControlInnerElements)\."
r"|Source/WebCore/rendering/Render(FileUploadControl|ListBox|MenuList|Slider|TextControl.*)\."
},
+ "Geolocation": {
+ "filename": r"Source/WebCore/Modules/geolocation/"
+ r"|Source/WebCore/page/GeolocationClient.h"
+ r"|Source/WebCore/bindings/js/JSGeolocationCustom.cpp"
+ r"|Source/WebCore/platform/mock/GeolocationClientMock.(h|cpp)"
+ r"|Source/WebKit2/WebProcess/Geolocation/",
+ },
"GStreamerGraphics": {
"filename": r"Source/WebCore/platform/graphics/gstreamer/",
},
+ "GStreamerAudio": {
+ "filename": r"Source/WebCore/platform/audio/gstreamer/",
+ },
"WebIDL": {
"filename": r"Source/WebCore/(?!inspector)(?!testing).*\.idl"
},
- "ThreadingFiles": {
- "filename": r"Source/JavaScriptCore/wtf/ThreadSpecific\."
- r"|Source/JavaScriptCore/wtf/ThreadSafeRefCounted\."
- r"|Source/JavaScriptCore/wtf/ThreadingPrimitives\."
- r"|Source/JavaScriptCore/wtf/Threading\."
- r"|Source/WebCore/dom/CrossThreadTask\."
- r"|Source/WebCore/platform/CrossThreadCopier\.",
- },
- "ThreadingUsage": {
- # The intention of this regex is to detect places where people are using common threading mechanisms,
- # so that one can look them over for common mistakes. This list is long and likely to get longer over time.
- # Note the negative look-ahead to avoid new mentions of the files (for builds or includes).
- "more": r"(AllowCrossThreadAccess|AtomicallyInitialize|CrossThreadCopier|CrossThreadRefCounted|Mutex|ReadWriteLock|ThreadCondition|ThreadSafeRefCounted|ThreadSpecific"
- r"|createCallbackTask|crossThreadString|deprecatedTurnOffVerifier|threadsafeCopy)(?!\.(h|cpp))",
- },
- "WatchListScript": {
- "filename": r"Tools/Scripts/webkitpy/common/watchlist/",
- },
"webkitpy": {
"filename": r"Tools/Scripts/webkitpy/",
},
@@ -69,27 +48,9 @@
"SVNScripts": {
"filename": r"Tools/Scripts/svn-.*",
},
- "TestFailures": {
- "filename": r"Tools/BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/",
- },
- "SecurityCritical": {
- "more": r"[Ss]ecurityOrigin(?!\.(h|cpp))",
- "less": r"[Ss]ecurityOrigin(?!\.(h|cpp))",
- "filename": r"XSS|[Ss]ecurity",
- },
"XSS": {
"filename": r".*XSS",
},
- "SkiaGraphics": {
- "filename": r"Source/WebCore/platform/graphics/skia/"
- r"|Source/WebCore/platform/graphics/filters/skia/",
- },
- "V8Bindings": {
- "filename": r"Source/WebCore/bindings/v8/",
- },
- "BindingsScripts": {
- "filename": r"Source/WebCore/bindings/scripts/",
- },
"FrameLoader": {
"more": r"FrameLoader\.(cpp|h)",
},
@@ -99,8 +60,17 @@
"Rendering": {
"filename": r"Source/WebCore/rendering/",
},
- "StyleChecker": {
- "filename": r"Tools/Scripts/webkitpy/style/",
+ "RenderLayers": {
+ "filename": r"Source/WebCore/rendering/RenderLayer*",
+ },
+ "GraphicsLayer": {
+ "filename": r"Source/WebCore/platform/graphics/GraphicsLayer*",
+ },
+ "CoreAnimation": {
+ "filename": r"Source/WebCore/platform/graphics/ca/",
+ },
+ "Animation": {
+ "filename": r"Source/WebCore/page/animation/",
},
"GtkWebKit2PublicAPI": {
"filename": r"Source/WebKit2/UIProcess/API/gtk/",
@@ -273,8 +243,10 @@
r"|Source/WebCore/rendering/svg",
},
"WebInspectorAPI": {
- "filename": r"Source/WebCore/inspector/*.json"
- r"|Source/WebCore/inspector/*.idl",
+ "filename": r"Source/WebCore/inspector/InjectedScriptSource.js"
+ r"|Source/WebCore/inspector/.+\.json"
+ r"|Source/WebCore/inspector/.+\.idl"
+ r"|Source/WebCore/page/Console.idl",
},
"WebSocket": {
"filename": r"Source/WebCore/Modules/websockets"
@@ -294,76 +266,131 @@
},
"Harfbuzz": {
"filename": r"Source/WebCore/platform/graphics/harfbuzz",
- }
+ },
+ "PerformanceTests": {
+ "filename": r"PerformanceTests"
+ r"|Tools/Scripts/webkitpy/performance_tests",
+ },
+ "GtkBuildSystem": {
+ "filename": r"configure.ac"
+ r"|.*GNUmakefile.(am|features.am.in)",
+ },
+ "ConsoleUsage": {
+ "more": r"[Aa]ddConsoleMessage|reportException|logExceptionToConsole|addMessage|printErrorMessage"
+ },
+ "ContentSecurityPolicyUsage": {
+ "more": r"[Cc]ontentSecurityPolicy(?!\.(h|cpp))",
+ },
+ "ContentSecurityPolicyFiles": {
+ "filename": r"Source/WebCore/page/(Content|DOM)SecurityPolicy\."
+ r"|LayoutTests/http/tests/security/contentSecurityPolicy"
+ },
+ "RegionsDevelopment": {
+ "filename": r"Source/WebCore/rendering/RenderRegion\.(h|cpp)"
+ r"|Source/WebCore/rendering/RenderFlowThread\.(h|cpp)"
+ r"|Source/WebCore/rendering/FlowThreadController\.(h|cpp)"
+ r"|Source/WebCore/rendering/RenderRegionSet\.(h|cpp)"
+ r"|Source/WebCore/rendering/RenderNamedFlowThread\.(h|cpp)"
+ r"|Source/WebCore/rendering/RenderBoxRegionInfo\.h"
+ r"|Source/WebCore/dom/WebKitNamedFlow\.(h|cpp|idl)"
+ r"|Source/WebCore/dom/(DOM)?NamedFlowCollection\.(h|cpp|idl)"
+ r"|Source/WebCore/css/WebKitCSSRegionRule\.(h|cpp|idl)"
+ r"|LayoutTests/fast/regions",
+ },
+ "RegionsExpectationsMore": {
+ "filename": r"LayoutTests/platform/.*TestExpectations",
+ "more": r"fast/regions/.*\.html",
+ },
+ "RegionsExpectationsLess": {
+ "filename": r"LayoutTests/platform/.*TestExpectations",
+ "less": r"fast/regions/.*\.html",
+ },
+ "RegionsUsage": {
+ "more": r"(RenderRegion|RenderFlowThread|RenderNamedFlowThread)(?!\.(h|cpp))",
+ },
+ "IndexedDB": {
+ "filename": r"Source/WebCore/Modules/indexeddb"
+ r"|Source/WebCore/bindings/.*IDB.*\.(h|cpp)"
+ r"|Source/WebCore/bindings/.*SerializedScriptValue.*\.(h|cpp)"
+ r"|Source/WebCore/platform/leveldb"
+ r"|LayoutTests/storage/indexeddb"
+ r"|LayoutTests/platform/.*/storage/indexeddb",
+ },
+ "BindingsScripts": {
+ "filename": r"Source/WebCore/bindings/scripts/",
+ },
+ "cURLNetwork": {
+ "filename": r"Source/WebCore/platform/network/curl/",
+ },
},
"CC_RULES": {
# Note: All email addresses listed must be registered with bugzilla.
# Specifically, levin@chromium.org and levin+threading@chromium.org are
# two different accounts as far as bugzilla is concerned.
- "Accessibility": [ "cfleizach@apple.com", "dmazzoni@google.com", "apinheiro@igalia.com", "jdiggs@igalia.com" ],
+ "Accessibility": [ "cfleizach@apple.com", "dmazzoni@google.com", "apinheiro@igalia.com", "jdiggs@igalia.com", "aboxhall@chromium.org", "mario@webkit.org" ],
+ "Animation" : [ "simon.fraser@apple.com", "dino@apple.com", "dstockwell@chromium.org" ],
"AppleMacPublicApi": [ "timothy@apple.com" ],
- "Battery": [ "gyuyoung.kim@samsung.com" ],
+ "Battery": [ "gyuyoung.kim@webkit.org", "dchris@gmail.com" ],
+ "BindingsScripts": [ "dchris@gmail.com" ],
"BlackBerry": [ "mifenton@rim.com", "rwlbuis@gmail.com", "tonikitoo@webkit.org" ],
"Cairo": [ "dominik.rottsches@intel.com" ],
- "CMake": [ "rakuco@webkit.org", "gyuyoung.kim@samsung.com" ],
- "CoordinatedGraphics" : [ "noam@webkit.org", "zeno@webkit.org" ],
- "CSS": [ "alexis@webkit.org", "macpherson@chromium.org", "cmarcelo@webkit.org", "ojan@chromium.org"],
- "ChromiumGraphics": [ "jamesr@chromium.org", "cc-bugs@chromium.org" ],
- "ChromiumPublicApi": [ "abarth@webkit.org", "dglazkov@chromium.org", "fishd@chromium.org", "jamesr@chromium.org", "tkent+wkapi@chromium.org" ],
- "ChromiumTestRunner": [ "jochen@chromium.org" ],
- "DOM": [ "ojan@chromium.org" ],
+ "CMake": [ "rakuco@webkit.org", "gyuyoung.kim@webkit.org" ],
+ "CoordinatedGraphics" : [ "noam@webkit.org", "zeno@webkit.org", "cmarcelo@webkit.org", "luiz@webkit.org" ],
+ "ConsoleUsage" : [ "mkwst@chromium.org" ],
+ "ContentSecurityPolicyFiles|ContentSecurityPolicyUsage" : [ "mkwst@chromium.org" ],
+ "CoreAnimation" : [ "simon.fraser@apple.com" ],
+ "CSS": [ "alexis@webkit.org", "macpherson@chromium.org", "esprehn+autocc@chromium.org", "glenn@skynav.com" ],
+ "cURLNetwork": [ "galpeter@inf.u-szeged.hu" ],
+ "DOM": [ "esprehn+autocc@chromium.org", "kangil.han@samsung.com" ],
"DOMAttributes": [ "cmarcelo@webkit.org", ],
- "EFL": [ "rakuco@webkit.org", "gyuyoung.kim@samsung.com" ],
- "EFLWebKit2PlatformSpecific": [ "gyuyoung.kim@samsung.com", "rakuco@webkit.org" ],
- "EFLWebKit2PublicAPI": [ "gyuyoung.kim@samsung.com", "rakuco@webkit.org" ],
+ "EFL": [ "rakuco@webkit.org", "gyuyoung.kim@webkit.org", "dchris@gmail.com" ],
+ "EFLWebKit2PlatformSpecific": [ "gyuyoung.kim@webkit.org", "rakuco@webkit.org", "dchris@gmail.com" ],
+ "EFLWebKit2PublicAPI": [ "gyuyoung.kim@webkit.org", "rakuco@webkit.org", "dchris@gmail.com" ],
"Editing": [ "mifenton@rim.com" ],
- "Filters": [ "dino@apple.com" ],
+ "Filters": [ "dino@apple.com", "kondapallykalyan@gmail.com" ],
"Forms": [ "tkent@chromium.org", "mifenton@rim.com" ],
- "FrameLoader": [ "abarth@webkit.org", "japhet@chromium.org" ],
+ "FrameLoader": [ "japhet@chromium.org" ],
+ "Geolocation": [ "benjamin@webkit.org" ],
+ "GraphicsLayer": [ "simon.fraser@apple.com", "kondapallykalyan@gmail.com" ],
"GStreamerGraphics": [ "alexis@webkit.org", "pnormand@igalia.com", "gns@gnome.org", "mrobinson@webkit.org" ],
+ "GStreamerAudio": [ "pnormand@igalia.com", "dchris@gmail.com" ],
+ "GtkBuildSystem": [ "zandobersek@gmail.com" ],
"GtkWebKit2PublicAPI": [ "cgarcia@igalia.com", "gns@gnome.org", "mrobinson@webkit.org" ],
"Harfbuzz": [ "dominik.rottsches@intel.com" ],
- "HTML": [ "ojan@chromium.org" ],
+ "HTML": [ "esprehn+autocc@chromium.org" ],
+ "IndexedDB": [ "alecflett@chromium.org", "jsbell@chromium.org" ],
"Loader": [ "japhet@chromium.org" ],
- "MathML": [ "dbarton@mathscribe.com" ],
- "Media": [ "feature-media-reviews@chromium.org", "eric.carlson@apple.com" ],
+ "MathML": [ "dbarton@mathscribe.com", "mrobinson@webkit.org", "fred.wang@free.fr" ],
+ "Media": [ "eric.carlson@apple.com", "jer.noble@apple.com", "glenn@skynav.com" ],
"MediaStream": [ "tommyw@google.com", "hta@google.com" ],
- "NetworkInfo": [ "gyuyoung.kim@samsung.com" ],
- "OpenGL" : [ "noam@webkit.org", "dino@apple.com" ],
- "QtBuildSystem" : [ "vestbo@webkit.org", "abecsi@webkit.org" ],
+ "NetworkInfo": [ "gyuyoung.kim@webkit.org", "dchris@gmail.com" ],
+ "OpenGL" : [ "noam@webkit.org", "dino@apple.com", "kondapallykalyan@gmail.com" ],
+ "PerformanceTests": [ "rniwa@webkit.org" ],
+ "QtBuildSystem" : [ "abecsi@webkit.org" ],
"QtGraphics" : [ "noam@webkit.org" ],
"QtWebKit2PlatformSpecific": [ "alexis@webkit.org", "cmarcelo@webkit.org", "abecsi@webkit.org" ],
"QtWebKit2PublicAPI": [ "alexis@webkit.org", "cmarcelo@webkit.org", "abecsi@webkit.org" ],
- "Rendering": [ "eric@webkit.org", "ojan@chromium.org" ],
+ "RegionsDevelopment|RegionsExpectationsMore|RegionsExpectationsLess|RegionsUsage": [ "WebkitBugTracker@adobe.com" ],
+ "Rendering": [ "esprehn+autocc@chromium.org", "glenn@skynav.com", "kondapallykalyan@gmail.com" ],
+ "RenderLayers" : [ "simon.fraser@apple.com", "kondapallykalyan@gmail.com" ],
"SVG": ["schenney@chromium.org", "pdr@google.com", "fmalita@chromium.org", "dominik.rottsches@intel.com" ],
"SVNScripts": [ "dbates@webkit.org" ],
- "ScrollingCoordinator": [ "andersca@apple.com", "jamesr@chromium.org", "tonikitoo@webkit.org" ],
- "SecurityCritical": [ "abarth@webkit.org" ],
- "SkiaGraphics": [ "senorblanco@chromium.org" ],
+ "ScrollingCoordinator": [ "andersca@apple.com", "jamesr@chromium.org", "tonikitoo@webkit.org", "cmarcelo@webkit.org", "luiz@webkit.org" ],
"Selectors": [ "allan.jensen@digia.com" ],
- "SoupNetwork": [ "rakuco@webkit.org", "gns@gnome.org", "mrobinson@webkit.org", "danw@gnome.org" ],
- "StyleChecker": [ "levin@chromium.org", ],
- "TestFailures": [ "abarth@webkit.org", "dglazkov@chromium.org", "ojan@chromium.org" ],
- "TextureMapper" : [ "noam@webkit.org" ],
- "ThreadingFiles|ThreadingUsage": [ "levin+threading@chromium.org", ],
+ "SoupNetwork": [ "rakuco@webkit.org", "gns@gnome.org", "mrobinson@webkit.org", "danw@gnome.org", "dchris@gmail.com" ],
+ "TextureMapper" : [ "noam@webkit.org", "cmarcelo@webkit.org", "luiz@webkit.org", "kondapallykalyan@gmail.com" ],
"TouchAdjustment" : [ "allan.jensen@digia.com" ],
- "V8Bindings|BindingsScripts": [ "abarth@webkit.org", "japhet@chromium.org", "haraken@chromium.org" ],
- "WTF": [ "benjamin@webkit.org", "ojan@chromium.org"],
- "WatchListScript": [ "levin+watchlist@chromium.org", ],
- "WebGL": [ "dino@apple.com" ],
- "WebIDL": [ "abarth@webkit.org", "ojan@chromium.org" ],
- "WebInspectorAPI": [ "timothy@apple.com", "joepeck@webkit.org" ],
+ "WTF": [ "benjamin@webkit.org", "cmarcelo@webkit.org" ],
+ "WebGL": [ "dino@apple.com", "kondapallykalyan@gmail.com" ],
+ "WebIDL": [ "esprehn+autocc@chromium.org", "dchris@gmail.com", "kondapallykalyan@gmail.com" ],
+ "WebInspectorAPI": [ "timothy@apple.com", "joepeck@webkit.org", "graouts@apple.com" ],
"WebKitGTKTranslations": [ "gns@gnome.org", "mrobinson@webkit.org" ],
- "WebSocket": [ "yutak@chromium.org" ],
- "XSS": [ "dbates@webkit.org", "ojan@chromium.org" ],
+ "WebSocket": [ "yutak@chromium.org", "toyoshim+watchlist@chromium.org" ],
+ "XSS": [ "dbates@webkit.org" ],
"webkitperl": [ "dbates@webkit.org" ],
- "webkitpy": [ "abarth@webkit.org", "dpranke@chromium.org" ],
+ "webkitpy": [ "dpranke@chromium.org", "glenn@skynav.com" ],
},
"MESSAGE_RULES": {
- "ChromiumPublicApi": [ "Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, "
- "fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before "
- "submitting, as this patch contains changes to the Chromium public API. "
- "See also https://trac.webkit.org/wiki/ChromiumWebKitAPI." ],
"AppleMacPublicApi": [ "Please wait for approval from timothy@apple.com (or another member "
"of the Apple Safari Team) before submitting "
"because this patch contains changes to the Apple Mac "
diff --git a/Tools/Scripts/webkitpy/common/editdistance_unittest.py b/Tools/Scripts/webkitpy/common/editdistance_unittest.py
index 4ae6441bf..1f67572b4 100644
--- a/Tools/Scripts/webkitpy/common/editdistance_unittest.py
+++ b/Tools/Scripts/webkitpy/common/editdistance_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.editdistance import edit_distance
diff --git a/Tools/Scripts/webkitpy/common/find_files.py b/Tools/Scripts/webkitpy/common/find_files.py
index b65e77f9f..7a10120ef 100644
--- a/Tools/Scripts/webkitpy/common/find_files.py
+++ b/Tools/Scripts/webkitpy/common/find_files.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/common/find_files_unittest.py b/Tools/Scripts/webkitpy/common/find_files_unittest.py
index 641251f0e..4c0a7cdc4 100644
--- a/Tools/Scripts/webkitpy/common/find_files_unittest.py
+++ b/Tools/Scripts/webkitpy/common/find_files_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem import FileSystem
import find_files
@@ -59,7 +59,3 @@ class TestWinNormalize(unittest.TestCase):
if sys.platform != 'win32':
return
self.assert_filesystem_normalizes(FileSystem())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/host.py b/Tools/Scripts/webkitpy/common/host.py
index 7dd5ad024..022c13bf8 100644
--- a/Tools/Scripts/webkitpy/common/host.py
+++ b/Tools/Scripts/webkitpy/common/host.py
@@ -35,10 +35,9 @@ from webkitpy.common.checkout import Checkout
from webkitpy.common.checkout.scm.detection import SCMDetector
from webkitpy.common.memoized import memoized
from webkitpy.common.net import bugzilla, buildbot, web
-from webkitpy.common.net.buildbot.chromiumbuildbot import ChromiumBuildBot
from webkitpy.common.system.systemhost import SystemHost
-from webkitpy.common.watchlist.watchlistloader import WatchListLoader
-from webkitpy.layout_tests.port.factory import PortFactory
+from webkitpy.common.watchlist.watchlistparser import WatchListParser
+from webkitpy.port.factory import PortFactory
_log = logging.getLogger(__name__)
@@ -79,55 +78,7 @@ class Host(SystemHost):
os.environ['LC_MESSAGES'] = 'en_US.UTF-8'
os.environ['LC_ALL'] = ''
- # FIXME: This is a horrible, horrible hack for ChromiumWin and should be removed.
- # Maybe this belongs in SVN in some more generic "find the svn binary" codepath?
- # Or possibly Executive should have a way to emulate shell path-lookups?
- # FIXME: Unclear how to test this, since it currently mutates global state on SVN.
- def _engage_awesome_windows_hacks(self):
- try:
- self.executive.run_command(['svn', 'help'])
- except OSError, e:
- try:
- self.executive.run_command(['svn.bat', 'help'])
- # Chromium Win uses the depot_tools package, which contains a number
- # of development tools, including Python and svn. Instead of using a
- # real svn executable, depot_tools indirects via a batch file, called
- # svn.bat. This batch file allows depot_tools to auto-update the real
- # svn executable, which is contained in a subdirectory.
- #
- # That's all fine and good, except that subprocess.popen can detect
- # the difference between a real svn executable and batch file when we
- # don't provide use shell=True. Rather than use shell=True on Windows,
- # We hack the svn.bat name into the SVN class.
- _log.debug('Engaging svn.bat Windows hack.')
- from webkitpy.common.checkout.scm.svn import SVN
- SVN.executable_name = 'svn.bat'
- except OSError, e:
- _log.debug('Failed to engage svn.bat Windows hack.')
- try:
- self.executive.run_command(['git', 'help'])
- except OSError, e:
- try:
- self.executive.run_command(['git.bat', 'help'])
- # Chromium Win uses the depot_tools package, which contains a number
- # of development tools, including Python and git. Instead of using a
- # real git executable, depot_tools indirects via a batch file, called
- # git.bat. This batch file allows depot_tools to auto-update the real
- # git executable, which is contained in a subdirectory.
- #
- # That's all fine and good, except that subprocess.popen can detect
- # the difference between a real git executable and batch file when we
- # don't provide use shell=True. Rather than use shell=True on Windows,
- # We hack the git.bat name into the SVN class.
- _log.debug('Engaging git.bat Windows hack.')
- from webkitpy.common.checkout.scm.git import Git
- Git.executable_name = 'git.bat'
- except OSError, e:
- _log.debug('Failed to engage git.bat Windows hack.')
-
def initialize_scm(self, patch_directories=None):
- if sys.platform == "win32":
- self._engage_awesome_windows_hacks()
detector = SCMDetector(self.filesystem, self.executive)
self._scm = detector.default_scm(patch_directories)
self._checkout = Checkout(self.scm())
@@ -138,15 +89,12 @@ class Host(SystemHost):
def checkout(self):
return self._checkout
- def buildbot_for_builder_name(self, name):
- if self.port_factory.get_from_builder_name(name).is_chromium():
- return self.chromium_buildbot()
- return self.buildbot
-
- @memoized
- def chromium_buildbot(self):
- return ChromiumBuildBot()
-
@memoized
def watch_list(self):
- return WatchListLoader(self.filesystem).load()
+ config_path = self.filesystem.dirname(self.filesystem.path_to_module('webkitpy.common.config'))
+ watch_list_full_path = self.filesystem.join(config_path, 'watchlist')
+ if not self.filesystem.exists(watch_list_full_path):
+ raise Exception('Watch list file (%s) not found.' % watch_list_full_path)
+
+ watch_list_contents = self.filesystem.read_text_file(watch_list_full_path)
+ return WatchListParser().parse(watch_list_contents)
diff --git a/Tools/Scripts/webkitpy/common/host_mock.py b/Tools/Scripts/webkitpy/common/host_mock.py
index 8b508bf8f..be238463d 100644
--- a/Tools/Scripts/webkitpy/common/host_mock.py
+++ b/Tools/Scripts/webkitpy/common/host_mock.py
@@ -35,15 +35,15 @@ from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.common.watchlist.watchlist_mock import MockWatchList
# New-style ports need to move down into webkitpy.common.
-from webkitpy.layout_tests.port.factory import PortFactory
-from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem
+from webkitpy.port.factory import PortFactory
+from webkitpy.port.test import add_unit_tests_to_mock_filesystem
class MockHost(MockSystemHost):
- def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True):
+ def __init__(self, log_executive=False, executive_throws_when_run=None, initialize_scm_by_default=True, web=None):
MockSystemHost.__init__(self, log_executive, executive_throws_when_run)
add_unit_tests_to_mock_filesystem(self.filesystem)
- self.web = MockWeb()
+ self.web = web or MockWeb()
self._checkout = MockCheckout()
self._scm = None
@@ -53,7 +53,6 @@ class MockHost(MockSystemHost):
self.initialize_scm()
self.bugs = MockBugzilla()
self.buildbot = MockBuildBot()
- self._chromium_buildbot = MockBuildBot()
# Note: We're using a real PortFactory here. Tests which don't wish to depend
# on the list of known ports should override this with a MockPortFactory.
@@ -73,9 +72,6 @@ class MockHost(MockSystemHost):
def checkout(self):
return self._checkout
- def chromium_buildbot(self):
- return self._chromium_buildbot
-
def watch_list(self):
return self._watch_list
diff --git a/Tools/Scripts/webkitpy/common/lru_cache.py b/Tools/Scripts/webkitpy/common/lru_cache.py
index 4178d0f7d..02a3d1c35 100644
--- a/Tools/Scripts/webkitpy/common/lru_cache.py
+++ b/Tools/Scripts/webkitpy/common/lru_cache.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/common/lru_cache_unittest.py b/Tools/Scripts/webkitpy/common/lru_cache_unittest.py
index 44a09e661..96ca2095c 100644
--- a/Tools/Scripts/webkitpy/common/lru_cache_unittest.py
+++ b/Tools/Scripts/webkitpy/common/lru_cache_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -25,7 +24,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import unittest
+import unittest2 as unittest
from webkitpy.common import lru_cache
@@ -92,7 +91,3 @@ class LRUCacheTest(unittest.TestCase):
def test_set_again(self):
self.lru['key_1'] = 'item_4'
self.assertEqual(set(self.lru.items()), set([('key_1', 'item_4'), ('key_3', 'item_3'), ('key_2', 'item_2')]))
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/memoized_unittest.py b/Tools/Scripts/webkitpy/common/memoized_unittest.py
index dd7c793d8..af406dfea 100644
--- a/Tools/Scripts/webkitpy/common/memoized_unittest.py
+++ b/Tools/Scripts/webkitpy/common/memoized_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.memoized import memoized
diff --git a/Tools/Scripts/webkitpy/common/message_pool.py b/Tools/Scripts/webkitpy/common/message_pool.py
index 2e1e85e5c..03056cf64 100644
--- a/Tools/Scripts/webkitpy/common/message_pool.py
+++ b/Tools/Scripts/webkitpy/common/message_pool.py
@@ -184,7 +184,7 @@ class _MessagePool(object):
pass
-class WorkerException(Exception):
+class WorkerException(BaseException):
"""Raised when we receive an unexpected/unknown exception from a worker."""
pass
diff --git a/Tools/Scripts/webkitpy/common/multiprocessing_bootstrap.py b/Tools/Scripts/webkitpy/common/multiprocessing_bootstrap.py
index 11897764e..366c41314 100755..100644
--- a/Tools/Scripts/webkitpy/common/multiprocessing_bootstrap.py
+++ b/Tools/Scripts/webkitpy/common/multiprocessing_bootstrap.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
#
@@ -58,7 +57,8 @@ def run(*parts):
# doesn't need to do it and their process id as reported by
# subprocess.Popen is not jhbuild's.
if '--gtk' in sys.argv[1:] and os.path.exists(os.path.join(script_dir, '..', '..', 'WebKitBuild', 'Dependencies')):
- cmd.insert(1, os.path.join(script_dir, '..', 'gtk', 'run-with-jhbuild'))
+ prefix = [os.path.join(script_dir, '..', 'jhbuild', 'jhbuild-wrapper'), '--gtk', 'run']
+ cmd = prefix + cmd
proc = subprocess.Popen(cmd, env=env)
try:
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
index 4bf8ec61e..70caef330 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
@@ -28,6 +28,8 @@
# (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 re
+
from .attachment import Attachment
@@ -123,3 +125,12 @@ class Bug(object):
return True
return False
+ def commit_revision(self):
+ # Sort the comments in reverse order as we want the latest committed revision.
+ r = re.compile("Committed r(?P<svn_revision>\d+)")
+ for comment in sorted(self.comments(), reverse=True):
+ rev = r.search(comment['text'])
+ if rev:
+ return int(rev.group('svn_revision'))
+
+ return None
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bug_unittest.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bug_unittest.py
index f20c6010c..b90b915a8 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bug_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bug_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from .bug import Bug
@@ -45,3 +45,39 @@ class BugTest(unittest.TestCase):
bugzilla=None)
self.assertTrue(bug.is_in_comments("Message3."))
self.assertFalse(bug.is_in_comments("Message."))
+
+ def test_commit_revision(self):
+ bug = Bug({"comments": []}, bugzilla=None)
+ self.assertEqual(bug.commit_revision(), None)
+
+ bug = Bug({"comments": [
+ {"text": "Comment 1"},
+ {"text": "Comment 2"},
+ ]}, bugzilla=None)
+ self.assertEqual(bug.commit_revision(), None)
+
+ bug = Bug({"comments": [
+ {"text": "Committed r138776: <http://trac.webkit.org/changeset/138776>"},
+ ]}, bugzilla=None)
+ self.assertEqual(bug.commit_revision(), 138776)
+
+ bug = Bug({"comments": [
+ {"text": "(From update of attachment 181269) Clearing flags on attachment: 181269 Committed r138776: <http://trac.webkit.org/changeset/138776>"},
+ ]}, bugzilla=None)
+ self.assertEqual(bug.commit_revision(), 138776)
+
+ bug = Bug({"comments": [
+ {"text": "Comment before"},
+ {"text": "(From update of attachment 181269) Clearing flags on attachment: 181269 Committed r138776: <http://trac.webkit.org/changeset/138776>"},
+ {"text": "Comment after"},
+ ]}, bugzilla=None)
+ self.assertEqual(bug.commit_revision(), 138776)
+
+ bug = Bug({"comments": [
+ {"text": "Comment before"},
+ {"text": "(From update of attachment 181269) Clearing flags on attachment: 181269 Committed r138776: <http://trac.webkit.org/changeset/138776>"},
+ {"text": "Comment Middle"},
+ {"text": "(From update of attachment 181280) Clearing flags on attachment: 181280 Committed r138976: <http://trac.webkit.org/changeset/138976>"},
+ {"text": "Comment After"},
+ ]}, bugzilla=None)
+ self.assertEqual(bug.commit_revision(), 138976)
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
index 957f04dca..bcd41b78e 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla.py
@@ -531,7 +531,7 @@ class Bugzilla(object):
# FIXME: Use enum instead of two booleans
def _commit_queue_flag(self, mark_for_landing, mark_for_commit_queue):
if mark_for_landing:
- user = self.committers.account_by_email(self.username)
+ user = self.committers.contributor_by_email(self.username)
mark_for_commit_queue = True
if not user:
_log.warning("Your Bugzilla login is not listed in committers.py. Uploading with cq? instead of cq+")
@@ -629,7 +629,7 @@ class Bugzilla(object):
# FIXME: There has to be a more concise way to write this method.
def _check_create_bug_response(self, response_html):
- match = re.search("<title>Bug (?P<bug_id>\d+) Submitted</title>",
+ match = re.search("<title>Bug (?P<bug_id>\d+) Submitted[^<]*</title>",
response_html)
if match:
return match.group('bug_id')
@@ -729,18 +729,12 @@ class Bugzilla(object):
attachment_id,
flag_name,
flag_value,
- comment_text=None,
- additional_comment_text=None):
+ comment_text=None):
# FIXME: We need a way to test this function on a live bugzilla
# instance.
self.authenticate()
-
- # FIXME: additional_comment_text seems useless and should be merged into comment-text.
- if additional_comment_text:
- comment_text += "\n\n%s" % additional_comment_text
_log.info(comment_text)
-
self.browser.open(self.attachment_url_for_id(attachment_id, 'edit'))
self.browser.select_form(nr=1)
@@ -817,11 +811,7 @@ class Bugzilla(object):
if not self._has_control(self.browser, "assigned_to"):
_log.warning("""Failed to assign bug to you (can't find assigned_to) control.
-Do you have EditBugs privileges at bugs.webkit.org?
-https://bugs.webkit.org/userprefs.cgi?tab=permissions
-
-If not, you should email webkit-committers@lists.webkit.org or ask in #webkit
-for someone to add EditBugs to your bugs.webkit.org account.""")
+Ignore this message if you don't have EditBugs privileges (https://bugs.webkit.org/userprefs.cgi?tab=permissions)""")
return
if comment_text:
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
index 473a9fa6e..2447ed284 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py
@@ -385,10 +385,9 @@ class MockBugzilla(object):
attachment_id,
flag_name,
flag_value,
- comment_text=None,
- additional_comment_text=None):
- _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s' and additional comment '%s'" % (
- flag_name, flag_value, attachment_id, comment_text, additional_comment_text))
+ comment_text=None):
+ _log.info("MOCK setting flag '%s' to '%s' on attachment '%s' with comment '%s'" % (
+ flag_name, flag_value, attachment_id, comment_text))
def post_comment_to_bug(self, bug_id, comment_text, cc=None):
_log.info("MOCK bug comment: bug_id=%s, cc=%s\n--- Begin comment ---\n%s\n--- End comment ---\n" % (
diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
index 90e4c83fc..7c5a56d06 100644
--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
import datetime
import StringIO
@@ -85,9 +85,9 @@ class BugzillaTest(unittest.TestCase):
def test_url_creation(self):
# FIXME: These would be all better as doctests
bugs = Bugzilla()
- self.assertEqual(None, bugs.bug_url_for_bug_id(None))
- self.assertEqual(None, bugs.short_bug_url_for_bug_id(None))
- self.assertEqual(None, bugs.attachment_url_for_id(None))
+ self.assertIsNone(bugs.bug_url_for_bug_id(None))
+ self.assertIsNone(bugs.short_bug_url_for_bug_id(None))
+ self.assertIsNone(bugs.attachment_url_for_id(None))
def test_parse_bug_id(self):
# Test that we can parse the urls we produce.
@@ -198,7 +198,7 @@ Ignore this bug. Just for testing failure modes of webkit-patch and the commit-
# FIXME: This should move to a central location and be shared by more unit tests.
def _assert_dictionaries_equal(self, actual, expected):
# Make sure we aren't parsing more or less than we expect
- self.assertEqual(sorted(actual.keys()), sorted(expected.keys()))
+ self.assertItemsEqual(actual.keys(), expected.keys())
for key, expected_value in expected.items():
self.assertEqual(actual[key], expected_value, ("Failure for key: %s: Actual='%s' Expected='%s'" % (key, actual[key], expected_value)))
@@ -305,8 +305,7 @@ Ignore this bug. Just for testing failure modes of webkit-patch and the commit-
bugzilla.committers = CommitterList(reviewers=[Reviewer("WebKit Reviewer", "reviewer@webkit.org")],
committers=[Committer("WebKit Committer", "committer@webkit.org")],
- contributors=[Contributor("WebKit Contributor", "contributor@webkit.org")],
- watchers=[])
+ contributors=[Contributor("WebKit Contributor", "contributor@webkit.org")])
def assert_commit_queue_flag(mark_for_landing, mark_for_commit_queue, expected, username=None):
bugzilla.username = username
@@ -337,6 +336,15 @@ Ignore this bug. Just for testing failure modes of webkit-patch and the commit-
assert_commit_queue_flag(mark_for_landing=True, mark_for_commit_queue=False, expected='+', username='reviewer@webkit.org')
assert_commit_queue_flag(mark_for_landing=True, mark_for_commit_queue=True, expected='+', username='reviewer@webkit.org')
+ def test__check_create_bug_response(self):
+ bugzilla = Bugzilla()
+
+ title_html_bugzilla_323 = "<title>Bug 101640 Submitted</title>"
+ self.assertEqual(bugzilla._check_create_bug_response(title_html_bugzilla_323), '101640')
+
+ title_html_bugzilla_425 = "<title>Bug 101640 Submitted &ndash; Testing webkit-patch again</title>"
+ self.assertEqual(bugzilla._check_create_bug_response(title_html_bugzilla_425), '101640')
+
class BugzillaQueriesTest(unittest.TestCase):
_sample_request_page = """
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
index d6804d5b7..495159630 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot.py
@@ -85,10 +85,6 @@ class Builder(object):
def fetch_layout_test_results(self, results_url):
# FIXME: This should cache that the result was a 404 and stop hitting the network.
results_file = NetworkTransaction(convert_404_to_None=True).run(lambda: self._fetch_file_from_results(results_url, "full_results.json"))
- if not results_file:
- results_file = NetworkTransaction(convert_404_to_None=True).run(lambda: self._fetch_file_from_results(results_url, "results.html"))
-
- # results_from_string accepts either ORWT html or NRWT json.
return LayoutTestResults.results_from_string(results_file)
def url_encoded_name(self):
@@ -135,7 +131,7 @@ class Builder(object):
return form.find_control("username")
except Exception, e:
return False
- # ignore false positives for missing Browser methods - pylint: disable-msg=E1102
+ # ignore false positives for missing Browser methods - pylint: disable=E1102
self._browser.open(self.url())
self._browser.select_form(predicate=predicate)
self._browser["username"] = username
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
index 547a8e6ff..26b7b9799 100644
--- a/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/buildbot/buildbot_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.common.net.buildbot import BuildBot, Builder, Build
@@ -71,14 +71,14 @@ class BuilderTest(unittest.TestCase):
self.assertEqual(regression_window.failing_build().revision(), 1004)
regression_window = self.builder.find_regression_window(self.builder.build(10), look_back_limit=2)
- self.assertEqual(regression_window.build_before_failure(), None)
+ self.assertIsNone(regression_window.build_before_failure())
self.assertEqual(regression_window.failing_build().revision(), 1008)
def test_none_build(self):
self.builder._fetch_build = lambda build_number: None
regression_window = self.builder.find_regression_window(self.builder.build(10))
- self.assertEqual(regression_window.build_before_failure(), None)
- self.assertEqual(regression_window.failing_build(), None)
+ self.assertIsNone(regression_window.build_before_failure())
+ self.assertIsNone(regression_window.failing_build())
def test_flaky_tests(self):
self._install_fetch_build(lambda build_number: ["test1"] if build_number % 2 else ["test2"])
@@ -106,12 +106,12 @@ class BuilderTest(unittest.TestCase):
def test_find_blameworthy_regression_window(self):
self.assertEqual(self.builder.find_blameworthy_regression_window(10).revisions(), [1004])
- self.assertEqual(self.builder.find_blameworthy_regression_window(10, look_back_limit=2), None)
+ self.assertIsNone(self.builder.find_blameworthy_regression_window(10, look_back_limit=2))
# Flakey test avoidance requires at least 2 red builds:
- self.assertEqual(self.builder.find_blameworthy_regression_window(4), None)
+ self.assertIsNone(self.builder.find_blameworthy_regression_window(4))
self.assertEqual(self.builder.find_blameworthy_regression_window(4, avoid_flakey_tests=False).revisions(), [1004])
# Green builder:
- self.assertEqual(self.builder.find_blameworthy_regression_window(3), None)
+ self.assertIsNone(self.builder.find_blameworthy_regression_window(3))
def test_build_caching(self):
self.assertEqual(self.builder.build(10), self.builder.build(10))
@@ -148,7 +148,7 @@ class BuilderTest(unittest.TestCase):
}
return build_dictionary
buildbot._fetch_build_dictionary = mock_fetch_build_dictionary
- self.assertNotEqual(builder._fetch_build(1), None)
+ self.assertIsNotNone(builder._fetch_build(1))
class BuildTest(unittest.TestCase):
@@ -158,7 +158,7 @@ class BuildTest(unittest.TestCase):
builder._fetch_file_from_results = lambda results_url, file_name: None
build = Build(builder, None, None, None)
# Test that layout_test_results() returns None if the fetch fails.
- self.assertEqual(build.layout_test_results(), None)
+ self.assertIsNone(build.layout_test_results())
class BuildBotTest(unittest.TestCase):
@@ -263,16 +263,16 @@ class BuildBotTest(unittest.TestCase):
self.assertEqual(build.url(), "http://build.webkit.org/builders/Test%20Builder/builds/10")
self.assertEqual(build.results_url(), "http://build.webkit.org/results/Test%20Builder/r20%20%2810%29")
self.assertEqual(build.revision(), 20)
- self.assertEqual(build.is_green(), True)
+ self.assertTrue(build.is_green())
build = build.previous_build()
self.assertEqual(build.builder(), builder)
self.assertEqual(build.url(), "http://build.webkit.org/builders/Test%20Builder/builds/9")
self.assertEqual(build.results_url(), "http://build.webkit.org/results/Test%20Builder/r18%20%289%29")
self.assertEqual(build.revision(), 18)
- self.assertEqual(build.is_green(), False)
+ self.assertFalse(build.is_green())
- self.assertEqual(builder.build(None), None)
+ self.assertIsNone(builder.build(None))
_example_directory_listing = '''
<h1>Directory listing for /results/SnowLeopard Intel Leaks/</h1>
@@ -473,7 +473,3 @@ class BuildBotTest(unittest.TestCase):
b = Build(None, 123, 123, False)
b.results_url = self.results_url
self.assertEqual("some-url.zip", b.results_zip_url())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py b/Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py
deleted file mode 100644
index 5030bba48..000000000
--- a/Tools/Scripts/webkitpy/common/net/buildbot/chromiumbuildbot.py
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright (c) 2011, 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 webkitpy.common.config.urls as config_urls
-from webkitpy.common.net.buildbot.buildbot import Builder, BuildBot
-# FIXME: builders should probably be in webkitpy.common.config.
-from webkitpy.layout_tests.port.builders import builder_path_from_name
-
-
-class ChromiumBuilder(Builder):
- # The build.chromium.org builders store their results in a different
- # location than the build.webkit.org builders.
- def results_url(self):
- return "http://build.chromium.org/f/chromium/layout_test_results/%s" % builder_path_from_name(self._name)
-
- def accumulated_results_url(self):
- return self.results_url() + "/results/layout-test-results"
-
-
-class ChromiumBuildBot(BuildBot):
- _builder_factory = ChromiumBuilder
- _default_url = config_urls.chromium_buildbot_url
diff --git a/Tools/Scripts/webkitpy/common/net/credentials_unittest.py b/Tools/Scripts/webkitpy/common/net/credentials_unittest.py
index 3659d69d1..beafa5880 100644
--- a/Tools/Scripts/webkitpy/common/net/credentials_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/credentials_unittest.py
@@ -28,7 +28,7 @@
import os
import tempfile
-import unittest
+import unittest2 as unittest
from webkitpy.common.net.credentials import Credentials
from webkitpy.common.system.executive import Executive
from webkitpy.common.system.outputcapture import OutputCapture
@@ -92,7 +92,7 @@ password: "SECRETSAUCE"
def _is_mac_os_x(self):
return False
credentials = FakeCredentials("bugs.webkit.org")
- self.assertEqual(credentials._is_mac_os_x(), False)
+ self.assertFalse(credentials._is_mac_os_x())
self.assertEqual(credentials._credentials_from_keychain("foo"), ["foo", None])
def test_security_output_parse(self):
@@ -109,7 +109,7 @@ password: "SECRETSAUCE"
# by the test case CredentialsTest._assert_security_call (below).
outputCapture = OutputCapture()
outputCapture.capture_output()
- self.assertEqual(credentials._run_security_tool(), None)
+ self.assertIsNone(credentials._run_security_tool())
outputCapture.restore_output()
def _assert_security_call(self, username=None):
@@ -206,7 +206,3 @@ password: "SECRETSAUCE"
# FIXME: Using read_credentials here seems too broad as higher-priority
# credential source could be affected by the user's environment.
self.assertEqual(credentials.read_credentials(FakeUser), ("test@webkit.org", "NOMNOMNOM"))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py b/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py
index bd41032cb..0bede97e6 100644
--- a/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/failuremap_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.buildbot import Build
from webkitpy.common.net.failuremap import *
diff --git a/Tools/Scripts/webkitpy/common/net/file_uploader.py b/Tools/Scripts/webkitpy/common/net/file_uploader.py
index 9b220b0d6..871295b11 100644
--- a/Tools/Scripts/webkitpy/common/net/file_uploader.py
+++ b/Tools/Scripts/webkitpy/common/net/file_uploader.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py b/Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py
index bce9d855d..639979a02 100644
--- a/Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/irc/ircproxy_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.irc.ircproxy import IRCProxy
from webkitpy.common.system.outputcapture import OutputCapture
diff --git a/Tools/Scripts/webkitpy/common/net/layouttestresults.py b/Tools/Scripts/webkitpy/common/net/layouttestresults.py
index 74322c757..b8cb15769 100644
--- a/Tools/Scripts/webkitpy/common/net/layouttestresults.py
+++ b/Tools/Scripts/webkitpy/common/net/layouttestresults.py
@@ -25,9 +25,6 @@
# 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 module for parsing results.html files generated by old-run-webkit-tests
-# This class is one big hack and only needs to exist until we transition to new-run-webkit-tests.
import logging
@@ -45,88 +42,6 @@ def path_for_layout_test(test_name):
return "LayoutTests/%s" % test_name
-class ORWTResultsHTMLParser(object):
- """This class knows how to parse old-run-webkit-tests results.html files."""
-
- stderr_key = u'Tests that had stderr output:'
- fail_key = u'Tests where results did not match expected results:'
- timeout_key = u'Tests that timed out:'
- # FIXME: This may need to be made aware of WebKitTestRunner results for WebKit2.
- crash_key = u'Tests that caused the DumpRenderTree tool to crash:'
- missing_key = u'Tests that had no expected results (probably new):'
- webprocess_crash_key = u'Tests that caused the Web process to crash:'
-
- expected_keys = [
- stderr_key,
- fail_key,
- crash_key,
- webprocess_crash_key,
- timeout_key,
- missing_key,
- ]
-
- @classmethod
- def _failures_from_fail_row(self, row):
- # Look at all anchors in this row, and guess what type
- # of new-run-webkit-test failures they equate to.
- failures = set()
- test_name = None
- for anchor in row.findAll("a"):
- anchor_text = unicode(anchor.string)
- if not test_name:
- test_name = anchor_text
- continue
- if anchor_text in ["expected image", "image diffs"] or '%' in anchor_text:
- failures.add(test_failures.FailureImageHashMismatch())
- elif anchor_text in ["expected", "actual", "diff", "pretty diff"]:
- failures.add(test_failures.FailureTextMismatch())
- else:
- _log.warning("Unhandled link text in results.html parsing: %s. Please file a bug against webkitpy." % anchor_text)
- # FIXME: Its possible the row contained no links due to ORWT brokeness.
- # We should probably assume some type of failure anyway.
- return failures
-
- @classmethod
- def _failures_from_row(cls, row, table_title):
- if table_title == cls.fail_key:
- return cls._failures_from_fail_row(row)
- if table_title == cls.crash_key:
- return [test_failures.FailureCrash()]
- if table_title == cls.webprocess_crash_key:
- return [test_failures.FailureCrash(process_name="WebProcess")]
- if table_title == cls.timeout_key:
- return [test_failures.FailureTimeout()]
- if table_title == cls.missing_key:
- return [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
- return None
-
- @classmethod
- def _test_result_from_row(cls, row, table_title):
- test_name = unicode(row.find("a").string)
- failures = cls._failures_from_row(row, table_title)
- # TestResult is a class designed to work with new-run-webkit-tests.
- # old-run-webkit-tests does not save quite enough information in results.html for us to parse.
- # FIXME: It's unclear if test_name should include LayoutTests or not.
- return test_results.TestResult(test_name, failures)
-
- @classmethod
- def _parse_results_table(cls, table):
- table_title = unicode(table.findPreviousSibling("p").string)
- if table_title not in cls.expected_keys:
- # This Exception should only ever be hit if run-webkit-tests changes its results.html format.
- raise Exception("Unhandled title: %s" % table_title)
- # Ignore stderr failures. Everyone ignores them anyway.
- if table_title == cls.stderr_key:
- return []
- # FIXME: We might end with two TestResults object for the same test if it appears in more than one row.
- return [cls._test_result_from_row(row, table_title) for row in table.findAll("tr")]
-
- @classmethod
- def parse_results_html(cls, page):
- tables = BeautifulSoup(page).findAll("table")
- return sum([cls._parse_results_table(table) for table in tables], [])
-
-
# FIXME: This should be unified with ResultsSummary or other NRWT layout tests code
# in the layout_tests package.
# This doesn't belong in common.net, but we don't have a better place for it yet.
@@ -135,12 +50,8 @@ class LayoutTestResults(object):
def results_from_string(cls, string):
if not string:
return None
- # For now we try to parse first as json, then as results.html
- # eventually we will remove the html fallback support.
test_results = ResultsJSONParser.parse_results_json(string)
if not test_results:
- test_results = ORWTResultsHTMLParser.parse_results_html(string)
- if not test_results:
return None
return cls(test_results)
@@ -150,7 +61,7 @@ class LayoutTestResults(object):
self._unit_test_failures = []
# FIXME: run-webkit-tests should store the --exit-after-N-failures value
- # (or some indication of early exit) somewhere in the results.html/results.json
+ # (or some indication of early exit) somewhere in the results.json
# file. Until it does, callers should set the limit to
# --exit-after-N-failures value used in that run. Consumers of LayoutTestResults
# may use that value to know if absence from the failure list means PASS.
diff --git a/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py b/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
index 4131bdf85..ea4e9273f 100644
--- a/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/layouttestresults_unittest.py
@@ -26,121 +26,22 @@
# (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 unittest
+import unittest2 as unittest
-from webkitpy.common.net.layouttestresults import LayoutTestResults, ORWTResultsHTMLParser
+from webkitpy.common.net.layouttestresults import LayoutTestResults
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.layout_tests.models import test_results
from webkitpy.layout_tests.models import test_failures
from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
-class ORWTResultsHTMLParserTest(unittest.TestCase):
- _example_results_html = """
-<html>
-<head>
-<title>Layout Test Results</title>
-</head>
-<body>
-<p>Tests that had stderr output:</p>
-<table>
-<tr>
-<td><a href="/var/lib/buildbot/build/gtk-linux-64-release/build/LayoutTests/accessibility/aria-activedescendant-crash.html">accessibility/aria-activedescendant-crash.html</a></td>
-<td><a href="accessibility/aria-activedescendant-crash-stderr.txt">stderr</a></td>
-</tr>
-<td><a href="/var/lib/buildbot/build/gtk-linux-64-release/build/LayoutTests/http/tests/security/canvas-remote-read-svg-image.html">http/tests/security/canvas-remote-read-svg-image.html</a></td>
-<td><a href="http/tests/security/canvas-remote-read-svg-image-stderr.txt">stderr</a></td>
-</tr>
-</table><p>Tests that had no expected results (probably new):</p>
-<table>
-<tr>
-<td><a href="/var/lib/buildbot/build/gtk-linux-64-release/build/LayoutTests/fast/repaint/no-caret-repaint-in-non-content-editable-element.html">fast/repaint/no-caret-repaint-in-non-content-editable-element.html</a></td>
-<td><a href="fast/repaint/no-caret-repaint-in-non-content-editable-element-actual.txt">result</a></td>
-</tr>
-</table></body>
-</html>
-"""
-
- _example_results_html_with_failing_tests = """
-<html>
-<head>
-<title>Layout Test Results</title>
-</head>
-<body>
-<p>Tests where results did not match expected results:</p>
-<table>
-<tr>
-<td><a href="http://trac.webkit.org/export/91245/trunk/LayoutTests/compositing/plugins/composited-plugin.html">compositing/plugins/composited-plugin.html</a></td>
-<td>
-<a href="compositing/plugins/composited-plugin-expected.txt">expected</a>
-</td>
-<td>
-<a href="compositing/plugins/composited-plugin-actual.txt">actual</a>
-</td>
-<td>
-<a href="compositing/plugins/composited-plugin-diffs.txt">diff</a>
-</td>
-<td>
-<a href="compositing/plugins/composited-plugin-pretty-diff.html">pretty diff</a>
-</td>
-</tr>
-</table>
-<p>Tests that had stderr output:</p>
-<table>
-<tr>
-<td><a href="/var/lib/buildbot/build/gtk-linux-64-release/build/LayoutTests/accessibility/aria-activedescendant-crash.html">accessibility/aria-activedescendant-crash.html</a></td>
-<td><a href="accessibility/aria-activedescendant-crash-stderr.txt">stderr</a></td>
-</tr>
-<td><a href="/var/lib/buildbot/build/gtk-linux-64-release/build/LayoutTests/http/tests/security/canvas-remote-read-svg-image.html">http/tests/security/canvas-remote-read-svg-image.html</a></td>
-<td><a href="http/tests/security/canvas-remote-read-svg-image-stderr.txt">stderr</a></td>
-</tr>
-</table><p>Tests that had no expected results (probably new):</p>
-<table>
-<tr>
-<td><a href="/var/lib/buildbot/build/gtk-linux-64-release/build/LayoutTests/fast/repaint/no-caret-repaint-in-non-content-editable-element.html">fast/repaint/no-caret-repaint-in-non-content-editable-element.html</a></td>
-<td><a href="fast/repaint/no-caret-repaint-in-non-content-editable-element-actual.txt">result</a></td>
-</tr>
-</table></body>
-</html>
-"""
-
- def test_parse_layout_test_results(self):
- failures = [test_failures.FailureMissingResult(), test_failures.FailureMissingImageHash(), test_failures.FailureMissingImage()]
- testname = 'fast/repaint/no-caret-repaint-in-non-content-editable-element.html'
- expected_results = [test_results.TestResult(testname, failures)]
-
- results = ORWTResultsHTMLParser.parse_results_html(self._example_results_html)
- self.assertEqual(expected_results, results)
-
-
- def test_failures_from_fail_row(self):
- row = BeautifulSoup("<tr><td><a>test.hml</a></td><td><a>expected image</a></td><td><a>25%</a></td></tr>")
- test_name = unicode(row.find("a").string)
- # Even if the caller has already found the test name, findAll inside _failures_from_fail_row will see it again.
- failures = OutputCapture().assert_outputs(self, ORWTResultsHTMLParser._failures_from_fail_row, [row])
- self.assertEqual(len(failures), 1)
- self.assertEqual(type(sorted(failures)[0]), test_failures.FailureImageHashMismatch)
-
- row = BeautifulSoup("<tr><td><a>test.hml</a><a>foo</a></td></tr>")
- expected_logs = "Unhandled link text in results.html parsing: foo. Please file a bug against webkitpy.\n"
- OutputCapture().assert_outputs(self, ORWTResultsHTMLParser._failures_from_fail_row, [row], expected_logs=expected_logs)
-
-
class LayoutTestResultsTest(unittest.TestCase):
-
def test_set_failure_limit_count(self):
results = LayoutTestResults([])
- self.assertEqual(results.failure_limit_count(), None)
+ self.assertIsNone(results.failure_limit_count())
results.set_failure_limit_count(10)
self.assertEqual(results.failure_limit_count(), 10)
def test_results_from_string(self):
- self.assertEqual(LayoutTestResults.results_from_string(None), None)
- self.assertEqual(LayoutTestResults.results_from_string(""), None)
- results = LayoutTestResults.results_from_string(ORWTResultsHTMLParserTest._example_results_html)
- self.assertEqual(len(results.failing_tests()), 1)
-
- def test_tests_matching_failure_types(self):
- results = LayoutTestResults.results_from_string(ORWTResultsHTMLParserTest._example_results_html_with_failing_tests)
- failing_tests = results.tests_matching_failure_types([test_failures.FailureTextMismatch])
- self.assertEqual(len(results.failing_tests()), 2)
+ self.assertIsNone(LayoutTestResults.results_from_string(None))
+ self.assertIsNone(LayoutTestResults.results_from_string(""))
diff --git a/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py b/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
index 3302dec80..67439f094 100644
--- a/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/networktransaction_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.networktransaction import NetworkTransaction, NetworkTimeout
from webkitpy.common.system.logtesting import LoggingTestCase
diff --git a/Tools/Scripts/webkitpy/common/net/omahaproxy.py b/Tools/Scripts/webkitpy/common/net/omahaproxy.py
deleted file mode 100644
index b7b481f4e..000000000
--- a/Tools/Scripts/webkitpy/common/net/omahaproxy.py
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright (C) 2012 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.
-#
-# This is the client to query http://omahaproxy.appspot.com/ to retrieve
-# chrome versions associated with WebKit commits.
-
-from webkitpy.common.net.networktransaction import NetworkTransaction
-from webkitpy.common.config import urls
-
-import json
-import urllib2
-
-
-class OmahaProxy(object):
- default_url = urls.omahaproxy_url
-
- chrome_platforms = {"linux": "Linux",
- "win": "Windows",
- "mac": "Mac",
- "cros": "Chrome OS",
- "cf": "Chrome Frame",
- "ios": "iOS"}
- chrome_channels = ["canary", "dev", "beta", "stable"]
-
- def __init__(self, url=default_url, browser=None):
- self._chrome_channels = set(self.chrome_channels)
- self.set_url(url)
- from webkitpy.thirdparty.autoinstalled.mechanize import Browser
- self._browser = browser or Browser()
-
- def set_url(self, url):
- self.url = url
-
- def _json_url(self):
- return "%s/all.json" % self.url
-
- def _get_json(self):
- return NetworkTransaction().run(lambda: urllib2.urlopen(self._json_url()).read())
-
- def get_revisions(self):
- revisions_json = json.loads(self._get_json())
- revisions = []
- for platform in revisions_json:
- for version in platform["versions"]:
- try:
- row = {
- "commit": int(version["base_webkit_revision"]),
- "channel": version["channel"],
- "platform": self.chrome_platforms.get(platform["os"], platform["os"]),
- "date": version["date"],
- }
- assert(version["channel"] in self._chrome_channels)
- revisions.append(row)
- except ValueError:
- next
- return revisions
diff --git a/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py b/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py
deleted file mode 100644
index f3e5be358..000000000
--- a/Tools/Scripts/webkitpy/common/net/omahaproxy_unittest.py
+++ /dev/null
@@ -1,139 +0,0 @@
-# Copyright (C) 2012 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.
-#
-
-# Unit test for omahaproxy.py
-
-import unittest
-
-from webkitpy.common.net.omahaproxy import OmahaProxy
-
-
-class MockOmahaProxy(OmahaProxy):
- def __init__(self, json):
- self._get_json = lambda: json
- OmahaProxy.__init__(self)
-
-
-class OmahaProxyTest(unittest.TestCase):
- example_omahaproxy_json = """[
- {"os": "win",
- "versions": [
- {"base_webkit_revision": "116185",
- "v8_ver": "3.10.8.1",
- "wk_ver": "536.11",
- "base_trunk_revision": 135598,
- "prev_version": "20.0.1128.0",
- "version": "20.0.1129.0",
- "date": "05\/07\/12",
- "prev_date": "05\/06\/12",
- "true_branch": "trunk",
- "channel": "canary",
- "branch_revision": "NA"},
- {"base_webkit_revision": "115687",
- "v8_ver": "3.10.6.0",
- "wk_ver": "536.10",
- "base_trunk_revision": 134666,
- "prev_version": "20.0.1123.1",
- "version": "20.0.1123.4",
- "date": "05\/04\/12",
- "prev_date": "05\/02\/12",
- "true_branch": "1123",
- "channel": "dev",
- "branch_revision": 135092}]},
- {"os": "linux",
- "versions": [
- {"base_webkit_revision": "115688",
- "v8_ver": "3.10.6.0",
- "wk_ver": "536.10",
- "base_trunk_revision": 134666,
- "prev_version": "20.0.1123.2",
- "version": "20.0.1123.4",
- "date": "05\/04\/12",
- "prev_date": "05\/02\/12",
- "true_branch": "1123",
- "channel": "dev",
- "branch_revision": 135092},
- {"base_webkit_revision": "112327",
- "v8_ver": "3.9.24.17",
- "wk_ver": "536.5",
- "base_trunk_revision": 129376,
- "prev_version": "19.0.1084.36",
- "version": "19.0.1084.41",
- "date": "05\/03\/12",
- "prev_date": "04\/25\/12",
- "true_branch": "1084",
- "channel": "beta",
- "branch_revision": 134854},
- {"base_webkit_revision": "*",
- "v8_ver": "3.9.24.17",
- "wk_ver": "536.5",
- "base_trunk_revision": 129376,
- "prev_version": "19.0.1084.36",
- "version": "19.0.1084.41",
- "date": "05\/03\/12",
- "prev_date": "04\/25\/12",
- "true_branch": "1084",
- "channel": "release",
- "branch_revision": 134854}]},
- {"os": "weird-platform",
- "versions": [
- {"base_webkit_revision": "115688",
- "v8_ver": "3.10.6.0",
- "wk_ver": "536.10",
- "base_trunk_revision": 134666,
- "prev_version": "20.0.1123.2",
- "version": "20.0.1123.4",
- "date": "05\/04\/12",
- "prev_date": "05\/02\/12",
- "true_branch": "1123",
- "channel": "dev",
- "branch_revision": 135092}]}]"""
-
- expected_revisions = [
- {"commit": 116185, "channel": "canary", "platform": "Windows", "date": "05/07/12"},
- {"commit": 115687, "channel": "dev", "platform": "Windows", "date": "05/04/12"},
- {"commit": 115688, "channel": "dev", "platform": "Linux", "date": "05/04/12"},
- {"commit": 112327, "channel": "beta", "platform": "Linux", "date": "05/03/12"},
- {"commit": 115688, "channel": "dev", "platform": "weird-platform", "date": "05/04/12"},
- ]
-
- def test_get_revisions(self):
- omahaproxy = MockOmahaProxy(self.example_omahaproxy_json)
- revisions = omahaproxy.get_revisions()
- self.assertEqual(len(revisions), 5)
- for revision in revisions:
- self.assertTrue("commit" in revision)
- self.assertTrue("channel" in revision)
- self.assertTrue("platform" in revision)
- self.assertTrue("date" in revision)
- self.assertEqual(len(revision.keys()), 4)
- self.assertEqual(revisions, self.expected_revisions)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py b/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
index 867379f92..aaeb5dc6d 100644
--- a/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.resultsjsonparser import ResultsJSONParser
from webkitpy.layout_tests.models import test_results
diff --git a/Tools/Scripts/webkitpy/common/net/statusserver.py b/Tools/Scripts/webkitpy/common/net/statusserver.py
index 99850f55d..a8d0beaf3 100644
--- a/Tools/Scripts/webkitpy/common/net/statusserver.py
+++ b/Tools/Scripts/webkitpy/common/net/statusserver.py
@@ -40,7 +40,7 @@ _log = logging.getLogger(__name__)
class StatusServer:
# FIXME: This should probably move to common.config.urls.
- default_host = "queues.webkit.org"
+ default_host = "webkit-queues.appspot.com"
def __init__(self, host=default_host, browser=None, bot_id=None):
self.set_host(host)
diff --git a/Tools/Scripts/webkitpy/common/net/statusserver_unittest.py b/Tools/Scripts/webkitpy/common/net/statusserver_unittest.py
index 1f0afd05b..91a42c93e 100644
--- a/Tools/Scripts/webkitpy/common/net/statusserver_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/statusserver_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.statusserver import StatusServer
from webkitpy.common.system.outputcapture import OutputCaptureTestCaseBase
diff --git a/Tools/Scripts/webkitpy/common/net/unittestresults_unittest.py b/Tools/Scripts/webkitpy/common/net/unittestresults_unittest.py
index 40e80236f..227139271 100644
--- a/Tools/Scripts/webkitpy/common/net/unittestresults_unittest.py
+++ b/Tools/Scripts/webkitpy/common/net/unittestresults_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from unittestresults import UnitTestResults
@@ -34,10 +34,10 @@ from unittestresults import UnitTestResults
class UnitTestResultsTest(unittest.TestCase):
def test_nostring(self):
- self.assertEqual(None, UnitTestResults.results_from_string(None))
+ self.assertIsNone(UnitTestResults.results_from_string(None))
def test_emptystring(self):
- self.assertEqual(None, UnitTestResults.results_from_string(""))
+ self.assertIsNone(UnitTestResults.results_from_string(""))
def test_nofailures(self):
no_failures_xml = """<?xml version="1.0" encoding="UTF-8"?>
@@ -92,7 +92,3 @@ Expected: 6.28]]></failure>
</testsuites>"""
expected = ["ClassOne.TestOne", "ClassTwo.TestTwo"]
self.assertEqual(expected, UnitTestResults.results_from_string(multiple_failures_per_test_xml))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/net/web_mock.py b/Tools/Scripts/webkitpy/common/net/web_mock.py
index 423573c60..b53cb66ee 100644
--- a/Tools/Scripts/webkitpy/common/net/web_mock.py
+++ b/Tools/Scripts/webkitpy/common/net/web_mock.py
@@ -30,11 +30,14 @@ import StringIO
class MockWeb(object):
- def __init__(self):
+ def __init__(self, urls=None):
+ self.urls = urls or {}
self.urls_fetched = []
def get_binary(self, url, convert_404_to_None=False):
self.urls_fetched.append(url)
+ if url in self.urls:
+ return self.urls[url]
return "MOCK Web result, convert 404 to None=%s" % convert_404_to_None
diff --git a/Tools/Scripts/webkitpy/common/newstringio.py b/Tools/Scripts/webkitpy/common/newstringio.py
index 724fb11aa..7748d505d 100644
--- a/Tools/Scripts/webkitpy/common/newstringio.py
+++ b/Tools/Scripts/webkitpy/common/newstringio.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/common/newstringio_unittest.py b/Tools/Scripts/webkitpy/common/newstringio_unittest.py
index 1ee2fb91f..670472204 100644
--- a/Tools/Scripts/webkitpy/common/newstringio_unittest.py
+++ b/Tools/Scripts/webkitpy/common/newstringio_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,7 +28,7 @@
"""Unit tests for newstringio module."""
-import unittest
+import unittest2 as unittest
import newstringio
@@ -39,6 +38,3 @@ class NewStringIOTest(unittest.TestCase):
with newstringio.StringIO("foo") as f:
contents = f.read()
self.assertEqual(contents, "foo")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/prettypatch_unittest.py b/Tools/Scripts/webkitpy/common/prettypatch_unittest.py
index 37fa844fd..3ae1c43fa 100644
--- a/Tools/Scripts/webkitpy/common/prettypatch_unittest.py
+++ b/Tools/Scripts/webkitpy/common/prettypatch_unittest.py
@@ -28,7 +28,7 @@
import os.path
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive import Executive
from webkitpy.common.prettypatch import PrettyPatch
@@ -77,7 +77,7 @@ Index: latin1_test
pretty_patch = PrettyPatch(Executive(), self._webkit_root())
pretty = pretty_patch.pretty_diff(self._diff_with_multiple_encodings)
self.assertTrue(pretty) # We got some output
- self.assertTrue(isinstance(pretty, str)) # It's a byte array, not unicode
+ self.assertIsInstance(pretty, str) # It's a byte array, not unicode
def test_pretty_print_empty_string(self):
if not self.check_ruby():
diff --git a/Tools/Scripts/webkitpy/common/read_checksum_from_png.py b/Tools/Scripts/webkitpy/common/read_checksum_from_png.py
index 70a0502b7..7431f47a3 100644
--- a/Tools/Scripts/webkitpy/common/read_checksum_from_png.py
+++ b/Tools/Scripts/webkitpy/common/read_checksum_from_png.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py b/Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py
index a56bec2e4..751f7af90 100644
--- a/Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py
+++ b/Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -23,7 +22,7 @@
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import StringIO
-import unittest
+import unittest2 as unittest
from webkitpy.common import read_checksum_from_png
@@ -37,8 +36,4 @@ class ReadChecksumFromPngTest(unittest.TestCase):
# Test a file without the comment.
filehandle = StringIO.StringIO('''\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x03 \x00\x00\x02X\x08\x02\x00\x00\x00\x15\x14\x15'\x00\x00\x16\xfeIDATx\x9c\xed\xdd[\x8cU\xe5\xc1\xff\xf15T\x18\x0ea,)\xa6\x80XZ<\x10\n\xd6H\xc4V\x88}\xb5\xa9\xd6r\xd5\x0bki0\xa6\xb5ih\xd2\xde\x98PHz\xd1\x02=\\q#\x01\x8b\xa5rJ\x8b\x88i\xacM\xc5h\x8cbMk(\x1ez@!\x0c\xd5\xd2\xc2\xb44\x1c\x848\x1dF(\xeb\x7f\xb1\xff\xd9\xef~g\xd6\xde3\xe0o\x10\xec\xe7sa6{\xd6z\xd6\xb3\xd7\xf3\xa8_7\xdbM[Y\x96\x05\x00\x009\xc3\xde\xeb\t\x00\x00\xbc\xdf\x08,\x00\x800\x81\x05\x00\x10&\xb0\x00\x00\xc2\x04\x16\x00@\x98\xc0\x02\x00\x08\x13X\x00\x00a\x02\x0b\x00 Lx01\x00\x84\t,\x00\x800\x81\x05\x00\x10\xd64\xb0\xda\x9a\xdb\xb6m\xdb\xb4i\xd3\xfa\x9fr\xf3\xcd7\x0f\xe5T\x07\xe5\xd4\xa9S\x8b\x17/\x1e?~\xfc\xf8\xf1\xe3\xef\xbf\xff\xfe\xf7z:M5\xbb\x87\x17\xcbUZ\x8f|V\xd7\xbd\x10\xb6\xcd{b\x88\xf6j\xb3\x9b?\x14\x9b\xa1>\xe6\xf9\xd9\xcf\x00\x17\x93''')
checksum = read_checksum_from_png.read_checksum(filehandle)
- self.assertEqual(None, checksum)
-
-
-if __name__ == '__main__':
- unittest.main()
+ self.assertIsNone(checksum)
diff --git a/Tools/Scripts/webkitpy/common/system/autoinstall.py b/Tools/Scripts/webkitpy/common/system/autoinstall.py
index 9d1f8cb2f..2e15887bb 100755..100644
--- a/Tools/Scripts/webkitpy/common/system/autoinstall.py
+++ b/Tools/Scripts/webkitpy/common/system/autoinstall.py
@@ -35,10 +35,11 @@ import codecs
import logging
import os
import shutil
+import stat
import sys
import tarfile
import tempfile
-import urllib
+import urllib2
import urlparse
import zipfile
@@ -173,7 +174,7 @@ class AutoInstaller(object):
return scratch_dir
def _url_downloaded_path(self, target_name):
- return os.path.join(self._target_dir, ".%s.url" % target_name)
+ return os.path.join(self._target_dir, ".%s.url" % target_name.replace('/', '_'))
def _is_downloaded(self, target_name, url):
version_path = self._url_downloaded_path(target_name)
@@ -283,17 +284,27 @@ class AutoInstaller(object):
return new_path
def _download_to_stream(self, url, stream):
- try:
- netstream = urllib.urlopen(url)
- except IOError, err:
- # Append existing Error message to new Error.
- message = ('Could not download Python modules from URL "%s".\n'
- " Make sure you are connected to the internet.\n"
- " You must be connected to the internet when "
- "downloading needed modules for the first time.\n"
- " --> Inner message: %s"
- % (url, err))
- raise IOError(message)
+ failures = 0
+ while True:
+ try:
+ netstream = urllib2.urlopen(url)
+ break
+ except IOError, err:
+ # Try multiple times
+ if failures < 5:
+ _log.warning("Failed to download %s, %s retrying" % (
+ url, err))
+ failures += 1
+ continue
+
+ # Append existing Error message to new Error.
+ message = ('Could not download Python modules from URL "%s".\n'
+ " Make sure you are connected to the internet.\n"
+ " You must be connected to the internet when "
+ "downloading needed modules for the first time.\n"
+ " --> Inner message: %s"
+ % (url, err))
+ raise IOError(message)
code = 200
if hasattr(netstream, "getcode"):
code = netstream.getcode()
@@ -319,8 +330,7 @@ class AutoInstaller(object):
return target_path
- def _install(self, scratch_dir, package_name, target_path, url,
- url_subpath):
+ def _install(self, scratch_dir, package_name, target_path, url, url_subpath, files_to_remove):
"""Install a python package from an URL.
This internal method overwrites the target path if the target
@@ -335,6 +345,13 @@ class AutoInstaller(object):
else:
source_path = os.path.join(path, url_subpath)
+ for filename in files_to_remove:
+ path = os.path.join(source_path, filename.replace('/', os.sep))
+ if os.path.exists(path):
+ # Pre-emptively change the permissions to #0777 to try and work around win32 permissions issues.
+ os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
+ os.remove(path)
+
if os.path.exists(target_path):
if os.path.isdir(target_path):
shutil.rmtree(target_path, ignore_errors=True)
@@ -354,7 +371,7 @@ class AutoInstaller(object):
self._record_url_downloaded(package_name, url)
def install(self, url, should_refresh=False, target_name=None,
- url_subpath=None):
+ url_subpath=None, files_to_remove=None):
"""Install a python package from an URL.
Args:
@@ -382,10 +399,11 @@ class AutoInstaller(object):
url_subpath = os.path.normpath(url_subpath)
target_name = os.path.basename(url_subpath)
- target_path = os.path.join(self._target_dir, target_name)
+ target_path = os.path.join(self._target_dir, target_name.replace('/', os.sep))
if not should_refresh and self._is_downloaded(target_name, url):
return False
+ files_to_remove = files_to_remove or []
package_name = target_name.replace(os.sep, '.')
_log.info("Auto-installing package: %s" % package_name)
@@ -399,7 +417,8 @@ class AutoInstaller(object):
target_path=target_path,
scratch_dir=scratch_dir,
url=url,
- url_subpath=url_subpath)
+ url_subpath=url_subpath,
+ files_to_remove=files_to_remove)
except Exception, err:
# Append existing Error message to new Error.
message = ("Error auto-installing the %s package to:\n"
diff --git a/Tools/Scripts/webkitpy/common/system/crashlogs.py b/Tools/Scripts/webkitpy/common/system/crashlogs.py
index 270ca81ed..7ebe52241 100644
--- a/Tools/Scripts/webkitpy/common/system/crashlogs.py
+++ b/Tools/Scripts/webkitpy/common/system/crashlogs.py
@@ -26,16 +26,23 @@
# (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 codecs
import re
class CrashLogs(object):
- def __init__(self, host):
+
+ PID_LINE_REGEX = re.compile(r'\s+Global\s+PID:\s+\[(?P<pid>\d+)\]')
+
+ def __init__(self, host, results_directory=None):
self._host = host
+ self._results_directory = results_directory
def find_newest_log(self, process_name, pid=None, include_errors=False, newer_than=None):
if self._host.platform.is_mac():
return self._find_newest_log_darwin(process_name, pid, include_errors, newer_than)
+ elif self._host.platform.is_win():
+ return self._find_newest_log_win(process_name, pid, include_errors, newer_than)
return None
def _log_directory_darwin(self):
@@ -72,3 +79,35 @@ class CrashLogs(object):
if include_errors and errors:
return errors
return None
+
+ def _find_newest_log_win(self, process_name, pid, include_errors, newer_than):
+ def is_crash_log(fs, dirpath, basename):
+ return basename.startswith("CrashLog")
+
+ logs = self._host.filesystem.files_under(self._results_directory, file_filter=is_crash_log)
+ errors = ''
+ for path in reversed(sorted(logs)):
+ try:
+ if not newer_than or self._host.filesystem.mtime(path) > newer_than:
+ log_file = self._host.filesystem.read_binary_file(path).decode('utf8', 'ignore')
+ match = self.PID_LINE_REGEX.search(log_file)
+ if match is None:
+ continue
+ if int(match.group('pid')) == pid:
+ return errors + log_file
+ except IOError, e:
+ print "IOError %s" % str(e)
+ if include_errors:
+ errors += "ERROR: Failed to read '%s': %s\n" % (path, str(e))
+ except OSError, e:
+ print "OSError %s" % str(e)
+ if include_errors:
+ errors += "ERROR: Failed to read '%s': %s\n" % (path, str(e))
+ except UnicodeDecodeError, e:
+ print "UnicodeDecodeError %s" % str(e)
+ if include_errors:
+ errors += "ERROR: Failed to decode '%s' as utf8: %s\n" % (path, str(e))
+
+ if include_errors and errors:
+ return errors
+ return None
diff --git a/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py b/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py
index 1f5c40a09..48034e806 100644
--- a/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/crashlogs_unittest.py
@@ -21,7 +21,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.crashlogs import CrashLogs
from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -29,6 +29,8 @@ from webkitpy.common.system.systemhost import SystemHost
from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.thirdparty.mock import Mock
+# Needed to support Windows port tests
+from webkitpy.port.win import WinPort
def make_mock_crash_report_darwin(process_name, pid):
return """Process: {process_name} [{pid}]
@@ -68,14 +70,169 @@ PCI Card: NVIDIA GeForce GT 120, sppci_displaycontroller, MXM-Slot
Serial ATA Device: OPTIARC DVD RW AD-5670S
""".format(process_name=process_name, pid=pid)
-class CrashLogsTest(unittest.TestCase):
- def assertLinesEqual(self, a, b):
- if hasattr(self, 'assertMultiLineEqual'):
- self.assertMultiLineEqual(a, b)
- else:
- self.assertEqual(a.splitlines(), b.splitlines())
+def make_mock_crash_report_win(process_name, pid):
+ return """Opened log file 'C:\Projects\WebKit\OpenSource\WebKitBuild\Release\bin32\layout-test-results\CrashLog_1d58_2013-06-03_12-21-20-110.txt'
+0:000> .srcpath "C:\Projects\WebKit\OpenSource"
+Source search path is: C:\Projects\WebKit\OpenSource
+0:000> !analyze -vv
+*******************************************************************************
+* *
+* Exception Analysis *
+* *
+*******************************************************************************
+
+*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Projects\WebKit\OpenSource\WebKitBuild\Release\bin32\libdispatch.dll -
+*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\SYSTEM32\atiumdag.dll -
+
+FAULTING_IP:
+JavaScriptCore!JSC::JSActivation::getOwnPropertySlot+0 [c:\projects\webkit\opensource\source\javascriptcore\runtime\jsactivation.cpp @ 146]
+01e3d070 55 push ebp
+
+EXCEPTION_RECORD: 00092cc8 -- (.exr 0x92cc8)
+.exr 0x92cc8
+ExceptionAddress: 01e3d070 (JavaScriptCore!JSC::JSActivation::getOwnPropertySlot)
+ ExceptionCode: c00000fd (Stack overflow)
+ ExceptionFlags: 00000000
+NumberParameters: 2
+ Parameter[0]: 00000001
+ Parameter[1]: 00092ffc
+
+FAULTING_THREAD: 00000e68
+PROCESS_NAME: {process_name}
+ERROR_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
+EXCEPTION_CODE: (NTSTATUS) 0xc0000005 - The instruction at 0x%08lx referenced memory at 0x%08lx. The memory could not be %s.
+EXCEPTION_CODE_STR: c0000005
+EXCEPTION_PARAMETER1: 00000000
+EXCEPTION_PARAMETER2: 00090000
+READ_ADDRESS: 00090000
+
+FOLLOWUP_IP:
+JavaScriptCore!JSC::JSActivation::getOwnPropertySlot+0 [c:\projects\webkit\opensource\source\javascriptcore\runtime\jsactivation.cpp @ 146]
+01e3d070 55 push ebp
+
+WATSON_BKT_PROCSTAMP: 51a8f979
+WATSON_BKT_MODULE: MSVCR100.dll
+WATSON_BKT_MODVER: 10.0.40219.325
+WATSON_BKT_MODSTAMP: 4df2be1e
+WATSON_BKT_MODOFFSET: 160d7
+MODULE_VER_PRODUCT: Microsoft(R) Visual Studio(R) 2010
+BUILD_VERSION_STRING: 6.2.9200.16384 (win8_rtm.120725-1247)
+NTGLOBALFLAG: 0
+APPLICATION_VERIFIER_FLAGS: 0
+APP: {process_name}
+
+ANALYSIS_SESSION_HOST: FULGBR-PC
+
+ANALYSIS_SESSION_TIME: 06-03-2013 12:21:20.0111
+
+CONTEXT: 00092d18 -- (.cxr 0x92d18)
+.cxr 0x92d18
+eax=01e3d070 ebx=000930bc ecx=7fe03ed0 edx=0751e168 esi=07a7ff98 edi=0791ff78
+eip=01e3d070 esp=00093000 ebp=0009306c iopl=0 nv up ei ng nz ac po cy
+cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00210293
+JavaScriptCore!JSC::JSActivation::getOwnPropertySlot:
+01e3d070 55 push ebp
+.cxr
+Resetting default scope
+
+RECURRING_STACK: From frames 0x14 to 0x1d
+
+THREAD_ATTRIBUTES:
+
+[ GLOBAL ]
+
+ Global PID: [{pid}]
+ Global Thread_Count: [19]
+ Global PageSize: [4096]
+ Global ModList_SHA1_Hash: [aacef4e7e83b9bddc9cd0cc094dac88d531ea4a3]
+ Global CommandLine: [C:\Projects\WebKit\OpenSource\WebKitBuild\Release\bin32\{process_name} -]
+ Global Desktop_Name: [Winsta0\Default]
+ Global ProcessName: [{process_name}]
+ Global Debugger_CPU_Architecture: [X86]
+ Global CPU_ProcessorCount: [24]
+ Global CPU_MHZ: [1596]
+ Global CPU_Architecture: [X86]
+ Global CPU_Family: [6]
+ Global CPU_Model: [12]
+ Global CPU_Stepping: [2]
+ Global CPU_VendorString: [GenuineIntel]
+ Global LoadedModule_Count: [82]
+ Global ProcessBeingDebugged
+ Global GFlags: [0]
+ Global Application_Verifer_Flags: [0]
+ Global FinalExh: [2012093943]
+ Global SystemUpTime: [3 days 23:52:56.000]
+ Global SystemUpTime: [345176]
+ Global ProcessUpTime: [0 days 0:00:00.000]
+ Global ProcessUpTime: [0]
+ Global CurrentTimeDate: [Mon Jun 3 12:21:20.000 2013 (UTC - 7:00)]
+ Global CurrentTimeDate: [1370287280]
+ Global ProductType: [1]
+ Global SuiteMask: [272]
+ Global ApplicationName: [{process_name}]
+ Global ASLR_Enabled
+ Global SafeSEH_Enabled
+
+FAULT_INSTR_CODE: 83ec8b55
+
+FAULTING_SOURCE_LINE: c:\projects\webkit\opensource\source\javascriptcore\runtime\jsactivation.cpp
+
+FAULTING_SOURCE_FILE: c:\projects\webkit\opensource\source\javascriptcore\runtime\jsactivation.cpp
+
+FAULTING_SOURCE_LINE_NUMBER: 146
+
+SYMBOL_STACK_INDEX: 0
+
+SYMBOL_NAME: javascriptcore!JSC::JSActivation::getOwnPropertySlot+92ffc
+
+FOLLOWUP_NAME: MachineOwner
+
+MODULE_NAME: JavaScriptCore
+
+IMAGE_NAME: JavaScriptCore.dll
+
+DEBUG_FLR_IMAGE_TIMESTAMP: 51ace473
+
+STACK_COMMAND: .cxr 00092D18 ; kb ; dps 93000 ; kb
+FAILURE_BUCKET_ID: STACK_OVERFLOW_c0000005_JavaScriptCore.dll!JSC::JSActivation::getOwnPropertySlot
+
+BUCKET_ID: APPLICATION_FAULT_STACK_OVERFLOW_INVALID_POINTER_READ_javascriptcore!JSC::JSActivation::getOwnPropertySlot+92ffc
+
+ANALYSIS_SESSION_ELAPSED_TIME: 18df
+
+Followup: MachineOwner
+---------
+
+0:000> ~*kpn
+
+. 0 Id: 18e0.e68 Suspend: 1 Teb: 7ffdd000 Unfrozen
+ # ChildEBP RetAddr
+00 00092a08 7261ece1 MSVCR100!_alloca_probe+0x27
+01 00092a4c 7261a5d0 MSVCR100!_write+0x95
+02 00092a6c 7261ef6b MSVCR100!_flush+0x3b
+03 00092a7c 7261ef1c MSVCR100!_fflush_nolock+0x1c
+04 00092ab4 1000f814 MSVCR100!fflush+0x30
+05 00092ac8 77c0084e DumpRenderTree_10000000!exceptionFilter(struct _EXCEPTION_POINTERS * __formal = 0x852ac807)+0x24 [c:\projects\webkit\opensource\tools\dumprendertree\win\dumprendertree.cpp @ 1281]
+06 00092b60 77e8bf2c KERNELBASE!UnhandledExceptionFilter+0x164
+07 00092b68 77e530b4 ntdll!__RtlUserThreadStart+0x57
+08 00092b7c 77e15246 ntdll!_EH4_CallFilterFunc+0x12
+09 00092ba4 77e151b1 ntdll!_except_handler4_common+0x8e
+0a 00092bc4 77e52e71 ntdll!_except_handler4+0x20
+0b 00092be8 77e52e43 ntdll!ExecuteHandler2+0x26
+0c 00092cb0 77e52cbb ntdll!ExecuteHandler+0x24
+0d 00092cb0 01e3d070 ntdll!KiUserExceptionDispatcher+0xf
+0e 00092ffc 01e67d25 JavaScriptCore!JSC::JSActivation::getOwnPropertySlot(class JSC::JSCell * cell = 0x07a7ff98, class JSC::ExecState * exec = 0x0751e168, class JSC::PropertyName propertyName = class JSC::PropertyName, class JSC::PropertySlot * slot = 0x000930bc) [c:\projects\webkit\opensource\source\javascriptcore\runtime\jsactivation.cpp @ 146]
+0f 0009306c 01e68837 JavaScriptCore!JSC::JSScope::resolveContainingScopeInternal<1,2>(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class JSC::PropertySlot * slot = 0x7fe03ed0, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0, struct JSC::PutToBaseOperation * putToBaseOperation = 0x00000000, bool __formal = false)+0x205 [c:\projects\webkit\opensource\source\javascriptcore\runtime\jsscope.cpp @ 247]
+10 00093090 01e65860 JavaScriptCore!JSC::JSScope::resolveContainingScope<1>(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class JSC::PropertySlot * slot = 0x000930bc, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0, struct JSC::PutToBaseOperation * putToBaseOperation = 0x00000000, bool isStrict = false)+0x27 [c:\projects\webkit\opensource\source\javascriptcore\runtime\jsscope.cpp @ 427]
+11 00093104 01dceeff JavaScriptCore!JSC::JSScope::resolve(class JSC::ExecState * callFrame = 0x0751e168, class JSC::Identifier * identifier = 0x7fe0ebc0, class WTF::Vector<JSC::ResolveOperation,0,WTF::CrashOnOverflow> * operations = 0x7fda16c0)+0xc0 [c:\projects\webkit\opensource\source\javascriptcore\runtime\jsscope.cpp @ 447]
+
+0:000> q
+quit:
+""".format(process_name=process_name, pid=pid)
+
+class CrashLogsTest(unittest.TestCase):
def test_find_log_darwin(self):
if not SystemHost().platform.is_mac():
return
@@ -95,15 +252,15 @@ class CrashLogsTest(unittest.TestCase):
filesystem = MockFileSystem(files)
crash_logs = CrashLogs(MockSystemHost(filesystem=filesystem))
log = crash_logs.find_newest_log("DumpRenderTree")
- self.assertLinesEqual(log, newer_mock_crash_report)
+ self.assertMultiLineEqual(log, newer_mock_crash_report)
log = crash_logs.find_newest_log("DumpRenderTree", 28529)
- self.assertLinesEqual(log, newer_mock_crash_report)
+ self.assertMultiLineEqual(log, newer_mock_crash_report)
log = crash_logs.find_newest_log("DumpRenderTree", 28530)
- self.assertLinesEqual(log, mock_crash_report)
+ self.assertMultiLineEqual(log, mock_crash_report)
log = crash_logs.find_newest_log("DumpRenderTree", 28531)
- self.assertEqual(log, None)
+ self.assertIsNone(log)
log = crash_logs.find_newest_log("DumpRenderTree", newer_than=1.0)
- self.assertEqual(log, None)
+ self.assertIsNone(log)
def bad_read(path):
raise IOError('IOError: No such file or directory')
@@ -113,10 +270,47 @@ class CrashLogsTest(unittest.TestCase):
filesystem.read_text_file = bad_read
log = crash_logs.find_newest_log("DumpRenderTree", 28531, include_errors=True)
- self.assertTrue('IOError: No such file or directory' in log)
+ self.assertIn('IOError: No such file or directory', log)
filesystem = MockFileSystem(files)
crash_logs = CrashLogs(MockSystemHost(filesystem=filesystem))
filesystem.mtime = bad_mtime
log = crash_logs.find_newest_log("DumpRenderTree", newer_than=1.0, include_errors=True)
- self.assertTrue('OSError: No such file or directory' in log)
+ self.assertIn('OSError: No such file or directory', log)
+
+ def test_find_log_win(self):
+ if not SystemHost().platform.is_win():
+ return
+
+ older_mock_crash_report = make_mock_crash_report_win('DumpRenderTree', 28528)
+ mock_crash_report = make_mock_crash_report_win('DumpRenderTree', 28530)
+ newer_mock_crash_report = make_mock_crash_report_win('DumpRenderTree', 28529)
+ other_process_mock_crash_report = make_mock_crash_report_win('FooProcess', 28527)
+ misformatted_mock_crash_report = 'Junk that should not appear in a crash report' + make_mock_crash_report_win('DumpRenderTree', 28526)[200:]
+ files = {}
+ files['~/CrashLog_1d58_2013-06-03_12-21-20-110.txt'] = older_mock_crash_report
+ files['~/CrashLog_abcd_2013-06-03_12-22-19-129.txt'] = mock_crash_report
+ files['~/CrashLog_2eff_2013-06-03_12-23-20-150.txt'] = newer_mock_crash_report
+ files['~/CrashLog_31a0_2013-06-03_12-24-22-119.txt'] = None
+ files['~/CrashLog_01a3_2013-06-03_12-25-23-120.txt'] = other_process_mock_crash_report
+ files['~/CrashLog_aadd_2013-06-03_12-26-24-121.txt'] = misformatted_mock_crash_report
+ filesystem = MockFileSystem(files)
+ mock_host = MockSystemHost(os_name='win', filesystem=filesystem)
+ crash_logs = CrashLogs(mock_host, "~")
+
+ log = crash_logs.find_newest_log("DumpRenderTree", 28529)
+ self.assertMultiLineEqual(log, newer_mock_crash_report)
+ log = crash_logs.find_newest_log("DumpRenderTree", 28530)
+ self.assertMultiLineEqual(log, mock_crash_report)
+ log = crash_logs.find_newest_log("DumpRenderTree", 28531)
+ self.assertIsNone(log)
+ log = crash_logs.find_newest_log("DumpRenderTree", newer_than=1.0)
+ self.assertIsNone(log)
+
+ def bad_read(path):
+ raise IOError('IOError: No such file or directory')
+
+ filesystem.read_text_file = bad_read
+ filesystem.read_binary_file = bad_read
+ log = crash_logs.find_newest_log("DumpRenderTree", 28531, include_errors=True)
+ self.assertIn('IOError: No such file or directory', log)
diff --git a/Tools/Scripts/webkitpy/common/system/environment_unittest.py b/Tools/Scripts/webkitpy/common/system/environment_unittest.py
index 6558b51df..2868a65d2 100644
--- a/Tools/Scripts/webkitpy/common/system/environment_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/environment_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from .environment import Environment
diff --git a/Tools/Scripts/webkitpy/common/system/executive.py b/Tools/Scripts/webkitpy/common/system/executive.py
index 42a8122d3..ca45f2f35 100644
--- a/Tools/Scripts/webkitpy/common/system/executive.py
+++ b/Tools/Scripts/webkitpy/common/system/executive.py
@@ -46,14 +46,6 @@ _log = logging.getLogger(__name__)
class ScriptError(Exception):
- # This is a custom List.__str__ implementation to allow size limiting.
- def _string_from_args(self, args, limit=100):
- args_string = unicode(args)
- # We could make this much fancier, but for now this is OK.
- if len(args_string) > limit:
- return args_string[:limit - 3] + "..."
- return args_string
-
def __init__(self,
message=None,
script_args=None,
@@ -61,7 +53,7 @@ class ScriptError(Exception):
output=None,
cwd=None):
if not message:
- message = 'Failed to run "%s"' % self._string_from_args(script_args)
+ message = 'Failed to run "%s"' % repr(script_args)
if exit_code:
message += " exit_code: %d" % exit_code
if cwd:
@@ -92,6 +84,9 @@ class Executive(object):
PIPE = subprocess.PIPE
STDOUT = subprocess.STDOUT
+ def __init__(self):
+ self.pid_to_system_pid = {}
+
def _should_close_fds(self):
# We need to pass close_fds=True to work around Python bug #2320
# (otherwise we can hang when we kill DumpRenderTree when we are running
@@ -101,9 +96,6 @@ class Executive(object):
return sys.platform not in ('win32', 'cygwin')
def _run_command_with_teed_output(self, args, teed_output, **kwargs):
- args = map(unicode, args) # Popen will throw an exception if args are non-strings (like int())
- args = map(self._encode_argument_if_needed, args)
-
child_process = self.popen(args,
stdout=self.PIPE,
stderr=self.STDOUT,
@@ -153,6 +145,12 @@ class Executive(object):
return child_output
def cpu_count(self):
+ try:
+ cpus = int(os.environ.get('NUMBER_OF_PROCESSORS'))
+ if cpus > 0:
+ return cpus
+ except (ValueError, TypeError):
+ pass
return multiprocessing.cpu_count()
@staticmethod
@@ -272,26 +270,37 @@ class Executive(object):
return False
def running_pids(self, process_name_filter=None):
+ if sys.platform == "win32":
+ # FIXME: running_pids isn't implemented on native Windows yet...
+ return []
+
if not process_name_filter:
process_name_filter = lambda process_name: True
running_pids = []
-
- if sys.platform in ("win32", "cygwin"):
- # FIXME: running_pids isn't implemented on Windows yet...
- return []
-
- ps_process = self.popen(['ps', '-eo', 'pid,comm'], stdout=self.PIPE, stderr=self.PIPE)
- stdout, _ = ps_process.communicate()
- for line in stdout.splitlines():
- try:
- # In some cases the line can contain one or more
- # leading white-spaces, so strip it before split.
- pid, process_name = line.strip().split(' ', 1)
- if process_name_filter(process_name):
- running_pids.append(int(pid))
- except ValueError, e:
- pass
+ if sys.platform in ("cygwin"):
+ ps_process = self.run_command(['ps', '-e'], error_handler=Executive.ignore_error)
+ for line in ps_process.splitlines():
+ tokens = line.strip().split()
+ try:
+ pid, ppid, pgid, winpid, tty, uid, stime, process_name = tokens
+ if process_name_filter(process_name):
+ running_pids.append(int(pid))
+ self.pid_to_system_pid[int(pid)] = int(winpid)
+ except ValueError, e:
+ pass
+ else:
+ ps_process = self.popen(['ps', '-eo', 'pid,comm'], stdout=self.PIPE, stderr=self.PIPE)
+ stdout, _ = ps_process.communicate()
+ for line in stdout.splitlines():
+ try:
+ # In some cases the line can contain one or more
+ # leading white-spaces, so strip it before split.
+ pid, process_name = line.strip().split(' ', 1)
+ if process_name_filter(process_name):
+ running_pids.append(int(pid))
+ except ValueError, e:
+ pass
return sorted(running_pids)
@@ -307,6 +316,13 @@ class Executive(object):
while self.check_running_pid(pid):
time.sleep(0.25)
+ def wait_limited(self, pid, limit_in_seconds=None, check_frequency_in_seconds=None):
+ seconds_left = limit_in_seconds or 10
+ sleep_length = check_frequency_in_seconds or 1
+ while seconds_left > 0 and self.check_running_pid(pid):
+ seconds_left -= sleep_length
+ time.sleep(sleep_length)
+
def _windows_image_name(self, process_name):
name, extension = os.path.splitext(process_name)
if not extension:
@@ -315,6 +331,17 @@ class Executive(object):
process_name = "%s.exe" % name
return process_name
+ def interrupt(self, pid):
+ interrupt_signal = signal.SIGINT
+ # FIXME: The python docs seem to imply that platform == 'win32' may need to use signal.CTRL_C_EVENT
+ # http://docs.python.org/2/library/signal.html
+ try:
+ os.kill(pid, interrupt_signal)
+ except OSError:
+ # Silently ignore when the pid doesn't exist.
+ # It's impossible for callers to avoid race conditions with process shutdown.
+ pass
+
def kill_all(self, process_name):
"""Attempts to kill processes matching process_name.
Will fail silently if no process are found."""
@@ -365,9 +392,10 @@ class Executive(object):
input = input.encode(self._child_process_encoding())
return (self.PIPE, input)
- def _command_for_printing(self, args):
+ def command_for_printing(self, args):
"""Returns a print-ready string representing command args.
The string should be copy/paste ready for execution in a shell."""
+ args = self._stringify_args(args)
escaped_args = []
for arg in args:
if isinstance(arg, unicode):
@@ -390,8 +418,6 @@ class Executive(object):
"""Popen wrapper for convenience and to work around python bugs."""
assert(isinstance(args, list) or isinstance(args, tuple))
start_time = time.time()
- args = map(unicode, args) # Popen will throw an exception if args are non-strings (like int())
- args = map(self._encode_argument_if_needed, args)
stdin, string_to_communicate = self._compute_stdin(input)
stderr = self.STDOUT if return_stderr else None
@@ -413,7 +439,7 @@ class Executive(object):
# http://bugs.python.org/issue1731717
exit_code = process.wait()
- _log.debug('"%s" took %.2fs' % (self._command_for_printing(args), time.time() - start_time))
+ _log.debug('"%s" took %.2fs' % (self.command_for_printing(args), time.time() - start_time))
if return_exit_code:
return exit_code
@@ -457,8 +483,23 @@ class Executive(object):
return argument
return argument.encode(self._child_process_encoding())
- def popen(self, *args, **kwargs):
- return subprocess.Popen(*args, **kwargs)
+ def _stringify_args(self, args):
+ # Popen will throw an exception if args are non-strings (like int())
+ string_args = map(unicode, args)
+ # The Windows implementation of Popen cannot handle unicode strings. :(
+ return map(self._encode_argument_if_needed, string_args)
+
+ # The only required arugment to popen is named "args", the rest are optional keyword arguments.
+ def popen(self, args, **kwargs):
+ # FIXME: We should always be stringifying the args, but callers who pass shell=True
+ # expect that the exact bytes passed will get passed to the shell (even if they're wrongly encoded).
+ # shell=True is wrong for many other reasons, and we should remove this
+ # hack as soon as we can fix all callers to not use shell=True.
+ if kwargs.get('shell') == True:
+ string_args = args
+ else:
+ string_args = self._stringify_args(args)
+ return subprocess.Popen(string_args, **kwargs)
def run_in_parallel(self, command_lines_and_cwds, processes=None):
"""Runs a list of (cmd_line list, cwd string) tuples in parallel and returns a list of (retcode, stdout, stderr) tuples."""
diff --git a/Tools/Scripts/webkitpy/common/system/executive_mock.py b/Tools/Scripts/webkitpy/common/system/executive_mock.py
index a83f5b245..a3870b131 100644
--- a/Tools/Scripts/webkitpy/common/system/executive_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/executive_mock.py
@@ -63,6 +63,7 @@ class MockExecutive(object):
self._running_pids = {'test-webkitpy': os.getpid()}
self._proc = None
self.calls = []
+ self.pid_to_system_pid = {}
def check_running_pid(self, pid):
return pid in self._running_pids.values()
@@ -86,6 +87,10 @@ class MockExecutive(object):
raise ScriptError("Exception for %s" % args, output="MOCK command output")
return "MOCK output of child process"
+ def command_for_printing(self, args):
+ string_args = map(unicode, args)
+ return " ".join(string_args)
+
def run_command(self,
args,
cwd=None,
@@ -108,6 +113,10 @@ class MockExecutive(object):
input_string = ", input=%s" % input
_log.info("MOCK run_command: %s, cwd=%s%s%s" % (args, cwd, env_string, input_string))
output = "MOCK output of child process"
+
+ if self._should_throw_when_run.intersection(args):
+ raise ScriptError("Exception for %s" % args, output="MOCK command output")
+
if self._should_throw:
raise ScriptError("MOCK ScriptError", output=output)
return output
@@ -170,7 +179,7 @@ class MockExecutive2(MockExecutive):
self.calls.append(args)
assert(isinstance(args, list) or isinstance(args, tuple))
if self._exception:
- raise self._exception # pylint: disable-msg=E0702
+ raise self._exception # pylint: disable=E0702
if self._run_command_fn:
return self._run_command_fn(args)
if return_exit_code:
diff --git a/Tools/Scripts/webkitpy/common/system/executive_unittest.py b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
index 755955d34..f71201a04 100644
--- a/Tools/Scripts/webkitpy/common/system/executive_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
@@ -33,34 +33,36 @@ import signal
import subprocess
import sys
import time
-import unittest
# Since we execute this script directly as part of the unit tests, we need to ensure
# that Tools/Scripts is in sys.path for the next imports to work correctly.
script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
if script_dir not in sys.path:
sys.path.append(script_dir)
+third_party_py = os.path.join(script_dir, "webkitpy", "thirdparty", "autoinstalled")
+if third_party_py not in sys.path:
+ sys.path.append(third_party_py)
+
+import unittest2 as unittest
from webkitpy.common.system.executive import Executive, ScriptError
from webkitpy.common.system.filesystem_mock import MockFileSystem
class ScriptErrorTest(unittest.TestCase):
- def test_string_from_args(self):
- error = ScriptError()
- self.assertEqual(error._string_from_args(None), 'None')
- self.assertEqual(error._string_from_args([]), '[]')
- self.assertEqual(error._string_from_args(map(str, range(30))), "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'...")
-
def test_message_with_output(self):
error = ScriptError('My custom message!', '', -1)
self.assertEqual(error.message_with_output(), 'My custom message!')
error = ScriptError('My custom message!', '', -1, 'My output.')
self.assertEqual(error.message_with_output(), 'My custom message!\n\nMy output.')
error = ScriptError('', 'my_command!', -1, 'My output.', '/Users/username/blah')
- self.assertEqual(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1 cwd: /Users/username/blah\n\nMy output.')
+ self.assertEqual(error.message_with_output(), 'Failed to run "\'my_command!\'" exit_code: -1 cwd: /Users/username/blah\n\nMy output.')
error = ScriptError('', 'my_command!', -1, 'ab' + '1' * 499)
- self.assertEqual(error.message_with_output(), 'Failed to run "my_command!" exit_code: -1\n\nLast 500 characters of output:\nb' + '1' * 499)
+ self.assertEqual(error.message_with_output(), 'Failed to run "\'my_command!\'" exit_code: -1\n\nLast 500 characters of output:\nb' + '1' * 499)
+
+ def test_message_with_tuple(self):
+ error = ScriptError('', ('my', 'command'), -1, 'My output.', '/Users/username/blah')
+ self.assertEqual(error.message_with_output(), 'Failed to run "(\'my\', \'command\')" exit_code: -1 cwd: /Users/username/blah\n\nMy output.')
def never_ending_command():
"""Arguments for a command that will never end (useful for testing process
@@ -113,6 +115,17 @@ class ExecutiveTest(unittest.TestCase):
executive.run_command(command_line('echo', 'foo'))
executive.run_command(tuple(command_line('echo', 'foo')))
+ def test_auto_stringify_args(self):
+ executive = Executive()
+ executive.run_command(command_line('echo', 1))
+ executive.popen(command_line('echo', 1), stdout=executive.PIPE).wait()
+ self.assertEqual('echo 1', executive.command_for_printing(['echo', 1]))
+
+ def test_popen_args(self):
+ executive = Executive()
+ # Explicitly naming the 'args' argument should not thow an exception.
+ executive.popen(args=command_line('echo', 1), stdout=executive.PIPE).wait()
+
def test_run_command_with_unicode(self):
"""Validate that it is safe to pass unicode() objects
to Executive.run* methods, and they will return unicode()
@@ -161,11 +174,11 @@ class ExecutiveTest(unittest.TestCase):
if sys.platform == "win32":
# FIXME: https://bugs.webkit.org/show_bug.cgi?id=54790
# We seem to get either 0 or 1 here for some reason.
- self.assertTrue(process.wait() in (0, 1))
+ self.assertIn(process.wait(), (0, 1))
elif sys.platform == "cygwin":
# FIXME: https://bugs.webkit.org/show_bug.cgi?id=98196
# cygwin seems to give us either SIGABRT or SIGKILL
- self.assertTrue(process.wait() in (-signal.SIGABRT, -signal.SIGKILL))
+ self.assertIn(process.wait(), (-signal.SIGABRT, -signal.SIGKILL))
else:
expected_exit_code = -signal.SIGKILL
self.assertEqual(process.wait(), expected_exit_code)
@@ -176,7 +189,7 @@ class ExecutiveTest(unittest.TestCase):
def serial_test_kill_all(self):
executive = Executive()
process = subprocess.Popen(never_ending_command(), stdout=subprocess.PIPE)
- self.assertEqual(process.poll(), None) # Process is running
+ self.assertIsNone(process.poll()) # Process is running
executive.kill_all(never_ending_command()[0])
# Note: Can't use a ternary since signal.SIGTERM is undefined for sys.platform == "win32"
if sys.platform == "cygwin":
@@ -185,7 +198,7 @@ class ExecutiveTest(unittest.TestCase):
elif sys.platform == "win32":
# FIXME: https://bugs.webkit.org/show_bug.cgi?id=54790
# We seem to get either 0 or 1 here for some reason.
- self.assertTrue(process.wait() in (0, 1))
+ self.assertIn(process.wait(), (0, 1))
else:
expected_exit_code = -signal.SIGTERM
self.assertEqual(process.wait(), expected_exit_code)
@@ -218,7 +231,7 @@ class ExecutiveTest(unittest.TestCase):
executive = Executive()
pids = executive.running_pids()
- self.assertTrue(os.getpid() in pids)
+ self.assertIn(os.getpid(), pids)
def serial_test_run_in_parallel(self):
# We run this test serially to avoid overloading the machine and throwing off the timing.
diff --git a/Tools/Scripts/webkitpy/common/system/file_lock.py b/Tools/Scripts/webkitpy/common/system/file_lock.py
index c542777f2..3ca8b3cba 100644
--- a/Tools/Scripts/webkitpy/common/system/file_lock.py
+++ b/Tools/Scripts/webkitpy/common/system/file_lock.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
# All rights reserved.
diff --git a/Tools/Scripts/webkitpy/common/system/file_lock_integrationtest.py b/Tools/Scripts/webkitpy/common/system/file_lock_integrationtest.py
index 5cd27d11d..7b1b42695 100644
--- a/Tools/Scripts/webkitpy/common/system/file_lock_integrationtest.py
+++ b/Tools/Scripts/webkitpy/common/system/file_lock_integrationtest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
# All rights reserved.
@@ -26,7 +25,7 @@
import os
import tempfile
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.file_lock import FileLock
diff --git a/Tools/Scripts/webkitpy/common/system/file_lock_mock.py b/Tools/Scripts/webkitpy/common/system/file_lock_mock.py
index e2c1d5cdf..f53081d1c 100644
--- a/Tools/Scripts/webkitpy/common/system/file_lock_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/file_lock_mock.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
#
# All rights reserved.
@@ -30,7 +29,7 @@ class MockFileLock(object):
pass
def acquire_lock(self):
- pass
+ return True
def release_lock(self):
- pass
+ return True
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
index 16e9fadaa..ee0664ea0 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
@@ -395,7 +395,7 @@ class MockFileSystem(object):
def splitext(self, path):
idx = path.rfind('.')
if idx == -1:
- idx = 0
+ idx = len(path)
return (path[0:idx], path[idx:])
@@ -452,7 +452,7 @@ class ReadableBinaryFileObject(object):
class ReadableTextFileObject(ReadableBinaryFileObject):
def __init__(self, fs, path, data):
- super(ReadableTextFileObject, self).__init__(fs, path, StringIO.StringIO(data))
+ super(ReadableTextFileObject, self).__init__(fs, path, StringIO.StringIO(data.decode("utf-8")))
def close(self):
self.data.close()
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py b/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
index 391c1d954..a5983320a 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_mock_unittest.py
@@ -28,7 +28,7 @@
import os
import re
-import unittest
+import unittest2 as unittest
from webkitpy.common.system import filesystem_mock
@@ -82,7 +82,3 @@ class MockFileSystemTest(unittest.TestCase, filesystem_unittest.GenericFileSyste
'foo/../bar',
'foo/../bar/baz',
'../foo')
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py b/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
index d656b2580..cd4ad6e4a 100644
--- a/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/filesystem_unittest.py
@@ -35,7 +35,7 @@ import os
import stat
import sys
import tempfile
-import unittest
+import unittest2 as unittest
from filesystem import FileSystem
@@ -209,6 +209,8 @@ class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
unicode_text_string = u'\u016An\u012Dc\u014Dde\u033D'
hex_equivalent = '\xC5\xAA\x6E\xC4\xAD\x63\xC5\x8D\x64\x65\xCC\xBD'
+ malformed_text_hex = '\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\xAE\x20\x56\x69\x73\x75\x61\x6C\x20\x53\x74\x75\x64\x69\x6F\xAE\x20\x32\x30\x31\x30\x0D\x0A'
+ malformed_ignored_text_hex = '\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x20\x56\x69\x73\x75\x61\x6C\x20\x53\x74\x75\x64\x69\x6F\x20\x32\x30\x31\x30\x0D\x0A'
try:
text_path = tempfile.mktemp(prefix='tree_unittest_')
binary_path = tempfile.mktemp(prefix='tree_unittest_')
@@ -219,6 +221,12 @@ class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
fs.write_binary_file(binary_path, hex_equivalent)
text_contents = fs.read_text_file(binary_path)
self.assertEqual(text_contents, unicode_text_string)
+
+ self.assertRaises(ValueError, fs.write_text_file, binary_path, malformed_text_hex)
+ fs.write_binary_file(binary_path, malformed_text_hex)
+ self.assertRaises(ValueError, fs.read_text_file, binary_path)
+ text_contents = fs.read_binary_file(binary_path).decode('utf8', 'ignore')
+ self.assertEquals(text_contents, malformed_ignored_text_hex)
finally:
if text_path and fs.isfile(text_path):
os.remove(text_path)
@@ -254,7 +262,3 @@ class RealFileSystemTest(unittest.TestCase, GenericFileSystemTests):
self.assertEqual(fs.sep, os.sep)
self.assertEqual(fs.join("foo", "bar"),
os.path.join("foo", "bar"))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/system/logtesting.py b/Tools/Scripts/webkitpy/common/system/logtesting.py
index 0cfa6cb0a..1aba1726a 100644
--- a/Tools/Scripts/webkitpy/common/system/logtesting.py
+++ b/Tools/Scripts/webkitpy/common/system/logtesting.py
@@ -32,7 +32,7 @@ see the TestLogStream class, and perhaps also the LogTesting class.
"""
import logging
-import unittest
+import unittest2 as unittest
class TestLogStream(object):
diff --git a/Tools/Scripts/webkitpy/common/system/logutils_unittest.py b/Tools/Scripts/webkitpy/common/system/logutils_unittest.py
index 6d7cc4da4..252ebf4cc 100644
--- a/Tools/Scripts/webkitpy/common/system/logutils_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/logutils_unittest.py
@@ -24,7 +24,7 @@
import logging
import os
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.logtesting import LogTesting
from webkitpy.common.system.logtesting import TestLogStream
diff --git a/Tools/Scripts/webkitpy/common/system/outputcapture.py b/Tools/Scripts/webkitpy/common/system/outputcapture.py
index 26670d214..893b5e528 100644
--- a/Tools/Scripts/webkitpy/common/system/outputcapture.py
+++ b/Tools/Scripts/webkitpy/common/system/outputcapture.py
@@ -29,8 +29,8 @@
# Class for unittest support. Used for capturing stderr/stdout.
import logging
+import unittest # Don't use unittest2 here as the autoinstaller may not have it yet.
import sys
-import unittest
from StringIO import StringIO
@@ -94,15 +94,22 @@ class OutputCapture(object):
finally:
(stdout_string, stderr_string, logs_string) = self.restore_output()
- testcase.assertEqual(stdout_string, expected_stdout)
- testcase.assertEqual(stderr_string, expected_stderr)
+ if hasattr(testcase, 'assertMultiLineEqual'):
+ testassert = testcase.assertMultiLineEqual
+ else:
+ testassert = testcase.assertEqual
+
+ testassert(stdout_string, expected_stdout)
+ testassert(stderr_string, expected_stderr)
if expected_logs is not None:
- testcase.assertEqual(logs_string, expected_logs)
+ testassert(logs_string, expected_logs)
# This is a little strange, but I don't know where else to return this information.
return return_value
class OutputCaptureTestCaseBase(unittest.TestCase):
+ maxDiff = None
+
def setUp(self):
unittest.TestCase.setUp(self)
self.output_capture = OutputCapture()
diff --git a/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py b/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py
index da4347c8d..7ef2e247a 100644
--- a/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/outputcapture_unittest.py
@@ -21,7 +21,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
@@ -43,7 +43,7 @@ class OutputCaptureTest(unittest.TestCase):
actual_stdout, actual_stderr, actual_logs = self.output.restore_output()
self.assertEqual('', actual_stdout)
self.assertEqual('', actual_stderr)
- self.assertEqual(expected_logs, actual_logs)
+ self.assertMultiLineEqual(expected_logs, actual_logs)
def test_initial_log_level(self):
self.output.capture_output()
diff --git a/Tools/Scripts/webkitpy/common/system/outputtee_unittest.py b/Tools/Scripts/webkitpy/common/system/outputtee_unittest.py
index 6a509f0c2..8d06916f8 100644
--- a/Tools/Scripts/webkitpy/common/system/outputtee_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/outputtee_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import StringIO
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.outputtee import Tee, OutputTee
diff --git a/Tools/Scripts/webkitpy/common/system/path_unittest.py b/Tools/Scripts/webkitpy/common/system/path_unittest.py
index 7a719584d..118546e68 100644
--- a/Tools/Scripts/webkitpy/common/system/path_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/path_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
import sys
from webkitpy.common.system.systemhost import SystemHost
diff --git a/Tools/Scripts/webkitpy/common/system/platforminfo.py b/Tools/Scripts/webkitpy/common/system/platforminfo.py
index b2451f5f9..582e1996f 100644
--- a/Tools/Scripts/webkitpy/common/system/platforminfo.py
+++ b/Tools/Scripts/webkitpy/common/system/platforminfo.py
@@ -155,7 +155,7 @@ class PlatformInfo(object):
def _win_version_tuple_from_cmd(self):
# Note that this should only ever be called on windows, so this should always work.
- ver_output = self._executive.run_command(['cmd', '/c', 'ver'])
+ ver_output = self._executive.run_command(['cmd', '/c', 'ver'], decode_output=False)
match_object = re.search(r'(?P<major>\d)\.(?P<minor>\d)\.(?P<build>\d+)', ver_output)
assert match_object, 'cmd returned an unexpected version string: ' + ver_output
return tuple(map(int, match_object.groups()))
diff --git a/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py b/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
index 327229eb9..bdb0f8661 100644
--- a/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/platforminfo_unittest.py
@@ -28,7 +28,7 @@
import platform
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive import Executive
from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
@@ -79,12 +79,12 @@ class TestPlatformInfo(unittest.TestCase):
self.assertNotEquals(info.os_version, '')
self.assertNotEquals(info.display_name(), '')
self.assertTrue(info.is_mac() or info.is_win() or info.is_linux() or info.is_freebsd())
- self.assertNotEquals(info.terminal_width(), None)
+ self.assertIsNotNone(info.terminal_width())
if info.is_mac():
self.assertTrue(info.total_bytes_memory() > 0)
else:
- self.assertEqual(info.total_bytes_memory(), None)
+ self.assertIsNone(info.total_bytes_memory())
def test_os_name_and_wrappers(self):
info = self.make_info(fake_sys('linux2'))
@@ -172,14 +172,10 @@ class TestPlatformInfo(unittest.TestCase):
self.assertEqual(info.total_bytes_memory(), 1234)
info = self.make_info(fake_sys('win32', tuple([6, 1, 7600])))
- self.assertEqual(info.total_bytes_memory(), None)
+ self.assertIsNone(info.total_bytes_memory())
info = self.make_info(fake_sys('linux2'))
- self.assertEqual(info.total_bytes_memory(), None)
+ self.assertIsNone(info.total_bytes_memory())
info = self.make_info(fake_sys('freebsd9'))
- self.assertEqual(info.total_bytes_memory(), None)
-
-
-if __name__ == '__main__':
- unittest.main()
+ self.assertIsNone(info.total_bytes_memory())
diff --git a/Tools/Scripts/webkitpy/common/system/profiler.py b/Tools/Scripts/webkitpy/common/system/profiler.py
index 264a4e238..0208cf898 100644
--- a/Tools/Scripts/webkitpy/common/system/profiler.py
+++ b/Tools/Scripts/webkitpy/common/system/profiler.py
@@ -28,19 +28,44 @@
import logging
import re
+import itertools
_log = logging.getLogger(__name__)
class ProfilerFactory(object):
@classmethod
- def create_profiler(cls, host, executable_path, output_dir, identifier=None):
- if host.platform.is_mac():
- return Instruments(host, executable_path, output_dir, identifier)
- return GooglePProf(host, executable_path, output_dir, identifier)
+ def create_profiler(cls, host, executable_path, output_dir, profiler_name=None, identifier=None):
+ profilers = cls.profilers_for_platform(host.platform)
+ if not profilers:
+ return None
+ profiler_name = profiler_name or cls.default_profiler_name(host.platform)
+ profiler_class = next(itertools.ifilter(lambda profiler: profiler.name == profiler_name, profilers), None)
+ if not profiler_class:
+ return None
+ return profilers[0](host, executable_path, output_dir, identifier)
+
+ @classmethod
+ def default_profiler_name(cls, platform):
+ profilers = cls.profilers_for_platform(platform)
+ return profilers[0].name if profilers else None
+
+ @classmethod
+ def profilers_for_platform(cls, platform):
+ # GooglePProf requires TCMalloc/google-perftools, but is available everywhere.
+ profilers_by_os_name = {
+ 'mac': [IProfiler, Sample, GooglePProf],
+ 'linux': [Perf, GooglePProf],
+ # Note: freebsd, win32 have no profilers defined yet, thus --profile will be ignored
+ # by default, but a profiler can be selected with --profiler=PROFILER explicitly.
+ }
+ return profilers_by_os_name.get(platform.os_name, [])
class Profiler(object):
+ # Used by ProfilerFactory to lookup a profiler from the --profiler=NAME option.
+ name = None
+
def __init__(self, host, executable_path, output_dir, identifier=None):
self._host = host
self._executable_path = executable_path
@@ -61,10 +86,14 @@ class Profiler(object):
class SingleFileOutputProfiler(Profiler):
def __init__(self, host, executable_path, output_dir, output_suffix, identifier=None):
super(SingleFileOutputProfiler, self).__init__(host, executable_path, output_dir, identifier)
- self._output_path = self._host.workspace.find_unused_filename(self._output_dir, self._identifier, output_suffix)
+ # FIXME: Currently all reports are kept as test.*, until we fix that, search up to 1000 names before giving up.
+ self._output_path = self._host.workspace.find_unused_filename(self._output_dir, self._identifier, output_suffix, search_limit=1000)
+ assert(self._output_path)
class GooglePProf(SingleFileOutputProfiler):
+ name = 'pprof'
+
def __init__(self, host, executable_path, output_dir, identifier=None):
super(GooglePProf, self).__init__(host, executable_path, output_dir, "pprof", identifier)
@@ -76,24 +105,106 @@ class GooglePProf(SingleFileOutputProfiler):
match = re.search("^Total:[^\n]*\n((?:[^\n]*\n){0,10})", pprof_output, re.MULTILINE)
return match.group(1) if match else None
- def profile_after_exit(self):
+ def _pprof_path(self):
# FIXME: We should have code to find the right google-pprof executable, some Googlers have
# google-pprof installed as "pprof" on their machines for them.
- # FIXME: Similarly we should find the right perl!
- pprof_args = ['/usr/bin/perl', '/usr/bin/google-pprof', '--text', self._executable_path, self._output_path]
+ return '/usr/bin/google-pprof'
+
+ def profile_after_exit(self):
+ # google-pprof doesn't check its arguments, so we have to.
+ if not (self._host.filesystem.exists(self._output_path)):
+ print "Failed to gather profile, %s does not exist." % self._output_path
+ return
+
+ pprof_args = [self._pprof_path(), '--text', self._executable_path, self._output_path]
profile_text = self._host.executive.run_command(pprof_args)
+ print "First 10 lines of pprof --text:"
print self._first_ten_lines_of_profile(profile_text)
+ print "http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html documents output."
+ print
+ print "To interact with the the full profile, including produce graphs:"
+ print ' '.join([self._pprof_path(), self._executable_path, self._output_path])
+
+class Perf(SingleFileOutputProfiler):
+ name = 'perf'
-# FIXME: iprofile is a newer commandline interface to replace /usr/bin/instruments.
-class Instruments(SingleFileOutputProfiler):
def __init__(self, host, executable_path, output_dir, identifier=None):
- super(Instruments, self).__init__(host, executable_path, output_dir, "trace", identifier)
+ super(Perf, self).__init__(host, executable_path, output_dir, "data", identifier)
+ self._perf_process = None
+ self._pid_being_profiled = None
- # FIXME: We may need a way to find this tracetemplate on the disk
- _time_profile = "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/Time Profiler.tracetemplate"
+ def _perf_path(self):
+ # FIXME: We may need to support finding the perf binary in other locations.
+ return 'perf'
def attach_to_pid(self, pid):
- cmd = ["instruments", "-t", self._time_profile, "-D", self._output_path, "-p", pid]
- cmd = map(unicode, cmd)
- self._host.executive.popen(cmd)
+ assert(not self._perf_process and not self._pid_being_profiled)
+ self._pid_being_profiled = pid
+ cmd = [self._perf_path(), "record", "--call-graph", "--pid", pid, "--output", self._output_path]
+ self._perf_process = self._host.executive.popen(cmd)
+
+ def _first_ten_lines_of_profile(self, perf_output):
+ match = re.search("^#[^\n]*\n((?: [^\n]*\n){1,10})", perf_output, re.MULTILINE)
+ return match.group(1) if match else None
+
+ def profile_after_exit(self):
+ # Perf doesn't automatically watch the attached pid for death notifications,
+ # so we have to do it for it, and then tell it its time to stop sampling. :(
+ self._host.executive.wait_limited(self._pid_being_profiled, limit_in_seconds=10)
+ perf_exitcode = self._perf_process.poll()
+ if perf_exitcode is None: # This should always be the case, unless perf error'd out early.
+ self._host.executive.interrupt(self._perf_process.pid)
+
+ perf_exitcode = self._perf_process.wait()
+ if perf_exitcode not in (0, -2): # The exit code should always be -2, as we're always interrupting perf.
+ print "'perf record' failed (exit code: %i), can't process results:" % perf_exitcode
+ return
+
+ perf_args = [self._perf_path(), 'report', '--call-graph', 'none', '--input', self._output_path]
+ print "First 10 lines of 'perf report --call-graph=none':"
+
+ print " ".join(perf_args)
+ perf_output = self._host.executive.run_command(perf_args)
+ print self._first_ten_lines_of_profile(perf_output)
+
+ print "To view the full profile, run:"
+ print ' '.join([self._perf_path(), 'report', '-i', self._output_path])
+ print # An extra line between tests looks nicer.
+
+
+class Sample(SingleFileOutputProfiler):
+ name = 'sample'
+
+ def __init__(self, host, executable_path, output_dir, identifier=None):
+ super(Sample, self).__init__(host, executable_path, output_dir, "txt", identifier)
+ self._profiler_process = None
+
+ def attach_to_pid(self, pid):
+ cmd = ["sample", pid, "-mayDie", "-file", self._output_path]
+ self._profiler_process = self._host.executive.popen(cmd)
+
+ def profile_after_exit(self):
+ self._profiler_process.wait()
+
+
+class IProfiler(SingleFileOutputProfiler):
+ name = 'iprofiler'
+
+ def __init__(self, host, executable_path, output_dir, identifier=None):
+ super(IProfiler, self).__init__(host, executable_path, output_dir, "dtps", identifier)
+ self._profiler_process = None
+
+ def attach_to_pid(self, pid):
+ # FIXME: iprofiler requires us to pass the directory separately
+ # from the basename of the file, with no control over the extension.
+ fs = self._host.filesystem
+ cmd = ["iprofiler", "-timeprofiler", "-a", pid,
+ "-d", fs.dirname(self._output_path), "-o", fs.splitext(fs.basename(self._output_path))[0]]
+ # FIXME: Consider capturing instead of letting instruments spam to stderr directly.
+ self._profiler_process = self._host.executive.popen(cmd)
+
+ def profile_after_exit(self):
+ # It seems like a nicer user experiance to wait on the profiler to exit to prevent
+ # it from spewing to stderr at odd times.
+ self._profiler_process.wait()
diff --git a/Tools/Scripts/webkitpy/common/system/profiler_unittest.py b/Tools/Scripts/webkitpy/common/system/profiler_unittest.py
index 059b7cfa1..22bc2df6e 100644
--- a/Tools/Scripts/webkitpy/common/system/profiler_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/profiler_unittest.py
@@ -26,25 +26,41 @@
# (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 unittest
+import unittest2 as unittest
+from webkitpy.common.system.platforminfo_mock import MockPlatformInfo
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from .profiler import ProfilerFactory, Instruments, GooglePProf
+from .profiler import ProfilerFactory, GooglePProf
class ProfilerFactoryTest(unittest.TestCase):
- def test_basic(self):
+ def _assert_default_profiler_name(self, os_name, expected_profiler_name):
+ profiler_name = ProfilerFactory.default_profiler_name(MockPlatformInfo(os_name))
+ self.assertEqual(profiler_name, expected_profiler_name)
+
+ def test_default_profilers(self):
+ self._assert_default_profiler_name('mac', 'iprofiler')
+ self._assert_default_profiler_name('linux', 'perf')
+ self._assert_default_profiler_name('win32', None)
+ self._assert_default_profiler_name('freebsd', None)
+
+ def test_default_profiler_output(self):
host = MockSystemHost()
self.assertFalse(host.filesystem.exists("/tmp/output"))
+
+ # Default mocks are Mac, so iprofile should be default.
profiler = ProfilerFactory.create_profiler(host, '/bin/executable', '/tmp/output')
self.assertTrue(host.filesystem.exists("/tmp/output"))
- self.assertEquals(profiler._output_path, "/tmp/output/test.trace")
+ self.assertEqual(profiler._output_path, "/tmp/output/test.dtps")
+ # Linux defaults to perf.
host.platform.os_name = 'linux'
profiler = ProfilerFactory.create_profiler(host, '/bin/executable', '/tmp/output')
- self.assertEquals(profiler._output_path, "/tmp/output/test.pprof")
+ self.assertEqual(profiler._output_path, "/tmp/output/test.data")
+
+class GooglePProfTest(unittest.TestCase):
def test_pprof_output_regexp(self):
pprof_output = """
sometimes
@@ -84,4 +100,4 @@ Total: 3770 samples
"""
host = MockSystemHost()
profiler = GooglePProf(host, '/bin/executable', '/tmp/output')
- self.assertEquals(profiler._first_ten_lines_of_profile(pprof_output), expected_first_ten_lines)
+ self.assertEqual(profiler._first_ten_lines_of_profile(pprof_output), expected_first_ten_lines)
diff --git a/Tools/Scripts/webkitpy/common/system/stack_utils_unittest.py b/Tools/Scripts/webkitpy/common/system/stack_utils_unittest.py
index 625acf2b3..3050adc99 100644
--- a/Tools/Scripts/webkitpy/common/system/stack_utils_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/stack_utils_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system import outputcapture
from webkitpy.common.system import stack_utils
@@ -42,11 +42,11 @@ class StackUtilsTest(unittest.TestCase):
def test_find_thread_stack_found(self):
thread_id = current_thread_id()
found_stack = stack_utils._find_thread_stack(thread_id)
- self.assertNotEqual(found_stack, None)
+ self.assertIsNotNone(found_stack)
def test_find_thread_stack_not_found(self):
found_stack = stack_utils._find_thread_stack(0)
- self.assertEqual(found_stack, None)
+ self.assertIsNone(found_stack)
def test_log_thread_state(self):
msgs = []
diff --git a/Tools/Scripts/webkitpy/common/system/user_unittest.py b/Tools/Scripts/webkitpy/common/system/user_unittest.py
index bd86d228f..49810b2e0 100644
--- a/Tools/Scripts/webkitpy/common/system/user_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/user_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.user import User
diff --git a/Tools/Scripts/webkitpy/common/system/workspace.py b/Tools/Scripts/webkitpy/common/system/workspace.py
index 686837619..1d92aca13 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace.py
@@ -67,7 +67,7 @@ class Workspace(object):
try:
self._executive.run_command(['zip', '-9', '-r', zip_path, '.'], cwd=source_path)
except ScriptError, e:
- _log.error("Workspace.create_zip failed:\n%s" % e.message_with_output())
+ _log.error("Workspace.create_zip failed in %s:\n%s" % (source_path, e.message_with_output()))
return None
return zip_class(zip_path)
diff --git a/Tools/Scripts/webkitpy/common/system/workspace_mock.py b/Tools/Scripts/webkitpy/common/system/workspace_mock.py
index 005f86cf3..02a5f4c29 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace_mock.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace_mock.py
@@ -32,4 +32,6 @@ class MockWorkspace(object):
return "%s/%s.%s" % (directory, name, extension)
def create_zip(self, zip_path, source_path):
+ self.zip_path = zip_path
+ self.source_path = source_path
return object() # Something that is not None
diff --git a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
index eca386ac3..8262f6cf1 100644
--- a/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/workspace_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
@@ -60,7 +60,7 @@ class WorkspaceTest(unittest.TestCase):
def test_create_zip_exception(self):
workspace = Workspace(None, MockExecutive(should_log=True, should_throw=True))
expected_logs = """MOCK run_command: ['zip', '-9', '-r', '/zip/path', '.'], cwd=/source/path
-Workspace.create_zip failed:
+Workspace.create_zip failed in /source/path:
MOCK ScriptError
MOCK output of child process
@@ -69,4 +69,4 @@ MOCK output of child process
def __init__(self, path):
self.filename = path
archive = OutputCapture().assert_outputs(self, workspace.create_zip, ["/zip/path", "/source/path", MockZipFile], expected_logs=expected_logs)
- self.assertEqual(archive, None)
+ self.assertIsNone(archive)
diff --git a/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py b/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
index 22ba72082..1a0603c9e 100644
--- a/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/zipfileset_unittest.py
@@ -23,7 +23,7 @@
import shutil
import tempfile
-import unittest
+import unittest2 as unittest
import zipfile
from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -92,7 +92,3 @@ class ZipFileSetTest(unittest.TestCase):
def test_namelist(self):
self.assertTrue('some-file' in self._zip.namelist())
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py b/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
index f731db2b2..1a4677230 100644
--- a/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
+++ b/Tools/Scripts/webkitpy/common/thread/messagepump_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.thread.messagepump import MessagePump, MessagePumpDelegate
from webkitpy.common.thread.threadedmessagequeue import ThreadedMessageQueue
diff --git a/Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py b/Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py
index cb67c1e82..dbb8a2e42 100644
--- a/Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py
+++ b/Tools/Scripts/webkitpy/common/thread/threadedmessagequeue_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.thread.threadedmessagequeue import ThreadedMessageQueue
diff --git a/Tools/Scripts/webkitpy/common/version_check.py b/Tools/Scripts/webkitpy/common/version_check.py
index 6acc9b439..c0505443f 100644
--- a/Tools/Scripts/webkitpy/common/version_check.py
+++ b/Tools/Scripts/webkitpy/common/version_check.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern_unittest.py
index 7ae45fa3f..b222d3a50 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern_unittest.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/amountchangedpattern_unittest.py
@@ -31,7 +31,7 @@
import re
-import unittest
+import unittest2 as unittest
from webkitpy.common.watchlist.amountchangedpattern import AmountChangedPattern
diff --git a/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py
index 1f2aeda23..2f5fd68be 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/changedlinepattern_unittest.py
@@ -29,7 +29,7 @@
'''Unit tests for changedlinepattern.py.'''
import re
-import unittest
+import unittest2 as unittest
from webkitpy.common.watchlist.changedlinepattern import ChangedLinePattern
diff --git a/Tools/Scripts/webkitpy/common/watchlist/filenamepattern_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/filenamepattern_unittest.py
index 0afdf3005..2b51dd68f 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/filenamepattern_unittest.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/filenamepattern_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import re
-import unittest
+import unittest2 as unittest
from webkitpy.common.watchlist.filenamepattern import FilenamePattern
diff --git a/Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py
index 67ff3b01a..dd7b083ea 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/watchlist_unittest.py
@@ -28,7 +28,7 @@
'''Unit tests for watchlist.py.'''
-import unittest
+import unittest2 as unittest
from webkitpy.common.checkout.diff_test_data import DIFF_TEST_DATA
from webkitpy.common.watchlist.watchlistparser import WatchListParser
diff --git a/Tools/Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py
deleted file mode 100644
index 8d3fa9806..000000000
--- a/Tools/Scripts/webkitpy/common/watchlist/watchlistloader_unittest.py
+++ /dev/null
@@ -1,45 +0,0 @@
-# Copyright (C) 2011 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.
-
-'''Unit tests for watchlistloader.py.'''
-
-from webkitpy.common import webkitunittest
-from webkitpy.common.system import filesystem_mock
-from webkitpy.common.system import filesystem
-from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.common.watchlist.watchlistloader import WatchListLoader
-
-
-class WatchListLoaderTest(webkitunittest.TestCase):
- def test_watch_list_not_found(self):
- loader = WatchListLoader(filesystem_mock.MockFileSystem())
- self.assertRaisesRegexp(Exception, r'Watch list file \(.*/watchlist\) not found\.', loader.load)
-
- def test_watch_list_load(self):
- # Test parsing of the checked-in watch list.
- OutputCapture().assert_outputs(self, WatchListLoader(filesystem.FileSystem()).load, expected_logs="")
diff --git a/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py b/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py
index c72eab36e..1d3f581b6 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/watchlistparser.py
@@ -152,7 +152,7 @@ class WatchListParser(object):
# modifying a list while iterating through it leads to undefined behavior.
intructions_copy = cc_rule.instructions()[:]
for email in intructions_copy:
- if not accounts.account_by_login(email):
+ if not accounts.contributor_by_email(email):
cc_rule.remove_instruction(email)
self._log_error("The email alias %s which is in the watchlist is not listed as a contributor in committers.py" % email)
continue
diff --git a/Tools/Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py
index 3bd4dc2d9..d06a72dac 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/watchlistparser_unittest.py
@@ -185,6 +185,23 @@ class WatchListParserTest(webkitunittest.TestCase):
expected_logs='The email alias levin+bad+email@chromium.org which is'
+ ' in the watchlist is not listed as a contributor in committers.py\n')
+ def test_cc_rule_with_secondary_email(self):
+ # FIXME: We should provide a mock of CommitterList so that we can test this on fake data.
+ watch_list = (
+ '{'
+ ' "DEFINITIONS": {'
+ ' "WatchList1": {'
+ ' "filename": r".*\\MyFileName\\.cpp",'
+ ' },'
+ ' },'
+ ' "CC_RULES": {'
+ ' "WatchList1": ["ojan.autocc@gmail.com"],'
+ ' },'
+ '}')
+
+ OutputCapture().assert_outputs(self, self._watch_list_parser.parse, args=[watch_list],
+ expected_logs='')
+
def test_empty_message_rule(self):
watch_list = (
'{'
diff --git a/Tools/Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py b/Tools/Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py
index 92aaf34ab..d926887e5 100644
--- a/Tools/Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py
+++ b/Tools/Scripts/webkitpy/common/watchlist/watchlistrule_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import unittest
+import unittest2 as unittest
from webkitpy.common.watchlist.watchlistrule import WatchListRule
diff --git a/Tools/Scripts/webkitpy/common/webkit_finder.py b/Tools/Scripts/webkitpy/common/webkit_finder.py
index 3705ef37f..7b9c0145e 100644
--- a/Tools/Scripts/webkitpy/common/webkit_finder.py
+++ b/Tools/Scripts/webkitpy/common/webkit_finder.py
@@ -44,7 +44,7 @@ class WebKitFinder(object):
if not self._webkit_base:
self._webkit_base = self._webkit_base
module_path = self._filesystem.path_to_module(self.__module__)
- tools_index = module_path.find('Tools')
+ tools_index = module_path.rfind('Tools')
assert tools_index != -1, "could not find location of this checkout from %s" % module_path
self._webkit_base = self._filesystem.normpath(module_path[0:tools_index - 1])
return self._webkit_base
diff --git a/Tools/Scripts/webkitpy/common/webkitunittest.py b/Tools/Scripts/webkitpy/common/webkitunittest.py
index 7b650a1eb..dd6152379 100644
--- a/Tools/Scripts/webkitpy/common/webkitunittest.py
+++ b/Tools/Scripts/webkitpy/common/webkitunittest.py
@@ -29,7 +29,7 @@
'''Basic unit test functionality.'''
import re
-import unittest
+import unittest2 as unittest
class TestCase(unittest.TestCase):
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
index 54ce5e6fe..3fd40e38f 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py
@@ -28,12 +28,12 @@
import logging
import math
-import re
import threading
import time
from webkitpy.common import message_pool
from webkitpy.layout_tests.controllers import single_test_runner
+from webkitpy.layout_tests.models.test_run_results import TestRunResults
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models import test_results
@@ -61,54 +61,47 @@ class TestRunInterruptedException(Exception):
class LayoutTestRunner(object):
- def __init__(self, options, port, printer, results_directory, expectations, test_is_slow_fn):
+ def __init__(self, options, port, printer, results_directory, test_is_slow_fn):
self._options = options
self._port = port
self._printer = printer
self._results_directory = results_directory
- self._expectations = None
self._test_is_slow = test_is_slow_fn
self._sharder = Sharder(self._port.split_test, self._options.max_locked_shards)
+ self._filesystem = self._port.host.filesystem
- self._current_result_summary = None
+ self._expectations = None
+ self._test_inputs = []
self._needs_http = None
self._needs_websockets = None
self._retrying = False
- self._test_files_list = []
- self._all_results = []
- self._group_stats = {}
- self._worker_stats = {}
- self._filesystem = self._port.host.filesystem
- def run_tests(self, test_inputs, expectations, result_summary, num_workers, needs_http, needs_websockets, retrying):
- """Returns a tuple of (interrupted, keyboard_interrupted, thread_timings, test_timings, individual_test_timings):
- interrupted is whether the run was interrupted
- keyboard_interrupted is whether the interruption was because someone typed Ctrl^C
- thread_timings is a list of dicts with the total runtime
- of each thread with 'name', 'num_tests', 'total_time' properties
- test_timings is a list of timings for each sharded subdirectory
- of the form [time, directory_name, num_tests]
- individual_test_timings is a list of run times for each test
- in the form {filename:filename, test_run_time:test_run_time}
- result_summary: summary object to populate with the results
- """
- self._current_result_summary = result_summary
+ self._current_run_results = None
+ self._remaining_locked_shards = []
+ self._has_http_lock = False
+
+ def run_tests(self, expectations, test_inputs, tests_to_skip, num_workers, needs_http, needs_websockets, retrying):
self._expectations = expectations
+ self._test_inputs = test_inputs
self._needs_http = needs_http
self._needs_websockets = needs_websockets
self._retrying = retrying
- self._test_files_list = [test_input.test_name for test_input in test_inputs]
- self._printer.num_tests = len(self._test_files_list)
- self._printer.num_completed = 0
- self._all_results = []
- self._group_stats = {}
- self._worker_stats = {}
- self._has_http_lock = False
+ # FIXME: rename all variables to test_run_results or some such ...
+ run_results = TestRunResults(self._expectations, len(test_inputs) + len(tests_to_skip))
+ self._current_run_results = run_results
self._remaining_locked_shards = []
+ self._has_http_lock = False
+ self._printer.num_tests = len(test_inputs)
+ self._printer.num_started = 0
+
+ if not retrying:
+ self._printer.print_expected(run_results, self._expectations.get_tests_with_result_type)
- keyboard_interrupted = False
- interrupted = False
+ for test_name in set(tests_to_skip):
+ result = test_results.TestResult(test_name)
+ result.type = test_expectations.SKIP
+ run_results.add(result, expected=True, test_is_slow=self._test_is_slow(test_name))
self._printer.write_update('Sharding tests ...')
locked_shards, unlocked_shards = self._sharder.shard_tests(test_inputs, int(self._options.child_processes), self._options.fully_parallel)
@@ -123,35 +116,34 @@ class LayoutTestRunner(object):
all_shards = locked_shards + unlocked_shards
self._remaining_locked_shards = locked_shards
- if self._port.requires_http_server() or (locked_shards and self._options.http):
+ if locked_shards and self._options.http:
self.start_servers_with_lock(2 * min(num_workers, len(locked_shards)))
num_workers = min(num_workers, len(all_shards))
self._printer.print_workers_and_shards(num_workers, len(all_shards), len(locked_shards))
if self._options.dry_run:
- return (keyboard_interrupted, interrupted, self._worker_stats.values(), self._group_stats, self._all_results)
+ return run_results
self._printer.write_update('Starting %s ...' % grammar.pluralize('worker', num_workers))
try:
with message_pool.get(self, self._worker_factory, num_workers, self._port.worker_startup_delay_secs(), self._port.host) as pool:
pool.run(('test_list', shard.name, shard.test_inputs) for shard in all_shards)
+ except TestRunInterruptedException, e:
+ _log.warning(e.reason)
+ run_results.interrupted = True
except KeyboardInterrupt:
self._printer.flush()
self._printer.writeln('Interrupted, exiting ...')
- keyboard_interrupted = True
- except TestRunInterruptedException, e:
- _log.warning(e.reason)
- interrupted = True
+ raise
except Exception, e:
_log.debug('%s("%s") raised, exiting' % (e.__class__.__name__, str(e)))
raise
finally:
self.stop_servers_with_lock()
- # FIXME: should this be a class instead of a tuple?
- return (interrupted, keyboard_interrupted, self._worker_stats.values(), self._group_stats, self._all_results)
+ return run_results
def _worker_factory(self, worker_connection):
results_directory = self._results_directory
@@ -160,37 +152,37 @@ class LayoutTestRunner(object):
results_directory = self._filesystem.join(self._results_directory, 'retries')
return Worker(worker_connection, results_directory, self._options)
- def _mark_interrupted_tests_as_skipped(self, result_summary):
- for test_name in self._test_files_list:
- if test_name not in result_summary.results:
- result = test_results.TestResult(test_name, [test_failures.FailureEarlyExit()])
+ def _mark_interrupted_tests_as_skipped(self, run_results):
+ for test_input in self._test_inputs:
+ if test_input.test_name not in run_results.results_by_name:
+ result = test_results.TestResult(test_input.test_name, [test_failures.FailureEarlyExit()])
# FIXME: We probably need to loop here if there are multiple iterations.
# FIXME: Also, these results are really neither expected nor unexpected. We probably
# need a third type of result.
- result_summary.add(result, expected=False, test_is_slow=self._test_is_slow(test_name))
+ run_results.add(result, expected=False, test_is_slow=self._test_is_slow(test_input.test_name))
- def _interrupt_if_at_failure_limits(self, result_summary):
+ def _interrupt_if_at_failure_limits(self, run_results):
# Note: The messages in this method are constructed to match old-run-webkit-tests
# so that existing buildbot grep rules work.
- def interrupt_if_at_failure_limit(limit, failure_count, result_summary, message):
+ def interrupt_if_at_failure_limit(limit, failure_count, run_results, message):
if limit and failure_count >= limit:
- message += " %d tests run." % (result_summary.expected + result_summary.unexpected)
- self._mark_interrupted_tests_as_skipped(result_summary)
+ message += " %d tests run." % (run_results.expected + run_results.unexpected)
+ self._mark_interrupted_tests_as_skipped(run_results)
raise TestRunInterruptedException(message)
interrupt_if_at_failure_limit(
self._options.exit_after_n_failures,
- result_summary.unexpected_failures,
- result_summary,
- "Exiting early after %d failures." % result_summary.unexpected_failures)
+ run_results.unexpected_failures,
+ run_results,
+ "Exiting early after %d failures." % run_results.unexpected_failures)
interrupt_if_at_failure_limit(
self._options.exit_after_n_crashes_or_timeouts,
- result_summary.unexpected_crashes + result_summary.unexpected_timeouts,
- result_summary,
+ run_results.unexpected_crashes + run_results.unexpected_timeouts,
+ run_results,
# This differs from ORWT because it does not include WebProcess crashes.
- "Exiting early after %d crashes and %d timeouts." % (result_summary.unexpected_crashes, result_summary.unexpected_timeouts))
+ "Exiting early after %d crashes and %d timeouts." % (run_results.unexpected_crashes, run_results.unexpected_timeouts))
- def _update_summary_with_result(self, result_summary, result):
+ def _update_summary_with_result(self, run_results, result):
if result.type == test_expectations.SKIP:
exp_str = got_str = 'SKIP'
expected = True
@@ -199,11 +191,11 @@ class LayoutTestRunner(object):
exp_str = self._expectations.get_expectations_string(result.test_name)
got_str = self._expectations.expectation_to_string(result.type)
- result_summary.add(result, expected, self._test_is_slow(result.test_name))
+ run_results.add(result, expected, self._test_is_slow(result.test_name))
self._printer.print_finished_test(result, expected, exp_str, got_str)
- self._interrupt_if_at_failure_limits(result_summary)
+ self._interrupt_if_at_failure_limits(run_results)
def start_servers_with_lock(self, number_of_servers):
self._printer.write_update('Acquiring http lock ...')
@@ -237,9 +229,7 @@ class LayoutTestRunner(object):
def _handle_started_test(self, worker_name, test_input, test_timeout_sec):
self._printer.print_started_test(test_input.test_name)
- def _handle_finished_test_list(self, worker_name, list_name, num_tests, elapsed_time):
- self._group_stats[list_name] = (num_tests, elapsed_time)
-
+ def _handle_finished_test_list(self, worker_name, list_name):
def find(name, test_lists):
for i in range(len(test_lists)):
if test_lists[i].name == name:
@@ -249,15 +239,11 @@ class LayoutTestRunner(object):
index = find(list_name, self._remaining_locked_shards)
if index >= 0:
self._remaining_locked_shards.pop(index)
- if not self._remaining_locked_shards and not self._port.requires_http_server():
+ if not self._remaining_locked_shards:
self.stop_servers_with_lock()
- def _handle_finished_test(self, worker_name, result, elapsed_time, log_messages=[]):
- self._worker_stats.setdefault(worker_name, {'name': worker_name, 'num_tests': 0, 'total_time': 0})
- self._worker_stats[worker_name]['total_time'] += elapsed_time
- self._worker_stats[worker_name]['num_tests'] += 1
- self._all_results.append(result)
- self._update_summary_with_result(self._current_result_summary, result)
+ def _handle_finished_test(self, worker_name, result, log_messages=[]):
+ self._update_summary_with_result(self._current_run_results, result)
class Worker(object):
@@ -275,8 +261,7 @@ class Worker(object):
self._batch_count = None
self._filesystem = None
self._driver = None
- self._tests_run_file = None
- self._tests_run_filename = None
+ self._num_tests = 0
def __del__(self):
self.stop()
@@ -291,16 +276,12 @@ class Worker(object):
self._batch_count = 0
self._batch_size = self._options.batch_size or 0
- tests_run_filename = self._filesystem.join(self._results_directory, "tests_run%d.txt" % self._worker_number)
- self._tests_run_file = self._filesystem.open_text_file_for_writing(tests_run_filename)
def handle(self, name, source, test_list_name, test_inputs):
assert name == 'test_list'
- start_time = time.time()
for test_input in test_inputs:
- self._run_test(test_input)
- elapsed_time = time.time() - start_time
- self._caller.post('finished_test_list', test_list_name, len(test_inputs), elapsed_time)
+ self._run_test(test_input, test_list_name)
+ self._caller.post('finished_test_list', test_list_name)
def _update_test_input(self, test_input):
if test_input.reference_files is None:
@@ -311,7 +292,7 @@ class Worker(object):
else:
test_input.should_run_pixel_test = self._port.should_run_as_pixel_test(test_input)
- def _run_test(self, test_input):
+ def _run_test(self, test_input, shard_name):
self._batch_count += 1
stop_when_done = False
@@ -325,18 +306,19 @@ class Worker(object):
self._caller.post('started_test', test_input, test_timeout_sec)
result = self._run_test_with_timeout(test_input, test_timeout_sec, stop_when_done)
+ result.shard_name = shard_name
+ result.worker_name = self._name
+ result.total_run_time = time.time() - start
+ result.test_number = self._num_tests
+ self._num_tests += 1
- elapsed_time = time.time() - start
- self._caller.post('finished_test', result, elapsed_time)
+ self._caller.post('finished_test', result)
self._clean_up_after_test(test_input, result)
def stop(self):
_log.debug("%s cleaning up" % self._name)
self._kill_driver()
- if self._tests_run_file:
- self._tests_run_file.close()
- self._tests_run_file = None
def _timeout(self, test_input):
"""Compute the appropriate timeout value for a test."""
@@ -370,7 +352,6 @@ class Worker(object):
def _clean_up_after_test(self, test_input, result):
test_name = test_input.test_name
- self._tests_run_file.write(test_name + "\n")
if result.failures:
# Check and kill DumpRenderTree if we need to.
@@ -451,8 +432,8 @@ class Worker(object):
return self._run_single_test(self._driver, test_input, stop_when_done)
def _run_single_test(self, driver, test_input, stop_when_done):
- return single_test_runner.run_single_test(self._port, self._options,
- test_input, driver, self._name, stop_when_done)
+ return single_test_runner.run_single_test(self._port, self._options, self._results_directory,
+ self._name, driver, test_input, stop_when_done)
class TestShard(object):
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
index 13841c1e2..406870a96 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2012 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
@@ -28,7 +27,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.common.system.systemhost_mock import MockSystemHost
@@ -36,19 +35,22 @@ from webkitpy.layout_tests import run_webkit_tests
from webkitpy.layout_tests.controllers.layout_test_runner import LayoutTestRunner, Sharder, TestRunInterruptedException
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
-from webkitpy.layout_tests.models.result_summary import ResultSummary
+from webkitpy.layout_tests.models.test_run_results import TestRunResults
from webkitpy.layout_tests.models.test_input import TestInput
from webkitpy.layout_tests.models.test_results import TestResult
-from webkitpy.layout_tests.port.test import TestPort
+from webkitpy.port.test import TestPort
TestExpectations = test_expectations.TestExpectations
class FakePrinter(object):
- num_completed = 0
+ num_started = 0
num_tests = 0
+ def print_expected(self, run_results, get_tests_with_result_type):
+ pass
+
def print_workers_and_shards(self, num_workers, num_shards, num_locked_shards):
pass
@@ -70,7 +72,7 @@ class FakePrinter(object):
class LockCheckingRunner(LayoutTestRunner):
def __init__(self, port, options, printer, tester, http_lock):
- super(LockCheckingRunner, self).__init__(options, port, printer, port.results_directory(), TestExpectations(port, []), lambda test_name: False)
+ super(LockCheckingRunner, self).__init__(options, port, printer, port.results_directory(), lambda test_name: False)
self._finished_list_called = False
self._tester = tester
self._should_have_http_lock = http_lock
@@ -99,13 +101,10 @@ class LayoutTestRunnerTests(unittest.TestCase):
port = port or host.port_factory.get(options.platform, options=options)
return LockCheckingRunner(port, options, FakePrinter(), self, True)
- def _result_summary(self, runner, tests):
- return ResultSummary(TestExpectations(runner._port, tests), tests, 1, set())
-
def _run_tests(self, runner, tests):
test_inputs = [TestInput(test, 6000) for test in tests]
expectations = TestExpectations(runner._port, tests)
- runner.run_tests(test_inputs, expectations, self._result_summary(runner, tests),
+ runner.run_tests(expectations, test_inputs, set(),
num_workers=1, needs_http=any('http' in test for test in tests), needs_websockets=any(['websocket' in test for test in tests]), retrying=False)
def test_http_locking(self):
@@ -121,29 +120,29 @@ class LayoutTestRunnerTests(unittest.TestCase):
runner._options.exit_after_n_failures = None
runner._options.exit_after_n_crashes_or_times = None
test_names = ['passes/text.html', 'passes/image.html']
- runner._test_files_list = test_names
+ runner._test_inputs = [TestInput(test_name, 6000) for test_name in test_names]
- result_summary = self._result_summary(runner, test_names)
- result_summary.unexpected_failures = 100
- result_summary.unexpected_crashes = 50
- result_summary.unexpected_timeouts = 50
+ run_results = TestRunResults(TestExpectations(runner._port, test_names), len(test_names))
+ run_results.unexpected_failures = 100
+ run_results.unexpected_crashes = 50
+ run_results.unexpected_timeouts = 50
# No exception when the exit_after* options are None.
- runner._interrupt_if_at_failure_limits(result_summary)
+ runner._interrupt_if_at_failure_limits(run_results)
# No exception when we haven't hit the limit yet.
runner._options.exit_after_n_failures = 101
runner._options.exit_after_n_crashes_or_timeouts = 101
- runner._interrupt_if_at_failure_limits(result_summary)
+ runner._interrupt_if_at_failure_limits(run_results)
# Interrupt if we've exceeded either limit:
runner._options.exit_after_n_crashes_or_timeouts = 10
- self.assertRaises(TestRunInterruptedException, runner._interrupt_if_at_failure_limits, result_summary)
- self.assertEqual(result_summary.results['passes/text.html'].type, test_expectations.SKIP)
- self.assertEqual(result_summary.results['passes/image.html'].type, test_expectations.SKIP)
+ self.assertRaises(TestRunInterruptedException, runner._interrupt_if_at_failure_limits, run_results)
+ self.assertEqual(run_results.results_by_name['passes/text.html'].type, test_expectations.SKIP)
+ self.assertEqual(run_results.results_by_name['passes/image.html'].type, test_expectations.SKIP)
runner._options.exit_after_n_crashes_or_timeouts = None
runner._options.exit_after_n_failures = 10
- exception = self.assertRaises(TestRunInterruptedException, runner._interrupt_if_at_failure_limits, result_summary)
+ exception = self.assertRaises(TestRunInterruptedException, runner._interrupt_if_at_failure_limits, run_results)
def test_update_summary_with_result(self):
# Reftests expected to be image mismatch should be respected when pixel_tests=False.
@@ -153,17 +152,17 @@ class LayoutTestRunnerTests(unittest.TestCase):
expectations = TestExpectations(runner._port, tests=[test])
runner._expectations = expectations
- result_summary = ResultSummary(expectations, [test], 1, set())
+ run_results = TestRunResults(expectations, 1)
result = TestResult(test_name=test, failures=[test_failures.FailureReftestMismatchDidNotOccur()], reftest_type=['!='])
- runner._update_summary_with_result(result_summary, result)
- self.assertEqual(1, result_summary.expected)
- self.assertEqual(0, result_summary.unexpected)
+ runner._update_summary_with_result(run_results, result)
+ self.assertEqual(1, run_results.expected)
+ self.assertEqual(0, run_results.unexpected)
- result_summary = ResultSummary(expectations, [test], 1, set())
+ run_results = TestRunResults(expectations, 1)
result = TestResult(test_name=test, failures=[], reftest_type=['=='])
- runner._update_summary_with_result(result_summary, result)
- self.assertEqual(0, result_summary.expected)
- self.assertEqual(1, result_summary.unexpected)
+ runner._update_summary_with_result(run_results, result)
+ self.assertEqual(0, run_results.expected)
+ self.assertEqual(1, run_results.unexpected)
def test_servers_started(self):
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
index 5986d5396..28a8930d2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
@@ -35,29 +34,21 @@ objects to the Manager. The Manager then aggregates the TestFailures to
create a final report.
"""
-import errno
+import json
import logging
-import math
-import Queue
import random
-import re
import sys
import time
-from webkitpy.common import message_pool
from webkitpy.layout_tests.controllers.layout_test_finder import LayoutTestFinder
-from webkitpy.layout_tests.controllers.layout_test_runner import LayoutTestRunner, TestRunInterruptedException, WorkerException
+from webkitpy.layout_tests.controllers.layout_test_runner import LayoutTestRunner
from webkitpy.layout_tests.controllers.test_result_writer import TestResultWriter
from webkitpy.layout_tests.layout_package import json_layout_results_generator
from webkitpy.layout_tests.layout_package import json_results_generator
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
-from webkitpy.layout_tests.models import test_results
+from webkitpy.layout_tests.models import test_run_results
from webkitpy.layout_tests.models.test_input import TestInput
-from webkitpy.layout_tests.models.result_summary import ResultSummary
-from webkitpy.layout_tests.views import printing
-
-from webkitpy.tool import grammar
_log = logging.getLogger(__name__)
@@ -67,192 +58,6 @@ BUILDER_BASE_URL = "http://build.chromium.org/buildbot/layout_test_results/"
TestExpectations = test_expectations.TestExpectations
-def interpret_test_failures(port, test_name, failures):
- """Interpret test failures and returns a test result as dict.
-
- Args:
- port: interface to port-specific hooks
- test_name: test name relative to layout_tests directory
- failures: list of test failures
- Returns:
- A dictionary like {'is_missing_text': True, ...}
- """
- test_dict = {}
- failure_types = [type(failure) for failure in failures]
- # FIXME: get rid of all this is_* values once there is a 1:1 map between
- # TestFailure type and test_expectations.EXPECTATION.
- if test_failures.FailureMissingAudio in failure_types:
- test_dict['is_missing_audio'] = True
-
- if test_failures.FailureMissingResult in failure_types:
- test_dict['is_missing_text'] = True
-
- if test_failures.FailureMissingImage in failure_types or test_failures.FailureMissingImageHash in failure_types:
- test_dict['is_missing_image'] = True
-
- for failure in failures:
- if isinstance(failure, test_failures.FailureImageHashMismatch) or isinstance(failure, test_failures.FailureReftestMismatch):
- test_dict['image_diff_percent'] = failure.diff_percent
-
- return test_dict
-
-
-def use_trac_links_in_results_html(port_obj):
- # We only use trac links on the buildbots.
- # Use existence of builder_name as a proxy for knowing we're on a bot.
- return port_obj.get_option("builder_name")
-
-
-# FIXME: This should be on the Manager class (since that's the only caller)
-# or split off from Manager onto another helper class, but should not be a free function.
-# Most likely this should be made into its own class, and this super-long function
-# split into many helper functions.
-def summarize_results(port_obj, expectations, result_summary, retry_summary, test_timings, only_unexpected, interrupted):
- """Summarize failing results as a dict.
-
- FIXME: split this data structure into a separate class?
-
- Args:
- port_obj: interface to port-specific hooks
- expectations: test_expectations.TestExpectations object
- result_summary: summary object from initial test runs
- retry_summary: summary object from final test run of retried tests
- test_timings: a list of TestResult objects which contain test runtimes in seconds
- only_unexpected: whether to return a summary only for the unexpected results
- Returns:
- A dictionary containing a summary of the unexpected results from the
- run, with the following fields:
- 'version': a version indicator
- 'fixable': The number of fixable tests (NOW - PASS)
- 'skipped': The number of skipped tests (NOW & SKIPPED)
- 'num_regressions': The number of non-flaky failures
- 'num_flaky': The number of flaky failures
- 'num_missing': The number of tests with missing results
- 'num_passes': The number of unexpected passes
- 'tests': a dict of tests -> {'expected': '...', 'actual': '...'}
- """
- results = {}
- results['version'] = 3
-
- tbe = result_summary.tests_by_expectation
- tbt = result_summary.tests_by_timeline
- results['fixable'] = len(tbt[test_expectations.NOW] - tbe[test_expectations.PASS])
- results['skipped'] = len(tbt[test_expectations.NOW] & tbe[test_expectations.SKIP])
-
- num_passes = 0
- num_flaky = 0
- num_missing = 0
- num_regressions = 0
- keywords = {}
- for expecation_string, expectation_enum in TestExpectations.EXPECTATIONS.iteritems():
- keywords[expectation_enum] = expecation_string.upper()
-
- for modifier_string, modifier_enum in TestExpectations.MODIFIERS.iteritems():
- keywords[modifier_enum] = modifier_string.upper()
-
- tests = {}
- original_results = result_summary.unexpected_results if only_unexpected else result_summary.results
-
- for test_name, result in original_results.iteritems():
- # Note that if a test crashed in the original run, we ignore
- # whether or not it crashed when we retried it (if we retried it),
- # and always consider the result not flaky.
- expected = expectations.get_expectations_string(test_name)
- result_type = result.type
- actual = [keywords[result_type]]
-
- if result_type == test_expectations.SKIP:
- continue
-
- test_dict = {}
- if result.has_stderr:
- test_dict['has_stderr'] = True
-
- if result.reftest_type:
- test_dict.update(reftest_type=list(result.reftest_type))
-
- if expectations.has_modifier(test_name, test_expectations.WONTFIX):
- test_dict['wontfix'] = True
-
- if result_type == test_expectations.PASS:
- num_passes += 1
- # FIXME: include passing tests that have stderr output.
- if expected == 'PASS':
- continue
- elif result_type == test_expectations.CRASH:
- num_regressions += 1
- elif result_type == test_expectations.MISSING:
- if test_name in result_summary.unexpected_results:
- num_missing += 1
- elif test_name in result_summary.unexpected_results:
- if test_name not in retry_summary.unexpected_results:
- actual.extend(expectations.get_expectations_string(test_name).split(" "))
- num_flaky += 1
- else:
- retry_result_type = retry_summary.unexpected_results[test_name].type
- if result_type != retry_result_type:
- actual.append(keywords[retry_result_type])
- num_flaky += 1
- else:
- num_regressions += 1
-
- test_dict['expected'] = expected
- test_dict['actual'] = " ".join(actual)
- # FIXME: Set this correctly once https://webkit.org/b/37739 is fixed
- # and only set it if there actually is stderr data.
-
- test_dict.update(interpret_test_failures(port_obj, test_name, result.failures))
-
- # Store test hierarchically by directory. e.g.
- # foo/bar/baz.html: test_dict
- # foo/bar/baz1.html: test_dict
- #
- # becomes
- # foo: {
- # bar: {
- # baz.html: test_dict,
- # baz1.html: test_dict
- # }
- # }
- parts = test_name.split('/')
- current_map = tests
- for i, part in enumerate(parts):
- if i == (len(parts) - 1):
- current_map[part] = test_dict
- break
- if part not in current_map:
- current_map[part] = {}
- current_map = current_map[part]
-
- results['tests'] = tests
- results['num_passes'] = num_passes
- results['num_flaky'] = num_flaky
- results['num_missing'] = num_missing
- results['num_regressions'] = num_regressions
- results['uses_expectations_file'] = port_obj.uses_test_expectations_file()
- results['interrupted'] = interrupted # Does results.html have enough information to compute this itself? (by checking total number of results vs. total number of tests?)
- results['layout_tests_dir'] = port_obj.layout_tests_dir()
- results['has_wdiff'] = port_obj.wdiff_available()
- results['has_pretty_patch'] = port_obj.pretty_patch_available()
- results['pixel_tests_enabled'] = port_obj.get_option('pixel_tests')
-
- try:
- # We only use the svn revision for using trac links in the results.html file,
- # Don't do this by default since it takes >100ms.
- # FIXME: Do we really need to populate this both here and in the json_results_generator?
- if use_trac_links_in_results_html(port_obj):
- port_obj.host.initialize_scm()
- results['revision'] = port_obj.host.scm().head_svn_revision()
- except Exception, e:
- _log.warn("Failed to determine svn revision for checkout (cwd: %s, webkit_base: %s), leaving 'revision' key blank in full_results.json.\n%s" % (port_obj._filesystem.getcwd(), port_obj.path_from_webkit_base(), e))
- # Handle cases where we're running outside of version control.
- import traceback
- _log.debug('Failed to learn head svn revision:')
- _log.debug(traceback.format_exc())
- results['revision'] = ""
-
- return results
-
class Manager(object):
"""A class for managing running a series of tests on a series of layout
@@ -281,12 +86,9 @@ class Manager(object):
# self._websocket_secure_server = websocket_server.PyWebSocket(
# options.results_directory, use_tls=True, port=9323)
- self._paths = set()
- self._test_names = None
- self._retrying = False
self._results_directory = self._port.results_directory()
self._finder = LayoutTestFinder(self._port, self._options)
- self._runner = LayoutTestRunner(self._options, self._port, self._printer, self._results_directory, self._expectations, self._test_is_slow)
+ self._runner = LayoutTestRunner(self._options, self._port, self._printer, self._results_directory, self._test_is_slow)
def _collect_tests(self, args):
return self._finder.find_tests(self._options, args)
@@ -297,38 +99,28 @@ class Manager(object):
def _is_websocket_test(self, test):
return self.WEBSOCKET_SUBDIR in test
- def _http_tests(self):
- return set(test for test in self._test_names if self._is_http_test(test))
+ def _http_tests(self, test_names):
+ return set(test for test in test_names if self._is_http_test(test))
def _is_perf_test(self, test):
return self.PERF_SUBDIR == test or (self.PERF_SUBDIR + self._port.TEST_PATH_SEPARATOR) in test
- def _prepare_lists(self):
- tests_to_skip = self._finder.skip_tests(self._paths, self._test_names, self._expectations, self._http_tests())
- self._test_names = [test for test in self._test_names if test not in tests_to_skip]
+ def _prepare_lists(self, paths, test_names):
+ tests_to_skip = self._finder.skip_tests(paths, test_names, self._expectations, self._http_tests(test_names))
+ tests_to_run = [test for test in test_names if test not in tests_to_skip]
# Create a sorted list of test files so the subset chunk,
# if used, contains alphabetically consecutive tests.
if self._options.order == 'natural':
- self._test_names.sort(key=self._port.test_key)
+ tests_to_run.sort(key=self._port.test_key)
elif self._options.order == 'random':
- random.shuffle(self._test_names)
+ random.shuffle(tests_to_run)
- self._test_names, tests_in_other_chunks = self._finder.split_into_chunks(self._test_names)
+ tests_to_run, tests_in_other_chunks = self._finder.split_into_chunks(tests_to_run)
self._expectations.add_skipped_tests(tests_in_other_chunks)
tests_to_skip.update(tests_in_other_chunks)
- if self._options.repeat_each > 1:
- list_with_repetitions = []
- for test in self._test_names:
- list_with_repetitions += ([test] * self._options.repeat_each)
- self._test_names = list_with_repetitions
-
- if self._options.iterations > 1:
- self._test_names = self._test_names * self._options.iterations
-
- iterations = self._options.repeat_each * self._options.iterations
- return ResultSummary(self._expectations, set(self._test_names), iterations, tests_to_skip)
+ return tests_to_run, tests_to_skip
def _test_input_for_file(self, test_file):
return TestInput(test_file,
@@ -345,12 +137,12 @@ class Manager(object):
def _test_is_slow(self, test_file):
return self._expectations.has_modifier(test_file, test_expectations.SLOW)
- def needs_servers(self):
- return any(self._test_requires_lock(test_name) for test_name in self._test_names) and self._options.http
+ def needs_servers(self, test_names):
+ return any(self._test_requires_lock(test_name) for test_name in test_names) and self._options.http
- def _set_up_run(self):
+ def _set_up_run(self, test_names):
self._printer.write_update("Checking build ...")
- if not self._port.check_build(self.needs_servers()):
+ if not self._port.check_build(self.needs_servers(test_names)):
_log.error("Build check failed")
return False
@@ -363,7 +155,7 @@ class Manager(object):
# Check that the system dependencies (themes, fonts, ...) are correct.
if not self._options.nocheck_sys_deps:
self._printer.write_update("Checking system dependencies ...")
- if not self._port.check_sys_deps(self.needs_servers()):
+ if not self._port.check_sys_deps(self.needs_servers(test_names)):
self._port.stop_helper()
return False
@@ -377,110 +169,119 @@ class Manager(object):
return True
def run(self, args):
- """Run all our tests on all our test files and return the number of unexpected results (0 == success)."""
+ """Run the tests and return a RunDetails object with the results."""
self._printer.write_update("Collecting tests ...")
try:
- self._paths, self._test_names = self._collect_tests(args)
- except IOError as exception:
+ paths, test_names = self._collect_tests(args)
+ except IOError:
# This is raised if --test-list doesn't exist
- return -1
+ return test_run_results.RunDetails(exit_code=-1)
self._printer.write_update("Parsing expectations ...")
- self._expectations = test_expectations.TestExpectations(self._port, self._test_names)
+ self._expectations = test_expectations.TestExpectations(self._port, test_names)
- num_all_test_files_found = len(self._test_names)
- result_summary = self._prepare_lists()
+ tests_to_run, tests_to_skip = self._prepare_lists(paths, test_names)
+ self._printer.print_found(len(test_names), len(tests_to_run), self._options.repeat_each, self._options.iterations)
# Check to make sure we're not skipping every test.
- if not self._test_names:
+ if not tests_to_run:
_log.critical('No tests to run.')
- return -1
-
- self._printer.print_found(num_all_test_files_found, len(self._test_names), self._options.repeat_each, self._options.iterations)
- self._printer.print_expected(result_summary, self._expectations.get_tests_with_result_type)
+ return test_run_results.RunDetails(exit_code=-1)
- if not self._set_up_run():
- return -1
+ if not self._set_up_run(tests_to_run):
+ return test_run_results.RunDetails(exit_code=-1)
start_time = time.time()
+ enabled_pixel_tests_in_retry = False
+ try:
+ initial_results = self._run_tests(tests_to_run, tests_to_skip, self._options.repeat_each, self._options.iterations,
+ int(self._options.child_processes), retrying=False)
- interrupted, keyboard_interrupted, thread_timings, test_timings, individual_test_timings = \
- self._run_tests(self._test_names, result_summary, int(self._options.child_processes))
+ tests_to_retry = self._tests_to_retry(initial_results, include_crashes=self._port.should_retry_crashes())
+ if self._options.retry_failures and tests_to_retry and not initial_results.interrupted:
+ enabled_pixel_tests_in_retry = self._force_pixel_tests_if_needed()
- # We exclude the crashes from the list of results to retry, because
- # we want to treat even a potentially flaky crash as an error.
+ _log.info('')
+ _log.info("Retrying %d unexpected failure(s) ..." % len(tests_to_retry))
+ _log.info('')
+ retry_results = self._run_tests(tests_to_retry, tests_to_skip=set(), repeat_each=1, iterations=1,
+ num_workers=1, retrying=True)
- failures = self._get_failures(result_summary, include_crashes=self._port.should_retry_crashes(), include_missing=False)
- retry_summary = result_summary
- while (len(failures) and self._options.retry_failures and not self._retrying and not interrupted and not keyboard_interrupted):
- _log.info('')
- _log.info("Retrying %d unexpected failure(s) ..." % len(failures))
- _log.info('')
- self._retrying = True
- retry_summary = ResultSummary(self._expectations, failures.keys(), 1, set())
- # Note that we intentionally ignore the return value here.
- self._run_tests(failures.keys(), retry_summary, 1)
- failures = self._get_failures(retry_summary, include_crashes=True, include_missing=True)
+ if enabled_pixel_tests_in_retry:
+ self._options.pixel_tests = False
+ else:
+ retry_results = None
+ finally:
+ self._clean_up_run()
end_time = time.time()
# Some crash logs can take a long time to be written out so look
# for new logs after the test run finishes.
- self._look_for_new_crash_logs(result_summary, start_time)
- self._look_for_new_crash_logs(retry_summary, start_time)
- self._clean_up_run()
+ _log.debug("looking for new crash logs")
+ self._look_for_new_crash_logs(initial_results, start_time)
+ if retry_results:
+ self._look_for_new_crash_logs(retry_results, start_time)
- unexpected_results = summarize_results(self._port, self._expectations, result_summary, retry_summary, individual_test_timings, only_unexpected=True, interrupted=interrupted)
+ _log.debug("summarizing results")
+ summarized_results = test_run_results.summarize_results(self._port, self._expectations, initial_results, retry_results, enabled_pixel_tests_in_retry)
+ self._printer.print_results(end_time - start_time, initial_results, summarized_results)
- self._printer.print_results(end_time - start_time, thread_timings, test_timings, individual_test_timings, result_summary, unexpected_results)
-
- # Re-raise a KeyboardInterrupt if necessary so the caller can handle it.
- if keyboard_interrupted:
- raise KeyboardInterrupt
-
- # FIXME: remove record_results. It's just used for testing. There's no need
- # for it to be a commandline argument.
- if (self._options.record_results and not self._options.dry_run and not keyboard_interrupted):
+ if not self._options.dry_run:
self._port.print_leaks_summary()
- # Write the same data to log files and upload generated JSON files to appengine server.
- summarized_results = summarize_results(self._port, self._expectations, result_summary, retry_summary, individual_test_timings, only_unexpected=False, interrupted=interrupted)
- self._upload_json_files(summarized_results, result_summary, individual_test_timings)
+ self._upload_json_files(summarized_results, initial_results)
- # Write the summary to disk (results.html) and display it if requested.
- if not self._options.dry_run:
- self._copy_results_html_file()
- if self._options.show_results:
- self._show_results_html_file(result_summary)
+ results_path = self._filesystem.join(self._results_directory, "results.html")
+ self._copy_results_html_file(results_path)
+ if self._options.show_results and (initial_results.unexpected_results_by_name or
+ (self._options.full_results_html and initial_results.total_failures)):
+ self._port.show_results_html_file(results_path)
+
+ return test_run_results.RunDetails(self._port.exit_code_from_summarized_results(summarized_results),
+ summarized_results, initial_results, retry_results, enabled_pixel_tests_in_retry)
- return self._port.exit_code_from_summarized_results(unexpected_results)
+ def _run_tests(self, tests_to_run, tests_to_skip, repeat_each, iterations, num_workers, retrying):
+ needs_http = any(self._is_http_test(test) for test in tests_to_run)
+ needs_websockets = any(self._is_websocket_test(test) for test in tests_to_run)
- def _run_tests(self, tests, result_summary, num_workers):
- test_inputs = [self._test_input_for_file(test) for test in tests]
- needs_http = self._port.requires_http_server() or any(self._is_http_test(test) for test in tests)
- needs_websockets = any(self._is_websocket_test(test) for test in tests)
- return self._runner.run_tests(test_inputs, self._expectations, result_summary, num_workers, needs_http, needs_websockets, self._retrying)
+ test_inputs = []
+ for _ in xrange(iterations):
+ for test in tests_to_run:
+ for _ in xrange(repeat_each):
+ test_inputs.append(self._test_input_for_file(test))
+ return self._runner.run_tests(self._expectations, test_inputs, tests_to_skip, num_workers, needs_http, needs_websockets, retrying)
def _clean_up_run(self):
- """Restores the system after we're done running tests."""
- _log.debug("flushing stdout")
+ _log.debug("Flushing stdout")
sys.stdout.flush()
- _log.debug("flushing stderr")
+ _log.debug("Flushing stderr")
sys.stderr.flush()
- _log.debug("stopping helper")
+ _log.debug("Stopping helper")
self._port.stop_helper()
- _log.debug("cleaning up port")
+ _log.debug("Cleaning up port")
self._port.clean_up_test_run()
- def _look_for_new_crash_logs(self, result_summary, start_time):
+ def _force_pixel_tests_if_needed(self):
+ if self._options.pixel_tests:
+ return False
+
+ _log.debug("Restarting helper")
+ self._port.stop_helper()
+ self._options.pixel_tests = True
+ self._port.start_helper()
+
+ return True
+
+ def _look_for_new_crash_logs(self, run_results, start_time):
"""Since crash logs can take a long time to be written out if the system is
under stress do a second pass at the end of the test run.
- result_summary: the results of the test run
+ run_results: the results of the test run
start_time: time the tests started at. We're looking for crash
logs after that time.
"""
crashed_processes = []
- for test, result in result_summary.unexpected_results.iteritems():
+ for test, result in run_results.unexpected_results_by_name.iteritems():
if (result.type != test_expectations.CRASH):
continue
for failure in result.failures:
@@ -488,6 +289,12 @@ class Manager(object):
continue
crashed_processes.append([test, failure.process_name, failure.pid])
+ sample_files = self._port.look_for_new_samples(crashed_processes, start_time)
+ if sample_files:
+ for test, sample_file in sample_files.iteritems():
+ writer = TestResultWriter(self._port._filesystem, self._port, self._port.results_directory(), test)
+ writer.copy_sample_file(sample_file)
+
crash_logs = self._port.look_for_new_crash_logs(crashed_processes, start_time)
if crash_logs:
for test, crash_log in crash_logs.iteritems():
@@ -506,53 +313,31 @@ class Manager(object):
if self._filesystem.isdir(self._filesystem.join(layout_tests_dir, dirname)):
self._filesystem.rmtree(self._filesystem.join(self._results_directory, dirname))
- def _get_failures(self, result_summary, include_crashes, include_missing):
- """Filters a dict of results and returns only the failures.
-
- Args:
- result_summary: the results of the test run
- include_crashes: whether crashes are included in the output.
- We use False when finding the list of failures to retry
- to see if the results were flaky. Although the crashes may also be
- flaky, we treat them as if they aren't so that they're not ignored.
- Returns:
- a dict of files -> results
- """
- failed_results = {}
- for test, result in result_summary.unexpected_results.iteritems():
- if (result.type == test_expectations.PASS or
- (result.type == test_expectations.CRASH and not include_crashes) or
- (result.type == test_expectations.MISSING and not include_missing)):
- continue
- failed_results[test] = result.type
+ def _tests_to_retry(self, run_results, include_crashes):
+ return [result.test_name for result in run_results.unexpected_results_by_name.values() if
+ ((result.type != test_expectations.PASS) and
+ (result.type != test_expectations.MISSING) and
+ (result.type != test_expectations.CRASH or include_crashes))]
- return failed_results
-
- def _char_for_result(self, result):
- result = result.lower()
- if result in TestExpectations.EXPECTATIONS:
- result_enum_value = TestExpectations.EXPECTATIONS[result]
- else:
- result_enum_value = TestExpectations.MODIFIERS[result]
- return json_layout_results_generator.JSONLayoutResultsGenerator.FAILURE_TO_CHAR[result_enum_value]
-
- def _upload_json_files(self, summarized_results, result_summary, individual_test_timings):
+ def _upload_json_files(self, summarized_results, initial_results):
"""Writes the results of the test run as JSON files into the results
dir and upload the files to the appengine server.
Args:
- unexpected_results: dict of unexpected results
summarized_results: dict of results
- result_summary: full summary object
- individual_test_timings: list of test times (used by the flakiness
- dashboard).
+ initial_results: full summary object
"""
_log.debug("Writing JSON files in %s." % self._results_directory)
- times_trie = json_results_generator.test_timings_trie(self._port, individual_test_timings)
+ # FIXME: Upload stats.json to the server and delete times_ms.
+ times_trie = json_results_generator.test_timings_trie(self._port, initial_results.results_by_name.values())
times_json_path = self._filesystem.join(self._results_directory, "times_ms.json")
json_results_generator.write_json(self._filesystem, times_trie, times_json_path)
+ stats_trie = self._stats_trie(initial_results)
+ stats_path = self._filesystem.join(self._results_directory, "stats.json")
+ self._filesystem.write_text_file(stats_path, json.dumps(stats_trie))
+
full_results_path = self._filesystem.join(self._results_directory, "full_results.json")
# We write full_results.json out as jsonp because we need to load it from a file url and Chromium doesn't allow that.
json_results_generator.write_json(self._filesystem, summarized_results, full_results_path, callback="ADD_RESULTS")
@@ -560,14 +345,15 @@ class Manager(object):
generator = json_layout_results_generator.JSONLayoutResultsGenerator(
self._port, self._options.builder_name, self._options.build_name,
self._options.build_number, self._results_directory,
- BUILDER_BASE_URL, individual_test_timings,
- self._expectations, result_summary, self._test_names,
+ BUILDER_BASE_URL,
+ self._expectations, initial_results,
self._options.test_results_server,
"layout-tests",
self._options.master_name)
_log.debug("Finished writing JSON files.")
+
json_files = ["incremental_results.json", "full_results.json", "times_ms.json"]
generator.upload_json_files(json_files)
@@ -579,31 +365,23 @@ class Manager(object):
self._filesystem.remove(times_json_path)
self._filesystem.remove(incremental_results_path)
- def _num_digits(self, num):
- """Returns the number of digits needed to represent the length of a
- sequence."""
- ndigits = 1
- if len(num):
- ndigits = int(math.log10(len(num))) + 1
- return ndigits
-
- def _copy_results_html_file(self):
+ def _copy_results_html_file(self, destination_path):
base_dir = self._port.path_from_webkit_base('LayoutTests', 'fast', 'harness')
results_file = self._filesystem.join(base_dir, 'results.html')
- # FIXME: What should we do if this doesn't exist (e.g., in unit tests)?
+ # Note that the results.html template file won't exist when we're using a MockFileSystem during unit tests,
+ # so make sure it exists before we try to copy it.
if self._filesystem.exists(results_file):
- self._filesystem.copyfile(results_file, self._filesystem.join(self._results_directory, "results.html"))
-
- def _show_results_html_file(self, result_summary):
- """Shows the results.html page."""
- if self._options.full_results_html:
- test_files = result_summary.failures.keys()
- else:
- unexpected_failures = self._get_failures(result_summary, include_crashes=True, include_missing=True)
- test_files = unexpected_failures.keys()
-
- if not len(test_files):
- return
-
- results_filename = self._filesystem.join(self._results_directory, "results.html")
- self._port.show_results_html_file(results_filename)
+ self._filesystem.copyfile(results_file, destination_path)
+
+ def _stats_trie(self, initial_results):
+ def _worker_number(worker_name):
+ return int(worker_name.split('/')[1]) if worker_name else -1
+
+ stats = {}
+ for result in initial_results.results_by_name.values():
+ if result.type != test_expectations.SKIP:
+ stats[result.test_name] = {'results': (_worker_number(result.worker_name), result.test_number, result.pid, int(result.test_run_time * 1000), int(result.total_run_time * 1000))}
+ stats_trie = {}
+ for name, value in stats.iteritems():
+ json_results_generator.add_path_to_trie(name, value, stats_trie)
+ return stats_trie
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
index e94d1332b..4a8154878 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/manager_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
@@ -32,173 +31,60 @@
import sys
import time
-import unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
-from webkitpy.layout_tests.controllers.manager import Manager, interpret_test_failures, summarize_results
+from webkitpy.layout_tests.controllers.manager import Manager
from webkitpy.layout_tests.models import test_expectations
-from webkitpy.layout_tests.models import test_failures
-from webkitpy.layout_tests.models import test_results
-from webkitpy.layout_tests.models.result_summary import ResultSummary
+from webkitpy.layout_tests.models.test_run_results import TestRunResults
from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.mocktool import MockOptions
class ManagerTest(unittest.TestCase):
def test_needs_servers(self):
- def get_manager_with_tests(test_names):
+ def get_manager():
port = Mock() # FIXME: Use a tighter mock.
port.TEST_PATH_SEPARATOR = '/'
manager = Manager(port, options=MockOptions(http=True, max_locked_shards=1), printer=Mock())
- manager._test_names = test_names
return manager
- manager = get_manager_with_tests(['fast/html'])
- self.assertFalse(manager.needs_servers())
+ manager = get_manager()
+ self.assertFalse(manager.needs_servers(['fast/html']))
- manager = get_manager_with_tests(['http/tests/misc'])
- self.assertTrue(manager.needs_servers())
+ manager = get_manager()
+ self.assertTrue(manager.needs_servers(['http/tests/misc']))
def integration_test_needs_servers(self):
- def get_manager_with_tests(test_names):
+ def get_manager():
host = MockHost()
port = host.port_factory.get()
manager = Manager(port, options=MockOptions(test_list=None, http=True, max_locked_shards=1), printer=Mock())
- manager._collect_tests(test_names)
return manager
- manager = get_manager_with_tests(['fast/html'])
- self.assertFalse(manager.needs_servers())
+ manager = get_manager()
+ self.assertFalse(manager.needs_servers(['fast/html']))
- manager = get_manager_with_tests(['http/tests/mime'])
- self.assertTrue(manager.needs_servers())
+ manager = get_manager()
+ self.assertTrue(manager.needs_servers(['http/tests/mime']))
if sys.platform == 'win32':
- manager = get_manager_with_tests(['fast\\html'])
- self.assertFalse(manager.needs_servers())
+ manager = get_manager()
+ self.assertFalse(manager.needs_servers(['fast\\html']))
- manager = get_manager_with_tests(['http\\tests\\mime'])
- self.assertTrue(manager.needs_servers())
+ manager = get_manager()
+ self.assertTrue(manager.needs_servers(['http\\tests\\mime']))
def test_look_for_new_crash_logs(self):
- def get_manager_with_tests(test_names):
+ def get_manager():
host = MockHost()
port = host.port_factory.get('test-mac-leopard')
manager = Manager(port, options=MockOptions(test_list=None, http=True, max_locked_shards=1), printer=Mock())
- manager._collect_tests(test_names)
return manager
host = MockHost()
port = host.port_factory.get('test-mac-leopard')
tests = ['failures/expected/crash.html']
expectations = test_expectations.TestExpectations(port, tests)
- rs = ResultSummary(expectations, tests, 1, set())
- manager = get_manager_with_tests(tests)
- manager._look_for_new_crash_logs(rs, time.time())
-
-
-class ResultSummaryTest(unittest.TestCase):
-
- def setUp(self):
- host = MockHost()
- self.port = host.port_factory.get(port_name='test')
-
- def test_interpret_test_failures(self):
- test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
- [test_failures.FailureImageHashMismatch(diff_percent=0.42)])
- self.assertEqual(test_dict['image_diff_percent'], 0.42)
-
- test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
- [test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/reftest-expected.html'))])
- self.assertTrue('image_diff_percent' in test_dict)
-
- test_dict = interpret_test_failures(self.port, 'foo/reftest.html',
- [test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/reftest-expected-mismatch.html'))])
- self.assertEqual(len(test_dict), 0)
-
- test_dict = interpret_test_failures(self.port, 'foo/audio-test.html',
- [test_failures.FailureMissingAudio()])
- self.assertTrue('is_missing_audio' in test_dict)
-
- test_dict = interpret_test_failures(self.port, 'foo/text-test.html',
- [test_failures.FailureMissingResult()])
- self.assertTrue('is_missing_text' in test_dict)
-
- test_dict = interpret_test_failures(self.port, 'foo/pixel-test.html',
- [test_failures.FailureMissingImage()])
- self.assertTrue('is_missing_image' in test_dict)
-
- test_dict = interpret_test_failures(self.port, 'foo/pixel-test.html',
- [test_failures.FailureMissingImageHash()])
- self.assertTrue('is_missing_image' in test_dict)
-
- def get_result(self, test_name, result_type=test_expectations.PASS, run_time=0):
- failures = []
- if result_type == test_expectations.TIMEOUT:
- failures = [test_failures.FailureTimeout()]
- elif result_type == test_expectations.CRASH:
- failures = [test_failures.FailureCrash()]
- return test_results.TestResult(test_name, failures=failures, test_run_time=run_time)
-
- def get_result_summary(self, port, test_names, expectations_str):
- port.expectations_dict = lambda: {'': expectations_str}
- expectations = test_expectations.TestExpectations(port, test_names)
- return test_names, ResultSummary(expectations, test_names, 1, set()), expectations
-
- # FIXME: Use this to test more of summarize_results. This was moved from printing_unittest.py.
- def summarized_results(self, port, expected, passing, flaky, extra_tests=[], extra_expectations=None):
- tests = ['passes/text.html', 'failures/expected/timeout.html', 'failures/expected/crash.html', 'failures/expected/wontfix.html']
- if extra_tests:
- tests.extend(extra_tests)
-
- expectations = ''
- if extra_expectations:
- expectations += extra_expectations
-
- test_is_slow = False
- paths, rs, exp = self.get_result_summary(port, tests, expectations)
- if expected:
- rs.add(self.get_result('passes/text.html', test_expectations.PASS), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/timeout.html', test_expectations.TIMEOUT), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/crash.html', test_expectations.CRASH), expected, test_is_slow)
- elif passing:
- rs.add(self.get_result('passes/text.html'), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/timeout.html'), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/crash.html'), expected, test_is_slow)
- else:
- rs.add(self.get_result('passes/text.html', test_expectations.TIMEOUT), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/timeout.html', test_expectations.CRASH), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/crash.html', test_expectations.TIMEOUT), expected, test_is_slow)
-
- for test in extra_tests:
- rs.add(self.get_result(test, test_expectations.CRASH), expected, test_is_slow)
-
- retry = rs
- if flaky:
- paths, retry, exp = self.get_result_summary(port, tests, expectations)
- retry.add(self.get_result('passes/text.html'), True, test_is_slow)
- retry.add(self.get_result('failures/expected/timeout.html'), True, test_is_slow)
- retry.add(self.get_result('failures/expected/crash.html'), True, test_is_slow)
- unexpected_results = summarize_results(port, exp, rs, retry, test_timings={}, only_unexpected=True, interrupted=False)
- expected_results = summarize_results(port, exp, rs, retry, test_timings={}, only_unexpected=False, interrupted=False)
- return expected_results, unexpected_results
-
- def test_no_svn_revision(self):
- host = MockHost(initialize_scm_by_default=False)
- port = host.port_factory.get('test')
- expected_results, unexpected_results = self.summarized_results(port, expected=False, passing=False, flaky=False)
- self.assertTrue('revision' not in unexpected_results)
-
- def test_svn_revision(self):
- host = MockHost(initialize_scm_by_default=False)
- port = host.port_factory.get('test')
- port._options.builder_name = 'dummy builder'
- expected_results, unexpected_results = self.summarized_results(port, expected=False, passing=False, flaky=False)
- self.assertNotEquals(unexpected_results['revision'], '')
-
- def test_summarized_results_wontfix(self):
- host = MockHost()
- port = host.port_factory.get('test')
- port._options.builder_name = 'dummy builder'
- port._filesystem.write_text_file(port._filesystem.join(port.layout_tests_dir(), "failures/expected/wontfix.html"), "Dummy test contents")
- expected_results, unexpected_results = self.summarized_results(port, expected=False, passing=False, flaky=False, extra_tests=['failures/expected/wontfix.html'], extra_expectations='Bug(x) failures/expected/wontfix.html [ WontFix ]\n')
- self.assertTrue(expected_results['tests']['failures']['expected']['wontfix.html']['wontfix'])
+ run_results = TestRunResults(expectations, len(tests))
+ manager = get_manager()
+ manager._look_for_new_crash_logs(run_results, time.time())
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
index 28e9d63f0..53f25ce3b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py
@@ -32,7 +32,7 @@ import re
import time
from webkitpy.layout_tests.controllers import test_result_writer
-from webkitpy.layout_tests.port.driver import DriverInput, DriverOutput
+from webkitpy.port.driver import DriverInput, DriverOutput
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models.test_results import TestResult
@@ -41,18 +41,19 @@ from webkitpy.layout_tests.models.test_results import TestResult
_log = logging.getLogger(__name__)
-def run_single_test(port, options, test_input, driver, worker_name, stop_when_done):
- runner = SingleTestRunner(options, port, driver, test_input, worker_name, stop_when_done)
+def run_single_test(port, options, results_directory, worker_name, driver, test_input, stop_when_done):
+ runner = SingleTestRunner(port, options, results_directory, worker_name, driver, test_input, stop_when_done)
return runner.run()
class SingleTestRunner(object):
(ALONGSIDE_TEST, PLATFORM_DIR, VERSION_DIR, UPDATE) = ('alongside', 'platform', 'version', 'update')
- def __init__(self, options, port, driver, test_input, worker_name, stop_when_done):
- self._options = options
+ def __init__(self, port, options, results_directory, worker_name, driver, test_input, stop_when_done):
self._port = port
self._filesystem = port.host.filesystem
+ self._options = options
+ self._results_directory = results_directory
self._driver = driver
self._timeout = test_input.timeout
self._worker_name = worker_name
@@ -114,17 +115,17 @@ class SingleTestRunner(object):
test_result = self._compare_output(expected_driver_output, driver_output)
if self._options.new_test_results:
self._add_missing_baselines(test_result, driver_output)
- test_result_writer.write_test_result(self._filesystem, self._port, self._test_name, driver_output, expected_driver_output, test_result.failures)
+ test_result_writer.write_test_result(self._filesystem, self._port, self._results_directory, self._test_name, driver_output, expected_driver_output, test_result.failures)
return test_result
def _run_rebaseline(self):
driver_output = self._driver.run_test(self._driver_input(), self._stop_when_done)
failures = self._handle_error(driver_output)
- test_result_writer.write_test_result(self._filesystem, self._port, self._test_name, driver_output, None, failures)
+ test_result_writer.write_test_result(self._filesystem, self._port, self._results_directory, self._test_name, driver_output, None, failures)
# FIXME: It the test crashed or timed out, it might be better to avoid
# to write new baselines.
self._overwrite_baselines(driver_output)
- return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr())
+ return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr(), pid=driver_output.pid)
_render_tree_dump_pattern = re.compile(r"^layer at \(\d+,\d+\) size \d+x\d+\n")
@@ -217,13 +218,13 @@ class SingleTestRunner(object):
if driver_output.crash:
# Don't continue any more if we already have a crash.
# In case of timeouts, we continue since we still want to see the text and image output.
- return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr())
+ return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr(), pid=driver_output.pid)
failures.extend(self._compare_text(expected_driver_output.text, driver_output.text))
failures.extend(self._compare_audio(expected_driver_output.audio, driver_output.audio))
if self._should_run_pixel_test:
failures.extend(self._compare_image(expected_driver_output, driver_output))
- return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr())
+ return TestResult(self._test_name, failures, driver_output.test_time, driver_output.has_stderr(), pid=driver_output.pid)
def _compare_text(self, expected_text, actual_text):
failures = []
@@ -293,8 +294,10 @@ class SingleTestRunner(object):
# Note that sorting by the expectation sorts "!=" before "==" so this is easy to do.
putAllMismatchBeforeMatch = sorted
+ reference_test_names = []
for expectation, reference_filename in putAllMismatchBeforeMatch(self._reference_files):
reference_test_name = self._port.relative_test_filename(reference_filename)
+ reference_test_names.append(reference_test_name)
reference_output = self._driver.run_test(DriverInput(reference_test_name, self._timeout, None, should_run_pixel_test=True), self._stop_when_done)
test_result = self._compare_output_with_reference(reference_output, test_output, reference_filename, expectation == '!=')
@@ -303,9 +306,9 @@ class SingleTestRunner(object):
total_test_time += test_result.test_run_time
assert(reference_output)
- test_result_writer.write_test_result(self._filesystem, self._port, self._test_name, test_output, reference_output, test_result.failures)
+ test_result_writer.write_test_result(self._filesystem, self._port, self._results_directory, self._test_name, test_output, reference_output, test_result.failures)
reftest_type = set([reference_file[0] for reference_file in self._reference_files])
- return TestResult(self._test_name, test_result.failures, total_test_time + test_result.test_run_time, test_result.has_stderr, reftest_type=reftest_type)
+ return TestResult(self._test_name, test_result.failures, total_test_time + test_result.test_run_time, test_result.has_stderr, reftest_type=reftest_type, pid=test_result.pid, references=reference_test_names)
def _compare_output_with_reference(self, reference_driver_output, actual_driver_output, reference_filename, mismatch):
total_test_time = reference_driver_output.test_time + actual_driver_output.test_time
@@ -317,7 +320,7 @@ class SingleTestRunner(object):
return TestResult(self._test_name, failures, total_test_time, has_stderr)
failures.extend(self._handle_error(reference_driver_output, reference_filename=reference_filename))
if failures:
- return TestResult(self._test_name, failures, total_test_time, has_stderr)
+ return TestResult(self._test_name, failures, total_test_time, has_stderr, pid=actual_driver_output.pid)
if not reference_driver_output.image_hash and not actual_driver_output.image_hash:
failures.append(test_failures.FailureReftestNoImagesGenerated(reference_filename))
@@ -336,4 +339,4 @@ class SingleTestRunner(object):
else:
_log.warning(" %s -> ref test hashes didn't match but diff passed" % self._test_name)
- return TestResult(self._test_name, failures, total_test_time, has_stderr)
+ return TestResult(self._test_name, failures, total_test_time, has_stderr, pid=actual_driver_output.pid)
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py b/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py
index be178ab32..23e44d50b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer.py
@@ -35,10 +35,10 @@ from webkitpy.layout_tests.models import test_failures
_log = logging.getLogger(__name__)
-def write_test_result(filesystem, port, test_name, driver_output,
+def write_test_result(filesystem, port, results_directory, test_name, driver_output,
expected_driver_output, failures):
"""Write the test result to the result output directory."""
- root_output_dir = port.results_directory()
+ root_output_dir = results_directory
writer = TestResultWriter(filesystem, port, root_output_dir, test_name)
if driver_output.error:
@@ -92,6 +92,7 @@ class TestResultWriter(object):
FILENAME_SUFFIX_DIFF = "-diff"
FILENAME_SUFFIX_STDERR = "-stderr"
FILENAME_SUFFIX_CRASH_LOG = "-crash-log"
+ FILENAME_SUFFIX_SAMPLE = "-sample"
FILENAME_SUFFIX_WDIFF = "-wdiff.html"
FILENAME_SUFFIX_PRETTY_PATCH = "-pretty-diff.html"
FILENAME_SUFFIX_IMAGE_DIFF = "-diff.png"
@@ -166,6 +167,10 @@ class TestResultWriter(object):
filename = self.output_filename(self.FILENAME_SUFFIX_CRASH_LOG + ".txt")
self._write_text_file(filename, crash_log)
+ def copy_sample_file(self, sample_file):
+ filename = self.output_filename(self.FILENAME_SUFFIX_SAMPLE + ".txt")
+ self._filesystem.copyfile(sample_file, filename)
+
def write_text_files(self, actual_text, expected_text):
self.write_output_files(".txt", actual_text, expected_text)
diff --git a/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py b/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
index dfd604187..f484da55e 100644
--- a/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,13 +23,13 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.layout_tests.controllers import test_result_writer
from webkitpy.layout_tests.models import test_failures
-from webkitpy.layout_tests.port.driver import DriverOutput
-from webkitpy.layout_tests.port.test import TestPort
+from webkitpy.port.driver import DriverOutput
+from webkitpy.port.test import TestPort
class TestResultWriterTest(unittest.TestCase):
@@ -51,10 +50,6 @@ class TestResultWriterTest(unittest.TestCase):
driver_output1 = DriverOutput('text1', 'image1', 'imagehash1', 'audio1')
driver_output2 = DriverOutput('text2', 'image2', 'imagehash2', 'audio2')
failures = [test_failures.FailureReftestMismatch(test_reference_file)]
- test_result_writer.write_test_result(host.filesystem, ImageDiffTestPort(host), test_name,
+ test_result_writer.write_test_result(host.filesystem, ImageDiffTestPort(host), port.results_directory(), test_name,
driver_output1, driver_output2, failures)
self.assertEqual([0], used_tolerance_values)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
index f277c93de..715497de1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
@@ -32,7 +32,8 @@ from webkitpy.layout_tests.layout_package import json_results_generator
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
-class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase):
+
+class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGenerator):
"""A JSON results generator for layout tests."""
LAYOUT_TESTS_PATH = "LayoutTests"
@@ -40,8 +41,8 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
# Additional JSON fields.
WONTFIX = "wontfixCounts"
- FAILURE_TO_CHAR = {test_expectations.PASS: json_results_generator.JSONResultsGeneratorBase.PASS_RESULT,
- test_expectations.SKIP: json_results_generator.JSONResultsGeneratorBase.SKIP_RESULT,
+ FAILURE_TO_CHAR = {test_expectations.PASS: json_results_generator.JSONResultsGenerator.PASS_RESULT,
+ test_expectations.SKIP: json_results_generator.JSONResultsGenerator.SKIP_RESULT,
test_expectations.CRASH: "C",
test_expectations.TIMEOUT: "T",
test_expectations.IMAGE: "I",
@@ -52,14 +53,13 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
def __init__(self, port, builder_name, build_name, build_number,
results_file_base_path, builder_base_url,
- test_timings, expectations, result_summary, all_tests,
+ expectations, run_results,
test_results_server=None, test_type="", master_name=""):
"""Modifies the results.json file. Grabs it off the archive directory
if it is not found locally.
Args:
- result_summary: ResultsSummary object storing the summary of the test
- results.
+ run_results: TestRunResults object storing the details of the test run.
"""
super(JSONLayoutResultsGenerator, self).__init__(
port, builder_name, build_name, build_number, results_file_base_path,
@@ -68,10 +68,9 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
self._expectations = expectations
- self._result_summary = result_summary
- self._failures = dict((test_name, result_summary.results[test_name].type) for test_name in result_summary.failures)
- self._all_tests = all_tests
- self._test_timings = dict((test_tuple.test_name, test_tuple.test_run_time) for test_tuple in test_timings)
+ self._run_results = run_results
+ self._failures = dict((test_name, run_results.results_by_name[test_name].type) for test_name in run_results.failures_by_name)
+ self._test_timings = run_results.results_by_name
self.generate_json_output()
@@ -99,7 +98,7 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
def _get_test_timing(self, test_name):
if test_name in self._test_timings:
# Floor for now to get time in seconds.
- return int(self._test_timings[test_name])
+ return int(self._test_timings[test_name].test_run_time)
return 0
# override
@@ -108,7 +107,7 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
# override
def _get_modifier_char(self, test_name):
- if test_name not in self._all_tests:
+ if test_name not in self._run_results.results_by_name:
return self.NO_DATA_RESULT
if test_name in self._failures:
@@ -122,12 +121,12 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
# override
def _insert_failure_summaries(self, results_for_builder):
- summary = self._result_summary
+ run_results = self._run_results
self._insert_item_into_raw_list(results_for_builder,
- len((set(summary.failures.keys()) |
- summary.tests_by_expectation[test_expectations.SKIP]) &
- summary.tests_by_timeline[test_expectations.NOW]),
+ len((set(run_results.failures_by_name.keys()) |
+ run_results.tests_by_expectation[test_expectations.SKIP]) &
+ run_results.tests_by_timeline[test_expectations.NOW]),
self.FIXABLE_COUNT)
self._insert_item_into_raw_list(results_for_builder,
self._get_failure_summary_entry(test_expectations.NOW),
@@ -154,23 +153,22 @@ class JSONLayoutResultsGenerator(json_results_generator.JSONResultsGeneratorBase
"""Creates a summary object to insert into the JSON.
Args:
- summary ResultSummary object with test results
timeline current test_expectations timeline to build entry for
(e.g., test_expectations.NOW, etc.)
"""
entry = {}
- summary = self._result_summary
- timeline_tests = summary.tests_by_timeline[timeline]
+ run_results = self._run_results
+ timeline_tests = run_results.tests_by_timeline[timeline]
entry[self.SKIP_RESULT] = len(
- summary.tests_by_expectation[test_expectations.SKIP] &
+ run_results.tests_by_expectation[test_expectations.SKIP] &
timeline_tests)
entry[self.PASS_RESULT] = len(
- summary.tests_by_expectation[test_expectations.PASS] &
+ run_results.tests_by_expectation[test_expectations.PASS] &
timeline_tests)
- for failure_type in summary.tests_by_expectation.keys():
+ for failure_type in run_results.tests_by_expectation.keys():
if failure_type not in self.FAILURE_TO_CHAR:
continue
- count = len(summary.tests_by_expectation[failure_type] &
+ count = len(run_results.tests_by_expectation[failure_type] &
timeline_tests)
entry[self.FAILURE_TO_CHAR[failure_type]] = count
return entry
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
index 73834f0ad..a2c2e0b63 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py
@@ -150,7 +150,7 @@ class TestResult(object):
return self.failed or self.modifier == self.DISABLED
-class JSONResultsGeneratorBase(object):
+class JSONResultsGenerator(object):
"""A JSON results generator for generic tests."""
MAX_NUMBER_OF_BUILD_RESULTS_TO_LOG = 750
@@ -188,16 +188,12 @@ class JSONResultsGeneratorBase(object):
URL_FOR_TEST_LIST_JSON = "http://%s/testfile?builder=%s&name=%s&testlistjson=1&testtype=%s&master=%s"
- # FIXME: Remove generate_incremental_results once the reference to it in
- # http://src.chromium.org/viewvc/chrome/trunk/tools/build/scripts/slave/gtest_slave_utils.py
- # has been removed.
def __init__(self, port, builder_name, build_name, build_number,
results_file_base_path, builder_base_url,
test_results_map, svn_repositories=None,
test_results_server=None,
test_type="",
- master_name="",
- generate_incremental_results=None):
+ master_name=""):
"""Modifies the results.json file. Grabs it off the archive directory
if it is not found locally.
@@ -524,17 +520,9 @@ class JSONResultsGeneratorBase(object):
# Include SVN revisions for the given repositories.
for (name, path) in self._svn_repositories:
- # Note: for JSON file's backward-compatibility we use 'chrome' rather
- # than 'chromium' here.
- if name == 'chromium':
- name = 'chrome'
- self._insert_item_into_raw_list(results_for_builder,
- self._get_svn_revision(path),
- name + 'Revision')
+ self._insert_item_into_raw_list(results_for_builder, self._get_svn_revision(path), name.lower() + 'Revision')
- self._insert_item_into_raw_list(results_for_builder,
- int(time.time()),
- self.TIME)
+ self._insert_item_into_raw_list(results_for_builder, int(time.time()), self.TIME)
def _insert_test_time_and_result(self, test_name, tests):
""" Insert a test item with its results to the given tests dictionary.
@@ -653,8 +641,3 @@ class JSONResultsGeneratorBase(object):
"""Returns whether all the results are of the given type
(e.g. all passes)."""
return len(results) == 1 and results[0][1] == type
-
-
-# Left here not to break anything.
-class JSONResultsGenerator(JSONResultsGeneratorBase):
- pass
diff --git a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py
index f04300f83..c952e33bc 100644
--- a/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/layout_package/json_results_generator_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
import json
import optparse
import random
@@ -34,7 +34,7 @@ import random
from webkitpy.common.host_mock import MockHost
from webkitpy.layout_tests.layout_package import json_results_generator
from webkitpy.layout_tests.models import test_expectations
-from webkitpy.layout_tests.port import test
+from webkitpy.port import test
from webkitpy.thirdparty.mock import Mock
@@ -91,7 +91,7 @@ class JSONGeneratorTest(unittest.TestCase):
host = MockHost()
port = Mock()
port._filesystem = host.filesystem
- generator = json_results_generator.JSONResultsGeneratorBase(port,
+ generator = json_results_generator.JSONResultsGenerator(port,
self.builder_name, self.build_name, self.build_number,
'',
None, # don't fetch past json results archive
@@ -121,14 +121,14 @@ class JSONGeneratorTest(unittest.TestCase):
fixable_count,
json, num_runs):
# Aliasing to a short name for better access to its constants.
- JRG = json_results_generator.JSONResultsGeneratorBase
+ JRG = json_results_generator.JSONResultsGenerator
- self.assertTrue(JRG.VERSION_KEY in json)
- self.assertTrue(self.builder_name in json)
+ self.assertIn(JRG.VERSION_KEY, json)
+ self.assertIn(self.builder_name, json)
buildinfo = json[self.builder_name]
- self.assertTrue(JRG.FIXABLE in buildinfo)
- self.assertTrue(JRG.TESTS in buildinfo)
+ self.assertIn(JRG.FIXABLE, buildinfo)
+ self.assertIn(JRG.TESTS, buildinfo)
self.assertEqual(len(buildinfo[JRG.BUILD_NUMBERS]), num_runs)
self.assertEqual(buildinfo[JRG.BUILD_NUMBERS][0], self.build_number)
@@ -181,7 +181,7 @@ class JSONGeneratorTest(unittest.TestCase):
nodes = path.split("/")
sub_trie = trie
for node in nodes:
- self.assertTrue(node in sub_trie)
+ self.assertIn(node, sub_trie)
sub_trie = sub_trie[node]
return sub_trie
@@ -229,7 +229,3 @@ class JSONGeneratorTest(unittest.TestCase):
}
self.assertEqual(json.dumps(trie), json.dumps(expected_trie))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py
new file mode 100644
index 000000000..90e4cbb51
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations.py
@@ -0,0 +1,111 @@
+# Copyright (C) 2012 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 logging
+import optparse
+import signal
+import traceback
+
+from webkitpy.common.host import Host
+from webkitpy.layout_tests.models import test_expectations
+from webkitpy.port import platform_options
+
+
+# This mirrors what the shell normally does.
+INTERRUPTED_EXIT_STATUS = signal.SIGINT + 128
+
+# This is a randomly chosen exit code that can be tested against to
+# indicate that an unexpected exception occurred.
+EXCEPTIONAL_EXIT_STATUS = 254
+
+_log = logging.getLogger(__name__)
+
+
+def lint(host, options, logging_stream):
+ logger = logging.getLogger()
+ logger.setLevel(logging.INFO)
+ handler = logging.StreamHandler(logging_stream)
+ logger.addHandler(handler)
+
+ try:
+ ports_to_lint = [host.port_factory.get(name) for name in host.port_factory.all_port_names(options.platform)]
+ files_linted = set()
+ lint_failed = False
+
+ for port_to_lint in ports_to_lint:
+ expectations_dict = port_to_lint.expectations_dict()
+
+ # FIXME: This won't work if multiple ports share a TestExpectations file but support different modifiers in the file.
+ for expectations_file in expectations_dict.keys():
+ if expectations_file in files_linted:
+ continue
+
+ try:
+ test_expectations.TestExpectations(port_to_lint,
+ expectations_to_lint={expectations_file: expectations_dict[expectations_file]})
+ except test_expectations.ParseError as e:
+ lint_failed = True
+ _log.error('')
+ for warning in e.warnings:
+ _log.error(warning)
+ _log.error('')
+ files_linted.add(expectations_file)
+
+ if lint_failed:
+ _log.error('Lint failed.')
+ return -1
+
+ _log.info('Lint succeeded.')
+ return 0
+ finally:
+ logger.removeHandler(handler)
+
+
+def main(argv, _, stderr):
+ parser = optparse.OptionParser(option_list=platform_options(use_globs=True))
+ options, _ = parser.parse_args(argv)
+
+ if options.platform and 'test' in options.platform:
+ # It's a bit lame to import mocks into real code, but this allows the user
+ # to run tests against the test platform interactively, which is useful for
+ # debugging test failures.
+ from webkitpy.common.host_mock import MockHost
+ host = MockHost()
+ else:
+ host = Host()
+
+ try:
+ exit_status = lint(host, options, stderr)
+ except KeyboardInterrupt:
+ exit_status = INTERRUPTED_EXIT_STATUS
+ except Exception as e:
+ print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
+ traceback.print_exc(file=stderr)
+ exit_status = EXCEPTIONAL_EXIT_STATUS
+
+ return exit_status
diff --git a/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
new file mode 100644
index 000000000..47280292a
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/lint_test_expectations_unittest.py
@@ -0,0 +1,157 @@
+# Copyright (C) 2012 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 optparse
+import StringIO
+import unittest2 as unittest
+
+from webkitpy.common.host_mock import MockHost
+from webkitpy.layout_tests import lint_test_expectations
+
+
+class FakePort(object):
+ def __init__(self, host, name, path):
+ self.host = host
+ self.name = name
+ self.path = path
+
+ def test_configuration(self):
+ return None
+
+ def expectations_dict(self):
+ self.host.ports_parsed.append(self.name)
+ return {self.path: ''}
+
+ def skipped_layout_tests(self, _):
+ return set([])
+
+ def all_test_configurations(self):
+ return []
+
+ def configuration_specifier_macros(self):
+ return []
+
+ def get_option(self, _, val):
+ return val
+
+ def path_to_generic_test_expectations_file(self):
+ return ''
+
+class FakeFactory(object):
+ def __init__(self, host, ports):
+ self.host = host
+ self.ports = {}
+ for port in ports:
+ self.ports[port.name] = port
+
+ def get(self, port_name, *args, **kwargs): # pylint: disable=W0613,E0202
+ return self.ports[port_name]
+
+ def all_port_names(self, platform=None): # pylint: disable=W0613,E0202
+ return sorted(self.ports.keys())
+
+
+class LintTest(unittest.TestCase):
+ def test_all_configurations(self):
+ host = MockHost()
+ host.ports_parsed = []
+ host.port_factory = FakeFactory(host, (FakePort(host, 'a', 'path-to-a'),
+ FakePort(host, 'b', 'path-to-b'),
+ FakePort(host, 'b-win', 'path-to-b')))
+
+ logging_stream = StringIO.StringIO()
+ options = optparse.Values({'platform': None})
+ res = lint_test_expectations.lint(host, options, logging_stream)
+ self.assertEqual(res, 0)
+ self.assertEqual(host.ports_parsed, ['a', 'b', 'b-win'])
+
+ def test_lint_test_files(self):
+ logging_stream = StringIO.StringIO()
+ options = optparse.Values({'platform': 'test-mac-leopard'})
+ host = MockHost()
+
+ # pylint appears to complain incorrectly about the method overrides pylint: disable=E0202,C0322
+ # FIXME: incorrect complaints about spacing pylint: disable=C0322
+ host.port_factory.all_port_names = lambda platform=None: [platform]
+
+ res = lint_test_expectations.lint(host, options, logging_stream)
+
+ self.assertEqual(res, 0)
+ self.assertIn('Lint succeeded', logging_stream.getvalue())
+
+ def test_lint_test_files__errors(self):
+ options = optparse.Values({'platform': 'test', 'debug_rwt_logging': False})
+ host = MockHost()
+
+ # FIXME: incorrect complaints about spacing pylint: disable=C0322
+ port = host.port_factory.get(options.platform, options=options)
+ port.expectations_dict = lambda: {'foo': '-- syntax error1', 'bar': '-- syntax error2'}
+
+ host.port_factory.get = lambda platform, options=None: port
+ host.port_factory.all_port_names = lambda platform=None: [port.name()]
+
+ logging_stream = StringIO.StringIO()
+
+ res = lint_test_expectations.lint(host, options, logging_stream)
+
+ self.assertEqual(res, -1)
+ self.assertIn('Lint failed', logging_stream.getvalue())
+ self.assertIn('foo:1', logging_stream.getvalue())
+ self.assertIn('bar:1', logging_stream.getvalue())
+
+
+class MainTest(unittest.TestCase):
+ def test_success(self):
+ orig_lint_fn = lint_test_expectations.lint
+
+ # unused args pylint: disable=W0613
+ def interrupting_lint(host, options, logging_stream):
+ raise KeyboardInterrupt
+
+ def successful_lint(host, options, logging_stream):
+ return 0
+
+ def exception_raising_lint(host, options, logging_stream):
+ assert False
+
+ stdout = StringIO.StringIO()
+ stderr = StringIO.StringIO()
+ try:
+ lint_test_expectations.lint = interrupting_lint
+ res = lint_test_expectations.main([], stdout, stderr)
+ self.assertEqual(res, lint_test_expectations.INTERRUPTED_EXIT_STATUS)
+
+ lint_test_expectations.lint = successful_lint
+ res = lint_test_expectations.main(['--platform', 'test'], stdout, stderr)
+ self.assertEqual(res, 0)
+
+ lint_test_expectations.lint = exception_raising_lint
+ res = lint_test_expectations.main([], stdout, stderr)
+ self.assertEqual(res, lint_test_expectations.EXCEPTIONAL_EXIT_STATUS)
+ finally:
+ lint_test_expectations.lint = orig_lint_fn
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py b/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py
deleted file mode 100644
index 5bb501061..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/models/result_summary.py
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright (C) 2010 Google Inc. All rights reserved.
-# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
-#
-# 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.
-
-from webkitpy.layout_tests.models.test_expectations import TestExpectations, SKIP, CRASH, TIMEOUT
-
-
-class ResultSummary(object):
- def __init__(self, expectations, test_files, iterations, expected_skips):
- self.total = len(test_files) * iterations
- self.remaining = self.total
- self.expectations = expectations
- self.expected = 0
- self.unexpected = 0
- self.unexpected_failures = 0
- self.unexpected_crashes = 0
- self.unexpected_timeouts = 0
- self.total_tests_by_expectation = {}
- self.tests_by_expectation = {}
- self.tests_by_timeline = {}
- self.results = {}
- self.unexpected_results = {}
- self.failures = {}
- self.total_failures = 0
- self.expected_skips = 0
- self.total_tests_by_expectation[SKIP] = len(expected_skips)
- self.tests_by_expectation[SKIP] = expected_skips
- for expectation in TestExpectations.EXPECTATIONS.values():
- self.tests_by_expectation[expectation] = set()
- self.total_tests_by_expectation[expectation] = 0
- for timeline in TestExpectations.TIMELINES.values():
- self.tests_by_timeline[timeline] = expectations.get_tests_with_timeline(timeline)
- self.slow_tests = set()
-
- def add(self, test_result, expected, test_is_slow):
- self.total_tests_by_expectation[test_result.type] += 1
- self.tests_by_expectation[test_result.type].add(test_result.test_name)
- self.results[test_result.test_name] = test_result
- self.remaining -= 1
- if len(test_result.failures):
- self.total_failures += 1
- self.failures[test_result.test_name] = test_result.failures
- if expected:
- self.expected += 1
- if test_result.type == SKIP:
- self.expected_skips += 1
- else:
- self.unexpected_results[test_result.test_name] = test_result
- self.unexpected += 1
- if len(test_result.failures):
- self.unexpected_failures += 1
- if test_result.type == CRASH:
- self.unexpected_crashes += 1
- elif test_result.type == TIMEOUT:
- self.unexpected_timeouts += 1
- if test_is_slow:
- self.slow_tests.add(test_result.test_name)
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
index ec99cf6b4..1a7d375f2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.layout_tests.models.test_configuration import *
@@ -71,15 +71,15 @@ class TestConfigurationTest(unittest.TestCase):
def test_hash(self):
config_dict = {}
config_dict[TestConfiguration('xp', 'x86', 'release')] = True
- self.assertTrue(TestConfiguration('xp', 'x86', 'release') in config_dict)
+ self.assertIn(TestConfiguration('xp', 'x86', 'release'), config_dict)
self.assertTrue(config_dict[TestConfiguration('xp', 'x86', 'release')])
def query_unknown_key():
return config_dict[TestConfiguration('xp', 'x86', 'debug')]
self.assertRaises(KeyError, query_unknown_key)
- self.assertTrue(TestConfiguration('xp', 'x86', 'release') in config_dict)
- self.assertFalse(TestConfiguration('xp', 'x86', 'debug') in config_dict)
+ self.assertIn(TestConfiguration('xp', 'x86', 'release'), config_dict)
+ self.assertNotIn(TestConfiguration('xp', 'x86', 'debug'), config_dict)
configs_list = [TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug'), TestConfiguration('xp', 'x86', 'debug')]
self.assertEqual(len(configs_list), 3)
self.assertEqual(len(set(configs_list)), 2)
@@ -103,7 +103,7 @@ class SpecifierSorterTest(unittest.TestCase):
def test_init(self):
sorter = SpecifierSorter()
- self.assertEqual(sorter.category_for_specifier('control'), None)
+ self.assertIsNone(sorter.category_for_specifier('control'))
sorter = SpecifierSorter(self._all_test_configurations)
self.assertEqual(sorter.category_for_specifier('xp'), 'version')
sorter = SpecifierSorter(self._all_test_configurations, MOCK_MACROS)
@@ -111,7 +111,7 @@ class SpecifierSorterTest(unittest.TestCase):
def test_add_specifier(self):
sorter = SpecifierSorter()
- self.assertEqual(sorter.category_for_specifier('control'), None)
+ self.assertIsNone(sorter.category_for_specifier('control'))
sorter.add_specifier('version', 'control')
self.assertEqual(sorter.category_for_specifier('control'), 'version')
sorter.add_specifier('version', 'one')
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
index 234259657..f270aa41d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -277,25 +276,16 @@ class TestExpectationParser(object):
warnings = []
WEBKIT_BUG_PREFIX = 'webkit.org/b/'
- CHROMIUM_BUG_PREFIX = 'crbug.com/'
- V8_BUG_PREFIX = 'code.google.com/p/v8/issues/detail?id='
tokens = remaining_string.split()
state = 'start'
for token in tokens:
- if (token.startswith(WEBKIT_BUG_PREFIX) or
- token.startswith(CHROMIUM_BUG_PREFIX) or
- token.startswith(V8_BUG_PREFIX) or
- token.startswith('Bug(')):
+ if token.startswith(WEBKIT_BUG_PREFIX) or token.startswith('Bug('):
if state != 'start':
warnings.append('"%s" is not at the start of the line.' % token)
break
if token.startswith(WEBKIT_BUG_PREFIX):
bugs.append(token.replace(WEBKIT_BUG_PREFIX, 'BUGWK'))
- elif token.startswith(CHROMIUM_BUG_PREFIX):
- bugs.append(token.replace(CHROMIUM_BUG_PREFIX, 'BUGCR'))
- elif token.startswith(V8_BUG_PREFIX):
- bugs.append(token.replace(V8_BUG_PREFIX, 'BUGV8_'))
else:
match = re.match('Bug\((\w+)\)$', token)
if not match:
@@ -330,6 +320,8 @@ class TestExpectationParser(object):
elif state == 'expectations':
if token in ('Rebaseline', 'Skip', 'Slow', 'WontFix'):
modifiers.append(token.upper())
+ elif token not in cls._expectation_tokens:
+ warnings.append('Unrecognized expectation "%s"' % token)
else:
expectations.append(cls._expectation_tokens.get(token, token))
elif state == 'name_found':
@@ -345,12 +337,12 @@ class TestExpectationParser(object):
elif state not in ('name_found', 'done'):
warnings.append('Missing a "]"')
- if 'WONTFIX' in modifiers and 'SKIP' not in modifiers:
+ if 'WONTFIX' in modifiers and 'SKIP' not in modifiers and not expectations:
modifiers.append('SKIP')
if 'SKIP' in modifiers and expectations:
# FIXME: This is really a semantic warning and shouldn't be here. Remove when we drop the old syntax.
- warnings.append('A test marked Skip or WontFix must not have other expectations.')
+ warnings.append('A test marked Skip must not have other expectations.')
elif not expectations:
if 'SKIP' not in modifiers and 'REBASELINE' not in modifiers and 'SLOW' not in modifiers:
modifiers.append('SKIP')
@@ -755,7 +747,8 @@ class TestExpectations(object):
'text': TEXT,
'timeout': TIMEOUT,
'crash': CRASH,
- 'missing': MISSING}
+ 'missing': MISSING,
+ 'skip': SKIP}
# (aggregated by category, pass/fail/skip, type)
EXPECTATION_DESCRIPTIONS = {SKIP: 'skipped',
@@ -840,7 +833,7 @@ class TestExpectations(object):
# FIXME: This constructor does too much work. We should move the actual parsing of
# the expectations into separate routines so that linting and handling overrides
# can be controlled separately, and the constructor can be more of a no-op.
- def __init__(self, port, tests=None, include_overrides=True, expectations_to_lint=None):
+ def __init__(self, port, tests=None, include_generic=True, include_overrides=True, expectations_to_lint=None):
self._full_test_list = tests
self._test_config = port.test_configuration()
self._is_lint_mode = expectations_to_lint is not None
@@ -848,16 +841,32 @@ class TestExpectations(object):
self._parser = TestExpectationParser(port, tests, self._is_lint_mode)
self._port = port
self._skipped_tests_warnings = []
+ self._expectations = []
expectations_dict = expectations_to_lint or port.expectations_dict()
- self._expectations = self._parser.parse(expectations_dict.keys()[0], expectations_dict.values()[0])
- self._add_expectations(self._expectations)
- if len(expectations_dict) > 1 and include_overrides:
- for name in expectations_dict.keys()[1:]:
- expectations = self._parser.parse(name, expectations_dict[name])
+ expectations_dict_index = 0
+ # Populate generic expectations (if enabled by include_generic).
+ if port.path_to_generic_test_expectations_file() in expectations_dict:
+ if include_generic:
+ expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
self._add_expectations(expectations)
self._expectations += expectations
+ expectations_dict_index += 1
+
+ # Populate default port expectations (always enabled).
+ if len(expectations_dict) > expectations_dict_index:
+ expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
+ self._add_expectations(expectations)
+ self._expectations += expectations
+ expectations_dict_index += 1
+
+ # Populate override expectations (if enabled by include_overrides).
+ while len(expectations_dict) > expectations_dict_index and include_overrides:
+ expectations = self._parser.parse(expectations_dict.keys()[expectations_dict_index], expectations_dict.values()[expectations_dict_index])
+ self._add_expectations(expectations)
+ self._expectations += expectations
+ expectations_dict_index += 1
# FIXME: move ignore_tests into port.skipped_layout_tests()
self.add_skipped_tests(port.skipped_layout_tests(tests).union(set(port.get_option('ignore_tests', []))))
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
index bbe031cde..621188c19 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -27,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.common.system.outputcapture import OutputCapture
@@ -330,9 +329,8 @@ class ExpectationSyntaxTests(Base):
def test_bare_name_and_bugs(self):
self.assert_tokenize_exp('webkit.org/b/12345 foo.html', modifiers=['BUGWK12345', 'SKIP'], expectations=['PASS'])
- self.assert_tokenize_exp('crbug.com/12345 foo.html', modifiers=['BUGCR12345', 'SKIP'], expectations=['PASS'])
self.assert_tokenize_exp('Bug(dpranke) foo.html', modifiers=['BUGDPRANKE', 'SKIP'], expectations=['PASS'])
- self.assert_tokenize_exp('crbug.com/12345 crbug.com/34567 foo.html', modifiers=['BUGCR12345', 'BUGCR34567', 'SKIP'], expectations=['PASS'])
+ self.assert_tokenize_exp('webkit.org/b/12345 webkit.org/b/34567 foo.html', modifiers=['BUGWK12345', 'BUGWK34567', 'SKIP'], expectations=['PASS'])
def test_comments(self):
self.assert_tokenize_exp("# comment", name=None, comment="# comment")
@@ -347,7 +345,7 @@ class ExpectationSyntaxTests(Base):
self.assert_tokenize_exp('[ Foo ] foo.html ', modifiers=['Foo', 'SKIP'], expectations=['PASS'])
def test_unknown_expectation(self):
- self.assert_tokenize_exp('foo.html [ Audio ]', expectations=['Audio'])
+ self.assert_tokenize_exp('foo.html [ Audio ]', warnings=['Unrecognized expectation "Audio"'])
def test_skip(self):
self.assert_tokenize_exp('foo.html [ Skip ]', modifiers=['SKIP'], expectations=['PASS'])
@@ -357,6 +355,8 @@ class ExpectationSyntaxTests(Base):
def test_wontfix(self):
self.assert_tokenize_exp('foo.html [ WontFix ]', modifiers=['WONTFIX', 'SKIP'], expectations=['PASS'])
+ self.assert_tokenize_exp('foo.html [ WontFix ImageOnlyFailure ]', modifiers=['WONTFIX'], expectations=['IMAGE'])
+ self.assert_tokenize_exp('foo.html [ WontFix Pass Failure ]', modifiers=['WONTFIX'], expectations=['PASS', 'FAIL'])
def test_blank_line(self):
self.assert_tokenize_exp('', name=None)
@@ -364,9 +364,9 @@ class ExpectationSyntaxTests(Base):
def test_warnings(self):
self.assert_tokenize_exp('[ Mac ]', warnings=['Did not find a test name.'], name=None)
self.assert_tokenize_exp('[ [', warnings=['unexpected "["'], name=None)
- self.assert_tokenize_exp('crbug.com/12345 ]', warnings=['unexpected "]"'], name=None)
+ self.assert_tokenize_exp('webkit.org/b/12345 ]', warnings=['unexpected "]"'], name=None)
- self.assert_tokenize_exp('foo.html crbug.com/12345 ]', warnings=['"crbug.com/12345" is not at the start of the line.'])
+ self.assert_tokenize_exp('foo.html webkit.org/b/12345 ]', warnings=['"webkit.org/b/12345" is not at the start of the line.'])
class SemanticTests(Base):
@@ -392,16 +392,16 @@ class SemanticTests(Base):
self.assertEqual(line.warnings, ['Test lacks BUG modifier.'])
def test_skip_and_wontfix(self):
- # Skip and WontFix are not allowed to have other expectations as well, because those
+ # Skip is not allowed to have other expectations as well, because those
# expectations won't be exercised and may become stale .
self.parse_exp('failures/expected/text.html [ Failure Skip ]')
self.assertTrue(self._exp.has_warnings())
self.parse_exp('failures/expected/text.html [ Crash WontFix ]')
- self.assertTrue(self._exp.has_warnings())
+ self.assertFalse(self._exp.has_warnings())
self.parse_exp('failures/expected/text.html [ Pass WontFix ]')
- self.assertTrue(self._exp.has_warnings())
+ self.assertFalse(self._exp.has_warnings())
def test_slow_and_timeout(self):
# A test cannot be SLOW and expected to TIMEOUT.
@@ -696,7 +696,8 @@ class TestExpectationSerializationTests(unittest.TestCase):
serialized = TestExpectations.list_to_string(lines, self._converter, reconstitute_only_these=reconstitute_only_these)
self.assertEqual(serialized, "Bug(x) [ XP Release ] Yay [ ImageOnlyFailure ]\nNay")
- def test_string_whitespace_stripping(self):
+ def disabled_test_string_whitespace_stripping(self):
+ # FIXME: Re-enable this test once we rework the code to no longer support the old syntax.
self.assert_round_trip('\n', '')
self.assert_round_trip(' [ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]')
self.assert_round_trip('[ FOO ] bar [ BAZ ]', '[ FOO ] bar [ BAZ ]')
@@ -704,7 +705,3 @@ class TestExpectationSerializationTests(unittest.TestCase):
self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.')
self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.')
self.assert_round_trip('[ FOO ] bar [ BAZ ] # Qux.', '[ FOO ] bar [ BAZ ] # Qux.')
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py b/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py
index 402b30aea..52b720854 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_failures.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py
index 74ef8cbb4..ea9a2e82d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_failures_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.layout_tests.models.test_failures import *
@@ -36,7 +36,7 @@ class TestFailuresTest(unittest.TestCase):
failure_obj = cls()
s = failure_obj.dumps()
new_failure_obj = TestFailure.loads(s)
- self.assertTrue(isinstance(new_failure_obj, cls))
+ self.assertIsInstance(new_failure_obj, cls)
self.assertEqual(failure_obj, new_failure_obj)
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_input.py b/Tools/Scripts/webkitpy/layout_tests/models/test_input.py
index 56f2d52bd..58c84ab64 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_input.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_input.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_results.py b/Tools/Scripts/webkitpy/layout_tests/models/test_results.py
index 6b9db5587..d6fd10b18 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_results.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_results.py
@@ -38,15 +38,24 @@ class TestResult(object):
def loads(string):
return cPickle.loads(string)
- def __init__(self, test_name, failures=None, test_run_time=None, has_stderr=False, reftest_type=[]):
+ def __init__(self, test_name, failures=None, test_run_time=None, has_stderr=False, reftest_type=None, pid=None, references=None):
self.test_name = test_name
self.failures = failures or []
- self.test_run_time = test_run_time or 0
+ self.test_run_time = test_run_time or 0 # The time taken to execute the test itself.
self.has_stderr = has_stderr
- self.reftest_type = reftest_type
+ self.reftest_type = reftest_type or []
+ self.pid = pid
+ self.references = references or []
+
# FIXME: Setting this in the constructor makes this class hard to mutate.
self.type = test_failures.determine_result_type(failures)
+ # These are set by the worker, not by the driver, so they are not passed to the constructor.
+ self.worker_name = ''
+ self.shard_name = ''
+ self.total_run_time = 0 # The time taken to run the test plus any references, compute diffs, etc.
+ self.test_number = None
+
def __eq__(self, other):
return (self.test_name == other.test_name and
self.failures == other.failures and
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_results_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_results_unittest.py
index 80d8a474e..e1bb2f27a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_results_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_results_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.layout_tests.models.test_results import TestResult
@@ -44,7 +44,7 @@ class TestResultsTest(unittest.TestCase):
test_run_time=1.1)
s = result.dumps()
new_result = TestResult.loads(s)
- self.assertTrue(isinstance(new_result, TestResult))
+ self.assertIsInstance(new_result, TestResult)
self.assertEqual(new_result, result)
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
new file mode 100644
index 000000000..3af122485
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results.py
@@ -0,0 +1,260 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
+#
+# 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 logging
+
+from webkitpy.layout_tests.models import test_expectations
+from webkitpy.layout_tests.models import test_failures
+
+
+_log = logging.getLogger(__name__)
+
+
+class TestRunResults(object):
+ def __init__(self, expectations, num_tests):
+ self.total = num_tests
+ self.remaining = self.total
+ self.expectations = expectations
+ self.expected = 0
+ self.unexpected = 0
+ self.unexpected_failures = 0
+ self.unexpected_crashes = 0
+ self.unexpected_timeouts = 0
+ self.tests_by_expectation = {}
+ self.tests_by_timeline = {}
+ self.results_by_name = {} # Map of test name to the last result for the test.
+ self.all_results = [] # All results from a run, including every iteration of every test.
+ self.unexpected_results_by_name = {}
+ self.failures_by_name = {}
+ self.total_failures = 0
+ self.expected_skips = 0
+ for expectation in test_expectations.TestExpectations.EXPECTATIONS.values():
+ self.tests_by_expectation[expectation] = set()
+ for timeline in test_expectations.TestExpectations.TIMELINES.values():
+ self.tests_by_timeline[timeline] = expectations.get_tests_with_timeline(timeline)
+ self.slow_tests = set()
+ self.interrupted = False
+
+ def add(self, test_result, expected, test_is_slow):
+ self.tests_by_expectation[test_result.type].add(test_result.test_name)
+ self.results_by_name[test_result.test_name] = test_result
+ if test_result.type != test_expectations.SKIP:
+ self.all_results.append(test_result)
+ self.remaining -= 1
+ if len(test_result.failures):
+ self.total_failures += 1
+ self.failures_by_name[test_result.test_name] = test_result.failures
+ if expected:
+ self.expected += 1
+ if test_result.type == test_expectations.SKIP:
+ self.expected_skips += 1
+ else:
+ self.unexpected_results_by_name[test_result.test_name] = test_result
+ self.unexpected += 1
+ if len(test_result.failures):
+ self.unexpected_failures += 1
+ if test_result.type == test_expectations.CRASH:
+ self.unexpected_crashes += 1
+ elif test_result.type == test_expectations.TIMEOUT:
+ self.unexpected_timeouts += 1
+ if test_is_slow:
+ self.slow_tests.add(test_result.test_name)
+
+
+class RunDetails(object):
+ def __init__(self, exit_code, summarized_results=None, initial_results=None, retry_results=None, enabled_pixel_tests_in_retry=False):
+ self.exit_code = exit_code
+ self.summarized_results = summarized_results
+ self.initial_results = initial_results
+ self.retry_results = retry_results
+ self.enabled_pixel_tests_in_retry = enabled_pixel_tests_in_retry
+
+
+def _interpret_test_failures(failures):
+ test_dict = {}
+ failure_types = [type(failure) for failure in failures]
+ # FIXME: get rid of all this is_* values once there is a 1:1 map between
+ # TestFailure type and test_expectations.EXPECTATION.
+ if test_failures.FailureMissingAudio in failure_types:
+ test_dict['is_missing_audio'] = True
+
+ if test_failures.FailureMissingResult in failure_types:
+ test_dict['is_missing_text'] = True
+
+ if test_failures.FailureMissingImage in failure_types or test_failures.FailureMissingImageHash in failure_types:
+ test_dict['is_missing_image'] = True
+
+ if 'image_diff_percent' not in test_dict:
+ for failure in failures:
+ if isinstance(failure, test_failures.FailureImageHashMismatch) or isinstance(failure, test_failures.FailureReftestMismatch):
+ test_dict['image_diff_percent'] = failure.diff_percent
+
+ return test_dict
+
+
+def summarize_results(port_obj, expectations, initial_results, retry_results, enabled_pixel_tests_in_retry):
+ """Returns a dictionary containing a summary of the test runs, with the following fields:
+ 'version': a version indicator
+ 'fixable': The number of fixable tests (NOW - PASS)
+ 'skipped': The number of skipped tests (NOW & SKIPPED)
+ 'num_regressions': The number of non-flaky failures
+ 'num_flaky': The number of flaky failures
+ 'num_missing': The number of tests with missing results
+ 'num_passes': The number of unexpected passes
+ 'tests': a dict of tests -> {'expected': '...', 'actual': '...'}
+ """
+ results = {}
+ results['version'] = 3
+
+ tbe = initial_results.tests_by_expectation
+ tbt = initial_results.tests_by_timeline
+ results['fixable'] = len(tbt[test_expectations.NOW] - tbe[test_expectations.PASS])
+ results['skipped'] = len(tbt[test_expectations.NOW] & tbe[test_expectations.SKIP])
+
+ num_passes = 0
+ num_flaky = 0
+ num_missing = 0
+ num_regressions = 0
+ keywords = {}
+ for expecation_string, expectation_enum in test_expectations.TestExpectations.EXPECTATIONS.iteritems():
+ keywords[expectation_enum] = expecation_string.upper()
+
+ for modifier_string, modifier_enum in test_expectations.TestExpectations.MODIFIERS.iteritems():
+ keywords[modifier_enum] = modifier_string.upper()
+
+ tests = {}
+
+ for test_name, result in initial_results.results_by_name.iteritems():
+ # Note that if a test crashed in the original run, we ignore
+ # whether or not it crashed when we retried it (if we retried it),
+ # and always consider the result not flaky.
+ expected = expectations.get_expectations_string(test_name)
+ result_type = result.type
+ actual = [keywords[result_type]]
+
+ if result_type == test_expectations.SKIP:
+ continue
+
+ test_dict = {}
+ if result.has_stderr:
+ test_dict['has_stderr'] = True
+
+ if result.reftest_type:
+ test_dict.update(reftest_type=list(result.reftest_type))
+
+ if expectations.has_modifier(test_name, test_expectations.WONTFIX):
+ test_dict['wontfix'] = True
+
+ if result_type == test_expectations.PASS:
+ num_passes += 1
+ # FIXME: include passing tests that have stderr output.
+ if expected == 'PASS':
+ continue
+ elif result_type == test_expectations.CRASH:
+ if test_name in initial_results.unexpected_results_by_name:
+ num_regressions += 1
+ elif result_type == test_expectations.MISSING:
+ if test_name in initial_results.unexpected_results_by_name:
+ num_missing += 1
+ elif test_name in initial_results.unexpected_results_by_name:
+ if retry_results and test_name not in retry_results.unexpected_results_by_name:
+ actual.extend(expectations.get_expectations_string(test_name).split(" "))
+ num_flaky += 1
+ elif retry_results:
+ retry_result_type = retry_results.unexpected_results_by_name[test_name].type
+ if result_type != retry_result_type:
+ if enabled_pixel_tests_in_retry and result_type == test_expectations.TEXT and retry_result_type == test_expectations.IMAGE_PLUS_TEXT:
+ num_regressions += 1
+ else:
+ num_flaky += 1
+ actual.append(keywords[retry_result_type])
+ else:
+ num_regressions += 1
+ else:
+ num_regressions += 1
+
+ test_dict['expected'] = expected
+ test_dict['actual'] = " ".join(actual)
+
+ test_dict.update(_interpret_test_failures(result.failures))
+
+ if retry_results:
+ retry_result = retry_results.unexpected_results_by_name.get(test_name)
+ if retry_result:
+ test_dict.update(_interpret_test_failures(retry_result.failures))
+
+ # Store test hierarchically by directory. e.g.
+ # foo/bar/baz.html: test_dict
+ # foo/bar/baz1.html: test_dict
+ #
+ # becomes
+ # foo: {
+ # bar: {
+ # baz.html: test_dict,
+ # baz1.html: test_dict
+ # }
+ # }
+ parts = test_name.split('/')
+ current_map = tests
+ for i, part in enumerate(parts):
+ if i == (len(parts) - 1):
+ current_map[part] = test_dict
+ break
+ if part not in current_map:
+ current_map[part] = {}
+ current_map = current_map[part]
+
+ results['tests'] = tests
+ results['num_passes'] = num_passes
+ results['num_flaky'] = num_flaky
+ results['num_missing'] = num_missing
+ results['num_regressions'] = num_regressions
+ results['uses_expectations_file'] = port_obj.uses_test_expectations_file()
+ results['interrupted'] = initial_results.interrupted # Does results.html have enough information to compute this itself? (by checking total number of results vs. total number of tests?)
+ results['layout_tests_dir'] = port_obj.layout_tests_dir()
+ results['has_wdiff'] = port_obj.wdiff_available()
+ results['has_pretty_patch'] = port_obj.pretty_patch_available()
+ results['pixel_tests_enabled'] = port_obj.get_option('pixel_tests')
+
+ try:
+ # We only use the svn revision for using trac links in the results.html file,
+ # Don't do this by default since it takes >100ms.
+ # FIXME: Do we really need to populate this both here and in the json_results_generator?
+ if port_obj.get_option("builder_name"):
+ port_obj.host.initialize_scm()
+ results['revision'] = port_obj.host.scm().head_svn_revision()
+ except Exception, e:
+ _log.warn("Failed to determine svn revision for checkout (cwd: %s, webkit_base: %s), leaving 'revision' key blank in full_results.json.\n%s" % (port_obj._filesystem.getcwd(), port_obj.path_from_webkit_base(), e))
+ # Handle cases where we're running outside of version control.
+ import traceback
+ _log.debug('Failed to learn head svn revision:')
+ _log.debug(traceback.format_exc())
+ results['revision'] = ""
+
+ return results
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
new file mode 100644
index 000000000..c0d9265f0
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py
@@ -0,0 +1,135 @@
+# 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 unittest2 as unittest
+
+from webkitpy.common.host_mock import MockHost
+from webkitpy.layout_tests.models import test_expectations
+from webkitpy.layout_tests.models import test_failures
+from webkitpy.layout_tests.models import test_results
+from webkitpy.layout_tests.models import test_run_results
+
+
+def get_result(test_name, result_type=test_expectations.PASS, run_time=0):
+ failures = []
+ if result_type == test_expectations.TIMEOUT:
+ failures = [test_failures.FailureTimeout()]
+ elif result_type == test_expectations.AUDIO:
+ failures = [test_failures.FailureAudioMismatch()]
+ elif result_type == test_expectations.CRASH:
+ failures = [test_failures.FailureCrash()]
+ return test_results.TestResult(test_name, failures=failures, test_run_time=run_time)
+
+
+def run_results(port):
+ tests = ['passes/text.html', 'failures/expected/timeout.html', 'failures/expected/crash.html', 'failures/expected/hang.html',
+ 'failures/expected/audio.html']
+ expectations = test_expectations.TestExpectations(port, tests)
+ return test_run_results.TestRunResults(expectations, len(tests))
+
+
+def summarized_results(port, expected, passing, flaky):
+ test_is_slow = False
+
+ initial_results = run_results(port)
+ if expected:
+ initial_results.add(get_result('passes/text.html', test_expectations.PASS), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/audio.html', test_expectations.AUDIO), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/timeout.html', test_expectations.TIMEOUT), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/crash.html', test_expectations.CRASH), expected, test_is_slow)
+ elif passing:
+ initial_results.add(get_result('passes/text.html'), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/audio.html'), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/timeout.html'), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/crash.html'), expected, test_is_slow)
+ else:
+ initial_results.add(get_result('passes/text.html', test_expectations.TIMEOUT), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/audio.html', test_expectations.AUDIO), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/timeout.html', test_expectations.CRASH), expected, test_is_slow)
+ initial_results.add(get_result('failures/expected/crash.html', test_expectations.TIMEOUT), expected, test_is_slow)
+
+ # we only list hang.html here, since normally this is WontFix
+ initial_results.add(get_result('failures/expected/hang.html', test_expectations.TIMEOUT), expected, test_is_slow)
+
+ if flaky:
+ retry_results = run_results(port)
+ retry_results.add(get_result('passes/text.html'), True, test_is_slow)
+ retry_results.add(get_result('failures/expected/timeout.html'), True, test_is_slow)
+ retry_results.add(get_result('failures/expected/crash.html'), True, test_is_slow)
+ else:
+ retry_results = None
+
+ return test_run_results.summarize_results(port, initial_results.expectations, initial_results, retry_results, enabled_pixel_tests_in_retry=False)
+
+
+class InterpretTestFailuresTest(unittest.TestCase):
+ def setUp(self):
+ host = MockHost()
+ self.port = host.port_factory.get(port_name='test')
+
+ def test_interpret_test_failures(self):
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureImageHashMismatch(diff_percent=0.42)])
+ self.assertEqual(test_dict['image_diff_percent'], 0.42)
+
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureReftestMismatch(self.port.abspath_for_test('foo/reftest-expected.html'))])
+ self.assertIn('image_diff_percent', test_dict)
+
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureReftestMismatchDidNotOccur(self.port.abspath_for_test('foo/reftest-expected-mismatch.html'))])
+ self.assertEqual(len(test_dict), 0)
+
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureMissingAudio()])
+ self.assertIn('is_missing_audio', test_dict)
+
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureMissingResult()])
+ self.assertIn('is_missing_text', test_dict)
+
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureMissingImage()])
+ self.assertIn('is_missing_image', test_dict)
+
+ test_dict = test_run_results._interpret_test_failures([test_failures.FailureMissingImageHash()])
+ self.assertIn('is_missing_image', test_dict)
+
+
+class SummarizedResultsTest(unittest.TestCase):
+ def setUp(self):
+ host = MockHost(initialize_scm_by_default=False)
+ self.port = host.port_factory.get(port_name='test')
+
+ def test_no_svn_revision(self):
+ summary = summarized_results(self.port, expected=False, passing=False, flaky=False)
+ self.assertNotIn('revision', summary)
+
+ def test_svn_revision(self):
+ self.port._options.builder_name = 'dummy builder'
+ summary = summarized_results(self.port, expected=False, passing=False, flaky=False)
+ self.assertNotEquals(summary['revision'], '')
+
+ def test_summarized_results_wontfix(self):
+ self.port._options.builder_name = 'dummy builder'
+ summary = summarized_results(self.port, expected=False, passing=False, flaky=False)
+ self.assertTrue(summary['tests']['failures']['expected']['hang.html']['wontfix'])
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
deleted file mode 100755
index 4e0fbe282..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium.py
+++ /dev/null
@@ -1,455 +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.
-
-"""Chromium implementations of the Port interface."""
-
-import base64
-import errno
-import logging
-import re
-import signal
-import subprocess
-import sys
-import time
-
-from webkitpy.common.system import executive
-from webkitpy.common.system.path import cygpath
-from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port.base import Port, VirtualTestSuite
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumPort(Port):
- """Abstract base class for Chromium implementations of the Port class."""
-
- ALL_SYSTEMS = (
- ('snowleopard', 'x86'),
- ('lion', 'x86'),
- ('mountainlion', 'x86'),
- ('xp', 'x86'),
- ('win7', 'x86'),
- ('lucid', 'x86'),
- ('lucid', 'x86_64'),
- # FIXME: Technically this should be 'arm', but adding a third architecture type breaks TestConfigurationConverter.
- # If we need this to be 'arm' in the future, then we first have to fix TestConfigurationConverter.
- ('icecreamsandwich', 'x86'))
-
- ALL_BASELINE_VARIANTS = [
- 'chromium-mac-mountainlion', 'chromium-mac-lion', 'chromium-mac-snowleopard',
- 'chromium-win-win7', 'chromium-win-xp',
- 'chromium-linux-x86_64', 'chromium-linux-x86',
- ]
-
- CONFIGURATION_SPECIFIER_MACROS = {
- 'mac': ['snowleopard', 'lion', 'mountainlion'],
- 'win': ['xp', 'win7'],
- 'linux': ['lucid'],
- 'android': ['icecreamsandwich'],
- }
-
- DEFAULT_BUILD_DIRECTORIES = ('out',)
-
- # overridden in subclasses.
- FALLBACK_PATHS = {}
-
- @classmethod
- def _static_build_path(cls, filesystem, build_directory, chromium_base, webkit_base, configuration, comps):
- if build_directory:
- return filesystem.join(build_directory, configuration, *comps)
-
- for directory in cls.DEFAULT_BUILD_DIRECTORIES:
- base_dir = filesystem.join(chromium_base, directory, configuration)
- if filesystem.exists(base_dir):
- return filesystem.join(base_dir, *comps)
-
- for directory in cls.DEFAULT_BUILD_DIRECTORIES:
- base_dir = filesystem.join(webkit_base, directory, configuration)
- if filesystem.exists(base_dir):
- return filesystem.join(base_dir, *comps)
-
- # We have to default to something, so pick the last one.
- return filesystem.join(base_dir, *comps)
-
- @classmethod
- def _chromium_base_dir(cls, filesystem):
- module_path = filesystem.path_to_module(cls.__module__)
- offset = module_path.find('third_party')
- if offset == -1:
- return filesystem.join(module_path[0:module_path.find('Tools')], 'Source', 'WebKit', 'chromium')
- else:
- return module_path[0:offset]
-
- def __init__(self, host, port_name, **kwargs):
- super(ChromiumPort, self).__init__(host, port_name, **kwargs)
- # All sub-classes override this, but we need an initial value for testing.
- self._chromium_base_dir_path = None
-
- def is_chromium(self):
- return True
-
- def default_max_locked_shards(self):
- """Return the number of "locked" shards to run in parallel (like the http tests)."""
- max_locked_shards = int(self.default_child_processes()) / 4
- if not max_locked_shards:
- return 1
- return max_locked_shards
-
- def default_pixel_tests(self):
- return True
-
- def default_baseline_search_path(self):
- return map(self._webkit_baseline_path, self.FALLBACK_PATHS[self.version()])
-
- def default_timeout_ms(self):
- if self.get_option('configuration') == 'Debug':
- return 12 * 1000
- return 6 * 1000
-
- def _check_file_exists(self, path_to_file, file_description,
- override_step=None, logging=True):
- """Verify the file is present where expected or log an error.
-
- Args:
- file_name: The (human friendly) name or description of the file
- you're looking for (e.g., "HTTP Server"). Used for error logging.
- override_step: An optional string to be logged if the check fails.
- logging: Whether or not log the error messages."""
- if not self._filesystem.exists(path_to_file):
- if logging:
- _log.error('Unable to find %s' % file_description)
- _log.error(' at %s' % path_to_file)
- if override_step:
- _log.error(' %s' % override_step)
- _log.error('')
- return False
- return True
-
- def check_build(self, needs_http):
- result = True
-
- dump_render_tree_binary_path = self._path_to_driver()
- result = self._check_file_exists(dump_render_tree_binary_path,
- 'test driver') and result
- if result and self.get_option('build'):
- result = self._check_driver_build_up_to_date(
- self.get_option('configuration'))
- else:
- _log.error('')
-
- helper_path = self._path_to_helper()
- if helper_path:
- result = self._check_file_exists(helper_path,
- 'layout test helper') and result
-
- if self.get_option('pixel_tests'):
- result = self.check_image_diff(
- 'To override, invoke with --no-pixel-tests') and result
-
- # It's okay if pretty patch and wdiff aren't available, but we will at least log messages.
- self._pretty_patch_available = self.check_pretty_patch()
- self._wdiff_available = self.check_wdiff()
-
- return result
-
- def check_sys_deps(self, needs_http):
- result = super(ChromiumPort, self).check_sys_deps(needs_http)
-
- cmd = [self._path_to_driver(), '--check-layout-test-sys-deps']
-
- local_error = executive.ScriptError()
-
- def error_handler(script_error):
- local_error.exit_code = script_error.exit_code
-
- output = self._executive.run_command(cmd, error_handler=error_handler)
- if local_error.exit_code:
- _log.error('System dependencies check failed.')
- _log.error('To override, invoke with --nocheck-sys-deps')
- _log.error('')
- _log.error(output)
- return False
- return result
-
- def check_image_diff(self, override_step=None, logging=True):
- image_diff_path = self._path_to_image_diff()
- return self._check_file_exists(image_diff_path, 'image diff exe',
- override_step, logging)
-
- def diff_image(self, expected_contents, actual_contents, tolerance=None):
- # tolerance is not used in chromium. Make sure caller doesn't pass tolerance other than zero or None.
- assert (tolerance is None) or tolerance == 0
-
- # If only one of them exists, return that one.
- if not actual_contents and not expected_contents:
- return (None, 0, None)
- if not actual_contents:
- return (expected_contents, 0, None)
- if not expected_contents:
- return (actual_contents, 0, None)
-
- tempdir = self._filesystem.mkdtemp()
-
- expected_filename = self._filesystem.join(str(tempdir), "expected.png")
- self._filesystem.write_binary_file(expected_filename, expected_contents)
-
- actual_filename = self._filesystem.join(str(tempdir), "actual.png")
- self._filesystem.write_binary_file(actual_filename, actual_contents)
-
- diff_filename = self._filesystem.join(str(tempdir), "diff.png")
-
- native_expected_filename = self._convert_path(expected_filename)
- native_actual_filename = self._convert_path(actual_filename)
- native_diff_filename = self._convert_path(diff_filename)
-
- executable = self._path_to_image_diff()
- # Note that although we are handed 'old', 'new', image_diff wants 'new', 'old'.
- comand = [executable, '--diff', native_actual_filename, native_expected_filename, native_diff_filename]
-
- result = None
- err_str = None
- try:
- exit_code = self._executive.run_command(comand, return_exit_code=True)
- if exit_code == 0:
- # The images are the same.
- result = None
- elif exit_code == 1:
- result = self._filesystem.read_binary_file(native_diff_filename)
- else:
- err_str = "image diff returned an exit code of %s" % exit_code
- except OSError, e:
- err_str = 'error running image diff: %s' % str(e)
- finally:
- self._filesystem.rmtree(str(tempdir))
-
- return (result, 0, err_str or None) # FIXME: how to get % diff?
-
- def path_from_chromium_base(self, *comps):
- """Returns the full path to path made by joining the top of the
- Chromium source tree and the list of path components in |*comps|."""
- if self._chromium_base_dir_path is None:
- self._chromium_base_dir_path = self._chromium_base_dir(self._filesystem)
- return self._filesystem.join(self._chromium_base_dir_path, *comps)
-
- def setup_environ_for_server(self, server_name=None):
- clean_env = super(ChromiumPort, self).setup_environ_for_server(server_name)
- # Webkit Linux (valgrind layout) bot needs these envvars.
- self._copy_value_from_environ_if_set(clean_env, 'VALGRIND_LIB')
- self._copy_value_from_environ_if_set(clean_env, 'VALGRIND_LIB_INNER')
- return clean_env
-
- def default_results_directory(self):
- try:
- return self.path_from_chromium_base('webkit', self.get_option('configuration'), 'layout-test-results')
- except AssertionError:
- return self._build_path('layout-test-results')
-
- def _missing_symbol_to_skipped_tests(self):
- # FIXME: Should WebKitPort have these definitions also?
- return {
- "ff_mp3_decoder": ["webaudio/codec-tests/mp3"],
- "ff_aac_decoder": ["webaudio/codec-tests/aac"],
- }
-
- def skipped_layout_tests(self, test_list):
- # FIXME: Merge w/ WebKitPort.skipped_layout_tests()
- return set(self._skipped_tests_for_unsupported_features(test_list))
-
- def setup_test_run(self):
- # Delete the disk cache if any to ensure a clean test run.
- dump_render_tree_binary_path = self._path_to_driver()
- cachedir = self._filesystem.dirname(dump_render_tree_binary_path)
- cachedir = self._filesystem.join(cachedir, "cache")
- if self._filesystem.exists(cachedir):
- self._filesystem.rmtree(cachedir)
-
- def start_helper(self):
- helper_path = self._path_to_helper()
- if helper_path:
- _log.debug("Starting layout helper %s" % helper_path)
- # Note: Not thread safe: http://bugs.python.org/issue2320
- self._helper = subprocess.Popen([helper_path],
- stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None)
- is_ready = self._helper.stdout.readline()
- if not is_ready.startswith('ready'):
- _log.error("layout_test_helper failed to be ready")
-
- def stop_helper(self):
- if self._helper:
- _log.debug("Stopping layout test helper")
- try:
- self._helper.stdin.write("x\n")
- self._helper.stdin.close()
- self._helper.wait()
- except IOError, e:
- pass
- finally:
- self._helper = None
-
-
- def exit_code_from_summarized_results(self, unexpected_results):
- # Turn bots red for missing results.
- return unexpected_results['num_regressions'] + unexpected_results['num_missing']
-
- def configuration_specifier_macros(self):
- return self.CONFIGURATION_SPECIFIER_MACROS
-
- def all_baseline_variants(self):
- return self.ALL_BASELINE_VARIANTS
-
- def _generate_all_test_configurations(self):
- """Returns a sequence of the TestConfigurations the port supports."""
- # By default, we assume we want to test every graphics type in
- # every configuration on every system.
- test_configurations = []
- for version, architecture in self.ALL_SYSTEMS:
- for build_type in self.ALL_BUILD_TYPES:
- test_configurations.append(TestConfiguration(version, architecture, build_type))
- return test_configurations
-
- try_builder_names = frozenset([
- 'linux_layout',
- 'mac_layout',
- 'win_layout',
- 'linux_layout_rel',
- 'mac_layout_rel',
- 'win_layout_rel',
- ])
-
- def warn_if_bug_missing_in_test_expectations(self):
- return True
-
- def expectations_files(self):
- paths = [self.path_to_test_expectations_file()]
- skia_expectations_path = self.path_from_chromium_base('skia', 'skia_test_expectations.txt')
- # FIXME: we should probably warn if this file is missing in some situations.
- # See the discussion in webkit.org/b/97699.
- if self._filesystem.exists(skia_expectations_path):
- paths.append(skia_expectations_path)
-
- builder_name = self.get_option('builder_name', 'DUMMY_BUILDER_NAME')
- if builder_name == 'DUMMY_BUILDER_NAME' or '(deps)' in builder_name or builder_name in self.try_builder_names:
- paths.append(self.path_from_chromium_base('webkit', 'tools', 'layout_tests', 'test_expectations.txt'))
- return paths
-
- def repository_paths(self):
- repos = super(ChromiumPort, self).repository_paths()
- repos.append(('chromium', self.path_from_chromium_base('build')))
- return repos
-
- def _get_crash_log(self, name, pid, stdout, stderr, newer_than):
- if stderr and 'AddressSanitizer' in stderr:
- asan_filter_path = self.path_from_chromium_base('tools', 'valgrind', 'asan', 'asan_symbolize.py')
- if self._filesystem.exists(asan_filter_path):
- output = self._executive.run_command([asan_filter_path], input=stderr, decode_output=False)
- stderr = self._executive.run_command(['c++filt'], input=output, decode_output=False)
-
- return super(ChromiumPort, self)._get_crash_log(name, pid, stdout, stderr, newer_than)
-
- def virtual_test_suites(self):
- return [
- VirtualTestSuite('platform/chromium/virtual/gpu/fast/canvas',
- 'fast/canvas',
- ['--enable-accelerated-2d-canvas']),
- VirtualTestSuite('platform/chromium/virtual/gpu/canvas/philip',
- 'canvas/philip',
- ['--enable-accelerated-2d-canvas']),
- VirtualTestSuite('platform/chromium/virtual/threaded/compositing/visibility',
- 'compositing/visibility',
- ['--enable-threaded-compositing']),
- VirtualTestSuite('platform/chromium/virtual/threaded/compositing/webgl',
- 'compositing/webgl',
- ['--enable-threaded-compositing']),
- VirtualTestSuite('platform/chromium/virtual/gpu/fast/hidpi',
- 'fast/hidpi',
- ['--force-compositing-mode']),
- VirtualTestSuite('platform/chromium/virtual/softwarecompositing',
- 'compositing',
- ['--enable-software-compositing']),
- VirtualTestSuite('platform/chromium/virtual/deferred/fast/images',
- 'fast/images',
- ['--enable-deferred-image-decoding', '--enable-per-tile-painting', '--force-compositing-mode']),
- ]
-
- #
- # PROTECTED METHODS
- #
- # These routines should only be called by other methods in this file
- # or any subclasses.
- #
-
- def _build_path(self, *comps):
- return self._build_path_with_configuration(None, *comps)
-
- def _build_path_with_configuration(self, configuration, *comps):
- # Note that we don't implement --root or do the option caching that the
- # base class does, because chromium doesn't use 'webkit-build-directory' and
- # hence finding the right directory is relatively fast.
- configuration = configuration or self.get_option('configuration')
- return self._static_build_path(self._filesystem, self.get_option('build_directory'),
- self.path_from_chromium_base(), self.path_from_webkit_base(), configuration, comps)
-
- def _path_to_image_diff(self):
- binary_name = 'ImageDiff'
- return self._build_path(binary_name)
-
- def _check_driver_build_up_to_date(self, configuration):
- if configuration in ('Debug', 'Release'):
- try:
- debug_path = self._path_to_driver('Debug')
- release_path = self._path_to_driver('Release')
-
- debug_mtime = self._filesystem.mtime(debug_path)
- release_mtime = self._filesystem.mtime(release_path)
-
- if (debug_mtime > release_mtime and configuration == 'Release' or
- release_mtime > debug_mtime and configuration == 'Debug'):
- most_recent_binary = 'Release' if configuration == 'Debug' else 'Debug'
- _log.warning('You are running the %s binary. However the %s binary appears to be more recent. '
- 'Please pass --%s.', configuration, most_recent_binary, most_recent_binary.lower())
- _log.warning('')
- # This will fail if we don't have both a debug and release binary.
- # That's fine because, in this case, we must already be running the
- # most up-to-date one.
- except OSError:
- pass
- return True
-
- def _chromium_baseline_path(self, platform):
- if platform is None:
- platform = self.name()
- return self.path_from_webkit_base('LayoutTests', 'platform', platform)
-
- def _convert_path(self, path):
- """Handles filename conversion for subprocess command line args."""
- # See note above in diff_image() for why we need this.
- if sys.platform == 'cygwin':
- return cygpath(path)
- return path
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
deleted file mode 100644
index 91cd3100c..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android.py
+++ /dev/null
@@ -1,721 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2012 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 copy
-import logging
-import os
-import re
-import subprocess
-import sys
-import threading
-import time
-
-from webkitpy.layout_tests.port import chromium
-from webkitpy.layout_tests.port import driver
-from webkitpy.layout_tests.port import factory
-from webkitpy.layout_tests.port import server_process
-
-
-_log = logging.getLogger(__name__)
-
-# The root directory for test resources, which has the same structure as the
-# source root directory of Chromium.
-# This path is defined in Chromium's base/test/test_support_android.cc.
-DEVICE_SOURCE_ROOT_DIR = '/data/local/tmp/'
-COMMAND_LINE_FILE = DEVICE_SOURCE_ROOT_DIR + 'chrome-native-tests-command-line'
-
-# The directory to put tools and resources of DumpRenderTree.
-# If change this, must also change Tools/DumpRenderTree/chromium/TestShellAndroid.cpp
-# and Chromium's webkit/support/platform_support_android.cc.
-DEVICE_DRT_DIR = DEVICE_SOURCE_ROOT_DIR + 'drt/'
-DEVICE_FORWARDER_PATH = DEVICE_DRT_DIR + 'forwarder'
-
-# Path on the device where the test framework will create the fifo pipes.
-DEVICE_FIFO_PATH = '/data/data/org.chromium.native_test/files/'
-
-DRT_APP_PACKAGE = 'org.chromium.native_test'
-DRT_ACTIVITY_FULL_NAME = DRT_APP_PACKAGE + '/.ChromeNativeTestActivity'
-DRT_APP_CACHE_DIR = DEVICE_DRT_DIR + 'cache/'
-
-SCALING_GOVERNORS_PATTERN = "/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
-
-# All the test cases are still served to DumpRenderTree through file protocol,
-# but we use a file-to-http feature to bridge the file request to host's http
-# server to get the real test files and corresponding resources.
-# See webkit/support/platform_support_android.cc for the other side of this bridge.
-PERF_TEST_PATH_PREFIX = '/all-perf-tests'
-LAYOUT_TEST_PATH_PREFIX = '/all-tests'
-
-# All ports the Android forwarder to forward.
-# 8000, 8080 and 8443 are for http/https tests.
-# 8880 and 9323 are for websocket tests
-# (see http_server.py, apache_http_server.py and websocket_server.py).
-FORWARD_PORTS = '8000 8080 8443 8880 9323'
-
-MS_TRUETYPE_FONTS_DIR = '/usr/share/fonts/truetype/msttcorefonts/'
-MS_TRUETYPE_FONTS_PACKAGE = 'ttf-mscorefonts-installer'
-
-# Timeout in seconds to wait for start/stop of DumpRenderTree.
-DRT_START_STOP_TIMEOUT_SECS = 10
-
-# List of fonts that layout tests expect, copied from DumpRenderTree/chromium/TestShellX11.cpp.
-HOST_FONT_FILES = [
- [[MS_TRUETYPE_FONTS_DIR], 'Arial.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Arial_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Arial_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Arial_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Comic_Sans_MS.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Comic_Sans_MS_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Courier_New.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Courier_New_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Courier_New_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Courier_New_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Georgia.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Georgia_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Georgia_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Georgia_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Impact.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Trebuchet_MS_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Times_New_Roman_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Verdana.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Verdana_Bold.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Verdana_Bold_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- [[MS_TRUETYPE_FONTS_DIR], 'Verdana_Italic.ttf', MS_TRUETYPE_FONTS_PACKAGE],
- # The Microsoft font EULA
- [['/usr/share/doc/ttf-mscorefonts-installer/'], 'READ_ME!.gz', MS_TRUETYPE_FONTS_PACKAGE],
- # Other fonts: Arabic, CJK, Indic, Thai, etc.
- [['/usr/share/fonts/truetype/ttf-dejavu/'], 'DejaVuSans.ttf', 'ttf-dejavu'],
- [['/usr/share/fonts/truetype/kochi/'], 'kochi-mincho.ttf', 'ttf-kochi-mincho'],
- [['/usr/share/fonts/truetype/ttf-indic-fonts-core/'], 'lohit_hi.ttf', 'ttf-indic-fonts-core'],
- [['/usr/share/fonts/truetype/ttf-indic-fonts-core/'], 'lohit_ta.ttf', 'ttf-indic-fonts-core'],
- [['/usr/share/fonts/truetype/ttf-indic-fonts-core/'], 'MuktiNarrow.ttf', 'ttf-indic-fonts-core'],
- [['/usr/share/fonts/truetype/thai/', '/usr/share/fonts/truetype/tlwg/'], 'Garuda.ttf', 'fonts-tlwg-garuda'],
- [['/usr/share/fonts/truetype/ttf-indic-fonts-core/', '/usr/share/fonts/truetype/ttf-punjabi-fonts/'], 'lohit_pa.ttf', 'ttf-indic-fonts-core'],
-]
-
-DEVICE_FONTS_DIR = DEVICE_DRT_DIR + 'fonts/'
-
-# The layout tests directory on device, which has two usages:
-# 1. as a virtual path in file urls that will be bridged to HTTP.
-# 2. pointing to some files that are pushed to the device for tests that
-# don't work on file-over-http (e.g. blob protocol tests).
-DEVICE_WEBKIT_BASE_DIR = DEVICE_SOURCE_ROOT_DIR + 'third_party/WebKit/'
-DEVICE_LAYOUT_TESTS_DIR = DEVICE_WEBKIT_BASE_DIR + 'LayoutTests/'
-
-# Test resources that need to be accessed as files directly.
-# Each item can be the relative path of a directory or a file.
-TEST_RESOURCES_TO_PUSH = [
- # Blob tests need to access files directly.
- 'editing/pasteboard/resources',
- 'fast/files/resources',
- 'http/tests/local/resources',
- 'http/tests/local/formdata/resources',
- # User style URLs are accessed as local files in webkit_support.
- 'http/tests/security/resources/cssStyle.css',
- # Media tests need to access audio/video as files.
- 'media/content',
- 'compositing/resources/video.mp4',
-]
-
-MD5SUM_DEVICE_FILE_NAME = 'md5sum_bin'
-MD5SUM_DEVICE_PATH = '/data/local/tmp/' + MD5SUM_DEVICE_FILE_NAME
-
-class ChromiumAndroidPort(chromium.ChromiumPort):
- port_name = 'chromium-android'
-
- # Avoid initializing the adb path [worker count]+1 times by storing it as a static member.
- _adb_path = None
-
- FALLBACK_PATHS = [
- 'chromium-android',
- 'chromium-linux',
- 'chromium-win',
- 'chromium',
- ]
-
- def __init__(self, host, port_name, **kwargs):
- super(ChromiumAndroidPort, self).__init__(host, port_name, **kwargs)
-
- self._operating_system = 'android'
- self._version = 'icecreamsandwich'
-
- self._host_port = factory.PortFactory(host).get('chromium', **kwargs)
- self._server_process_constructor = self._android_server_process_constructor
-
- if hasattr(self._options, 'adb_device'):
- self._devices = self._options.adb_device
- else:
- self._devices = []
-
- @staticmethod
- def _android_server_process_constructor(port, server_name, cmd_line, env=None):
- return server_process.ServerProcess(port, server_name, cmd_line, env,
- universal_newlines=True, treat_no_data_as_crash=True)
-
- def additional_drt_flag(self):
- # The Chromium port for Android always uses the hardware GPU path.
- return ['--encode-binary', '--enable-hardware-gpu',
- '--force-compositing-mode',
- '--enable-accelerated-fixed-position']
-
- def default_timeout_ms(self):
- # Android platform has less computing power than desktop platforms.
- # Using 10 seconds allows us to pass most slow tests which are not
- # marked as slow tests on desktop platforms.
- return 10 * 1000
-
- def driver_stop_timeout(self):
- # DRT doesn't respond to closing stdin, so we might as well stop the driver immediately.
- return 0.0
-
- def default_child_processes(self):
- return len(self._get_devices())
-
- def default_baseline_search_path(self):
- return map(self._webkit_baseline_path, self.FALLBACK_PATHS)
-
- def check_wdiff(self, logging=True):
- return self._host_port.check_wdiff(logging)
-
- def check_build(self, needs_http):
- result = super(ChromiumAndroidPort, self).check_build(needs_http)
- result = self._check_file_exists(self.path_to_md5sum(), 'md5sum utility') and result
- result = self._check_file_exists(self.path_to_forwarder(), 'forwarder utility') and result
- if not result:
- _log.error('For complete Android build requirements, please see:')
- _log.error('')
- _log.error(' http://code.google.com/p/chromium/wiki/AndroidBuildInstructions')
-
- return result
-
- def check_sys_deps(self, needs_http):
- for (font_dirs, font_file, package) in HOST_FONT_FILES:
- exists = False
- for font_dir in font_dirs:
- font_path = font_dir + font_file
- if self._check_file_exists(font_path, '', logging=False):
- exists = True
- break
- if not exists:
- _log.error('You are missing %s under %s. Try installing %s. See build instructions.' % (font_file, font_dirs, package))
- return False
- return True
-
- def expectations_files(self):
- # LayoutTests/platform/chromium-android/TestExpectations should contain only the rules to
- # skip tests for the features not supported or not testable on Android.
- # Other rules should be in LayoutTests/platform/chromium/TestExpectations.
- android_expectations_file = self.path_from_webkit_base('LayoutTests', 'platform', 'chromium-android', 'TestExpectations')
- return super(ChromiumAndroidPort, self).expectations_files() + [android_expectations_file]
-
- def requires_http_server(self):
- """Chromium Android runs tests on devices, and uses the HTTP server to
- serve the actual layout tests to DumpRenderTree."""
- return True
-
- def start_http_server(self, additional_dirs=None, number_of_servers=0):
- if not additional_dirs:
- additional_dirs = {}
- additional_dirs[PERF_TEST_PATH_PREFIX] = self.perf_tests_dir()
- additional_dirs[LAYOUT_TEST_PATH_PREFIX] = self.layout_tests_dir()
- super(ChromiumAndroidPort, self).start_http_server(additional_dirs, number_of_servers)
-
- def create_driver(self, worker_number, no_timeout=False):
- # We don't want the default DriverProxy which is not compatible with our driver.
- # See comments in ChromiumAndroidDriver.start().
- return ChromiumAndroidDriver(self, worker_number, pixel_tests=self.get_option('pixel_tests'),
- # Force no timeout to avoid DumpRenderTree timeouts before NRWT.
- no_timeout=True)
-
- def driver_cmd_line(self):
- # Override to return the actual DumpRenderTree command line.
- return self.create_driver(0)._drt_cmd_line(self.get_option('pixel_tests'), [])
-
- def path_to_adb(self):
- if ChromiumAndroidPort._adb_path:
- return ChromiumAndroidPort._adb_path
-
- provided_adb_path = self.path_from_chromium_base('third_party', 'android_tools', 'sdk', 'platform-tools', 'adb')
-
- path_version = self._determine_adb_version('adb')
- provided_version = self._determine_adb_version(provided_adb_path)
- assert provided_version, 'The checked in Android SDK is missing. Are you sure you ran update-webkit --chromium-android?'
-
- if not path_version:
- ChromiumAndroidPort._adb_path = provided_adb_path
- elif provided_version > path_version:
- # FIXME: The Printer isn't initialized when this is called, so using _log would just show an unitialized logger error.
- print >> sys.stderr, 'The "adb" version in your path is older than the one checked in, consider updating your local Android SDK. Using the checked in one.'
- ChromiumAndroidPort._adb_path = provided_adb_path
- else:
- ChromiumAndroidPort._adb_path = 'adb'
-
- return ChromiumAndroidPort._adb_path
-
- def path_to_forwarder(self):
- return self._build_path('forwarder')
-
- def path_to_md5sum(self):
- return self._build_path(MD5SUM_DEVICE_FILE_NAME)
-
- # Overridden private functions.
-
- def _build_path(self, *comps):
- return self._host_port._build_path(*comps)
-
- def _build_path_with_configuration(self, configuration, *comps):
- return self._host_port._build_path_with_configuration(configuration, *comps)
-
- def _path_to_apache(self):
- return self._host_port._path_to_apache()
-
- def _path_to_apache_config_file(self):
- return self._host_port._path_to_apache_config_file()
-
- def _path_to_driver(self, configuration=None):
- return self._build_path_with_configuration(configuration, 'DumpRenderTree_apk/DumpRenderTree-debug.apk')
-
- def _path_to_helper(self):
- return None
-
- def _path_to_image_diff(self):
- return self._host_port._path_to_image_diff()
-
- def _path_to_lighttpd(self):
- return self._host_port._path_to_lighttpd()
-
- def _path_to_lighttpd_modules(self):
- return self._host_port._path_to_lighttpd_modules()
-
- def _path_to_lighttpd_php(self):
- return self._host_port._path_to_lighttpd_php()
-
- def _path_to_wdiff(self):
- return self._host_port._path_to_wdiff()
-
- def _shut_down_http_server(self, pid):
- return self._host_port._shut_down_http_server(pid)
-
- def _driver_class(self):
- return ChromiumAndroidDriver
-
- # Local private functions.
-
- def _determine_adb_version(self, adb_path):
- re_version = re.compile('^.*version ([\d\.]+)$')
- try:
- output = self._executive.run_command([adb_path, 'version'], error_handler=self._executive.ignore_error)
- except OSError:
- return None
- result = re_version.match(output)
- if not output or not result:
- return None
- return [int(n) for n in result.group(1).split('.')]
-
- def _get_devices(self):
- if not self._devices:
- re_device = re.compile('^([a-zA-Z0-9_:.-]+)\tdevice$', re.MULTILINE)
- result = self._executive.run_command([self.path_to_adb(), 'devices'], error_handler=self._executive.ignore_error)
- self._devices = re_device.findall(result)
- if not self._devices:
- raise AssertionError('No devices attached. Result of "adb devices": %s' % result)
- return self._devices
-
- def _get_device_serial(self, worker_number):
- devices = self._get_devices()
- if worker_number >= len(devices):
- raise AssertionError('Worker number exceeds available number of devices')
- return devices[worker_number]
-
-
-class ChromiumAndroidDriver(driver.Driver):
- def __init__(self, port, worker_number, pixel_tests, no_timeout=False):
- super(ChromiumAndroidDriver, self).__init__(port, worker_number, pixel_tests, no_timeout)
- self._cmd_line = None
- self._in_fifo_path = DEVICE_FIFO_PATH + 'stdin.fifo'
- self._out_fifo_path = DEVICE_FIFO_PATH + 'test.fifo'
- self._err_fifo_path = DEVICE_FIFO_PATH + 'stderr.fifo'
- self._read_stdout_process = None
- self._read_stderr_process = None
- self._forwarder_process = None
- self._has_setup = False
- self._original_governors = {}
- self._device_serial = port._get_device_serial(worker_number)
- self._adb_command = [port.path_to_adb(), '-s', self._device_serial]
-
- def __del__(self):
- self._teardown_performance()
- super(ChromiumAndroidDriver, self).__del__()
-
- def _setup_md5sum_and_push_data_if_needed(self):
- self._md5sum_path = self._port.path_to_md5sum()
- if not self._file_exists_on_device(MD5SUM_DEVICE_PATH):
- if not self._push_to_device(self._md5sum_path, MD5SUM_DEVICE_PATH):
- raise AssertionError('Could not push md5sum to device')
-
- self._push_executable()
- self._push_fonts()
- self._push_test_resources()
-
- def _setup_test(self):
- if self._has_setup:
- return
-
- self._restart_adb_as_root()
- self._setup_md5sum_and_push_data_if_needed()
- self._has_setup = True
- self._setup_performance()
-
- # Required by webkit_support::GetWebKitRootDirFilePath().
- # Other directories will be created automatically by adb push.
- self._run_adb_command(['shell', 'mkdir', '-p', DEVICE_SOURCE_ROOT_DIR + 'chrome'])
-
- # Allow the DumpRenderTree app to fully access the directory.
- # The native code needs the permission to write temporary files and create pipes here.
- self._run_adb_command(['shell', 'mkdir', '-p', DEVICE_DRT_DIR])
- self._run_adb_command(['shell', 'chmod', '777', DEVICE_DRT_DIR])
-
- # Delete the disk cache if any to ensure a clean test run.
- # This is like what's done in ChromiumPort.setup_test_run but on the device.
- self._run_adb_command(['shell', 'rm', '-r', DRT_APP_CACHE_DIR])
-
- def _log_error(self, message):
- _log.error('[%s] %s' % (self._device_serial, message))
-
- def _log_debug(self, message):
- _log.debug('[%s] %s' % (self._device_serial, message))
-
- def _abort(self, message):
- raise AssertionError('[%s] %s' % (self._device_serial, message))
-
- @staticmethod
- def _extract_hashes_from_md5sum_output(md5sum_output):
- assert md5sum_output
- return [line.split(' ')[0] for line in md5sum_output]
-
- def _push_file_if_needed(self, host_file, device_file):
- assert os.path.exists(host_file)
- device_hashes = self._extract_hashes_from_md5sum_output(
- self._port.host.executive.popen(self._adb_command + ['shell', MD5SUM_DEVICE_PATH, device_file],
- stdout=subprocess.PIPE).stdout)
- host_hashes = self._extract_hashes_from_md5sum_output(
- self._port.host.executive.popen(args=['%s_host' % self._md5sum_path, host_file],
- stdout=subprocess.PIPE).stdout)
- if host_hashes and device_hashes == host_hashes:
- return
- self._push_to_device(host_file, device_file)
-
- def _push_executable(self):
- self._push_file_if_needed(self._port.path_to_forwarder(), DEVICE_FORWARDER_PATH)
- self._push_file_if_needed(self._port._build_path('DumpRenderTree.pak'), DEVICE_DRT_DIR + 'DumpRenderTree.pak')
- self._push_file_if_needed(self._port._build_path('DumpRenderTree_resources'), DEVICE_DRT_DIR + 'DumpRenderTree_resources')
- self._push_file_if_needed(self._port._build_path('android_main_fonts.xml'), DEVICE_DRT_DIR + 'android_main_fonts.xml')
- self._push_file_if_needed(self._port._build_path('android_fallback_fonts.xml'), DEVICE_DRT_DIR + 'android_fallback_fonts.xml')
- self._run_adb_command(['uninstall', DRT_APP_PACKAGE])
- drt_host_path = self._port._path_to_driver()
- install_result = self._run_adb_command(['install', drt_host_path])
- if install_result.find('Success') == -1:
- self._abort('Failed to install %s onto device: %s' % (drt_host_path, install_result))
-
- def _push_fonts(self):
- self._log_debug('Pushing fonts')
- path_to_ahem_font = self._port._build_path('AHEM____.TTF')
- self._push_file_if_needed(path_to_ahem_font, DEVICE_FONTS_DIR + 'AHEM____.TTF')
- for (host_dirs, font_file, package) in HOST_FONT_FILES:
- for host_dir in host_dirs:
- host_font_path = host_dir + font_file
- if self._port._check_file_exists(host_font_path, '', logging=False):
- self._push_file_if_needed(host_font_path, DEVICE_FONTS_DIR + font_file)
-
- def _push_test_resources(self):
- self._log_debug('Pushing test resources')
- for resource in TEST_RESOURCES_TO_PUSH:
- self._push_file_if_needed(self._port.layout_tests_dir() + '/' + resource, DEVICE_LAYOUT_TESTS_DIR + resource)
-
- def _restart_adb_as_root(self):
- output = self._run_adb_command(['root'])
- if 'adbd is already running as root' in output:
- return
- elif not 'restarting adbd as root' in output:
- self._log_error('Unrecognized output from adb root: %s' % output)
-
- # Regardless the output, give the device a moment to come back online.
- self._run_adb_command(['wait-for-device'])
-
- def _run_adb_command(self, cmd, ignore_error=False):
- self._log_debug('Run adb command: ' + str(cmd))
- if ignore_error:
- error_handler = self._port._executive.ignore_error
- else:
- error_handler = None
- result = self._port._executive.run_command(self._adb_command + cmd, error_handler=error_handler)
- # Limit the length to avoid too verbose output of commands like 'adb logcat' and 'cat /data/tombstones/tombstone01'
- # whose outputs are normally printed in later logs.
- self._log_debug('Run adb result: ' + result[:80])
- return result
-
- def _link_device_file(self, from_file, to_file, ignore_error=False):
- # rm to_file first to make sure that ln succeeds.
- self._run_adb_command(['shell', 'rm', to_file], ignore_error)
- return self._run_adb_command(['shell', 'ln', '-s', from_file, to_file], ignore_error)
-
- def _push_to_device(self, host_path, device_path, ignore_error=False):
- return self._run_adb_command(['push', host_path, device_path], ignore_error)
-
- def _pull_from_device(self, device_path, host_path, ignore_error=False):
- return self._run_adb_command(['pull', device_path, host_path], ignore_error)
-
- def _get_last_stacktrace(self):
- tombstones = self._run_adb_command(['shell', 'ls', '-n', '/data/tombstones'])
- if not tombstones or tombstones.startswith('/data/tombstones: No such file or directory'):
- self._log_error('DRT crashed, but no tombstone found!')
- return ''
- tombstones = tombstones.rstrip().split('\n')
- last_tombstone = tombstones[0].split()
- for tombstone in tombstones[1:]:
- # Format of fields:
- # 0 1 2 3 4 5 6
- # permission uid gid size date time filename
- # -rw------- 1000 1000 45859 2011-04-13 06:00 tombstone_00
- fields = tombstone.split()
- if (fields[4] + fields[5] >= last_tombstone[4] + last_tombstone[5]):
- last_tombstone = fields
- else:
- break
-
- # Use Android tool vendor/google/tools/stack to convert the raw
- # stack trace into a human readable format, if needed.
- # It takes a long time, so don't do it here.
- return '%s\n%s' % (' '.join(last_tombstone),
- self._run_adb_command(['shell', 'cat', '/data/tombstones/' + last_tombstone[6]]))
-
- def _get_logcat(self):
- return self._run_adb_command(['logcat', '-d', '-v', 'threadtime'])
-
- def _setup_performance(self):
- # Disable CPU scaling and drop ram cache to reduce noise in tests
- if not self._original_governors:
- governor_files = self._run_adb_command(['shell', 'ls', SCALING_GOVERNORS_PATTERN])
- if governor_files.find('No such file or directory') == -1:
- for file in governor_files.split():
- self._original_governors[file] = self._run_adb_command(['shell', 'cat', file]).strip()
- self._run_adb_command(['shell', 'echo', 'performance', '>', file])
-
- def _teardown_performance(self):
- for file, original_content in self._original_governors.items():
- self._run_adb_command(['shell', 'echo', original_content, '>', file])
- self._original_governors = {}
-
- def _get_crash_log(self, stdout, stderr, newer_than):
- if not stdout:
- stdout = ''
- stdout += '********* [%s] Logcat:\n%s' % (self._device_serial, self._get_logcat())
- if not stderr:
- stderr = ''
- stderr += '********* [%s] Tombstone file:\n%s' % (self._device_serial, self._get_last_stacktrace())
- return super(ChromiumAndroidDriver, self)._get_crash_log(stdout, stderr, newer_than)
-
- def cmd_line(self, pixel_tests, per_test_args):
- # The returned command line is used to start _server_process. In our case, it's an interactive 'adb shell'.
- # The command line passed to the DRT process is returned by _drt_cmd_line() instead.
- return self._adb_command + ['shell']
-
- def _file_exists_on_device(self, full_file_path):
- assert full_file_path.startswith('/')
- return self._run_adb_command(['shell', 'ls', full_file_path]).strip() == full_file_path
-
- def _drt_cmd_line(self, pixel_tests, per_test_args):
- return driver.Driver.cmd_line(self, pixel_tests, per_test_args) + ['--create-stdin-fifo', '--separate-stderr-fifo']
-
- @staticmethod
- def _loop_with_timeout(condition, timeout_secs):
- deadline = time.time() + timeout_secs
- while time.time() < deadline:
- if condition():
- return True
- return False
-
- def _all_pipes_created(self):
- return (self._file_exists_on_device(self._in_fifo_path) and
- self._file_exists_on_device(self._out_fifo_path) and
- self._file_exists_on_device(self._err_fifo_path))
-
- def _remove_all_pipes(self):
- for file in [self._in_fifo_path, self._out_fifo_path, self._err_fifo_path]:
- self._run_adb_command(['shell', 'rm', file])
-
- return (not self._file_exists_on_device(self._in_fifo_path) and
- not self._file_exists_on_device(self._out_fifo_path) and
- not self._file_exists_on_device(self._err_fifo_path))
-
- def run_test(self, driver_input, stop_when_done):
- base = self._port.lookup_virtual_test_base(driver_input.test_name)
- if base:
- driver_input = copy.copy(driver_input)
- driver_input.args = self._port.lookup_virtual_test_args(driver_input.test_name)
- driver_input.test_name = base
- return super(ChromiumAndroidDriver, self).run_test(driver_input, stop_when_done)
-
- def start(self, pixel_tests, per_test_args):
- # Only one driver instance is allowed because of the nature of Android activity.
- # The single driver needs to restart DumpRenderTree when the command line changes.
- cmd_line = self._drt_cmd_line(pixel_tests, per_test_args)
- if cmd_line != self._cmd_line:
- self.stop()
- self._cmd_line = cmd_line
- super(ChromiumAndroidDriver, self).start(pixel_tests, per_test_args)
-
- def _start(self, pixel_tests, per_test_args):
- self._setup_test()
-
- for retries in range(3):
- if self._start_once(pixel_tests, per_test_args):
- return
- self._log_error('Failed to start DumpRenderTree application. Retries=%d. Log:%s' % (retries, self._get_logcat()))
- self.stop()
- time.sleep(2)
- self._abort('Failed to start DumpRenderTree application multiple times. Give up.')
-
- def _start_once(self, pixel_tests, per_test_args):
- super(ChromiumAndroidDriver, self)._start(pixel_tests, per_test_args)
-
- self._log_debug('Starting forwarder')
- self._forwarder_process = self._port._server_process_constructor(
- self._port, 'Forwarder', self._adb_command + ['shell', '%s -D %s' % (DEVICE_FORWARDER_PATH, FORWARD_PORTS)])
- self._forwarder_process.start()
-
- self._run_adb_command(['logcat', '-c'])
- self._run_adb_command(['shell', 'echo'] + self._cmd_line + ['>', COMMAND_LINE_FILE])
- start_result = self._run_adb_command(['shell', 'am', 'start', '-e', 'RunInSubThread', '-n', DRT_ACTIVITY_FULL_NAME])
- if start_result.find('Exception') != -1:
- self._log_error('Failed to start DumpRenderTree application. Exception:\n' + start_result)
- return False
-
- if not ChromiumAndroidDriver._loop_with_timeout(self._all_pipes_created, DRT_START_STOP_TIMEOUT_SECS):
- return False
-
- # Read back the shell prompt to ensure adb shell ready.
- deadline = time.time() + DRT_START_STOP_TIMEOUT_SECS
- self._server_process.start()
- self._read_prompt(deadline)
- self._log_debug('Interactive shell started')
-
- # Start a process to read from the stdout fifo of the DumpRenderTree app and print to stdout.
- self._log_debug('Redirecting stdout to ' + self._out_fifo_path)
- self._read_stdout_process = self._port._server_process_constructor(
- self._port, 'ReadStdout', self._adb_command + ['shell', 'cat', self._out_fifo_path])
- self._read_stdout_process.start()
-
- # Start a process to read from the stderr fifo of the DumpRenderTree app and print to stdout.
- self._log_debug('Redirecting stderr to ' + self._err_fifo_path)
- self._read_stderr_process = self._port._server_process_constructor(
- self._port, 'ReadStderr', self._adb_command + ['shell', 'cat', self._err_fifo_path])
- self._read_stderr_process.start()
-
- self._log_debug('Redirecting stdin to ' + self._in_fifo_path)
- self._server_process.write('cat >%s\n' % self._in_fifo_path)
-
- # Combine the stdout and stderr pipes into self._server_process.
- self._server_process.replace_outputs(self._read_stdout_process._proc.stdout, self._read_stderr_process._proc.stdout)
-
- def deadlock_detector(processes, normal_startup_event):
- if not ChromiumAndroidDriver._loop_with_timeout(lambda: normal_startup_event.is_set(), DRT_START_STOP_TIMEOUT_SECS):
- # If normal_startup_event is not set in time, the main thread must be blocked at
- # reading/writing the fifo. Kill the fifo reading/writing processes to let the
- # main thread escape from the deadlocked state. After that, the main thread will
- # treat this as a crash.
- self._log_error('Deadlock detected. Processes killed.')
- for i in processes:
- i.kill()
-
- # Start a thread to kill the pipe reading/writing processes on deadlock of the fifos during startup.
- normal_startup_event = threading.Event()
- threading.Thread(name='DeadlockDetector', target=deadlock_detector,
- args=([self._server_process, self._read_stdout_process, self._read_stderr_process], normal_startup_event)).start()
-
- output = ''
- line = self._server_process.read_stdout_line(deadline)
- while not self._server_process.timed_out and not self.has_crashed() and line.rstrip() != '#READY':
- output += line
- line = self._server_process.read_stdout_line(deadline)
-
- if self._server_process.timed_out and not self.has_crashed():
- # DumpRenderTree crashes during startup, or when the deadlock detector detected
- # deadlock and killed the fifo reading/writing processes.
- _log.error('Failed to start DumpRenderTree: \n%s' % output)
- return False
- else:
- # Inform the deadlock detector that the startup is successful without deadlock.
- normal_startup_event.set()
- return True
-
- def stop(self):
- self._run_adb_command(['shell', 'am', 'force-stop', DRT_APP_PACKAGE])
-
- if self._read_stdout_process:
- self._read_stdout_process.kill()
- self._read_stdout_process = None
-
- if self._read_stderr_process:
- self._read_stderr_process.kill()
- self._read_stderr_process = None
-
- super(ChromiumAndroidDriver, self).stop()
-
- if self._forwarder_process:
- self._forwarder_process.kill()
- self._forwarder_process = None
-
- if self._has_setup:
- if not ChromiumAndroidDriver._loop_with_timeout(self._remove_all_pipes, DRT_START_STOP_TIMEOUT_SECS):
- raise AssertionError('Failed to remove fifo files. May be locked.')
-
- def _command_from_driver_input(self, driver_input):
- command = super(ChromiumAndroidDriver, self)._command_from_driver_input(driver_input)
- if command.startswith('/'):
- fs = self._port._filesystem
- # FIXME: what happens if command lies outside of the layout_tests_dir on the host?
- relative_test_filename = fs.relpath(command, fs.dirname(self._port.layout_tests_dir()))
- command = DEVICE_WEBKIT_BASE_DIR + relative_test_filename
- return command
-
- def _read_prompt(self, deadline):
- last_char = ''
- while True:
- current_char = self._server_process.read_stdout(deadline, 1)
- if current_char == ' ':
- if last_char in ('#', '$'):
- return
- last_char = current_char
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
deleted file mode 100644
index cfbc646df..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_android_unittest.py
+++ /dev/null
@@ -1,296 +0,0 @@
-# Copyright (C) 2012 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 optparse
-import StringIO
-import time
-import unittest
-import sys
-
-from webkitpy.common.system import executive_mock
-from webkitpy.common.system.executive_mock import MockExecutive2
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-
-from webkitpy.layout_tests.port import chromium_android
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.layout_tests.port import driver
-from webkitpy.layout_tests.port import driver_unittest
-from webkitpy.tool.mocktool import MockOptions
-
-class MockRunCommand(object):
- def __init__(self):
- self._mock_logcat = ''
- self._mock_devices_output = ''
- self._mock_devices = []
- self._mock_ls_tombstones = ''
-
- def mock_run_command_fn(self, args):
- if not args[0].endswith('adb'):
- return ''
- if args[1] == 'devices':
- return self._mock_devices_output
- if args[1] == 'version':
- return 'version 1.0'
-
- assert len(args) > 3
- assert args[1] == '-s'
- assert args[2] in self._mock_devices
- if args[3] == 'shell':
- if args[4:] == ['ls', '-n', '/data/tombstones']:
- return self._mock_ls_tombstones
- elif args[4] == 'cat':
- return args[5] + '\nmock_contents\n'
- elif args[3] == 'logcat':
- return self._mock_logcat
- return ''
-
- def mock_no_device(self):
- self._mock_devices = []
- self._mock_devices_output = 'List of devices attached'
-
- def mock_one_device(self):
- self._mock_devices = ['123456789ABCDEF0']
- self._mock_devices_output = ('List of devices attached\n'
- '%s\tdevice\n' % self._mock_devices[0])
-
- def mock_two_devices(self):
- self._mock_devices = ['123456789ABCDEF0', '23456789ABCDEF01']
- self._mock_devices_output = ('* daemon not running. starting it now on port 5037 *'
- '* daemon started successfully *'
- 'List of devices attached\n'
- '%s\tdevice\n'
- '%s\tdevice\n' % (self._mock_devices[0], self._mock_devices[1]))
-
- def mock_no_tombstone_dir(self):
- self._mock_ls_tombstones = '/data/tombstones: No such file or directory'
-
- def mock_no_tombstone_file(self):
- self._mock_ls_tombstones = ''
-
- def mock_ten_tombstones(self):
- self._mock_ls_tombstones = ('-rw------- 1000 1000 218643 2012-04-26 18:15 tombstone_00\n'
- '-rw------- 1000 1000 241695 2012-04-26 18:15 tombstone_01\n'
- '-rw------- 1000 1000 219472 2012-04-26 18:16 tombstone_02\n'
- '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
- '-rw------- 1000 1000 82022 2012-04-23 16:57 tombstone_04\n'
- '-rw------- 1000 1000 82015 2012-04-23 16:57 tombstone_05\n'
- '-rw------- 1000 1000 81974 2012-04-23 16:58 tombstone_06\n'
- '-rw------- 1000 1000 237409 2012-04-26 17:41 tombstone_07\n'
- '-rw------- 1000 1000 276089 2012-04-26 18:15 tombstone_08\n'
- '-rw------- 1000 1000 219618 2012-04-26 18:15 tombstone_09\n')
-
- def mock_logcat(self, content):
- self._mock_logcat = content
-
-
-class ChromiumAndroidPortTest(chromium_port_testcase.ChromiumPortTestCase):
- port_name = 'chromium-android'
- port_maker = chromium_android.ChromiumAndroidPort
-
- def make_port(self, **kwargs):
- port = super(ChromiumAndroidPortTest, self).make_port(**kwargs)
- self.mock_run_command = MockRunCommand()
- self.mock_run_command.mock_one_device()
- port._executive = MockExecutive2(run_command_fn=self.mock_run_command.mock_run_command_fn)
- return port
-
- def test_attributes(self):
- port = self.make_port()
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-android'))
-
- def test_default_timeout_ms(self):
- self.assertEqual(self.make_port(options=optparse.Values({'configuration': 'Release'})).default_timeout_ms(), 10000)
- self.assertEqual(self.make_port(options=optparse.Values({'configuration': 'Debug'})).default_timeout_ms(), 10000)
-
- def test_expectations_files(self):
- # FIXME: override this test temporarily while we're still upstreaming the android port and
- # using a custom expectations file.
- pass
-
- def test_get_devices_no_device(self):
- port = self.make_port()
- self.mock_run_command.mock_no_device()
- self.assertRaises(AssertionError, port._get_devices)
-
- def test_get_devices_one_device(self):
- port = self.make_port()
- self.mock_run_command.mock_one_device()
- self.assertEqual(self.mock_run_command._mock_devices, port._get_devices())
- self.assertEqual(1, port.default_child_processes())
-
- def test_get_devices_two_devices(self):
- port = self.make_port()
- self.mock_run_command.mock_two_devices()
- self.assertEqual(self.mock_run_command._mock_devices, port._get_devices())
- self.assertEqual(2, port.default_child_processes())
-
- def test_get_device_serial_no_device(self):
- port = self.make_port()
- self.mock_run_command.mock_no_device()
- self.assertRaises(AssertionError, port._get_device_serial, 0)
-
- def test_get_device_serial_one_device(self):
- port = self.make_port()
- self.mock_run_command.mock_one_device()
- self.assertEqual(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
- self.assertRaises(AssertionError, port._get_device_serial, 1)
-
- def test_get_device_serial_two_devices(self):
- port = self.make_port()
- self.mock_run_command.mock_two_devices()
- self.assertEqual(self.mock_run_command._mock_devices[0], port._get_device_serial(0))
- self.assertEqual(self.mock_run_command._mock_devices[1], port._get_device_serial(1))
- self.assertRaises(AssertionError, port._get_device_serial, 2)
-
- def test_must_require_http_server(self):
- port = self.make_port()
- self.assertEqual(port.requires_http_server(), True)
-
-
-class ChromiumAndroidDriverTest(unittest.TestCase):
- def setUp(self):
- self.mock_run_command = MockRunCommand()
- self.mock_run_command.mock_one_device()
- self.port = chromium_android.ChromiumAndroidPort(
- MockSystemHost(executive=MockExecutive2(run_command_fn=self.mock_run_command.mock_run_command_fn)),
- 'chromium-android')
- self.driver = chromium_android.ChromiumAndroidDriver(self.port, worker_number=0, pixel_tests=True)
-
- def test_get_last_stacktrace(self):
- self.mock_run_command.mock_no_tombstone_dir()
- self.assertEqual(self.driver._get_last_stacktrace(), '')
-
- self.mock_run_command.mock_no_tombstone_file()
- self.assertEqual(self.driver._get_last_stacktrace(), '')
-
- self.mock_run_command.mock_ten_tombstones()
- self.assertEqual(self.driver._get_last_stacktrace(),
- '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
- '/data/tombstones/tombstone_03\nmock_contents\n')
-
- def test_get_crash_log(self):
- self.mock_run_command.mock_logcat('logcat contents\n')
- self.mock_run_command.mock_ten_tombstones()
- self.driver._crashed_process_name = 'foo'
- self.driver._crashed_pid = 1234
- self.assertEqual(self.driver._get_crash_log('out bar\nout baz\n', 'err bar\nerr baz\n', newer_than=None),
- ('err bar\n'
- 'err baz\n'
- '********* [123456789ABCDEF0] Tombstone file:\n'
- '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
- '/data/tombstones/tombstone_03\n'
- 'mock_contents\n',
- u'crash log for foo (pid 1234):\n'
- u'STDOUT: out bar\n'
- u'STDOUT: out baz\n'
- u'STDOUT: ********* [123456789ABCDEF0] Logcat:\n'
- u'STDOUT: logcat contents\n'
- u'STDERR: err bar\n'
- u'STDERR: err baz\n'
- u'STDERR: ********* [123456789ABCDEF0] Tombstone file:\n'
- u'STDERR: -rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
- u'STDERR: /data/tombstones/tombstone_03\n'
- u'STDERR: mock_contents\n'))
-
- self.driver._crashed_process_name = None
- self.driver._crashed_pid = None
- self.assertEqual(self.driver._get_crash_log(None, None, newer_than=None),
- ('********* [123456789ABCDEF0] Tombstone file:\n'
- '-rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
- '/data/tombstones/tombstone_03\n'
- 'mock_contents\n',
- u'crash log for <unknown process name> (pid <unknown>):\n'
- u'STDOUT: ********* [123456789ABCDEF0] Logcat:\n'
- u'STDOUT: logcat contents\n'
- u'STDERR: ********* [123456789ABCDEF0] Tombstone file:\n'
- u'STDERR: -rw------- 1000 1000 45316 2012-04-27 16:33 tombstone_03\n'
- u'STDERR: /data/tombstones/tombstone_03\n'
- u'STDERR: mock_contents\n'))
-
- def test_cmd_line(self):
- cmd_line = self.driver.cmd_line(True, ['anything'])
- self.assertEqual(['adb', '-s', self.mock_run_command._mock_devices[0], 'shell'], cmd_line)
-
- def test_drt_cmd_line(self):
- cmd_line = self.driver._drt_cmd_line(True, ['--a'])
- self.assertTrue('--a' in cmd_line)
- self.assertTrue('--create-stdin-fifo' in cmd_line)
- self.assertTrue('--separate-stderr-fifo' in cmd_line)
-
- def test_read_prompt(self):
- self.driver._server_process = driver_unittest.MockServerProcess(lines=['root@android:/ # '])
- self.assertEqual(self.driver._read_prompt(time.time() + 1), None)
- self.driver._server_process = driver_unittest.MockServerProcess(lines=['$ '])
- self.assertEqual(self.driver._read_prompt(time.time() + 1), None)
-
- def test_command_from_driver_input(self):
- driver_input = driver.DriverInput('foo/bar/test.html', 10, 'checksum', True)
- expected_command = "/data/local/tmp/third_party/WebKit/LayoutTests/foo/bar/test.html'--pixel-test'checksum\n"
- if (sys.platform != "cygwin"):
- self.assertEqual(self.driver._command_from_driver_input(driver_input), expected_command)
-
- driver_input = driver.DriverInput('http/tests/foo/bar/test.html', 10, 'checksum', True)
- expected_command = "http://127.0.0.1:8000/foo/bar/test.html'--pixel-test'checksum\n"
- self.assertEqual(self.driver._command_from_driver_input(driver_input), expected_command)
-
-
-class ChromiumAndroidDriverTwoDriversTest(unittest.TestCase):
- def test_two_drivers(self):
- mock_run_command = MockRunCommand()
- mock_run_command.mock_two_devices()
- port = chromium_android.ChromiumAndroidPort(
- MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
- 'chromium-android')
- driver0 = chromium_android.ChromiumAndroidDriver(port, worker_number=0, pixel_tests=True)
- driver1 = chromium_android.ChromiumAndroidDriver(port, worker_number=1, pixel_tests=True)
-
- cmd_line0 = driver0.cmd_line(True, ['anything'])
- self.assertEqual(['adb', '-s', mock_run_command._mock_devices[0], 'shell'], cmd_line0)
-
- cmd_line1 = driver1.cmd_line(True, ['anything'])
- self.assertEqual(['adb', '-s', mock_run_command._mock_devices[1], 'shell'], cmd_line1)
-
-
-class ChromiumAndroidTwoPortsTest(unittest.TestCase):
- def test_options_with_two_ports(self):
- options = MockOptions(additional_drt_flag=['--foo=bar', '--foo=baz'])
- mock_run_command = MockRunCommand()
- mock_run_command.mock_two_devices()
- port0 = chromium_android.ChromiumAndroidPort(
- MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
- 'chromium-android', options=options)
- port1 = chromium_android.ChromiumAndroidPort(
- MockSystemHost(executive=MockExecutive2(run_command_fn=mock_run_command.mock_run_command_fn)),
- 'chromium-android', options=options)
- cmd_line = port1.driver_cmd_line()
- self.assertEqual(cmd_line.count('--encode-binary'), 1)
- self.assertEqual(cmd_line.count('--enable-hardware-gpu'), 1)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
deleted file mode 100644
index dfacf9c08..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py
+++ /dev/null
@@ -1,171 +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 logging
-
-from webkitpy.common.webkit_finder import WebKitFinder
-from webkitpy.layout_tests.port import chromium
-from webkitpy.layout_tests.port import config
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumLinuxPort(chromium.ChromiumPort):
- port_name = 'chromium-linux'
-
- SUPPORTED_ARCHITECTURES = ('x86', 'x86_64')
-
- FALLBACK_PATHS = {
- 'x86_64': [
- 'chromium-linux',
- 'chromium-win',
- 'chromium',
- ],
- 'x86': [
- 'chromium-linux-x86',
- 'chromium-linux',
- 'chromium-win',
- 'chromium',
- ],
- }
-
- DEFAULT_BUILD_DIRECTORIES = ('sconsbuild', 'out')
-
- @classmethod
- def _determine_driver_path_statically(cls, host, options):
- config_object = config.Config(host.executive, host.filesystem)
- build_directory = getattr(options, 'build_directory', None)
- webkit_base = WebKitFinder(host.filesystem).webkit_base()
- chromium_base = cls._chromium_base_dir(host.filesystem)
- if hasattr(options, 'configuration') and options.configuration:
- configuration = options.configuration
- else:
- configuration = config_object.default_configuration()
- return cls._static_build_path(host.filesystem, build_directory, chromium_base, webkit_base, configuration, ['DumpRenderTree'])
-
- @staticmethod
- def _determine_architecture(filesystem, executive, driver_path):
- file_output = ''
- if filesystem.exists(driver_path):
- # The --dereference flag tells file to follow symlinks
- file_output = executive.run_command(['file', '--dereference', driver_path], return_stderr=True)
-
- if 'ELF 32-bit LSB executable' in file_output:
- return 'x86'
- if 'ELF 64-bit LSB executable' in file_output:
- return 'x86_64'
- if file_output:
- _log.warning('Could not determine architecture from "file" output: %s' % file_output)
-
- # We don't know what the architecture is; default to 'x86' because
- # maybe we're rebaselining and the binary doesn't actually exist,
- # or something else weird is going on. It's okay to do this because
- # if we actually try to use the binary, check_build() should fail.
- return 'x86_64'
-
- @classmethod
- def determine_full_port_name(cls, host, options, port_name):
- if port_name.endswith('-linux'):
- return port_name + '-' + cls._determine_architecture(host.filesystem, host.executive, cls._determine_driver_path_statically(host, options))
- return port_name
-
- def __init__(self, host, port_name, **kwargs):
- chromium.ChromiumPort.__init__(self, host, port_name, **kwargs)
- (base, arch) = port_name.rsplit('-', 1)
- assert base == 'chromium-linux'
- assert arch in self.SUPPORTED_ARCHITECTURES
- assert port_name in ('chromium-linux', 'chromium-linux-x86', 'chromium-linux-x86_64')
- self._version = 'lucid' # We only support lucid right now.
- self._architecture = arch
-
- def default_baseline_search_path(self):
- port_names = self.FALLBACK_PATHS[self._architecture]
- return map(self._webkit_baseline_path, port_names)
-
- def _modules_to_search_for_symbols(self):
- return [self._build_path('libffmpegsumo.so')]
-
- def check_build(self, needs_http):
- result = chromium.ChromiumPort.check_build(self, needs_http)
- if not result:
- _log.error('For complete Linux build requirements, please see:')
- _log.error('')
- _log.error(' http://code.google.com/p/chromium/wiki/LinuxBuildInstructions')
- return result
-
- def operating_system(self):
- return 'linux'
-
- #
- # PROTECTED METHODS
- #
-
- def _check_apache_install(self):
- result = self._check_file_exists(self._path_to_apache(), "apache2")
- result = self._check_file_exists(self._path_to_apache_config_file(), "apache2 config file") and result
- if not result:
- _log.error(' Please install using: "sudo apt-get install apache2 libapache2-mod-php5"')
- _log.error('')
- return result
-
- def _check_lighttpd_install(self):
- result = self._check_file_exists(
- self._path_to_lighttpd(), "LigHTTPd executable")
- result = self._check_file_exists(self._path_to_lighttpd_php(), "PHP CGI executable") and result
- result = self._check_file_exists(self._path_to_lighttpd_modules(), "LigHTTPd modules") and result
- if not result:
- _log.error(' Please install using: "sudo apt-get install lighttpd php5-cgi"')
- _log.error('')
- return result
-
- def _wdiff_missing_message(self):
- return 'wdiff is not installed; please install using "sudo apt-get install wdiff"'
-
- def _path_to_apache(self):
- if self._is_redhat_based():
- return '/usr/sbin/httpd'
- else:
- return '/usr/sbin/apache2'
-
- def _path_to_lighttpd(self):
- return "/usr/sbin/lighttpd"
-
- def _path_to_lighttpd_modules(self):
- return "/usr/lib/lighttpd"
-
- def _path_to_lighttpd_php(self):
- return "/usr/bin/php-cgi"
-
- def _path_to_driver(self, configuration=None):
- binary_name = self.driver_name()
- return self._build_path_with_configuration(configuration, binary_name)
-
- def _path_to_helper(self):
- return None
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py
deleted file mode 100644
index 4160034e3..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux_unittest.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright (C) 2011 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 unittest
-
-from webkitpy.common.system import executive_mock
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.tool.mocktool import MockOptions
-
-from webkitpy.layout_tests.port import chromium_linux
-from webkitpy.layout_tests.port import chromium_port_testcase
-
-
-class ChromiumLinuxPortTest(chromium_port_testcase.ChromiumPortTestCase):
- port_name = 'chromium-linux'
- port_maker = chromium_linux.ChromiumLinuxPort
-
- def assert_architecture(self, port_name=None, file_output=None, expected_architecture=None):
- host = MockSystemHost()
- host.filesystem.exists = lambda x: 'DumpRenderTree' in x
- if file_output:
- host.executive = executive_mock.MockExecutive2(file_output)
-
- port = self.make_port(host, port_name=port_name)
- self.assertEqual(port.architecture(), expected_architecture)
- if expected_architecture == 'x86':
- self.assertTrue(port.baseline_path().endswith('chromium-linux-x86'))
- self.assertTrue(port.baseline_search_path()[0].endswith('chromium-linux-x86'))
- self.assertTrue(port.baseline_search_path()[1].endswith('chromium-linux'))
- else:
- self.assertTrue(port.baseline_path().endswith('chromium-linux'))
- self.assertTrue(port.baseline_search_path()[0].endswith('chromium-linux'))
-
- def test_architectures(self):
- self.assert_architecture(port_name='chromium-linux-x86',
- expected_architecture='x86')
- self.assert_architecture(port_name='chromium-linux-x86_64',
- expected_architecture='x86_64')
- self.assert_architecture(file_output='ELF 32-bit LSB executable',
- expected_architecture='x86')
- self.assert_architecture(file_output='ELF 64-bit LSB executable',
- expected_architecture='x86_64')
-
- def test_check_illegal_port_names(self):
- # FIXME: Check that, for now, these are illegal port names.
- # Eventually we should be able to do the right thing here.
- self.assertRaises(AssertionError, chromium_linux.ChromiumLinuxPort, MockSystemHost(), port_name='chromium-x86-linux')
-
- def test_determine_architecture_fails(self):
- # Test that we default to 'x86' if the driver doesn't exist.
- port = self.make_port()
- self.assertEqual(port.architecture(), 'x86_64')
-
- # Test that we default to 'x86' on an unknown architecture.
- host = MockSystemHost()
- host.filesystem.exists = lambda x: True
- host.executive = executive_mock.MockExecutive2('win32')
- port = self.make_port(host=host)
- self.assertEqual(port.architecture(), 'x86_64')
-
- # Test that we raise errors if something weird happens.
- host.executive = executive_mock.MockExecutive2(exception=AssertionError)
- self.assertRaises(AssertionError, chromium_linux.ChromiumLinuxPort, host, self.port_name)
-
- def test_operating_system(self):
- self.assertEqual('linux', self.make_port().operating_system())
-
- def test_build_path(self):
- # Test that optional paths are used regardless of whether they exist.
- options = MockOptions(configuration='Release', build_directory='/foo')
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], '/foo/Release')
-
- # Test that optional relative paths are returned unmodified.
- options = MockOptions(configuration='Release', build_directory='foo')
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], 'foo/Release')
-
- # Test that we look in a chromium directory before the webkit directory.
- options = MockOptions(configuration='Release', build_directory=None)
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release', '/mock-checkout/out/Release'], '/mock-checkout/Source/WebKit/chromium/out/Release')
-
- # Test that we prefer the legacy dir over the new dir.
- options = MockOptions(configuration='Release', build_directory=None)
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/sconsbuild/Release', '/mock-checkout/Source/WebKit/chromium/out/Release'], '/mock-checkout/Source/WebKit/chromium/sconsbuild/Release')
-
- def test_driver_name_option(self):
- self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree'))
- self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
-
- def test_path_to_image_diff(self):
- self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
-
-if __name__ == '__main__':
- port_testcase.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
deleted file mode 100644
index bd65cd1dc..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac.py
+++ /dev/null
@@ -1,129 +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.
-
-"""Chromium Mac implementation of the Port interface."""
-
-import logging
-import signal
-
-from webkitpy.layout_tests.port import chromium
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumMacPort(chromium.ChromiumPort):
- SUPPORTED_OS_VERSIONS = ('snowleopard', 'lion', 'mountainlion', 'future')
- port_name = 'chromium-mac'
-
- FALLBACK_PATHS = {
- 'snowleopard': [
- 'chromium-mac-snowleopard',
- 'chromium-mac-lion',
- 'chromium-mac',
- 'chromium',
- ],
- 'lion': [
- 'chromium-mac-lion',
- 'chromium-mac',
- 'chromium',
- ],
- 'mountainlion': [
- 'chromium-mac',
- 'chromium',
- ],
- 'future': [
- 'chromium-mac',
- 'chromium',
- ],
- }
-
- DEFAULT_BUILD_DIRECTORIES = ('xcodebuild', 'out')
-
- @classmethod
- def determine_full_port_name(cls, host, options, port_name):
- if port_name.endswith('-mac'):
- return port_name + '-' + host.platform.os_version
- return port_name
-
- def __init__(self, host, port_name, **kwargs):
- chromium.ChromiumPort.__init__(self, host, port_name, **kwargs)
- self._version = port_name[port_name.index('chromium-mac-') + len('chromium-mac-'):]
- assert self._version in self.SUPPORTED_OS_VERSIONS
-
- def _modules_to_search_for_symbols(self):
- return [self._build_path('ffmpegsumo.so')]
-
- def check_build(self, needs_http):
- result = chromium.ChromiumPort.check_build(self, needs_http)
- if not result:
- _log.error('For complete Mac build requirements, please see:')
- _log.error('')
- _log.error(' http://code.google.com/p/chromium/wiki/MacBuildInstructions')
-
- return result
-
- def operating_system(self):
- return 'mac'
-
- #
- # PROTECTED METHODS
- #
-
- def _lighttpd_path(self, *comps):
- return self.path_from_chromium_base('third_party', 'lighttpd', 'mac', *comps)
-
- def _wdiff_missing_message(self):
- return 'wdiff is not installed; please install from MacPorts or elsewhere'
-
- def _path_to_apache(self):
- return '/usr/sbin/httpd'
-
- def _path_to_apache_config_file(self):
- return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'apache2-httpd.conf')
-
- def _path_to_lighttpd(self):
- return self._lighttpd_path('bin', 'lighttpd')
-
- def _path_to_lighttpd_modules(self):
- return self._lighttpd_path('lib')
-
- def _path_to_lighttpd_php(self):
- return self._lighttpd_path('bin', 'php-cgi')
-
- def _path_to_driver(self, configuration=None):
- # FIXME: make |configuration| happy with case-sensitive file systems.
- return self._build_path_with_configuration(configuration, self.driver_name() + '.app', 'Contents', 'MacOS', self.driver_name())
-
- def _path_to_helper(self):
- binary_name = 'LayoutTestHelper'
- return self._build_path(binary_name)
-
- def _path_to_wdiff(self):
- return 'wdiff'
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
deleted file mode 100644
index d10326f0e..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_mac_unittest.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# 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 unittest
-
-from webkitpy.layout_tests.port import chromium_mac
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.tool.mocktool import MockOptions
-
-
-class ChromiumMacPortTest(chromium_port_testcase.ChromiumPortTestCase):
- os_name = 'mac'
- os_version = 'snowleopard'
- port_name = 'chromium-mac'
- port_maker = chromium_mac.ChromiumMacPort
-
- def assert_name(self, port_name, os_version_string, expected):
- port = self.make_port(os_version=os_version_string, port_name=port_name)
- self.assertEqual(expected, port.name())
-
- def test_versions(self):
- self.assertTrue(self.make_port().name() in ('chromium-mac-snowleopard', 'chromium-mac-lion', 'chromium-mac-mountainlion', 'chromium-mac-future'))
-
- self.assert_name(None, 'snowleopard', 'chromium-mac-snowleopard')
- self.assert_name('chromium-mac', 'snowleopard', 'chromium-mac-snowleopard')
- self.assert_name('chromium-mac-snowleopard', 'leopard', 'chromium-mac-snowleopard')
- self.assert_name('chromium-mac-snowleopard', 'snowleopard', 'chromium-mac-snowleopard')
-
- self.assert_name(None, 'lion', 'chromium-mac-lion')
- self.assert_name(None, 'mountainlion', 'chromium-mac-mountainlion')
- self.assert_name(None, 'future', 'chromium-mac-future')
-
- self.assert_name('chromium-mac', 'lion', 'chromium-mac-lion')
- self.assert_name('chromium-mac-future', 'snowleopard', 'chromium-mac-future')
- self.assert_name('chromium-mac-future', 'lion', 'chromium-mac-future')
- self.assert_name('chromium-mac-future', 'mountainlion', 'chromium-mac-future')
-
- self.assertRaises(AssertionError, self.assert_name, None, 'tiger', 'should-raise-assertion-so-this-value-does-not-matter')
-
- def test_baseline_path(self):
- port = self.make_port(port_name='chromium-mac-snowleopard')
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac-snowleopard'))
-
- port = self.make_port(port_name='chromium-mac-lion')
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac-lion'))
-
- port = self.make_port(port_name='chromium-mac-mountainlion')
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
-
- port = self.make_port(port_name='chromium-mac-future')
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-mac'))
-
- def test_operating_system(self):
- self.assertEqual('mac', self.make_port().operating_system())
-
- def test_build_path(self):
- # Test that optional paths are used regardless of whether they exist.
- options = MockOptions(configuration='Release', build_directory='/foo')
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], '/foo/Release')
-
- # Test that optional relative paths are returned unmodified.
- options = MockOptions(configuration='Release', build_directory='foo')
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], 'foo/Release')
-
- # Test that we look in a chromium directory before the webkit directory.
- options = MockOptions(configuration='Release', build_directory=None)
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release', '/mock-checkout/out/Release'], '/mock-checkout/Source/WebKit/chromium/out/Release')
-
- # Test that we prefer the legacy dir over the new dir.
- options = MockOptions(configuration='Release', build_directory=None)
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/xcodebuild/Release', '/mock-checkout/Source/WebKit/chromium/out/Release'], '/mock-checkout/Source/WebKit/chromium/xcodebuild/Release')
-
- def test_driver_name_option(self):
- self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree'))
- self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver'))
-
- def test_path_to_image_diff(self):
- self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff')
-
-
-if __name__ == '__main__':
- port_testcase.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py
deleted file mode 100644
index dc5706beb..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_port_testcase.py
+++ /dev/null
@@ -1,223 +0,0 @@
-# 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 unittest
-
-from webkitpy.common.system import logtesting
-from webkitpy.common.system.executive_mock import MockExecutive2
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.tool.mocktool import MockOptions
-
-import chromium_android
-import chromium_linux
-import chromium_mac
-import chromium_win
-
-from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port import port_testcase
-
-
-class ChromiumPortTestCase(port_testcase.PortTestCase):
-
- def test_check_build(self):
- port = self.make_port()
- port.check_build(needs_http=True)
-
- def test_default_max_locked_shards(self):
- port = self.make_port()
- port.default_child_processes = lambda: 16
- self.assertEqual(port.default_max_locked_shards(), 4)
- port.default_child_processes = lambda: 2
- self.assertEqual(port.default_max_locked_shards(), 1)
-
- def test_default_timeout_ms(self):
- self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
- self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
-
- def test_default_pixel_tests(self):
- self.assertEqual(self.make_port().default_pixel_tests(), True)
-
- def test_missing_symbol_to_skipped_tests(self):
- # Test that we get the chromium skips and not the webkit default skips
- port = self.make_port()
- skip_dict = port._missing_symbol_to_skipped_tests()
- self.assertTrue('ff_mp3_decoder' in skip_dict)
- self.assertFalse('WebGLShader' in skip_dict)
-
- def test_all_test_configurations(self):
- """Validate the complete set of configurations this port knows about."""
- port = self.make_port()
- self.assertEqual(set(port.all_test_configurations()), set([
- TestConfiguration('icecreamsandwich', 'x86', 'debug'),
- TestConfiguration('icecreamsandwich', 'x86', 'release'),
- TestConfiguration('snowleopard', 'x86', 'debug'),
- TestConfiguration('snowleopard', 'x86', 'release'),
- TestConfiguration('lion', 'x86', 'debug'),
- TestConfiguration('lion', 'x86', 'release'),
- TestConfiguration('mountainlion', 'x86', 'debug'),
- TestConfiguration('mountainlion', 'x86', 'release'),
- TestConfiguration('xp', 'x86', 'debug'),
- TestConfiguration('xp', 'x86', 'release'),
- TestConfiguration('win7', 'x86', 'debug'),
- TestConfiguration('win7', 'x86', 'release'),
- TestConfiguration('lucid', 'x86', 'debug'),
- TestConfiguration('lucid', 'x86', 'release'),
- TestConfiguration('lucid', 'x86_64', 'debug'),
- TestConfiguration('lucid', 'x86_64', 'release'),
- ]))
-
- class TestMacPort(chromium_mac.ChromiumMacPort):
- def __init__(self, options=None):
- options = options or MockOptions()
- chromium_mac.ChromiumMacPort.__init__(self, MockSystemHost(os_name='mac', os_version='leopard'), 'chromium-mac-leopard', options=options)
-
- def default_configuration(self):
- self.default_configuration_called = True
- return 'default'
-
- class TestAndroidPort(chromium_android.ChromiumAndroidPort):
- def __init__(self, options=None):
- options = options or MockOptions()
- chromium_android.ChromiumAndroidPort.__init__(self, MockSystemHost(os_name='android', os_version='icecreamsandwich'), 'chromium-android', options=options)
-
- def default_configuration(self):
- self.default_configuration_called = True
- return 'default'
-
- class TestLinuxPort(chromium_linux.ChromiumLinuxPort):
- def __init__(self, options=None):
- options = options or MockOptions()
- chromium_linux.ChromiumLinuxPort.__init__(self, MockSystemHost(os_name='linux', os_version='lucid'), 'chromium-linux-x86', options=options)
-
- def default_configuration(self):
- self.default_configuration_called = True
- return 'default'
-
- class TestWinPort(chromium_win.ChromiumWinPort):
- def __init__(self, options=None):
- options = options or MockOptions()
- chromium_win.ChromiumWinPort.__init__(self, MockSystemHost(os_name='win', os_version='xp'), 'chromium-win-xp', options=options)
-
- def default_configuration(self):
- self.default_configuration_called = True
- return 'default'
-
- def test_default_configuration(self):
- mock_options = MockOptions()
- port = ChromiumPortTestCase.TestLinuxPort(options=mock_options)
- self.assertEqual(mock_options.configuration, 'default') # pylint: disable-msg=E1101
- self.assertTrue(port.default_configuration_called)
-
- mock_options = MockOptions(configuration=None)
- port = ChromiumPortTestCase.TestLinuxPort(mock_options)
- self.assertEqual(mock_options.configuration, 'default') # pylint: disable-msg=E1101
- self.assertTrue(port.default_configuration_called)
-
- def test_diff_image(self):
- class TestPort(ChromiumPortTestCase.TestLinuxPort):
- def _path_to_image_diff(self):
- return "/path/to/image_diff"
-
- port = ChromiumPortTestCase.TestLinuxPort()
- mock_image_diff = "MOCK Image Diff"
-
- def mock_run_command(args):
- port._filesystem.write_binary_file(args[4], mock_image_diff)
- return 1
-
- # Images are different.
- port._executive = MockExecutive2(run_command_fn=mock_run_command)
- self.assertEqual(mock_image_diff, port.diff_image("EXPECTED", "ACTUAL")[0])
-
- # Images are the same.
- port._executive = MockExecutive2(exit_code=0)
- self.assertEqual(None, port.diff_image("EXPECTED", "ACTUAL")[0])
-
- # There was some error running image_diff.
- port._executive = MockExecutive2(exit_code=2)
- exception_raised = False
- try:
- port.diff_image("EXPECTED", "ACTUAL")
- except ValueError, e:
- exception_raised = True
- self.assertFalse(exception_raised)
-
- def test_diff_image_crashed(self):
- port = ChromiumPortTestCase.TestLinuxPort()
- port._executive = MockExecutive2(exit_code=2)
- self.assertEqual(port.diff_image("EXPECTED", "ACTUAL"), (None, 0, 'image diff returned an exit code of 2'))
-
- def test_expectations_files(self):
- port = self.make_port()
- port.port_name = 'chromium'
-
- expectations_path = port.path_to_test_expectations_file()
- chromium_overrides_path = port.path_from_chromium_base(
- 'webkit', 'tools', 'layout_tests', 'test_expectations.txt')
- skia_overrides_path = port.path_from_chromium_base(
- 'skia', 'skia_test_expectations.txt')
-
- port._filesystem.write_text_file(skia_overrides_path, 'dummay text')
-
- port._options.builder_name = 'DUMMY_BUILDER_NAME'
- self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
-
- port._options.builder_name = 'builder (deps)'
- self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path, chromium_overrides_path])
-
- # A builder which does NOT observe the Chromium test_expectations,
- # but still observes the Skia test_expectations...
- port._options.builder_name = 'builder'
- self.assertEqual(port.expectations_files(), [expectations_path, skia_overrides_path])
-
- def test_expectations_ordering(self):
- # since we don't implement self.port_name in ChromiumPort.
- pass
-
-
-class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
- def test_check_sys_deps(self):
- port = ChromiumPortTestCase.TestLinuxPort()
-
- # Success
- port._executive = MockExecutive2(exit_code=0)
- self.assertTrue(port.check_sys_deps(needs_http=False))
-
- # Failure
- port._executive = MockExecutive2(exit_code=1,
- output='testing output failure')
- self.assertFalse(port.check_sys_deps(needs_http=False))
- self.assertLog([
- 'ERROR: System dependencies check failed.\n',
- 'ERROR: To override, invoke with --nocheck-sys-deps\n',
- 'ERROR: \n',
- 'ERROR: testing output failure\n'])
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
deleted file mode 100644
index ac9bc90f6..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_unittest.py
+++ /dev/null
@@ -1,68 +0,0 @@
-# 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 StringIO
-import time
-import unittest
-
-from webkitpy.common.system import logtesting
-from webkitpy.common.system.executive_mock import MockExecutive2
-from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockOptions
-
-import chromium
-import chromium_mac
-
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.layout_tests.port.driver import DriverInput
-
-
-class ChromiumPortLoggingTest(logtesting.LoggingTestCase):
-
- # FIXME: put this someplace more useful
- def test_check_sys_deps(self):
- port = chromium_port_testcase.ChromiumPortTestCase.TestLinuxPort()
-
- # Success
- port._executive = MockExecutive2(exit_code=0)
- self.assertTrue(port.check_sys_deps(needs_http=False))
-
- # Failure
- port._executive = MockExecutive2(exit_code=1,
- output='testing output failure')
- self.assertFalse(port.check_sys_deps(needs_http=False))
- self.assertLog([
- 'ERROR: System dependencies check failed.\n',
- 'ERROR: To override, invoke with --nocheck-sys-deps\n',
- 'ERROR: \n',
- 'ERROR: testing output failure\n'])
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
deleted file mode 100755
index 3266c3914..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py
+++ /dev/null
@@ -1,157 +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.
-
-"""Chromium Win implementation of the Port interface."""
-
-import os
-import logging
-
-import chromium
-
-
-_log = logging.getLogger(__name__)
-
-
-class ChromiumWinPort(chromium.ChromiumPort):
- port_name = 'chromium-win'
-
- # FIXME: Figure out how to unify this with base.TestConfiguration.all_systems()?
- SUPPORTED_VERSIONS = ('xp', 'win7')
-
- FALLBACK_PATHS = {
- 'xp': [
- 'chromium-win-xp',
- 'chromium-win',
- 'chromium',
- ],
- 'win7': [
- 'chromium-win',
- 'chromium',
- ],
- }
-
- DEFAULT_BUILD_DIRECTORIES = ('build', 'out')
-
- @classmethod
- def determine_full_port_name(cls, host, options, port_name):
- if port_name.endswith('-win'):
- assert host.platform.is_win()
- # We don't maintain separate baselines for vista, so we pretend it is win7.
- if host.platform.os_version in ('vista', '7sp0', '7sp1', 'future'):
- version = 'win7'
- else:
- version = host.platform.os_version
- port_name = port_name + '-' + version
- return port_name
-
- def __init__(self, host, port_name, **kwargs):
- chromium.ChromiumPort.__init__(self, host, port_name, **kwargs)
- self._version = port_name[port_name.index('chromium-win-') + len('chromium-win-'):]
- assert self._version in self.SUPPORTED_VERSIONS, "%s is not in %s" % (self._version, self.SUPPORTED_VERSIONS)
-
- def setup_environ_for_server(self, server_name=None):
- env = chromium.ChromiumPort.setup_environ_for_server(self, server_name)
-
- # FIXME: lighttpd depends on some environment variable we're not whitelisting.
- # We should add the variable to an explicit whitelist in base.Port.
- # FIXME: This is a temporary hack to get the cr-win bot online until
- # someone from the cr-win port can take a look.
- for key, value in os.environ.items():
- if key not in env:
- env[key] = value
-
- # Put the cygwin directory first in the path to find cygwin1.dll.
- env["PATH"] = "%s;%s" % (self.path_from_chromium_base("third_party", "cygwin", "bin"), env["PATH"])
- # Configure the cygwin directory so that pywebsocket finds proper
- # python executable to run cgi program.
- env["CYGWIN_PATH"] = self.path_from_chromium_base("third_party", "cygwin", "bin")
- if self.get_option('register_cygwin'):
- setup_mount = self.path_from_chromium_base("third_party", "cygwin", "setup_mount.bat")
- self._executive.run_command([setup_mount]) # Paths are all absolute, so this does not require a cwd.
- return env
-
- def _modules_to_search_for_symbols(self):
- # FIXME: we should return the path to the ffmpeg equivalents to detect if we have the mp3 and aac codecs installed.
- # See https://bugs.webkit.org/show_bug.cgi?id=89706.
- return []
-
- def check_build(self, needs_http):
- result = chromium.ChromiumPort.check_build(self, needs_http)
- if not result:
- _log.error('For complete Windows build requirements, please see:')
- _log.error('')
- _log.error(' http://dev.chromium.org/developers/how-tos/build-instructions-windows')
- return result
-
- def operating_system(self):
- return 'win'
-
- def relative_test_filename(self, filename):
- path = filename[len(self.layout_tests_dir()) + 1:]
- return path.replace('\\', '/')
-
- #
- # PROTECTED ROUTINES
- #
-
- def _uses_apache(self):
- return False
-
- def _lighttpd_path(self, *comps):
- return self.path_from_chromium_base('third_party', 'lighttpd', 'win', *comps)
-
- def _path_to_apache(self):
- return self.path_from_chromium_base('third_party', 'cygwin', 'usr', 'sbin', 'httpd')
-
- def _path_to_apache_config_file(self):
- return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', 'cygwin-httpd.conf')
-
- def _path_to_lighttpd(self):
- return self._lighttpd_path('LightTPD.exe')
-
- def _path_to_lighttpd_modules(self):
- return self._lighttpd_path('lib')
-
- def _path_to_lighttpd_php(self):
- return self._lighttpd_path('php5', 'php-cgi.exe')
-
- def _path_to_driver(self, configuration=None):
- binary_name = '%s.exe' % self.driver_name()
- return self._build_path_with_configuration(configuration, binary_name)
-
- def _path_to_helper(self):
- binary_name = 'LayoutTestHelper.exe'
- return self._build_path(binary_name)
-
- def _path_to_image_diff(self):
- binary_name = 'ImageDiff.exe'
- return self._build_path(binary_name)
-
- def _path_to_wdiff(self):
- return self.path_from_chromium_base('third_party', 'cygwin', 'bin', 'wdiff.exe')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py b/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py
deleted file mode 100644
index a84b5ee15..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# 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
-import unittest
-
-from webkitpy.common.system import outputcapture
-from webkitpy.common.system.executive_mock import MockExecutive
-from webkitpy.common.system.filesystem_mock import MockFileSystem
-from webkitpy.layout_tests.port import chromium_port_testcase
-from webkitpy.layout_tests.port import chromium_win
-from webkitpy.tool.mocktool import MockOptions
-
-
-class ChromiumWinTest(chromium_port_testcase.ChromiumPortTestCase):
- port_name = 'chromium-win'
- port_maker = chromium_win.ChromiumWinPort
- os_name = 'win'
- os_version = 'xp'
-
- def test_uses_apache(self):
- self.assertFalse(self.make_port()._uses_apache())
-
- def test_setup_environ_for_server(self):
- port = self.make_port()
- port._executive = MockExecutive(should_log=True)
- output = outputcapture.OutputCapture()
- # FIXME: This test should not use the real os.environ
- orig_environ = os.environ.copy()
- env = output.assert_outputs(self, port.setup_environ_for_server)
- self.assertEqual(orig_environ["PATH"], os.environ["PATH"])
- self.assertNotEqual(env["PATH"], os.environ["PATH"])
-
- def test_setup_environ_for_server_cygpath(self):
- port = self.make_port()
- env = port.setup_environ_for_server(port.driver_name())
- self.assertEqual(env['CYGWIN_PATH'], '/mock-checkout/Source/WebKit/chromium/third_party/cygwin/bin')
-
- def test_setup_environ_for_server_register_cygwin(self):
- port = self.make_port(options=MockOptions(register_cygwin=True, results_directory='/'))
- port._executive = MockExecutive(should_log=True)
- expected_logs = "MOCK run_command: ['/mock-checkout/Source/WebKit/chromium/third_party/cygwin/setup_mount.bat'], cwd=None\n"
- output = outputcapture.OutputCapture()
- output.assert_outputs(self, port.setup_environ_for_server, expected_logs=expected_logs)
-
- def assert_name(self, port_name, os_version_string, expected):
- port = self.make_port(port_name=port_name, os_version=os_version_string)
- self.assertEqual(expected, port.name())
-
- def test_versions(self):
- port = self.make_port()
- self.assertTrue(port.name() in ('chromium-win-xp', 'chromium-win-win7'))
-
- self.assert_name(None, 'xp', 'chromium-win-xp')
- self.assert_name('chromium-win', 'xp', 'chromium-win-xp')
- self.assert_name('chromium-win-xp', 'xp', 'chromium-win-xp')
- self.assert_name('chromium-win-xp', '7sp0', 'chromium-win-xp')
-
- self.assert_name(None, '7sp0', 'chromium-win-win7')
- self.assert_name(None, 'vista', 'chromium-win-win7')
- self.assert_name('chromium-win', '7sp0', 'chromium-win-win7')
- self.assert_name('chromium-win-win7', 'xp', 'chromium-win-win7')
- self.assert_name('chromium-win-win7', '7sp0', 'chromium-win-win7')
- self.assert_name('chromium-win-win7', 'vista', 'chromium-win-win7')
-
- self.assertRaises(AssertionError, self.assert_name, None, 'w2k', 'chromium-win-xp')
-
- def test_baseline_path(self):
- port = self.make_port(port_name='chromium-win-xp')
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-win-xp'))
-
- port = self.make_port(port_name='chromium-win-win7')
- self.assertEqual(port.baseline_path(), port._webkit_baseline_path('chromium-win'))
-
- def test_build_path(self):
- # Test that optional paths are used regardless of whether they exist.
- options = MockOptions(configuration='Release', build_directory='/foo')
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], '/foo/Release')
-
- # Test that optional relative paths are returned unmodified.
- options = MockOptions(configuration='Release', build_directory='foo')
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release'], 'foo/Release')
-
- # Test that we look in a chromium directory before the webkit directory.
- options = MockOptions(configuration='Release', build_directory=None)
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/out/Release', '/mock-checkout/out/Release'], '/mock-checkout/Source/WebKit/chromium/out/Release')
-
- # Test that we prefer the legacy dir over the new dir.
- options = MockOptions(configuration='Release', build_directory=None)
- self.assert_build_path(options, ['/mock-checkout/Source/WebKit/chromium/build/Release', '/mock-checkout/Source/WebKit/chromium/out'], '/mock-checkout/Source/WebKit/chromium/build/Release')
-
- def test_operating_system(self):
- self.assertEqual('win', self.make_port().operating_system())
-
- def test_driver_name_option(self):
- self.assertTrue(self.make_port()._path_to_driver().endswith('DumpRenderTree.exe'))
- self.assertTrue(self.make_port(options=MockOptions(driver_name='OtherDriver'))._path_to_driver().endswith('OtherDriver.exe'))
-
- def test_path_to_image_diff(self):
- self.assertEqual(self.make_port()._path_to_image_diff(), '/mock-checkout/out/Release/ImageDiff.exe')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/win.py b/Tools/Scripts/webkitpy/layout_tests/port/win.py
deleted file mode 100644
index ff473fec2..000000000
--- a/Tools/Scripts/webkitpy/layout_tests/port/win.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# 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 Google name 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 logging
-import re
-import sys
-
-from webkitpy.common.system.systemhost import SystemHost
-from webkitpy.common.system.executive import ScriptError, Executive
-from webkitpy.common.system.path import abspath_to_uri
-from webkitpy.layout_tests.port.apple import ApplePort
-
-
-_log = logging.getLogger(__name__)
-
-
-class WinPort(ApplePort):
- port_name = "win"
-
- VERSION_FALLBACK_ORDER = ["win-xp", "win-vista", "win-7sp0", "win-win7"]
-
- ARCHITECTURES = ['x86']
-
- def do_text_results_differ(self, expected_text, actual_text):
- # Sanity was restored in WK2, so we don't need this hack there.
- if self.get_option('webkit_test_runner'):
- return ApplePort.do_text_results_differ(self, expected_text, actual_text)
-
- # This is a hack (which dates back to ORWT).
- # Windows does not have an EDITING DELEGATE, so we strip any EDITING DELEGATE
- # messages to make more of the tests pass.
- # It's possible more of the ports might want this and this could move down into WebKitPort.
- delegate_regexp = re.compile("^EDITING DELEGATE: .*?\n", re.MULTILINE)
- expected_text = delegate_regexp.sub("", expected_text)
- actual_text = delegate_regexp.sub("", actual_text)
- return expected_text != actual_text
-
- def default_baseline_search_path(self):
- if self._name.endswith(self.FUTURE_VERSION):
- fallback_names = [self.port_name]
- else:
- fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(self._name):-1] + [self.port_name]
- # FIXME: The AppleWin port falls back to AppleMac for some results. Eventually we'll have a shared 'apple' port.
- if self.get_option('webkit_test_runner'):
- fallback_names.insert(0, 'win-wk2')
- fallback_names.append('mac-wk2')
- # Note we do not add 'wk2' here, even though it's included in _skipped_search_paths().
- # FIXME: Perhaps we should get this list from MacPort?
- fallback_names.extend(['mac-lion', 'mac'])
- return map(self._webkit_baseline_path, fallback_names)
-
- def operating_system(self):
- return 'win'
-
- def show_results_html_file(self, results_filename):
- self._run_script('run-safari', [abspath_to_uri(SystemHost().platform, results_filename)])
-
- # FIXME: webkitperl/httpd.pm installs /usr/lib/apache/libphp4.dll on cycwin automatically
- # as part of running old-run-webkit-tests. That's bad design, but we may need some similar hack.
- # We might use setup_environ_for_server for such a hack (or modify apache_http_server.py).
-
- def _runtime_feature_list(self):
- supported_features_command = [self._path_to_driver(), '--print-supported-features']
- try:
- output = self._executive.run_command(supported_features_command, error_handler=Executive.ignore_error)
- except OSError, e:
- _log.warn("Exception running driver: %s, %s. Driver must be built before calling WebKitPort.test_expectations()." % (supported_features_command, e))
- return None
-
- # Note: win/DumpRenderTree.cpp does not print a leading space before the features_string.
- match_object = re.match("SupportedFeatures:\s*(?P<features_string>.*)\s*", output)
- if not match_object:
- return None
- return match_object.group('features_string').split(' ')
diff --git a/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py b/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py
index 717bc7ce6..85b18e2b1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,7 +23,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.layout_tests.reftests import extract_reference_link
@@ -56,10 +55,10 @@ CONTENT OF TEST
</html>
"""
matches, mismatches = extract_reference_link.get_reference_link(html_1)
- self.assertEqual(matches,
- ["green-box-ref.xht", "blue-box-ref.xht"])
- self.assertEqual(mismatches,
- ["red-box-notref.xht", "red-box-notref.xht"])
+ self.assertItemsEqual(matches,
+ ["green-box-ref.xht", "blue-box-ref.xht"])
+ self.assertItemsEqual(mismatches,
+ ["red-box-notref.xht", "red-box-notref.xht"])
html_2 = ""
empty_tuple_1 = extract_reference_link.get_reference_link(html_2)
@@ -79,7 +78,3 @@ CONTENT OF TEST
html_5 = """<link rel="help" href="RELEVANT_SPEC_SECTION">"""
empty_tuple_4 = extract_reference_link.get_reference_link(html_5)
self.assertEqual(empty_tuple_4, ([], []))
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
index c505cd399..6b4bb76d1 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2011 Apple Inc. All rights reserved.
@@ -29,7 +28,6 @@
# (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 errno
import logging
import optparse
import os
@@ -38,10 +36,9 @@ import sys
import traceback
from webkitpy.common.host import Host
-from webkitpy.common.system import stack_utils
-from webkitpy.layout_tests.controllers.manager import Manager, WorkerException, TestRunInterruptedException
-from webkitpy.layout_tests.models import test_expectations
-from webkitpy.layout_tests.port import configuration_options, platform_options
+from webkitpy.layout_tests.controllers.manager import Manager
+from webkitpy.port import configuration_options, platform_options
+from webkitpy.layout_tests.views import buildbot_results
from webkitpy.layout_tests.views import printing
@@ -56,165 +53,52 @@ INTERRUPTED_EXIT_STATUS = signal.SIGINT + 128
EXCEPTIONAL_EXIT_STATUS = 254
-def lint(port, options):
- host = port.host
- if options.platform:
- ports_to_lint = [port]
- else:
- ports_to_lint = [host.port_factory.get(name) for name in host.port_factory.all_port_names()]
-
- files_linted = set()
- lint_failed = False
-
- for port_to_lint in ports_to_lint:
- expectations_dict = port_to_lint.expectations_dict()
- for expectations_file in expectations_dict.keys():
- if expectations_file in files_linted:
- continue
-
- try:
- test_expectations.TestExpectations(port_to_lint, expectations_to_lint={expectations_file: expectations_dict[expectations_file]})
- except test_expectations.ParseError, e:
- lint_failed = True
- _log.error('')
- for warning in e.warnings:
- _log.error(warning)
- _log.error('')
- files_linted.add(expectations_file)
-
- if lint_failed:
- _log.error('Lint failed.')
- return -1
- _log.info('Lint succeeded.')
- return 0
-
-
-def run(port, options, args, regular_output=sys.stderr, buildbot_output=sys.stdout):
- try:
- warnings = _set_up_derived_options(port, options)
-
- printer = printing.Printer(port, options, regular_output, buildbot_output, logger=logging.getLogger())
-
- for warning in warnings:
- _log.warning(warning)
-
- if options.lint_test_files:
- return lint(port, options)
-
- # 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.
- unexpected_result_count = -1
-
- manager = Manager(port, options, printer)
- printer.print_config(port.results_directory())
-
- unexpected_result_count = manager.run(args)
- _log.debug("Testing completed, Exit status: %d" % unexpected_result_count)
- except Exception:
- exception_type, exception_value, exception_traceback = sys.exc_info()
- if exception_type not in (KeyboardInterrupt, TestRunInterruptedException, WorkerException):
- print >> sys.stderr, '\n%s raised: %s' % (exception_type.__name__, exception_value)
- stack_utils.log_traceback(_log.error, exception_traceback)
- raise
- finally:
- printer.cleanup()
-
- return unexpected_result_count
-
-
-def _set_up_derived_options(port, options):
- """Sets the options values that depend on other options values."""
- # We return a list of warnings to print after the printer is initialized.
- warnings = []
-
- if not options.child_processes:
- options.child_processes = os.environ.get("WEBKIT_TEST_CHILD_PROCESSES",
- str(port.default_child_processes()))
- if not options.max_locked_shards:
- options.max_locked_shards = int(os.environ.get("WEBKIT_TEST_MAX_LOCKED_SHARDS",
- str(port.default_max_locked_shards())))
-
- if not options.configuration:
- options.configuration = port.default_configuration()
-
- if options.pixel_tests is None:
- options.pixel_tests = port.default_pixel_tests()
-
- if not options.time_out_ms:
- options.time_out_ms = str(port.default_timeout_ms())
-
- options.slow_time_out_ms = str(5 * int(options.time_out_ms))
-
- if options.additional_platform_directory:
- additional_platform_directories = []
- for path in options.additional_platform_directory:
- additional_platform_directories.append(port.host.filesystem.abspath(path))
- options.additional_platform_directory = additional_platform_directories
-
- if not options.http and options.skipped in ('ignore', 'only'):
- warnings.append("--force/--skipped=%s overrides --no-http." % (options.skipped))
- options.http = True
-
- if options.ignore_metrics and (options.new_baseline or options.reset_results):
- warnings.append("--ignore-metrics has no effect with --new-baselines or with --reset-results")
-
- if options.new_baseline:
- options.reset_results = True
- options.add_platform_exceptions = True
-
- if options.pixel_test_directories:
- options.pixel_tests = True
- varified_dirs = set()
- pixel_test_directories = options.pixel_test_directories
- for directory in pixel_test_directories:
- # FIXME: we should support specifying the directories all the ways we support it for additional
- # arguments specifying which tests and directories to run. We should also move the logic for that
- # to Port.
- filesystem = port.host.filesystem
- if not filesystem.isdir(filesystem.join(port.layout_tests_dir(), directory)):
- warnings.append("'%s' was passed to --pixel-test-directories, which doesn't seem to be a directory" % str(directory))
- else:
- varified_dirs.add(directory)
-
- options.pixel_test_directories = list(varified_dirs)
-
- if options.run_singly:
- options.verbose = True
-
- return warnings
-
-
-def _compat_shim_callback(option, opt_str, value, parser):
- print "Ignoring unsupported option: %s" % opt_str
+def main(argv, stdout, stderr):
+ options, args = parse_args(argv)
+ if options.platform and 'test' in options.platform:
+ # It's a bit lame to import mocks into real code, but this allows the user
+ # to run tests against the test platform interactively, which is useful for
+ # debugging test failures.
+ from webkitpy.common.host_mock import MockHost
+ host = MockHost()
+ else:
+ host = Host()
-def _compat_shim_option(option_name, **kwargs):
- return optparse.make_option(option_name, action="callback",
- callback=_compat_shim_callback,
- help="Ignored, for old-run-webkit-tests compat only.", **kwargs)
+ if options.lint_test_files:
+ from webkitpy.layout_tests.lint_test_expectations import lint
+ return lint(host, options, stderr)
+ try:
+ port = host.port_factory.get(options.platform, options)
+ except NotImplementedError, e:
+ # FIXME: is this the best way to handle unsupported port names?
+ print >> stderr, str(e)
+ return EXCEPTIONAL_EXIT_STATUS
-def parse_args(args=None):
- """Provides a default set of command line args.
+ try:
+ run_details = run(port, options, args, stderr)
+ if run_details.exit_code != -1:
+ bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging)
+ bot_printer.print_results(run_details)
+
+ return run_details.exit_code
+ except KeyboardInterrupt:
+ return INTERRUPTED_EXIT_STATUS
+ except BaseException as e:
+ if isinstance(e, Exception):
+ print >> stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
+ traceback.print_exc(file=stderr)
+ return EXCEPTIONAL_EXIT_STATUS
- Returns a tuple of options, args from optparse"""
+def parse_args(args):
option_group_definitions = []
option_group_definitions.append(("Platform options", platform_options()))
option_group_definitions.append(("Configuration options", configuration_options()))
option_group_definitions.append(("Printing Options", printing.print_options()))
- # FIXME: These options should move onto the ChromiumPort.
- option_group_definitions.append(("Chromium-specific Options", [
- optparse.make_option("--nocheck-sys-deps", action="store_true",
- default=False,
- help="Don't check the system dependencies (themes)"),
- optparse.make_option("--adb-device",
- action="append", default=[],
- help="Run Android layout tests on these devices."),
- ]))
-
option_group_definitions.append(("EFL-specific Options", [
optparse.make_option("--webprocess-cmd-prefix", type="string",
default=False, help="Prefix used when spawning the Web process (Debug mode only)"),
@@ -238,16 +122,10 @@ def parse_args(args=None):
help="Path to a directory containing the executables needed to run tests."),
]))
- option_group_definitions.append(("ORWT Compatibility Options", [
- # FIXME: Remove this option once the bots don't refer to it.
- # results.html is smart enough to figure this out itself.
- _compat_shim_option("--use-remote-links-to-tests"),
- ]))
-
option_group_definitions.append(("Results Options", [
- optparse.make_option("-p", "--pixel-tests", action="store_true",
+ optparse.make_option("-p", "--pixel", "--pixel-tests", action="store_true",
dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"),
- optparse.make_option("--no-pixel-tests", action="store_false",
+ optparse.make_option("--no-pixel", "--no-pixel-tests", action="store_false",
dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),
optparse.make_option("--no-sample-on-timeout", action="store_false",
dest="sample_on_timeout", help="Don't run sample on timeout (Mac OS X only)"),
@@ -303,18 +181,11 @@ def parse_args(args=None):
default=True, dest="show_results",
help="Don't launch a browser with results after the tests "
"are done"),
- # FIXME: We should have a helper function to do this sort of
- # deprectated mapping and automatically log, etc.
- optparse.make_option("--noshow-results", action="store_false", dest="show_results", help="Deprecated, same as --no-show-results."),
- optparse.make_option("--no-launch-safari", action="store_false", dest="show_results", help="Deprecated, same as --no-show-results."),
optparse.make_option("--full-results-html", action="store_true",
default=False,
help="Show all failures in results.html, rather than only regressions"),
optparse.make_option("--clobber-old-results", action="store_true",
default=False, help="Clobbers test results from previous runs."),
- optparse.make_option("--no-record-results", action="store_false",
- default=True, dest="record_results",
- help="Don't record the results."),
optparse.make_option("--http", action="store_true", dest="http",
default=True, help="Run HTTP and WebSocket tests (default)"),
optparse.make_option("--no-http", action="store_false", dest="http",
@@ -322,6 +193,12 @@ def parse_args(args=None):
optparse.make_option("--ignore-metrics", action="store_true", dest="ignore_metrics",
default=False, help="Ignore rendering metrics related information from test "
"output, only compare the structure of the rendertree."),
+ optparse.make_option("--nocheck-sys-deps", action="store_true",
+ default=False,
+ help="Don't check the system dependencies (themes)"),
+ optparse.make_option("--nojava", action="store_true",
+ default=False,
+ help="Don't build java support files"),
]))
option_group_definitions.append(("Testing Options", [
@@ -391,6 +268,10 @@ def parse_args(args=None):
help="Set the maximum number of locked shards"),
optparse.make_option("--additional-env-var", type="string", action="append", default=[],
help="Passes that environment variable to the tests (--additional-env-var=NAME=VALUE)"),
+ optparse.make_option("--profile", action="store_true",
+ help="Output per-test profile information."),
+ optparse.make_option("--profiler", action="store",
+ help="Output per-test profile information, using the specified profiler."),
]))
option_group_definitions.append(("Miscellaneous Options", [
@@ -425,37 +306,79 @@ def parse_args(args=None):
return option_parser.parse_args(args)
-def main(argv=None):
- try:
- options, args = parse_args(argv)
- if options.platform and 'test' in options.platform:
- # It's a bit lame to import mocks into real code, but this allows the user
- # to run tests against the test platform interactively, which is useful for
- # debugging test failures.
- from webkitpy.common.host_mock import MockHost
- host = MockHost()
- else:
- host = Host()
- port = host.port_factory.get(options.platform, options)
- except NotImplementedError, e:
- # FIXME: is this the best way to handle unsupported port names?
- print >> sys.stderr, str(e)
- return EXCEPTIONAL_EXIT_STATUS
- except Exception, e:
- print >> sys.stderr, '\n%s raised: %s' % (e.__class__.__name__, str(e))
- traceback.print_exc(file=sys.stderr)
- raise
+def _set_up_derived_options(port, options):
+ """Sets the options values that depend on other options values."""
+ if not options.child_processes:
+ options.child_processes = os.environ.get("WEBKIT_TEST_CHILD_PROCESSES",
+ str(port.default_child_processes()))
+ if not options.max_locked_shards:
+ options.max_locked_shards = int(os.environ.get("WEBKIT_TEST_MAX_LOCKED_SHARDS",
+ str(port.default_max_locked_shards())))
+
+ if not options.configuration:
+ options.configuration = port.default_configuration()
+
+ if options.pixel_tests is None:
+ options.pixel_tests = port.default_pixel_tests()
+
+ if not options.time_out_ms:
+ options.time_out_ms = str(port.default_timeout_ms())
+
+ options.slow_time_out_ms = str(5 * int(options.time_out_ms))
+
+ if options.additional_platform_directory:
+ additional_platform_directories = []
+ for path in options.additional_platform_directory:
+ additional_platform_directories.append(port.host.filesystem.abspath(path))
+ options.additional_platform_directory = additional_platform_directories
+
+ if not options.http and options.skipped in ('ignore', 'only'):
+ _log.warning("--force/--skipped=%s overrides --no-http." % (options.skipped))
+ options.http = True
+
+ if options.ignore_metrics and (options.new_baseline or options.reset_results):
+ _log.warning("--ignore-metrics has no effect with --new-baselines or with --reset-results")
+
+ if options.new_baseline:
+ options.reset_results = True
+ options.add_platform_exceptions = True
+
+ if options.pixel_test_directories:
+ options.pixel_tests = True
+ varified_dirs = set()
+ pixel_test_directories = options.pixel_test_directories
+ for directory in pixel_test_directories:
+ # FIXME: we should support specifying the directories all the ways we support it for additional
+ # arguments specifying which tests and directories to run. We should also move the logic for that
+ # to Port.
+ filesystem = port.host.filesystem
+ if not filesystem.isdir(filesystem.join(port.layout_tests_dir(), directory)):
+ _log.warning("'%s' was passed to --pixel-test-directories, which doesn't seem to be a directory" % str(directory))
+ else:
+ varified_dirs.add(directory)
- logging.getLogger().setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)
- return run(port, options, args)
+ options.pixel_test_directories = list(varified_dirs)
+ if options.run_singly:
+ options.verbose = True
+
+
+def run(port, options, args, logging_stream):
+ logger = logging.getLogger()
+ logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)
-if '__main__' == __name__:
try:
- return_code = main()
- except BaseException, e:
- if e.__class__ in (KeyboardInterrupt, TestRunInterruptedException):
- sys.exit(INTERRUPTED_EXIT_STATUS)
- sys.exit(EXCEPTIONAL_EXIT_STATUS)
+ printer = printing.Printer(port, options, logging_stream, logger=logger)
+
+ _set_up_derived_options(port, options)
+ manager = Manager(port, options, printer)
+ printer.print_config(port.results_directory())
+
+ run_details = manager.run(args)
+ _log.debug("Testing completed, Exit status: %d" % run_details.exit_code)
+ return run_details
+ finally:
+ printer.cleanup()
- sys.exit(return_code)
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))
diff --git a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
index 2bfe904d5..c8d3495e4 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2011 Apple Inc. All rights reserved.
@@ -30,7 +29,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import codecs
-import itertools
import json
import logging
import os
@@ -42,7 +40,7 @@ import sys
import thread
import time
import threading
-import unittest
+import unittest2 as unittest
from webkitpy.common.system import outputcapture, path
from webkitpy.common.system.crashlogs_unittest import make_mock_crash_report_darwin
@@ -50,22 +48,19 @@ from webkitpy.common.system.systemhost import SystemHost
from webkitpy.common.host import Host
from webkitpy.common.host_mock import MockHost
-from webkitpy.layout_tests import port
+from webkitpy import port
from webkitpy.layout_tests import run_webkit_tests
-from webkitpy.layout_tests.controllers.manager import WorkerException
-from webkitpy.layout_tests.port import Port
-from webkitpy.layout_tests.port.test import TestPort, TestDriver
+from webkitpy.port import Port
+from webkitpy.port import test
from webkitpy.test.skip import skip_if
from webkitpy.tool.mocktool import MockOptions
-def parse_args(extra_args=None, record_results=False, tests_included=False, new_results=False, print_nothing=True):
+def parse_args(extra_args=None, tests_included=False, new_results=False, print_nothing=True):
extra_args = extra_args or []
args = []
if not '--platform' in extra_args:
args.extend(['--platform', 'test'])
- if not record_results:
- args.append('--no-record-results')
if not new_results:
args.append('--no-new-test-results')
@@ -81,8 +76,8 @@ def parse_args(extra_args=None, record_results=False, tests_included=False, new_
return run_webkit_tests.parse_args(args)
-def passing_run(extra_args=None, port_obj=None, record_results=False, tests_included=False, host=None, shared_port=True):
- options, parsed_args = parse_args(extra_args, record_results, tests_included)
+def passing_run(extra_args=None, port_obj=None, tests_included=False, host=None, shared_port=True):
+ options, parsed_args = parse_args(extra_args, tests_included)
if not port_obj:
host = host or MockHost()
port_obj = host.port_factory.get(port_name=options.platform, options=options)
@@ -90,23 +85,21 @@ def passing_run(extra_args=None, port_obj=None, record_results=False, tests_incl
if shared_port:
port_obj.host.port_factory.get = lambda *args, **kwargs: port_obj
- buildbot_output = StringIO.StringIO()
- regular_output = StringIO.StringIO()
- res = run_webkit_tests.run(port_obj, options, parsed_args, buildbot_output=buildbot_output, regular_output=regular_output)
- return res == 0
+ logging_stream = StringIO.StringIO()
+ run_details = run_webkit_tests.run(port_obj, options, parsed_args, logging_stream=logging_stream)
+ return run_details.exit_code == 0
-def logging_run(extra_args=None, port_obj=None, record_results=False, tests_included=False, host=None, new_results=False, shared_port=True):
+def logging_run(extra_args=None, port_obj=None, tests_included=False, host=None, new_results=False, shared_port=True):
options, parsed_args = parse_args(extra_args=extra_args,
- record_results=record_results,
tests_included=tests_included,
print_nothing=False, new_results=new_results)
host = host or MockHost()
if not port_obj:
port_obj = host.port_factory.get(port_name=options.platform, options=options)
- res, buildbot_output, regular_output = run_and_capture(port_obj, options, parsed_args, shared_port)
- return (res, buildbot_output, regular_output, host.user)
+ run_details, output = run_and_capture(port_obj, options, parsed_args, shared_port)
+ return (run_details, output, host.user)
def run_and_capture(port_obj, options, parsed_args, shared_port=True):
@@ -115,70 +108,60 @@ def run_and_capture(port_obj, options, parsed_args, shared_port=True):
oc = outputcapture.OutputCapture()
try:
oc.capture_output()
- buildbot_output = StringIO.StringIO()
- regular_output = StringIO.StringIO()
- res = run_webkit_tests.run(port_obj, options, parsed_args,
- buildbot_output=buildbot_output,
- regular_output=regular_output)
+ logging_stream = StringIO.StringIO()
+ run_details = run_webkit_tests.run(port_obj, options, parsed_args, logging_stream=logging_stream)
finally:
oc.restore_output()
- return (res, buildbot_output, regular_output)
+ return (run_details, logging_stream)
-def get_tests_run(extra_args=None, tests_included=False, flatten_batches=False,
- host=None, include_reference_html=False):
- extra_args = extra_args or []
- if not tests_included:
- # Not including http tests since they get run out of order (that
- # behavior has its own test, see test_get_test_file_queue)
- extra_args = ['passes', 'failures'] + extra_args
- options, parsed_args = parse_args(extra_args, tests_included=True)
+def get_tests_run(args, host=None):
+ results = get_test_results(args, host)
+ return [result.test_name for result in results]
- host = host or MockHost()
- test_batches = []
- class RecordingTestDriver(TestDriver):
- def __init__(self, port, worker_number):
- TestDriver.__init__(self, port, worker_number, pixel_tests=port.get_option('pixel_test'), no_timeout=False)
- self._current_test_batch = None
+def get_test_batches(args, host=None):
+ results = get_test_results(args, host)
+ batches = []
+ batch = []
+ current_pid = None
+ for result in results:
+ if batch and result.pid != current_pid:
+ batches.append(batch)
+ batch = []
+ batch.append(result.test_name)
+ if batch:
+ batches.append(batch)
+ return batches
- def start(self):
- pass
- def stop(self):
- self._current_test_batch = None
+def get_test_results(args, host=None):
+ options, parsed_args = parse_args(args, tests_included=True)
- def run_test(self, test_input, stop_when_done):
- if self._current_test_batch is None:
- self._current_test_batch = []
- test_batches.append(self._current_test_batch)
- test_name = test_input.test_name
- # In case of reftest, one test calls the driver's run_test() twice.
- # We should not add a reference html used by reftests to tests unless include_reference_html parameter
- # is explicitly given.
- filesystem = self._port.host.filesystem
- dirname, filename = filesystem.split(test_name)
- if include_reference_html or not Port.is_reference_html_file(filesystem, dirname, filename):
- self._current_test_batch.append(test_name)
- return TestDriver.run_test(self, test_input, stop_when_done)
-
- class RecordingTestPort(TestPort):
- def create_driver(self, worker_number):
- return RecordingTestDriver(self, worker_number)
+ host = host or MockHost()
+ port_obj = host.port_factory.get(port_name=options.platform, options=options)
- recording_port = RecordingTestPort(host, options=options)
- run_and_capture(recording_port, options, parsed_args)
+ oc = outputcapture.OutputCapture()
+ oc.capture_output()
+ logging_stream = StringIO.StringIO()
+ try:
+ run_details = run_webkit_tests.run(port_obj, options, parsed_args, logging_stream=logging_stream)
+ finally:
+ oc.restore_output()
- if flatten_batches:
- return list(itertools.chain(*test_batches))
+ all_results = []
+ if run_details.initial_results:
+ all_results.extend(run_details.initial_results.all_results)
- return test_batches
+ if run_details.retry_results:
+ all_results.extend(run_details.retry_results.all_results)
+ return all_results
-# Update this magic number if you add an unexpected test to webkitpy.layout_tests.port.test
-# FIXME: It's nice to have a routine in port/test.py that returns this number.
-unexpected_failures = 12
-unexpected_tests_count = unexpected_failures + 4
+def parse_full_results(full_results_text):
+ json_to_eval = full_results_text.replace("ADD_RESULTS(", "").replace(");", "")
+ compressed_results = json.loads(json_to_eval)
+ return compressed_results
class StreamTestingMixin(object):
@@ -192,91 +175,7 @@ class StreamTestingMixin(object):
self.assertTrue(stream.getvalue())
-class LintTest(unittest.TestCase, StreamTestingMixin):
- def test_all_configurations(self):
-
- class FakePort(object):
- def __init__(self, host, name, path):
- self.host = host
- self.name = name
- self.path = path
-
- def test_configuration(self):
- return None
-
- def expectations_dict(self):
- self.host.ports_parsed.append(self.name)
- return {self.path: ''}
-
- def skipped_layout_tests(self, tests):
- return set([])
-
- def all_test_configurations(self):
- return []
-
- def configuration_specifier_macros(self):
- return []
-
- def path_from_webkit_base(self):
- return ''
-
- def get_option(self, name, val):
- return val
-
- class FakeFactory(object):
- def __init__(self, host, ports):
- self.host = host
- self.ports = {}
- for port in ports:
- self.ports[port.name] = port
-
- def get(self, port_name, *args, **kwargs):
- return self.ports[port_name]
-
- def all_port_names(self):
- return sorted(self.ports.keys())
-
- host = MockHost()
- host.ports_parsed = []
- host.port_factory = FakeFactory(host, (FakePort(host, 'a', 'path-to-a'),
- FakePort(host, 'b', 'path-to-b'),
- FakePort(host, 'b-win', 'path-to-b')))
-
- self.assertEqual(run_webkit_tests.lint(host.port_factory.ports['a'], MockOptions(platform=None)), 0)
- self.assertEqual(host.ports_parsed, ['a', 'b', 'b-win'])
-
- host.ports_parsed = []
- self.assertEqual(run_webkit_tests.lint(host.port_factory.ports['a'], MockOptions(platform='a')), 0)
- self.assertEqual(host.ports_parsed, ['a'])
-
- def test_lint_test_files(self):
- res, out, err, user = logging_run(['--lint-test-files'])
- self.assertEqual(res, 0)
- self.assertEmpty(out)
- self.assertContains(err, 'Lint succeeded')
-
- def test_lint_test_files__errors(self):
- options, parsed_args = parse_args(['--lint-test-files'])
- host = MockHost()
- port_obj = host.port_factory.get(options.platform, options=options)
- port_obj.expectations_dict = lambda: {'': '-- syntax error'}
- res, out, err = run_and_capture(port_obj, options, parsed_args)
-
- self.assertEqual(res, -1)
- self.assertEmpty(out)
- self.assertTrue(any(['Lint failed' in msg for msg in err.buflist]))
-
- # ensure we lint *all* of the files in the cascade.
- port_obj.expectations_dict = lambda: {'foo': '-- syntax error1', 'bar': '-- syntax error2'}
- res, out, err = run_and_capture(port_obj, options, parsed_args)
-
- self.assertEqual(res, -1)
- self.assertEmpty(out)
- self.assertTrue(any(['foo:1' in msg for msg in err.buflist]))
- self.assertTrue(any(['bar:1' in msg for msg in err.buflist]))
-
-
-class MainTest(unittest.TestCase, StreamTestingMixin):
+class RunTest(unittest.TestCase, StreamTestingMixin):
def setUp(self):
# A real PlatformInfo object is used here instead of a
# MockPlatformInfo because we need to actually check for
@@ -287,15 +186,41 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
# properly on cygwin (bug 63846).
self.should_test_processes = not self._platform.is_win()
- def test_all(self):
- res, out, err, user = logging_run([], tests_included=True)
- self.assertEqual(res, unexpected_tests_count)
-
def test_basic(self):
- self.assertTrue(passing_run())
+ options, args = parse_args(tests_included=True)
+ logging_stream = StringIO.StringIO()
+ host = MockHost()
+ port_obj = host.port_factory.get(options.platform, options)
+ details = run_webkit_tests.run(port_obj, options, args, logging_stream)
+
+ # These numbers will need to be updated whenever we add new tests.
+ self.assertEqual(details.initial_results.total, test.TOTAL_TESTS)
+ self.assertEqual(details.initial_results.expected_skips, test.TOTAL_SKIPS)
+ self.assertEqual(len(details.initial_results.unexpected_results_by_name), test.UNEXPECTED_PASSES + test.UNEXPECTED_FAILURES)
+ self.assertEqual(details.exit_code, test.UNEXPECTED_FAILURES)
+ self.assertEqual(details.retry_results.total, test.TOTAL_RETRIES)
+
+ one_line_summary = "%d tests ran as expected, %d didn't:\n" % (
+ details.initial_results.total - details.initial_results.expected_skips - len(details.initial_results.unexpected_results_by_name),
+ len(details.initial_results.unexpected_results_by_name))
+ self.assertTrue(one_line_summary in logging_stream.buflist)
+
+ # Ensure the results were summarized properly.
+ self.assertEqual(details.summarized_results['num_regressions'], details.exit_code)
+
+ # Ensure the image diff percentage is in the results.
+ self.assertEqual(details.summarized_results['tests']['failures']['expected']['image.html']['image_diff_percent'], 1)
+
+ # Ensure the results were written out and displayed.
+ full_results_text = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
+ json_to_eval = full_results_text.replace("ADD_RESULTS(", "").replace(");", "")
+ self.assertEqual(json.loads(json_to_eval), details.summarized_results)
+
+ self.assertEqual(host.user.opened_urls, [path.abspath_to_uri(MockHost().platform, '/tmp/layout-test-results/results.html')])
+
def test_batch_size(self):
- batch_tests_run = get_tests_run(['--batch-size', '2'])
+ batch_tests_run = get_test_batches(['--batch-size', '2'])
for batch in batch_tests_run:
self.assertTrue(len(batch) <= 2, '%s had too many tests' % ', '.join(batch))
@@ -307,32 +232,32 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
if "WEBKIT_TEST_MAX_LOCKED_SHARDS" in os.environ:
save_env_webkit_test_max_locked_shards = os.environ["WEBKIT_TEST_MAX_LOCKED_SHARDS"]
del os.environ["WEBKIT_TEST_MAX_LOCKED_SHARDS"]
- _, _, regular_output, _ = logging_run(['--debug-rwt-logging', '--child-processes', '2'], shared_port=False)
+ _, regular_output, _ = logging_run(['--debug-rwt-logging', '--child-processes', '2'], shared_port=False)
try:
- self.assertTrue(any(['(1 locked)' in line for line in regular_output.buflist]))
+ self.assertTrue(any(['1 locked' in line for line in regular_output.buflist]))
finally:
if save_env_webkit_test_max_locked_shards:
os.environ["WEBKIT_TEST_MAX_LOCKED_SHARDS"] = save_env_webkit_test_max_locked_shards
def test_child_processes_2(self):
if self.should_test_processes:
- _, _, regular_output, _ = logging_run(
+ _, regular_output, _ = logging_run(
['--debug-rwt-logging', '--child-processes', '2'], shared_port=False)
self.assertTrue(any(['Running 2 ' in line for line in regular_output.buflist]))
def test_child_processes_min(self):
if self.should_test_processes:
- _, _, regular_output, _ = logging_run(
+ _, regular_output, _ = logging_run(
['--debug-rwt-logging', '--child-processes', '2', '-i', 'passes/passes', 'passes'],
tests_included=True, shared_port=False)
self.assertTrue(any(['Running 1 ' in line for line in regular_output.buflist]))
def test_dryrun(self):
- batch_tests_run = get_tests_run(['--dry-run'])
- self.assertEqual(batch_tests_run, [])
+ tests_run = get_tests_run(['--dry-run'])
+ self.assertEqual(tests_run, [])
- batch_tests_run = get_tests_run(['-n'])
- self.assertEqual(batch_tests_run, [])
+ tests_run = get_tests_run(['-n'])
+ self.assertEqual(tests_run, [])
def test_exception_raised(self):
# Exceptions raised by a worker are treated differently depending on
@@ -342,87 +267,80 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
# is actually useful in testing.
#
# Exceptions raised in a separate process are re-packaged into
- # WorkerExceptions, which have a string capture of the stack which can
+ # WorkerExceptions (a subclass of BaseException), which have a string capture of the stack which can
# be printed, but don't display properly in the unit test exception handlers.
- self.assertRaises(ValueError, logging_run,
+ self.assertRaises(BaseException, logging_run,
['failures/expected/exception.html', '--child-processes', '1'], tests_included=True)
if self.should_test_processes:
- self.assertRaises(WorkerException, logging_run,
+ self.assertRaises(BaseException, logging_run,
['--child-processes', '2', '--force', 'failures/expected/exception.html', 'passes/text.html'], tests_included=True, shared_port=False)
def test_full_results_html(self):
# FIXME: verify html?
- res, out, err, user = logging_run(['--full-results-html'])
- self.assertEqual(res, 0)
+ details, _, _ = logging_run(['--full-results-html'])
+ self.assertEqual(details.exit_code, 0)
def test_hung_thread(self):
- res, out, err, user = logging_run(['--run-singly', '--time-out-ms=50',
- 'failures/expected/hang.html'],
- tests_included=True)
+ details, err, _ = logging_run(['--run-singly', '--time-out-ms=50', 'failures/expected/hang.html'], tests_included=True)
# Note that hang.html is marked as WontFix and all WontFix tests are
# expected to Pass, so that actually running them generates an "unexpected" error.
- self.assertEqual(res, 1)
- self.assertNotEmpty(out)
+ self.assertEqual(details.exit_code, 1)
self.assertNotEmpty(err)
def test_keyboard_interrupt(self):
# Note that this also tests running a test marked as SKIP if
# you specify it explicitly.
- self.assertRaises(KeyboardInterrupt, logging_run,
- ['failures/expected/keyboard.html', '--child-processes', '1'],
- tests_included=True)
+ self.assertRaises(KeyboardInterrupt, logging_run, ['failures/expected/keyboard.html', '--child-processes', '1'], tests_included=True)
if self.should_test_processes:
self.assertRaises(KeyboardInterrupt, logging_run,
['failures/expected/keyboard.html', 'passes/text.html', '--child-processes', '2', '--force'], tests_included=True, shared_port=False)
def test_no_tests_found(self):
- res, out, err, user = logging_run(['resources'], tests_included=True)
- self.assertEqual(res, -1)
- self.assertEmpty(out)
+ details, err, _ = logging_run(['resources'], tests_included=True)
+ self.assertEqual(details.exit_code, -1)
self.assertContains(err, 'No tests to run.\n')
def test_no_tests_found_2(self):
- res, out, err, user = logging_run(['foo'], tests_included=True)
- self.assertEqual(res, -1)
- self.assertEmpty(out)
+ details, err, _ = logging_run(['foo'], tests_included=True)
+ self.assertEqual(details.exit_code, -1)
self.assertContains(err, 'No tests to run.\n')
def test_natural_order(self):
tests_to_run = ['passes/audio.html', 'failures/expected/text.html', 'failures/expected/missing_text.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=natural'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=natural'] + tests_to_run)
self.assertEqual(['failures/expected/missing_text.html', 'failures/expected/text.html', 'passes/args.html', 'passes/audio.html'], tests_run)
def test_natural_order_test_specified_multiple_times(self):
tests_to_run = ['passes/args.html', 'passes/audio.html', 'passes/audio.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=natural'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=natural'] + tests_to_run)
self.assertEqual(['passes/args.html', 'passes/args.html', 'passes/audio.html', 'passes/audio.html'], tests_run)
def test_random_order(self):
tests_to_run = ['passes/audio.html', 'failures/expected/text.html', 'failures/expected/missing_text.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=random'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=random'] + tests_to_run)
self.assertEqual(sorted(tests_to_run), sorted(tests_run))
def test_random_order_test_specified_multiple_times(self):
tests_to_run = ['passes/args.html', 'passes/audio.html', 'passes/audio.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=random'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=random'] + tests_to_run)
self.assertEqual(tests_run.count('passes/audio.html'), 2)
self.assertEqual(tests_run.count('passes/args.html'), 2)
def test_no_order(self):
tests_to_run = ['passes/audio.html', 'failures/expected/text.html', 'failures/expected/missing_text.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=none'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=none'] + tests_to_run)
self.assertEqual(tests_to_run, tests_run)
def test_no_order_test_specified_multiple_times(self):
tests_to_run = ['passes/args.html', 'passes/audio.html', 'passes/audio.html', 'passes/args.html']
- tests_run = get_tests_run(['--order=none'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=none'] + tests_to_run)
self.assertEqual(tests_to_run, tests_run)
def test_no_order_with_directory_entries_in_natural_order(self):
tests_to_run = ['http/tests/ssl', 'perf/foo', 'http/tests/passes']
- tests_run = get_tests_run(['--order=none'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--order=none'] + tests_to_run)
self.assertEqual(tests_run, ['http/tests/ssl/text.html', 'perf/foo/test.html', 'http/tests/passes/image.html', 'http/tests/passes/text.html'])
def test_gc_between_tests(self):
@@ -436,86 +354,80 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
def test_repeat_each(self):
tests_to_run = ['passes/image.html', 'passes/text.html']
- tests_run = get_tests_run(['--repeat-each', '2'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--repeat-each', '2'] + tests_to_run)
self.assertEqual(tests_run, ['passes/image.html', 'passes/image.html', 'passes/text.html', 'passes/text.html'])
def test_ignore_flag(self):
# Note that passes/image.html is expected to be run since we specified it directly.
- tests_run = get_tests_run(['-i', 'passes', 'passes/image.html'], flatten_batches=True, tests_included=True)
+ tests_run = get_tests_run(['-i', 'passes', 'passes/image.html'])
self.assertFalse('passes/text.html' in tests_run)
self.assertTrue('passes/image.html' in tests_run)
def test_skipped_flag(self):
- tests_run = get_tests_run(['passes'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['passes'])
self.assertFalse('passes/skipped/skip.html' in tests_run)
num_tests_run_by_default = len(tests_run)
# Check that nothing changes when we specify skipped=default.
- self.assertEqual(len(get_tests_run(['--skipped=default', 'passes'], tests_included=True, flatten_batches=True)),
+ self.assertEqual(len(get_tests_run(['--skipped=default', 'passes'])),
num_tests_run_by_default)
# Now check that we run one more test (the skipped one).
- tests_run = get_tests_run(['--skipped=ignore', 'passes'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--skipped=ignore', 'passes'])
self.assertTrue('passes/skipped/skip.html' in tests_run)
self.assertEqual(len(tests_run), num_tests_run_by_default + 1)
# Now check that we only run the skipped test.
- self.assertEqual(get_tests_run(['--skipped=only', 'passes'], tests_included=True, flatten_batches=True),
- ['passes/skipped/skip.html'])
+ self.assertEqual(get_tests_run(['--skipped=only', 'passes']), ['passes/skipped/skip.html'])
# Now check that we don't run anything.
- self.assertEqual(get_tests_run(['--skipped=always', 'passes/skipped/skip.html'], tests_included=True, flatten_batches=True),
- [])
+ self.assertEqual(get_tests_run(['--skipped=always', 'passes/skipped/skip.html']), [])
def test_iterations(self):
tests_to_run = ['passes/image.html', 'passes/text.html']
- tests_run = get_tests_run(['--iterations', '2'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--iterations', '2'] + tests_to_run)
self.assertEqual(tests_run, ['passes/image.html', 'passes/text.html', 'passes/image.html', 'passes/text.html'])
def test_repeat_each_iterations_num_tests(self):
# The total number of tests should be: number_of_tests *
# repeat_each * iterations
host = MockHost()
- res, out, err, _ = logging_run(['--iterations', '2',
- '--repeat-each', '4',
- '--debug-rwt-logging',
- 'passes/text.html', 'failures/expected/text.html'],
- tests_included=True, host=host, record_results=True)
- self.assertContains(out, "=> Results: 8/16 tests passed (50.0%)\n")
+ _, err, _ = logging_run(
+ ['--iterations', '2', '--repeat-each', '4', '--debug-rwt-logging', 'passes/text.html', 'failures/expected/text.html'],
+ tests_included=True, host=host)
self.assertContains(err, "All 16 tests ran as expected.\n")
def test_run_chunk(self):
# Test that we actually select the right chunk
- all_tests_run = get_tests_run(flatten_batches=True)
- chunk_tests_run = get_tests_run(['--run-chunk', '1:4'], flatten_batches=True)
+ all_tests_run = get_tests_run(['passes', 'failures'])
+ chunk_tests_run = get_tests_run(['--run-chunk', '1:4', 'passes', 'failures'])
self.assertEqual(all_tests_run[4:8], chunk_tests_run)
# Test that we wrap around if the number of tests is not evenly divisible by the chunk size
tests_to_run = ['passes/error.html', 'passes/image.html', 'passes/platform_image.html', 'passes/text.html']
- chunk_tests_run = get_tests_run(['--run-chunk', '1:3'] + tests_to_run, tests_included=True, flatten_batches=True)
+ chunk_tests_run = get_tests_run(['--run-chunk', '1:3'] + tests_to_run)
self.assertEqual(['passes/text.html', 'passes/error.html', 'passes/image.html'], chunk_tests_run)
def test_run_force(self):
# This raises an exception because we run
# failures/expected/exception.html, which is normally SKIPped.
- # See also the comments in test_exception_raised() about ValueError vs. WorkerException.
self.assertRaises(ValueError, logging_run, ['--force'])
def test_run_part(self):
# Test that we actually select the right part
tests_to_run = ['passes/error.html', 'passes/image.html', 'passes/platform_image.html', 'passes/text.html']
- tests_run = get_tests_run(['--run-part', '1:2'] + tests_to_run, tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--run-part', '1:2'] + tests_to_run)
self.assertEqual(['passes/error.html', 'passes/image.html'], tests_run)
# Test that we wrap around if the number of tests is not evenly divisible by the chunk size
# (here we end up with 3 parts, each with 2 tests, and we only have 4 tests total, so the
# last part repeats the first two tests).
- chunk_tests_run = get_tests_run(['--run-part', '3:3'] + tests_to_run, tests_included=True, flatten_batches=True)
+ chunk_tests_run = get_tests_run(['--run-part', '3:3'] + tests_to_run)
self.assertEqual(['passes/error.html', 'passes/image.html'], chunk_tests_run)
def test_run_singly(self):
- batch_tests_run = get_tests_run(['--run-singly'])
+ batch_tests_run = get_test_batches(['--run-singly'])
for batch in batch_tests_run:
self.assertEqual(len(batch), 1, '%s had too many tests' % ', '.join(batch))
@@ -525,7 +437,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
host = MockHost()
host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) passes/image.html [ ImageOnlyFailure Pass ]\n')
- batches = get_tests_run(['--skip-failing-tests', '--additional-expectations', '/tmp/overrides.txt'], host=host)
+ batches = get_test_batches(['--skip-failing-tests', '--additional-expectations', '/tmp/overrides.txt'], host=host)
has_passes_text = False
for batch in batches:
self.assertFalse('failures/expected/text.html' in batch)
@@ -534,23 +446,19 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
self.assertTrue(has_passes_text)
def test_run_singly_actually_runs_tests(self):
- res, _, _, _ = logging_run(['--run-singly', 'failures/unexpected'])
- self.assertEqual(res, unexpected_failures)
+ details, _, _ = logging_run(['--run-singly'], tests_included=True)
+ self.assertEqual(details.exit_code, test.UNEXPECTED_FAILURES - 1) # failures/expected/hang.html actually passes w/ --run-singly.
def test_single_file(self):
- # FIXME: We should consider replacing more of the get_tests_run()-style tests
- # with tests that read the tests_run* files, like this one.
- host = MockHost()
- tests_run = passing_run(['passes/text.html'], tests_included=True, host=host)
- self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/tests_run0.txt'),
- 'passes/text.html\n')
+ tests_run = get_tests_run(['passes/text.html'])
+ self.assertEqual(tests_run, ['passes/text.html'])
def test_single_file_with_prefix(self):
- tests_run = get_tests_run(['LayoutTests/passes/text.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['LayoutTests/passes/text.html'])
self.assertEqual(['passes/text.html'], tests_run)
def test_single_skipped_file(self):
- tests_run = get_tests_run(['failures/expected/keybaord.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['failures/expected/keybaord.html'])
self.assertEqual([], tests_run)
def test_stderr_is_saved(self):
@@ -563,43 +471,31 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(filename, 'passes/text.html')
- tests_run = get_tests_run(['--test-list=%s' % filename], tests_included=True, flatten_batches=True, host=host)
+ tests_run = get_tests_run(['--test-list=%s' % filename], host=host)
self.assertEqual(['passes/text.html'], tests_run)
host.filesystem.remove(filename)
- res, out, err, user = logging_run(['--test-list=%s' % filename],
- tests_included=True, host=host)
- self.assertEqual(res, -1)
+ details, err, user = logging_run(['--test-list=%s' % filename], tests_included=True, host=host)
+ self.assertEqual(details.exit_code, -1)
self.assertNotEmpty(err)
def test_test_list_with_prefix(self):
host = MockHost()
filename = '/tmp/foo.txt'
host.filesystem.write_text_file(filename, 'LayoutTests/passes/text.html')
- tests_run = get_tests_run(['--test-list=%s' % filename], tests_included=True, flatten_batches=True, host=host)
+ tests_run = get_tests_run(['--test-list=%s' % filename], host=host)
self.assertEqual(['passes/text.html'], tests_run)
- def test_unexpected_failures(self):
- # Run tests including the unexpected failures.
- self._url_opened = None
- res, out, err, user = logging_run(tests_included=True)
-
- self.assertEqual(res, unexpected_tests_count)
- self.assertNotEmpty(out)
- self.assertNotEmpty(err)
- self.assertEqual(user.opened_urls, [path.abspath_to_uri(MockHost().platform, '/tmp/layout-test-results/results.html')])
-
def test_missing_and_unexpected_results(self):
# Test that we update expectations in place. If the expectation
# is missing, update the expected generic location.
host = MockHost()
- res, out, err, _ = logging_run(['--no-show-results',
+ details, err, _ = logging_run(['--no-show-results',
'failures/expected/missing_image.html',
'failures/unexpected/missing_text.html',
'failures/unexpected/text-image-checksum.html'],
- tests_included=True, host=host, record_results=True)
+ tests_included=True, host=host)
file_list = host.filesystem.written_files.keys()
- file_list.remove('/tmp/layout-test-results/tests_run0.txt')
- self.assertEqual(res, 1)
+ self.assertEqual(details.exit_code, 1)
expected_token = '"unexpected":{"text-image-checksum.html":{"expected":"PASS","actual":"IMAGE+TEXT","image_diff_percent":1},"missing_text.html":{"expected":"PASS","is_missing_text":true,"actual":"MISSING"}'
json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
self.assertTrue(json_string.find(expected_token) != -1)
@@ -614,9 +510,9 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
args = ['--pixel-tests', '--pixel-test-directory', 'failures/unexpected/pixeldir',
'failures/unexpected/pixeldir/image_in_pixeldir.html',
'failures/unexpected/image_not_in_pixeldir.html']
- res, out, err, _ = logging_run(extra_args=args, host=host, record_results=True, tests_included=True)
+ details, err, _ = logging_run(extra_args=args, host=host, tests_included=True)
- self.assertEqual(res, 1)
+ self.assertEqual(details.exit_code, 1)
expected_token = '"unexpected":{"pixeldir":{"image_in_pixeldir.html":{"expected":"PASS","actual":"IMAGE"'
json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
self.assertTrue(json_string.find(expected_token) != -1)
@@ -624,38 +520,28 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
def test_missing_and_unexpected_results_with_custom_exit_code(self):
# Test that we update expectations in place. If the expectation
# is missing, update the expected generic location.
- class CustomExitCodePort(TestPort):
+ class CustomExitCodePort(test.TestPort):
def exit_code_from_summarized_results(self, unexpected_results):
return unexpected_results['num_regressions'] + unexpected_results['num_missing']
host = MockHost()
options, parsed_args = run_webkit_tests.parse_args(['--pixel-tests', '--no-new-test-results'])
test_port = CustomExitCodePort(host, options=options)
- res, out, err, _ = logging_run(['--no-show-results',
+ details, err, _ = logging_run(['--no-show-results',
'failures/expected/missing_image.html',
'failures/unexpected/missing_text.html',
'failures/unexpected/text-image-checksum.html'],
- tests_included=True, host=host, record_results=True, port_obj=test_port)
- self.assertEqual(res, 2)
+ tests_included=True, host=host, port_obj=test_port)
+ self.assertEqual(details.exit_code, 2)
def test_crash_with_stderr(self):
host = MockHost()
- res, buildbot_output, regular_output, user = logging_run([
- 'failures/unexpected/crash-with-stderr.html',
- ],
- tests_included=True,
- record_results=True,
- host=host)
+ _, regular_output, _ = logging_run(['failures/unexpected/crash-with-stderr.html'], tests_included=True, host=host)
self.assertTrue(host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json').find('{"crash-with-stderr.html":{"expected":"PASS","actual":"CRASH","has_stderr":true}}') != -1)
def test_no_image_failure_with_image_diff(self):
host = MockHost()
- res, buildbot_output, regular_output, user = logging_run([
- 'failures/unexpected/checksum-with-matching-image.html',
- ],
- tests_included=True,
- record_results=True,
- host=host)
+ _, regular_output, _ = logging_run(['failures/unexpected/checksum-with-matching-image.html'], tests_included=True, host=host)
self.assertTrue(host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json').find('"num_regressions":0') != -1)
def test_crash_log(self):
@@ -666,12 +552,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
mock_crash_report = make_mock_crash_report_darwin('DumpRenderTree', 12345)
host = MockHost()
host.filesystem.write_text_file('/Users/mock/Library/Logs/DiagnosticReports/DumpRenderTree_2011-06-13-150719_quadzen.crash', mock_crash_report)
- res, buildbot_output, regular_output, user = logging_run([
- 'failures/unexpected/crash-with-stderr.html',
- ],
- tests_included=True,
- record_results=True,
- host=host)
+ _, regular_output, _ = logging_run(['failures/unexpected/crash-with-stderr.html'], tests_included=True, host=host)
expected_crash_log = mock_crash_report
self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/failures/unexpected/crash-with-stderr-crash-log.txt'), expected_crash_log)
@@ -683,30 +564,20 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
mock_crash_report = make_mock_crash_report_darwin('WebProcess', 12345)
host = MockHost()
host.filesystem.write_text_file('/Users/mock/Library/Logs/DiagnosticReports/WebProcess_2011-06-13-150719_quadzen.crash', mock_crash_report)
- res, buildbot_output, regular_output, user = logging_run([
- 'failures/unexpected/web-process-crash-with-stderr.html',
- ],
- tests_included=True,
- record_results=True,
- host=host)
+ logging_run(['failures/unexpected/web-process-crash-with-stderr.html'], tests_included=True, host=host)
self.assertEqual(host.filesystem.read_text_file('/tmp/layout-test-results/failures/unexpected/web-process-crash-with-stderr-crash-log.txt'), mock_crash_report)
def test_exit_after_n_failures_upload(self):
host = MockHost()
- res, buildbot_output, regular_output, user = logging_run([
- 'failures/unexpected/text-image-checksum.html',
- 'passes/text.html',
- '--exit-after-n-failures', '1',
- ],
- tests_included=True,
- record_results=True,
- host=host)
+ details, regular_output, user = logging_run(
+ ['failures/unexpected/text-image-checksum.html', 'passes/text.html', '--exit-after-n-failures', '1'],
+ tests_included=True, host=host)
# By returning False, we know that the incremental results were generated and then deleted.
self.assertFalse(host.filesystem.exists('/tmp/layout-test-results/incremental_results.json'))
# This checks that we report only the number of tests that actually failed.
- self.assertEqual(res, 1)
+ self.assertEqual(details.exit_code, 1)
# This checks that passes/text.html is considered SKIPped.
self.assertTrue('"skipped":1' in host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json'))
@@ -720,54 +591,24 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
def test_exit_after_n_failures(self):
# Unexpected failures should result in tests stopping.
- tests_run = get_tests_run([
- 'failures/unexpected/text-image-checksum.html',
- 'passes/text.html',
- '--exit-after-n-failures', '1',
- ],
- tests_included=True,
- flatten_batches=True)
+ tests_run = get_tests_run(['failures/unexpected/text-image-checksum.html', 'passes/text.html', '--exit-after-n-failures', '1'])
self.assertEqual(['failures/unexpected/text-image-checksum.html'], tests_run)
# But we'll keep going for expected ones.
- tests_run = get_tests_run([
- 'failures/expected/text.html',
- 'passes/text.html',
- '--exit-after-n-failures', '1',
- ],
- tests_included=True,
- flatten_batches=True)
+ tests_run = get_tests_run(['failures/expected/text.html', 'passes/text.html', '--exit-after-n-failures', '1'])
self.assertEqual(['failures/expected/text.html', 'passes/text.html'], tests_run)
def test_exit_after_n_crashes(self):
# Unexpected crashes should result in tests stopping.
- tests_run = get_tests_run([
- 'failures/unexpected/crash.html',
- 'passes/text.html',
- '--exit-after-n-crashes-or-timeouts', '1',
- ],
- tests_included=True,
- flatten_batches=True)
+ tests_run = get_tests_run(['failures/unexpected/crash.html', 'passes/text.html', '--exit-after-n-crashes-or-timeouts', '1'])
self.assertEqual(['failures/unexpected/crash.html'], tests_run)
# Same with timeouts.
- tests_run = get_tests_run([
- 'failures/unexpected/timeout.html',
- 'passes/text.html',
- '--exit-after-n-crashes-or-timeouts', '1',
- ],
- tests_included=True,
- flatten_batches=True)
+ tests_run = get_tests_run(['failures/unexpected/timeout.html', 'passes/text.html', '--exit-after-n-crashes-or-timeouts', '1'])
self.assertEqual(['failures/unexpected/timeout.html'], tests_run)
# But we'll keep going for expected ones.
- tests_run = get_tests_run([
- 'failures/expected/crash.html',
- 'passes/text.html',
- '--exit-after-n-crashes-or-timeouts', '1',
- ],
- tests_included=True,
- flatten_batches=True)
+ tests_run = get_tests_run(['failures/expected/crash.html', 'passes/text.html', '--exit-after-n-crashes-or-timeouts', '1'])
self.assertEqual(['failures/expected/crash.html', 'passes/text.html'], tests_run)
def test_results_directory_absolute(self):
@@ -776,8 +617,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
host = MockHost()
with host.filesystem.mkdtemp() as tmpdir:
- res, out, err, user = logging_run(['--results-directory=' + str(tmpdir)],
- tests_included=True, host=host)
+ _, _, user = logging_run(['--results-directory=' + str(tmpdir)], tests_included=True, host=host)
self.assertEqual(user.opened_urls, [path.abspath_to_uri(host.platform, host.filesystem.join(tmpdir, 'results.html'))])
def test_results_directory_default(self):
@@ -785,7 +625,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
# look for what the output results url was.
# This is the default location.
- res, out, err, user = logging_run(tests_included=True)
+ _, _, user = logging_run(tests_included=True)
self.assertEqual(user.opened_urls, [path.abspath_to_uri(MockHost().platform, '/tmp/layout-test-results/results.html')])
def test_results_directory_relative(self):
@@ -794,44 +634,62 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
host = MockHost()
host.filesystem.maybe_make_directory('/tmp/cwd')
host.filesystem.chdir('/tmp/cwd')
- res, out, err, user = logging_run(['--results-directory=foo'],
- tests_included=True, host=host)
+ _, _, user = logging_run(['--results-directory=foo'], tests_included=True, host=host)
self.assertEqual(user.opened_urls, [path.abspath_to_uri(host.platform, '/tmp/cwd/foo/results.html')])
def test_retrying_and_flaky_tests(self):
host = MockHost()
- res, out, err, _ = logging_run(['--debug-rwt-logging', 'failures/flaky'], tests_included=True, host=host)
- self.assertEqual(res, 0)
+ details, err, _ = logging_run(['--debug-rwt-logging', 'failures/flaky'], tests_included=True, host=host)
+ self.assertEqual(details.exit_code, 0)
self.assertTrue('Retrying' in err.getvalue())
- self.assertTrue('Unexpected flakiness' in out.getvalue())
self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
- self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/retries/tests_run0.txt'))
self.assertFalse(host.filesystem.exists('/tmp/layout-test-results/retries/failures/flaky/text-actual.txt'))
# Now we test that --clobber-old-results does remove the old entries and the old retries,
# and that we don't retry again.
host = MockHost()
- res, out, err, _ = logging_run(['--no-retry-failures', '--clobber-old-results', 'failures/flaky'], tests_included=True, host=host)
- self.assertEqual(res, 1)
+ details, err, _ = logging_run(['--no-retry-failures', '--clobber-old-results', 'failures/flaky'], tests_included=True, host=host)
+ self.assertEqual(details.exit_code, 1)
self.assertTrue('Clobbering old results' in err.getvalue())
self.assertTrue('flaky/text.html' in err.getvalue())
- self.assertTrue('Unexpected text-only failures' in out.getvalue())
- self.assertFalse('Unexpected flakiness' in out.getvalue())
self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/flaky/text-actual.txt'))
self.assertFalse(host.filesystem.exists('retries'))
+ def test_retrying_force_pixel_tests(self):
+ host = MockHost()
+ details, err, _ = logging_run(['--no-pixel-tests', 'failures/unexpected/text-image-checksum.html'], tests_included=True, host=host)
+ self.assertEqual(details.exit_code, 1)
+ self.assertTrue('Retrying' in err.getvalue())
+ self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/unexpected/text-image-checksum-actual.txt'))
+ self.assertFalse(host.filesystem.exists('/tmp/layout-test-results/failures/unexpected/text-image-checksum-actual.png'))
+ self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/retries/failures/unexpected/text-image-checksum-actual.txt'))
+ self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/retries/failures/unexpected/text-image-checksum-actual.png'))
+ json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
+ json = parse_full_results(json_string)
+ self.assertEqual(json["tests"]["failures"]["unexpected"]["text-image-checksum.html"],
+ {"expected": "PASS", "actual": "TEXT IMAGE+TEXT", "image_diff_percent": 1})
+ self.assertFalse(json["pixel_tests_enabled"])
+ self.assertEqual(details.enabled_pixel_tests_in_retry, True)
+
+ def test_retrying_uses_retries_directory(self):
+ host = MockHost()
+ details, err, _ = logging_run(['--debug-rwt-logging', 'failures/unexpected/text-image-checksum.html'], tests_included=True, host=host)
+ self.assertEqual(details.exit_code, 1)
+ self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/failures/unexpected/text-image-checksum-actual.txt'))
+ self.assertTrue(host.filesystem.exists('/tmp/layout-test-results/retries/failures/unexpected/text-image-checksum-actual.txt'))
+
def test_run_order__inline(self):
# These next tests test that we run the tests in ascending alphabetical
# order per directory. HTTP tests are sharded separately from other tests,
# so we have to test both.
- tests_run = get_tests_run(['-i', 'passes/passes', 'passes'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['-i', 'passes/passes', 'passes'])
self.assertEqual(tests_run, sorted(tests_run))
- tests_run = get_tests_run(['http/tests/passes'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['http/tests/passes'])
self.assertEqual(tests_run, sorted(tests_run))
def test_tolerance(self):
- class ImageDiffTestPort(TestPort):
+ class ImageDiffTestPort(test.TestPort):
def diff_image(self, expected_contents, actual_contents, tolerance=None):
self.tolerance_used_for_diff_image = self._options.tolerance
return (True, 1, None)
@@ -862,34 +720,34 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
'virtual/passes/text.html', 'virtual/passes/args.html']))
def test_reftest_run(self):
- tests_run = get_tests_run(['passes/reftest.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['passes/reftest.html'])
self.assertEqual(['passes/reftest.html'], tests_run)
def test_reftest_run_reftests_if_pixel_tests_are_disabled(self):
- tests_run = get_tests_run(['--no-pixel-tests', 'passes/reftest.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--no-pixel-tests', 'passes/reftest.html'])
self.assertEqual(['passes/reftest.html'], tests_run)
def test_reftest_skip_reftests_if_no_ref_tests(self):
- tests_run = get_tests_run(['--no-ref-tests', 'passes/reftest.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--no-ref-tests', 'passes/reftest.html'])
self.assertEqual([], tests_run)
- tests_run = get_tests_run(['--no-ref-tests', '--no-pixel-tests', 'passes/reftest.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--no-ref-tests', '--no-pixel-tests', 'passes/reftest.html'])
self.assertEqual([], tests_run)
def test_reftest_expected_html_should_be_ignored(self):
- tests_run = get_tests_run(['passes/reftest-expected.html'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['passes/reftest-expected.html'])
self.assertEqual([], tests_run)
def test_reftest_driver_should_run_expected_html(self):
- tests_run = get_tests_run(['passes/reftest.html'], tests_included=True, flatten_batches=True, include_reference_html=True)
- self.assertEqual(['passes/reftest.html', 'passes/reftest-expected.html'], tests_run)
+ tests_run = get_test_results(['passes/reftest.html'])
+ self.assertEqual(tests_run[0].references, ['passes/reftest-expected.html'])
def test_reftest_driver_should_run_expected_mismatch_html(self):
- tests_run = get_tests_run(['passes/mismatch.html'], tests_included=True, flatten_batches=True, include_reference_html=True)
- self.assertEqual(['passes/mismatch.html', 'passes/mismatch-expected-mismatch.html'], tests_run)
+ tests_run = get_test_results(['passes/mismatch.html'])
+ self.assertEqual(tests_run[0].references, ['passes/mismatch-expected-mismatch.html'])
def test_reftest_should_not_use_naming_convention_if_not_listed_in_reftestlist(self):
host = MockHost()
- res, out, err, _ = logging_run(['--no-show-results', 'reftests/foo/'], tests_included=True, host=host, record_results=True)
+ _, err, _ = logging_run(['--no-show-results', 'reftests/foo/'], tests_included=True, host=host)
json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
self.assertTrue(json_string.find('"unlistedtest.html":{"expected":"PASS","is_missing_text":true,"actual":"MISSING","is_missing_image":true}') != -1)
self.assertTrue(json_string.find('"num_regressions":4') != -1)
@@ -906,7 +764,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
host = MockHost()
host.filesystem.write_text_file('/tmp/overrides.txt', 'Bug(x) failures/unexpected/mismatch.html [ ImageOnlyFailure ]\n')
self.assertTrue(passing_run(['--additional-expectations', '/tmp/overrides.txt', 'failures/unexpected/mismatch.html'],
- tests_included=True, host=host))
+ tests_included=True, host=host))
def test_no_http_and_force(self):
# See test_run_force, using --force raises an exception.
@@ -918,20 +776,20 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
return [test for test in tests if type in test]
def test_no_http_tests(self):
- batch_tests_dryrun = get_tests_run(['LayoutTests/http', 'websocket/'], flatten_batches=True)
- self.assertTrue(MainTest.has_test_of_type(batch_tests_dryrun, 'http'))
- self.assertTrue(MainTest.has_test_of_type(batch_tests_dryrun, 'websocket'))
+ batch_tests_dryrun = get_tests_run(['LayoutTests/http', 'websocket/'])
+ self.assertTrue(RunTest.has_test_of_type(batch_tests_dryrun, 'http'))
+ self.assertTrue(RunTest.has_test_of_type(batch_tests_dryrun, 'websocket'))
- batch_tests_run_no_http = get_tests_run(['--no-http', 'LayoutTests/http', 'websocket/'], flatten_batches=True)
- self.assertFalse(MainTest.has_test_of_type(batch_tests_run_no_http, 'http'))
- self.assertFalse(MainTest.has_test_of_type(batch_tests_run_no_http, 'websocket'))
+ batch_tests_run_no_http = get_tests_run(['--no-http', 'LayoutTests/http', 'websocket/'])
+ self.assertFalse(RunTest.has_test_of_type(batch_tests_run_no_http, 'http'))
+ self.assertFalse(RunTest.has_test_of_type(batch_tests_run_no_http, 'websocket'))
- batch_tests_run_http = get_tests_run(['--http', 'LayoutTests/http', 'websocket/'], flatten_batches=True)
- self.assertTrue(MainTest.has_test_of_type(batch_tests_run_http, 'http'))
- self.assertTrue(MainTest.has_test_of_type(batch_tests_run_http, 'websocket'))
+ batch_tests_run_http = get_tests_run(['--http', 'LayoutTests/http', 'websocket/'])
+ self.assertTrue(RunTest.has_test_of_type(batch_tests_run_http, 'http'))
+ self.assertTrue(RunTest.has_test_of_type(batch_tests_run_http, 'websocket'))
def test_platform_tests_are_found(self):
- tests_run = get_tests_run(['--platform', 'test-mac-leopard', 'http'], tests_included=True, flatten_batches=True)
+ tests_run = get_tests_run(['--platform', 'test-mac-leopard', 'http'])
self.assertTrue('platform/test-mac-leopard/http/test.html' in tests_run)
self.assertFalse('platform/test-win-win7/http/test.html' in tests_run)
@@ -939,8 +797,7 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
# Test to ensure that we don't generate -wdiff.html or -pretty.html if wdiff and PrettyPatch
# aren't available.
host = MockHost()
- res, out, err, _ = logging_run(['--pixel-tests', 'failures/unexpected/text-image-checksum.html'],
- tests_included=True, record_results=True, host=host)
+ _, err, _ = logging_run(['--pixel-tests', 'failures/unexpected/text-image-checksum.html'], tests_included=True, host=host)
written_files = host.filesystem.written_files
self.assertTrue(any(path.endswith('-diff.txt') for path in written_files.keys()))
self.assertFalse(any(path.endswith('-wdiff.html') for path in written_files.keys()))
@@ -952,19 +809,13 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
self.assertEqual(full_results['has_pretty_patch'], False)
def test_unsupported_platform(self):
- oc = outputcapture.OutputCapture()
- try:
- oc.capture_output()
- res = run_webkit_tests.main(['--platform', 'foo'])
- finally:
- stdout, stderr, logs = oc.restore_output()
+ stdout = StringIO.StringIO()
+ stderr = StringIO.StringIO()
+ res = run_webkit_tests.main(['--platform', 'foo'], stdout, stderr)
self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS)
- self.assertEqual(stdout, '')
- self.assertTrue('unsupported platform' in stderr)
-
- # This is empty because we don't even get a chance to configure the logger before failing.
- self.assertEqual(logs, '')
+ self.assertEqual(stdout.getvalue(), '')
+ self.assertTrue('unsupported platform' in stderr.getvalue())
def test_verbose_in_child_processes(self):
# When we actually run multiple processes, we may have to reconfigure logging in the
@@ -979,41 +830,22 @@ class MainTest(unittest.TestCase, StreamTestingMixin):
options, parsed_args = parse_args(['--verbose', '--fully-parallel', '--child-processes', '2', 'passes/text.html', 'passes/image.html'], tests_included=True, print_nothing=False)
host = MockHost()
port_obj = host.port_factory.get(port_name=options.platform, options=options)
- buildbot_output = StringIO.StringIO()
- regular_output = StringIO.StringIO()
- res = run_webkit_tests.run(port_obj, options, parsed_args, buildbot_output=buildbot_output, regular_output=regular_output)
- self.assertTrue('text.html passed' in regular_output.getvalue())
- self.assertTrue('image.html passed' in regular_output.getvalue())
+ logging_stream = StringIO.StringIO()
+ run_webkit_tests.run(port_obj, options, parsed_args, logging_stream=logging_stream)
+ self.assertTrue('text.html passed' in logging_stream.getvalue())
+ self.assertTrue('image.html passed' in logging_stream.getvalue())
class EndToEndTest(unittest.TestCase):
- def parse_full_results(self, full_results_text):
- json_to_eval = full_results_text.replace("ADD_RESULTS(", "").replace(");", "")
- compressed_results = json.loads(json_to_eval)
- return compressed_results
-
- def test_end_to_end(self):
- host = MockHost()
- res, out, err, user = logging_run(record_results=True, tests_included=True, host=host)
-
- self.assertEqual(res, unexpected_tests_count)
- results = self.parse_full_results(host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json'))
-
- # Check to ensure we're passing back image diff %age correctly.
- self.assertEqual(results['tests']['failures']['expected']['image.html']['image_diff_percent'], 1)
-
- # Check that we attempted to display the results page in a browser.
- self.assertTrue(user.opened_urls)
-
def test_reftest_with_two_notrefs(self):
# Test that we update expectations in place. If the expectation
# is missing, update the expected generic location.
host = MockHost()
- res, out, err, _ = logging_run(['--no-show-results', 'reftests/foo/'], tests_included=True, host=host, record_results=True)
+ _, _, _ = logging_run(['--no-show-results', 'reftests/foo/'], tests_included=True, host=host)
file_list = host.filesystem.written_files.keys()
- file_list.remove('/tmp/layout-test-results/tests_run0.txt')
+
json_string = host.filesystem.read_text_file('/tmp/layout-test-results/full_results.json')
- json = self.parse_full_results(json_string)
+ json = parse_full_results(json_string)
self.assertTrue("multiple-match-success.html" not in json["tests"]["reftests"]["foo"])
self.assertTrue("multiple-mismatch-success.html" not in json["tests"]["reftests"]["foo"])
self.assertTrue("multiple-both-success.html" not in json["tests"]["reftests"]["foo"])
@@ -1041,16 +873,12 @@ class RebaselineTest(unittest.TestCase, StreamTestingMixin):
# Test that we update expectations in place. If the expectation
# is missing, update the expected generic location.
host = MockHost()
- res, out, err, _ = logging_run(['--pixel-tests',
- '--reset-results',
- 'passes/image.html',
- 'failures/expected/missing_image.html'],
- tests_included=True, host=host, new_results=True)
+ details, err, _ = logging_run(
+ ['--pixel-tests', '--reset-results', 'passes/image.html', 'failures/expected/missing_image.html'],
+ tests_included=True, host=host, new_results=True)
file_list = host.filesystem.written_files.keys()
- file_list.remove('/tmp/layout-test-results/tests_run0.txt')
- self.assertEqual(res, 0)
- self.assertEmpty(out)
- self.assertEqual(len(file_list), 4)
+ self.assertEqual(details.exit_code, 0)
+ self.assertEqual(len(file_list), 8)
self.assertBaselines(file_list, "passes/image", [".txt", ".png"], err)
self.assertBaselines(file_list, "failures/expected/missing_image", [".txt", ".png"], err)
@@ -1058,17 +886,15 @@ class RebaselineTest(unittest.TestCase, StreamTestingMixin):
# Test that we update expectations in place. If the expectation
# is missing, update the expected generic location.
host = MockHost()
- res, out, err, _ = logging_run(['--no-show-results',
- 'failures/unexpected/missing_text.html',
- 'failures/unexpected/missing_image.html',
- 'failures/unexpected/missing_audio.html',
- 'failures/unexpected/missing_render_tree_dump.html'],
- tests_included=True, host=host, new_results=True)
+ details, err, _ = logging_run(['--no-show-results',
+ 'failures/unexpected/missing_text.html',
+ 'failures/unexpected/missing_image.html',
+ 'failures/unexpected/missing_audio.html',
+ 'failures/unexpected/missing_render_tree_dump.html'],
+ tests_included=True, host=host, new_results=True)
file_list = host.filesystem.written_files.keys()
- file_list.remove('/tmp/layout-test-results/tests_run0.txt')
- self.assertEqual(res, 0)
- self.assertNotEmpty(out)
- self.assertEqual(len(file_list), 6)
+ self.assertEqual(details.exit_code, 0)
+ self.assertEqual(len(file_list), 10)
self.assertBaselines(file_list, "failures/unexpected/missing_text", [".txt"], err)
self.assertBaselines(file_list, "platform/test/failures/unexpected/missing_image", [".png"], err)
self.assertBaselines(file_list, "platform/test/failures/unexpected/missing_render_tree_dump", [".txt"], err)
@@ -1077,16 +903,12 @@ class RebaselineTest(unittest.TestCase, StreamTestingMixin):
# Test that we update the platform expectations in the version-specific directories
# for both existing and new baselines.
host = MockHost()
- res, out, err, _ = logging_run(['--pixel-tests',
- '--new-baseline',
- 'passes/image.html',
- 'failures/expected/missing_image.html'],
- tests_included=True, host=host, new_results=True)
+ details, err, _ = logging_run(
+ ['--pixel-tests', '--new-baseline', 'passes/image.html', 'failures/expected/missing_image.html'],
+ tests_included=True, host=host, new_results=True)
file_list = host.filesystem.written_files.keys()
- file_list.remove('/tmp/layout-test-results/tests_run0.txt')
- self.assertEqual(res, 0)
- self.assertEmpty(out)
- self.assertEqual(len(file_list), 4)
+ self.assertEqual(details.exit_code, 0)
+ self.assertEqual(len(file_list), 8)
self.assertBaselines(file_list,
"platform/test-mac-leopard/passes/image", [".txt", ".png"], err)
self.assertBaselines(file_list,
@@ -1109,5 +931,38 @@ class PortTest(unittest.TestCase):
def disabled_test_mac_lion(self):
self.assert_mock_port_works('mac-lion')
-if __name__ == '__main__':
- unittest.main()
+
+class MainTest(unittest.TestCase):
+ def test_exception_handling(self):
+ orig_run_fn = run_webkit_tests.run
+
+ # unused args pylint: disable=W0613
+ def interrupting_run(port, options, args, stderr):
+ raise KeyboardInterrupt
+
+ def successful_run(port, options, args, stderr):
+
+ class FakeRunDetails(object):
+ exit_code = -1
+
+ return FakeRunDetails()
+
+ def exception_raising_run(port, options, args, stderr):
+ assert False
+
+ stdout = StringIO.StringIO()
+ stderr = StringIO.StringIO()
+ try:
+ run_webkit_tests.run = interrupting_run
+ res = run_webkit_tests.main([], stdout, stderr)
+ self.assertEqual(res, run_webkit_tests.INTERRUPTED_EXIT_STATUS)
+
+ run_webkit_tests.run = successful_run
+ res = run_webkit_tests.main(['--platform', 'test'], stdout, stderr)
+ self.assertEqual(res, -1)
+
+ run_webkit_tests.run = exception_raising_run
+ res = run_webkit_tests.main([], stdout, stderr)
+ self.assertEqual(res, run_webkit_tests.EXCEPTIONAL_EXIT_STATUS)
+ finally:
+ run_webkit_tests.run = orig_run_fn
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
index 7dede92a6..eb64d8299 100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py
index f3ca6a1a8..5b4ffa79a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/apache_http_server_unittest.py
@@ -28,12 +28,12 @@
import re
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive_mock import MockExecutive
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.host_mock import MockHost
-from webkitpy.layout_tests.port import test
+from webkitpy.port import test
from webkitpy.layout_tests.servers.apache_http_server import LayoutTestApacheHttpd
from webkitpy.layout_tests.servers.http_server_base import ServerError
@@ -64,7 +64,7 @@ class TestLayoutTestApacheHttpd(unittest.TestCase):
server.stop()
finally:
_, _, logs = oc.restore_output()
- self.assertTrue("StartServers 4" in logs)
- self.assertTrue("MinSpareServers 4" in logs)
- self.assertTrue("MaxSpareServers 4" in logs)
+ self.assertIn("StartServers 4", logs)
+ self.assertIn("MinSpareServers 4", logs)
+ self.assertIn("MaxSpareServers 4", logs)
self.assertTrue(host.filesystem.exists("/mock/output_dir/httpd.conf"))
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py b/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py
index 107c242c6..604f76b89 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -215,6 +214,15 @@ class Lighttpd(http_server_base.HttpServerBase):
def _check_and_kill(self):
if self._executive.check_running_pid(self._pid):
- self._executive.kill_process(self._pid)
+ host = self._port_obj.host
+ if host.platform.is_win() and not host.platform.is_cygwin():
+ # FIXME: https://bugs.webkit.org/show_bug.cgi?id=106838
+ # We need to kill all of the child processes as well as the
+ # parent, so we can't use executive.kill_process().
+ #
+ # If this is actually working, we should figure out a clean API.
+ self._executive.run_command(["taskkill.exe", "/f", "/t", "/pid", self._pid], error_handler=self._executive.ignore_error)
+ else:
+ self._executive.kill_process(self._pid)
return False
return True
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py
index 6a0ce58b0..3ce15a568 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -76,8 +75,12 @@ class HttpServerBase(object):
# Stop any stale servers left over from previous instances.
if self._filesystem.exists(self._pid_file):
- self._pid = int(self._filesystem.read_text_file(self._pid_file))
- self._stop_running_server()
+ try:
+ self._pid = int(self._filesystem.read_text_file(self._pid_file))
+ self._stop_running_server()
+ except (ValueError, UnicodeDecodeError):
+ # These could be raised if the pid file is corrupt.
+ self._remove_pid_file()
self._pid = None
self._remove_stale_logs()
@@ -95,29 +98,37 @@ class HttpServerBase(object):
def stop(self):
"""Stops the server. Stopping a server that isn't started is harmless."""
actual_pid = None
- if self._filesystem.exists(self._pid_file):
- actual_pid = int(self._filesystem.read_text_file(self._pid_file))
+ try:
+ if self._filesystem.exists(self._pid_file):
+ try:
+ actual_pid = int(self._filesystem.read_text_file(self._pid_file))
+ except (ValueError, UnicodeDecodeError):
+ # These could be raised if the pid file is corrupt.
+ pass
+ if not self._pid:
+ self._pid = actual_pid
+
if not self._pid:
- self._pid = actual_pid
-
- if not self._pid:
- return
-
- if not actual_pid:
- _log.warning('Failed to stop %s: pid file is missing' % self._name)
- return
- if self._pid != actual_pid:
- _log.warning('Failed to stop %s: pid file contains %d, not %d' %
- (self._name, actual_pid, self._pid))
- # Try to kill the existing pid, anyway, in case it got orphaned.
- self._executive.kill_process(self._pid)
+ return
+
+ if not actual_pid:
+ _log.warning('Failed to stop %s: pid file is missing' % self._name)
+ return
+ if self._pid != actual_pid:
+ _log.warning('Failed to stop %s: pid file contains %d, not %d' %
+ (self._name, actual_pid, self._pid))
+ # Try to kill the existing pid, anyway, in case it got orphaned.
+ self._executive.kill_process(self._pid)
+ self._pid = None
+ return
+
+ _log.debug("Attempting to shut down %s server at pid %d" % (self._name, self._pid))
+ self._stop_running_server()
+ _log.debug("%s server at pid %d stopped" % (self._name, self._pid))
self._pid = None
- return
-
- _log.debug("Attempting to shut down %s server at pid %d" % (self._name, self._pid))
- self._stop_running_server()
- _log.debug("%s server at pid %d stopped" % (self._name, self._pid))
- self._pid = None
+ finally:
+ # Make sure we delete the pid file no matter what happens.
+ self._remove_pid_file()
def _prepare_config(self):
"""This routine can be overridden by subclasses to do any sort
@@ -144,6 +155,10 @@ class HttpServerBase(object):
# Utility routines.
+ def _remove_pid_file(self):
+ if self._filesystem.exists(self._pid_file):
+ self._filesystem.remove(self._pid_file)
+
def _remove_log_files(self, folder, starts_with):
files = self._filesystem.listdir(folder)
for file in files:
@@ -194,7 +209,7 @@ class HttpServerBase(object):
except IOError, e:
if e.errno in (errno.EALREADY, errno.EADDRINUSE):
raise ServerError('Port %d is already in use.' % port)
- elif sys.platform == 'win32' and e.errno in (errno.WSAEACCES,): # pylint: disable-msg=E1101
+ elif sys.platform == 'win32' and e.errno in (errno.WSAEACCES,): # pylint: disable=E1101
raise ServerError('Port %d is already in use.' % port)
else:
raise
diff --git a/Tools/Scripts/make-gypi b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py
index cebac2745..2cf1d2cf0 100755..100644
--- a/Tools/Scripts/make-gypi
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py
@@ -1,5 +1,4 @@
-#!/usr/bin/env python
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (C) 2012 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
@@ -27,46 +26,33 @@
# (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
-import re
-import sys
+import unittest2 as unittest
-GYPI_TEMPLATE = """{
- 'variables': {
- '%s': [
-%s
- ]
- }
-}"""
+from webkitpy.common.host_mock import MockHost
+from webkitpy.port import test
+from webkitpy.layout_tests.servers.http_server_base import HttpServerBase
-def find_source_code():
- source_code_regexp = re.compile(r'\.(cpp|h|m|mm)$')
- collected_files = []
- for directory_path, directory_names, file_names in os.walk('.'):
- for file_name in file_names:
- if source_code_regexp.search(file_name):
- relative_path = os.path.join(directory_path, file_name)
- collected_files.append(os.path.relpath(relative_path, '.'))
+class TestHttpServerBase(unittest.TestCase):
+ def test_corrupt_pid_file(self):
+ # This tests that if the pid file is corrupt or invalid,
+ # both start() and stop() deal with it correctly and delete the file.
+ host = MockHost()
+ test_port = test.TestPort(host)
- return collected_files
+ server = HttpServerBase(test_port)
+ server._pid_file = '/tmp/pidfile'
+ server._spawn_process = lambda: 4
+ server._is_server_running_on_all_ports = lambda: True
-def build_file_line(file_name, indent):
- return indent + "'%s'," % file_name
+ host.filesystem.write_text_file(server._pid_file, 'foo')
+ server.stop()
+ self.assertEqual(host.filesystem.files[server._pid_file], None)
-def build_file_list(source_code, indent):
- return '\n'.join([build_file_line(file_name, indent) for file_name in sorted(source_code)])
+ host.filesystem.write_text_file(server._pid_file, 'foo')
+ server.start()
+ self.assertEqual(server._pid, 4)
-def build_gypi(project):
- key = project.lower() + '_files'
- value = build_file_list(find_source_code(), ' ' * 3)
- return GYPI_TEMPLATE % (key, value)
-
-def main():
- if len(sys.argv) < 2:
- print 'Usage: %s project_name' % sys.argv[0]
- return
- print build_gypi(sys.argv[1])
-
-if __name__ == "__main__":
- main()
+ # Note that the pid file would not be None if _spawn_process()
+ # was actually a real implementation.
+ self.assertEqual(host.filesystem.files[server._pid_file], None)
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py
index 37faa6429..aa6e59dc5 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_integrationtest.py
@@ -36,7 +36,7 @@ import socket
import subprocess
import sys
import tempfile
-import unittest
+import unittest2 as unittest
class BaseTest(unittest.TestCase):
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py
index 5cc4a6ee0..621838f00 100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/http_server_unittest.py
@@ -26,12 +26,12 @@
# (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 unittest
import re
import sys
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
-from webkitpy.layout_tests.port import test
+from webkitpy.port import test
from webkitpy.layout_tests.servers.http_server import Lighttpd
from webkitpy.layout_tests.servers.http_server_base import ServerError
@@ -62,3 +62,40 @@ class TestHttpServer(unittest.TestCase):
'alias.url += ( "/mock/another-additional-dir" => "/mock-checkout/one-additional-dir" )',
'alias.url += ( "/media-resources" => "/test.checkout/LayoutTests/media" )',
])
+
+ def test_win32_start_and_stop(self):
+ host = MockHost()
+ test_port = test.TestPort(host)
+ host.filesystem.write_text_file(
+ "/mock-checkout/Tools/Scripts/webkitpy/layout_tests/servers/lighttpd.conf", "Mock Config\n")
+ host.filesystem.write_text_file(
+ "/usr/lib/lighttpd/liblightcomp.dylib", "Mock dylib")
+
+ host.platform.is_win = lambda: True
+ host.platform.is_cygwin = lambda: False
+
+ server = Lighttpd(test_port, "/mock/output_dir",
+ additional_dirs={
+ "/mock/one-additional-dir": "/mock-checkout/one-additional-dir",
+ "/mock/another-additional-dir": "/mock-checkout/one-additional-dir"})
+ server._check_that_all_ports_are_available = lambda: True
+ server._is_server_running_on_all_ports = lambda: True
+
+ server.start()
+ self.assertNotEquals(host.executive.calls, [])
+
+ def wait_for_action(action):
+ if action():
+ return True
+ return action()
+
+ def mock_returns(return_values):
+ def return_value_thunk(*args, **kwargs):
+ return return_values.pop(0)
+ return return_value_thunk
+
+ host.executive.check_running_pid = mock_returns([True, False])
+ server._wait_for_action = wait_for_action
+
+ server.stop()
+ self.assertEqual(['taskkill.exe', '/f', '/t', '/pid', 42], host.executive.calls[1])
diff --git a/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py b/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py
index 93747f690..2ffdc321d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py
+++ b/Tools/Scripts/webkitpy/layout_tests/servers/websocket_server.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results.py b/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results.py
new file mode 100644
index 000000000..3191b84ea
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results.py
@@ -0,0 +1,167 @@
+#!/usr/bin/env python
+# Copyright (C) 2012 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.
+
+
+from webkitpy.layout_tests.models import test_expectations
+
+from webkitpy.common.net import resultsjsonparser
+
+
+TestExpectations = test_expectations.TestExpectations
+TestExpectationParser = test_expectations.TestExpectationParser
+
+
+class BuildBotPrinter(object):
+ # This output is parsed by buildbots and must only be changed in coordination with buildbot scripts (see webkit.org's
+ # Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg: RunWebKitTests._parseNewRunWebKitTestsOutput
+ # and chromium.org's buildbot/master.chromium/scripts/master/log_parser/webkit_test_command.py).
+
+ def __init__(self, stream, debug_logging):
+ self.stream = stream
+ self.debug_logging = debug_logging
+
+ def print_results(self, run_details):
+ if self.debug_logging:
+ self.print_run_results(run_details.initial_results)
+ self.print_unexpected_results(run_details.summarized_results, run_details.enabled_pixel_tests_in_retry)
+
+ def _print(self, msg):
+ self.stream.write(msg + '\n')
+
+ def print_run_results(self, run_results):
+ failed = run_results.total_failures
+ total = run_results.total
+ passed = total - failed - run_results.remaining
+ percent_passed = 0.0
+ if total > 0:
+ percent_passed = float(passed) * 100 / total
+
+ self._print("=> Results: %d/%d tests passed (%.1f%%)" % (passed, total, percent_passed))
+ self._print("")
+ self._print_run_results_entry(run_results, test_expectations.NOW, "Tests to be fixed")
+
+ self._print("")
+ # FIXME: We should be skipping anything marked WONTFIX, so we shouldn't bother logging these stats.
+ self._print_run_results_entry(run_results, test_expectations.WONTFIX,
+ "Tests that will only be fixed if they crash (WONTFIX)")
+ self._print("")
+
+ def _print_run_results_entry(self, run_results, timeline, heading):
+ total = len(run_results.tests_by_timeline[timeline])
+ not_passing = (total -
+ len(run_results.tests_by_expectation[test_expectations.PASS] &
+ run_results.tests_by_timeline[timeline]))
+ self._print("=> %s (%d):" % (heading, not_passing))
+
+ for result in TestExpectations.EXPECTATION_ORDER:
+ if result in (test_expectations.PASS, test_expectations.SKIP):
+ continue
+ results = (run_results.tests_by_expectation[result] & run_results.tests_by_timeline[timeline])
+ desc = TestExpectations.EXPECTATION_DESCRIPTIONS[result]
+ if not_passing and len(results):
+ pct = len(results) * 100.0 / not_passing
+ self._print(" %5d %-24s (%4.1f%%)" % (len(results), desc, pct))
+
+ def print_unexpected_results(self, summarized_results, enabled_pixel_tests_in_retry=False):
+ passes = {}
+ flaky = {}
+ regressions = {}
+
+ def add_to_dict_of_lists(dict, key, value):
+ dict.setdefault(key, []).append(value)
+
+ def add_result(test, results, passes=passes, flaky=flaky, regressions=regressions):
+ actual = results['actual'].split(" ")
+ expected = results['expected'].split(" ")
+
+ def is_expected(result):
+ return (result in expected) or (result in ('AUDIO', 'TEXT', 'IMAGE+TEXT') and 'FAIL' in expected)
+
+ if all(is_expected(actual_result) for actual_result in actual):
+ # Don't print anything for tests that ran as expected.
+ return
+
+ if actual == ['PASS']:
+ if 'CRASH' in expected:
+ add_to_dict_of_lists(passes, 'Expected to crash, but passed', test)
+ elif 'TIMEOUT' in expected:
+ add_to_dict_of_lists(passes, 'Expected to timeout, but passed', test)
+ else:
+ add_to_dict_of_lists(passes, 'Expected to fail, but passed', test)
+ elif enabled_pixel_tests_in_retry and actual == ['TEXT', 'IMAGE+TEXT']:
+ add_to_dict_of_lists(regressions, actual[0], test)
+ elif len(actual) > 1:
+ # We group flaky tests by the first actual result we got.
+ add_to_dict_of_lists(flaky, actual[0], test)
+ else:
+ add_to_dict_of_lists(regressions, results['actual'], test)
+
+ resultsjsonparser.for_each_test(summarized_results['tests'], add_result)
+
+ if len(passes) or len(flaky) or len(regressions):
+ self._print("")
+ if len(passes):
+ for key, tests in passes.iteritems():
+ self._print("%s: (%d)" % (key, len(tests)))
+ tests.sort()
+ for test in tests:
+ self._print(" %s" % test)
+ self._print("")
+ self._print("")
+
+ if len(flaky):
+ descriptions = TestExpectations.EXPECTATION_DESCRIPTIONS
+ for key, tests in flaky.iteritems():
+ result = TestExpectations.EXPECTATIONS[key.lower()]
+ self._print("Unexpected flakiness: %s (%d)" % (descriptions[result], len(tests)))
+ tests.sort()
+
+ for test in tests:
+ result = resultsjsonparser.result_for_test(summarized_results['tests'], test)
+ actual = result['actual'].split(" ")
+ expected = result['expected'].split(" ")
+ result = TestExpectations.EXPECTATIONS[key.lower()]
+ # FIXME: clean this up once the old syntax is gone
+ new_expectations_list = [TestExpectationParser._inverted_expectation_tokens[exp] for exp in list(set(actual) | set(expected))]
+ self._print(" %s [ %s ]" % (test, " ".join(new_expectations_list)))
+ self._print("")
+ self._print("")
+
+ if len(regressions):
+ descriptions = TestExpectations.EXPECTATION_DESCRIPTIONS
+ for key, tests in regressions.iteritems():
+ result = TestExpectations.EXPECTATIONS[key.lower()]
+ self._print("Regressions: Unexpected %s (%d)" % (descriptions[result], len(tests)))
+ tests.sort()
+ for test in tests:
+ self._print(" %s [ %s ]" % (test, TestExpectationParser._inverted_expectation_tokens[key]))
+ self._print("")
+
+ if len(summarized_results['tests']) and self.debug_logging:
+ self._print("%s" % ("-" * 78))
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py b/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py
new file mode 100644
index 000000000..5ce15c1dc
--- /dev/null
+++ b/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+# Copyright (C) 2012 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 StringIO
+import unittest2 as unittest
+
+from webkitpy.common.host_mock import MockHost
+
+from webkitpy.layout_tests.models import test_expectations
+from webkitpy.layout_tests.models import test_failures
+from webkitpy.layout_tests.models import test_run_results
+from webkitpy.layout_tests.models import test_run_results
+from webkitpy.layout_tests.models import test_run_results_unittest
+from webkitpy.layout_tests.views import buildbot_results
+
+
+class BuildBotPrinterTests(unittest.TestCase):
+ def assertEmpty(self, stream):
+ self.assertFalse(stream.getvalue())
+
+ def assertNotEmpty(self, stream):
+ self.assertTrue(stream.getvalue())
+
+ def get_printer(self):
+ stream = StringIO.StringIO()
+ printer = buildbot_results.BuildBotPrinter(stream, debug_logging=True)
+ return printer, stream
+
+ def test_print_unexpected_results(self):
+ port = MockHost().port_factory.get('test')
+ printer, out = self.get_printer()
+
+ # test everything running as expected
+ DASHED_LINE = "-" * 78 + "\n"
+ summary = test_run_results_unittest.summarized_results(port, expected=True, passing=False, flaky=False)
+ printer.print_unexpected_results(summary)
+ self.assertEqual(out.getvalue(), DASHED_LINE)
+
+ # test failures
+ printer, out = self.get_printer()
+ summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=False)
+ printer.print_unexpected_results(summary)
+ self.assertNotEmpty(out)
+
+ # test unexpected flaky
+ printer, out = self.get_printer()
+ summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=True)
+ printer.print_unexpected_results(summary)
+ self.assertNotEmpty(out)
+
+ printer, out = self.get_printer()
+ summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=False)
+ printer.print_unexpected_results(summary)
+ self.assertNotEmpty(out)
+
+ printer, out = self.get_printer()
+ summary = test_run_results_unittest.summarized_results(port, expected=False, passing=False, flaky=False)
+ printer.print_unexpected_results(summary)
+ self.assertNotEmpty(out)
+
+ printer, out = self.get_printer()
+ summary = test_run_results_unittest.summarized_results(port, expected=False, passing=True, flaky=False)
+ printer.print_unexpected_results(summary)
+ self.assertNotEmpty(out)
+
+ def test_print_results(self):
+ port = MockHost().port_factory.get('test')
+ printer, out = self.get_printer()
+ initial_results = test_run_results_unittest.run_results(port)
+ summary = test_run_results_unittest.summarized_results(port, expected=False, passing=True, flaky=False)
+ details = test_run_results.RunDetails(summary['num_regressions'], summary, initial_results, None)
+ printer.print_results(details)
+ self.assertNotEmpty(out)
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py b/Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py
index acea93ea4..fd04ad868 100644
--- a/Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py
+++ b/Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010, 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py b/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py
index 6620cbb04..0eaec2db9 100644
--- a/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010, 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -30,7 +29,7 @@
import logging
import re
import StringIO
-import unittest
+import unittest2 as unittest
from webkitpy.layout_tests.views.metered_stream import MeteredStream
@@ -152,7 +151,3 @@ class VerboseTest(RegularTest):
self.logger.info('foo %s %d', 'bar', 2)
self.assertEqual(len(self.buflist), 1)
self.assertTrue(self.buflist[0].endswith('foo bar 2\n'))
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/printing.py b/Tools/Scripts/webkitpy/layout_tests/views/printing.py
index b7a9195a8..9a9caa589 100644
--- a/Tools/Scripts/webkitpy/layout_tests/views/printing.py
+++ b/Tools/Scripts/webkitpy/layout_tests/views/printing.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010, 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -33,7 +32,6 @@ import math
import optparse
from webkitpy.tool import grammar
-from webkitpy.common.net import resultsjsonparser
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models.test_expectations import TestExpectations, TestExpectationParser
from webkitpy.layout_tests.views.metered_stream import MeteredStream
@@ -56,23 +54,13 @@ def print_options():
class Printer(object):
- """Class handling all non-debug-logging printing done by run-webkit-tests.
-
- Printing from run-webkit-tests falls into two buckets: general or
- regular output that is read only by humans and can be changed at any
- time, and output that is parsed by buildbots (and humans) and hence
- must be changed more carefully and in coordination with the buildbot
- parsing code (in chromium.org's buildbot/master.chromium/scripts/master/
- log_parser/webkit_test_command.py script).
-
- By default the buildbot-parsed code gets logged to stdout, and regular
- output gets logged to stderr."""
- def __init__(self, port, options, regular_output, buildbot_output, logger=None):
- self.num_completed = 0
+ """Class handling all non-debug-logging printing done by run-webkit-tests."""
+
+ def __init__(self, port, options, regular_output, logger=None):
+ self.num_started = 0
self.num_tests = 0
self._port = port
self._options = options
- self._buildbot_stream = buildbot_output
self._meter = MeteredStream(regular_output, options.debug_rwt_logging, logger=logger,
number_of_columns=self._port.host.platform.terminal_width())
self._running_tests = []
@@ -110,32 +98,32 @@ class Printer(object):
self._print_default('')
def print_found(self, num_all_test_files, num_to_run, repeat_each, iterations):
- num_unique_tests = num_to_run / (repeat_each * iterations)
- found_str = 'Found %s; running %d' % (grammar.pluralize('test', num_all_test_files), num_unique_tests)
+ found_str = 'Found %s; running %d' % (grammar.pluralize('test', num_all_test_files), num_to_run)
if repeat_each * iterations > 1:
found_str += ' (%d times each: --repeat-each=%d --iterations=%d)' % (repeat_each * iterations, repeat_each, iterations)
- found_str += ', skipping %d' % (num_all_test_files - num_unique_tests)
+ found_str += ', skipping %d' % (num_all_test_files - num_to_run)
self._print_default(found_str + '.')
- def print_expected(self, result_summary, tests_with_result_type_callback):
- self._print_expected_results_of_type(result_summary, test_expectations.PASS, "passes", tests_with_result_type_callback)
- self._print_expected_results_of_type(result_summary, test_expectations.FAIL, "failures", tests_with_result_type_callback)
- self._print_expected_results_of_type(result_summary, test_expectations.FLAKY, "flaky", tests_with_result_type_callback)
+ def print_expected(self, run_results, tests_with_result_type_callback):
+ self._print_expected_results_of_type(run_results, test_expectations.PASS, "passes", tests_with_result_type_callback)
+ self._print_expected_results_of_type(run_results, test_expectations.FAIL, "failures", tests_with_result_type_callback)
+ self._print_expected_results_of_type(run_results, test_expectations.FLAKY, "flaky", tests_with_result_type_callback)
self._print_debug('')
def print_workers_and_shards(self, num_workers, num_shards, num_locked_shards):
driver_name = self._port.driver_name()
if num_workers == 1:
- self._print_default("Running 1 %s over %s." % (driver_name, grammar.pluralize('shard', num_shards)))
+ self._print_default("Running 1 %s." % driver_name)
+ self._print_debug("(%s)." % grammar.pluralize('shard', num_shards))
else:
- self._print_default("Running %d %ss in parallel over %d shards (%d locked)." %
- (num_workers, driver_name, num_shards, num_locked_shards))
+ self._print_default("Running %d %ss in parallel." % (num_workers, driver_name))
+ self._print_debug("(%d shards; %d locked)." % (num_shards, num_locked_shards))
self._print_default('')
- def _print_expected_results_of_type(self, result_summary, result_type, result_type_str, tests_with_result_type_callback):
+ def _print_expected_results_of_type(self, run_results, result_type, result_type_str, tests_with_result_type_callback):
tests = tests_with_result_type_callback(result_type)
- now = result_summary.tests_by_timeline[test_expectations.NOW]
- wontfix = result_summary.tests_by_timeline[test_expectations.WONTFIX]
+ now = run_results.tests_by_timeline[test_expectations.NOW]
+ wontfix = run_results.tests_by_timeline[test_expectations.WONTFIX]
# We use a fancy format string in order to print the data out in a
# nicely-aligned table.
@@ -149,39 +137,45 @@ class Printer(object):
ndigits = int(math.log10(len(num))) + 1
return ndigits
- def print_results(self, run_time, thread_timings, test_timings, individual_test_timings, result_summary, unexpected_results):
- self._print_timing_statistics(run_time, thread_timings, test_timings, individual_test_timings, result_summary)
- self._print_result_summary(result_summary)
- self._print_one_line_summary(result_summary.total - result_summary.expected_skips,
- result_summary.expected - result_summary.expected_skips,
- result_summary.unexpected)
- self._print_unexpected_results(unexpected_results)
-
- def _print_timing_statistics(self, total_time, thread_timings,
- directory_test_timings, individual_test_timings,
- result_summary):
+ def print_results(self, run_time, run_results, summarized_results):
+ self._print_timing_statistics(run_time, run_results)
+ self._print_one_line_summary(run_results.total - run_results.expected_skips,
+ run_results.expected - run_results.expected_skips,
+ run_results.unexpected)
+
+ def _print_timing_statistics(self, total_time, run_results):
self._print_debug("Test timing:")
self._print_debug(" %6.2f total testing time" % total_time)
self._print_debug("")
+
+ self._print_worker_statistics(run_results, int(self._options.child_processes))
+ self._print_aggregate_test_statistics(run_results)
+ self._print_individual_test_times(run_results)
+ self._print_directory_timings(run_results)
+
+ def _print_worker_statistics(self, run_results, num_workers):
self._print_debug("Thread timing:")
+ stats = {}
cuml_time = 0
- for t in thread_timings:
- self._print_debug(" %10s: %5d tests, %6.2f secs" % (t['name'], t['num_tests'], t['total_time']))
- cuml_time += t['total_time']
- self._print_debug(" %6.2f cumulative, %6.2f optimal" % (cuml_time, cuml_time / int(self._options.child_processes)))
+ for result in run_results.results_by_name.values():
+ stats.setdefault(result.worker_name, {'num_tests': 0, 'total_time': 0})
+ stats[result.worker_name]['num_tests'] += 1
+ stats[result.worker_name]['total_time'] += result.total_run_time
+ cuml_time += result.total_run_time
+
+ for worker_name in stats:
+ self._print_debug(" %10s: %5d tests, %6.2f secs" % (worker_name, stats[worker_name]['num_tests'], stats[worker_name]['total_time']))
+ self._print_debug(" %6.2f cumulative, %6.2f optimal" % (cuml_time, cuml_time / num_workers))
self._print_debug("")
- self._print_aggregate_test_statistics(individual_test_timings)
- self._print_individual_test_times(individual_test_timings, result_summary)
- self._print_directory_timings(directory_test_timings)
-
- def _print_aggregate_test_statistics(self, individual_test_timings):
- times_for_dump_render_tree = [test_stats.test_run_time for test_stats in individual_test_timings]
+ def _print_aggregate_test_statistics(self, run_results):
+ times_for_dump_render_tree = [result.test_run_time for result in run_results.results_by_name.values()]
self._print_statistics_for_test_timings("PER TEST TIME IN TESTSHELL (seconds):", times_for_dump_render_tree)
- def _print_individual_test_times(self, individual_test_timings, result_summary):
+ def _print_individual_test_times(self, run_results):
# Reverse-sort by the time spent in DumpRenderTree.
- individual_test_timings.sort(lambda a, b: cmp(b.test_run_time, a.test_run_time))
+
+ individual_test_timings = sorted(run_results.results_by_name.values(), key=lambda result: result.test_run_time, reverse=True)
num_printed = 0
slow_tests = []
timeout_or_crash_tests = []
@@ -189,12 +183,12 @@ class Printer(object):
for test_tuple in individual_test_timings:
test_name = test_tuple.test_name
is_timeout_crash_or_slow = False
- if test_name in result_summary.slow_tests:
+ if test_name in run_results.slow_tests:
is_timeout_crash_or_slow = True
slow_tests.append(test_tuple)
- if test_name in result_summary.failures:
- result = result_summary.results[test_name].type
+ if test_name in run_results.failures_by_name:
+ result = run_results.results_by_name[test_name].type
if (result == test_expectations.TIMEOUT or
result == test_expectations.CRASH):
is_timeout_crash_or_slow = True
@@ -219,18 +213,23 @@ class Printer(object):
test_run_time = round(test_tuple.test_run_time, 1)
self._print_debug(" %s took %s seconds" % (test_tuple.test_name, test_run_time))
- def _print_directory_timings(self, directory_test_timings):
+ def _print_directory_timings(self, run_results):
+ stats = {}
+ for result in run_results.results_by_name.values():
+ stats.setdefault(result.shard_name, {'num_tests': 0, 'total_time': 0})
+ stats[result.shard_name]['num_tests'] += 1
+ stats[result.shard_name]['total_time'] += result.total_run_time
+
timings = []
- for directory in directory_test_timings:
- num_tests, time_for_directory = directory_test_timings[directory]
- timings.append((round(time_for_directory, 1), directory, num_tests))
+ for directory in stats:
+ timings.append((directory, round(stats[directory]['total_time'], 1), stats[directory]['num_tests']))
timings.sort()
self._print_debug("Time to process slowest subdirectories:")
min_seconds_to_print = 10
for timing in timings:
if timing[0] > min_seconds_to_print:
- self._print_debug(" %s took %s seconds to run %s tests." % (timing[1], timing[0], timing[2]))
+ self._print_debug(" %s took %s seconds to run %s tests." % timing)
self._print_debug("")
def _print_statistics_for_test_timings(self, title, timings):
@@ -263,44 +262,6 @@ class Printer(object):
self._print_debug(" Standard dev: %6.3f" % std_deviation)
self._print_debug("")
- def _print_result_summary(self, result_summary):
- if not self._options.debug_rwt_logging:
- return
-
- failed = result_summary.total_failures
- total = result_summary.total - result_summary.expected_skips
- passed = total - failed - result_summary.remaining
- pct_passed = 0.0
- if total > 0:
- pct_passed = float(passed) * 100 / total
-
- self._print_for_bot("=> Results: %d/%d tests passed (%.1f%%)" % (passed, total, pct_passed))
- self._print_for_bot("")
- self._print_result_summary_entry(result_summary, test_expectations.NOW, "Tests to be fixed")
-
- self._print_for_bot("")
- # FIXME: We should be skipping anything marked WONTFIX, so we shouldn't bother logging these stats.
- self._print_result_summary_entry(result_summary, test_expectations.WONTFIX,
- "Tests that will only be fixed if they crash (WONTFIX)")
- self._print_for_bot("")
-
- def _print_result_summary_entry(self, result_summary, timeline, heading):
- total = len(result_summary.tests_by_timeline[timeline])
- not_passing = (total -
- len(result_summary.tests_by_expectation[test_expectations.PASS] &
- result_summary.tests_by_timeline[timeline]))
- self._print_for_bot("=> %s (%d):" % (heading, not_passing))
-
- for result in TestExpectations.EXPECTATION_ORDER:
- if result in (test_expectations.PASS, test_expectations.SKIP):
- continue
- results = (result_summary.tests_by_expectation[result] &
- result_summary.tests_by_timeline[timeline])
- desc = TestExpectations.EXPECTATION_DESCRIPTIONS[result]
- if not_passing and len(results):
- pct = len(results) * 100.0 / not_passing
- self._print_for_bot(" %5d %-24s (%4.1f%%)" % (len(results), desc, pct))
-
def _print_one_line_summary(self, total, expected, unexpected):
incomplete = total - expected - unexpected
incomplete_str = ''
@@ -328,7 +289,7 @@ class Printer(object):
def _test_status_line(self, test_name, suffix):
format_string = '[%d/%d] %s%s'
- status_line = format_string % (self.num_completed, self.num_tests, test_name, suffix)
+ status_line = format_string % (self.num_started, self.num_tests, test_name, suffix)
if len(status_line) > self._meter.number_of_columns():
overflow_columns = len(status_line) - self._meter.number_of_columns()
ellipsis = '...'
@@ -340,9 +301,10 @@ class Printer(object):
new_length = len(test_name) - overflow_columns - len(ellipsis)
prefix = int(new_length / 2)
test_name = test_name[:prefix] + ellipsis + test_name[-(new_length - prefix):]
- return format_string % (self.num_completed, self.num_tests, test_name, suffix)
+ return format_string % (self.num_started, self.num_tests, test_name, suffix)
def print_started_test(self, test_name):
+ self.num_started += 1
self._running_tests.append(test_name)
if len(self._running_tests) > 1:
suffix = ' (+%d)' % (len(self._running_tests) - 1)
@@ -355,7 +317,6 @@ class Printer(object):
write(self._test_status_line(test_name, suffix))
def print_finished_test(self, result, expected, exp_str, got_str):
- self.num_completed += 1
test_name = result.test_name
result_message = self._result_message(result.type, result.failures, expected, self._options.verbose)
@@ -364,7 +325,7 @@ class Printer(object):
self._print_test_trace(result, exp_str, got_str)
elif (self._options.verbose and not self._options.debug_rwt_logging) or not expected:
self.writeln(self._test_status_line(test_name, result_message))
- elif self.num_completed == self.num_tests:
+ elif self.num_started == self.num_tests:
self._meter.write_update('')
else:
if test_name == self._running_tests[0]:
@@ -411,75 +372,6 @@ class Printer(object):
relpath = '<none>'
self._print_default(' %s: %s' % (extension[1:], relpath))
- def _print_unexpected_results(self, unexpected_results):
- # Prints to the buildbot stream
- passes = {}
- flaky = {}
- regressions = {}
-
- def add_to_dict_of_lists(dict, key, value):
- dict.setdefault(key, []).append(value)
-
- def add_result(test, results, passes=passes, flaky=flaky, regressions=regressions):
- actual = results['actual'].split(" ")
- expected = results['expected'].split(" ")
- if actual == ['PASS']:
- if 'CRASH' in expected:
- add_to_dict_of_lists(passes, 'Expected to crash, but passed', test)
- elif 'TIMEOUT' in expected:
- add_to_dict_of_lists(passes, 'Expected to timeout, but passed', test)
- else:
- add_to_dict_of_lists(passes, 'Expected to fail, but passed', test)
- elif len(actual) > 1:
- # We group flaky tests by the first actual result we got.
- add_to_dict_of_lists(flaky, actual[0], test)
- else:
- add_to_dict_of_lists(regressions, results['actual'], test)
-
- resultsjsonparser.for_each_test(unexpected_results['tests'], add_result)
-
- if len(passes) or len(flaky) or len(regressions):
- self._print_for_bot("")
- if len(passes):
- for key, tests in passes.iteritems():
- self._print_for_bot("%s: (%d)" % (key, len(tests)))
- tests.sort()
- for test in tests:
- self._print_for_bot(" %s" % test)
- self._print_for_bot("")
- self._print_for_bot("")
-
- if len(flaky):
- descriptions = TestExpectations.EXPECTATION_DESCRIPTIONS
- for key, tests in flaky.iteritems():
- result = TestExpectations.EXPECTATIONS[key.lower()]
- self._print_for_bot("Unexpected flakiness: %s (%d)" % (descriptions[result], len(tests)))
- tests.sort()
-
- for test in tests:
- result = resultsjsonparser.result_for_test(unexpected_results['tests'], test)
- actual = result['actual'].split(" ")
- expected = result['expected'].split(" ")
- result = TestExpectations.EXPECTATIONS[key.lower()]
- # FIXME: clean this up once the old syntax is gone
- new_expectations_list = [TestExpectationParser._inverted_expectation_tokens[exp] for exp in list(set(actual) | set(expected))]
- self._print_for_bot(" %s [ %s ]" % (test, " ".join(new_expectations_list)))
- self._print_for_bot("")
- self._print_for_bot("")
-
- if len(regressions):
- descriptions = TestExpectations.EXPECTATION_DESCRIPTIONS
- for key, tests in regressions.iteritems():
- result = TestExpectations.EXPECTATIONS[key.lower()]
- self._print_for_bot("Regressions: Unexpected %s (%d)" % (descriptions[result], len(tests)))
- tests.sort()
- for test in tests:
- self._print_for_bot(" %s [ %s ]" % (test, TestExpectationParser._inverted_expectation_tokens[key]))
- self._print_for_bot("")
-
- if len(unexpected_results['tests']) and self._options.debug_rwt_logging:
- self._print_for_bot("%s" % ("-" * 78))
-
def _print_quiet(self, msg):
self.writeln(msg)
@@ -491,9 +383,6 @@ class Printer(object):
if self._options.debug_rwt_logging:
self.writeln(msg)
- def _print_for_bot(self, msg):
- self._buildbot_stream.write(msg + "\n")
-
def write_update(self, msg):
self._meter.write_update(msg)
diff --git a/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py b/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
index c0b928b0c..d65cc5e12 100644
--- a/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/views/printing_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010, 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -33,14 +32,13 @@ import optparse
import StringIO
import sys
import time
-import unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.common.system import logtesting
-from webkitpy.layout_tests import port
+from webkitpy import port
from webkitpy.layout_tests.controllers import manager
-from webkitpy.layout_tests.models import result_summary
from webkitpy.layout_tests.models import test_expectations
from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models import test_results
@@ -56,7 +54,7 @@ def get_options(args):
class TestUtilityFunctions(unittest.TestCase):
def test_print_options(self):
options, args = get_options([])
- self.assertTrue(options is not None)
+ self.assertIsNotNone(options)
class Testprinter(unittest.TestCase):
@@ -83,9 +81,8 @@ class Testprinter(unittest.TestCase):
nproc = 2
regular_output = StringIO.StringIO()
- buildbot_output = StringIO.StringIO()
- printer = printing.Printer(self._port, options, regular_output, buildbot_output)
- return printer, regular_output, buildbot_output
+ printer = printing.Printer(self._port, options, regular_output)
+ return printer, regular_output
def get_result(self, test_name, result_type=test_expectations.PASS, run_time=0):
failures = []
@@ -95,168 +92,59 @@ class Testprinter(unittest.TestCase):
failures = [test_failures.FailureCrash()]
return test_results.TestResult(test_name, failures=failures, test_run_time=run_time)
- def get_result_summary(self, test_names, expectations_str):
- port.test_expectations = lambda: expectations_str
- port.test_expectations_overrides = lambda: None
- expectations = test_expectations.TestExpectations(self._port, test_names)
-
- rs = result_summary.ResultSummary(expectations, test_names, 1, set())
- return test_names, rs, expectations
-
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()
+ printer, err = self.get_printer()
printer.cleanup()
printer.cleanup()
printer = None
def test_print_config(self):
- printer, err, out = self.get_printer()
+ printer, err = self.get_printer()
# FIXME: it's lame that i have to set these options directly.
printer._options.pixel_tests = True
printer._options.new_baseline = True
printer._options.time_out_ms = 6000
printer._options.slow_time_out_ms = 12000
printer.print_config('/tmp')
- self.assertTrue("Using port 'test-mac-leopard'" in err.getvalue())
- self.assertTrue('Test configuration: <leopard, x86, release>' in err.getvalue())
- self.assertTrue('Placing test results in /tmp' in err.getvalue())
- self.assertTrue('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic' in err.getvalue())
- self.assertTrue('Using Release build' in err.getvalue())
- self.assertTrue('Pixel tests enabled' in err.getvalue())
- self.assertTrue('Command line:' in err.getvalue())
- self.assertTrue('Regular timeout: ' in err.getvalue())
+ self.assertIn("Using port 'test-mac-leopard'", err.getvalue())
+ self.assertIn('Test configuration: <leopard, x86, release>', err.getvalue())
+ self.assertIn('Placing test results in /tmp', err.getvalue())
+ self.assertIn('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic', err.getvalue())
+ self.assertIn('Using Release build', err.getvalue())
+ self.assertIn('Pixel tests enabled', err.getvalue())
+ self.assertIn('Command line:', err.getvalue())
+ self.assertIn('Regular timeout: ', err.getvalue())
self.reset(err)
printer._options.quiet = True
printer.print_config('/tmp')
- self.assertFalse('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic' in err.getvalue())
+ self.assertNotIn('Baseline search path: test-mac-leopard -> test-mac-snowleopard -> generic', err.getvalue())
def test_print_one_line_summary(self):
- printer, err, out = self.get_printer()
+ printer, err = self.get_printer()
printer._print_one_line_summary(1, 1, 0)
self.assertWritten(err, ["The test ran as expected.\n", "\n"])
- printer, err, out = self.get_printer()
+ printer, err = self.get_printer()
printer._print_one_line_summary(1, 1, 0)
self.assertWritten(err, ["The test ran as expected.\n", "\n"])
- printer, err, out = self.get_printer()
+ printer, err = self.get_printer()
printer._print_one_line_summary(2, 1, 1)
self.assertWritten(err, ["\n", "1 test ran as expected, 1 didn't:\n", "\n"])
- printer, err, out = self.get_printer()
+ printer, err = self.get_printer()
printer._print_one_line_summary(3, 2, 1)
self.assertWritten(err, ["\n", "2 tests ran as expected, 1 didn't:\n", "\n"])
- printer, err, out = self.get_printer()
+ printer, err = self.get_printer()
printer._print_one_line_summary(3, 2, 0)
self.assertWritten(err, ['\n', "2 tests ran as expected (1 didn't run).\n", '\n'])
- def test_print_unexpected_results(self):
- # This routine is the only one that prints stuff that the bots
- # care about.
- #
- # FIXME: there's some weird layering going on here. It seems
- # like we shouldn't be both using an expectations string and
- # having to specify whether or not the result was expected.
- # This whole set of tests should probably be rewritten.
- #
- # FIXME: Plus, the fact that we're having to call into
- # run_webkit_tests is clearly a layering inversion.
- def get_unexpected_results(expected, passing, flaky):
- """Return an unexpected results summary matching the input description.
-
- There are a lot of different combinations of test results that
- can be tested; this routine produces various combinations based
- on the values of the input flags.
-
- Args
- expected: whether the tests ran as expected
- passing: whether the tests should all pass
- flaky: whether the tests should be flaky (if False, they
- produce the same results on both runs; if True, they
- all pass on the second run).
-
- """
- test_is_slow = False
- paths, rs, exp = self.get_result_summary(tests, expectations)
- if expected:
- rs.add(self.get_result('passes/text.html', test_expectations.PASS), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/timeout.html', test_expectations.TIMEOUT), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/crash.html', test_expectations.CRASH), expected, test_is_slow)
- elif passing:
- rs.add(self.get_result('passes/text.html'), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/timeout.html'), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/crash.html'), expected, test_is_slow)
- else:
- rs.add(self.get_result('passes/text.html', test_expectations.TIMEOUT), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/timeout.html', test_expectations.CRASH), expected, test_is_slow)
- rs.add(self.get_result('failures/expected/crash.html', test_expectations.TIMEOUT), expected, test_is_slow)
- retry = rs
- if flaky:
- paths, retry, exp = self.get_result_summary(tests, expectations)
- retry.add(self.get_result('passes/text.html'), True, test_is_slow)
- retry.add(self.get_result('failures/expected/timeout.html'), True, test_is_slow)
- retry.add(self.get_result('failures/expected/crash.html'), True, test_is_slow)
- unexpected_results = manager.summarize_results(self._port, exp, rs, retry, test_timings={}, only_unexpected=True, interrupted=False)
- return unexpected_results
-
- tests = ['passes/text.html', 'failures/expected/timeout.html', 'failures/expected/crash.html']
- expectations = ''
-
- printer, err, out = self.get_printer()
-
- # test everything running as expected
- ur = get_unexpected_results(expected=True, passing=False, flaky=False)
- printer._print_unexpected_results(ur)
- self.assertEmpty(err)
- self.assertEmpty(out)
-
- # test failures
- printer, err, out = self.get_printer()
- ur = get_unexpected_results(expected=False, passing=False, flaky=False)
- printer._print_unexpected_results(ur)
- self.assertEmpty(err)
- self.assertNotEmpty(out)
-
- # test unexpected flaky
- printer, err, out = self.get_printer()
- ur = get_unexpected_results(expected=False, passing=False, flaky=True)
- printer._print_unexpected_results(ur)
- self.assertEmpty(err)
- self.assertNotEmpty(out)
-
- printer, err, out = self.get_printer()
- ur = get_unexpected_results(expected=False, passing=False, flaky=False)
- printer._print_unexpected_results(ur)
- self.assertEmpty(err)
- self.assertNotEmpty(out)
-
- expectations = """
-BUGX : failures/expected/crash.html = CRASH
-BUGX : failures/expected/timeout.html = TIMEOUT
-"""
- printer, err, out = self.get_printer()
- ur = get_unexpected_results(expected=False, passing=False, flaky=False)
- printer._print_unexpected_results(ur)
- self.assertEmpty(err)
- self.assertNotEmpty(out)
-
- printer, err, out = self.get_printer()
- ur = get_unexpected_results(expected=False, passing=True, flaky=False)
- printer._print_unexpected_results(ur)
- self.assertEmpty(err)
- self.assertNotEmpty(out)
-
- def test_print_unexpected_results_buildbot(self):
- # FIXME: Test that print_unexpected_results() produces the printer the
- # buildbot is expecting.
- pass
-
def test_test_status_line(self):
- printer, _, _ = self.get_printer()
+ printer, _ = self.get_printer()
printer._meter.number_of_columns = lambda: 80
actual = printer._test_status_line('fast/dom/HTMLFormElement/associated-elements-after-index-assertion-fail1.html', ' passed')
self.assertEqual(80, len(actual))
@@ -282,12 +170,18 @@ BUGX : failures/expected/timeout.html = TIMEOUT
self.assertEqual(actual, '[0/0] associated-elements-after-index-assertion-fail1.html passed')
def test_details(self):
- printer, err, _ = self.get_printer(['--details'])
+ printer, err = self.get_printer(['--details'])
result = self.get_result('passes/image.html')
printer.print_started_test('passes/image.html')
printer.print_finished_test(result, expected=False, exp_str='', got_str='')
self.assertNotEmpty(err)
+ def test_print_found(self):
+ printer, err = self.get_printer()
-if __name__ == '__main__':
- unittest.main()
+ printer.print_found(100, 10, 1, 1)
+ self.assertWritten(err, ["Found 100 tests; running 10, skipping 90.\n"])
+
+ self.reset(err)
+ printer.print_found(100, 10, 2, 3)
+ self.assertWritten(err, ["Found 100 tests; running 10 (6 times each: --repeat-each=2 --iterations=3), skipping 90.\n"])
diff --git a/Tools/Scripts/webkitpy/performance_tests/perftest.py b/Tools/Scripts/webkitpy/performance_tests/perftest.py
index 41115e41d..0df3cc0ea 100644
--- a/Tools/Scripts/webkitpy/performance_tests/perftest.py
+++ b/Tools/Scripts/webkitpy/performance_tests/perftest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2012 Google Inc. All rights reserved.
# Copyright (C) 2012 Zoltan Horvath, Adobe Systems Incorporated. All rights reserved.
#
@@ -46,37 +45,166 @@ if sys.platform not in ('cygwin', 'win32'):
import webkitpy.thirdparty.autoinstalled.webpagereplay.replay
from webkitpy.layout_tests.controllers.test_result_writer import TestResultWriter
-from webkitpy.layout_tests.port.driver import DriverInput
-from webkitpy.layout_tests.port.driver import DriverOutput
+from webkitpy.port.driver import DriverInput
+from webkitpy.port.driver import DriverOutput
+DEFAULT_TEST_RUNNER_COUNT = 4
_log = logging.getLogger(__name__)
+class PerfTestMetric(object):
+ def __init__(self, metric, unit=None, iterations=None):
+ # FIXME: Fix runner.js to report correct metric names
+ self._iterations = iterations or []
+ self._unit = unit or self.metric_to_unit(metric)
+ self._metric = self.time_unit_to_metric(self._unit) if metric == 'Time' else metric
+
+ def name(self):
+ return self._metric
+
+ def has_values(self):
+ return bool(self._iterations)
+
+ def append_group(self, group_values):
+ assert isinstance(group_values, list)
+ self._iterations.append(group_values)
+
+ def grouped_iteration_values(self):
+ return self._iterations
+
+ def flattened_iteration_values(self):
+ return [value for group_values in self._iterations for value in group_values]
+
+ def unit(self):
+ return self._unit
+
+ @staticmethod
+ def metric_to_unit(metric):
+ assert metric in ('Time', 'Malloc', 'JSHeap')
+ return 'ms' if metric == 'Time' else 'bytes'
+
+ @staticmethod
+ def time_unit_to_metric(unit):
+ return {'fps': 'FrameRate', 'runs/s': 'Runs', 'ms': 'Time'}[unit]
+
+
class PerfTest(object):
- def __init__(self, port, test_name, path_or_url):
+
+ def __init__(self, port, test_name, test_path, test_runner_count=DEFAULT_TEST_RUNNER_COUNT):
self._port = port
self._test_name = test_name
- self._path_or_url = path_or_url
+ self._test_path = test_path
+ self._description = None
+ self._metrics = {}
+ self._ordered_metrics_name = []
+ self._test_runner_count = test_runner_count
def test_name(self):
return self._test_name
- def path_or_url(self):
- return self._path_or_url
+ def test_name_without_file_extension(self):
+ return re.sub(r'\.\w+$', '', self.test_name())
+
+ def test_path(self):
+ return self._test_path
+
+ def description(self):
+ return self._description
def prepare(self, time_out_ms):
return True
- def run(self, driver, time_out_ms):
- output = self.run_single(driver, self.path_or_url(), time_out_ms)
- self._filter_stderr(output)
+ def _create_driver(self):
+ return self._port.create_driver(worker_number=0, no_timeout=True)
+
+ def run(self, time_out_ms):
+ for _ in xrange(self._test_runner_count):
+ driver = self._create_driver()
+ try:
+ if not self._run_with_driver(driver, time_out_ms):
+ return None
+ finally:
+ driver.stop()
+
+ should_log = not self._port.get_option('profile')
+ if should_log and self._description:
+ _log.info('DESCRIPTION: %s' % self._description)
+
+ results = {}
+ for metric_name in self._ordered_metrics_name:
+ metric = self._metrics[metric_name]
+ results[metric.name()] = metric.grouped_iteration_values()
+ if should_log:
+ legacy_chromium_bot_compatible_name = self.test_name_without_file_extension().replace('/', ': ')
+ self.log_statistics(legacy_chromium_bot_compatible_name + ': ' + metric.name(),
+ metric.flattened_iteration_values(), metric.unit())
+
+ return results
+
+ @staticmethod
+ def log_statistics(test_name, values, unit):
+ sorted_values = sorted(values)
+
+ # Compute the mean and variance using Knuth's online algorithm (has good numerical stability).
+ square_sum = 0
+ mean = 0
+ for i, time in enumerate(sorted_values):
+ delta = time - mean
+ sweep = i + 1.0
+ mean += delta / sweep
+ square_sum += delta * (time - mean)
+
+ middle = int(len(sorted_values) / 2)
+ mean = sum(sorted_values) / len(values)
+ median = sorted_values[middle] if len(sorted_values) % 2 else (sorted_values[middle - 1] + sorted_values[middle]) / 2
+ stdev = math.sqrt(square_sum / (len(sorted_values) - 1)) if len(sorted_values) > 1 else 0
+
+ _log.info('RESULT %s= %s %s' % (test_name, mean, unit))
+ _log.info('median= %s %s, stdev= %s %s, min= %s %s, max= %s %s' %
+ (median, unit, stdev, unit, sorted_values[0], unit, sorted_values[-1], unit))
+
+ _description_regex = re.compile(r'^Description: (?P<description>.*)$', re.IGNORECASE)
+ _metrics_regex = re.compile(r'^(?P<metric>Time|Malloc|JS Heap):')
+ _statistics_keys = ['avg', 'median', 'stdev', 'min', 'max', 'unit', 'values']
+ _score_regex = re.compile(r'^(?P<key>' + r'|'.join(_statistics_keys) + r')\s+(?P<value>([0-9\.]+(,\s+)?)+)\s*(?P<unit>.*)')
+
+ def _run_with_driver(self, driver, time_out_ms):
+ output = self.run_single(driver, self.test_path(), time_out_ms)
+ self._filter_output(output)
if self.run_failed(output):
- return None
- return self.parse_output(output)
+ return False
+
+ current_metric = None
+ for line in re.split('\n', output.text):
+ description_match = self._description_regex.match(line)
+ metric_match = self._metrics_regex.match(line)
+ score = self._score_regex.match(line)
+
+ if description_match:
+ self._description = description_match.group('description')
+ elif metric_match:
+ current_metric = metric_match.group('metric').replace(' ', '')
+ elif score:
+ if score.group('key') != 'values':
+ continue
+
+ metric = self._ensure_metrics(current_metric, score.group('unit'))
+ metric.append_group(map(lambda value: float(value), score.group('value').split(', ')))
+ else:
+ _log.error('ERROR: ' + line)
+ return False
+
+ return True
+
+ def _ensure_metrics(self, metric_name, unit=None):
+ if metric_name not in self._metrics:
+ self._metrics[metric_name] = PerfTestMetric(metric_name, unit)
+ self._ordered_metrics_name.append(metric_name)
+ return self._metrics[metric_name]
- def run_single(self, driver, path_or_url, time_out_ms, should_run_pixel_test=False):
- return driver.run_test(DriverInput(path_or_url, time_out_ms, image_hash=None, should_run_pixel_test=should_run_pixel_test), stop_when_done=False)
+ def run_single(self, driver, test_path, time_out_ms, should_run_pixel_test=False):
+ return driver.run_test(DriverInput(test_path, time_out_ms, image_hash=None, should_run_pixel_test=should_run_pixel_test), stop_when_done=False)
def run_failed(self, output):
if output.text == None or output.error:
@@ -93,7 +221,8 @@ class PerfTest(object):
return True
- def _should_ignore_line(self, regexps, line):
+ @staticmethod
+ def _should_ignore_line(regexps, line):
if not line:
return True
for regexp in regexps:
@@ -105,17 +234,11 @@ class PerfTest(object):
re.compile(r'^Unknown option:'),
re.compile(r'^\[WARNING:proxy_service.cc'),
re.compile(r'^\[INFO:'),
+ # These stderr messages come from content_shell on chromium-linux.
+ re.compile(r'INFO:SkFontHost_fontconfig.cpp'),
+ re.compile(r'Running without the SUID sandbox'),
]
- def _should_ignore_line_in_stderr(self, line):
- return self._should_ignore_line(self._lines_to_ignore_in_stderr, line)
-
- def _filter_stderr(self, output):
- if not output.error:
- return
- filtered_error = '\n'.join([line for line in re.split('\n', output.error) if not self._should_ignore_line_in_stderr(line)])
- output.error = filtered_error if filtered_error else None
-
_lines_to_ignore_in_parser_result = [
re.compile(r'^Running \d+ times$'),
re.compile(r'^Ignoring warm-up '),
@@ -126,163 +249,23 @@ class PerfTest(object):
re.compile(re.escape("""frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)""")),
re.compile(re.escape("""frame "<!--framePath //<!--frame0-->/<!--frame0-->-->" - has 1 onunload handler(s)""")),
# Following is for html5.html
- re.compile(re.escape("""Blocked access to external URL http://www.whatwg.org/specs/web-apps/current-work/"""))]
-
- def _should_ignore_line_in_parser_test_result(self, line):
- return self._should_ignore_line(self._lines_to_ignore_in_parser_result, line)
-
- _description_regex = re.compile(r'^Description: (?P<description>.*)$', re.IGNORECASE)
- _result_classes = ['Time', 'JS Heap', 'Malloc']
- _result_class_regex = re.compile(r'^(?P<resultclass>' + r'|'.join(_result_classes) + '):')
- _statistics_keys = ['avg', 'median', 'stdev', 'min', 'max', 'unit', 'values']
- _score_regex = re.compile(r'^(?P<key>' + r'|'.join(_statistics_keys) + r')\s+(?P<value>([0-9\.]+(,\s+)?)+)\s*(?P<unit>.*)')
-
- def parse_output(self, output):
- test_failed = False
- results = {}
- ordered_results_keys = []
- test_name = re.sub(r'\.\w+$', '', self._test_name)
- description_string = ""
- result_class = ""
- for line in re.split('\n', output.text):
- description = self._description_regex.match(line)
- if description:
- description_string = description.group('description')
- continue
-
- result_class_match = self._result_class_regex.match(line)
- if result_class_match:
- result_class = result_class_match.group('resultclass')
- continue
-
- score = self._score_regex.match(line)
- if score:
- key = score.group('key')
- if key == 'values':
- value = [float(number) for number in score.group('value').split(', ')]
- else:
- value = float(score.group('value'))
- unit = score.group('unit')
- name = test_name
- if result_class != 'Time':
- name += ':' + result_class.replace(' ', '')
- if name not in ordered_results_keys:
- ordered_results_keys.append(name)
- results.setdefault(name, {})
- results[name]['unit'] = unit
- results[name][key] = value
- continue
-
- if not self._should_ignore_line_in_parser_test_result(line):
- test_failed = True
- _log.error(line)
-
- if test_failed:
- return None
-
- if set(self._statistics_keys) != set(results[test_name].keys() + ['values']):
- # values is not provided by Dromaeo tests.
- _log.error("The test didn't report all statistics.")
- return None
-
- if not self._port.get_option('profile'):
- for result_name in ordered_results_keys:
- if result_name == test_name:
- self.output_statistics(result_name, results[result_name], description_string)
- else:
- self.output_statistics(result_name, results[result_name])
- return results
-
- def output_statistics(self, test_name, results, description_string=None):
- unit = results['unit']
- if description_string:
- _log.info('DESCRIPTION: %s' % description_string)
- _log.info('RESULT %s= %s %s' % (test_name.replace(':', ': ').replace('/', ': '), results['avg'], unit))
- _log.info(', '.join(['%s= %s %s' % (key, results[key], unit) for key in self._statistics_keys[1:5]]))
-
-
-class ChromiumStylePerfTest(PerfTest):
- _chromium_style_result_regex = re.compile(r'^RESULT\s+(?P<name>[^=]+)\s*=\s+(?P<value>\d+(\.\d+)?)\s*(?P<unit>\w+)$')
-
- def __init__(self, port, test_name, path_or_url):
- super(ChromiumStylePerfTest, self).__init__(port, test_name, path_or_url)
-
- def parse_output(self, output):
- test_failed = False
- results = {}
- for line in re.split('\n', output.text):
- resultLine = ChromiumStylePerfTest._chromium_style_result_regex.match(line)
- if resultLine:
- # FIXME: Store the unit
- results[self.test_name() + ':' + resultLine.group('name').replace(' ', '')] = float(resultLine.group('value'))
- _log.info(line)
- elif not len(line) == 0:
- test_failed = True
- _log.error(line)
- return results if results and not test_failed else None
-
-
-class PageLoadingPerfTest(PerfTest):
- _FORCE_GC_FILE = 'resources/force-gc.html'
-
- def __init__(self, port, test_name, path_or_url):
- super(PageLoadingPerfTest, self).__init__(port, test_name, path_or_url)
- self.force_gc_test = self._port.host.filesystem.join(self._port.perf_tests_dir(), self._FORCE_GC_FILE)
-
- def run_single(self, driver, path_or_url, time_out_ms, should_run_pixel_test=False):
- # Force GC to prevent pageload noise. See https://bugs.webkit.org/show_bug.cgi?id=98203
- super(PageLoadingPerfTest, self).run_single(driver, self.force_gc_test, time_out_ms, False)
- return super(PageLoadingPerfTest, self).run_single(driver, path_or_url, time_out_ms, should_run_pixel_test)
-
- def calculate_statistics(self, values):
- sorted_values = sorted(values)
-
- # Compute the mean and variance using Knuth's online algorithm (has good numerical stability).
- squareSum = 0
- mean = 0
- for i, time in enumerate(sorted_values):
- delta = time - mean
- sweep = i + 1.0
- mean += delta / sweep
- squareSum += delta * (time - mean)
-
- middle = int(len(sorted_values) / 2)
- result = {'avg': mean,
- 'min': sorted_values[0],
- 'max': sorted_values[-1],
- 'median': sorted_values[middle] if len(sorted_values) % 2 else (sorted_values[middle - 1] + sorted_values[middle]) / 2,
- 'stdev': math.sqrt(squareSum / (len(sorted_values) - 1))}
- return result
-
- def run(self, driver, time_out_ms):
- results = {}
- results.setdefault(self.test_name(), {'unit': 'ms', 'values': []})
-
- for i in range(0, 20):
- output = self.run_single(driver, self.path_or_url(), time_out_ms)
- if not output or self.run_failed(output):
- return None
- if i == 0:
- continue
-
- results[self.test_name()]['values'].append(output.test_time * 1000)
-
- if not output.measurements:
- continue
+ re.compile(re.escape("""Blocked access to external URL http://www.whatwg.org/specs/web-apps/current-work/""")),
+ re.compile(r"CONSOLE MESSAGE: (line \d+: )?Blocked script execution in '[A-Za-z0-9\-\.:]+' because the document's frame is sandboxed and the 'allow-scripts' permission is not set."),
+ re.compile(r"CONSOLE MESSAGE: (line \d+: )?Not allowed to load local resource"),
+ # Dromaeo reports values for subtests. Ignore them for now.
+ re.compile(r'(?P<name>.+): \[(?P<values>(\d+(.\d+)?,\s+)*\d+(.\d+)?)\]'),
+ ]
- for result_class, result in output.measurements.items():
- name = self.test_name() + ':' + result_class
- if not name in results:
- results.setdefault(name, {'values': []})
- results[name]['values'].append(result)
- if result_class == 'Malloc' or result_class == 'JSHeap':
- results[name]['unit'] = 'bytes'
+ def _filter_output(self, output):
+ if output.error:
+ output.error = '\n'.join([line for line in re.split('\n', output.error) if not self._should_ignore_line(self._lines_to_ignore_in_stderr, line)])
+ if output.text:
+ output.text = '\n'.join([line for line in re.split('\n', output.text) if not self._should_ignore_line(self._lines_to_ignore_in_parser_result, line)])
- for result_class in results.keys():
- results[result_class].update(self.calculate_statistics(results[result_class]['values']))
- self.output_statistics(result_class, results[result_class], '')
- return results
+class SingleProcessPerfTest(PerfTest):
+ def __init__(self, port, test_name, test_path, test_runner_count=1):
+ super(SingleProcessPerfTest, self).__init__(port, test_name, test_path, test_runner_count)
class ReplayServer(object):
@@ -320,9 +303,12 @@ class ReplayServer(object):
self.stop()
-class ReplayPerfTest(PageLoadingPerfTest):
- def __init__(self, port, test_name, path_or_url):
- super(ReplayPerfTest, self).__init__(port, test_name, path_or_url)
+class ReplayPerfTest(PerfTest):
+ _FORCE_GC_FILE = 'resources/force-gc.html'
+
+ def __init__(self, port, test_name, test_path, test_runner_count=DEFAULT_TEST_RUNNER_COUNT):
+ super(ReplayPerfTest, self).__init__(port, test_name, test_path, test_runner_count)
+ self.force_gc_test = self._port.host.filesystem.join(self._port.perf_tests_dir(), self._FORCE_GC_FILE)
def _start_replay_server(self, archive, record):
try:
@@ -335,11 +321,11 @@ class ReplayPerfTest(PageLoadingPerfTest):
def prepare(self, time_out_ms):
filesystem = self._port.host.filesystem
- path_without_ext = filesystem.splitext(self.path_or_url())[0]
+ path_without_ext = filesystem.splitext(self.test_path())[0]
self._archive_path = filesystem.join(path_without_ext + '.wpr')
self._expected_image_path = filesystem.join(path_without_ext + '-expected.png')
- self._url = filesystem.read_text_file(self.path_or_url()).split('\n')[0]
+ self._url = filesystem.read_text_file(self.test_path()).split('\n')[0]
if filesystem.isfile(self._archive_path) and filesystem.isfile(self._expected_image_path):
_log.info("Replay ready for %s" % self._archive_path)
@@ -361,6 +347,39 @@ class ReplayPerfTest(PageLoadingPerfTest):
return True
+ def _run_with_driver(self, driver, time_out_ms):
+ times = []
+ malloc = []
+ js_heap = []
+
+ for i in range(0, 6):
+ output = self.run_single(driver, self.test_path(), time_out_ms)
+ if not output or self.run_failed(output):
+ return False
+ if i == 0:
+ continue
+
+ times.append(output.test_time * 1000)
+
+ if not output.measurements:
+ continue
+
+ for metric, result in output.measurements.items():
+ assert metric == 'Malloc' or metric == 'JSHeap'
+ if metric == 'Malloc':
+ malloc.append(result)
+ else:
+ js_heap.append(result)
+
+ if times:
+ self._ensure_metrics('Time').append_group(times)
+ if malloc:
+ self._ensure_metrics('Malloc').append_group(malloc)
+ if js_heap:
+ self._ensure_metrics('JSHeap').append_group(js_heap)
+
+ return True
+
def run_single(self, driver, url, time_out_ms, record=False):
server = self._start_replay_server(self._archive_path, record)
if not server:
@@ -374,6 +393,8 @@ class ReplayPerfTest(PageLoadingPerfTest):
return None
_log.debug("Web page replay started. Loading the page.")
+ # Force GC to prevent pageload noise. See https://bugs.webkit.org/show_bug.cgi?id=98203
+ super(ReplayPerfTest, self).run_single(driver, self.force_gc_test, time_out_ms, False)
output = super(ReplayPerfTest, self).run_single(driver, self._url, time_out_ms, should_run_pixel_test=True)
if self.run_failed(output):
return None
@@ -400,13 +421,13 @@ class ReplayPerfTest(PageLoadingPerfTest):
class PerfTestFactory(object):
_pattern_map = [
- (re.compile(r'^inspector/'), ChromiumStylePerfTest),
+ (re.compile(r'^Dromaeo/'), SingleProcessPerfTest),
(re.compile(r'(.+)\.replay$'), ReplayPerfTest),
]
@classmethod
- def create_perf_test(cls, port, test_name, path):
+ def create_perf_test(cls, port, test_name, path, test_runner_count=DEFAULT_TEST_RUNNER_COUNT):
for (pattern, test_class) in cls._pattern_map:
if pattern.match(test_name):
- return test_class(port, test_name, path)
- return PerfTest(port, test_name, path)
+ return test_class(port, test_name, path, test_runner_count)
+ return PerfTest(port, test_name, path, test_runner_count)
diff --git a/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py b/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py
index 741e8b644..b904b9760 100755..100644
--- a/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py
+++ b/Tools/Scripts/webkitpy/performance_tests/perftest_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,171 +27,211 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import StringIO
+import json
import math
-import unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.layout_tests.port.driver import DriverOutput
-from webkitpy.layout_tests.port.test import TestDriver
-from webkitpy.layout_tests.port.test import TestPort
-from webkitpy.performance_tests.perftest import ChromiumStylePerfTest
-from webkitpy.performance_tests.perftest import PageLoadingPerfTest
+from webkitpy.port.driver import DriverOutput
+from webkitpy.port.test import TestDriver
+from webkitpy.port.test import TestPort
from webkitpy.performance_tests.perftest import PerfTest
+from webkitpy.performance_tests.perftest import PerfTestMetric
from webkitpy.performance_tests.perftest import PerfTestFactory
from webkitpy.performance_tests.perftest import ReplayPerfTest
+from webkitpy.performance_tests.perftest import SingleProcessPerfTest
class MockPort(TestPort):
def __init__(self, custom_run_test=None):
super(MockPort, self).__init__(host=MockHost(), custom_run_test=custom_run_test)
-class MainTest(unittest.TestCase):
+
+class TestPerfTestMetric(unittest.TestCase):
+ def test_init_set_missing_unit(self):
+ self.assertEqual(PerfTestMetric('Time', iterations=[1, 2, 3, 4, 5]).unit(), 'ms')
+ self.assertEqual(PerfTestMetric('Malloc', iterations=[1, 2, 3, 4, 5]).unit(), 'bytes')
+ self.assertEqual(PerfTestMetric('JSHeap', iterations=[1, 2, 3, 4, 5]).unit(), 'bytes')
+
+ def test_init_set_time_metric(self):
+ self.assertEqual(PerfTestMetric('Time', 'ms').name(), 'Time')
+ self.assertEqual(PerfTestMetric('Time', 'fps').name(), 'FrameRate')
+ self.assertEqual(PerfTestMetric('Time', 'runs/s').name(), 'Runs')
+
+ def test_has_values(self):
+ self.assertFalse(PerfTestMetric('Time').has_values())
+ self.assertTrue(PerfTestMetric('Time', iterations=[1]).has_values())
+
+ def test_append(self):
+ metric = PerfTestMetric('Time')
+ metric2 = PerfTestMetric('Time')
+ self.assertFalse(metric.has_values())
+ self.assertFalse(metric2.has_values())
+
+ metric.append_group([1])
+ self.assertTrue(metric.has_values())
+ self.assertFalse(metric2.has_values())
+ self.assertEqual(metric.grouped_iteration_values(), [[1]])
+ self.assertEqual(metric.flattened_iteration_values(), [1])
+
+ metric.append_group([2])
+ self.assertEqual(metric.grouped_iteration_values(), [[1], [2]])
+ self.assertEqual(metric.flattened_iteration_values(), [1, 2])
+
+ metric2.append_group([3])
+ self.assertTrue(metric2.has_values())
+ self.assertEqual(metric.flattened_iteration_values(), [1, 2])
+ self.assertEqual(metric2.flattened_iteration_values(), [3])
+
+ metric.append_group([4, 5])
+ self.assertEqual(metric.grouped_iteration_values(), [[1], [2], [4, 5]])
+ self.assertEqual(metric.flattened_iteration_values(), [1, 2, 4, 5])
+
+
+class TestPerfTest(unittest.TestCase):
+ def _assert_results_are_correct(self, test, output):
+ test.run_single = lambda driver, path, time_out_ms: output
+ self.assertTrue(test._run_with_driver(None, None))
+ self.assertEqual(test._metrics.keys(), ['Time'])
+ self.assertEqual(test._metrics['Time'].flattened_iteration_values(), [1080, 1120, 1095, 1101, 1104])
+
def test_parse_output(self):
- output = DriverOutput('\n'.join([
- 'Running 20 times',
- 'Ignoring warm-up run (1115)',
- '',
- 'Time:',
- 'values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ms',
- 'avg 1100 ms',
- 'median 1101 ms',
- 'stdev 11 ms',
- 'min 1080 ms',
- 'max 1120 ms']), image=None, image_hash=None, audio=None)
+ output = DriverOutput("""
+Running 20 times
+Ignoring warm-up run (1115)
+
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50862 ms
+min 1080 ms
+max 1120 ms
+""", image=None, image_hash=None, audio=None)
output_capture = OutputCapture()
output_capture.capture_output()
try:
test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test')
- self.assertEqual(test.parse_output(output),
- {'some-test': {'avg': 1100.0, 'median': 1101.0, 'min': 1080.0, 'max': 1120.0, 'stdev': 11.0, 'unit': 'ms',
- 'values': [i for i in range(1, 20)]}})
+ self._assert_results_are_correct(test, output)
finally:
- pass
actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
self.assertEqual(actual_stdout, '')
self.assertEqual(actual_stderr, '')
- self.assertEqual(actual_logs, 'RESULT some-test= 1100.0 ms\nmedian= 1101.0 ms, stdev= 11.0 ms, min= 1080.0 ms, max= 1120.0 ms\n')
+ self.assertEqual(actual_logs, '')
def test_parse_output_with_failing_line(self):
- output = DriverOutput('\n'.join([
- 'Running 20 times',
- 'Ignoring warm-up run (1115)',
- '',
- 'some-unrecognizable-line',
- '',
- 'Time:'
- 'values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ms',
- 'avg 1100 ms',
- 'median 1101 ms',
- 'stdev 11 ms',
- 'min 1080 ms',
- 'max 1120 ms']), image=None, image_hash=None, audio=None)
+ output = DriverOutput("""
+Running 20 times
+Ignoring warm-up run (1115)
+
+some-unrecognizable-line
+
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50862 ms
+min 1080 ms
+max 1120 ms
+""", image=None, image_hash=None, audio=None)
output_capture = OutputCapture()
output_capture.capture_output()
try:
test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test')
- self.assertEqual(test.parse_output(output), None)
+ test.run_single = lambda driver, path, time_out_ms: output
+ self.assertFalse(test._run_with_driver(None, None))
finally:
actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
self.assertEqual(actual_stdout, '')
self.assertEqual(actual_stderr, '')
- self.assertEqual(actual_logs, 'some-unrecognizable-line\n')
+ self.assertEqual(actual_logs, 'ERROR: some-unrecognizable-line\n')
+
+ def test_parse_output_with_description(self):
+ output = DriverOutput("""
+Description: this is a test description.
+
+Running 20 times
+Ignoring warm-up run (1115)
+
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50862 ms
+min 1080 ms
+max 1120 ms""", image=None, image_hash=None, audio=None)
+ test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test')
+ self._assert_results_are_correct(test, output)
+ self.assertEqual(test.description(), 'this is a test description.')
def test_ignored_stderr_lines(self):
test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test')
- ignored_lines = [
- "Unknown option: --foo-bar",
- "[WARNING:proxy_service.cc] bad moon a-rising",
- "[INFO:SkFontHost_android.cpp(1158)] Use Test Config File Main /data/local/tmp/drt/android_main_fonts.xml, Fallback /data/local/tmp/drt/android_fallback_fonts.xml, Font Dir /data/local/tmp/drt/fonts/",
- ]
- for line in ignored_lines:
- self.assertTrue(test._should_ignore_line_in_stderr(line))
-
- non_ignored_lines = [
- "Should not be ignored",
- "[WARNING:chrome.cc] Something went wrong",
- "[ERROR:main.cc] The sky has fallen",
- ]
- for line in non_ignored_lines:
- self.assertFalse(test._should_ignore_line_in_stderr(line))
-
-
-class TestPageLoadingPerfTest(unittest.TestCase):
- class MockDriver(object):
- def __init__(self, values, test, measurements=None):
- self._values = values
- self._index = 0
- self._test = test
- self._measurements = measurements
-
- def run_test(self, input, stop_when_done):
- if input.test_name == self._test.force_gc_test:
- return
- value = self._values[self._index]
- self._index += 1
- if isinstance(value, str):
- return DriverOutput('some output', image=None, image_hash=None, audio=None, error=value)
- else:
- return DriverOutput('some output', image=None, image_hash=None, audio=None, test_time=self._values[self._index - 1], measurements=self._measurements)
-
- def test_run(self):
- port = MockPort()
- test = PageLoadingPerfTest(port, 'some-test', '/path/some-dir/some-test')
- driver = TestPageLoadingPerfTest.MockDriver(range(1, 21), test)
+ output_with_lines_to_ignore = DriverOutput('', image=None, image_hash=None, audio=None, error="""
+Unknown option: --foo-bar
+Should not be ignored
+[WARNING:proxy_service.cc] bad moon a-rising
+[WARNING:chrome.cc] Something went wrong
+[INFO:SkFontHost_android.cpp(1158)] Use Test Config File Main /data/local/tmp/drt/android_main_fonts.xml, Fallback /data/local/tmp/drt/android_fallback_fonts.xml, Font Dir /data/local/tmp/drt/fonts/
+[ERROR:main.cc] The sky has fallen""")
+ test._filter_output(output_with_lines_to_ignore)
+ self.assertEqual(output_with_lines_to_ignore.error,
+ "Should not be ignored\n"
+ "[WARNING:chrome.cc] Something went wrong\n"
+ "[ERROR:main.cc] The sky has fallen")
+
+ def test_parse_output_with_subtests(self):
+ output = DriverOutput("""
+Running 20 times
+some test: [1, 2, 3, 4, 5]
+other test = else: [6, 7, 8, 9, 10]
+Ignoring warm-up run (1115)
+
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50862 ms
+min 1080 ms
+max 1120 ms
+""", image=None, image_hash=None, audio=None)
output_capture = OutputCapture()
output_capture.capture_output()
try:
- self.assertEqual(test.run(driver, None),
- {'some-test': {'max': 20000, 'avg': 11000.0, 'median': 11000, 'stdev': 5627.314338711378, 'min': 2000, 'unit': 'ms',
- 'values': [i * 1000 for i in range(2, 21)]}})
+ test = PerfTest(MockPort(), 'some-test', '/path/some-dir/some-test')
+ self._assert_results_are_correct(test, output)
finally:
actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
self.assertEqual(actual_stdout, '')
self.assertEqual(actual_stderr, '')
- self.assertEqual(actual_logs, 'RESULT some-test= 11000.0 ms\nmedian= 11000 ms, stdev= 5627.31433871 ms, min= 2000 ms, max= 20000 ms\n')
+ self.assertEqual(actual_logs, '')
- def test_run_with_memory_output(self):
- port = MockPort()
- test = PageLoadingPerfTest(port, 'some-test', '/path/some-dir/some-test')
- memory_results = {'Malloc': 10, 'JSHeap': 5}
- self.maxDiff = None
- driver = TestPageLoadingPerfTest.MockDriver(range(1, 21), test, memory_results)
- output_capture = OutputCapture()
- output_capture.capture_output()
- try:
- self.assertEqual(test.run(driver, None),
- {'some-test': {'max': 20000, 'avg': 11000.0, 'median': 11000, 'stdev': 5627.314338711378, 'min': 2000, 'unit': 'ms',
- 'values': [i * 1000 for i in range(2, 21)]},
- 'some-test:Malloc': {'max': 10, 'avg': 10.0, 'median': 10, 'min': 10, 'stdev': 0.0, 'unit': 'bytes',
- 'values': [10] * 19},
- 'some-test:JSHeap': {'max': 5, 'avg': 5.0, 'median': 5, 'min': 5, 'stdev': 0.0, 'unit': 'bytes',
- 'values': [5] * 19}})
- finally:
- actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
- self.assertEqual(actual_stdout, '')
- self.assertEqual(actual_stderr, '')
- self.assertEqual(actual_logs, 'RESULT some-test= 11000.0 ms\nmedian= 11000 ms, stdev= 5627.31433871 ms, min= 2000 ms, max= 20000 ms\n'
- + 'RESULT some-test: Malloc= 10.0 bytes\nmedian= 10 bytes, stdev= 0.0 bytes, min= 10 bytes, max= 10 bytes\n'
- + 'RESULT some-test: JSHeap= 5.0 bytes\nmedian= 5 bytes, stdev= 0.0 bytes, min= 5 bytes, max= 5 bytes\n')
- def test_run_with_bad_output(self):
- output_capture = OutputCapture()
- output_capture.capture_output()
- try:
- port = MockPort()
- test = PageLoadingPerfTest(port, 'some-test', '/path/some-dir/some-test')
- driver = TestPageLoadingPerfTest.MockDriver([1, 2, 3, 4, 5, 6, 7, 'some error', 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], test)
- self.assertEqual(test.run(driver, None), None)
- finally:
- actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
- self.assertEqual(actual_stdout, '')
- self.assertEqual(actual_stderr, '')
- self.assertEqual(actual_logs, 'error: some-test\nsome error\n')
+class TestSingleProcessPerfTest(unittest.TestCase):
+ def test_use_only_one_process(self):
+ called = [0]
+ def run_single(driver, path, time_out_ms):
+ called[0] += 1
+ return DriverOutput("""
+Running 20 times
+Ignoring warm-up run (1115)
-class TestReplayPerfTest(unittest.TestCase):
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50862 ms
+min 1080 ms
+max 1120 ms""", image=None, image_hash=None, audio=None)
+ test = SingleProcessPerfTest(MockPort(), 'some-test', '/path/some-dir/some-test')
+ test.run_single = run_single
+ self.assertTrue(test.run(0))
+ self.assertEqual(called[0], 1)
+
+
+class TestReplayPerfTest(unittest.TestCase):
class ReplayTestPort(MockPort):
def __init__(self, custom_run_test=None):
@@ -239,7 +278,7 @@ class TestReplayPerfTest(unittest.TestCase):
loaded_pages.append(test_input)
self._add_file(port, '/path/some-dir', 'some-test.wpr', 'wpr content')
return DriverOutput('actual text', 'actual image', 'actual checksum',
- audio=None, crash=False, timeout=False, error=False)
+ audio=None, crash=False, timeout=False, error=False, test_time=12345)
test, port = self._setup_test(run_test)
test._archive_path = '/path/some-dir/some-test.wpr'
@@ -247,7 +286,8 @@ class TestReplayPerfTest(unittest.TestCase):
try:
driver = port.create_driver(worker_number=1, no_timeout=True)
- self.assertTrue(test.run_single(driver, '/path/some-dir/some-test.replay', time_out_ms=100))
+ output = test.run_single(driver, '/path/some-dir/some-test.replay', time_out_ms=100)
+ self.assertTrue(output)
finally:
actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
@@ -258,6 +298,7 @@ class TestReplayPerfTest(unittest.TestCase):
self.assertEqual(actual_stderr, '')
self.assertEqual(actual_logs, '')
self.assertEqual(port.host.filesystem.read_binary_file('/path/some-dir/some-test-actual.png'), 'actual image')
+ self.assertEqual(output.test_time, 12345)
def test_run_single_fails_without_webpagereplay(self):
output_capture = OutputCapture()
@@ -277,6 +318,59 @@ class TestReplayPerfTest(unittest.TestCase):
self.assertEqual(actual_stderr, '')
self.assertEqual(actual_logs, "Web page replay didn't start.\n")
+ def test_run_with_driver_accumulates_results(self):
+ port = MockPort()
+ test, port = self._setup_test()
+ counter = [0]
+
+ def mock_run_signle(drive, path, timeout):
+ counter[0] += 1
+ return DriverOutput('some output', image=None, image_hash=None, audio=None, test_time=counter[0], measurements={})
+
+ test.run_single = mock_run_signle
+ output_capture = OutputCapture()
+ output_capture.capture_output()
+ try:
+ driver = port.create_driver(worker_number=1, no_timeout=True)
+ self.assertTrue(test._run_with_driver(driver, None))
+ finally:
+ actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
+
+ self.assertEqual(actual_stdout, '')
+ self.assertEqual(actual_stderr, '')
+ self.assertEqual(actual_logs, '')
+
+ self.assertEqual(test._metrics.keys(), ['Time'])
+ self.assertEqual(test._metrics['Time'].flattened_iteration_values(), [float(i * 1000) for i in range(2, 7)])
+
+ def test_run_with_driver_accumulates_memory_results(self):
+ port = MockPort()
+ test, port = self._setup_test()
+ counter = [0]
+
+ def mock_run_signle(drive, path, timeout):
+ counter[0] += 1
+ return DriverOutput('some output', image=None, image_hash=None, audio=None, test_time=counter[0], measurements={'Malloc': 10, 'JSHeap': 5})
+
+ test.run_single = mock_run_signle
+ output_capture = OutputCapture()
+ output_capture.capture_output()
+ try:
+ driver = port.create_driver(worker_number=1, no_timeout=True)
+ self.assertTrue(test._run_with_driver(driver, None))
+ finally:
+ actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
+
+ self.assertEqual(actual_stdout, '')
+ self.assertEqual(actual_stderr, '')
+ self.assertEqual(actual_logs, '')
+
+ metrics = test._metrics
+ self.assertEqual(sorted(metrics.keys()), ['JSHeap', 'Malloc', 'Time'])
+ self.assertEqual(metrics['Time'].flattened_iteration_values(), [float(i * 1000) for i in range(2, 7)])
+ self.assertEqual(metrics['Malloc'].flattened_iteration_values(), [float(10)] * 5)
+ self.assertEqual(metrics['JSHeap'].flattened_iteration_values(), [float(5)] * 5)
+
def test_prepare_fails_when_wait_until_ready_fails(self):
output_capture = OutputCapture()
output_capture.capture_output()
@@ -337,7 +431,7 @@ class TestReplayPerfTest(unittest.TestCase):
test, port = self._setup_test(run_test)
try:
- self.assertEqual(test.prepare(time_out_ms=100), True)
+ self.assertTrue(test.prepare(time_out_ms=100))
finally:
actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
@@ -361,7 +455,7 @@ class TestReplayPerfTest(unittest.TestCase):
test.run_single = run_single
try:
- self.assertEqual(test.prepare(time_out_ms=100), False)
+ self.assertFalse(test.prepare(time_out_ms=100))
finally:
actual_stdout, actual_stderr, actual_logs = output_capture.restore_output()
self.assertTrue(called[0])
@@ -371,15 +465,8 @@ class TestReplayPerfTest(unittest.TestCase):
self.assertEqual(actual_stderr, '')
self.assertEqual(actual_logs, "Preparing replay for some-test.replay\nFailed to prepare a replay for some-test.replay\n")
+
class TestPerfTestFactory(unittest.TestCase):
def test_regular_test(self):
test = PerfTestFactory.create_perf_test(MockPort(), 'some-dir/some-test', '/path/some-dir/some-test')
self.assertEqual(test.__class__, PerfTest)
-
- def test_inspector_test(self):
- test = PerfTestFactory.create_perf_test(MockPort(), 'inspector/some-test', '/path/inspector/some-test')
- self.assertEqual(test.__class__, ChromiumStylePerfTest)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py b/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
index 6dc4742b7..adfabffbd 100755..100644
--- a/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
+++ b/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -34,12 +33,15 @@ import json
import logging
import optparse
import time
+import datetime
from webkitpy.common import find_files
from webkitpy.common.checkout.scm.detection import SCMDetector
+from webkitpy.common.config.urls import view_source_url
from webkitpy.common.host import Host
from webkitpy.common.net.file_uploader import FileUploader
from webkitpy.performance_tests.perftest import PerfTestFactory
+from webkitpy.performance_tests.perftest import DEFAULT_TEST_RUNNER_COUNT
_log = logging.getLogger(__name__)
@@ -66,10 +68,9 @@ class PerfTestsRunner(object):
self._host.initialize_scm()
self._webkit_base_dir_len = len(self._port.webkit_base())
self._base_path = self._port.perf_tests_dir()
- self._results = {}
self._timestamp = time.time()
- self._needs_http = None
- self._has_http_lock = False
+ self._utc_timestamp = datetime.datetime.utcnow()
+
@staticmethod
def _parse_args(args=None):
@@ -83,10 +84,6 @@ class PerfTestsRunner(object):
help='Set the configuration to Release'),
optparse.make_option("--platform",
help="Specify port/platform being tested (i.e. chromium-mac)"),
- optparse.make_option("--chromium",
- action="store_const", const='chromium', dest='platform', help='Alias for --platform=chromium'),
- optparse.make_option("--chromium-android",
- action="store_const", const='chromium-android', dest='platform', help='Alias for --platform=chromium-android'),
optparse.make_option("--builder-name",
help=("The name of the builder shown on the waterfall running this script e.g. google-mac-2.")),
optparse.make_option("--build-number",
@@ -99,8 +96,6 @@ class PerfTestsRunner(object):
help="Path to the directory under which build files are kept (should not include configuration)"),
optparse.make_option("--time-out-ms", default=600 * 1000,
help="Set the timeout for each test"),
- optparse.make_option("--pause-before-testing", dest="pause_before_testing", action="store_true", default=False,
- help="Pause before running the tests to let user attach a performance monitor."),
optparse.make_option("--no-results", action="store_false", dest="generate_results", default=True,
help="Do no generate results JSON and results page."),
optparse.make_option("--output-json-path", action='callback', callback=_expand_path, type="str",
@@ -119,16 +114,25 @@ class PerfTestsRunner(object):
help="Use WebKitTestRunner rather than DumpRenderTree."),
optparse.make_option("--replay", dest="replay", action="store_true", default=False,
help="Run replay tests."),
- optparse.make_option("--force", dest="skipped", action="store_true", default=False,
+ optparse.make_option("--force", dest="use_skipped_list", action="store_false", default=True,
help="Run all tests, including the ones in the Skipped list."),
optparse.make_option("--profile", action="store_true",
help="Output per-test profile information."),
+ optparse.make_option("--profiler", action="store",
+ help="Output per-test profile information, using the specified profiler."),
+ optparse.make_option("--additional-drt-flag", action="append",
+ default=[], help="Additional command line flag to pass to DumpRenderTree "
+ "Specify multiple times to add multiple flags."),
+ optparse.make_option("--driver-name", type="string",
+ help="Alternative DumpRenderTree binary to use"),
+ optparse.make_option("--repeat", default=1, type="int",
+ help="Specify number of times to run test set (default: 1)."),
+ optparse.make_option("--test-runner-count", default=DEFAULT_TEST_RUNNER_COUNT, type="int",
+ help="Specify number of times to invoke test runner for each performance test."),
]
return optparse.OptionParser(option_list=(perf_option_list)).parse_args(args)
def _collect_tests(self):
- """Return the list of tests found."""
-
test_extensions = ['.html', '.svg']
if self._options.replay:
test_extensions.append('.replay')
@@ -140,59 +144,59 @@ class PerfTestsRunner(object):
paths = []
for arg in self._args:
- paths.append(arg)
- relpath = filesystem.relpath(arg, self._base_path)
- if relpath:
- paths.append(relpath)
+ if filesystem.exists(filesystem.join(self._base_path, arg)):
+ paths.append(arg)
+ else:
+ relpath = filesystem.relpath(arg, self._base_path)
+ if filesystem.exists(filesystem.join(self._base_path, relpath)):
+ paths.append(filesystem.normpath(relpath))
+ else:
+ _log.warn('Path was not found:' + arg)
skipped_directories = set(['.svn', 'resources'])
test_files = find_files.find(filesystem, self._base_path, paths, skipped_directories, _is_test_file)
tests = []
for path in test_files:
- relative_path = self._port.relative_perf_test_filename(path).replace('\\', '/')
- if self._port.skips_perf_test(relative_path) and not self._options.skipped:
+ relative_path = filesystem.relpath(path, self._base_path).replace('\\', '/')
+ if self._options.use_skipped_list and self._port.skips_perf_test(relative_path) and filesystem.normpath(relative_path) not in paths:
continue
- test = PerfTestFactory.create_perf_test(self._port, relative_path, path)
+ test = PerfTestFactory.create_perf_test(self._port, relative_path, path, test_runner_count=self._options.test_runner_count)
tests.append(test)
return tests
- def _start_servers(self):
- if self._needs_http:
- self._port.acquire_http_lock()
- self._port.start_http_server(number_of_servers=2)
- self._has_http_lock = True
-
- def _stop_servers(self):
- if self._has_http_lock:
- self._port.stop_http_server()
- self._port.release_http_lock()
-
def run(self):
- self._needs_http = self._port.requires_http_server()
-
- if not self._port.check_build(needs_http=self._needs_http):
+ if not self._port.check_build(needs_http=False):
_log.error("Build not up to date for %s" % self._port._path_to_driver())
return self.EXIT_CODE_BAD_BUILD
- tests = self._collect_tests()
- _log.info("Running %d tests" % len(tests))
+ run_count = 0
+ repeat = self._options.repeat
+ while (run_count < repeat):
+ run_count += 1
- for test in tests:
- if not test.prepare(self._options.time_out_ms):
- return self.EXIT_CODE_BAD_PREPARATION
+ tests = self._collect_tests()
+ runs = ' (Run %d of %d)' % (run_count, repeat) if repeat > 1 else ''
+ _log.info("Running %d tests%s" % (len(tests), runs))
- try:
- self._start_servers()
- unexpected = self._run_tests_set(sorted(list(tests), key=lambda test: test.test_name()), self._port)
+ for test in tests:
+ if not test.prepare(self._options.time_out_ms):
+ return self.EXIT_CODE_BAD_PREPARATION
+
+ unexpected = self._run_tests_set(sorted(list(tests), key=lambda test: test.test_name()))
- finally:
- self._stop_servers()
+ if self._options.generate_results and not self._options.profile:
+ exit_code = self._generate_results()
+ if exit_code:
+ return exit_code
if self._options.generate_results and not self._options.profile:
- exit_code = self._generate_and_show_results()
- if exit_code:
- return exit_code
+ test_results_server = self._options.test_results_server
+ if test_results_server and not self._upload_json(test_results_server, self._output_json_path()):
+ return self.EXIT_CODE_FAILED_UPLOADING
+
+ if self._options.show_results:
+ self._port.show_results_html_file(self._results_page_path())
return unexpected
@@ -202,7 +206,10 @@ class PerfTestsRunner(object):
return output_json_path
return self._host.filesystem.join(self._port.perf_results_directory(), self._DEFAULT_JSON_FILENAME)
- def _generate_and_show_results(self):
+ def _results_page_path(self):
+ return self._host.filesystem.splitext(self._output_json_path())[0] + '.html'
+
+ def _generate_results(self):
options = self._options
output_json_path = self._output_json_path()
output = self._generate_results_dict(self._timestamp, options.description, options.platform, options.builder_name, options.build_number)
@@ -216,33 +223,66 @@ class PerfTestsRunner(object):
if not output:
return self.EXIT_CODE_BAD_MERGE
- results_page_path = self._host.filesystem.splitext(output_json_path)[0] + '.html'
- self._generate_output_files(output_json_path, results_page_path, output)
+ filesystem = self._host.filesystem
+ json_output = json.dumps(output)
+ filesystem.write_text_file(output_json_path, json_output)
- if options.test_results_server:
- if not self._upload_json(options.test_results_server, output_json_path):
- return self.EXIT_CODE_FAILED_UPLOADING
+ template_path = filesystem.join(self._port.perf_tests_dir(), 'resources/results-template.html')
+ template = filesystem.read_text_file(template_path)
- if options.show_results:
- self._port.show_results_html_file(results_page_path)
+ absolute_path_to_trunk = filesystem.dirname(self._port.perf_tests_dir())
+ results_page = template.replace('%AbsolutePathToWebKitTrunk%', absolute_path_to_trunk)
+ results_page = results_page.replace('%PeformanceTestsResultsJSON%', json_output)
+
+ filesystem.write_text_file(self._results_page_path(), results_page)
def _generate_results_dict(self, timestamp, description, platform, builder_name, build_number):
- contents = {'results': self._results}
- if description:
- contents['description'] = description
+ revisions = {}
for (name, path) in self._port.repository_paths():
scm = SCMDetector(self._host.filesystem, self._host.executive).detect_scm_system(path) or self._host.scm()
- contents[name + '-revision'] = scm.svn_revision(path)
-
- # FIXME: Add --branch or auto-detect the branch we're in
- for key, value in {'timestamp': int(timestamp), 'branch': self._default_branch, 'platform': platform,
- 'builder-name': builder_name, 'build-number': int(build_number) if build_number else None}.items():
+ revision = scm.svn_revision(path)
+ revisions[name] = {'revision': revision, 'timestamp': scm.timestamp_of_revision(path, revision)}
+
+ meta_info = {
+ 'description': description,
+ 'buildTime': self._datetime_in_ES5_compatible_iso_format(self._utc_timestamp),
+ 'platform': platform,
+ 'revisions': revisions,
+ 'builderName': builder_name,
+ 'buildNumber': int(build_number) if build_number else None}
+
+ contents = {'tests': {}}
+ for key, value in meta_info.items():
if value:
contents[key] = value
+ for test, metrics in self._results:
+ for metric_name, iteration_values in metrics.iteritems():
+ if not isinstance(iteration_values, list): # We can't reports results without individual measurements.
+ continue
+
+ tests = contents['tests']
+ path = test.test_name_without_file_extension().split('/')
+ for i in range(0, len(path)):
+ is_last_token = i + 1 == len(path)
+ url = view_source_url('PerformanceTests/' + (test.test_name() if is_last_token else '/'.join(path[0:i + 1])))
+ tests.setdefault(path[i], {'url': url})
+ current_test = tests[path[i]]
+ if is_last_token:
+ current_test.setdefault('metrics', {})
+ assert metric_name not in current_test['metrics']
+ current_test['metrics'][metric_name] = {'current': iteration_values}
+ else:
+ current_test.setdefault('tests', {})
+ tests = current_test['tests']
+
return contents
- def _merge_slave_config_json(self, slave_config_json_path, output):
+ @staticmethod
+ def _datetime_in_ES5_compatible_iso_format(datetime):
+ return datetime.strftime('%Y-%m-%dT%H:%M:%S.%f')
+
+ def _merge_slave_config_json(self, slave_config_json_path, contents):
if not self._host.filesystem.isfile(slave_config_json_path):
_log.error("Missing slave configuration JSON file: %s" % slave_config_json_path)
return None
@@ -250,7 +290,9 @@ class PerfTestsRunner(object):
try:
slave_config_json = self._host.filesystem.open_text_file_for_reading(slave_config_json_path)
slave_config = json.load(slave_config_json)
- return dict(slave_config.items() + output.items())
+ for key in slave_config:
+ contents['builder' + key.capitalize()] = slave_config[key]
+ return contents
except Exception, error:
_log.error("Failed to merge slave configuration JSON file %s: %s" % (slave_config_json_path, error))
return None
@@ -265,85 +307,48 @@ class PerfTestsRunner(object):
_log.error("Failed to merge output JSON file %s: %s" % (output_json_path, error))
return None
- def _generate_output_files(self, output_json_path, results_page_path, output):
- filesystem = self._host.filesystem
-
- json_output = json.dumps(output)
- filesystem.write_text_file(output_json_path, json_output)
-
- if results_page_path:
- template_path = filesystem.join(self._port.perf_tests_dir(), 'resources/results-template.html')
- template = filesystem.read_text_file(template_path)
-
- absolute_path_to_trunk = filesystem.dirname(self._port.perf_tests_dir())
- results_page = template.replace('%AbsolutePathToWebKitTrunk%', absolute_path_to_trunk)
- results_page = results_page.replace('%PeformanceTestsResultsJSON%', json_output)
-
- filesystem.write_text_file(results_page_path, results_page)
-
- def _upload_json(self, test_results_server, json_path, file_uploader=FileUploader):
- uploader = file_uploader("https://%s/api/test/report" % test_results_server, 120)
+ def _upload_json(self, test_results_server, json_path, host_path="/api/report", file_uploader=FileUploader):
+ url = "https://%s%s" % (test_results_server, host_path)
+ uploader = file_uploader(url, 120)
try:
response = uploader.upload_single_text_file(self._host.filesystem, 'application/json', json_path)
except Exception, error:
- _log.error("Failed to upload JSON file in 120s: %s" % error)
+ _log.error("Failed to upload JSON file to %s in 120s: %s" % (url, error))
return False
response_body = [line.strip('\n') for line in response]
if response_body != ['OK']:
- _log.error("Uploaded JSON but got a bad response:")
- for line in response_body:
- _log.error(line)
- return False
-
- _log.info("JSON file uploaded.")
+ try:
+ parsed_response = json.loads('\n'.join(response_body))
+ except:
+ _log.error("Uploaded JSON to %s but got a bad response:" % url)
+ for line in response_body:
+ _log.error(line)
+ return False
+ if parsed_response.get('status') != 'OK':
+ _log.error("Uploaded JSON to %s but got an error:" % url)
+ _log.error(json.dumps(parsed_response, indent=4))
+ return False
+
+ _log.info("JSON file uploaded to %s." % url)
return True
- def _print_status(self, tests, expected, unexpected):
- if len(tests) == expected + unexpected:
- status = "Ran %d tests" % len(tests)
- else:
- status = "Running %d of %d tests" % (expected + unexpected + 1, len(tests))
- if unexpected:
- status += " (%d didn't run)" % unexpected
- _log.info(status)
-
- def _run_tests_set(self, tests, port):
+ def _run_tests_set(self, tests):
result_count = len(tests)
- expected = 0
- unexpected = 0
- driver = None
-
- for test in tests:
- driver = port.create_driver(worker_number=0, no_timeout=True)
-
- if self._options.pause_before_testing:
- driver.start()
- if not self._host.user.confirm("Ready to run test?"):
- driver.stop()
- return unexpected
-
- _log.info('Running %s (%d of %d)' % (test.test_name(), expected + unexpected + 1, len(tests)))
- if self._run_single_test(test, driver):
- expected = expected + 1
+ failures = 0
+ self._results = []
+
+ for i, test in enumerate(tests):
+ _log.info('Running %s (%d of %d)' % (test.test_name(), i + 1, len(tests)))
+ start_time = time.time()
+ metrics = test.run(self._options.time_out_ms)
+ if metrics:
+ self._results.append((test, metrics))
else:
- unexpected = unexpected + 1
+ failures += 1
+ _log.error('FAILED')
+ _log.info('Finished: %f s' % (time.time() - start_time))
_log.info('')
- driver.stop()
-
- return unexpected
-
- def _run_single_test(self, test, driver):
- start_time = time.time()
-
- new_results = test.run(driver, self._options.time_out_ms)
- if new_results:
- self._results.update(new_results)
- else:
- _log.error('FAILED')
-
- _log.info("Finished: %f s" % (time.time() - start_time))
-
- return new_results != None
+ return failures
diff --git a/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py b/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py
new file mode 100644
index 000000000..a0832a9cd
--- /dev/null
+++ b/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_integrationtest.py
@@ -0,0 +1,562 @@
+# Copyright (C) 2012 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.
+
+"""Integration tests for run_perf_tests."""
+
+import StringIO
+import datetime
+import json
+import re
+import unittest2 as unittest
+
+from webkitpy.common.host_mock import MockHost
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.port.driver import DriverOutput
+from webkitpy.port.test import TestPort
+from webkitpy.performance_tests.perftest import PerfTest
+from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner
+
+
+class EventTargetWrapperTestData:
+ text = """Running 20 times
+Ignoring warm-up run (1502)
+1504
+1505
+1510
+1504
+1507
+1509
+1510
+1487
+1488
+1472
+1472
+1488
+1473
+1472
+1475
+1487
+1486
+1486
+1475
+1471
+
+Time:
+values 1486, 1471, 1510, 1505, 1478, 1490 ms
+avg 1490 ms
+median 1488 ms
+stdev 15.13935 ms
+min 1471 ms
+max 1510 ms
+"""
+
+ output = """Running Bindings/event-target-wrapper.html (1 of 2)
+RESULT Bindings: event-target-wrapper: Time= 1490.0 ms
+median= 1488.0 ms, stdev= 14.11751 ms, min= 1471.0 ms, max= 1510.0 ms
+Finished: 0.1 s
+
+"""
+
+ results = {'url': 'http://trac.webkit.org/browser/trunk/PerformanceTests/Bindings/event-target-wrapper.html',
+ 'metrics': {'Time': {'current': [[1486.0, 1471.0, 1510.0, 1505.0, 1478.0, 1490.0]] * 4}}}
+
+
+class SomeParserTestData:
+ text = """Running 20 times
+Ignoring warm-up run (1115)
+
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50861 ms
+min 1080 ms
+max 1120 ms
+"""
+
+ output = """Running Parser/some-parser.html (2 of 2)
+RESULT Parser: some-parser: Time= 1100.0 ms
+median= 1101.0 ms, stdev= 13.31402 ms, min= 1080.0 ms, max= 1120.0 ms
+Finished: 0.1 s
+
+"""
+
+ results = {'url': 'http://trac.webkit.org/browser/trunk/PerformanceTests/Parser/some-parser.html',
+ 'metrics': {'Time': {'current': [[1080.0, 1120.0, 1095.0, 1101.0, 1104.0]] * 4}}}
+
+
+class MemoryTestData:
+ text = """Running 20 times
+Ignoring warm-up run (1115)
+
+Time:
+values 1080, 1120, 1095, 1101, 1104 ms
+avg 1100 ms
+median 1101 ms
+stdev 14.50861 ms
+min 1080 ms
+max 1120 ms
+
+JS Heap:
+values 825000, 811000, 848000, 837000, 829000 bytes
+avg 830000 bytes
+median 829000 bytes
+stdev 13784.04875 bytes
+min 811000 bytes
+max 848000 bytes
+
+Malloc:
+values 529000, 511000, 548000, 536000, 521000 bytes
+avg 529000 bytes
+median 529000 bytes
+stdev 14124.44689 bytes
+min 511000 bytes
+max 548000 bytes
+"""
+
+ output = """Running 1 tests
+Running Parser/memory-test.html (1 of 1)
+RESULT Parser: memory-test: Time= 1100.0 ms
+median= 1101.0 ms, stdev= 13.31402 ms, min= 1080.0 ms, max= 1120.0 ms
+RESULT Parser: memory-test: JSHeap= 830000.0 bytes
+median= 829000.0 bytes, stdev= 12649.11064 bytes, min= 811000.0 bytes, max= 848000.0 bytes
+RESULT Parser: memory-test: Malloc= 529000.0 bytes
+median= 529000.0 bytes, stdev= 12961.48139 bytes, min= 511000.0 bytes, max= 548000.0 bytes
+Finished: 0.1 s
+"""
+
+ results = {'current': [[1080, 1120, 1095, 1101, 1104]] * 4}
+ js_heap_results = {'current': [[825000, 811000, 848000, 837000, 829000]] * 4}
+ malloc_results = {'current': [[529000, 511000, 548000, 536000, 521000]] * 4}
+
+
+class TestDriver:
+ def run_test(self, driver_input, stop_when_done):
+ text = ''
+ timeout = False
+ crash = False
+ if driver_input.test_name.endswith('pass.html'):
+ text = SomeParserTestData.text
+ elif driver_input.test_name.endswith('timeout.html'):
+ timeout = True
+ elif driver_input.test_name.endswith('failed.html'):
+ text = None
+ elif driver_input.test_name.endswith('tonguey.html'):
+ text = 'we are not expecting an output from perf tests but RESULT blablabla'
+ elif driver_input.test_name.endswith('crash.html'):
+ crash = True
+ elif driver_input.test_name.endswith('event-target-wrapper.html'):
+ text = EventTargetWrapperTestData.text
+ elif driver_input.test_name.endswith('some-parser.html'):
+ text = SomeParserTestData.text
+ elif driver_input.test_name.endswith('memory-test.html'):
+ text = MemoryTestData.text
+ return DriverOutput(text, '', '', '', crash=crash, timeout=timeout)
+
+ def start(self):
+ """do nothing"""
+
+ def stop(self):
+ """do nothing"""
+
+
+class MainTest(unittest.TestCase):
+ def _normalize_output(self, log):
+ return re.sub(r'(stdev=\s+\d+\.\d{5})\d+', r'\1', re.sub(r'Finished: [0-9\.]+ s', 'Finished: 0.1 s', log))
+
+ def _load_output_json(self, runner):
+ json_content = runner._host.filesystem.read_text_file(runner._output_json_path())
+ return json.loads(re.sub(r'("stdev":\s*\d+\.\d{5})\d+', r'\1', json_content))
+
+ def create_runner(self, args=[], driver_class=TestDriver):
+ options, parsed_args = PerfTestsRunner._parse_args(args)
+ test_port = TestPort(host=MockHost(), options=options)
+ test_port.create_driver = lambda worker_number=None, no_timeout=False: driver_class()
+
+ runner = PerfTestsRunner(args=args, port=test_port)
+ runner._host.filesystem.maybe_make_directory(runner._base_path, 'inspector')
+ runner._host.filesystem.maybe_make_directory(runner._base_path, 'Bindings')
+ runner._host.filesystem.maybe_make_directory(runner._base_path, 'Parser')
+
+ return runner, test_port
+
+ def run_test(self, test_name):
+ runner, port = self.create_runner()
+ tests = [PerfTest(port, test_name, runner._host.filesystem.join('some-dir', test_name))]
+ return runner._run_tests_set(tests) == 0
+
+ def test_run_passing_test(self):
+ self.assertTrue(self.run_test('pass.html'))
+
+ def test_run_silent_test(self):
+ self.assertFalse(self.run_test('silent.html'))
+
+ def test_run_failed_test(self):
+ self.assertFalse(self.run_test('failed.html'))
+
+ def test_run_tonguey_test(self):
+ self.assertFalse(self.run_test('tonguey.html'))
+
+ def test_run_timeout_test(self):
+ self.assertFalse(self.run_test('timeout.html'))
+
+ def test_run_crash_test(self):
+ self.assertFalse(self.run_test('crash.html'))
+
+ def _tests_for_runner(self, runner, test_names):
+ filesystem = runner._host.filesystem
+ tests = []
+ for test in test_names:
+ path = filesystem.join(runner._base_path, test)
+ dirname = filesystem.dirname(path)
+ tests.append(PerfTest(runner._port, test, path))
+ return tests
+
+ def test_run_test_set_kills_drt_per_run(self):
+
+ class TestDriverWithStopCount(TestDriver):
+ stop_count = 0
+ def stop(self):
+ TestDriverWithStopCount.stop_count += 1
+
+ runner, port = self.create_runner(driver_class=TestDriverWithStopCount)
+
+ tests = self._tests_for_runner(runner, ['inspector/pass.html', 'inspector/silent.html', 'inspector/failed.html',
+ 'inspector/tonguey.html', 'inspector/timeout.html', 'inspector/crash.html'])
+ unexpected_result_count = runner._run_tests_set(tests)
+
+ self.assertEqual(TestDriverWithStopCount.stop_count, 9)
+
+ def test_run_test_set_for_parser_tests(self):
+ runner, port = self.create_runner()
+ tests = self._tests_for_runner(runner, ['Bindings/event-target-wrapper.html', 'Parser/some-parser.html'])
+ output = OutputCapture()
+ output.capture_output()
+ try:
+ unexpected_result_count = runner._run_tests_set(tests)
+ finally:
+ stdout, stderr, log = output.restore_output()
+ self.assertEqual(unexpected_result_count, 0)
+ self.assertEqual(self._normalize_output(log), EventTargetWrapperTestData.output + SomeParserTestData.output)
+
+ def test_run_memory_test(self):
+ runner, port = self.create_runner_and_setup_results_template()
+ runner._timestamp = 123456789
+ port.host.filesystem.write_text_file(runner._base_path + '/Parser/memory-test.html', 'some content')
+
+ output = OutputCapture()
+ output.capture_output()
+ try:
+ unexpected_result_count = runner.run()
+ finally:
+ stdout, stderr, log = output.restore_output()
+ self.assertEqual(unexpected_result_count, 0)
+ self.assertEqual(self._normalize_output(log), MemoryTestData.output + '\nMOCK: user.open_url: file://...\n')
+ parser_tests = self._load_output_json(runner)[0]['tests']['Parser']['tests']
+ self.assertEqual(parser_tests['memory-test']['metrics']['Time'], MemoryTestData.results)
+ self.assertEqual(parser_tests['memory-test']['metrics']['JSHeap'], MemoryTestData.js_heap_results)
+ self.assertEqual(parser_tests['memory-test']['metrics']['Malloc'], MemoryTestData.malloc_results)
+
+ def _test_run_with_json_output(self, runner, filesystem, upload_succeeds=False, results_shown=True, expected_exit_code=0, repeat=1, compare_logs=True):
+ filesystem.write_text_file(runner._base_path + '/Parser/some-parser.html', 'some content')
+ filesystem.write_text_file(runner._base_path + '/Bindings/event-target-wrapper.html', 'some content')
+
+ uploaded = [False]
+
+ def mock_upload_json(hostname, json_path, host_path=None):
+ # FIXME: Get rid of the hard-coded perf.webkit.org once we've completed the transition.
+ self.assertIn(hostname, ['some.host'])
+ self.assertIn(json_path, ['/mock-checkout/output.json'])
+ self.assertIn(host_path, [None, '/api/report'])
+ uploaded[0] = upload_succeeds
+ return upload_succeeds
+
+ runner._upload_json = mock_upload_json
+ runner._timestamp = 123456789
+ runner._utc_timestamp = datetime.datetime(2013, 2, 8, 15, 19, 37, 460000)
+ output_capture = OutputCapture()
+ output_capture.capture_output()
+ try:
+ self.assertEqual(runner.run(), expected_exit_code)
+ finally:
+ stdout, stderr, logs = output_capture.restore_output()
+
+ if not expected_exit_code and compare_logs:
+ expected_logs = ''
+ for i in xrange(repeat):
+ runs = ' (Run %d of %d)' % (i + 1, repeat) if repeat > 1 else ''
+ expected_logs += 'Running 2 tests%s\n' % runs + EventTargetWrapperTestData.output + SomeParserTestData.output
+ if results_shown:
+ expected_logs += 'MOCK: user.open_url: file://...\n'
+ self.assertEqual(self._normalize_output(logs), expected_logs)
+
+ self.assertEqual(uploaded[0], upload_succeeds)
+
+ return logs
+
+ _event_target_wrapper_and_inspector_results = {
+ "Bindings":
+ {"url": "http://trac.webkit.org/browser/trunk/PerformanceTests/Bindings",
+ "tests": {"event-target-wrapper": EventTargetWrapperTestData.results}},
+ "Parser":
+ {"url": "http://trac.webkit.org/browser/trunk/PerformanceTests/Parser",
+ "tests": {"some-parser": SomeParserTestData.results}}}
+
+ def test_run_with_json_output(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server=some.host'])
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True)
+ self.assertEqual(self._load_output_json(runner), [{
+ "buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+
+ filesystem = port.host.filesystem
+ self.assertTrue(filesystem.isfile(runner._output_json_path()))
+ self.assertTrue(filesystem.isfile(filesystem.splitext(runner._output_json_path())[0] + '.html'))
+
+ def test_run_with_description(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server=some.host', '--description', 'some description'])
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True)
+ self.assertEqual(self._load_output_json(runner), [{
+ "buildTime": "2013-02-08T15:19:37.460000", "description": "some description",
+ "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+
+ def create_runner_and_setup_results_template(self, args=[]):
+ runner, port = self.create_runner(args)
+ filesystem = port.host.filesystem
+ filesystem.write_text_file(runner._base_path + '/resources/results-template.html',
+ 'BEGIN<script src="%AbsolutePathToWebKitTrunk%/some.js"></script>'
+ '<script src="%AbsolutePathToWebKitTrunk%/other.js"></script><script>%PeformanceTestsResultsJSON%</script>END')
+ filesystem.write_text_file(runner._base_path + '/Dromaeo/resources/dromaeo/web/lib/jquery-1.6.4.js', 'jquery content')
+ return runner, port
+
+ def test_run_respects_no_results(self):
+ runner, port = self.create_runner(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server=some.host', '--no-results'])
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=False, results_shown=False)
+ self.assertFalse(port.host.filesystem.isfile('/mock-checkout/output.json'))
+
+ def test_run_generates_json_by_default(self):
+ runner, port = self.create_runner_and_setup_results_template()
+ filesystem = port.host.filesystem
+ output_json_path = runner._output_json_path()
+ results_page_path = filesystem.splitext(output_json_path)[0] + '.html'
+
+ self.assertFalse(filesystem.isfile(output_json_path))
+ self.assertFalse(filesystem.isfile(results_page_path))
+
+ self._test_run_with_json_output(runner, port.host.filesystem)
+
+ self.assertEqual(self._load_output_json(runner), [{
+ "buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+
+ self.assertTrue(filesystem.isfile(output_json_path))
+ self.assertTrue(filesystem.isfile(results_page_path))
+
+ def test_run_merges_output_by_default(self):
+ runner, port = self.create_runner_and_setup_results_template()
+ filesystem = port.host.filesystem
+ output_json_path = runner._output_json_path()
+
+ filesystem.write_text_file(output_json_path, '[{"previous": "results"}]')
+
+ self._test_run_with_json_output(runner, port.host.filesystem)
+
+ self.assertEqual(self._load_output_json(runner), [{"previous": "results"}, {
+ "buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+ self.assertTrue(filesystem.isfile(filesystem.splitext(output_json_path)[0] + '.html'))
+
+ def test_run_respects_reset_results(self):
+ runner, port = self.create_runner_and_setup_results_template(args=["--reset-results"])
+ filesystem = port.host.filesystem
+ output_json_path = runner._output_json_path()
+
+ filesystem.write_text_file(output_json_path, '[{"previous": "results"}]')
+
+ self._test_run_with_json_output(runner, port.host.filesystem)
+
+ self.assertEqual(self._load_output_json(runner), [{
+ "buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+ self.assertTrue(filesystem.isfile(filesystem.splitext(output_json_path)[0] + '.html'))
+ pass
+
+ def test_run_generates_and_show_results_page(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
+ page_shown = []
+ port.show_results_html_file = lambda path: page_shown.append(path)
+ filesystem = port.host.filesystem
+ self._test_run_with_json_output(runner, filesystem, results_shown=False)
+
+ expected_entry = {"buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}
+
+ self.maxDiff = None
+ self.assertEqual(runner._output_json_path(), '/mock-checkout/output.json')
+ self.assertEqual(self._load_output_json(runner), [expected_entry])
+ self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'),
+ 'BEGIN<script src="/test.checkout/some.js"></script><script src="/test.checkout/other.js"></script>'
+ '<script>%s</script>END' % port.host.filesystem.read_text_file(runner._output_json_path()))
+ self.assertEqual(page_shown[0], '/mock-checkout/output.html')
+
+ self._test_run_with_json_output(runner, filesystem, results_shown=False)
+ self.assertEqual(runner._output_json_path(), '/mock-checkout/output.json')
+ self.assertEqual(self._load_output_json(runner), [expected_entry, expected_entry])
+ self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'),
+ 'BEGIN<script src="/test.checkout/some.js"></script><script src="/test.checkout/other.js"></script>'
+ '<script>%s</script>END' % port.host.filesystem.read_text_file(runner._output_json_path()))
+
+ def test_run_respects_no_show_results(self):
+ show_results_html_file = lambda path: page_shown.append(path)
+
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
+ page_shown = []
+ port.show_results_html_file = show_results_html_file
+ self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False)
+ self.assertEqual(page_shown[0], '/mock-checkout/output.html')
+
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--no-show-results'])
+ page_shown = []
+ port.show_results_html_file = show_results_html_file
+ self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False)
+ self.assertEqual(page_shown, [])
+
+ def test_run_with_bad_output_json(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
+ port.host.filesystem.write_text_file('/mock-checkout/output.json', 'bad json')
+ self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_MERGE)
+ port.host.filesystem.write_text_file('/mock-checkout/output.json', '{"another bad json": "1"}')
+ self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_MERGE)
+
+ def test_run_with_slave_config_json(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--slave-config-json-path=/mock-checkout/slave-config.json', '--test-results-server=some.host'])
+ port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '{"key": "value"}')
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True)
+ self.assertEqual(self._load_output_json(runner), [{
+ "buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}, "builderKey": "value"}])
+
+ def test_run_with_bad_slave_config_json(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--slave-config-json-path=/mock-checkout/slave-config.json', '--test-results-server=some.host'])
+ logs = self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON)
+ self.assertTrue('Missing slave configuration JSON file: /mock-checkout/slave-config.json' in logs)
+ port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', 'bad json')
+ self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON)
+ port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '["another bad json"]')
+ self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON)
+
+ def test_run_with_multiple_repositories(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server=some.host'])
+ port.repository_paths = lambda: [('webkit', '/mock-checkout'), ('some', '/mock-checkout/some')]
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True)
+ self.assertEqual(self._load_output_json(runner), [{
+ "buildTime": "2013-02-08T15:19:37.460000", "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"webkit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"},
+ "some": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+
+ def test_run_with_upload_json(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server', 'some.host', '--platform', 'platform1', '--builder-name', 'builder1', '--build-number', '123'])
+
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True)
+ generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json'])
+ self.assertEqual(generated_json[0]['platform'], 'platform1')
+ self.assertEqual(generated_json[0]['builderName'], 'builder1')
+ self.assertEqual(generated_json[0]['buildNumber'], 123)
+
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=False, expected_exit_code=PerfTestsRunner.EXIT_CODE_FAILED_UPLOADING)
+
+ def test_run_with_upload_json_should_generate_perf_webkit_json(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server', 'some.host', '--platform', 'platform1', '--builder-name', 'builder1', '--build-number', '123',
+ '--slave-config-json-path=/mock-checkout/slave-config.json'])
+ port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '{"key": "value1"}')
+
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True)
+ generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json'])
+ self.assertTrue(isinstance(generated_json, list))
+ self.assertEqual(len(generated_json), 1)
+
+ output = generated_json[0]
+ self.maxDiff = None
+ self.assertEqual(output['platform'], 'platform1')
+ self.assertEqual(output['buildNumber'], 123)
+ self.assertEqual(output['buildTime'], '2013-02-08T15:19:37.460000')
+ self.assertEqual(output['builderName'], 'builder1')
+ self.assertEqual(output['builderKey'], 'value1')
+ self.assertEqual(output['revisions'], {'WebKit': {'revision': '5678', 'timestamp': '2013-02-01 08:48:05 +0000'}})
+ self.assertEqual(output['tests'].keys(), ['Bindings', 'Parser'])
+ self.assertEqual(sorted(output['tests']['Bindings'].keys()), ['tests', 'url'])
+ self.assertEqual(output['tests']['Bindings']['url'], 'http://trac.webkit.org/browser/trunk/PerformanceTests/Bindings')
+ self.assertEqual(output['tests']['Bindings']['tests'].keys(), ['event-target-wrapper'])
+ self.assertEqual(output['tests']['Bindings']['tests']['event-target-wrapper'], {
+ 'url': 'http://trac.webkit.org/browser/trunk/PerformanceTests/Bindings/event-target-wrapper.html',
+ 'metrics': {'Time': {'current': [[1486.0, 1471.0, 1510.0, 1505.0, 1478.0, 1490.0]] * 4}}})
+
+ def test_run_with_repeat(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-results-server=some.host', '--repeat', '5'])
+ self._test_run_with_json_output(runner, port.host.filesystem, upload_succeeds=True, repeat=5)
+ self.assertEqual(self._load_output_json(runner), [
+ {"buildTime": "2013-02-08T15:19:37.460000",
+ "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}},
+ {"buildTime": "2013-02-08T15:19:37.460000",
+ "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}},
+ {"buildTime": "2013-02-08T15:19:37.460000",
+ "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}},
+ {"buildTime": "2013-02-08T15:19:37.460000",
+ "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}},
+ {"buildTime": "2013-02-08T15:19:37.460000",
+ "tests": self._event_target_wrapper_and_inspector_results,
+ "revisions": {"WebKit": {"timestamp": "2013-02-01 08:48:05 +0000", "revision": "5678"}}}])
+
+ def test_run_with_test_runner_count(self):
+ runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
+ '--test-runner-count=3'])
+ self._test_run_with_json_output(runner, port.host.filesystem, compare_logs=False)
+ generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json'])
+ self.assertTrue(isinstance(generated_json, list))
+ self.assertEqual(len(generated_json), 1)
+
+ output = generated_json[0]['tests']['Bindings']['tests']['event-target-wrapper']['metrics']['Time']['current']
+ self.assertEqual(len(output), 3)
+ expectedMetrics = EventTargetWrapperTestData.results['metrics']['Time']['current'][0]
+ for metrics in output:
+ self.assertEqual(metrics, expectedMetrics)
diff --git a/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py b/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py
index 16a05599c..29bd7a8b1 100755..100644
--- a/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py
+++ b/Tools/Scripts/webkitpy/performance_tests/perftestsrunner_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -32,526 +31,25 @@
import StringIO
import json
import re
-import unittest
+import unittest2 as unittest
from webkitpy.common.host_mock import MockHost
-from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.layout_tests.port.driver import DriverInput, DriverOutput
-from webkitpy.layout_tests.port.test import TestPort
-from webkitpy.layout_tests.views import printing
-from webkitpy.performance_tests.perftest import ChromiumStylePerfTest
-from webkitpy.performance_tests.perftest import PerfTest
+from webkitpy.port.test import TestPort
+from webkitpy.performance_tests.perftest import DEFAULT_TEST_RUNNER_COUNT
from webkitpy.performance_tests.perftestsrunner import PerfTestsRunner
class MainTest(unittest.TestCase):
- def assertWritten(self, stream, contents):
- self.assertEqual(stream.buflist, contents)
-
- def normalizeFinishedTime(self, log):
- return re.sub(r'Finished: [0-9\.]+ s', 'Finished: 0.1 s', log)
-
- class TestDriver:
- def run_test(self, driver_input, stop_when_done):
- text = ''
- timeout = False
- crash = False
- if driver_input.test_name.endswith('pass.html'):
- text = 'RESULT group_name: test_name= 42 ms'
- elif driver_input.test_name.endswith('timeout.html'):
- timeout = True
- elif driver_input.test_name.endswith('failed.html'):
- text = None
- elif driver_input.test_name.endswith('tonguey.html'):
- text = 'we are not expecting an output from perf tests but RESULT blablabla'
- elif driver_input.test_name.endswith('crash.html'):
- crash = True
- elif driver_input.test_name.endswith('event-target-wrapper.html'):
- text = """Running 20 times
-Ignoring warm-up run (1502)
-1504
-1505
-1510
-1504
-1507
-1509
-1510
-1487
-1488
-1472
-1472
-1488
-1473
-1472
-1475
-1487
-1486
-1486
-1475
-1471
-
-Time:
-values 1504, 1505, 1510, 1504, 1507, 1509, 1510, 1487, 1488, 1472, 1472, 1488, 1473, 1472, 1475, 1487, 1486, 1486, 1475, 1471 ms
-avg 1489.05 ms
-median 1487 ms
-stdev 14.46 ms
-min 1471 ms
-max 1510 ms
-"""
- elif driver_input.test_name.endswith('some-parser.html'):
- text = """Running 20 times
-Ignoring warm-up run (1115)
-
-Time:
-values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ms
-avg 1100 ms
-median 1101 ms
-stdev 11 ms
-min 1080 ms
-max 1120 ms
-"""
- elif driver_input.test_name.endswith('memory-test.html'):
- text = """Running 20 times
-Ignoring warm-up run (1115)
-
-Time:
-values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ms
-avg 1100 ms
-median 1101 ms
-stdev 11 ms
-min 1080 ms
-max 1120 ms
-
-JS Heap:
-values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 bytes
-avg 832000 bytes
-median 829000 bytes
-stdev 15000 bytes
-min 811000 bytes
-max 848000 bytes
-
-Malloc:
-values 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 bytes
-avg 532000 bytes
-median 529000 bytes
-stdev 13000 bytes
-min 511000 bytes
-max 548000 bytes
-"""
- return DriverOutput(text, '', '', '', crash=crash, timeout=timeout)
-
- def start(self):
- """do nothing"""
-
- def stop(self):
- """do nothing"""
-
- def create_runner(self, args=[], driver_class=TestDriver):
+ def create_runner(self, args=[]):
options, parsed_args = PerfTestsRunner._parse_args(args)
test_port = TestPort(host=MockHost(), options=options)
- test_port.create_driver = lambda worker_number=None, no_timeout=False: driver_class()
-
runner = PerfTestsRunner(args=args, port=test_port)
runner._host.filesystem.maybe_make_directory(runner._base_path, 'inspector')
runner._host.filesystem.maybe_make_directory(runner._base_path, 'Bindings')
runner._host.filesystem.maybe_make_directory(runner._base_path, 'Parser')
-
- filesystem = runner._host.filesystem
- runner.load_output_json = lambda: json.loads(filesystem.read_text_file(runner._output_json_path()))
return runner, test_port
- def run_test(self, test_name):
- runner, port = self.create_runner()
- driver = MainTest.TestDriver()
- return runner._run_single_test(ChromiumStylePerfTest(port, test_name, runner._host.filesystem.join('some-dir', test_name)), driver)
-
- def test_run_passing_test(self):
- self.assertTrue(self.run_test('pass.html'))
-
- def test_run_silent_test(self):
- self.assertFalse(self.run_test('silent.html'))
-
- def test_run_failed_test(self):
- self.assertFalse(self.run_test('failed.html'))
-
- def test_run_tonguey_test(self):
- self.assertFalse(self.run_test('tonguey.html'))
-
- def test_run_timeout_test(self):
- self.assertFalse(self.run_test('timeout.html'))
-
- def test_run_crash_test(self):
- self.assertFalse(self.run_test('crash.html'))
-
- def _tests_for_runner(self, runner, test_names):
- filesystem = runner._host.filesystem
- tests = []
- for test in test_names:
- path = filesystem.join(runner._base_path, test)
- dirname = filesystem.dirname(path)
- if test.startswith('inspector/'):
- tests.append(ChromiumStylePerfTest(runner._port, test, path))
- else:
- tests.append(PerfTest(runner._port, test, path))
- return tests
-
- def test_run_test_set(self):
- runner, port = self.create_runner()
- tests = self._tests_for_runner(runner, ['inspector/pass.html', 'inspector/silent.html', 'inspector/failed.html',
- 'inspector/tonguey.html', 'inspector/timeout.html', 'inspector/crash.html'])
- output = OutputCapture()
- output.capture_output()
- try:
- unexpected_result_count = runner._run_tests_set(tests, port)
- finally:
- stdout, stderr, log = output.restore_output()
- self.assertEqual(unexpected_result_count, len(tests) - 1)
- self.assertTrue('\nRESULT group_name: test_name= 42 ms\n' in log)
-
- def test_run_test_set_kills_drt_per_run(self):
-
- class TestDriverWithStopCount(MainTest.TestDriver):
- stop_count = 0
-
- def stop(self):
- TestDriverWithStopCount.stop_count += 1
-
- runner, port = self.create_runner(driver_class=TestDriverWithStopCount)
-
- tests = self._tests_for_runner(runner, ['inspector/pass.html', 'inspector/silent.html', 'inspector/failed.html',
- 'inspector/tonguey.html', 'inspector/timeout.html', 'inspector/crash.html'])
- unexpected_result_count = runner._run_tests_set(tests, port)
-
- self.assertEqual(TestDriverWithStopCount.stop_count, 6)
-
- def test_run_test_pause_before_testing(self):
- class TestDriverWithStartCount(MainTest.TestDriver):
- start_count = 0
-
- def start(self):
- TestDriverWithStartCount.start_count += 1
-
- runner, port = self.create_runner(args=["--pause-before-testing"], driver_class=TestDriverWithStartCount)
- tests = self._tests_for_runner(runner, ['inspector/pass.html'])
-
- output = OutputCapture()
- output.capture_output()
- try:
- unexpected_result_count = runner._run_tests_set(tests, port)
- self.assertEqual(TestDriverWithStartCount.start_count, 1)
- finally:
- stdout, stderr, log = output.restore_output()
- self.assertEqual(self.normalizeFinishedTime(log),
- "Ready to run test?\nRunning inspector/pass.html (1 of 1)\nRESULT group_name: test_name= 42 ms\nFinished: 0.1 s\n\n")
-
- def test_run_test_set_for_parser_tests(self):
- runner, port = self.create_runner()
- tests = self._tests_for_runner(runner, ['Bindings/event-target-wrapper.html', 'Parser/some-parser.html'])
- output = OutputCapture()
- output.capture_output()
- try:
- unexpected_result_count = runner._run_tests_set(tests, port)
- finally:
- stdout, stderr, log = output.restore_output()
- self.assertEqual(unexpected_result_count, 0)
- self.assertEqual(self.normalizeFinishedTime(log), '\n'.join(['Running Bindings/event-target-wrapper.html (1 of 2)',
- 'RESULT Bindings: event-target-wrapper= 1489.05 ms',
- 'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms',
- 'Finished: 0.1 s',
- '',
- 'Running Parser/some-parser.html (2 of 2)',
- 'RESULT Parser: some-parser= 1100.0 ms',
- 'median= 1101.0 ms, stdev= 11.0 ms, min= 1080.0 ms, max= 1120.0 ms',
- 'Finished: 0.1 s',
- '', '']))
-
- def test_run_memory_test(self):
- runner, port = self.create_runner_and_setup_results_template()
- runner._timestamp = 123456789
- port.host.filesystem.write_text_file(runner._base_path + '/Parser/memory-test.html', 'some content')
-
- output = OutputCapture()
- output.capture_output()
- try:
- unexpected_result_count = runner.run()
- finally:
- stdout, stderr, log = output.restore_output()
- self.assertEqual(unexpected_result_count, 0)
- self.assertEqual(self.normalizeFinishedTime(log), '\n'.join([
- 'Running 1 tests',
- 'Running Parser/memory-test.html (1 of 1)',
- 'RESULT Parser: memory-test= 1100.0 ms',
- 'median= 1101.0 ms, stdev= 11.0 ms, min= 1080.0 ms, max= 1120.0 ms',
- 'RESULT Parser: memory-test: JSHeap= 832000.0 bytes',
- 'median= 829000.0 bytes, stdev= 15000.0 bytes, min= 811000.0 bytes, max= 848000.0 bytes',
- 'RESULT Parser: memory-test: Malloc= 532000.0 bytes',
- 'median= 529000.0 bytes, stdev= 13000.0 bytes, min= 511000.0 bytes, max= 548000.0 bytes',
- 'Finished: 0.1 s',
- '',
- 'MOCK: user.open_url: file://...',
- '']))
- results = runner.load_output_json()[0]['results']
- values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
- self.assertEqual(results['Parser/memory-test'], {'min': 1080.0, 'max': 1120.0, 'median': 1101.0, 'stdev': 11.0, 'avg': 1100.0, 'unit': 'ms', 'values': values})
- self.assertEqual(results['Parser/memory-test:JSHeap'], {'min': 811000.0, 'max': 848000.0, 'median': 829000.0, 'stdev': 15000.0, 'avg': 832000.0, 'unit': 'bytes', 'values': values})
- self.assertEqual(results['Parser/memory-test:Malloc'], {'min': 511000.0, 'max': 548000.0, 'median': 529000.0, 'stdev': 13000.0, 'avg': 532000.0, 'unit': 'bytes', 'values': values})
-
- def _test_run_with_json_output(self, runner, filesystem, upload_suceeds=False, results_shown=True, expected_exit_code=0):
- filesystem.write_text_file(runner._base_path + '/inspector/pass.html', 'some content')
- filesystem.write_text_file(runner._base_path + '/Bindings/event-target-wrapper.html', 'some content')
-
- uploaded = [False]
-
- def mock_upload_json(hostname, json_path):
- self.assertEqual(hostname, 'some.host')
- self.assertEqual(json_path, '/mock-checkout/output.json')
- uploaded[0] = upload_suceeds
- return upload_suceeds
-
- runner._upload_json = mock_upload_json
- runner._timestamp = 123456789
- output_capture = OutputCapture()
- output_capture.capture_output()
- try:
- self.assertEqual(runner.run(), expected_exit_code)
- finally:
- stdout, stderr, logs = output_capture.restore_output()
-
- if not expected_exit_code:
- expected_logs = '\n'.join(['Running 2 tests',
- 'Running Bindings/event-target-wrapper.html (1 of 2)',
- 'RESULT Bindings: event-target-wrapper= 1489.05 ms',
- 'median= 1487.0 ms, stdev= 14.46 ms, min= 1471.0 ms, max= 1510.0 ms',
- 'Finished: 0.1 s',
- '',
- 'Running inspector/pass.html (2 of 2)',
- 'RESULT group_name: test_name= 42 ms',
- 'Finished: 0.1 s',
- '', ''])
- if results_shown:
- expected_logs += 'MOCK: user.open_url: file://...\n'
- self.assertEqual(self.normalizeFinishedTime(logs), expected_logs)
-
- self.assertEqual(uploaded[0], upload_suceeds)
-
- return logs
-
- _event_target_wrapper_and_inspector_results = {
- "Bindings/event-target-wrapper": {"max": 1510, "avg": 1489.05, "median": 1487, "min": 1471, "stdev": 14.46, "unit": "ms",
- "values": [1504, 1505, 1510, 1504, 1507, 1509, 1510, 1487, 1488, 1472, 1472, 1488, 1473, 1472, 1475, 1487, 1486, 1486, 1475, 1471]},
- "inspector/pass.html:group_name:test_name": 42}
-
- def test_run_with_json_output(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--test-results-server=some.host'])
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=True)
- self.assertEqual(runner.load_output_json(), [{
- "timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk"}])
-
- filesystem = port.host.filesystem
- self.assertTrue(filesystem.isfile(runner._output_json_path()))
- self.assertTrue(filesystem.isfile(filesystem.splitext(runner._output_json_path())[0] + '.html'))
-
- def test_run_with_description(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--test-results-server=some.host', '--description', 'some description'])
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=True)
- self.assertEqual(runner.load_output_json(), [{
- "timestamp": 123456789, "description": "some description",
- "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk"}])
-
- def create_runner_and_setup_results_template(self, args=[]):
- runner, port = self.create_runner(args)
- filesystem = port.host.filesystem
- filesystem.write_text_file(runner._base_path + '/resources/results-template.html',
- 'BEGIN<script src="%AbsolutePathToWebKitTrunk%/some.js"></script>'
- '<script src="%AbsolutePathToWebKitTrunk%/other.js"></script><script>%PeformanceTestsResultsJSON%</script>END')
- filesystem.write_text_file(runner._base_path + '/Dromaeo/resources/dromaeo/web/lib/jquery-1.6.4.js', 'jquery content')
- return runner, port
-
- def test_run_respects_no_results(self):
- runner, port = self.create_runner(args=['--output-json-path=/mock-checkout/output.json',
- '--test-results-server=some.host', '--no-results'])
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=False, results_shown=False)
- self.assertFalse(port.host.filesystem.isfile('/mock-checkout/output.json'))
-
- def test_run_generates_json_by_default(self):
- runner, port = self.create_runner_and_setup_results_template()
- filesystem = port.host.filesystem
- output_json_path = runner._output_json_path()
- results_page_path = filesystem.splitext(output_json_path)[0] + '.html'
-
- self.assertFalse(filesystem.isfile(output_json_path))
- self.assertFalse(filesystem.isfile(results_page_path))
-
- self._test_run_with_json_output(runner, port.host.filesystem)
-
- self.assertEqual(json.loads(port.host.filesystem.read_text_file(output_json_path)), [{
- "timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk"}])
-
- self.assertTrue(filesystem.isfile(output_json_path))
- self.assertTrue(filesystem.isfile(results_page_path))
-
- def test_run_merges_output_by_default(self):
- runner, port = self.create_runner_and_setup_results_template()
- filesystem = port.host.filesystem
- output_json_path = runner._output_json_path()
-
- filesystem.write_text_file(output_json_path, '[{"previous": "results"}]')
-
- self._test_run_with_json_output(runner, port.host.filesystem)
-
- self.assertEqual(json.loads(port.host.filesystem.read_text_file(output_json_path)), [{"previous": "results"}, {
- "timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk"}])
- self.assertTrue(filesystem.isfile(filesystem.splitext(output_json_path)[0] + '.html'))
-
- def test_run_respects_reset_results(self):
- runner, port = self.create_runner_and_setup_results_template(args=["--reset-results"])
- filesystem = port.host.filesystem
- output_json_path = runner._output_json_path()
-
- filesystem.write_text_file(output_json_path, '[{"previous": "results"}]')
-
- self._test_run_with_json_output(runner, port.host.filesystem)
-
- self.assertEqual(json.loads(port.host.filesystem.read_text_file(output_json_path)), [{
- "timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk"}])
- self.assertTrue(filesystem.isfile(filesystem.splitext(output_json_path)[0] + '.html'))
- pass
-
- def test_run_generates_and_show_results_page(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
- page_shown = []
- port.show_results_html_file = lambda path: page_shown.append(path)
- filesystem = port.host.filesystem
- self._test_run_with_json_output(runner, filesystem, results_shown=False)
-
- expected_entry = {"timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk"}
-
- self.maxDiff = None
- json_output = port.host.filesystem.read_text_file('/mock-checkout/output.json')
- self.assertEqual(json.loads(json_output), [expected_entry])
- self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'),
- 'BEGIN<script src="/test.checkout/some.js"></script><script src="/test.checkout/other.js"></script>'
- '<script>%s</script>END' % json_output)
- self.assertEqual(page_shown[0], '/mock-checkout/output.html')
-
- self._test_run_with_json_output(runner, filesystem, results_shown=False)
- json_output = port.host.filesystem.read_text_file('/mock-checkout/output.json')
- self.assertEqual(json.loads(json_output), [expected_entry, expected_entry])
- self.assertEqual(filesystem.read_text_file('/mock-checkout/output.html'),
- 'BEGIN<script src="/test.checkout/some.js"></script><script src="/test.checkout/other.js"></script>'
- '<script>%s</script>END' % json_output)
-
- def test_run_respects_no_show_results(self):
- show_results_html_file = lambda path: page_shown.append(path)
-
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
- page_shown = []
- port.show_results_html_file = show_results_html_file
- self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False)
- self.assertEqual(page_shown[0], '/mock-checkout/output.html')
-
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--no-show-results'])
- page_shown = []
- port.show_results_html_file = show_results_html_file
- self._test_run_with_json_output(runner, port.host.filesystem, results_shown=False)
- self.assertEqual(page_shown, [])
-
- def test_run_with_bad_output_json(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json'])
- port.host.filesystem.write_text_file('/mock-checkout/output.json', 'bad json')
- self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_MERGE)
- port.host.filesystem.write_text_file('/mock-checkout/output.json', '{"another bad json": "1"}')
- self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_MERGE)
-
- def test_run_with_slave_config_json(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--slave-config-json-path=/mock-checkout/slave-config.json', '--test-results-server=some.host'])
- port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '{"key": "value"}')
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=True)
- self.assertEqual(runner.load_output_json(), [{
- "timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "branch": "webkit-trunk", "key": "value"}])
-
- def test_run_with_bad_slave_config_json(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--slave-config-json-path=/mock-checkout/slave-config.json', '--test-results-server=some.host'])
- logs = self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON)
- self.assertTrue('Missing slave configuration JSON file: /mock-checkout/slave-config.json' in logs)
- port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', 'bad json')
- self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON)
- port.host.filesystem.write_text_file('/mock-checkout/slave-config.json', '["another bad json"]')
- self._test_run_with_json_output(runner, port.host.filesystem, expected_exit_code=PerfTestsRunner.EXIT_CODE_BAD_SOURCE_JSON)
-
- def test_run_with_multiple_repositories(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--test-results-server=some.host'])
- port.repository_paths = lambda: [('webkit', '/mock-checkout'), ('some', '/mock-checkout/some')]
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=True)
- self.assertEqual(runner.load_output_json(), [{
- "timestamp": 123456789, "results": self._event_target_wrapper_and_inspector_results,
- "webkit-revision": "5678", "some-revision": "5678", "branch": "webkit-trunk"}])
-
- def test_run_with_upload_json(self):
- runner, port = self.create_runner_and_setup_results_template(args=['--output-json-path=/mock-checkout/output.json',
- '--test-results-server', 'some.host', '--platform', 'platform1', '--builder-name', 'builder1', '--build-number', '123'])
-
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=True)
- generated_json = json.loads(port.host.filesystem.files['/mock-checkout/output.json'])
- self.assertEqual(generated_json[0]['platform'], 'platform1')
- self.assertEqual(generated_json[0]['builder-name'], 'builder1')
- self.assertEqual(generated_json[0]['build-number'], 123)
-
- self._test_run_with_json_output(runner, port.host.filesystem, upload_suceeds=False, expected_exit_code=PerfTestsRunner.EXIT_CODE_FAILED_UPLOADING)
-
- def test_upload_json(self):
- runner, port = self.create_runner()
- port.host.filesystem.files['/mock-checkout/some.json'] = 'some content'
-
- called = []
- upload_single_text_file_throws = False
- upload_single_text_file_return_value = StringIO.StringIO('OK')
-
- class MockFileUploader:
- def __init__(mock, url, timeout):
- self.assertEqual(url, 'https://some.host/api/test/report')
- self.assertTrue(isinstance(timeout, int) and timeout)
- called.append('FileUploader')
-
- def upload_single_text_file(mock, filesystem, content_type, filename):
- self.assertEqual(filesystem, port.host.filesystem)
- self.assertEqual(content_type, 'application/json')
- self.assertEqual(filename, 'some.json')
- called.append('upload_single_text_file')
- if upload_single_text_file_throws:
- raise "Some exception"
- return upload_single_text_file_return_value
-
- runner._upload_json('some.host', 'some.json', MockFileUploader)
- self.assertEqual(called, ['FileUploader', 'upload_single_text_file'])
-
- output = OutputCapture()
- output.capture_output()
- upload_single_text_file_return_value = StringIO.StringIO('Some error')
- runner._upload_json('some.host', 'some.json', MockFileUploader)
- _, _, logs = output.restore_output()
- self.assertEqual(logs, 'Uploaded JSON but got a bad response:\nSome error\n')
-
- # Throwing an exception upload_single_text_file shouldn't blow up _upload_json
- called = []
- upload_single_text_file_throws = True
- runner._upload_json('some.host', 'some.json', MockFileUploader)
- self.assertEqual(called, ['FileUploader', 'upload_single_text_file'])
-
def _add_file(self, runner, dirname, filename, content=True):
dirname = runner._host.filesystem.join(runner._base_path, dirname) if dirname else runner._base_path
runner._host.filesystem.maybe_make_directory(dirname)
@@ -576,7 +74,7 @@ max 548000 bytes
add_file('test2.html')
add_file('test3.html')
port.host.filesystem.chdir(runner._port.perf_tests_dir()[:runner._port.perf_tests_dir().rfind(runner._host.filesystem.sep)])
- self.assertEqual(self._collect_tests_and_sort_test_name(runner), ['test1.html', 'test2.html'])
+ self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner), ['test1.html', 'test2.html'])
def test_collect_tests_with_skipped_list(self):
runner, port = self.create_runner()
@@ -587,9 +85,22 @@ max 548000 bytes
self._add_file(runner, 'inspector/resources', 'resource_file.html')
self._add_file(runner, 'unsupported', 'unsupported_test2.html')
port.skipped_perf_tests = lambda: ['inspector/unsupported_test1.html', 'unsupported']
- self.assertEqual(self._collect_tests_and_sort_test_name(runner), ['inspector/test1.html', 'inspector/test2.html'])
-
- def test_collect_tests_with_skipped_list(self):
+ self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner), ['inspector/test1.html', 'inspector/test2.html'])
+
+ def test_collect_tests_with_skipped_list_and_files(self):
+ runner, port = self.create_runner(args=['Suite/Test1.html', 'Suite/SkippedTest1.html', 'SkippedSuite/Test1.html'])
+
+ self._add_file(runner, 'SkippedSuite', 'Test1.html')
+ self._add_file(runner, 'SkippedSuite', 'Test2.html')
+ self._add_file(runner, 'Suite', 'Test1.html')
+ self._add_file(runner, 'Suite', 'Test2.html')
+ self._add_file(runner, 'Suite', 'SkippedTest1.html')
+ self._add_file(runner, 'Suite', 'SkippedTest2.html')
+ port.skipped_perf_tests = lambda: ['Suite/SkippedTest1.html', 'Suite/SkippedTest1.html', 'SkippedSuite']
+ self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner),
+ ['SkippedSuite/Test1.html', 'Suite/SkippedTest1.html', 'Suite/Test1.html'])
+
+ def test_collect_tests_with_ignored_skipped_list(self):
runner, port = self.create_runner(args=['--force'])
self._add_file(runner, 'inspector', 'test1.html')
@@ -598,12 +109,12 @@ max 548000 bytes
self._add_file(runner, 'inspector/resources', 'resource_file.html')
self._add_file(runner, 'unsupported', 'unsupported_test2.html')
port.skipped_perf_tests = lambda: ['inspector/unsupported_test1.html', 'unsupported']
- self.assertEqual(self._collect_tests_and_sort_test_name(runner), ['inspector/test1.html', 'inspector/test2.html', 'inspector/unsupported_test1.html', 'unsupported/unsupported_test2.html'])
+ self.assertItemsEqual(self._collect_tests_and_sort_test_name(runner), ['inspector/test1.html', 'inspector/test2.html', 'inspector/unsupported_test1.html', 'unsupported/unsupported_test2.html'])
def test_collect_tests_should_ignore_replay_tests_by_default(self):
runner, port = self.create_runner()
self._add_file(runner, 'Replay', 'www.webkit.org.replay')
- self.assertEqual(runner._collect_tests(), [])
+ self.assertItemsEqual(runner._collect_tests(), [])
def test_collect_tests_with_replay_tests(self):
runner, port = self.create_runner(args=['--replay'])
@@ -612,6 +123,18 @@ max 548000 bytes
self.assertEqual(len(tests), 1)
self.assertEqual(tests[0].__class__.__name__, 'ReplayPerfTest')
+ def test_default_args(self):
+ runner, port = self.create_runner()
+ options, args = PerfTestsRunner._parse_args([])
+ self.assertTrue(options.build)
+ self.assertEqual(options.time_out_ms, 600 * 1000)
+ self.assertTrue(options.generate_results)
+ self.assertTrue(options.show_results)
+ self.assertFalse(options.replay)
+ self.assertTrue(options.use_skipped_list)
+ self.assertEqual(options.repeat, 1)
+ self.assertEqual(options.test_runner_count, DEFAULT_TEST_RUNNER_COUNT)
+
def test_parse_args(self):
runner, port = self.create_runner()
options, args = PerfTestsRunner._parse_args([
@@ -625,20 +148,84 @@ max 548000 bytes
'--output-json-path=a/output.json',
'--slave-config-json-path=a/source.json',
'--test-results-server=somehost',
+ '--additional-drt-flag=--enable-threaded-parser',
+ '--additional-drt-flag=--awesomesauce',
+ '--repeat=5',
+ '--test-runner-count=5',
'--debug'])
- self.assertEqual(options.build, True)
+ self.assertTrue(options.build)
self.assertEqual(options.build_directory, 'folder42')
self.assertEqual(options.platform, 'platform42')
self.assertEqual(options.builder_name, 'webkit-mac-1')
self.assertEqual(options.build_number, '56')
self.assertEqual(options.time_out_ms, '42')
self.assertEqual(options.configuration, 'Debug')
- self.assertEqual(options.show_results, False)
- self.assertEqual(options.reset_results, True)
+ self.assertFalse(options.show_results)
+ self.assertTrue(options.reset_results)
self.assertEqual(options.output_json_path, 'a/output.json')
self.assertEqual(options.slave_config_json_path, 'a/source.json')
self.assertEqual(options.test_results_server, 'somehost')
+ self.assertEqual(options.additional_drt_flag, ['--enable-threaded-parser', '--awesomesauce'])
+ self.assertEqual(options.repeat, 5)
+ self.assertEqual(options.test_runner_count, 5)
+
+ def test_upload_json(self):
+ runner, port = self.create_runner()
+ port.host.filesystem.files['/mock-checkout/some.json'] = 'some content'
+
+ class MockFileUploader:
+ called = []
+ upload_single_text_file_throws = False
+ upload_single_text_file_return_value = None
+ @classmethod
+ def reset(cls):
+ cls.called = []
+ cls.upload_single_text_file_throws = False
+ cls.upload_single_text_file_return_value = None
-if __name__ == '__main__':
- unittest.main()
+ def __init__(mock, url, timeout):
+ self.assertEqual(url, 'https://some.host/some/path')
+ self.assertTrue(isinstance(timeout, int) and timeout)
+ mock.called.append('FileUploader')
+
+ def upload_single_text_file(mock, filesystem, content_type, filename):
+ self.assertEqual(filesystem, port.host.filesystem)
+ self.assertEqual(content_type, 'application/json')
+ self.assertEqual(filename, 'some.json')
+ mock.called.append('upload_single_text_file')
+ if mock.upload_single_text_file_throws:
+ raise Exception
+ return mock.upload_single_text_file_return_value
+
+ MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('OK')
+ self.assertTrue(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader))
+ self.assertEqual(MockFileUploader.called, ['FileUploader', 'upload_single_text_file'])
+
+ MockFileUploader.reset()
+ MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('Some error')
+ output = OutputCapture()
+ output.capture_output()
+ self.assertFalse(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader))
+ _, _, logs = output.restore_output()
+ self.assertEqual(logs, 'Uploaded JSON to https://some.host/some/path but got a bad response:\nSome error\n')
+
+ # Throwing an exception upload_single_text_file shouldn't blow up _upload_json
+ MockFileUploader.reset()
+ MockFileUploader.upload_single_text_file_throws = True
+ self.assertFalse(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader))
+ self.assertEqual(MockFileUploader.called, ['FileUploader', 'upload_single_text_file'])
+
+ MockFileUploader.reset()
+ MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('{"status": "OK"}')
+ self.assertTrue(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader))
+ self.assertEqual(MockFileUploader.called, ['FileUploader', 'upload_single_text_file'])
+
+ MockFileUploader.reset()
+ MockFileUploader.upload_single_text_file_return_value = StringIO.StringIO('{"status": "SomethingHasFailed", "failureStored": false}')
+ output = OutputCapture()
+ output.capture_output()
+ self.assertFalse(runner._upload_json('some.host', 'some.json', '/some/path', MockFileUploader))
+ _, _, logs = output.restore_output()
+ serialized_json = json.dumps({'status': 'SomethingHasFailed', 'failureStored': False}, indent=4)
+ self.assertEqual(logs, 'Uploaded JSON to https://some.host/some/path but got an error:\n%s\n' % serialized_json)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/__init__.py b/Tools/Scripts/webkitpy/port/__init__.py
index 6365b4ce8..b2a50844c 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/__init__.py
+++ b/Tools/Scripts/webkitpy/port/__init__.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/apple.py b/Tools/Scripts/webkitpy/port/apple.py
index d434c8da8..966d04a9d 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/apple.py
+++ b/Tools/Scripts/webkitpy/port/apple.py
@@ -28,7 +28,7 @@
import logging
-from webkitpy.layout_tests.port.base import Port
+from webkitpy.port.base import Port
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
@@ -55,17 +55,21 @@ class ApplePort(Port):
@classmethod
def determine_full_port_name(cls, host, options, port_name):
- # If the port_name matches the (badly named) cls.port_name, that
- # means that they passed 'mac' or 'win' and didn't specify a version.
- # That convention means that we're supposed to use the version currently
- # being run, so this won't work if you're not on mac or win (respectively).
- # If you're not on the o/s in question, you must specify a full version or -future (cf. above).
- if port_name == cls.port_name:
- assert port_name == host.platform.os_name
- return cls.port_name + '-' + host.platform.os_version
- if port_name == cls.port_name + '-wk2':
- assert port_name == host.platform.os_name + '-wk2'
- return cls.port_name + '-' + host.platform.os_version + '-wk2'
+ options = options or {}
+ if port_name in (cls.port_name, cls.port_name + '-wk2'):
+ # If the port_name matches the (badly named) cls.port_name, that
+ # means that they passed 'mac' or 'win' and didn't specify a version.
+ # That convention means that we're supposed to use the version currently
+ # being run, so this won't work if you're not on mac or win (respectively).
+ # If you're not on the o/s in question, you must specify a full version or -future (cf. above).
+ assert host.platform.os_name in port_name, "%s is not in %s!" % (host.platform.os_name, port_name)
+ if port_name == cls.port_name and not getattr(options, 'webkit_test_runner', False):
+ port_name = cls.port_name + '-' + host.platform.os_version
+ else:
+ port_name = cls.port_name + '-' + host.platform.os_version + '-wk2'
+ elif getattr(options, 'webkit_test_runner', False) and '-wk2' not in port_name:
+ port_name += '-wk2'
+
return port_name
def _strip_port_name_prefix(self, port_name):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base.py b/Tools/Scripts/webkitpy/port/base.py
index 8c4578dbf..9ded9d193 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base.py
+++ b/Tools/Scripts/webkitpy/port/base.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -56,12 +55,12 @@ from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.systemhost import SystemHost
from webkitpy.common.webkit_finder import WebKitFinder
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port import config as port_config
-from webkitpy.layout_tests.port import driver
-from webkitpy.layout_tests.port import http_lock
-from webkitpy.layout_tests.port import image_diff
-from webkitpy.layout_tests.port import server_process
-from webkitpy.layout_tests.port.factory import PortFactory
+from webkitpy.port import config as port_config
+from webkitpy.port import driver
+from webkitpy.port import http_lock
+from webkitpy.port import image_diff
+from webkitpy.port import server_process
+from webkitpy.port.factory import PortFactory
from webkitpy.layout_tests.servers import apache_http_server
from webkitpy.layout_tests.servers import http_server
from webkitpy.layout_tests.servers import websocket_server
@@ -69,13 +68,11 @@ from webkitpy.layout_tests.servers import websocket_server
_log = logging.getLogger(__name__)
-# FIXME: This class should merge with WebKitPort now that Chromium behaves mostly like other webkit ports.
class Port(object):
"""Abstract class for Port-specific hooks for the layout_test package."""
# Subclasses override this. This should indicate the basic implementation
- # part of the port name, e.g., 'chromium-mac', 'win', 'gtk'; there is probably (?)
- # one unique value per class.
+ # part of the port name, e.g., 'win', 'gtk'; there is probably (?) one unique value per class.
# FIXME: We should probably rename this to something like 'implementation_name'.
port_name = None
@@ -89,15 +86,17 @@ class Port(object):
def determine_full_port_name(cls, host, options, port_name):
"""Return a fully-specified port name that can be used to construct objects."""
# Subclasses will usually override this.
- return cls.port_name
+ options = options or {}
+ assert port_name.startswith(cls.port_name)
+ if getattr(options, 'webkit_test_runner', False) and not '-wk2' in port_name:
+ return port_name + '-wk2'
+ return port_name
- def __init__(self, host, port_name=None, options=None, **kwargs):
+ def __init__(self, host, port_name, options=None, **kwargs):
# This value may be different from cls.port_name by having version modifiers
# and other fields appended to it (for example, 'qt-arm' or 'mac-wk2').
-
- # FIXME: port_name should be a required parameter. It isn't yet because lots of tests need to be updatd.
- self._name = port_name or self.port_name
+ self._name = port_name
# These are default values that should be overridden in a subclasses.
self._version = ''
@@ -108,6 +107,9 @@ class Port(object):
# options defined on it.
self._options = options or optparse.Values()
+ if self._name and '-wk2' in self._name:
+ self._options.webkit_test_runner = True
+
self.host = host
self._executive = host.executive
self._filesystem = host.filesystem
@@ -150,6 +152,9 @@ class Port(object):
def additional_drt_flag(self):
return []
+ def supports_per_test_timeout(self):
+ return False
+
def default_pixel_tests(self):
# FIXME: Disable until they are run by default on build.webkit.org.
return False
@@ -478,8 +483,7 @@ class Port(object):
suffix: file suffix of the expected results, including dot; e.g. '.txt'
or '.png'. This should not be None, but may be an empty string.
platform: the most-specific directory name to use to build the
- search list of directories, e.g., 'chromium-win', or
- 'chromium-cg-mac-leopard' (we follow the WebKit format)
+ search list of directories; e.g. 'mountainlion-wk2'
return_default: if True, returns the path to the generic expectation if nothing
else is found; if False, returns None.
@@ -567,13 +571,13 @@ class Port(object):
if not reftest_list:
reftest_list = []
for expectation, prefix in (('==', ''), ('!=', '-mismatch')):
- for extention in Port._supported_file_extensions:
+ for extention in Port._supported_reference_extensions:
path = self.expected_filename(test_name, prefix + extention)
if self._filesystem.exists(path):
reftest_list.append((expectation, path))
return reftest_list
- return reftest_list.get(self._filesystem.join(self.layout_tests_dir(), test_name), []) # pylint: disable-msg=E1103
+ return reftest_list.get(self._filesystem.join(self.layout_tests_dir(), test_name), []) # pylint: disable=E1103
def tests(self, paths):
"""Return the list of tests found. Both generic and platform-specific tests matching paths should be returned."""
@@ -602,14 +606,17 @@ class Port(object):
return [self.relative_test_filename(f) for f in files]
# When collecting test cases, we include any file with these extensions.
- _supported_file_extensions = set(['.html', '.shtml', '.xml', '.xhtml', '.pl',
- '.htm', '.php', '.svg', '.mht'])
+ _supported_test_extensions = set(['.html', '.shtml', '.xml', '.xhtml', '.pl', '.htm', '.php', '.svg', '.mht', '.xht'])
+ _supported_reference_extensions = set(['.html', '.xml', '.xhtml', '.htm', '.svg', '.xht'])
@staticmethod
+ # If any changes are made here be sure to update the isUsedInReftest method in old-run-webkit-tests as well.
def is_reference_html_file(filesystem, dirname, filename):
- if filename.startswith('ref-') or filename.endswith('notref-'):
+ if filename.startswith('ref-') or filename.startswith('notref-'):
return True
- filename_wihout_ext, unused = filesystem.splitext(filename)
+ filename_wihout_ext, ext = filesystem.splitext(filename)
+ if ext not in Port._supported_reference_extensions:
+ return False
for suffix in ['-expected', '-expected-mismatch', '-ref', '-notref']:
if filename_wihout_ext.endswith(suffix):
return True
@@ -619,7 +626,7 @@ class Port(object):
def _has_supported_extension(filesystem, filename):
"""Return true if filename is one of the file extensions we want to run a test on."""
extension = filesystem.splitext(filename)[1]
- return extension in Port._supported_file_extensions
+ return extension in Port._supported_test_extensions
@staticmethod
def _is_test_file(filesystem, dirname, filename):
@@ -767,9 +774,6 @@ class Port(object):
return True
return False
- def is_chromium(self):
- return False
-
def name(self):
"""Returns a name that uniquely identifies this particular type of port
(e.g., "mac-snowleopard" or "chromium-linux-x86_x64" and can be passed
@@ -798,6 +802,10 @@ class Port(object):
return self._options.ensure_value(name, default_value)
@memoized
+ def path_to_generic_test_expectations_file(self):
+ return self._filesystem.join(self.layout_tests_dir(), 'TestExpectations')
+
+ @memoized
def path_to_test_expectations_file(self):
"""Update the test expectations to the passed-in string.
@@ -807,11 +815,7 @@ class Port(object):
# FIXME: We need to remove this when we make rebaselining work with multiple files and just generalize expectations_files().
# test_expectations are always in mac/ not mac-leopard/ by convention, hence we use port_name instead of name().
- port_name = self.port_name
- if port_name.startswith('chromium'):
- port_name = 'chromium'
-
- return self._filesystem.join(self._webkit_baseline_path(port_name), 'TestExpectations')
+ return self._filesystem.join(self._webkit_baseline_path(self.port_name), 'TestExpectations')
def relative_test_filename(self, filename):
"""Returns a test_name a relative unix-style path for a filename under the LayoutTests
@@ -823,12 +827,6 @@ class Port(object):
else:
return self.host.filesystem.abspath(filename)
- def relative_perf_test_filename(self, filename):
- if filename.startswith(self.perf_tests_dir()):
- return self.host.filesystem.relpath(filename, self.perf_tests_dir())
- else:
- return self.host.filesystem.abspath(filename)
-
@memoized
def abspath_for_test(self, test_name):
"""Returns the full path to the file for a given test name. This is the
@@ -898,7 +896,10 @@ class Port(object):
# Most ports (?):
'WEBKIT_TESTFONTS',
- 'WEBKITOUTPUTDIR',
+ 'WEBKIT_OUTPUTDIR',
+
+ # Chromium:
+ 'CHROME_DEVEL_SANDBOX',
]
for variable in variables_to_copy:
self._copy_value_from_environ_if_set(clean_env, variable)
@@ -927,11 +928,6 @@ class Port(object):
method."""
pass
- def requires_http_server(self):
- """Does the port require an HTTP server for running tests? This could
- be the case when the tests aren't run on the host platform."""
- return False
-
def start_http_server(self, additional_dirs=None, number_of_servers=None):
"""Start a web server. Raise an error if it can't start or is already running.
@@ -1065,29 +1061,34 @@ class Port(object):
_log.warning("additional_expectations path '%s' does not exist" % path)
return expectations
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
# Unlike baseline_search_path, we only want to search [WK2-PORT, PORT-VERSION, PORT] and any directories
# included via --additional-platform-directory, not the full casade.
search_paths = [self.port_name]
- if self.name() != self.port_name:
- search_paths.append(self.name())
+
+ non_wk2_name = self.name().replace('-wk2', '')
+ if non_wk2_name != self.port_name:
+ search_paths.append(non_wk2_name)
if self.get_option('webkit_test_runner'):
# Because nearly all of the skipped tests for WebKit 2 are due to cross-platform
# issues, all wk2 ports share a skipped list under platform/wk2.
- search_paths.extend([self._wk2_port_name(), "wk2"])
+ search_paths.extend(["wk2", self._wk2_port_name()])
search_paths.extend(self.get_option("additional_platform_directory", []))
return [self._filesystem.join(self._webkit_baseline_path(d), 'TestExpectations') for d in search_paths]
+ def expectations_files(self):
+ return [self.path_to_generic_test_expectations_file()] + self._port_specific_expectations_files()
+
def repository_paths(self):
"""Returns a list of (repository_name, repository_path) tuples of its depending code base.
- By default it returns a list that only contains a ('webkit', <webkitRepossitoryPath>) tuple."""
+ By default it returns a list that only contains a ('WebKit', <webkitRepositoryPath>) tuple."""
- # We use LayoutTest directory here because webkit_base isn't a part webkit repository in Chromium port
+ # We use LayoutTest directory here because webkit_base isn't a part of WebKit repository in Chromium port
# where turnk isn't checked out as a whole.
- return [('webkit', self.layout_tests_dir())]
+ return [('WebKit', self.layout_tests_dir())]
_WDIFF_DEL = '##WDIFF_DEL##'
_WDIFF_ADD = '##WDIFF_ADD##'
@@ -1205,15 +1206,24 @@ class Port(object):
def _is_debian_based(self):
return self._filesystem.exists('/etc/debian_version')
+ def _is_arch_based(self):
+ return self._filesystem.exists('/etc/arch-release')
+
+ def _apache_version(self):
+ config = self._executive.run_command([self._path_to_apache(), '-v'])
+ return re.sub(r'(?:.|\n)*Server version: Apache/(\d+\.\d+)(?:.|\n)*', r'\1', config)
+
# We pass sys_platform into this method to make it easy to unit test.
def _apache_config_file_name_for_platform(self, sys_platform):
if sys_platform == 'cygwin':
return 'cygwin-httpd.conf' # CYGWIN is the only platform to still use Apache 1.3.
if sys_platform.startswith('linux'):
if self._is_redhat_based():
- return 'fedora-httpd.conf' # This is an Apache 2.x config file despite the naming.
+ return 'fedora-httpd-' + self._apache_version() + '.conf'
if self._is_debian_based():
- return 'apache2-debian-httpd.conf'
+ return 'debian-httpd-' + self._apache_version() + '.conf'
+ if self._is_arch_based():
+ return 'archlinux-httpd.conf'
# All platforms use apache2 except for CYGWIN (and Mac OS X Tiger and prior, which we no longer support).
return "apache2-httpd.conf"
@@ -1252,6 +1262,12 @@ class Port(object):
"""Returns the full path to the test driver (DumpRenderTree)."""
return self._build_path(self.driver_name())
+ def _driver_tempdir(self):
+ return self._filesystem.mkdtemp(prefix='%s-' % self.driver_name())
+
+ def _driver_tempdir_for_environment(self):
+ return self._driver_tempdir()
+
def _path_to_webcore_library(self):
"""Returns the full path to a built copy of WebCore."""
return None
@@ -1325,12 +1341,19 @@ class Port(object):
def look_for_new_crash_logs(self, crashed_processes, start_time):
pass
+ def look_for_new_samples(self, unresponsive_processes, start_time):
+ pass
+
def sample_process(self, name, pid):
pass
def virtual_test_suites(self):
return []
+ def find_system_pid(self, name, pid):
+ # This is only overridden on Windows
+ return pid
+
@memoized
def populated_virtual_test_suites(self):
suites = self.virtual_test_suites()
@@ -1387,7 +1410,6 @@ class Port(object):
def _port_flag_for_scripts(self):
# This is overrriden by ports which need a flag passed to scripts to distinguish the use of that port.
# For example --qt on linux, since a user might have both Gtk and Qt libraries installed.
- # FIXME: Chromium should override this once ChromiumPort is a WebKitPort.
return None
# This is modeled after webkitdirs.pm argumentsForConfiguration() from old-run-webkit-tests
@@ -1432,6 +1454,9 @@ class Port(object):
def _build_driver_flags(self):
return []
+ def test_search_path(self):
+ return self.baseline_search_path()
+
def _tests_for_other_platforms(self):
# By default we will skip any directory under LayoutTests/platform
# that isn't in our baseline search path (this mirrors what
@@ -1440,7 +1465,7 @@ class Port(object):
entries = self._filesystem.glob(self._webkit_baseline_path('*'))
dirs_to_skip = []
for entry in entries:
- if self._filesystem.isdir(entry) and entry not in self.baseline_search_path():
+ if self._filesystem.isdir(entry) and entry not in self.test_search_path():
basename = self._filesystem.basename(entry)
dirs_to_skip.append('platform/%s' % basename)
return dirs_to_skip
@@ -1481,23 +1506,6 @@ class Port(object):
"3D Rendering": ["animations/3d", "transforms/3d"],
}
- # Ports which use compile-time feature detection should define this method and return
- # a dictionary mapping from symbol substrings to possibly disabled test directories.
- # When the symbol substrings are not matched, the directories will be skipped.
- # If ports don't ever enable certain features, then those directories can just be
- # in the Skipped list instead of compile-time-checked here.
- def _missing_symbol_to_skipped_tests(self):
- """Return the supported feature dictionary. The keys are symbol-substrings
- and the values are the lists of directories to skip if that symbol is missing."""
- return {
- "MathMLElement": ["mathml"],
- "GraphicsLayer": ["compositing"],
- "WebCoreHas3DRendering": ["animations/3d", "transforms/3d"],
- "WebGLShader": ["fast/canvas/webgl", "compositing/webgl", "http/tests/canvas/webgl"],
- "MHTMLArchive": ["mhtml"],
- "CSSVariableValue": ["fast/css/variables", "inspector/styles/variables"],
- }
-
def _has_test_in_directories(self, directory_lists, test_list):
if not test_list:
return False
@@ -1520,15 +1528,6 @@ class Port(object):
if supported_feature_list is not None:
return reduce(operator.add, [directories for feature, directories in self._missing_feature_to_skipped_tests().items() if feature not in supported_feature_list])
- # Only check the symbols of there are tests in the test_list that might get skipped.
- # This is a performance optimization to avoid the calling nm.
- # Runtime feature detection not supported, fallback to static dectection:
- # Disable any tests for symbols missing from the executable or libraries.
- if self._has_test_in_directories(self._missing_symbol_to_skipped_tests().values(), test_list):
- symbols_string = self._symbols_string()
- if symbols_string is not None:
- return reduce(operator.add, [directories for symbol_substring, directories in self._missing_symbol_to_skipped_tests().items() if symbol_substring not in symbols_string], [])
-
return []
def _wk2_port_name(self):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py b/Tools/Scripts/webkitpy/port/base_unittest.py
index bcc64b601..c04cae0c0 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/base_unittest.py
+++ b/Tools/Scripts/webkitpy/port/base_unittest.py
@@ -30,7 +30,7 @@ import logging
import optparse
import sys
import tempfile
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive import Executive, ScriptError
from webkitpy.common.system import executive_mock
@@ -42,22 +42,22 @@ from webkitpy.tool.mocktool import MockOptions
from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import Port, Driver, DriverOutput
-from webkitpy.layout_tests.port.test import add_unit_tests_to_mock_filesystem, TestPort
+from webkitpy.port import Port, Driver, DriverOutput
+from webkitpy.port.test import add_unit_tests_to_mock_filesystem, TestPort
class PortTest(unittest.TestCase):
- def make_port(self, executive=None, with_tests=False, **kwargs):
+ def make_port(self, executive=None, with_tests=False, port_name=None, **kwargs):
host = MockSystemHost()
if executive:
host.executive = executive
if with_tests:
add_unit_tests_to_mock_filesystem(host.filesystem)
return TestPort(host, **kwargs)
- return Port(host, **kwargs)
+ return Port(host, port_name or 'baseport', **kwargs)
def test_default_child_processes(self):
port = self.make_port()
- self.assertNotEquals(port.default_child_processes(), None)
+ self.assertIsNotNone(port.default_child_processes())
def test_format_wdiff_output_as_html(self):
output = "OUTPUT %s %s %s" % (Port._WDIFF_DEL, Port._WDIFF_ADD, Port._WDIFF_END)
@@ -180,11 +180,11 @@ class PortTest(unittest.TestCase):
# And make sure we actually get diff output.
diff = port.diff_text('foo', 'bar', 'exp.txt', 'act.txt')
- self.assertTrue('foo' in diff)
- self.assertTrue('bar' in diff)
- self.assertTrue('exp.txt' in diff)
- self.assertTrue('act.txt' in diff)
- self.assertFalse('nosuchthing' in diff)
+ self.assertIn('foo', diff)
+ self.assertIn('bar', diff)
+ self.assertIn('exp.txt', diff)
+ self.assertIn('act.txt', diff)
+ self.assertNotIn('nosuchthing', diff)
def test_setup_test_run(self):
port = self.make_port()
@@ -196,8 +196,8 @@ class PortTest(unittest.TestCase):
port.host.filesystem.write_text_file(port.layout_tests_dir() + '/canvas/test', '')
port.host.filesystem.write_text_file(port.layout_tests_dir() + '/css2.1/test', '')
dirs = port.test_dirs()
- self.assertTrue('canvas' in dirs)
- self.assertTrue('css2.1' in dirs)
+ self.assertIn('canvas', dirs)
+ self.assertIn('css2.1', dirs)
def test_skipped_perf_tests(self):
port = self.make_port()
@@ -223,7 +223,7 @@ class PortTest(unittest.TestCase):
def test_get_option__unset(self):
port = self.make_port()
- self.assertEqual(port.get_option('foo'), None)
+ self.assertIsNone(port.get_option('foo'))
def test_get_option__default(self):
port = self.make_port()
@@ -320,7 +320,7 @@ class PortTest(unittest.TestCase):
def test_find_with_skipped_directories(self):
port = self.make_port(with_tests=True)
tests = port.tests(['userscripts'])
- self.assertTrue('userscripts/resources/iframe.html' not in tests)
+ self.assertNotIn('userscripts/resources/iframe.html', tests)
def test_find_with_skipped_directories_2(self):
port = self.make_port(with_tests=True)
@@ -347,6 +347,18 @@ class PortTest(unittest.TestCase):
self.assertFalse(Port._is_test_file(filesystem, '', 'ref-foo.html'))
self.assertFalse(Port._is_test_file(filesystem, '', 'notref-foo.xhr'))
+ def test_is_reference_html_file(self):
+ filesystem = MockFileSystem()
+ self.assertTrue(Port.is_reference_html_file(filesystem, '', 'foo-expected.html'))
+ self.assertTrue(Port.is_reference_html_file(filesystem, '', 'foo-expected-mismatch.xml'))
+ self.assertTrue(Port.is_reference_html_file(filesystem, '', 'foo-ref.xhtml'))
+ self.assertTrue(Port.is_reference_html_file(filesystem, '', 'foo-notref.svg'))
+ self.assertFalse(Port.is_reference_html_file(filesystem, '', 'foo.html'))
+ self.assertFalse(Port.is_reference_html_file(filesystem, '', 'foo-expected.txt'))
+ self.assertFalse(Port.is_reference_html_file(filesystem, '', 'foo-expected.shtml'))
+ self.assertFalse(Port.is_reference_html_file(filesystem, '', 'foo-expected.php'))
+ self.assertFalse(Port.is_reference_html_file(filesystem, '', 'foo-expected.mht'))
+
def test_parse_reftest_list(self):
port = self.make_port(with_tests=True)
port.host.filesystem.files['bar/reftest.list'] = "\n".join(["== test.html test-ref.html",
@@ -432,29 +444,25 @@ class PortTest(unittest.TestCase):
def test_tests(self):
port = self.make_port(with_tests=True)
tests = port.tests([])
- self.assertTrue('passes/text.html' in tests)
- self.assertTrue('virtual/passes/text.html' in tests)
+ self.assertIn('passes/text.html', tests)
+ self.assertIn('virtual/passes/text.html', tests)
tests = port.tests(['passes'])
- self.assertTrue('passes/text.html' in tests)
- self.assertTrue('passes/passes/test-virtual-passes.html' in tests)
- self.assertFalse('virtual/passes/text.html' in tests)
+ self.assertIn('passes/text.html', tests)
+ self.assertIn('passes/passes/test-virtual-passes.html', tests)
+ self.assertNotIn('virtual/passes/text.html', tests)
tests = port.tests(['virtual/passes'])
- self.assertFalse('passes/text.html' in tests)
- self.assertTrue('virtual/passes/test-virtual-passes.html' in tests)
- self.assertTrue('virtual/passes/passes/test-virtual-passes.html' in tests)
- self.assertFalse('virtual/passes/test-virtual-virtual/passes.html' in tests)
- self.assertFalse('virtual/passes/virtual/passes/test-virtual-passes.html' in tests)
+ self.assertNotIn('passes/text.html', tests)
+ self.assertIn('virtual/passes/test-virtual-passes.html', tests)
+ self.assertIn('virtual/passes/passes/test-virtual-passes.html', tests)
+ self.assertNotIn('virtual/passes/test-virtual-virtual/passes.html', tests)
+ self.assertNotIn('virtual/passes/virtual/passes/test-virtual-passes.html', tests)
def test_build_path(self):
port = self.make_port(options=optparse.Values({'build_directory': '/my-build-directory/'}))
self.assertEqual(port._build_path(), '/my-build-directory/Release')
- def test_dont_require_http_server(self):
- port = self.make_port()
- self.assertEqual(port.requires_http_server(), False)
-
class NaturalCompareTest(unittest.TestCase):
def setUp(self):
@@ -497,7 +505,3 @@ class KeyCompareTest(unittest.TestCase):
self.assert_cmp('/ab', '/a/a/b', -1)
self.assert_cmp('/a/a/b', '/ab', 1)
self.assert_cmp('/foo-bar/baz', '/foo/baz', -1)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/builders.py b/Tools/Scripts/webkitpy/port/builders.py
index 380b5ad31..cb0f3e532 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/builders.py
+++ b/Tools/Scripts/webkitpy/port/builders.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -34,7 +33,7 @@ from webkitpy.common.memoized import memoized
# In this dictionary, each item stores:
# * port_name -- a fully qualified port name
-# * specifiers -- a set of specifiers, representing configurations covered by this builder.
+# * is_debug -- whether we are using a debug build
# * move_overwritten_baselines_to -- (optional) list of platform directories that we will copy an existing
# baseline to before pulling down a new baseline during rebaselining. This is useful
# for bringing up a new port, for example when adding a Lion was the most recent Mac version and
@@ -46,45 +45,31 @@ from webkitpy.common.memoized import memoized
# results into platform/mac temporarily.
_exact_matches = {
- # These builders are on build.chromium.org.
- "WebKit XP": {"port_name": "chromium-win-xp", "specifiers": set(["xp", "release"])},
- "WebKit Win7": {"port_name": "chromium-win-win7", "specifiers": set(["win7", "release"])},
- "WebKit Win7 (dbg)(1)": {"port_name": "chromium-win-win7", "specifiers": set(["win7", "debug"])},
- "WebKit Win7 (dbg)(2)": {"port_name": "chromium-win-win7", "specifiers": set(["win7", "debug"])},
- "WebKit Linux": {"port_name": "chromium-linux-x86_64", "specifiers": set(["linux", "x86_64", "release"])},
- "WebKit Linux 32": {"port_name": "chromium-linux-x86", "specifiers": set(["linux", "x86"])},
- "WebKit Linux (dbg)": {"port_name": "chromium-linux-x86_64", "specifiers": set(["linux", "debug"])},
- "WebKit Mac10.6": {"port_name": "chromium-mac-snowleopard", "specifiers": set(["snowleopard"])},
- "WebKit Mac10.6 (dbg)": {"port_name": "chromium-mac-snowleopard", "specifiers": set(["snowleopard", "debug"])},
- "WebKit Mac10.7": {"port_name": "chromium-mac-lion", "specifiers": set(["lion", "release"])},
- "WebKit Mac10.7 (dbg)": {"port_name": "chromium-mac-lion", "specifiers": set(["lion", "debug"])},
- "WebKit Mac10.8": {"port_name": "chromium-mac-mountainlion", "specifiers": set(["mountainlion", "release"])},
-
# These builders are on build.webkit.org.
- "Apple MountainLion Release WK1 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion"]), "rebaseline_override_dir": "mac"},
- "Apple MountainLion Debug WK1 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion", "debug"]), "rebaseline_override_dir": "mac"},
- "Apple MountainLion Release WK2 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion", "wk2"]), "rebaseline_override_dir": "mac"},
- "Apple MountainLion Debug WK2 (Tests)": {"port_name": "mac-mountainlion", "specifiers": set(["mountainlion", "wk2", "debug"]), "rebaseline_override_dir": "mac"},
- "Apple Lion Release WK1 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion"])},
- "Apple Lion Debug WK1 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion", "debug"])},
- "Apple Lion Release WK2 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion", "wk2"])},
- "Apple Lion Debug WK2 (Tests)": {"port_name": "mac-lion", "specifiers": set(["lion", "wk2", "debug"])},
-
- "Apple Win XP Debug (Tests)": {"port_name": "win-xp", "specifiers": set(["win", "debug"])},
+ "Apple MountainLion Release WK1 (Tests)": {"port_name": "mac-mountainlion", "is_debug": False, "rebaseline_override_dir": "mac"},
+ "Apple MountainLion Debug WK1 (Tests)": {"port_name": "mac-mountainlion", "is_debug": True, "rebaseline_override_dir": "mac"},
+ "Apple MountainLion Release WK2 (Tests)": {"port_name": "mac-mountainlion-wk2", "is_debug": False, "rebaseline_override_dir": "mac"},
+ "Apple MountainLion Debug WK2 (Tests)": {"port_name": "mac-mountainlion-wk2", "is_debug": True, "rebaseline_override_dir": "mac"},
+ "Apple Lion Release WK1 (Tests)": {"port_name": "mac-lion", "is_debug": False},
+ "Apple Lion Debug WK1 (Tests)": {"port_name": "mac-lion", "is_debug": True},
+ "Apple Lion Release WK2 (Tests)": {"port_name": "mac-lion-wk2", "is_debug": False},
+ "Apple Lion Debug WK2 (Tests)": {"port_name": "mac-lion-wk2", "is_debug": True},
+
+ "Apple Win XP Debug (Tests)": {"port_name": "win-xp", "is_debug": True},
# FIXME: Remove rebaseline_override_dir once there is an Apple buildbot that corresponds to platform/win.
- "Apple Win 7 Release (Tests)": {"port_name": "win-7sp0", "specifiers": set(["win"]), "rebaseline_override_dir": "win"},
+ "Apple Win 7 Release (Tests)": {"port_name": "win-7sp0", "is_debug": False, "rebaseline_override_dir": "win"},
- "GTK Linux 32-bit Release": {"port_name": "gtk", "specifiers": set(["gtk", "x86", "release"])},
- "GTK Linux 64-bit Debug": {"port_name": "gtk", "specifiers": set(["gtk", "x86_64", "debug"])},
- "GTK Linux 64-bit Release": {"port_name": "gtk", "specifiers": set(["gtk", "x86_64", "release"])},
- "GTK Linux 64-bit Release WK2 (Tests)": {"port_name": "gtk", "specifiers": set(["gtk", "x86_64", "wk2", "release"])},
+ "GTK Linux 32-bit Release": {"port_name": "gtk", "is_debug": False},
+ "GTK Linux 64-bit Debug": {"port_name": "gtk", "is_debug": True},
+ "GTK Linux 64-bit Release": {"port_name": "gtk", "is_debug": False},
+ "GTK Linux 64-bit Release WK2 (Tests)": {"port_name": "gtk-wk2", "is_debug": False},
# FIXME: Remove rebaseline_override_dir once there are Qt bots for all the platform/qt-* directories.
- "Qt Linux Release": {"port_name": "qt-linux", "specifiers": set(["win", "linux", "mac"]), "rebaseline_override_dir": "qt"},
+ "Qt Linux Release": {"port_name": "qt-linux", "is_debug": False, "rebaseline_override_dir": "qt"},
- "EFL Linux 64-bit Release": {"port_name": "efl", "specifiers": set(["efl", "release"])},
- "EFL Linux 64-bit Release WK2": {"port_name": "efl", "specifiers": set(["efl", "wk2", "release"])},
- "EFL Linux 64-bit Debug WK2": {"port_name": "efl", "specifiers": set(["efl", "wk2", "debug"])},
+ "EFL Linux 64-bit Release": {"port_name": "efl", "is_debug": False},
+ "EFL Linux 64-bit Release WK2": {"port_name": "efl-wk2", "is_debug": False},
+ "EFL Linux 64-bit Debug WK2": {"port_name": "efl-wk2", "is_debug": True},
}
@@ -95,9 +80,6 @@ _fuzzy_matches = {
r"Windows": "win",
r"GTK": "gtk",
r"Qt": "qt",
- r"Chromium Mac": "chromium-mac",
- r"Chromium Linux": "chromium-linux",
- r"Chromium Win": "chromium-win",
}
@@ -105,8 +87,6 @@ _ports_without_builders = [
"qt-mac",
"qt-win",
"qt-wk2",
- # FIXME: Move to _extact_matches.
- "chromium-android",
]
@@ -122,10 +102,6 @@ def all_port_names():
return sorted(set(map(lambda x: x["port_name"], _exact_matches.values()) + _ports_without_builders))
-def coverage_specifiers_for_builder_name(builder_name):
- return _exact_matches[builder_name].get("specifiers", set())
-
-
def rebaseline_override_dir(builder_name):
return _exact_matches[builder_name].get("rebaseline_override_dir", None)
@@ -144,10 +120,14 @@ def port_name_for_builder_name(builder_name):
def builder_name_for_port_name(target_port_name):
+ debug_builder_name = None
for builder_name, builder_info in _exact_matches.items():
- if builder_info['port_name'] == target_port_name and 'debug' not in builder_info['specifiers']:
- return builder_name
- return None
+ if builder_info['port_name'] == target_port_name:
+ if builder_info['is_debug']:
+ debug_builder_name = builder_name
+ else:
+ return builder_name
+ return debug_builder_name
def builder_path_for_port_name(port_name):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/builders_unittest.py b/Tools/Scripts/webkitpy/port/builders_unittest.py
index 74320f2ad..77551b983 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/builders_unittest.py
+++ b/Tools/Scripts/webkitpy/port/builders_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import builders
-import unittest
+import unittest2 as unittest
class BuildersTest(unittest.TestCase):
@@ -39,6 +39,3 @@ class BuildersTest(unittest.TestCase):
}
for name, expected in tests.items():
self.assertEqual(expected, builders.builder_path_from_name(name))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/config.py b/Tools/Scripts/webkitpy/port/config.py
index 828e2af37..8c893533b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/config.py
+++ b/Tools/Scripts/webkitpy/port/config.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/config_standalone.py b/Tools/Scripts/webkitpy/port/config_standalone.py
index 5b0483145..274a07b33 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/config_standalone.py
+++ b/Tools/Scripts/webkitpy/port/config_standalone.py
@@ -33,7 +33,6 @@ https://bugs.webkit.org/show_bug?id=49360 for the motivation. We can remove
this test when we remove the global configuration cache in config.py."""
import os
-import unittest
import sys
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py b/Tools/Scripts/webkitpy/port/config_unittest.py
index 4479204ad..4015d5b61 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/config_unittest.py
+++ b/Tools/Scripts/webkitpy/port/config_unittest.py
@@ -28,7 +28,7 @@
import os
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive import Executive, ScriptError
from webkitpy.common.system.executive_mock import MockExecutive2
@@ -132,7 +132,7 @@ class ConfigTest(unittest.TestCase):
e = Executive()
fs = FileSystem()
c = config.Config(e, fs)
- script = WebKitFinder(fs).path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'layout_tests', 'port', 'config_standalone.py')
+ script = WebKitFinder(fs).path_from_webkit_base('Tools', 'Scripts', 'webkitpy', 'port', 'config_standalone.py')
# Note: don't use 'Release' here, since that's the normal default.
expected = 'Debug'
@@ -156,7 +156,3 @@ class ConfigTest(unittest.TestCase):
c = self.make_config(exception=ScriptError())
actual = c.default_configuration()
self.assertEqual(actual, 'Release')
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver.py b/Tools/Scripts/webkitpy/port/driver.py
index e883590cf..5061bd6d1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/driver.py
+++ b/Tools/Scripts/webkitpy/port/driver.py
@@ -78,7 +78,7 @@ class DriverOutput(object):
def __init__(self, text, image, image_hash, audio, crash=False,
test_time=0, measurements=None, timeout=False, error='', crashed_process_name='??',
- crashed_pid=None, crash_log=None):
+ crashed_pid=None, crash_log=None, pid=None):
# FIXME: Args could be renamed to better clarify what they do.
self.text = text
self.image = image # May be empty-string if the test crashes.
@@ -93,6 +93,7 @@ class DriverOutput(object):
self.measurements = measurements
self.timeout = timeout
self.error = error # stderr output
+ self.pid = pid
def has_stderr(self):
return bool(self.error)
@@ -142,7 +143,9 @@ class Driver(object):
self._measurements = {}
if self._port.get_option("profile"):
- self._profiler = ProfilerFactory.create_profiler(self._port.host, self._port._path_to_driver(), self._port.results_directory())
+ profiler_name = self._port.get_option("profiler")
+ self._profiler = ProfilerFactory.create_profiler(self._port.host,
+ self._port._path_to_driver(), self._port.results_directory(), profiler_name)
else:
self._profiler = None
@@ -156,7 +159,7 @@ class Driver(object):
the driver in an indeterminate state. The upper layers of the program
are responsible for cleaning up and ensuring things are okay.
- Returns a DriverOuput object.
+ Returns a DriverOutput object.
"""
start_time = time.time()
self.start(driver_input.should_run_pixel_test, driver_input.args)
@@ -173,6 +176,7 @@ class Driver(object):
crashed = self.has_crashed()
timed_out = self._server_process.timed_out
+ pid = self._server_process.pid()
if stop_when_done or crashed or timed_out:
# We call stop() even if we crashed or timed out in order to get any remaining stdout/stderr output.
@@ -204,7 +208,7 @@ class Driver(object):
crash=crashed, test_time=time.time() - test_begin_time, measurements=self._measurements,
timeout=timed_out, error=self.error_from_test,
crashed_process_name=self._crashed_process_name,
- crashed_pid=self._crashed_pid, crash_log=crash_log)
+ crashed_pid=self._crashed_pid, crash_log=crash_log, pid=pid)
def _get_crash_log(self, stdout, stderr, newer_than):
return self._port._get_crash_log(self._crashed_process_name, self._crashed_pid, stdout, stderr, newer_than)
@@ -274,27 +278,42 @@ class Driver(object):
# into run_test() directly.
if not self._server_process:
self._start(pixel_tests, per_test_args)
+ self._run_post_start_tasks()
- def _start(self, pixel_tests, per_test_args):
- self.stop()
- self._driver_tempdir = self._port._filesystem.mkdtemp(prefix='%s-' % self._port.driver_name())
- server_name = self._port.driver_name()
- environment = self._port.setup_environ_for_server(server_name)
+ def _setup_environ_for_driver(self, environment):
environment['DYLD_LIBRARY_PATH'] = self._port._build_path()
environment['DYLD_FRAMEWORK_PATH'] = self._port._build_path()
# FIXME: We're assuming that WebKitTestRunner checks this DumpRenderTree-named environment variable.
+ # FIXME: Commented out for now to avoid tests breaking. Re-enable after
+ # we cut over to NRWT
+ #environment['DUMPRENDERTREE_TEMP'] = str(self._port._driver_tempdir_for_environment())
environment['DUMPRENDERTREE_TEMP'] = str(self._driver_tempdir)
environment['LOCAL_RESOURCE_ROOT'] = self._port.layout_tests_dir()
- if 'WEBKITOUTPUTDIR' in os.environ:
- environment['WEBKITOUTPUTDIR'] = os.environ['WEBKITOUTPUTDIR']
+ if 'WEBKIT_OUTPUTDIR' in os.environ:
+ environment['WEBKIT_OUTPUTDIR'] = os.environ['WEBKIT_OUTPUTDIR']
if self._profiler:
environment = self._profiler.adjusted_environment(environment)
+ return environment
+
+ def _start(self, pixel_tests, per_test_args):
+ self.stop()
+ self._driver_tempdir = self._port._driver_tempdir()
+ server_name = self._port.driver_name()
+ environment = self._port.setup_environ_for_server(server_name)
+ environment = self._setup_environ_for_driver(environment)
self._crashed_process_name = None
self._crashed_pid = None
self._server_process = self._port._server_process_constructor(self._port, server_name, self.cmd_line(pixel_tests, per_test_args), environment)
self._server_process.start()
+
+ def _run_post_start_tasks(self):
+ # Remote drivers may override this to delay post-start tasks until the server has ack'd.
if self._profiler:
- self._profiler.attach_to_pid(self._server_process.pid())
+ self._profiler.attach_to_pid(self._pid_on_target())
+
+ def _pid_on_target(self):
+ # Remote drivers will override this method to return the pid on the device.
+ return self._server_process.pid()
def stop(self):
if self._server_process:
@@ -346,6 +365,7 @@ class Driver(object):
_log.debug('%s crash, pid = %s, error_line = %s' % (self._crashed_process_name, str(pid), error_line))
if error_line.startswith("#PROCESS UNRESPONSIVE - "):
self._subprocess_was_unresponsive = True
+ self._port.sample_process(self._crashed_process_name, self._crashed_pid)
# We want to show this since it's not a regular crash and probably we don't have a crash log.
self.error_from_test += error_line
return True
@@ -365,6 +385,8 @@ class Driver(object):
assert not driver_input.image_hash or driver_input.should_run_pixel_test
# ' is the separator between arguments.
+ if self._port.supports_per_test_timeout():
+ command += "'--timeout'%s" % driver_input.timeout
if driver_input.should_run_pixel_test:
command += "'--pixel-test"
if driver_input.image_hash:
@@ -492,8 +514,7 @@ class DriverProxy(object):
# FIXME: We shouldn't need to create a driver until we actually run a test.
self._driver = self._make_driver(pixel_tests)
- self._running_drivers = {}
- self._running_drivers[self._cmd_line_as_key(pixel_tests, [])] = self._driver
+ self._driver_cmd_line = None
def _make_driver(self, pixel_tests):
return self._driver_instance_constructor(self._port, self._worker_number, pixel_tests, self._no_timeout)
@@ -520,27 +541,18 @@ class DriverProxy(object):
pixel_tests_needed = driver_input.should_run_pixel_test
cmd_line_key = self._cmd_line_as_key(pixel_tests_needed, driver_input.args)
- if not cmd_line_key in self._running_drivers:
- self._running_drivers[cmd_line_key] = self._make_driver(pixel_tests_needed)
-
- return self._running_drivers[cmd_line_key].run_test(driver_input, stop_when_done)
+ if cmd_line_key != self._driver_cmd_line:
+ self._driver.stop()
+ self._driver = self._make_driver(pixel_tests_needed)
+ self._driver_cmd_line = cmd_line_key
- def start(self):
- # FIXME: Callers shouldn't normally call this, since this routine
- # may not be specifying the correct combination of pixel test and
- # per_test args.
- #
- # The only reason we have this routine at all is so the perftestrunner
- # can pause before running a test; it might be better to push that
- # into run_test() directly.
- self._driver.start(self._port.get_option('pixel_tests'), [])
+ return self._driver.run_test(driver_input, stop_when_done)
def has_crashed(self):
- return any(driver.has_crashed() for driver in self._running_drivers.values())
+ return self._driver.has_crashed()
def stop(self):
- for driver in self._running_drivers.values():
- driver.stop()
+ self._driver.stop()
# FIXME: this should be a @classmethod (or implemented on Port instead).
def cmd_line(self, pixel_tests=None, per_test_args=None):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py b/Tools/Scripts/webkitpy/port/driver_unittest.py
index 6a5481f6a..adfdc6344 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/driver_unittest.py
+++ b/Tools/Scripts/webkitpy/port/driver_unittest.py
@@ -26,15 +26,15 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import Port, Driver, DriverOutput
-from webkitpy.layout_tests.port.server_process_mock import MockServerProcess
+from webkitpy.port import Port, Driver, DriverOutput
+from webkitpy.port.server_process_mock import MockServerProcess
# FIXME: remove the dependency on TestWebKitPort
-from webkitpy.layout_tests.port.port_testcase import TestWebKitPort
+from webkitpy.port.port_testcase import TestWebKitPort
from webkitpy.tool.mocktool import MockOptions
@@ -82,7 +82,7 @@ class DriverOutputTest(unittest.TestCase):
class DriverTest(unittest.TestCase):
def make_port(self):
- port = Port(MockSystemHost(), MockOptions(configuration='Release'))
+ port = Port(MockSystemHost(), 'test', MockOptions(configuration='Release'))
port._config.build_directory = lambda configuration: '/mock-build'
return port
@@ -267,7 +267,3 @@ class DriverTest(unittest.TestCase):
driver = Driver(port, 0, pixel_tests=True)
driver.start(True, [])
self.assertTrue(driver._server_process.started)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/efl.py b/Tools/Scripts/webkitpy/port/efl.py
index 0c9acd8d8..01c66eba8 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/efl.py
+++ b/Tools/Scripts/webkitpy/port/efl.py
@@ -30,35 +30,45 @@
import os
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port.base import Port
-from webkitpy.layout_tests.port.pulseaudio_sanitizer import PulseAudioSanitizer
-from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
+from webkitpy.port.base import Port
+from webkitpy.port.pulseaudio_sanitizer import PulseAudioSanitizer
+from webkitpy.port.xvfbdriver import XvfbDriver
-class EflPort(Port, PulseAudioSanitizer):
+
+class EflPort(Port):
port_name = 'efl'
def __init__(self, *args, **kwargs):
super(EflPort, self).__init__(*args, **kwargs)
- self._jhbuild_wrapper_path = self.path_from_webkit_base('Tools', 'efl', 'run-with-jhbuild')
+ self._jhbuild_wrapper_path = [self.path_from_webkit_base('Tools', 'jhbuild', 'jhbuild-wrapper'), '--efl', 'run']
- self.set_option_default('wrapper', self._jhbuild_wrapper_path)
+ self.set_option_default('wrapper', ' '.join(self._jhbuild_wrapper_path))
self.webprocess_cmd_prefix = self.get_option('webprocess_cmd_prefix')
+ self._pulseaudio_sanitizer = PulseAudioSanitizer()
+
def _port_flag_for_scripts(self):
return "--efl"
def setup_test_run(self):
- self._unload_pulseaudio_module()
+ super(EflPort, self).setup_test_run()
+ self._pulseaudio_sanitizer.unload_pulseaudio_module()
def setup_environ_for_server(self, server_name=None):
env = super(EflPort, self).setup_environ_for_server(server_name)
+
# If DISPLAY environment variable is unset in the system
# e.g. on build bot, remove DISPLAY variable from the dictionary
if not 'DISPLAY' in os.environ:
del env['DISPLAY']
+
env['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
env['TEST_RUNNER_PLUGIN_PATH'] = self._build_path('lib')
+
+ # Silence GIO warnings about using the "memory" GSettings backend.
+ env['GSETTINGS_BACKEND'] = 'memory'
+
if self.webprocess_cmd_prefix:
env['WEB_PROCESS_CMD_PREFIX'] = self.webprocess_cmd_prefix
@@ -73,7 +83,7 @@ class EflPort(Port, PulseAudioSanitizer):
def clean_up_test_run(self):
super(EflPort, self).clean_up_test_run()
- self._restore_pulseaudio_module()
+ self._pulseaudio_sanitizer.restore_pulseaudio_module()
def _generate_all_test_configurations(self):
return [TestConfiguration(version=self._version, architecture='x86', build_type=build_type) for build_type in self.ALL_BUILD_TYPES]
@@ -88,7 +98,7 @@ class EflPort(Port, PulseAudioSanitizer):
return self._build_path('bin', 'ImageDiff')
def _image_diff_command(self, *args, **kwargs):
- return [self._jhbuild_wrapper_path] + super(EflPort, self)._image_diff_command(*args, **kwargs)
+ return self._jhbuild_wrapper_path + super(EflPort, self)._image_diff_command(*args, **kwargs)
def _path_to_webcore_library(self):
static_path = self._build_path('lib', 'libwebcore_efl.a')
@@ -108,7 +118,7 @@ class EflPort(Port, PulseAudioSanitizer):
def default_baseline_search_path(self):
return map(self._webkit_baseline_path, self._search_paths())
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
# FIXME: We should be able to use the default algorithm here.
return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self._search_paths()]))
@@ -121,3 +131,6 @@ class EflPort(Port, PulseAudioSanitizer):
# FIXME: old-run-webkit-tests also added ["-graphicssystem", "raster", "-style", "windows"]
# FIXME: old-run-webkit-tests converted results_filename path for cygwin.
self._run_script("run-launcher", run_launcher_args)
+
+ def check_sys_deps(self, needs_http):
+ return super(EflPort, self).check_sys_deps(needs_http) and XvfbDriver.check_xvfb(self)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py b/Tools/Scripts/webkitpy/port/efl_unittest.py
index 1ac687b18..a16dbaf57 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/efl_unittest.py
+++ b/Tools/Scripts/webkitpy/port/efl_unittest.py
@@ -24,18 +24,25 @@
# (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 unittest
+import unittest2 as unittest
-from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.layout_tests.port.efl import EflPort
-from webkitpy.layout_tests.port import port_testcase
from webkitpy.common.system.executive_mock import MockExecutive
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.port.efl import EflPort
+from webkitpy.port.pulseaudio_sanitizer_mock import PulseAudioSanitizerMock
+from webkitpy.port import port_testcase
class EflPortTest(port_testcase.PortTestCase):
port_name = 'efl'
port_maker = EflPort
+ # Additionally mocks out the PulseAudioSanitizer methods.
+ def make_port(self, host=None, port_name=None, options=None, os_name=None, os_version=None, **kwargs):
+ port = super(EflPortTest, self).make_port(host, port_name, options, os_name, os_version, **kwargs)
+ port._pulseaudio_sanitizer = PulseAudioSanitizerMock()
+ return port
+
def test_show_results_html_file(self):
port = self.make_port()
port._executive = MockExecutive(should_log=True)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory.py b/Tools/Scripts/webkitpy/port/factory.py
index ad7c64454..e9f146563 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory.py
+++ b/Tools/Scripts/webkitpy/port/factory.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -33,19 +32,13 @@ import fnmatch
import optparse
import re
-from webkitpy.layout_tests.port import builders
+from webkitpy.port import builders
def platform_options(use_globs=False):
return [
optparse.make_option('--platform', action='store',
help=('Glob-style list of platform/ports to use (e.g., "mac*")' if use_globs else 'Platform to use (e.g., "mac-lion")')),
- optparse.make_option('--chromium', action='store_const', dest='platform',
- const=('chromium*' if use_globs else 'chromium'),
- help=('Alias for --platform=chromium*' if use_globs else 'Alias for --platform=chromium')),
- optparse.make_option('--chromium-android', action='store_const', dest='platform',
- const=('chromium-android*' if use_globs else 'chromium-android'),
- help=('Alias for --platform=chromium-android*' if use_globs else 'Alias for --platform=chromium')),
optparse.make_option('--efl', action='store_const', dest='platform',
const=('efl*' if use_globs else 'efl'),
help=('Alias for --platform=efl*' if use_globs else 'Alias for --platform=efl')),
@@ -81,10 +74,6 @@ def _builder_options(builder_name):
class PortFactory(object):
PORT_CLASSES = (
- 'chromium_android.ChromiumAndroidPort',
- 'chromium_linux.ChromiumLinuxPort',
- 'chromium_mac.ChromiumMacPort',
- 'chromium_win.ChromiumWinPort',
'efl.EflPort',
'gtk.GtkPort',
'mac.MacPort',
@@ -100,7 +89,7 @@ class PortFactory(object):
def _default_port(self, options):
platform = self._host.platform
if platform.is_linux() or platform.is_freebsd():
- return 'chromium-linux'
+ return 'qt-linux'
elif platform.is_mac():
return 'mac'
elif platform.is_win():
@@ -113,12 +102,6 @@ class PortFactory(object):
appropriate port on this platform."""
port_name = port_name or self._default_port(options)
- # FIXME(dpranke): We special-case '--platform chromium' so that it can co-exist
- # with '--platform chromium-mac' and '--platform chromium-linux' properly (we
- # can't look at the port_name prefix in this case).
- if port_name == 'chromium':
- port_name = 'chromium-' + self._host.platform.os_name
-
for port_class in self.PORT_CLASSES:
module_name, class_name = port_class.rsplit('.', 1)
module = __import__(module_name, globals(), locals(), [], -1)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py b/Tools/Scripts/webkitpy/port/factory_unittest.py
index 915c17d89..6f09a2eb9 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
+++ b/Tools/Scripts/webkitpy/port/factory_unittest.py
@@ -26,21 +26,17 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.tool.mocktool import MockOptions
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import chromium_android
-from webkitpy.layout_tests.port import chromium_linux
-from webkitpy.layout_tests.port import chromium_mac
-from webkitpy.layout_tests.port import chromium_win
-from webkitpy.layout_tests.port import factory
-from webkitpy.layout_tests.port import gtk
-from webkitpy.layout_tests.port import mac
-from webkitpy.layout_tests.port import qt
-from webkitpy.layout_tests.port import test
-from webkitpy.layout_tests.port import win
+from webkitpy.port import factory
+from webkitpy.port import gtk
+from webkitpy.port import mac
+from webkitpy.port import qt
+from webkitpy.port import test
+from webkitpy.port import win
class FactoryTest(unittest.TestCase):
@@ -54,7 +50,7 @@ class FactoryTest(unittest.TestCase):
def assert_port(self, port_name=None, os_name=None, os_version=None, options=None, cls=None):
host = MockSystemHost(os_name=os_name, os_version=os_version)
port = factory.PortFactory(host).get(port_name, options=options)
- self.assertTrue(isinstance(port, cls))
+ self.assertIsInstance(port, cls)
def test_mac(self):
self.assert_port(port_name='mac-lion', cls=mac.MacPort)
@@ -75,29 +71,6 @@ class FactoryTest(unittest.TestCase):
def test_qt(self):
self.assert_port(port_name='qt', cls=qt.QtPort)
- def test_chromium_mac(self):
- self.assert_port(port_name='chromium-mac', os_name='mac', os_version='snowleopard',
- cls=chromium_mac.ChromiumMacPort)
- self.assert_port(port_name='chromium', os_name='mac', os_version='lion',
- cls=chromium_mac.ChromiumMacPort)
-
- def test_chromium_linux(self):
- self.assert_port(port_name='chromium-linux', cls=chromium_linux.ChromiumLinuxPort)
- self.assert_port(port_name='chromium', os_name='linux', os_version='lucid',
- cls=chromium_linux.ChromiumLinuxPort)
-
- def test_chromium_android(self):
- self.assert_port(port_name='chromium-android', cls=chromium_android.ChromiumAndroidPort)
- # NOTE: We can't check for port_name=chromium here, as this will append the host's
- # operating system, whereas host!=target for Android.
-
- def test_chromium_win(self):
- self.assert_port(port_name='chromium-win-xp', cls=chromium_win.ChromiumWinPort)
- self.assert_port(port_name='chromium-win', os_name='win', os_version='xp',
- cls=chromium_win.ChromiumWinPort)
- self.assert_port(port_name='chromium', os_name='win', os_version='xp',
- cls=chromium_win.ChromiumWinPort)
-
def test_unknown_specified(self):
self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost()).get, port_name='unknown')
@@ -105,9 +78,5 @@ class FactoryTest(unittest.TestCase):
self.assertRaises(NotImplementedError, factory.PortFactory(MockSystemHost(os_name='vms')).get)
def test_get_from_builder_name(self):
- self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('WebKit Mac10.7').name(),
- 'chromium-mac-lion')
-
-
-if __name__ == '__main__':
- unittest.main()
+ self.assertEqual(factory.PortFactory(MockSystemHost()).get_from_builder_name('Apple Lion Release WK1 (Tests)').name(),
+ 'mac-lion')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py b/Tools/Scripts/webkitpy/port/gtk.py
index 2ec7d70c4..63b8eb89a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/gtk.py
+++ b/Tools/Scripts/webkitpy/port/gtk.py
@@ -30,16 +30,20 @@ import os
import subprocess
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port.base import Port
-from webkitpy.layout_tests.port.pulseaudio_sanitizer import PulseAudioSanitizer
-from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
+from webkitpy.port.base import Port
+from webkitpy.port.pulseaudio_sanitizer import PulseAudioSanitizer
+from webkitpy.port.xvfbdriver import XvfbDriver
-class GtkPort(Port, PulseAudioSanitizer):
+class GtkPort(Port):
port_name = "gtk"
+ def __init__(self, *args, **kwargs):
+ super(GtkPort, self).__init__(*args, **kwargs)
+ self._pulseaudio_sanitizer = PulseAudioSanitizer()
+
def warn_if_bug_missing_in_test_expectations(self):
- return True
+ return not self.get_option('webkit_test_runner')
def _port_flag_for_scripts(self):
return "--gtk"
@@ -48,20 +52,17 @@ class GtkPort(Port, PulseAudioSanitizer):
return XvfbDriver
def default_timeout_ms(self):
- # For now, use the base Port's default timeout value in case of WebKitTestRunner.
- if self.get_option('webkit_test_runner'):
- return super(GtkPort, self).default_timeout_ms()
-
if self.get_option('configuration') == 'Debug':
return 12 * 1000
return 6 * 1000
def setup_test_run(self):
- self._unload_pulseaudio_module()
+ super(GtkPort, self).setup_test_run()
+ self._pulseaudio_sanitizer.unload_pulseaudio_module()
def clean_up_test_run(self):
super(GtkPort, self).clean_up_test_run()
- self._restore_pulseaudio_module()
+ self._pulseaudio_sanitizer.restore_pulseaudio_module()
def setup_environ_for_server(self, server_name=None):
environment = super(GtkPort, self).setup_environ_for_server(server_name)
@@ -72,7 +73,7 @@ class GtkPort(Port, PulseAudioSanitizer):
environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs')
environment['WEBKIT_INSPECTOR_PATH'] = self._build_path('Programs', 'resources', 'inspector')
environment['AUDIO_RESOURCES_PATH'] = self.path_from_webkit_base('Source', 'WebCore', 'platform', 'audio', 'resources')
- self._copy_value_from_environ_if_set(environment, 'WEBKITOUTPUTDIR')
+ self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
return environment
def _generate_all_test_configurations(self):
@@ -100,6 +101,22 @@ class GtkPort(Port, PulseAudioSanitizer):
return full_library
return None
+ def _search_paths(self):
+ search_paths = []
+ if self.get_option('webkit_test_runner'):
+ search_paths.extend([self.port_name + '-wk2', 'wk2'])
+ else:
+ search_paths.append(self.port_name + '-wk1')
+ search_paths.append(self.port_name)
+ search_paths.extend(self.get_option("additional_platform_directory", []))
+ return search_paths
+
+ def default_baseline_search_path(self):
+ return map(self._webkit_baseline_path, self._search_paths())
+
+ def _port_specific_expectations_files(self):
+ return [self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in reversed(self._search_paths())]
+
# FIXME: We should find a way to share this implmentation with Gtk,
# or teach run-launcher how to call run-safari and move this down to Port.
def show_results_html_file(self, results_filename):
@@ -110,13 +127,15 @@ class GtkPort(Port, PulseAudioSanitizer):
# FIXME: old-run-webkit-tests converted results_filename path for cygwin.
self._run_script("run-launcher", run_launcher_args)
+ def check_sys_deps(self, needs_http):
+ return super(GtkPort, self).check_sys_deps(needs_http) and XvfbDriver.check_xvfb(self)
+
def _get_gdb_output(self, coredump_path):
- cmd = ['gdb', '-ex', 'thread apply all bt', '--batch', str(self._path_to_driver()), coredump_path]
+ cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', str(self._path_to_driver()), coredump_path]
proc = subprocess.Popen(cmd, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- proc.wait()
- errors = [l.strip().decode('utf8', 'ignore') for l in proc.stderr.readlines()]
- trace = proc.stdout.read().decode('utf8', 'ignore')
- return (trace, errors)
+ stdout, stderr = proc.communicate()
+ errors = [l.strip().decode('utf8', 'ignore') for l in stderr.splitlines()]
+ return (stdout.decode('utf8', 'ignore'), errors)
def _get_crash_log(self, name, pid, stdout, stderr, newer_than):
pid_representation = str(pid or '<unknown>')
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py b/Tools/Scripts/webkitpy/port/gtk_unittest.py
index 7002495a4..e806091bb 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py
+++ b/Tools/Scripts/webkitpy/port/gtk_unittest.py
@@ -26,16 +26,17 @@
# (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 unittest
+import unittest2 as unittest
import sys
import os
-from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.layout_tests.port.gtk import GtkPort
-from webkitpy.layout_tests.port import port_testcase
from webkitpy.common.system.executive_mock import MockExecutive
-from webkitpy.thirdparty.mock import Mock
from webkitpy.common.system.filesystem_mock import MockFileSystem
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.port.gtk import GtkPort
+from webkitpy.port.pulseaudio_sanitizer_mock import PulseAudioSanitizerMock
+from webkitpy.port import port_testcase
+from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.mocktool import MockOptions
@@ -43,6 +44,33 @@ class GtkPortTest(port_testcase.PortTestCase):
port_name = 'gtk'
port_maker = GtkPort
+ # Additionally mocks out the PulseAudioSanitizer methods.
+ def make_port(self, host=None, port_name=None, options=None, os_name=None, os_version=None, **kwargs):
+ port = super(GtkPortTest, self).make_port(host, port_name, options, os_name, os_version, **kwargs)
+ port._pulseaudio_sanitizer = PulseAudioSanitizerMock()
+ return port
+
+ def test_default_baseline_search_path(self):
+ port = self.make_port()
+ self.assertEqual(port.default_baseline_search_path(), ['/mock-checkout/LayoutTests/platform/gtk-wk1',
+ '/mock-checkout/LayoutTests/platform/gtk'])
+
+ port = self.make_port(options=MockOptions(webkit_test_runner=True))
+ self.assertEqual(port.default_baseline_search_path(), ['/mock-checkout/LayoutTests/platform/gtk-wk2',
+ '/mock-checkout/LayoutTests/platform/wk2', '/mock-checkout/LayoutTests/platform/gtk'])
+
+ def test_port_specific_expectations_files(self):
+ port = self.make_port()
+ self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk-wk1/TestExpectations'])
+
+ port = self.make_port(options=MockOptions(webkit_test_runner=True))
+ self.assertEqual(port.expectations_files(), ['/mock-checkout/LayoutTests/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/wk2/TestExpectations',
+ '/mock-checkout/LayoutTests/platform/gtk-wk2/TestExpectations'])
+
def test_show_results_html_file(self):
port = self.make_port()
port._executive = MockExecutive(should_log=True)
@@ -52,14 +80,6 @@ class GtkPortTest(port_testcase.PortTestCase):
def test_default_timeout_ms(self):
self.assertEqual(self.make_port(options=MockOptions(configuration='Release')).default_timeout_ms(), 6000)
self.assertEqual(self.make_port(options=MockOptions(configuration='Debug')).default_timeout_ms(), 12000)
- self.assertEqual(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Debug')).default_timeout_ms(), 80000)
- self.assertEqual(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).default_timeout_ms(), 80000)
-
- def assertLinesEqual(self, a, b):
- if hasattr(self, 'assertMultiLineEqual'):
- self.assertMultiLineEqual(a, b)
- else:
- self.assertEqual(a.splitlines(), b.splitlines())
def test_get_crash_log(self):
core_directory = os.environ.get('WEBKIT_CORE_DUMPS_DIRECTORY', '/path/to/coredumps')
@@ -83,8 +103,8 @@ STDERR: <empty>""" % locals()
port._get_gdb_output = mock_empty_crash_log
stderr, log = port._get_crash_log("DumpRenderTree", 28529, "", "", newer_than=None)
self.assertEqual(stderr, "")
- self.assertLinesEqual(log, mock_empty_crash_log)
+ self.assertMultiLineEqual(log, mock_empty_crash_log)
stderr, log = port._get_crash_log("DumpRenderTree", 28529, "", "", newer_than=0.0)
self.assertEqual(stderr, "")
- self.assertLinesEqual(log, mock_empty_crash_log)
+ self.assertMultiLineEqual(log, mock_empty_crash_log)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/http_lock.py b/Tools/Scripts/webkitpy/port/http_lock.py
index c2eece3b0..bdde37e32 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/http_lock.py
+++ b/Tools/Scripts/webkitpy/port/http_lock.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
# Copyright (C) 2010 Andras Becsi (abecsi@inf.u-szeged.hu), University of Szeged
#
@@ -25,6 +24,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# FIXME: rename this file, and add more text about how this is
+# different from the base file_lock class.
+
"""This class helps to block NRWT threads when more NRWTs run
perf, http and websocket tests in a same time."""
@@ -43,7 +45,7 @@ _log = logging.getLogger(__name__)
class HttpLock(object):
- def __init__(self, lock_path, lock_file_prefix="WebKitHttpd.lock.", guard_lock="WebKit.lock", filesystem=None, executive=None):
+ def __init__(self, lock_path, lock_file_prefix="WebKitHttpd.lock.", guard_lock="WebKit.lock", filesystem=None, executive=None, name='HTTP'):
self._executive = executive or Executive()
self._filesystem = filesystem or FileSystem()
self._lock_path = lock_path
@@ -55,6 +57,7 @@ class HttpLock(object):
self._guard_lock_file = self._filesystem.join(self._lock_path, guard_lock)
self._guard_lock = FileLock(self._guard_lock_file)
self._process_lock_file_name = ""
+ self._name = name
def cleanup_http_lock(self):
"""Delete the lock file if exists."""
@@ -124,11 +127,11 @@ class HttpLock(object):
"""Create a lock file and wait until it's turn comes. If something goes wrong
it wont do any locking."""
if not self._create_lock_file():
- _log.debug("Warning, http locking failed!")
+ _log.debug("Warning, %s locking failed!" % self._name)
return
# FIXME: This can hang forever!
while self._current_lock_pid() != os.getpid():
time.sleep(1)
- _log.debug("HTTP lock acquired")
+ _log.debug("%s lock acquired" % self._name)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py b/Tools/Scripts/webkitpy/port/http_lock_unittest.py
index 650a7670f..25af12fab 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/http_lock_unittest.py
+++ b/Tools/Scripts/webkitpy/port/http_lock_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
#
# All rights reserved.
@@ -26,7 +25,7 @@
from http_lock import HttpLock
import os # Used for os.getpid()
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.executive_mock import MockExecutive
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/image_diff.py b/Tools/Scripts/webkitpy/port/image_diff.py
index 72d061ffc..4f1b059b4 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/image_diff.py
+++ b/Tools/Scripts/webkitpy/port/image_diff.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2010 Gabor Rapcsanyi <rgabor@inf.u-szeged.hu>, University of Szeged
# Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
@@ -35,7 +34,7 @@ import logging
import re
import time
-from webkitpy.layout_tests.port import server_process
+from webkitpy.port import server_process
_log = logging.getLogger(__name__)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/image_diff_unittest.py b/Tools/Scripts/webkitpy/port/image_diff_unittest.py
index 0e5f0a0ff..c06192eb0 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/image_diff_unittest.py
+++ b/Tools/Scripts/webkitpy/port/image_diff_unittest.py
@@ -28,10 +28,10 @@
"""Unit testing base class for Port implementations."""
-import unittest
+import unittest2 as unittest
-from webkitpy.layout_tests.port.server_process_mock import MockServerProcess
-from webkitpy.layout_tests.port.image_diff import ImageDiffer
+from webkitpy.port.server_process_mock import MockServerProcess
+from webkitpy.port.image_diff import ImageDiffer
class FakePort(object):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/leakdetector.py b/Tools/Scripts/webkitpy/port/leakdetector.py
index f46cd34e5..f46cd34e5 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/leakdetector.py
+++ b/Tools/Scripts/webkitpy/port/leakdetector.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py b/Tools/Scripts/webkitpy/port/leakdetector_unittest.py
index 09d37d711..d81f2b211 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/leakdetector_unittest.py
+++ b/Tools/Scripts/webkitpy/port/leakdetector_unittest.py
@@ -26,9 +26,9 @@
# (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 unittest
+import unittest2 as unittest
-from webkitpy.layout_tests.port.leakdetector import LeakDetector
+from webkitpy.port.leakdetector import LeakDetector
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.executive_mock import MockExecutive
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mac.py b/Tools/Scripts/webkitpy/port/mac.py
index 4415b8a62..0b24ce70e 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mac.py
+++ b/Tools/Scripts/webkitpy/port/mac.py
@@ -1,5 +1,5 @@
# Copyright (C) 2011 Google Inc. All rights reserved.
-# Copyright (C) 2012 Apple Inc. All rights reserved.
+# Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
@@ -29,15 +29,12 @@
import logging
import os
-import re
-import subprocess
-import sys
import time
from webkitpy.common.system.crashlogs import CrashLogs
from webkitpy.common.system.executive import ScriptError
-from webkitpy.layout_tests.port.apple import ApplePort
-from webkitpy.layout_tests.port.leakdetector import LeakDetector
+from webkitpy.port.apple import ApplePort
+from webkitpy.port.leakdetector import LeakDetector
_log = logging.getLogger(__name__)
@@ -68,6 +65,9 @@ class MacPort(ApplePort):
return 350 * 1000
return super(MacPort, self).default_timeout_ms()
+ def supports_per_test_timeout(self):
+ return True
+
def _build_driver_flags(self):
return ['ARCHS=i386'] if self.architecture() == 'x86' else []
@@ -76,22 +76,27 @@ class MacPort(ApplePort):
return True
def default_baseline_search_path(self):
- if self._name.endswith(self.FUTURE_VERSION):
+ name = self._name.replace('-wk2', '')
+ if name.endswith(self.FUTURE_VERSION):
fallback_names = [self.port_name]
else:
- fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(self._name):-1] + [self.port_name]
+ fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(name):-1] + [self.port_name]
if self.get_option('webkit_test_runner'):
- fallback_names.insert(0, self._wk2_port_name())
- # Note we do not add 'wk2' here, even though it's included in _skipped_search_paths().
+ fallback_names = [self._wk2_port_name(), 'wk2'] + fallback_names
return map(self._webkit_baseline_path, fallback_names)
+ def _port_specific_expectations_files(self):
+ return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in self.baseline_search_path()]))
+
def setup_environ_for_server(self, server_name=None):
env = super(MacPort, self).setup_environ_for_server(server_name)
if server_name == self.driver_name():
if self.get_option('leaks'):
env['MallocStackLogging'] = '1'
if self.get_option('guard_malloc'):
- env['DYLD_INSERT_LIBRARIES'] = '/usr/lib/libgmalloc.dylib'
+ env['DYLD_INSERT_LIBRARIES'] = '/usr/lib/libgmalloc.dylib:' + self._build_path("libWebCoreTestShim.dylib")
+ else:
+ env['DYLD_INSERT_LIBRARIES'] = self._build_path("libWebCoreTestShim.dylib")
env['XML_CATALOG_FILES'] = '' # work around missing /etc/catalog <rdar://problem/4292995>
return env
@@ -107,10 +112,8 @@ class MacPort(ApplePort):
return self._version == "lion"
def default_child_processes(self):
- # FIXME: The Printer isn't initialized when this is called, so using _log would just show an unitialized logger error.
-
if self._version == "snowleopard":
- print >> sys.stderr, "Cannot run tests in parallel on Snow Leopard due to rdar://problem/10621525."
+ _log.warning("Cannot run tests in parallel on Snow Leopard due to rdar://problem/10621525.")
return 1
default_count = super(MacPort, self).default_child_processes()
@@ -118,21 +121,27 @@ class MacPort(ApplePort):
# FIXME: https://bugs.webkit.org/show_bug.cgi?id=95906 With too many WebProcess WK2 tests get stuck in resource contention.
# To alleviate the issue reduce the number of running processes
# Anecdotal evidence suggests that a 4 core/8 core logical machine may run into this, but that a 2 core/4 core logical machine does not.
- if self.get_option('webkit_test_runner') and default_count > 4:
+ should_throttle_for_wk2 = self.get_option('webkit_test_runner') and default_count > 4
+ # We also want to throttle for leaks bots.
+ if should_throttle_for_wk2 or self.get_option('leaks'):
default_count = int(.75 * default_count)
# Make sure we have enough ram to support that many instances:
total_memory = self.host.platform.total_bytes_memory()
- bytes_per_drt = 256 * 1024 * 1024 # Assume each DRT needs 256MB to run.
- overhead = 2048 * 1024 * 1024 # Assume we need 2GB free for the O/S
- supportable_instances = max((total_memory - overhead) / bytes_per_drt, 1) # Always use one process, even if we don't have space for it.
- if supportable_instances < default_count:
- print >> sys.stderr, "This machine could support %s child processes, but only has enough memory for %s." % (default_count, supportable_instances)
+ if total_memory:
+ bytes_per_drt = 256 * 1024 * 1024 # Assume each DRT needs 256MB to run.
+ overhead = 2048 * 1024 * 1024 # Assume we need 2GB free for the O/S
+ supportable_instances = max((total_memory - overhead) / bytes_per_drt, 1) # Always use one process, even if we don't have space for it.
+ if supportable_instances < default_count:
+ _log.warning("This machine could support %s child processes, but only has enough memory for %s." % (default_count, supportable_instances))
+ else:
+ _log.warning("Cannot determine available memory for child processes, using default child process count of %s." % default_count)
+ supportable_instances = default_count
return min(supportable_instances, default_count)
def _build_java_test_support(self):
java_tests_path = self._filesystem.join(self.layout_tests_dir(), "java")
- build_java = ["/usr/bin/make", "-C", java_tests_path]
+ build_java = [self.make_command(), "-C", java_tests_path]
if self._executive.run_command(build_java, return_exit_code=True): # Paths are absolute, so we don't need to set a cwd.
_log.error("Failed to build Java support files: %s" % build_java)
return False
@@ -159,7 +168,7 @@ class MacPort(ApplePort):
_log.info("%s unique leaks found!" % unique_leaks)
def _check_port_build(self):
- return self._build_java_test_support()
+ return self.get_option('nojava') or self._build_java_test_support()
def _path_to_webcore_library(self):
return self._build_path('WebCore.framework/Versions/A/WebCore')
@@ -188,6 +197,9 @@ class MacPort(ApplePort):
def release_http_lock(self):
pass
+ def sample_file_path(self, name, pid):
+ return self._filesystem.join(self.results_directory(), "{0}-{1}-sample.txt".format(name, pid))
+
def _get_crash_log(self, name, pid, stdout, stderr, newer_than, time_fn=None, sleep_fn=None, wait_for_log=True):
# Note that we do slow-spin here and wait, since it appears the time
# ReportCrash takes to actually write and flush the file varies when there are
@@ -224,16 +236,25 @@ class MacPort(ApplePort):
crash_logs = {}
for (test_name, process_name, pid) in crashed_processes:
# Passing None for output. This is a second pass after the test finished so
- # if the output had any loggine we would have already collected it.
+ # if the output had any logging we would have already collected it.
crash_log = self._get_crash_log(process_name, pid, None, None, start_time, wait_for_log=False)[1]
if not crash_log:
continue
crash_logs[test_name] = crash_log
return crash_logs
+ def look_for_new_samples(self, unresponsive_processes, start_time):
+ sample_files = {}
+ for (test_name, process_name, pid) in unresponsive_processes:
+ sample_file = self.sample_file_path(process_name, pid)
+ if not self._filesystem.isfile(sample_file):
+ continue
+ sample_files[test_name] = sample_file
+ return sample_files
+
def sample_process(self, name, pid):
try:
- hang_report = self._filesystem.join(self.results_directory(), "%s-%s.sample.txt" % (name, pid))
+ hang_report = self.sample_file_path(name, pid)
self._executive.run_command([
"/usr/bin/sample",
pid,
@@ -242,8 +263,8 @@ class MacPort(ApplePort):
"-file",
hang_report,
])
- except ScriptError, e:
- _log.warning('Unable to sample process.')
+ except ScriptError as e:
+ _log.warning('Unable to sample process:' + str(e))
def _path_to_helper(self):
binary_name = 'LayoutTestHelper'
@@ -253,9 +274,8 @@ class MacPort(ApplePort):
helper_path = self._path_to_helper()
if helper_path:
_log.debug("Starting layout helper %s" % helper_path)
- # Note: Not thread safe: http://bugs.python.org/issue2320
self._helper = self._executive.popen([helper_path],
- stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=None)
+ stdin=self._executive.PIPE, stdout=self._executive.PIPE, stderr=None)
is_ready = self._helper.stdout.readline()
if not is_ready.startswith('ready'):
_log.error("LayoutTestHelper failed to be ready")
@@ -269,12 +289,17 @@ class MacPort(ApplePort):
self._helper.wait()
except IOError, e:
_log.debug("IOError raised while stopping helper: %s" % str(e))
- pass
self._helper = None
+ def make_command(self):
+ return self.xcrun_find('make', '/usr/bin/make')
+
def nm_command(self):
+ return self.xcrun_find('nm', 'nm')
+
+ def xcrun_find(self, command, fallback):
try:
- return self._executive.run_command(['xcrun', '-find', 'nm']).rstrip()
- except ScriptError, e:
- _log.warn("xcrun failed; falling back to 'nm'.")
- return 'nm'
+ return self._executive.run_command(['xcrun', '-find', command]).rstrip()
+ except ScriptError:
+ _log.warn("xcrun failed; falling back to '%s'." % fallback)
+ return fallback
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py b/Tools/Scripts/webkitpy/port/mac_unittest.py
index 831fbf7c9..e58904a1a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mac_unittest.py
+++ b/Tools/Scripts/webkitpy/port/mac_unittest.py
@@ -26,8 +26,8 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.layout_tests.port.mac import MacPort
-from webkitpy.layout_tests.port import port_testcase
+from webkitpy.port.mac import MacPort
+from webkitpy.port import port_testcase
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions
@@ -87,9 +87,9 @@ java/
port._filesystem = MockFileSystem(dirs=platform_dir_paths)
dirs_to_skip = port._tests_for_other_platforms()
- self.assertTrue('platform/chromium-linux' in dirs_to_skip)
- self.assertFalse('platform/mac' in dirs_to_skip)
- self.assertFalse('platform/mac-snowleopard' in dirs_to_skip)
+ self.assertIn('platform/chromium-linux', dirs_to_skip)
+ self.assertNotIn('platform/mac', dirs_to_skip)
+ self.assertNotIn('platform/mac-snowleopard', dirs_to_skip)
def test_version(self):
port = self.make_port()
@@ -116,7 +116,7 @@ java/
port = self.make_port(options=MockOptions(leaks=True, guard_malloc=True))
env = port.setup_environ_for_server(port.driver_name())
self.assertEqual(env['MallocStackLogging'], '1')
- self.assertEqual(env['DYLD_INSERT_LIBRARIES'], '/usr/lib/libgmalloc.dylib')
+ self.assertEqual(env['DYLD_INSERT_LIBRARIES'], '/usr/lib/libgmalloc.dylib:/mock-build/libWebCoreTestShim.dylib')
def _assert_search_path(self, port_name, baseline_path, search_paths, use_webkit2=False):
port = self.make_port(port_name=port_name, options=MockOptions(webkit_test_runner=use_webkit2))
@@ -130,10 +130,10 @@ java/
self._assert_search_path('mac-lion', 'mac-lion', ['mac-lion', 'mac'])
self._assert_search_path('mac-mountainlion', 'mac', ['mac'])
self._assert_search_path('mac-future', 'mac', ['mac'])
- self._assert_search_path('mac-snowleopard', 'mac-wk2', ['mac-wk2', 'mac-snowleopard', 'mac-lion', 'mac'], use_webkit2=True)
- self._assert_search_path('mac-lion', 'mac-wk2', ['mac-wk2', 'mac-lion', 'mac'], use_webkit2=True)
- self._assert_search_path('mac-mountainlion', 'mac-wk2', ['mac-wk2', 'mac'], use_webkit2=True)
- self._assert_search_path('mac-future', 'mac-wk2', ['mac-wk2', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-snowleopard', 'mac-wk2', ['mac-wk2', 'wk2', 'mac-snowleopard', 'mac-lion', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-lion', 'mac-wk2', ['mac-wk2', 'wk2', 'mac-lion', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-mountainlion', 'mac-wk2', ['mac-wk2', 'wk2', 'mac'], use_webkit2=True)
+ self._assert_search_path('mac-future', 'mac-wk2', ['mac-wk2', 'wk2', 'mac'], use_webkit2=True)
def test_show_results_html_file(self):
port = self.make_port()
@@ -152,20 +152,20 @@ java/
bytes_for_drt = 200 * 1024 * 1024
port.host.platform.total_bytes_memory = lambda: bytes_for_drt
- expected_stderr = "This machine could support 2 child processes, but only has enough memory for 1.\n"
- child_processes = OutputCapture().assert_outputs(self, port.default_child_processes, (), expected_stderr=expected_stderr)
+ expected_logs = "This machine could support 2 child processes, but only has enough memory for 1.\n"
+ child_processes = OutputCapture().assert_outputs(self, port.default_child_processes, (), expected_logs=expected_logs)
self.assertEqual(child_processes, 1)
# Make sure that we always use one process, even if we don't have the memory for it.
port.host.platform.total_bytes_memory = lambda: bytes_for_drt - 1
- expected_stderr = "This machine could support 2 child processes, but only has enough memory for 1.\n"
- child_processes = OutputCapture().assert_outputs(self, port.default_child_processes, (), expected_stderr=expected_stderr)
+ expected_logs = "This machine could support 2 child processes, but only has enough memory for 1.\n"
+ child_processes = OutputCapture().assert_outputs(self, port.default_child_processes, (), expected_logs=expected_logs)
self.assertEqual(child_processes, 1)
# SnowLeopard has a CFNetwork bug which causes crashes if we execute more than one copy of DRT at once.
port = self.make_port(port_name='mac-snowleopard')
- expected_stderr = "Cannot run tests in parallel on Snow Leopard due to rdar://problem/10621525.\n"
- child_processes = OutputCapture().assert_outputs(self, port.default_child_processes, (), expected_stderr=expected_stderr)
+ expected_logs = "Cannot run tests in parallel on Snow Leopard due to rdar://problem/10621525.\n"
+ child_processes = OutputCapture().assert_outputs(self, port.default_child_processes, (), expected_logs=expected_logs)
self.assertEqual(child_processes, 1)
def test_get_crash_log(self):
@@ -221,7 +221,7 @@ java/
port = self.make_port()
port._executive = MockExecutive2(run_command_fn=logging_run_command)
- expected_stdout = "['/usr/bin/sample', 42, 10, 10, '-file', '/mock-build/layout-test-results/test-42.sample.txt']\n"
+ expected_stdout = "['/usr/bin/sample', 42, 10, 10, '-file', '/mock-build/layout-test-results/test-42-sample.txt']\n"
OutputCapture().assert_outputs(self, port.sample_process, args=['test', 42], expected_stdout=expected_stdout)
def test_sample_process_throws_exception(self):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py b/Tools/Scripts/webkitpy/port/mock_drt.py
index a2106fdd9..00591f13a 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt.py
+++ b/Tools/Scripts/webkitpy/port/mock_drt.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -50,8 +49,8 @@ if script_dir not in sys.path:
sys.path.append(script_dir)
from webkitpy.common.system.systemhost import SystemHost
-from webkitpy.layout_tests.port.driver import DriverInput, DriverOutput, DriverProxy
-from webkitpy.layout_tests.port.factory import PortFactory
+from webkitpy.port.driver import DriverInput, DriverOutput, DriverProxy
+from webkitpy.port.factory import PortFactory
_log = logging.getLogger(__name__)
@@ -125,6 +124,9 @@ class MockDRTPort(object):
def release_http_lock(self):
pass
+ def show_results_html_file(self, results_filename):
+ pass
+
def main(argv, host, stdin, stdout, stderr):
"""Run the tests."""
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py b/Tools/Scripts/webkitpy/port/mock_drt_unittest.py
index c4c43f5d8..46ee57bcc 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py
+++ b/Tools/Scripts/webkitpy/port/mock_drt_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -30,14 +29,14 @@
"""Unit tests for MockDRT."""
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common import newstringio
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import mock_drt
-from webkitpy.layout_tests.port import port_testcase
-from webkitpy.layout_tests.port import test
-from webkitpy.layout_tests.port.factory import PortFactory
+from webkitpy.port import mock_drt
+from webkitpy.port import port_testcase
+from webkitpy.port import test
+from webkitpy.port.factory import PortFactory
from webkitpy.tool import mocktool
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py b/Tools/Scripts/webkitpy/port/port_testcase.py
index 8ea108ba0..63cc1e990 100755..100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
+++ b/Tools/Scripts/webkitpy/port/port_testcase.py
@@ -34,14 +34,14 @@ import os
import socket
import sys
import time
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive_mock import MockExecutive
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port.base import Port
-from webkitpy.layout_tests.port.server_process_mock import MockServerProcess
+from webkitpy.port.base import Port
+from webkitpy.port.server_process_mock import MockServerProcess
from webkitpy.layout_tests.servers import http_server_base
from webkitpy.tool.mocktool import MockOptions
@@ -50,12 +50,13 @@ from webkitpy.tool.mocktool import MockOptions
class TestWebKitPort(Port):
port_name = "testwebkitport"
- def __init__(self, symbols_string=None,
+ def __init__(self, port_name=None, symbols_string=None,
expectations_file=None, skips_file=None, host=None, config=None,
**kwargs):
+ port_name = port_name or TestWebKitPort.port_name
self.symbols_string = symbols_string # Passing "" disables all staticly-detectable features.
host = host or MockSystemHost()
- super(TestWebKitPort, self).__init__(host=host, **kwargs)
+ super(TestWebKitPort, self).__init__(host, port_name=port_name, **kwargs)
def all_test_configurations(self):
return [self.test_configuration()]
@@ -114,9 +115,6 @@ class PortTestCase(unittest.TestCase):
self.assertTrue('--foo=bar' in cmd_line)
self.assertTrue('--foo=baz' in cmd_line)
- def test_uses_apache(self):
- self.assertTrue(self.make_port()._uses_apache())
-
def assert_servers_are_down(self, host, ports):
for port in ports:
try:
@@ -423,7 +421,8 @@ class PortTestCase(unittest.TestCase):
for path in port.expectations_files():
port._filesystem.write_text_file(path, '')
ordered_dict = port.expectations_dict()
- self.assertEqual(port.path_to_test_expectations_file(), ordered_dict.keys()[0])
+ self.assertEqual(port.path_to_generic_test_expectations_file(), ordered_dict.keys()[0])
+ self.assertEqual(port.path_to_test_expectations_file(), ordered_dict.keys()[1])
options = MockOptions(additional_expectations=['/tmp/foo', '/tmp/bar'])
port = self.make_port(options=options)
@@ -432,7 +431,7 @@ class PortTestCase(unittest.TestCase):
port._filesystem.write_text_file('/tmp/foo', 'foo')
port._filesystem.write_text_file('/tmp/bar', 'bar')
ordered_dict = port.expectations_dict()
- self.assertEqual(ordered_dict.keys()[-2:], options.additional_expectations) # pylint: disable-msg=E1101
+ self.assertEqual(ordered_dict.keys()[-2:], options.additional_expectations) # pylint: disable=E1101
self.assertEqual(ordered_dict.values()[-2:], ['foo', 'bar'])
def test_path_to_test_expectations_file(self):
@@ -449,37 +448,10 @@ class PortTestCase(unittest.TestCase):
port._options = MockOptions(webkit_test_runner=False)
self.assertEqual(port.path_to_test_expectations_file(), '/mock-checkout/LayoutTests/platform/testwebkitport/TestExpectations')
- def test_skipped_directories_for_symbols(self):
- # This first test confirms that the commonly found symbols result in the expected skipped directories.
- symbols_string = " ".join(["GraphicsLayer", "WebCoreHas3DRendering", "isXHTMLMPDocument", "fooSymbol"])
- expected_directories = set([
- "mathml", # Requires MathMLElement
- "fast/canvas/webgl", # Requires WebGLShader
- "compositing/webgl", # Requires WebGLShader
- "http/tests/canvas/webgl", # Requires WebGLShader
- "mhtml", # Requires MHTMLArchive
- "fast/css/variables", # Requires CSS Variables
- "inspector/styles/variables", # Requires CSS Variables
- ])
-
- result_directories = set(TestWebKitPort(symbols_string, None)._skipped_tests_for_unsupported_features(test_list=['mathml/foo.html']))
- self.assertEqual(result_directories, expected_directories)
-
- # Test that the nm string parsing actually works:
- symbols_string = """
-000000000124f498 s __ZZN7WebCore13GraphicsLayer12replaceChildEPS0_S1_E19__PRETTY_FUNCTION__
-000000000124f500 s __ZZN7WebCore13GraphicsLayer13addChildAboveEPS0_S1_E19__PRETTY_FUNCTION__
-000000000124f670 s __ZZN7WebCore13GraphicsLayer13addChildBelowEPS0_S1_E19__PRETTY_FUNCTION__
-"""
- # Note 'compositing' is not in the list of skipped directories (hence the parsing of GraphicsLayer worked):
- expected_directories = set(['mathml', 'transforms/3d', 'compositing/webgl', 'fast/canvas/webgl', 'animations/3d', 'mhtml', 'http/tests/canvas/webgl', 'fast/css/variables', 'inspector/styles/variables'])
- result_directories = set(TestWebKitPort(symbols_string, None)._skipped_tests_for_unsupported_features(test_list=['mathml/foo.html']))
- self.assertEqual(result_directories, expected_directories)
-
def test_skipped_directories_for_features(self):
supported_features = ["Accelerated Compositing", "Foo Feature"]
expected_directories = set(["animations/3d", "transforms/3d"])
- port = TestWebKitPort(None, supported_features)
+ port = TestWebKitPort(supported_features=supported_features)
port._runtime_feature_list = lambda: supported_features
result_directories = set(port._skipped_tests_for_unsupported_features(test_list=["animations/3d/foo.html"]))
self.assertEqual(result_directories, expected_directories)
@@ -487,17 +459,17 @@ class PortTestCase(unittest.TestCase):
def test_skipped_directories_for_features_no_matching_tests_in_test_list(self):
supported_features = ["Accelerated Compositing", "Foo Feature"]
expected_directories = set([])
- result_directories = set(TestWebKitPort(None, supported_features)._skipped_tests_for_unsupported_features(test_list=['foo.html']))
+ result_directories = set(TestWebKitPort(supported_features=supported_features)._skipped_tests_for_unsupported_features(test_list=['foo.html']))
self.assertEqual(result_directories, expected_directories)
def test_skipped_tests_for_unsupported_features_empty_test_list(self):
supported_features = ["Accelerated Compositing", "Foo Feature"]
expected_directories = set([])
- result_directories = set(TestWebKitPort(None, supported_features)._skipped_tests_for_unsupported_features(test_list=None))
+ result_directories = set(TestWebKitPort(supported_features=supported_features)._skipped_tests_for_unsupported_features(test_list=None))
self.assertEqual(result_directories, expected_directories)
def test_skipped_layout_tests(self):
- self.assertEqual(TestWebKitPort(None, None).skipped_layout_tests(test_list=[]), set(['media']))
+ self.assertEqual(TestWebKitPort().skipped_layout_tests(test_list=[]), set(['media']))
def test_expectations_files(self):
port = TestWebKitPort()
@@ -505,16 +477,17 @@ class PortTestCase(unittest.TestCase):
def platform_dirs(port):
return [port.host.filesystem.basename(port.host.filesystem.dirname(f)) for f in port.expectations_files()]
- self.assertEqual(platform_dirs(port), ['testwebkitport'])
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport'])
- port._name = "testwebkitport-version"
- self.assertEqual(platform_dirs(port), ['testwebkitport', 'testwebkitport-version'])
+ port = TestWebKitPort(port_name="testwebkitport-version")
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport', 'testwebkitport-version'])
- port._options = MockOptions(webkit_test_runner=True)
- self.assertEqual(platform_dirs(port), ['testwebkitport', 'testwebkitport-version', 'testwebkitport-wk2', 'wk2'])
+ port = TestWebKitPort(port_name="testwebkitport-version-wk2")
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport', 'testwebkitport-version', 'wk2', 'testwebkitport-wk2'])
- port._options = MockOptions(additional_platform_directory=["internal-testwebkitport"])
- self.assertEqual(platform_dirs(port), ['testwebkitport', 'testwebkitport-version', 'internal-testwebkitport'])
+ port = TestWebKitPort(port_name="testwebkitport-version",
+ options=MockOptions(additional_platform_directory=["internal-testwebkitport"]))
+ self.assertEqual(platform_dirs(port), ['LayoutTests', 'testwebkitport', 'testwebkitport-version', 'internal-testwebkitport'])
def test_root_option(self):
port = TestWebKitPort()
@@ -579,6 +552,10 @@ MOCK output of child process
self.assertFalse(port._is_redhat_based())
self.assertTrue(port._is_debian_based())
+ port._filesystem = MockFileSystem({'/etc/arch-release': ''})
+ self.assertFalse(port._is_redhat_based())
+ self.assertTrue(port._is_arch_based())
+
def test_apache_config_file_name_for_platform(self):
port = TestWebKitPort()
self._assert_config_file_for_platform(port, 'cygwin', 'cygwin-httpd.conf')
@@ -587,11 +564,13 @@ MOCK output of child process
self._assert_config_file_for_platform(port, 'linux3', 'apache2-httpd.conf')
port._is_redhat_based = lambda: True
- self._assert_config_file_for_platform(port, 'linux2', 'fedora-httpd.conf')
+ port._apache_version = lambda: '2.2'
+ self._assert_config_file_for_platform(port, 'linux2', 'fedora-httpd-2.2.conf')
port = TestWebKitPort()
port._is_debian_based = lambda: True
- self._assert_config_file_for_platform(port, 'linux2', 'apache2-debian-httpd.conf')
+ port._apache_version = lambda: '2.2'
+ self._assert_config_file_for_platform(port, 'linux2', 'debian-httpd-2.2.conf')
self._assert_config_file_for_platform(port, 'mac', 'apache2-httpd.conf')
self._assert_config_file_for_platform(port, 'win32', 'apache2-httpd.conf') # win32 isn't a supported sys.platform. AppleWin/WinCairo/WinCE ports all use cygwin.
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/pulseaudio_sanitizer.py b/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py
index f4574a92f..465b92158 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/pulseaudio_sanitizer.py
+++ b/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py
@@ -37,7 +37,7 @@ _log = logging.getLogger(__name__)
# Shared by GTK and EFL for pulseaudio sanitizing before running tests.
class PulseAudioSanitizer:
- def _unload_pulseaudio_module(self):
+ def unload_pulseaudio_module(self):
# Unload pulseaudio's module-stream-restore, since it remembers
# volume settings from different runs, and could affect
# multimedia tests results
@@ -71,7 +71,7 @@ class PulseAudioSanitizer:
_log.debug('Unable to parse module index. Please check if your pulseaudio-utils version is too old.')
return
- def _restore_pulseaudio_module(self):
+ def restore_pulseaudio_module(self):
# If pulseaudio's module-stream-restore was previously unloaded,
# restore it back. We shouldn't need extra checks here, since an
# index != -1 here means we successfully unloaded it previously.
diff --git a/Tools/Scripts/webkitpy/common/checkout/deps_mock.py b/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer_mock.py
index 423debae0..88a962a2e 100644
--- a/Tools/Scripts/webkitpy/common/checkout/deps_mock.py
+++ b/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer_mock.py
@@ -1,16 +1,16 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
+# Copyrigth (C) 2013 Zan Dobersek <zandobersek@gmail.com>
#
# 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
+# * 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
+# * 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
+# * Neither the Google name nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
@@ -26,14 +26,10 @@
# (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 logging
-_log = logging.getLogger(__name__)
+class PulseAudioSanitizerMock:
+ def unload_pulseaudio_module(self):
+ pass
-
-class MockDEPS(object):
- def read_variable(self, name):
- return 6564
-
- def write_variable(self, name, value):
- _log.info("MOCK: MockDEPS.write_variable(%s, %s)" % (name, value))
+ def restore_pulseaudio_module(self):
+ pass
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/qt.py b/Tools/Scripts/webkitpy/port/qt.py
index 55f13ee8c..5db5d8eea 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/qt.py
+++ b/Tools/Scripts/webkitpy/port/qt.py
@@ -33,11 +33,12 @@ import logging
import re
import sys
import os
+import platform
from webkitpy.common.memoized import memoized
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
-from webkitpy.layout_tests.port.base import Port
-from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
+from webkitpy.port.base import Port
+from webkitpy.port.xvfbdriver import XvfbDriver
_log = logging.getLogger(__name__)
@@ -47,7 +48,7 @@ class QtPort(Port):
port_name = "qt"
def _wk2_port_name(self):
- return "qt-5.0-wk2"
+ return "qt-wk2"
def _port_flag_for_scripts(self):
return "--qt"
@@ -62,8 +63,6 @@ class QtPort(Port):
def __init__(self, host, port_name, **kwargs):
super(QtPort, self).__init__(host, port_name, **kwargs)
- # FIXME: This will allow Port.baseline_search_path
- # to do the right thing, but doesn't include support for qt-4.8 or qt-arm (seen in LayoutTests/platform) yet.
self._operating_system = port_name.replace('qt-', '')
# FIXME: Why is this being set at all?
@@ -80,6 +79,9 @@ class QtPort(Port):
# The Qt port builds DRT as part of the main build step
return True
+ def supports_per_test_timeout(self):
+ return True
+
def _path_to_driver(self):
return self._build_path('bin/%s' % self.driver_name())
@@ -90,7 +92,7 @@ class QtPort(Port):
if self.operating_system() == 'mac':
return self._build_path('lib/QtWebKitWidgets.framework/QtWebKitWidgets')
else:
- return self._build_path('lib/libQtWebKitWidgets.so')
+ return self._build_path('lib/libQt5WebKitWidgets.so')
def _modules_to_search_for_symbols(self):
# We search in every library to be reliable in the case of building with CONFIG+=force_static_libs_as_shared.
@@ -111,28 +113,29 @@ class QtPort(Port):
version = match.group('version')
break
except OSError:
- version = '4.8'
+ version = '5.0'
return version
def _search_paths(self):
- # qt-5.0-wk1 qt-5.0-wk2
- # \/
- # qt-5.0 qt-4.8
- # \/
+ # qt-mac-wk2
+ # /
+ # qt-wk1 qt-wk2
+ # \/
+ # qt-5.x
+ # \
# (qt-linux|qt-mac|qt-win)
# |
# qt
search_paths = []
- version = self.qt_version()
- if '5.0' in version:
- if self.get_option('webkit_test_runner'):
- search_paths.append('qt-5.0-wk2')
- else:
- search_paths.append('qt-5.0-wk1')
- if '4.8' in version:
- search_paths.append('qt-4.8')
- elif version:
- search_paths.append('qt-5.0')
+ if self.get_option('webkit_test_runner'):
+ if self.operating_system() == 'mac':
+ search_paths.append('qt-mac-wk2')
+ search_paths.append('qt-wk2')
+ else:
+ search_paths.append('qt-wk1')
+
+ search_paths.append('qt-' + self.qt_version())
+
search_paths.append(self.port_name + '-' + self.operating_system())
search_paths.append(self.port_name)
return search_paths
@@ -140,13 +143,13 @@ class QtPort(Port):
def default_baseline_search_path(self):
return map(self._webkit_baseline_path, self._search_paths())
- def expectations_files(self):
+ def _port_specific_expectations_files(self):
paths = self._search_paths()
if self.get_option('webkit_test_runner'):
paths.append('wk2')
# expectations_files() uses the directories listed in _search_paths reversed.
- # e.g. qt -> qt-linux -> qt-4.8
+ # e.g. qt -> qt-linux -> qt-5.x -> qt-wk1
return list(reversed([self._filesystem.join(self._webkit_baseline_path(p), 'TestExpectations') for p in paths]))
def setup_environ_for_server(self, server_name=None):
@@ -182,3 +185,6 @@ class QtPort(Port):
return False
return result
+ # Qt port is not ready for parallel testing, see https://bugs.webkit.org/show_bug.cgi?id=77730 for details.
+ def default_child_processes(self):
+ return 1
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py b/Tools/Scripts/webkitpy/port/qt_unittest.py
index d6ef8d85e..2338f673b 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/qt_unittest.py
+++ b/Tools/Scripts/webkitpy/port/qt_unittest.py
@@ -26,15 +26,15 @@
# (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 unittest
+import unittest2 as unittest
import os
from copy import deepcopy
from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import port_testcase
-from webkitpy.layout_tests.port.qt import QtPort
+from webkitpy.port import port_testcase
+from webkitpy.port.qt import QtPort
from webkitpy.tool.mocktool import MockOptions
@@ -42,24 +42,17 @@ class QtPortTest(port_testcase.PortTestCase):
port_name = 'qt-mac'
port_maker = QtPort
search_paths_cases = [
- {'search_paths':['qt-4.8', 'qt-mac', 'qt'], 'os_name':'mac', 'use_webkit2':False, 'qt_version':'4.8'},
- {'search_paths':['qt-4.8', 'qt-win', 'qt'], 'os_name':'win', 'use_webkit2':False, 'qt_version':'4.8'},
- {'search_paths':['qt-4.8', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':False, 'qt_version':'4.8'},
-
- {'search_paths':['qt-4.8', 'qt-mac', 'qt'], 'os_name':'mac', 'use_webkit2':False},
- {'search_paths':['qt-4.8', 'qt-win', 'qt'], 'os_name':'win', 'use_webkit2':False},
- {'search_paths':['qt-4.8', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':False},
-
- {'search_paths':['qt-5.0-wk2', 'qt-5.0', 'qt-mac', 'qt'], 'os_name':'mac', 'use_webkit2':True, 'qt_version':'5.0'},
- {'search_paths':['qt-5.0-wk2', 'qt-5.0', 'qt-win', 'qt'], 'os_name':'win', 'use_webkit2':True, 'qt_version':'5.0'},
- {'search_paths':['qt-5.0-wk2', 'qt-5.0', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':True, 'qt_version':'5.0'},
-
- {'search_paths':['qt-5.0-wk1', 'qt-5.0', 'qt-mac', 'qt'], 'os_name':'mac', 'use_webkit2':False, 'qt_version':'5.0'},
- {'search_paths':['qt-5.0-wk1', 'qt-5.0', 'qt-win', 'qt'], 'os_name':'win', 'use_webkit2':False, 'qt_version':'5.0'},
- {'search_paths':['qt-5.0-wk1', 'qt-5.0', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':False, 'qt_version':'5.0'},
+ {'search_paths':['qt-mac-wk2', 'qt-wk2', 'qt-5.0', 'qt-mac', 'qt'], 'os_name':'mac', 'use_webkit2':True, 'qt_version':'5.0'},
+ {'search_paths':['qt-wk2', 'qt-5.0', 'qt-win', 'qt'], 'os_name':'win', 'use_webkit2':True, 'qt_version':'5.0'},
+ {'search_paths':['qt-wk2', 'qt-5.0', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':True, 'qt_version':'5.0'},
+
+ {'search_paths':['qt-wk1', 'qt-5.0', 'qt-mac', 'qt'], 'os_name':'mac', 'use_webkit2':False, 'qt_version':'5.0'},
+ {'search_paths':['qt-wk1', 'qt-5.0', 'qt-win', 'qt'], 'os_name':'win', 'use_webkit2':False, 'qt_version':'5.0'},
+ {'search_paths':['qt-wk1', 'qt-5.0', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':False, 'qt_version':'5.0'},
+ {'search_paths':['qt-wk1', 'qt-5.1', 'qt-linux', 'qt'], 'os_name':'linux', 'use_webkit2':False, 'qt_version':'5.1'},
]
- def _assert_search_path(self, search_paths, os_name, use_webkit2=False, qt_version='4.8'):
+ def _assert_search_path(self, search_paths, os_name, use_webkit2=False, qt_version='5.0'):
# FIXME: Port constructors should not "parse" the port name, but
# rather be passed components (directly or via setters). Once
# we fix that, this method will need a re-write.
@@ -71,7 +64,7 @@ class QtPortTest(port_testcase.PortTestCase):
absolute_search_paths = map(port._webkit_baseline_path, search_paths)
self.assertEqual(port.baseline_search_path(), absolute_search_paths)
- def _assert_expectations_files(self, search_paths, os_name, use_webkit2=False, qt_version='4.8'):
+ def _assert_expectations_files(self, search_paths, os_name, use_webkit2=False, qt_version='5.0'):
# FIXME: Port constructors should not "parse" the port name, but
# rather be passed components (directly or via setters). Once
# we fix that, this method will need a re-write.
@@ -83,10 +76,10 @@ class QtPortTest(port_testcase.PortTestCase):
self.assertEqual(port.expectations_files(), search_paths)
def _qt_version(self, qt_version):
- if qt_version in '4.8':
- return 'QMake version 2.01a\nUsing Qt version 4.8.0 in /usr/local/Trolltech/Qt-4.8.2/lib'
if qt_version in '5.0':
return 'QMake version 2.01a\nUsing Qt version 5.0.0 in /usr/local/Trolltech/Qt-5.0.0/lib'
+ if qt_version in '5.1':
+ return 'QMake version 3.0\nUsing Qt version 5.1.1 in /usr/local/Qt-5.1/lib'
def test_baseline_search_path(self):
for case in self.search_paths_cases:
@@ -97,8 +90,9 @@ class QtPortTest(port_testcase.PortTestCase):
expectations_case = deepcopy(case)
if expectations_case['use_webkit2']:
expectations_case['search_paths'].append("wk2")
+ expectations_case['search_paths'].append('')
expectations_case['search_paths'].reverse()
- expectations_case['search_paths'] = map(lambda path: '/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path), expectations_case['search_paths'])
+ expectations_case['search_paths'] = map(lambda path: '/mock-checkout/LayoutTests/TestExpectations' if not path else '/mock-checkout/LayoutTests/platform/%s/TestExpectations' % (path), expectations_case['search_paths'])
self._assert_expectations_files(**expectations_case)
def test_show_results_html_file(self):
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/server_process.py b/Tools/Scripts/webkitpy/port/server_process.py
index 8f0cda9ba..8184d2587 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/server_process.py
+++ b/Tools/Scripts/webkitpy/port/server_process.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -117,6 +116,7 @@ class ServerProcess(object):
env=self._env,
universal_newlines=self._universal_newlines)
self._pid = self._proc.pid
+ self._port.find_system_pid(self.name(), self._pid)
fd = self._proc.stdout.fileno()
if not self._use_win32_apis:
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/server_process_mock.py b/Tools/Scripts/webkitpy/port/server_process_mock.py
index d234ebdc3..d234ebdc3 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/server_process_mock.py
+++ b/Tools/Scripts/webkitpy/port/server_process_mock.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py b/Tools/Scripts/webkitpy/port/server_process_unittest.py
index cd1db1f96..5ad7d0ea7 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/server_process_unittest.py
+++ b/Tools/Scripts/webkitpy/port/server_process_unittest.py
@@ -28,10 +28,10 @@
import sys
import time
-import unittest
+import unittest2 as unittest
-from webkitpy.layout_tests.port.factory import PortFactory
-from webkitpy.layout_tests.port import server_process
+from webkitpy.port.factory import PortFactory
+from webkitpy.port import server_process
from webkitpy.common.system.systemhost import SystemHost
from webkitpy.common.system.systemhost_mock import MockSystemHost
from webkitpy.common.system.outputcapture import OutputCapture
@@ -140,13 +140,13 @@ class TestServerProcess(unittest.TestCase):
server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
server_process.write("should break")
self.assertTrue(server_process.has_crashed())
- self.assertNotEquals(server_process.pid(), None)
- self.assertEqual(server_process._proc, None)
+ self.assertIsNotNone(server_process.pid())
+ self.assertIsNone(server_process._proc)
self.assertEqual(server_process.broken_pipes, [server_process.stdin])
port_obj.host.platform.os_name = 'mac'
server_process = FakeServerProcess(port_obj=port_obj, name="test", cmd=["test"])
server_process.write("should break")
self.assertTrue(server_process.has_crashed())
- self.assertEqual(server_process._proc, None)
+ self.assertIsNone(server_process._proc)
self.assertEqual(server_process.broken_pipes, [server_process.stdin])
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/test.py b/Tools/Scripts/webkitpy/port/test.py
index f7dd2919e..76fea3ba1 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/test.py
+++ b/Tools/Scripts/webkitpy/port/test.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -31,8 +30,8 @@ import base64
import sys
import time
-from webkitpy.layout_tests.port import Port, Driver, DriverOutput
-from webkitpy.layout_tests.port.base import VirtualTestSuite
+from webkitpy.port import Port, Driver, DriverOutput
+from webkitpy.port.base import VirtualTestSuite
from webkitpy.layout_tests.models.test_configuration import TestConfiguration
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.crashlogs import CrashLogs
@@ -98,6 +97,15 @@ class TestList(object):
def __getitem__(self, item):
return self.tests[item]
+#
+# These numbers may need to be updated whenever we add or delete tests.
+#
+TOTAL_TESTS = 106
+TOTAL_SKIPS = 28
+TOTAL_RETRIES = 14
+
+UNEXPECTED_PASSES = 6
+UNEXPECTED_FAILURES = 17
def unit_test_list():
tests = TestList()
@@ -339,6 +347,7 @@ Bug(test) passes/skipped/skip.html [ Skip ]
class TestPort(Port):
port_name = 'test'
+ default_port_name = 'test-mac-leopard'
"""Test implementation of the Port interface."""
ALL_BASELINE_VARIANTS = (
@@ -350,23 +359,20 @@ class TestPort(Port):
@classmethod
def determine_full_port_name(cls, host, options, port_name):
if port_name == 'test':
- return 'test-mac-leopard'
+ return TestPort.default_port_name
return port_name
def __init__(self, host, port_name=None, **kwargs):
- # FIXME: Consider updating all of the callers to pass in a port_name so it can be a
- # required parameter like all of the other Port objects.
- port_name = port_name or 'test-mac-leopard'
- Port.__init__(self, host, port_name, **kwargs)
+ Port.__init__(self, host, port_name or TestPort.default_port_name, **kwargs)
self._tests = unit_test_list()
self._flakes = set()
self._expectations_path = LAYOUT_TEST_DIR + '/platform/test/TestExpectations'
self._results_directory = None
self._operating_system = 'mac'
- if port_name.startswith('test-win'):
+ if self._name.startswith('test-win'):
self._operating_system = 'win'
- elif port_name.startswith('test-linux'):
+ elif self._name.startswith('test-linux'):
self._operating_system = 'linux'
version_map = {
@@ -377,7 +383,7 @@ class TestPort(Port):
'test-mac-snowleopard': 'snowleopard',
'test-linux-x86_64': 'lucid',
}
- self._version = version_map[port_name]
+ self._version = version_map[self._name]
def default_pixel_tests(self):
return True
@@ -434,9 +440,7 @@ class TestPort(Port):
def webkit_base(self):
return '/test.checkout'
- def skipped_layout_tests(self, test_list):
- # This allows us to test the handling Skipped files, both with a test
- # that actually passes, and a test that does fail.
+ def _skipped_tests_for_unsupported_features(self, test_list):
return set(['failures/expected/skip_text.html',
'failures/unexpected/skip_pass.html',
'virtual/skipped'])
@@ -536,12 +540,23 @@ class TestPort(Port):
class TestDriver(Driver):
"""Test/Dummy implementation of the DumpRenderTree interface."""
+ next_pid = 1
+
+ def __init__(self, *args, **kwargs):
+ super(TestDriver, self).__init__(*args, **kwargs)
+ self.started = False
+ self.pid = 0
def cmd_line(self, pixel_tests, per_test_args):
pixel_tests_flag = '-p' if pixel_tests else ''
return [self._port._path_to_driver()] + [pixel_tests_flag] + self._port.get_option('additional_drt_flag', []) + per_test_args
def run_test(self, test_input, stop_when_done):
+ if not self.started:
+ self.started = True
+ self.pid = TestDriver.next_pid
+ TestDriver.next_pid += 1
+
start_time = time.time()
test_name = test_input.test_name
test_args = test_input.args or []
@@ -589,10 +604,7 @@ class TestDriver(Driver):
return DriverOutput(actual_text, image, test.actual_checksum, audio,
crash=test.crash or test.web_process_crash, crashed_process_name=crashed_process_name,
crashed_pid=crashed_pid, crash_log=crash_log,
- test_time=time.time() - start_time, timeout=test.timeout, error=test.error)
-
- def start(self, pixel_tests, per_test_args):
- pass
+ test_time=time.time() - start_time, timeout=test.timeout, error=test.error, pid=self.pid)
def stop(self):
- pass
+ self.started = False
diff --git a/Tools/Scripts/webkitpy/port/win.py b/Tools/Scripts/webkitpy/port/win.py
new file mode 100644
index 000000000..18175d60b
--- /dev/null
+++ b/Tools/Scripts/webkitpy/port/win.py
@@ -0,0 +1,284 @@
+# Copyright (C) 2010 Google Inc. All rights reserved.
+# Copyright (C) 2013 Apple 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 Google name 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 atexit
+import os
+import logging
+import re
+import sys
+import time
+
+from webkitpy.common.system.crashlogs import CrashLogs
+from webkitpy.common.system.systemhost import SystemHost
+from webkitpy.common.system.executive import ScriptError, Executive
+from webkitpy.common.system.path import abspath_to_uri, cygpath
+from webkitpy.port.apple import ApplePort
+
+
+_log = logging.getLogger(__name__)
+
+
+class WinPort(ApplePort):
+ port_name = "win"
+
+ VERSION_FALLBACK_ORDER = ["win-xp", "win-vista", "win-7sp0", "win"]
+
+ ARCHITECTURES = ['x86']
+
+ CRASH_LOG_PREFIX = "CrashLog"
+
+ POST_MORTEM_DEBUGGER_KEY = "/HKLM/SOFTWARE/Microsoft/Windows NT/CurrentVersion/AeDebug/%s"
+
+ previous_debugger_values = {}
+
+ def do_text_results_differ(self, expected_text, actual_text):
+ # Sanity was restored in WK2, so we don't need this hack there.
+ if self.get_option('webkit_test_runner'):
+ return ApplePort.do_text_results_differ(self, expected_text, actual_text)
+
+ # This is a hack (which dates back to ORWT).
+ # Windows does not have an EDITING DELEGATE, so we strip any EDITING DELEGATE
+ # messages to make more of the tests pass.
+ # It's possible more of the ports might want this and this could move down into WebKitPort.
+ delegate_regexp = re.compile("^EDITING DELEGATE: .*?\n", re.MULTILINE)
+ expected_text = delegate_regexp.sub("", expected_text)
+ actual_text = delegate_regexp.sub("", actual_text)
+ return expected_text != actual_text
+
+ def default_baseline_search_path(self):
+ name = self._name.replace('-wk2', '')
+ if name.endswith(self.FUTURE_VERSION):
+ fallback_names = [self.port_name]
+ else:
+ fallback_names = self.VERSION_FALLBACK_ORDER[self.VERSION_FALLBACK_ORDER.index(name):-1] + [self.port_name]
+ # FIXME: The AppleWin port falls back to AppleMac for some results. Eventually we'll have a shared 'apple' port.
+ if self.get_option('webkit_test_runner'):
+ fallback_names.insert(0, 'win-wk2')
+ fallback_names.append('mac-wk2')
+ # Note we do not add 'wk2' here, even though it's included in _skipped_search_paths().
+ # FIXME: Perhaps we should get this list from MacPort?
+ fallback_names.extend(['mac-lion', 'mac'])
+ return map(self._webkit_baseline_path, fallback_names)
+
+ def operating_system(self):
+ return 'win'
+
+ def show_results_html_file(self, results_filename):
+ self._run_script('run-safari', [abspath_to_uri(SystemHost().platform, results_filename)])
+
+ # FIXME: webkitperl/httpd.pm installs /usr/lib/apache/libphp4.dll on cycwin automatically
+ # as part of running old-run-webkit-tests. That's bad design, but we may need some similar hack.
+ # We might use setup_environ_for_server for such a hack (or modify apache_http_server.py).
+
+ def _runtime_feature_list(self):
+ supported_features_command = [self._path_to_driver(), '--print-supported-features']
+ try:
+ output = self._executive.run_command(supported_features_command, error_handler=Executive.ignore_error)
+ except OSError, e:
+ _log.warn("Exception running driver: %s, %s. Driver must be built before calling WebKitPort.test_expectations()." % (supported_features_command, e))
+ return None
+
+ # Note: win/DumpRenderTree.cpp does not print a leading space before the features_string.
+ match_object = re.match("SupportedFeatures:\s*(?P<features_string>.*)\s*", output)
+ if not match_object:
+ return None
+ return match_object.group('features_string').split(' ')
+
+ # Note: These are based on the stock Cygwin locations for these files.
+ def _uses_apache(self):
+ return False
+
+ def _path_to_lighttpd(self):
+ return "/usr/sbin/lighttpd"
+
+ def _path_to_lighttpd_modules(self):
+ return "/usr/lib/lighttpd"
+
+ def _path_to_lighttpd_php(self):
+ return "/usr/bin/php-cgi"
+
+ def _driver_tempdir_for_environment(self):
+ return cygpath(self._driver_tempdir())
+
+ def test_search_path(self):
+ test_fallback_names = [path for path in self.baseline_search_path() if not path.startswith(self._webkit_baseline_path('mac'))]
+ return map(self._webkit_baseline_path, test_fallback_names)
+
+ def _ntsd_location(self):
+ possible_paths = [self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.0", "Debuggers", "x86", "ntsd.exe"),
+ self._filesystem.join(os.environ['PROGRAMFILES'], "Windows Kits", "8.0", "Debuggers", "x64", "ntsd.exe"),
+ self._filesystem.join(os.environ['PROGRAMFILES'], "Debugging Tools for Windows (x86)", "ntsd.exe"),
+ self._filesystem.join(os.environ['ProgramW6432'], "Debugging Tools for Windows (x64)", "ntsd.exe"),
+ self._filesystem.join(os.environ['SYSTEMROOT'], "system32", "ntsd.exe")]
+ for path in possible_paths:
+ expanded_path = self._filesystem.expanduser(path)
+ if self._filesystem.exists(expanded_path):
+ _log.debug("Using ntsd located in '%s'" % path)
+ return expanded_path
+ return None
+
+ def create_debugger_command_file(self):
+ debugger_temp_directory = str(self._filesystem.mkdtemp())
+ command_file = self._filesystem.join(debugger_temp_directory, "debugger-commands.txt")
+ commands = ''.join(['.logopen /t "%s\\%s.txt"\n' % (cygpath(self.results_directory()), self.CRASH_LOG_PREFIX),
+ '.srcpath "%s"\n' % cygpath(self._webkit_finder.webkit_base()),
+ '!analyze -vv\n',
+ '~*kpn\n',
+ 'q\n'])
+ self._filesystem.write_text_file(command_file, commands)
+ return command_file
+
+ def read_registry_string(self, key):
+ registry_key = self.POST_MORTEM_DEBUGGER_KEY % key
+ read_registry_command = ["regtool", "--wow32", "get", registry_key]
+ value = self._executive.run_command(read_registry_command, error_handler=Executive.ignore_error)
+ return value.rstrip()
+
+ def write_registry_string(self, key, value):
+ registry_key = self.POST_MORTEM_DEBUGGER_KEY % key
+ set_reg_value_command = ["regtool", "--wow32", "set", "-s", str(registry_key), str(value)]
+ rc = self._executive.run_command(set_reg_value_command, return_exit_code=True)
+ if rc == 2:
+ add_reg_value_command = ["regtool", "--wow32", "add", "-s", str(registry_key)]
+ rc = self._executive.run_command(add_reg_value_command, return_exit_code=True)
+ if rc == 0:
+ rc = self._executive.run_command(set_reg_value_command, return_exit_code=True)
+ if rc:
+ _log.warn("Error setting key: %s to value %s. Error=%ld." % (key, value, rc))
+ return False
+
+ # On Windows Vista/7 with UAC enabled, regtool will fail to modify the registry, but will still
+ # return a successful exit code. So we double-check here that the value we tried to write to the
+ # registry was really written.
+ if self.read_registry_string(key) != value:
+ _log.warn("Regtool reported success, but value of key %s did not change." % key)
+ return False
+
+ return True
+
+ def setup_crash_log_saving(self):
+ if '_NT_SYMBOL_PATH' not in os.environ:
+ _log.warning("The _NT_SYMBOL_PATH environment variable is not set. Crash logs will not be saved.")
+ return None
+ ntsd_path = self._ntsd_location()
+ if not ntsd_path:
+ _log.warning("Can't find ntsd.exe. Crash logs will not be saved.")
+ return None
+ # If we used -c (instead of -cf) we could pass the commands directly on the command line. But
+ # when the commands include multiple quoted paths (e.g., for .logopen and .srcpath), Windows
+ # fails to invoke the post-mortem debugger at all (perhaps due to a bug in Windows's command
+ # line parsing). So we save the commands to a file instead and tell the debugger to execute them
+ # using -cf.
+ command_file = self.create_debugger_command_file()
+ if not command_file:
+ return None
+ debugger_options = '"{0}" -p %ld -e %ld -g -noio -lines -cf "{1}"'.format(cygpath(ntsd_path), cygpath(command_file))
+ registry_settings = {'Debugger': debugger_options, 'Auto': "1"}
+ for key in registry_settings:
+ self.previous_debugger_values[key] = self.read_registry_string(key)
+ self.write_registry_string(key, registry_settings[key])
+
+ def restore_crash_log_saving(self):
+ for key in self.previous_debugger_values:
+ self.write_registry_string(key, self.previous_debugger_values[key])
+
+ def setup_test_run(self):
+ atexit.register(self.restore_crash_log_saving)
+ self.setup_crash_log_saving()
+ super(WinPort, self).setup_test_run()
+
+ def clean_up_test_run(self):
+ self.restore_crash_log_saving()
+ super(WinPort, self).clean_up_test_run()
+
+ def _get_crash_log(self, name, pid, stdout, stderr, newer_than, time_fn=None, sleep_fn=None, wait_for_log=True):
+ # Note that we do slow-spin here and wait, since it appears the time
+ # ReportCrash takes to actually write and flush the file varies when there are
+ # lots of simultaneous crashes going on.
+ # FIXME: Should most of this be moved into CrashLogs()?
+ time_fn = time_fn or time.time
+ sleep_fn = sleep_fn or time.sleep
+ crash_log = ''
+ crash_logs = CrashLogs(self.host, self.results_directory())
+ now = time_fn()
+ # FIXME: delete this after we're sure this code is working ...
+ _log.debug('looking for crash log for %s:%s' % (name, str(pid)))
+ deadline = now + 5 * int(self.get_option('child_processes', 1))
+ while not crash_log and now <= deadline:
+ # If the system_pid hasn't been determined yet, just try with the passed in pid. We'll be checking again later
+ system_pid = self._executive.pid_to_system_pid.get(pid)
+ if system_pid == None:
+ break # We haven't mapped cygwin pid->win pid yet
+ crash_log = crash_logs.find_newest_log(name, system_pid, include_errors=True, newer_than=newer_than)
+ if not wait_for_log:
+ break
+ if not crash_log or not [line for line in crash_log.splitlines() if line.startswith('quit:')]:
+ sleep_fn(0.1)
+ now = time_fn()
+
+ if not crash_log:
+ return (stderr, None)
+ return (stderr, crash_log)
+
+ def look_for_new_crash_logs(self, crashed_processes, start_time):
+ """Since crash logs can take a long time to be written out if the system is
+ under stress do a second pass at the end of the test run.
+
+ crashes: test_name -> pid, process_name tuple of crashed process
+ start_time: time the tests started at. We're looking for crash
+ logs after that time.
+ """
+ crash_logs = {}
+ for (test_name, process_name, pid) in crashed_processes:
+ # Passing None for output. This is a second pass after the test finished so
+ # if the output had any logging we would have already collected it.
+ crash_log = self._get_crash_log(process_name, pid, None, None, start_time, wait_for_log=False)[1]
+ if crash_log:
+ crash_logs[test_name] = crash_log
+ return crash_logs
+
+ def find_system_pid(self, name, pid):
+ system_pid = int(pid)
+ # Windows and Cygwin PIDs are not the same. We need to find the Windows
+ # PID for our Cygwin process so we can match it later to any crash
+ # files we end up creating (which will be tagged with the Windows PID)
+ ps_process = self._executive.run_command(['ps', '-e'], error_handler=Executive.ignore_error)
+ for line in ps_process.splitlines():
+ tokens = line.strip().split()
+ try:
+ cpid, ppid, pgid, winpid, tty, uid, stime, process_name = tokens
+ if process_name.endswith(name):
+ self._executive.pid_to_system_pid[int(cpid)] = int(winpid)
+ if int(pid) == int(cpid):
+ system_pid = int(winpid)
+ break
+ except ValueError, e:
+ pass
+
+ return system_pid
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py b/Tools/Scripts/webkitpy/port/win_unittest.py
index 9def7246a..97da3a1b2 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/win_unittest.py
+++ b/Tools/Scripts/webkitpy/port/win_unittest.py
@@ -27,15 +27,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import StringIO
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.executive_mock import MockExecutive, MockExecutive2
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import port_testcase
-from webkitpy.layout_tests.port.win import WinPort
+from webkitpy.port import port_testcase
+from webkitpy.port.win import WinPort
from webkitpy.tool.mocktool import MockOptions
@@ -105,5 +105,14 @@ class WinPortTest(port_testcase.PortTestCase):
self.assertEqual(port._runtime_feature_list(), ['foo', 'bar'])
def test_expectations_files(self):
- self.assertEqual(len(self.make_port().expectations_files()), 2)
- self.assertEqual(len(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).expectations_files()), 4)
+ self.assertEqual(len(self.make_port().expectations_files()), 3)
+ self.assertEqual(len(self.make_port(options=MockOptions(webkit_test_runner=True, configuration='Release')).expectations_files()), 5)
+
+ def test_get_crash_log(self):
+ # Win crash logs are tested elsewhere, so here we just make sure we don't crash.
+ def fake_time_cb():
+ times = [0, 20, 40]
+ return lambda: times.pop(0)
+ port = self.make_port(port_name='win')
+ port._get_crash_log('DumpRenderTree', 1234, '', '', 0,
+ time_fn=fake_time_cb(), sleep_fn=lambda delay: None)
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver.py b/Tools/Scripts/webkitpy/port/xvfbdriver.py
index b98c0392e..fc6675029 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver.py
+++ b/Tools/Scripts/webkitpy/port/xvfbdriver.py
@@ -31,14 +31,21 @@ import os
import re
import time
-from webkitpy.layout_tests.port.server_process import ServerProcess
-from webkitpy.layout_tests.port.driver import Driver
+from webkitpy.port.server_process import ServerProcess
+from webkitpy.port.driver import Driver
from webkitpy.common.system.file_lock import FileLock
_log = logging.getLogger(__name__)
class XvfbDriver(Driver):
+ @staticmethod
+ def check_xvfb(port):
+ xvfb_found = port.host.executive.run_command(['which', 'Xvfb'], return_exit_code=True) is 0
+ if not xvfb_found:
+ _log.error("No Xvfb found. Cannot run layout tests.")
+ return xvfb_found
+
def __init__(self, *args, **kwargs):
Driver.__init__(self, *args, **kwargs)
self._guard_lock = None
@@ -54,11 +61,13 @@ class XvfbDriver(Driver):
for i in range(99):
if i not in reserved_screens:
_guard_lock_file = self._port.host.filesystem.join('/tmp', 'WebKitXvfb.lock.%i' % i)
- self._guard_lock = FileLock(_guard_lock_file)
+ self._guard_lock = self._port.host.make_file_lock(_guard_lock_file)
if self._guard_lock.acquire_lock():
return i
def _start(self, pixel_tests, per_test_args):
+ self.stop()
+
# Use even displays for pixel tests and odd ones otherwise. When pixel tests are disabled,
# DriverProxy creates two drivers, one for normal and the other for ref tests. Both have
# the same worker number, so this prevents them from using the same Xvfb instance.
diff --git a/Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py b/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py
index 241b37c1f..ec9f14c45 100644
--- a/Tools/Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py
+++ b/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py
@@ -27,15 +27,15 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.executive_mock import MockExecutive2
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.systemhost_mock import MockSystemHost
-from webkitpy.layout_tests.port import Port
-from webkitpy.layout_tests.port.server_process_mock import MockServerProcess
-from webkitpy.layout_tests.port.xvfbdriver import XvfbDriver
+from webkitpy.port import Port
+from webkitpy.port.server_process_mock import MockServerProcess
+from webkitpy.port.xvfbdriver import XvfbDriver
from webkitpy.tool.mocktool import MockOptions
_log = logging.getLogger(__name__)
@@ -43,7 +43,7 @@ _log = logging.getLogger(__name__)
class XvfbDriverTest(unittest.TestCase):
def make_driver(self, worker_number=0, xorg_running=False, executive=None):
- port = Port(host=MockSystemHost(log_executive=True, executive=executive), options=MockOptions(configuration='Release'))
+ port = Port(MockSystemHost(log_executive=True, executive=executive), 'xvfbdrivertestport', options=MockOptions(configuration='Release'))
port._config.build_directory = lambda configuration: "/mock-build"
port._server_process_constructor = MockServerProcess
if xorg_running:
@@ -82,7 +82,7 @@ class XvfbDriverTest(unittest.TestCase):
self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
self.cleanup_driver(driver)
- def disabled_test_next_free_display(self):
+ def test_next_free_display(self):
output = "Xorg /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none\nXvfb Xvfb :1 -screen 0 800x600x24 -nolisten tcp"
executive = MockExecutive2(output)
driver = self.make_driver(executive=executive)
@@ -118,7 +118,7 @@ class XvfbDriverTest(unittest.TestCase):
def test_stop(self):
filesystem = MockFileSystem(files={'/tmp/.X42-lock': '1234\n'})
- port = Port(host=MockSystemHost(log_executive=True, filesystem=filesystem), options=MockOptions(configuration='Release'))
+ port = Port(MockSystemHost(log_executive=True, filesystem=filesystem), 'xvfbdrivertestport', options=MockOptions(configuration='Release'))
port._executive.kill_process = lambda x: _log.info("MOCK kill_process pid: " + str(x))
driver = XvfbDriver(port, worker_number=0, pixel_tests=True)
@@ -131,5 +131,5 @@ class XvfbDriverTest(unittest.TestCase):
expected_logs = "MOCK kill_process pid: 1234\n"
OutputCapture().assert_outputs(self, driver.stop, [], expected_logs=expected_logs)
- self.assertEqual(driver._xvfb_process, None)
+ self.assertIsNone(driver._xvfb_process)
self.assertFalse(port._filesystem.exists(driver._lock_file))
diff --git a/Tools/Scripts/webkitpy/style/checker.py b/Tools/Scripts/webkitpy/style/checker.py
index 7a1518b5b..f9e4a4695 100644
--- a/Tools/Scripts/webkitpy/style/checker.py
+++ b/Tools/Scripts/webkitpy/style/checker.py
@@ -39,6 +39,7 @@ from checkers.common import categories as CommonCategories
from checkers.common import CarriageReturnChecker
from checkers.changelog import ChangeLogChecker
from checkers.cpp import CppChecker
+from checkers.cmake import CMakeChecker
from checkers.jsonchecker import JSONChecker
from checkers.png import PNGChecker
from checkers.python import PythonChecker
@@ -164,6 +165,11 @@ _PATH_RULES_SPECIFIER = [
"Source/WebKit2/UIProcess/API/qt"],
["-readability/parameter_name"]),
+ ([# The GTK+ port uses the autotoolsconfig.h header in some C sources
+ # to serve the same purpose of config.h.
+ "Tools/GtkLauncher/main.c"],
+ ["-build/include_order"]),
+
([# The GTK+ APIs use GTK+ naming style, which includes
# lower-cased, underscore-separated values, whitespace before
# parens for function calls, and always having variable names.
@@ -174,7 +180,15 @@ _PATH_RULES_SPECIFIER = [
["-readability/naming",
"-readability/parameter_name",
"-readability/null",
+ "-readability/enum_casing",
"-whitespace/parens"]),
+
+ ([# The GTK+ API use upper case, underscore separated, words in
+ # certain types of enums (e.g. signals, properties).
+ "Source/WebKit2/UIProcess/API/gtk",
+ "Source/WebKit2/WebProcess/InjectedBundle/API/gtk"],
+ ["-readability/enum_casing"]),
+
([# Header files in ForwardingHeaders have no header guards or
# exceptional header guards (e.g., WebCore_FWD_Debugger_h).
"/ForwardingHeaders/"],
@@ -213,14 +227,19 @@ _PATH_RULES_SPECIFIER = [
([# The WebKit2 C API has names with underscores and whitespace-aligned
# struct members. Also, we allow unnecessary parameter names in
# WebKit2 APIs because we're matching CF's header style.
+ # Additionally, we use word which starts with non-capital letter 'k'
+ # for types of enums.
"Source/WebKit2/UIProcess/API/C/",
"Source/WebKit2/Shared/API/c/",
"Source/WebKit2/WebProcess/InjectedBundle/API/c/"],
- ["-readability/naming",
+ ["-readability/enum_casing",
+ "-readability/naming",
"-readability/parameter_name",
"-whitespace/declaration"]),
([# These files define GObjects, which implies some definitions of
# variables and functions containing underscores.
+ "Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.cpp",
+ "Source/WebCore/platform/graphics/clutter/GraphicsLayerActor.h",
"Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer1.cpp",
"Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp",
"Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp",
@@ -306,6 +325,8 @@ _XML_FILE_EXTENSIONS = [
_PNG_FILE_EXTENSION = 'png'
+_CMAKE_FILE_EXTENSION = 'cmake'
+
# Files to skip that are less obvious.
#
# Some files should be skipped when checking style. For example,
@@ -317,7 +338,9 @@ _SKIPPED_FILES_WITH_WARNING = [
# except those ending in ...Private.h are GTK+ API headers,
# which differ greatly from WebKit coding style.
re.compile(r'Source/WebKit2/UIProcess/API/gtk/WebKit(?!.*Private\.h).*\.h$'),
- 'Source/WebKit2/UIProcess/API/gtk/webkit2.h']
+ re.compile(r'Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKit(?!.*Private\.h).*\.h$'),
+ 'Source/WebKit2/UIProcess/API/gtk/webkit2.h',
+ 'Source/WebKit2/WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h']
# Files to skip that are more common or obvious.
#
@@ -325,6 +348,9 @@ _SKIPPED_FILES_WITH_WARNING = [
# with FileType.NONE are automatically skipped without warning.
_SKIPPED_FILES_WITHOUT_WARNING = [
"LayoutTests" + os.path.sep,
+ "Source/ThirdParty/leveldb" + os.path.sep,
+ # Prevents this being recognized as a text file.
+ "Source/WebCore/GNUmakefile.features.am.in",
]
# Extensions of files which are allowed to contain carriage returns.
@@ -496,6 +522,7 @@ class FileType:
WATCHLIST = 7
XML = 8
XCODEPROJ = 9
+ CMAKE = 10
class CheckerDispatcher(object):
@@ -574,6 +601,8 @@ class CheckerDispatcher(object):
return FileType.XCODEPROJ
elif file_extension == _PNG_FILE_EXTENSION:
return FileType.PNG
+ elif ((file_extension == _CMAKE_FILE_EXTENSION) or os.path.basename(file_path) == 'CMakeLists.txt'):
+ return FileType.CMAKE
elif ((not file_extension and os.path.join("Tools", "Scripts") in file_path) or
file_extension in _TEXT_FILE_EXTENSIONS or os.path.basename(file_path) == 'TestExpectations'):
return FileType.TEXT
@@ -604,6 +633,8 @@ class CheckerDispatcher(object):
checker = XcodeProjectFileChecker(file_path, handle_style_error)
elif file_type == FileType.PNG:
checker = PNGChecker(file_path, handle_style_error)
+ elif file_type == FileType.CMAKE:
+ checker = CMakeChecker(file_path, handle_style_error)
elif file_type == FileType.TEXT:
basename = os.path.basename(file_path)
if basename == 'TestExpectations':
diff --git a/Tools/Scripts/webkitpy/style/checker_unittest.py b/Tools/Scripts/webkitpy/style/checker_unittest.py
index 3b7d94c02..9a139c7c8 100755..100644
--- a/Tools/Scripts/webkitpy/style/checker_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checker_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8; -*-
#
# Copyright (C) 2009 Google Inc. All rights reserved.
@@ -36,7 +35,7 @@
import logging
import os
-import unittest
+import unittest2 as unittest
import checker as style
from webkitpy.common.system.logtesting import LogTesting, TestLogStream
@@ -174,7 +173,7 @@ class GlobalVariablesTest(unittest.TestCase):
# begin with -.
self.assertTrue(rule.startswith('-'))
# Check no rule occurs twice.
- self.assertFalse(rule in already_seen)
+ self.assertNotIn(rule, already_seen)
already_seen.append(rule)
def test_defaults(self):
@@ -275,8 +274,8 @@ class GlobalVariablesTest(unittest.TestCase):
"""Check that _MAX_REPORTS_PER_CATEGORY is valid."""
all_categories = self._all_categories()
for category in _MAX_REPORTS_PER_CATEGORY.iterkeys():
- self.assertTrue(category in all_categories,
- 'Key "%s" is not a category' % category)
+ self.assertIn(category, all_categories,
+ 'Key "%s" is not a category' % category)
class CheckWebKitStyleFunctionTest(unittest.TestCase):
@@ -397,7 +396,7 @@ class CheckerDispatcherDispatchTest(unittest.TestCase):
def assert_checker_none(self, file_path):
"""Assert that the dispatched checker is None."""
checker = self.dispatch(file_path)
- self.assertTrue(checker is None, 'Checking: "%s"' % file_path)
+ self.assertIsNone(checker, 'Checking: "%s"' % file_path)
def assert_checker(self, file_path, expected_class):
"""Assert the type of the dispatched checker."""
diff --git a/Tools/Scripts/webkitpy/style/checkers/changelog.py b/Tools/Scripts/webkitpy/style/checkers/changelog.py
index a096d3f46..699bc3dea 100644
--- a/Tools/Scripts/webkitpy/style/checkers/changelog.py
+++ b/Tools/Scripts/webkitpy/style/checkers/changelog.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2011 Patrick Gansterer <paroga@paroga.com>
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py b/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
index 315cd91b2..0ec0ec2da 100644
--- a/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/changelog_unittest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2010 Apple Inc. All rights reserved.
# Copyright (C) 2011 Patrick Gansterer <paroga@paroga.com>
#
@@ -26,7 +24,7 @@
"""Unit test for changelog.py."""
import changelog
-import unittest
+import unittest2 as unittest
class ChangeLogCheckerTest(unittest.TestCase):
@@ -182,6 +180,3 @@ class ChangeLogCheckerTest(unittest.TestCase):
' * Source/WebKit/foo.cpp: \n'
' * Source/WebKit/bar.cpp:\n'
' * Source/WebKit/foobar.cpp: Description\n')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/cmake.py b/Tools/Scripts/webkitpy/style/checkers/cmake.py
new file mode 100644
index 000000000..06b8929fa
--- /dev/null
+++ b/Tools/Scripts/webkitpy/style/checkers/cmake.py
@@ -0,0 +1,150 @@
+# Copyright (C) 2012 Intel 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 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.
+
+
+"""Supports checking WebKit style in cmake files.(.cmake, CMakeLists.txt)"""
+
+import re
+
+from common import TabChecker
+
+
+class CMakeChecker(object):
+
+ """Processes CMake lines for checking style."""
+
+ # NO_SPACE_CMDS list are based on commands section of CMake document.
+ # Now it is generated from
+ # http://www.cmake.org/cmake/help/v2.8.10/cmake.html#section_Commands.
+ # Some commands are from default CMake modules such as pkg_check_modules.
+ # Please keep list in alphabet order.
+ #
+ # For commands in this list, spaces should not be added it and its
+ # parentheses. For eg, message("testing"), not message ("testing")
+ #
+ # The conditional commands like if, else, endif, foreach, endforeach,
+ # while, endwhile and break are listed in ONE_SPACE_CMDS
+ NO_SPACE_CMDS = [
+ 'add_custom_command', 'add_custom_target', 'add_definitions',
+ 'add_dependencies', 'add_executable', 'add_library',
+ 'add_subdirectory', 'add_test', 'aux_source_directory',
+ 'build_command',
+ 'cmake_minimum_required', 'cmake_policy', 'configure_file',
+ 'create_test_sourcelist',
+ 'define_property',
+ 'enable_language', 'enable_testing', 'endfunction', 'endmacro',
+ 'execute_process', 'export',
+ 'file', 'find_file', 'find_library', 'find_package', 'find_path',
+ 'find_program', 'fltk_wrap_ui', 'function',
+ 'get_cmake_property', 'get_directory_property',
+ 'get_filename_component', 'get_property', 'get_source_file_property',
+ 'get_target_property', 'get_test_property',
+ 'include', 'include_directories', 'include_external_msproject',
+ 'include_regular_expression', 'install',
+ 'link_directories', 'list', 'load_cache', 'load_command',
+ 'macro', 'mark_as_advanced', 'math', 'message',
+ 'option',
+ #From FindPkgConfig.cmake
+ 'pkg_check_modules',
+ 'project',
+ 'qt_wrap_cpp', 'qt_wrap_ui',
+ 'remove_definitions', 'return',
+ 'separate_arguments', 'set', 'set_directory_properties', 'set_property',
+ 'set_source_files_properties', 'set_target_properties',
+ 'set_tests_properties', 'site_name', 'source_group', 'string',
+ 'target_link_libraries', 'try_compile', 'try_run',
+ 'unset',
+ 'variable_watch',
+ ]
+
+ # CMake conditional commands, require one space between command and
+ # its parentheses, such as "if (", "foreach (", etc.
+ ONE_SPACE_CMDS = [
+ 'if', 'else', 'elseif', 'endif',
+ 'foreach', 'endforeach',
+ 'while', 'endwhile',
+ 'break',
+ ]
+
+ def __init__(self, file_path, handle_style_error):
+ self._handle_style_error = handle_style_error
+ self._tab_checker = TabChecker(file_path, handle_style_error)
+
+ def check(self, lines):
+ self._tab_checker.check(lines)
+ self._num_lines = len(lines)
+ for l in xrange(self._num_lines):
+ self._process_line(l + 1, lines[l])
+
+ def _process_line(self, line_number, line_content):
+ if re.match('(^|\ +)#', line_content):
+ # ignore comment line
+ return
+ l = line_content.expandtabs(4)
+ # check command like message( "testing")
+ if re.search('\(\ +', l):
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5,
+ 'No space after "("')
+ # check command like message("testing" )
+ if re.search('\ +\)', l) and not re.search('^\ +\)$', l):
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5,
+ 'No space before ")"')
+ self._check_trailing_whitespace(line_number, l)
+ self._check_no_space_cmds(line_number, l)
+ self._check_one_space_cmds(line_number, l)
+ self._check_indent(line_number, line_content)
+
+ def _check_trailing_whitespace(self, line_number, line_content):
+ line_content = line_content.rstrip('\n') # chr(10), newline
+ line_content = line_content.rstrip('\r') # chr(13), carriage return
+ line_content = line_content.rstrip('\x0c') # chr(12), form feed, ^L
+ stripped = line_content.rstrip()
+ if line_content != stripped:
+ self._handle_style_error(line_number, 'whitespace/trailing', 5,
+ 'No trailing spaces')
+
+ def _check_no_space_cmds(self, line_number, line_content):
+ # check command like "SET (" or "Set("
+ for t in self.NO_SPACE_CMDS:
+ self._check_non_lowercase_cmd(line_number, line_content, t)
+ if re.search('(^|\ +)' + t.lower() + '\ +\(', line_content):
+ msg = 'No space between command "' + t.lower() + '" and its parentheses, should be "' + t + '("'
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5, msg)
+
+ def _check_one_space_cmds(self, line_number, line_content):
+ # check command like "IF (" or "if(" or "if (" or "If ()"
+ for t in self.ONE_SPACE_CMDS:
+ self._check_non_lowercase_cmd(line_number, line_content, t)
+ if re.search('(^|\ +)' + t.lower() + '(\(|\ \ +\()', line_content):
+ msg = 'One space between command "' + t.lower() + '" and its parentheses, should be "' + t + ' ("'
+ self._handle_style_error(line_number, 'whitespace/parentheses', 5, msg)
+
+ def _check_non_lowercase_cmd(self, line_number, line_content, cmd):
+ if re.search('(^|\ +)' + cmd + '\ *\(', line_content, flags=re.IGNORECASE) and \
+ (not re.search('(^|\ +)' + cmd.lower() + '\ *\(', line_content)):
+ msg = 'Use lowercase command "' + cmd.lower() + '"'
+ self._handle_style_error(line_number, 'command/lowercase', 5, msg)
+
+ def _check_indent(self, line_number, line_content):
+ #TODO (halton): add indent checking
+ pass
diff --git a/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py
new file mode 100644
index 000000000..7b2cdaf0e
--- /dev/null
+++ b/Tools/Scripts/webkitpy/style/checkers/cmake_unittest.py
@@ -0,0 +1,90 @@
+# Copyright (C) 2012 Intel 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. AND ITS 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 APPLE INC. OR ITS 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.
+
+"""Unit test for cmake.py."""
+
+import unittest2 as unittest
+
+from cmake import CMakeChecker
+
+
+class CMakeCheckerTest(unittest.TestCase):
+
+ """Tests CMakeChecker class."""
+
+ def test_init(self):
+ """Test __init__() method."""
+ def _mock_handle_style_error(self):
+ pass
+
+ checker = CMakeChecker("foo.cmake", _mock_handle_style_error)
+ self.assertEqual(checker._handle_style_error, _mock_handle_style_error)
+
+ def test_check(self):
+ """Test check() method."""
+ errors = []
+
+ def _mock_handle_style_error(line_number, category, confidence,
+ message):
+ error = (line_number, category, confidence, message)
+ errors.append(error)
+
+ checker = CMakeChecker("foo.cmake", _mock_handle_style_error)
+
+ lines = [
+ '# This file is sample input for cmake_unittest.py and includes below problems:\n',
+ 'IF ()',
+ '\tmessage("Error line with Tab")\n',
+ ' message("Error line with endding spaces") \n',
+ ' message( "Error line with space after (")\n',
+ ' message("Error line with space before (" )\n',
+ ' MESSAGE("Error line with upper case non-condtional command")\n',
+ ' MESSage("Error line with upper case non-condtional command")\n',
+ ' message("correct message line")\n',
+ 'ENDif ()\n',
+ '\n',
+ 'if()\n',
+ 'endif ()\n',
+ '\n',
+ 'macro ()\n',
+ 'ENDMacro()\n',
+ '\n',
+ 'function ()\n',
+ 'endfunction()\n',
+ ]
+ checker.check(lines)
+
+ self.maxDiff = None
+ self.assertEqual(errors, [
+ (3, 'whitespace/tab', 5, 'Line contains tab character.'),
+ (2, 'command/lowercase', 5, 'Use lowercase command "if"'),
+ (4, 'whitespace/trailing', 5, 'No trailing spaces'),
+ (5, 'whitespace/parentheses', 5, 'No space after "("'),
+ (6, 'whitespace/parentheses', 5, 'No space before ")"'),
+ (7, 'command/lowercase', 5, 'Use lowercase command "message"'),
+ (8, 'command/lowercase', 5, 'Use lowercase command "message"'),
+ (10, 'command/lowercase', 5, 'Use lowercase command "endif"'),
+ (12, 'whitespace/parentheses', 5, 'One space between command "if" and its parentheses, should be "if ("'),
+ (15, 'whitespace/parentheses', 5, 'No space between command "macro" and its parentheses, should be "macro("'),
+ (16, 'command/lowercase', 5, 'Use lowercase command "endmacro"'),
+ (18, 'whitespace/parentheses', 5, 'No space between command "function" and its parentheses, should be "function("'),
+ ])
diff --git a/Tools/Scripts/webkitpy/style/checkers/common_unittest.py b/Tools/Scripts/webkitpy/style/checkers/common_unittest.py
index df4707730..8449b989b 100644
--- a/Tools/Scripts/webkitpy/style/checkers/common_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/common_unittest.py
@@ -22,7 +22,7 @@
"""Unit tests for common.py."""
-import unittest
+import unittest2 as unittest
from common import CarriageReturnChecker
from common import TabChecker
@@ -119,6 +119,3 @@ class TabCheckerTest(unittest.TestCase):
def test_tab(self):
self.assert_tab(['\tfoo'], [1])
self.assert_tab(['line1', '\tline2', 'line3\t'], [2, 3])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp.py b/Tools/Scripts/webkitpy/style/checkers/cpp.py
index c99cbea3d..d67e69ad8 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009, 2010, 2012 Google Inc. All rights reserved.
@@ -649,13 +648,16 @@ class FileInfo:
prefix = os.path.commonprefix([root_dir, project_dir])
return fullname[len(prefix) + 1:]
- # Not SVN? Try to find a git top level directory by
+
+ # Not SVN <= 1.6? Try to find a git, or svn top level directory by
# searching up from the current path.
root_dir = os.path.dirname(fullname)
while (root_dir != os.path.dirname(root_dir)
- and not os.path.exists(os.path.join(root_dir, ".git"))):
+ and not os.path.exists(os.path.join(root_dir, ".git"))
+ and not os.path.exists(os.path.join(root_dir, ".svn"))):
root_dir = os.path.dirname(root_dir)
- if os.path.exists(os.path.join(root_dir, ".git")):
+ if (os.path.exists(os.path.join(root_dir, ".git")) or
+ os.path.exists(os.path.join(root_dir, ".svn"))):
prefix = os.path.commonprefix([root_dir, project_dir])
return fullname[len(prefix) + 1:]
@@ -1217,6 +1219,7 @@ class _EnumState(object):
def __init__(self):
self.in_enum_decl = False
+ self.is_webidl_enum = False
def process_clean_line(self, line):
# FIXME: The regular expressions for expr_all_uppercase and expr_enum_end only accept integers
@@ -1229,21 +1232,27 @@ class _EnumState(object):
if self.in_enum_decl:
if match(r'\s*' + expr_enum_end + r'$', line):
self.in_enum_decl = False
+ self.is_webidl_enum = False
elif match(expr_all_uppercase, line):
- return False
+ return self.is_webidl_enum
elif match(expr_starts_lowercase, line):
return False
else:
- if match(expr_enum_start + r'$', line):
+ matched = match(expr_enum_start + r'$', line)
+ if matched:
self.in_enum_decl = True
else:
matched = match(expr_enum_start + r'(?P<members>.*)' + expr_enum_end + r'$', line)
if matched:
members = matched.group('members').split(',')
+ found_invalid_member = False
for member in members:
if match(expr_all_uppercase, member):
- return False
+ found_invalid_member = not self.is_webidl_enum
if match(expr_starts_lowercase, member):
+ found_invalid_member = True
+ if found_invalid_member:
+ self.is_webidl_enum = False
return False
return True
return True
@@ -1656,20 +1665,6 @@ def check_function_definition(filename, file_extension, clean_lines, line_number
return
modifiers_and_return_type = function_state.modifiers_and_return_type()
- if filename.find('/chromium/') != -1 and search(r'\bWEBKIT_EXPORT\b', modifiers_and_return_type):
- if filename.find('/chromium/public/') == -1 and filename.find('/chromium/tests/') == -1 and filename.find('chromium/platform') == -1:
- error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
- 'WEBKIT_EXPORT should only appear in the chromium public (or tests) directory.')
- elif not file_extension == "h":
- error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
- 'WEBKIT_EXPORT should only be used in header files.')
- elif not function_state.is_declaration or search(r'\binline\b', modifiers_and_return_type):
- error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
- 'WEBKIT_EXPORT should not be used on a function with a body.')
- elif function_state.is_pure:
- error(function_state.function_name_start_position.row, 'readability/webkit_export', 5,
- 'WEBKIT_EXPORT should not be used with a pure virtual function.')
-
check_function_definition_and_pass_ptr(modifiers_and_return_type, function_state.function_name_start_position.row, 'return', error)
parameter_list = function_state.parameter_list()
@@ -2088,6 +2083,8 @@ def check_enum_casing(clean_lines, line_number, enum_state, error):
error: The function to call with any errors found.
"""
+ enum_state.is_webidl_enum |= bool(match(r'\s*// Web(?:Kit)?IDL enum\s*$', clean_lines.raw_lines[line_number]))
+
line = clean_lines.elided[line_number] # Get rid of comments and strings.
if not enum_state.process_clean_line(line):
error(line_number, 'readability/enum_casing', 4,
@@ -2164,6 +2161,30 @@ def check_using_std(clean_lines, line_number, file_state, error):
"Use 'using namespace std;' instead of 'using std::%s;'." % method_name)
+def check_using_namespace(clean_lines, line_number, file_extension, error):
+ """Looks for 'using namespace foo;' which should be removed.
+
+ Args:
+ clean_lines: A CleansedLines instance containing the file.
+ line_number: The number of the line to check.
+ file_extension: The extension (dot not included) of the file.
+ error: The function to call with any errors found.
+ """
+
+ # This check applies only to headers.
+ if file_extension != 'h':
+ return
+
+ line = clean_lines.elided[line_number] # Get rid of comments and strings.
+
+ using_namespace_match = match(r'\s*using\s+namespace\s+(?P<method_name>\S+)\s*;\s*$', line)
+ if not using_namespace_match:
+ return
+
+ method_name = using_namespace_match.group('method_name')
+ error(line_number, 'build/using_namespace', 4,
+ "Do not use 'using namespace %s;'." % method_name)
+
def check_max_min_macros(clean_lines, line_number, file_state, error):
"""Looks use of MAX() and MIN() macros that should be replaced with std::max() and std::min().
@@ -2548,8 +2569,8 @@ def check_for_null(clean_lines, line_number, file_state, error):
if search(r'\bgdk_pixbuf_save_to\w+\b', line):
return
- # Don't warn about NULL usage in gtk_widget_style_get() or gtk_style_context_get_style. See Bug 51758
- if search(r'\bgtk_widget_style_get\(\w+\b', line) or search(r'\bgtk_style_context_get_style\(\w+\b', line):
+ # Don't warn about NULL usage in gtk_widget_style_get(), gtk_style_context_get_style(), or gtk_style_context_get(). See Bug 51758
+ if search(r'\bgtk_widget_style_get\(\w+\b', line) or search(r'\bgtk_style_context_get_style\(\w+\b', line) or search(r'\bgtk_style_context_get\(\w+\b', line):
return
# Don't warn about NULL usage in soup_server_new(). See Bug 77890.
@@ -2648,6 +2669,7 @@ def check_style(clean_lines, line_number, file_extension, class_state, file_stat
check_namespace_indentation(clean_lines, line_number, file_extension, file_state, error)
check_directive_indentation(clean_lines, line_number, file_state, error)
check_using_std(clean_lines, line_number, file_state, error)
+ check_using_namespace(clean_lines, line_number, file_extension, error)
check_max_min_macros(clean_lines, line_number, file_state, error)
check_ctype_functions(clean_lines, line_number, file_state, error)
check_switch_indentation(clean_lines, line_number, error)
@@ -2818,10 +2840,6 @@ def check_include_line(filename, file_extension, clean_lines, line_number, inclu
error(line_number, 'build/include', 4,
'wtf includes should be <wtf/file.h> instead of "wtf/file.h".')
- if filename.find('/chromium/') != -1 and include.startswith('cc/CC'):
- error(line_number, 'build/include', 4,
- 'cc includes should be "CCFoo.h" instead of "cc/CCFoo.h".')
-
duplicate_header = include in include_state
if duplicate_header:
error(line_number, 'build/include', 4,
@@ -3637,6 +3655,7 @@ class CppChecker(object):
'build/printf_format',
'build/storage_class',
'build/using_std',
+ 'build/using_namespace',
'legal/copyright',
'readability/braces',
'readability/casting',
diff --git a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
index 822ed77c9..6ef857c41 100644
--- a/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/cpp_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8; -*-
#
# Copyright (C) 2011 Google Inc. All rights reserved.
@@ -40,7 +39,7 @@ import codecs
import os
import random
import re
-import unittest
+import unittest2 as unittest
import cpp as cpp_style
from cpp import CppChecker
from ..filter import FilterConfiguration
@@ -2761,15 +2760,6 @@ class OrderOfIncludesTest(CppStyleTestBase):
'wtf includes should be <wtf/file.h> instead of "wtf/file.h".'
' [build/include] [4]')
- def test_check_cc_includes(self):
- self.assert_language_rules_check('bar/chromium/foo.cpp',
- '#include "config.h"\n'
- '#include "foo.h"\n'
- '\n'
- '#include "cc/CCProxy.h"\n',
- 'cc includes should be "CCFoo.h" instead of "cc/CCFoo.h".'
- ' [build/include] [4]')
-
def test_classify_include(self):
classify_include = cpp_style._classify_include
include_state = cpp_style._IncludeState()
@@ -3295,6 +3285,21 @@ class NoNonVirtualDestructorsTest(CppStyleTestBase):
};''',
'')
+ self.assert_multi_line_lint(
+ '''\
+ // WebIDL enum
+ enum Foo {
+ FOO_ONE = 1,
+ FOO_TWO = 2,
+ };''',
+ '')
+
+ self.assert_multi_line_lint(
+ '''\
+ // WebKitIDL enum
+ enum Foo { FOO_ONE, FOO_TWO };''',
+ '')
+
def test_destructor_non_virtual_when_virtual_needed(self):
self.assert_multi_line_lint_re(
'''\
@@ -4397,6 +4402,9 @@ class WebKitStyleTest(CppStyleTestBase):
'gtk_style_context_get_style(context, "propertyName", &value, "otherName", &otherValue, NULL);',
'')
self.assert_lint(
+ 'gtk_style_context_get(context, static_cast<GtkStateFlags>(0), "property", &value, NULL);',
+ '')
+ self.assert_lint(
'gtk_widget_style_get_property(style, NULL, NULL);',
'Use 0 instead of NULL. [readability/null] [5]',
'foo.cpp')
@@ -4482,6 +4490,13 @@ class WebKitStyleTest(CppStyleTestBase):
" [build/using_std] [4]",
'foo.cpp')
+ def test_using_namespace(self):
+ self.assert_lint(
+ 'using namespace foo;',
+ "Do not use 'using namespace foo;'."
+ " [build/using_namespace] [4]",
+ 'foo.h')
+
def test_max_macro(self):
self.assert_lint(
'int i = MAX(0, 1);',
@@ -4778,50 +4793,16 @@ class WebKitStyleTest(CppStyleTestBase):
' [whitespace/comments] [5]')
def test_webkit_export_check(self):
- webkit_export_error_rules = ('-',
- '+readability/webkit_export')
+ webkit_export_error_rules = ('-', '+readability/webkit_export')
self.assertEqual('',
- self.perform_lint('WEBKIT_EXPORT int foo();\n',
- 'WebKit/chromium/public/test.h',
- webkit_export_error_rules))
- self.assertEqual('',
- self.perform_lint('WEBKIT_EXPORT int foo();\n',
- 'WebKit/chromium/tests/test.h',
- webkit_export_error_rules))
- self.assertEqual('WEBKIT_EXPORT should only be used in header files. [readability/webkit_export] [5]',
- self.perform_lint('WEBKIT_EXPORT int foo();\n',
- 'WebKit/chromium/public/test.cpp',
- webkit_export_error_rules))
- self.assertEqual('WEBKIT_EXPORT should only appear in the chromium public (or tests) directory. [readability/webkit_export] [5]',
- self.perform_lint('WEBKIT_EXPORT int foo();\n',
- 'WebKit/chromium/src/test.h',
- webkit_export_error_rules))
- self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body. [readability/webkit_export] [5]',
- self.perform_lint('WEBKIT_EXPORT int foo() { }\n',
- 'WebKit/chromium/public/test.h',
- webkit_export_error_rules))
- self.assertEqual('WEBKIT_EXPORT should not be used on a function with a body. [readability/webkit_export] [5]',
- self.perform_lint('WEBKIT_EXPORT inline int foo()\n'
- '{\n'
- '}\n',
- 'WebKit/chromium/public/test.h',
- webkit_export_error_rules))
- self.assertEqual('WEBKIT_EXPORT should not be used with a pure virtual function. [readability/webkit_export] [5]',
- self.perform_lint('{}\n'
- 'WEBKIT_EXPORT\n'
- 'virtual\n'
- 'int\n'
- 'foo() = 0;\n',
- 'WebKit/chromium/public/test.h',
- webkit_export_error_rules))
- self.assertEqual('',
- self.perform_lint('{}\n'
- 'WEBKIT_EXPORT\n'
- 'virtual\n'
- 'int\n'
- 'foo() = 0;\n',
- 'test.h',
- webkit_export_error_rules))
+ self.perform_lint(
+ '{}\n'
+ 'WEBKIT_EXPORT\n'
+ 'virtual\n'
+ 'int\n'
+ 'foo() = 0;\n',
+ 'test.h',
+ webkit_export_error_rules))
def test_other(self):
# FIXME: Implement this.
@@ -4874,30 +4855,3 @@ class CppCheckerTest(unittest.TestCase):
# Thus, just check the distinguishing case to verify that the
# code defines __ne__.
self.assertFalse(checker1 != checker2)
-
-
-def tearDown():
- """A global check to make sure all error-categories have been tested.
-
- The main tearDown() routine is the only code we can guarantee will be
- run after all other tests have been executed.
- """
- try:
- if _run_verifyallcategoriesseen:
- ErrorCollector(None).verify_all_categories_are_seen()
- except NameError:
- # If nobody set the global _run_verifyallcategoriesseen, then
- # we assume we shouldn't run the test
- pass
-
-if __name__ == '__main__':
- import sys
- # We don't want to run the verify_all_categories_are_seen() test unless
- # we're running the full test suite: if we only run one test,
- # obviously we're not going to see all the error categories. So we
- # only run verify_all_categories_are_seen() when no commandline flags
- # are passed in.
- global _run_verifyallcategoriesseen
- _run_verifyallcategoriesseen = (len(sys.argv) == 1)
-
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py b/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
index e7fbbb42c..62a0793c4 100755..100644
--- a/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/jsonchecker_unittest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2010 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,7 +22,7 @@
"""Unit test for jsonchecker.py."""
-import unittest
+import unittest2 as unittest
import jsonchecker
@@ -69,7 +67,7 @@ class JSONCheckerTest(unittest.TestCase):
mock_error_handler.had_error = True
self.assertEqual(expected_line_number, line_number)
self.assertEqual(expected_category, category)
- self.assertTrue(category in jsonchecker.JSONChecker.categories)
+ self.assertIn(category, jsonchecker.JSONChecker.categories)
error_handler = MockErrorHandler(handle_style_error)
error_handler.had_error = False
@@ -111,6 +109,3 @@ class JSONCheckerTest(unittest.TestCase):
]
}
""")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/png_unittest.py b/Tools/Scripts/webkitpy/style/checkers/png_unittest.py
index 92b5ba448..a71a441f1 100644
--- a/Tools/Scripts/webkitpy/style/checkers/png_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/png_unittest.py
@@ -23,7 +23,7 @@
"""Unit test for png.py."""
-import unittest
+import unittest2 as unittest
from png import PNGChecker
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.systemhost_mock import MockSystemHost
@@ -129,6 +129,3 @@ class PNGCheckerTest(unittest.TestCase):
checker.check()
self.assertEqual(len(errors), 2)
self.assertEqual(errors[0], (0, 'image/png', 5, 'Image lacks a checksum. Generate pngs using run-webkit-tests to ensure they have a checksum.'))
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/python.py b/Tools/Scripts/webkitpy/style/checkers/python.py
index 9fc436f3d..2066d9d51 100644
--- a/Tools/Scripts/webkitpy/style/checkers/python.py
+++ b/Tools/Scripts/webkitpy/style/checkers/python.py
@@ -95,6 +95,7 @@ class Pylinter(object):
"Instance of 'Popen' has no 'stdout' member",
"Instance of 'Popen' has no 'stderr' member",
"Instance of 'Popen' has no 'wait' member",
+ "Instance of 'Popen' has no 'pid' member",
]
def __init__(self):
diff --git a/Tools/Scripts/webkitpy/style/checkers/python_unittest.py b/Tools/Scripts/webkitpy/style/checkers/python_unittest.py
index 73bda76e2..2aa7cbe4c 100644
--- a/Tools/Scripts/webkitpy/style/checkers/python_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/python_unittest.py
@@ -23,7 +23,7 @@
"""Unit tests for python.py."""
import os
-import unittest
+import unittest2 as unittest
from python import PythonChecker
@@ -61,3 +61,20 @@ class PythonCheckerTest(unittest.TestCase):
(4, "pep8/W291", 5, "trailing whitespace"),
(4, "pylint/E0602", 5, "Undefined variable 'error'"),
])
+
+ def test_pylint_false_positives(self):
+ """Test that pylint false positives are suppressed."""
+ errors = []
+
+ def _mock_handle_style_error(line_number, category, confidence,
+ message):
+ error = (line_number, category, confidence, message)
+ errors.append(error)
+
+ current_dir = os.path.dirname(__file__)
+ file_path = os.path.join(current_dir, "python_unittest_falsepositives.py")
+
+ checker = PythonChecker(file_path, _mock_handle_style_error)
+ checker.check(lines=[])
+
+ self.assertEqual(errors, [])
diff --git a/Tools/Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py b/Tools/Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py
new file mode 100644
index 000000000..0ad66a502
--- /dev/null
+++ b/Tools/Scripts/webkitpy/style/checkers/python_unittest_falsepositives.py
@@ -0,0 +1,16 @@
+# This test verifies that the false positives generated by pylint are
+# correctly suppressed.
+
+import subprocess
+
+
+def test_popen(proc):
+ p = subprocess.Popen(proc, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ tmp1 = p.poll
+ tmp2 = p.returncode
+ tmp3 = p.stdin
+ tmp4 = p.stdout
+ tmp5 = p.stderr
+ tmp6 = p.wait
+ tmp7 = p.pid
diff --git a/Tools/Scripts/webkitpy/style/checkers/test_expectations.py b/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
index 51b97bec5..67f38416d 100644
--- a/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
+++ b/Tools/Scripts/webkitpy/style/checkers/test_expectations.py
@@ -62,7 +62,6 @@ class TestExpectationsChecker(object):
def __init__(self, file_path, handle_style_error, host=None):
self._file_path = file_path
self._handle_style_error = handle_style_error
- self._handle_style_error.turn_off_line_filtering()
self._tab_checker = TabChecker(file_path, handle_style_error)
# FIXME: host should be a required parameter, not an optional one.
diff --git a/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py b/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
index b1d7f77f4..18648dfee 100644
--- a/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/test_expectations_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,7 +28,7 @@
import os
import sys
-import unittest
+import unittest2 as unittest
from test_expectations import TestExpectationsChecker
from webkitpy.common.host_mock import MockHost
@@ -71,12 +70,10 @@ class TestExpectationsTestCase(unittest.TestCase):
if port:
self.assertTrue(port.name().startswith(expected_port_implementation))
else:
- self.assertEqual(None, expected_port_implementation)
+ self.assertIsNone(expected_port_implementation)
def test_determine_port_from_expectations_path(self):
self._expect_port_for_expectations_path(None, '/')
- self._expect_port_for_expectations_path(None, 'LayoutTests/chromium-mac/TestExpectations')
- self._expect_port_for_expectations_path('chromium', 'LayoutTests/platform/chromium/TestExpectations')
self._expect_port_for_expectations_path(None, '/mock-checkout/LayoutTests/platform/win/TestExpectations')
self._expect_port_for_expectations_path('win', 'LayoutTests/platform/win/TestExpectations')
self._expect_port_for_expectations_path('efl', 'LayoutTests/platform/efl/TestExpectations')
@@ -95,7 +92,7 @@ class TestExpectationsTestCase(unittest.TestCase):
self._error_collector, host=host)
# We should have failed to find a valid port object for that path.
- self.assertEqual(checker._port_obj, None)
+ self.assertIsNone(checker._port_obj)
# Now use a test port so we can check the lines.
checker._port_obj = host.port_factory.get('test-mac-leopard')
@@ -108,10 +105,15 @@ class TestExpectationsTestCase(unittest.TestCase):
self.assertEqual(expected_output, self._error_collector.get_errors())
else:
self.assertNotEquals('', self._error_collector.get_errors())
- self.assertTrue(self._error_collector.turned_off_filtering)
+
+ # Note that a patch might change a line that introduces errors elsewhere, but we
+ # don't want to lint the whole file (it can unfairly punish patches for pre-existing errors).
+ # We rely on a separate lint-webkitpy step on the bots to keep the whole file okay.
+ # FIXME: See https://bugs.webkit.org/show_bug.cgi?id=104712 .
+ self.assertFalse(self._error_collector.turned_off_filtering)
def test_valid_expectations(self):
- self.assert_lines_lint(["crbug.com/1234 [ Mac ] passes/text.html [ Pass Failure ]"], should_pass=True)
+ self.assert_lines_lint(["webkit.org/b/1234 [ Mac ] passes/text.html [ Pass Failure ]"], should_pass=True)
def test_invalid_expectations(self):
self.assert_lines_lint(["Bug(me) passes/text.html [ Give Up]"], should_pass=False)
diff --git a/Tools/Scripts/webkitpy/style/checkers/text_unittest.py b/Tools/Scripts/webkitpy/style/checkers/text_unittest.py
index 18db6ad3d..01e373abc 100644
--- a/Tools/Scripts/webkitpy/style/checkers/text_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/text_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,7 +28,7 @@
"""Unit test for text_style.py."""
-import unittest
+import unittest2 as unittest
import text as text_style
from text import TextChecker
@@ -46,7 +45,7 @@ class TextStyleTestCase(unittest.TestCase):
self.had_error = True
text_style.process_file_data('', lines, error_for_test)
- self.assertTrue(not self.had_error, '%s should not have any errors.' % lines)
+ self.assertFalse(self.had_error, '%s should not have any errors.' % lines)
def assertError(self, lines, expected_line_number):
"""Asserts that the specified lines has an error."""
@@ -88,7 +87,3 @@ class TextCheckerTest(unittest.TestCase):
checker = TextChecker("foo.txt", self.mock_handle_style_error)
self.assertEqual(checker.file_path, "foo.txt")
self.assertEqual(checker.handle_style_error, self.mock_handle_style_error)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py b/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
index ff3a315f1..90950c9f9 100644
--- a/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2010 Apple Inc. All rights reserved.
# Copyright (C) 2011 Google Inc. All rights reserved.
#
@@ -33,7 +31,7 @@
'''Unit tests for watchlist.py.'''
-import unittest
+import unittest2 as unittest
import watchlist
diff --git a/Tools/Scripts/webkitpy/style/checkers/xcodeproj.py b/Tools/Scripts/webkitpy/style/checkers/xcodeproj.py
index 89c072d94..3de3d197f 100644
--- a/Tools/Scripts/webkitpy/style/checkers/xcodeproj.py
+++ b/Tools/Scripts/webkitpy/style/checkers/xcodeproj.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py b/Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py
index 9713fd154..36a1a41da 100644
--- a/Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -26,7 +24,7 @@
"""Unit test for xcodeproj.py."""
import xcodeproj
-import unittest
+import unittest2 as unittest
class TestErrorHandler(object):
@@ -69,6 +67,3 @@ class XcodeProjectFileCheckerTest(unittest.TestCase):
self.assert_error([''], 'Missing "developmentRegion = English".')
self.assert_error(['developmentRegion = Japanese;'],
'developmentRegion is not English.')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/checkers/xml_unittest.py b/Tools/Scripts/webkitpy/style/checkers/xml_unittest.py
index 7055a4f92..a224de3f0 100644
--- a/Tools/Scripts/webkitpy/style/checkers/xml_unittest.py
+++ b/Tools/Scripts/webkitpy/style/checkers/xml_unittest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-#
# Copyright (C) 2010 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,7 +22,7 @@
"""Unit test for xml.py."""
-import unittest
+import unittest2 as unittest
import xml
@@ -87,6 +85,3 @@ class XMLCheckerTest(unittest.TestCase):
def test_no_error(self):
self.assert_no_error('<foo>\n</foo>')
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/style/error_handlers_unittest.py b/Tools/Scripts/webkitpy/style/error_handlers_unittest.py
index c02143178..0b4c35596 100644
--- a/Tools/Scripts/webkitpy/style/error_handlers_unittest.py
+++ b/Tools/Scripts/webkitpy/style/error_handlers_unittest.py
@@ -23,7 +23,7 @@
"""Unit tests for error_handlers.py."""
-import unittest
+import unittest2 as unittest
from checker import StyleProcessorConfiguration
from error_handlers import DefaultStyleErrorHandler
diff --git a/Tools/Scripts/webkitpy/style/filereader_unittest.py b/Tools/Scripts/webkitpy/style/filereader_unittest.py
index d728c463a..2c506ec20 100644
--- a/Tools/Scripts/webkitpy/style/filereader_unittest.py
+++ b/Tools/Scripts/webkitpy/style/filereader_unittest.py
@@ -20,7 +20,7 @@
# 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 unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem import FileSystem
from webkitpy.common.system.logtesting import LoggingTestCase
diff --git a/Tools/Scripts/webkitpy/style/filter_unittest.py b/Tools/Scripts/webkitpy/style/filter_unittest.py
index c20d9981a..b4dd7bc7c 100644
--- a/Tools/Scripts/webkitpy/style/filter_unittest.py
+++ b/Tools/Scripts/webkitpy/style/filter_unittest.py
@@ -22,7 +22,7 @@
"""Unit tests for filter.py."""
-import unittest
+import unittest2 as unittest
from filter import _CategoryFilter as CategoryFilter
from filter import validate_filter_rules
diff --git a/Tools/Scripts/webkitpy/style/main_unittest.py b/Tools/Scripts/webkitpy/style/main_unittest.py
index e0191687a..dbfc7c83a 100644
--- a/Tools/Scripts/webkitpy/style/main_unittest.py
+++ b/Tools/Scripts/webkitpy/style/main_unittest.py
@@ -20,7 +20,7 @@
# 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 unittest
+import unittest2 as unittest
from main import change_directory
from webkitpy.common.system.filesystem_mock import MockFileSystem
diff --git a/Tools/Scripts/webkitpy/style/optparser_unittest.py b/Tools/Scripts/webkitpy/style/optparser_unittest.py
index 979b31d1a..0c9002adf 100644
--- a/Tools/Scripts/webkitpy/style/optparser_unittest.py
+++ b/Tools/Scripts/webkitpy/style/optparser_unittest.py
@@ -22,7 +22,7 @@
"""Unit tests for parser.py."""
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.logtesting import LoggingTestCase
from webkitpy.style.optparser import ArgumentParser
@@ -145,9 +145,9 @@ class ArgumentParserTest(LoggingTestCase):
self.assertEqual(files, [])
self.assertEqual(options.filter_rules, [])
- self.assertEqual(options.git_commit, None)
- self.assertEqual(options.diff_files, False)
- self.assertEqual(options.is_verbose, False)
+ self.assertIsNone(options.git_commit)
+ self.assertFalse(options.diff_files)
+ self.assertFalse(options.is_verbose)
self.assertEqual(options.min_confidence, 3)
self.assertEqual(options.output_format, 'vs7')
@@ -166,9 +166,9 @@ class ArgumentParserTest(LoggingTestCase):
(files, options) = parse(['--git-diff=commit'])
self.assertEqual(options.git_commit, 'commit')
(files, options) = parse(['--verbose'])
- self.assertEqual(options.is_verbose, True)
+ self.assertTrue(options.is_verbose)
(files, options) = parse(['--diff-files', 'file.txt'])
- self.assertEqual(options.diff_files, True)
+ self.assertTrue(options.diff_files)
# Pass user_rules.
(files, options) = parse(['--filter=+build,-whitespace'])
@@ -200,8 +200,8 @@ class CommandOptionValuesTest(unittest.TestCase):
# Check default parameters.
options = ProcessorOptions()
self.assertEqual(options.filter_rules, [])
- self.assertEqual(options.git_commit, None)
- self.assertEqual(options.is_verbose, False)
+ self.assertIsNone(options.git_commit)
+ self.assertFalse(options.is_verbose)
self.assertEqual(options.min_confidence, 1)
self.assertEqual(options.output_format, "emacs")
@@ -222,7 +222,7 @@ class CommandOptionValuesTest(unittest.TestCase):
output_format="vs7")
self.assertEqual(options.filter_rules, ["+"])
self.assertEqual(options.git_commit, "commit")
- self.assertEqual(options.is_verbose, True)
+ self.assertTrue(options.is_verbose)
self.assertEqual(options.min_confidence, 3)
self.assertEqual(options.output_format, "vs7")
diff --git a/Tools/Scripts/webkitpy/style/patchreader_unittest.py b/Tools/Scripts/webkitpy/style/patchreader_unittest.py
index 983b609e4..f7368ec2b 100644
--- a/Tools/Scripts/webkitpy/style/patchreader_unittest.py
+++ b/Tools/Scripts/webkitpy/style/patchreader_unittest.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-#
# Copyright (C) 2010 Google Inc. All rights reserved.
# Copyright (C) 2009 Torch Mobile Inc.
# Copyright (C) 2009 Apple Inc. All rights reserved.
@@ -31,7 +29,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.style.patchreader import PatchReader
diff --git a/Tools/Scripts/webkitpy/test/finder_unittest.py b/Tools/Scripts/webkitpy/test/finder_unittest.py
index 694b3884a..f1259ef49 100644
--- a/Tools/Scripts/webkitpy/test/finder_unittest.py
+++ b/Tools/Scripts/webkitpy/test/finder_unittest.py
@@ -21,7 +21,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
@@ -112,7 +112,7 @@ class FinderTest(unittest.TestCase):
self.check_names(['/tmp/another_unittest.py'], [])
finally:
_, _, logs = oc.restore_output()
- self.assertTrue('another_unittest.py' in logs)
+ self.assertIn('another_unittest.py', logs)
# Paths that don't exist are errors.
oc.capture_output()
@@ -120,10 +120,7 @@ class FinderTest(unittest.TestCase):
self.check_names(['/foo/bar/notexist_unittest.py'], [])
finally:
_, _, logs = oc.restore_output()
- self.assertTrue('notexist_unittest.py' in logs)
+ self.assertIn('notexist_unittest.py', logs)
# Names that don't exist are caught later, at load time.
self.check_names(['bar.notexist_unittest'], ['bar.notexist_unittest'])
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/test/main.py b/Tools/Scripts/webkitpy/test/main.py
index 5f16beca6..4270ace5d 100644
--- a/Tools/Scripts/webkitpy/test/main.py
+++ b/Tools/Scripts/webkitpy/test/main.py
@@ -139,7 +139,7 @@ class Tester(object):
self._options.child_processes = 1
import webkitpy.thirdparty.autoinstalled.coverage as coverage
- cov = coverage.coverage(omit=["/usr/*", "*/webkitpy/thirdparty/autoinstalled/*"])
+ cov = coverage.coverage(omit=["/usr/*", "*/webkitpy/thirdparty/autoinstalled/*", "*/webkitpy/thirdparty/BeautifulSoup.py"])
cov.start()
self.printer.write_update("Checking imports ...")
diff --git a/Tools/Scripts/webkitpy/test/main_unittest.py b/Tools/Scripts/webkitpy/test/main_unittest.py
index 031abd65b..8a1b56d29 100644
--- a/Tools/Scripts/webkitpy/test/main_unittest.py
+++ b/Tools/Scripts/webkitpy/test/main_unittest.py
@@ -22,7 +22,7 @@
import logging
import sys
-import unittest
+import unittest2 as unittest
import StringIO
from webkitpy.common.system.filesystem import FileSystem
@@ -70,8 +70,8 @@ class TesterTest(unittest.TestCase):
_, _, logs = oc.restore_output()
root_logger.handlers = root_handlers
- self.assertTrue('No tests to run' in errors.getvalue())
- self.assertTrue('No tests to run' in logs)
+ self.assertIn('No tests to run', errors.getvalue())
+ self.assertIn('No tests to run', logs)
def _find_test_names(self, args):
tester = Tester()
@@ -114,4 +114,4 @@ class TesterTest(unittest.TestCase):
out, _ = proc.communicate()
retcode = proc.returncode
self.assertEqual(retcode, 0)
- self.assertTrue('Cover' in out)
+ self.assertIn('Cover', out)
diff --git a/Tools/Scripts/webkitpy/test/printer.py b/Tools/Scripts/webkitpy/test/printer.py
index 0ec3035b3..b5bea3f9f 100644
--- a/Tools/Scripts/webkitpy/test/printer.py
+++ b/Tools/Scripts/webkitpy/test/printer.py
@@ -24,7 +24,7 @@
import logging
import StringIO
-from webkitpy.common.system import outputcapture
+from webkitpy.common.system.systemhost import SystemHost
from webkitpy.layout_tests.views.metered_stream import MeteredStream
_log = logging.getLogger(__name__)
@@ -36,7 +36,7 @@ class Printer(object):
self.meter = None
self.options = options
self.num_tests = 0
- self.num_completed = 0
+ self.num_started = 0
self.num_errors = 0
self.num_failures = 0
self.running_tests = []
@@ -57,7 +57,8 @@ class Printer(object):
elif options.verbose == 2:
log_level = logging.DEBUG
- self.meter = MeteredStream(self.stream, (options.verbose == 2))
+ self.meter = MeteredStream(self.stream, (options.verbose == 2),
+ number_of_columns=SystemHost().platform.terminal_width())
handler = logging.StreamHandler(self.stream)
# We constrain the level on the handler rather than on the root
@@ -102,6 +103,8 @@ class Printer(object):
handler.addFilter(testing_filter)
if self.options.pass_through:
+ # FIXME: Can't import at top of file, as outputcapture needs unittest2
+ from webkitpy.common.system import outputcapture
outputcapture.OutputCapture.stream_wrapper = _CaptureAndPassThroughStream
def write_update(self, msg):
@@ -141,7 +144,7 @@ class Printer(object):
if self.options.timing:
suffix += ' %.4fs' % test_time
- self.num_completed += 1
+ self.num_started += 1
if test_name == self.running_tests[0]:
self.completed_tests.insert(0, [test_name, suffix, lines])
@@ -159,11 +162,23 @@ class Printer(object):
self.completed_tests = []
def _test_line(self, test_name, suffix):
- return '[%d/%d] %s%s' % (self.num_completed, self.num_tests, test_name, suffix)
+ format_string = '[%d/%d] %s%s'
+ status_line = format_string % (self.num_started, self.num_tests, test_name, suffix)
+ if len(status_line) > self.meter.number_of_columns():
+ overflow_columns = len(status_line) - self.meter.number_of_columns()
+ ellipsis = '...'
+ if len(test_name) < overflow_columns + len(ellipsis) + 3:
+ # We don't have enough space even if we elide, just show the test method name.
+ test_name = test_name.split('.')[-1]
+ else:
+ new_length = len(test_name) - overflow_columns - len(ellipsis)
+ prefix = int(new_length / 2)
+ test_name = test_name[:prefix] + ellipsis + test_name[-(new_length - prefix):]
+ return format_string % (self.num_started, self.num_tests, test_name, suffix)
def print_result(self, run_time):
write = self.meter.writeln
- write('Ran %d test%s in %.3fs' % (self.num_completed, self.num_completed != 1 and "s" or "", run_time))
+ write('Ran %d test%s in %.3fs' % (self.num_started, self.num_started != 1 and "s" or "", run_time))
if self.num_failures or self.num_errors:
write('FAILED (failures=%d, errors=%d)\n' % (self.num_failures, self.num_errors))
else:
diff --git a/Tools/Scripts/webkitpy/test/runner_unittest.py b/Tools/Scripts/webkitpy/test/runner_unittest.py
index e5be1921c..46a9507fd 100644
--- a/Tools/Scripts/webkitpy/test/runner_unittest.py
+++ b/Tools/Scripts/webkitpy/test/runner_unittest.py
@@ -23,7 +23,7 @@
import logging
import re
import StringIO
-import unittest
+import unittest2 as unittest
from webkitpy.tool.mocktool import MockOptions
from webkitpy.test.printer import Printer
@@ -95,7 +95,3 @@ class RunnerTest(unittest.TestCase):
self.assertEqual(runner.tests_run, 3)
self.assertEqual(len(runner.failures), 1)
self.assertEqual(len(runner.errors), 1)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/test/skip_unittest.py b/Tools/Scripts/webkitpy/test/skip_unittest.py
index f61a1bb47..bfcb6a67c 100644
--- a/Tools/Scripts/webkitpy/test/skip_unittest.py
+++ b/Tools/Scripts/webkitpy/test/skip_unittest.py
@@ -22,7 +22,7 @@
import StringIO
import logging
-import unittest
+import unittest2 as unittest
from webkitpy.test.skip import skip_if
@@ -72,6 +72,3 @@ class SkipTest(unittest.TestCase):
klass(self.foo_callback).test_foo()
self.assertEqual(self.log_stream.getvalue(), 'Skipping webkitpy.test.skip_unittest.TestSkipFixture: Should see this message.\n')
self.assertFalse(self.foo_was_called)
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/thirdparty/__init__.py b/Tools/Scripts/webkitpy/thirdparty/__init__.py
index ee5891122..601e2fbb3 100644
--- a/Tools/Scripts/webkitpy/thirdparty/__init__.py
+++ b/Tools/Scripts/webkitpy/thirdparty/__init__.py
@@ -109,7 +109,10 @@ class AutoinstallImportHook(object):
not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "logilab/astng")) or
not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "logilab/common"))):
installer = AutoInstaller(target_dir=_AUTOINSTALLED_DIR)
- did_install_something = installer.install("http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common")
+ files_to_remove = []
+ if sys.platform == 'win32':
+ files_to_remove = ['test/data/write_protected_file.txt']
+ did_install_something = installer.install("http://pypi.python.org/packages/source/l/logilab-common/logilab-common-0.58.1.tar.gz#md5=77298ab2d8bb8b4af9219791e7cee8ce", url_subpath="logilab-common-0.58.1", target_name="logilab/common", files_to_remove=files_to_remove)
did_install_something |= installer.install("http://pypi.python.org/packages/source/l/logilab-astng/logilab-astng-0.24.1.tar.gz#md5=ddaf66e4d85714d9c47a46d4bed406de", url_subpath="logilab-astng-0.24.1", target_name="logilab/astng")
did_install_something |= installer.install('http://pypi.python.org/packages/source/p/pylint/pylint-0.25.1.tar.gz#md5=728bbc2b339bc3749af013709a7f87a5', url_subpath="pylint-0.25.1", target_name="pylint")
return did_install_something
@@ -154,6 +157,10 @@ class AutoinstallImportHook(object):
url_subpath="ircbot.py")
return did_install_something
+ def _install_unittest2(self):
+ self._ensure_autoinstalled_dir_is_in_sys_path()
+ return self._install(url="http://pypi.python.org/packages/source/u/unittest2/unittest2-0.5.1.tar.gz#md5=a0af5cac92bbbfa0c3b0e99571390e0f", url_subpath="unittest2-0.5.1/unittest2")
+
def _install_webpagereplay(self):
did_install_something = False
if not self._fs.exists(self._fs.join(_AUTOINSTALLED_DIR, "webpagereplay")):
diff --git a/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py b/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py
index b3eb75f98..f687ae009 100644
--- a/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py
+++ b/Tools/Scripts/webkitpy/thirdparty/__init___unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.thirdparty import AutoinstallImportHook
@@ -68,7 +67,3 @@ class ThirdpartyTest(unittest.TestCase):
import webkitpy.thirdparty.autoinstalled.pylint
import webkitpy.thirdparty.autoinstalled.webpagereplay
import webkitpy.thirdparty.autoinstalled.pep8
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py
index 60fb33d2c..8235666bb 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_base.py
@@ -39,6 +39,8 @@
# writing/reading.
+import socket
+
from mod_pywebsocket import util
@@ -109,20 +111,34 @@ class StreamBase(object):
ConnectionTerminatedException: when read returns empty string.
"""
- bytes = self._request.connection.read(length)
- if not bytes:
+ try:
+ read_bytes = self._request.connection.read(length)
+ if not read_bytes:
+ raise ConnectionTerminatedException(
+ 'Receiving %d byte failed. Peer (%r) closed connection' %
+ (length, (self._request.connection.remote_addr,)))
+ return read_bytes
+ except socket.error, e:
+ # Catch a socket.error. Because it's not a child class of the
+ # IOError prior to Python 2.6, we cannot omit this except clause.
+ # Use %s rather than %r for the exception to use human friendly
+ # format.
+ raise ConnectionTerminatedException(
+ 'Receiving %d byte failed. socket.error (%s) occurred' %
+ (length, e))
+ except IOError, e:
+ # Also catch an IOError because mod_python throws it.
raise ConnectionTerminatedException(
- 'Receiving %d byte failed. Peer (%r) closed connection' %
- (length, (self._request.connection.remote_addr,)))
- return bytes
+ 'Receiving %d byte failed. IOError (%s) occurred' %
+ (length, e))
- def _write(self, bytes):
+ def _write(self, bytes_to_write):
"""Writes given bytes to connection. In case we catch any exception,
prepends remote address to the exception message and raise again.
"""
try:
- self._request.connection.write(bytes)
+ self._request.connection.write(bytes_to_write)
except Exception, e:
util.prepend_message_to_exception(
'Failed to send message to %r: ' %
@@ -138,12 +154,12 @@ class StreamBase(object):
ConnectionTerminatedException: when read returns empty string.
"""
- bytes = []
+ read_bytes = []
while length > 0:
- new_bytes = self._read(length)
- bytes.append(new_bytes)
- length -= len(new_bytes)
- return ''.join(bytes)
+ new_read_bytes = self._read(length)
+ read_bytes.append(new_read_bytes)
+ length -= len(new_read_bytes)
+ return ''.join(read_bytes)
def _read_until(self, delim_char):
"""Reads bytes until we encounter delim_char. The result will not
@@ -153,13 +169,13 @@ class StreamBase(object):
ConnectionTerminatedException: when read returns empty string.
"""
- bytes = []
+ read_bytes = []
while True:
ch = self._read(1)
if ch == delim_char:
break
- bytes.append(ch)
- return ''.join(bytes)
+ read_bytes.append(ch)
+ return ''.join(read_bytes)
# vi:sts=4 sw=4 et
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py
index bd158fa6b..a8a49e3c3 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/_stream_hybi.py
@@ -280,7 +280,7 @@ def parse_frame(receive_bytes, logger=None,
if logger.isEnabledFor(common.LOGLEVEL_FINE):
unmask_start = time.time()
- bytes = masker.mask(raw_payload_bytes)
+ unmasked_bytes = masker.mask(raw_payload_bytes)
if logger.isEnabledFor(common.LOGLEVEL_FINE):
logger.log(
@@ -288,7 +288,7 @@ def parse_frame(receive_bytes, logger=None,
'Done unmasking payload data at %s MB/s',
payload_length / (time.time() - unmask_start) / 1000 / 1000)
- return opcode, bytes, fin, rsv1, rsv2, rsv3
+ return opcode, unmasked_bytes, fin, rsv1, rsv2, rsv3
class FragmentedFrameBuilder(object):
@@ -389,9 +389,6 @@ class StreamOptions(object):
def __init__(self):
"""Constructs StreamOptions."""
- # Enables deflate-stream extension.
- self.deflate_stream = False
-
# Filters applied to frames.
self.outgoing_frame_filters = []
self.incoming_frame_filters = []
@@ -403,9 +400,6 @@ class StreamOptions(object):
self.encode_text_message_to_utf8 = True
self.mask_send = False
self.unmask_receive = True
- # RFC6455 disallows fragmented control frames, but mux extension
- # relaxes the restriction.
- self.allow_fragmented_control_frame = False
class Stream(StreamBase):
@@ -426,10 +420,6 @@ class Stream(StreamBase):
self._options = options
- if self._options.deflate_stream:
- self._logger.debug('Setup filter for deflate-stream')
- self._request = util.DeflateRequest(self._request)
-
self._request.client_terminated = False
self._request.server_terminated = False
@@ -463,10 +453,10 @@ class Stream(StreamBase):
unmask_receive=self._options.unmask_receive)
def _receive_frame_as_frame_object(self):
- opcode, bytes, fin, rsv1, rsv2, rsv3 = self._receive_frame()
+ opcode, unmasked_bytes, fin, rsv1, rsv2, rsv3 = self._receive_frame()
return Frame(fin=fin, rsv1=rsv1, rsv2=rsv2, rsv3=rsv3,
- opcode=opcode, payload=bytes)
+ opcode=opcode, payload=unmasked_bytes)
def receive_filtered_frame(self):
"""Receives a frame and applies frame filters and message filters.
@@ -602,8 +592,7 @@ class Stream(StreamBase):
else:
# Start of fragmentation frame
- if (not self._options.allow_fragmented_control_frame and
- common.is_control_opcode(frame.opcode)):
+ if common.is_control_opcode(frame.opcode):
raise InvalidFrameException(
'Control frames must not be fragmented')
@@ -647,8 +636,9 @@ class Stream(StreamBase):
self._request.ws_close_code,
self._request.ws_close_reason)
- # Drain junk data after the close frame if necessary.
- self._drain_received_data()
+ # As we've received a close frame, no more data is coming over the
+ # socket. We can now safely close the socket without worrying about
+ # RST sending.
if self._request.server_terminated:
self._logger.debug(
@@ -672,7 +662,7 @@ class Stream(StreamBase):
reason = ''
self._send_closing_handshake(code, reason)
self._logger.debug(
- 'Sent ack for client-initiated closing handshake '
+ 'Acknowledged closing handshake initiated by the peer '
'(code=%r, reason=%r)', code, reason)
def _process_ping_message(self, message):
@@ -815,13 +805,15 @@ class Stream(StreamBase):
self._write(frame)
- def close_connection(self, code=common.STATUS_NORMAL_CLOSURE, reason=''):
+ def close_connection(self, code=common.STATUS_NORMAL_CLOSURE, reason='',
+ wait_response=True):
"""Closes a WebSocket connection.
Args:
code: Status code for close frame. If code is None, a close
frame with empty body will be sent.
reason: string representing close reason.
+ wait_response: True when caller want to wait the response.
Raises:
BadOperationException: when reason is specified with code None
or reason is not an instance of both str and unicode.
@@ -844,11 +836,11 @@ class Stream(StreamBase):
self._send_closing_handshake(code, reason)
self._logger.debug(
- 'Sent server-initiated closing handshake (code=%r, reason=%r)',
+ 'Initiated closing handshake (code=%r, reason=%r)',
code, reason)
if (code == common.STATUS_GOING_AWAY or
- code == common.STATUS_PROTOCOL_ERROR):
+ code == common.STATUS_PROTOCOL_ERROR) or not wait_response:
# It doesn't make sense to wait for a close frame if the reason is
# protocol error or that the server is going away. For some of
# other reasons, it might not make sense to wait for a close frame,
@@ -891,25 +883,5 @@ class Stream(StreamBase):
return self._original_opcode
- def _drain_received_data(self):
- """Drains unread data in the receive buffer to avoid sending out TCP
- RST packet. This is because when deflate-stream is enabled, some
- DEFLATE block for flushing data may follow a close frame. If any data
- remains in the receive buffer of a socket when the socket is closed,
- it sends out TCP RST packet to the other peer.
-
- Since mod_python's mp_conn object doesn't support non-blocking read,
- we perform this only when pywebsocket is running in standalone mode.
- """
-
- # If self._options.deflate_stream is true, self._request is
- # DeflateRequest, so we can get wrapped request object by
- # self._request._request.
- #
- # Only _StandaloneRequest has _drain_received_data method.
- if (self._options.deflate_stream and
- ('_drain_received_data' in dir(self._request._request))):
- self._request._request._drain_received_data()
-
# vi:sts=4 sw=4 et
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py
index 2388379c0..afa123368 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/common.py
@@ -101,10 +101,10 @@ SEC_WEBSOCKET_KEY2_HEADER = 'Sec-WebSocket-Key2'
SEC_WEBSOCKET_LOCATION_HEADER = 'Sec-WebSocket-Location'
# Extensions
-DEFLATE_STREAM_EXTENSION = 'deflate-stream'
DEFLATE_FRAME_EXTENSION = 'deflate-frame'
PERFRAME_COMPRESSION_EXTENSION = 'perframe-compress'
PERMESSAGE_COMPRESSION_EXTENSION = 'permessage-compress'
+PERMESSAGE_DEFLATE_EXTENSION = 'permessage-deflate'
X_WEBKIT_DEFLATE_FRAME_EXTENSION = 'x-webkit-deflate-frame'
X_WEBKIT_PERMESSAGE_COMPRESSION_EXTENSION = 'x-webkit-permessage-compress'
MUX_EXTENSION = 'mux_DO_NOT_USE'
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py
index 25905f180..96c91e0c9 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/dispatch.py
@@ -255,6 +255,9 @@ class Dispatcher(object):
try:
do_extra_handshake_(request)
except handshake.AbortedByUserException, e:
+ # Re-raise to tell the caller of this function to finish this
+ # connection without sending any error.
+ self._logger.debug('%s', util.get_stack_trace())
raise
except Exception, e:
util.prepend_message_to_exception(
@@ -294,11 +297,12 @@ class Dispatcher(object):
request.ws_stream.close_connection()
# Catch non-critical exceptions the handler didn't handle.
except handshake.AbortedByUserException, e:
- self._logger.debug('%s', e)
+ self._logger.debug('%s', util.get_stack_trace())
raise
except msgutil.BadOperationException, e:
self._logger.debug('%s', e)
- request.ws_stream.close_connection(common.STATUS_ABNORMAL_CLOSURE)
+ request.ws_stream.close_connection(
+ common.STATUS_INTERNAL_ENDPOINT_ERROR)
except msgutil.InvalidFrameException, e:
# InvalidFrameException must be caught before
# ConnectionTerminatedException that catches InvalidFrameException.
@@ -314,6 +318,8 @@ class Dispatcher(object):
except msgutil.ConnectionTerminatedException, e:
self._logger.debug('%s', e)
except Exception, e:
+ # Any other exceptions are forwarded to the caller of this
+ # function.
util.prepend_message_to_exception(
'%s raised exception for %s: ' % (
_TRANSFER_DATA_HANDLER_NAME, request.ws_resource),
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py
index 03dbf9ee1..552d2c072 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/extensions.py
@@ -34,83 +34,114 @@ from mod_pywebsocket.http_header_util import quote_if_necessary
_available_processors = {}
+_compression_extension_names = []
class ExtensionProcessorInterface(object):
- def name(self):
- return None
+ def __init__(self, request):
+ self._request = request
+ self._active = True
- def get_extension_response(self):
+ def request(self):
+ return self._request
+
+ def name(self):
return None
- def setup_stream_options(self, stream_options):
+ def check_consistency_with_other_processors(self, processors):
pass
+ def set_active(self, active):
+ self._active = active
-class DeflateStreamExtensionProcessor(ExtensionProcessorInterface):
- """WebSocket DEFLATE stream extension processor.
-
- Specification:
- Section 9.2.1 in
- http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10
- """
-
- def __init__(self, request):
- self._logger = util.get_class_logger(self)
-
- self._request = request
+ def is_active(self):
+ return self._active
- def name(self):
- return common.DEFLATE_STREAM_EXTENSION
+ def _get_extension_response_internal(self):
+ return None
def get_extension_response(self):
- if len(self._request.get_parameter_names()) != 0:
- return None
-
- self._logger.debug(
- 'Enable %s extension', common.DEFLATE_STREAM_EXTENSION)
+ if self._active:
+ response = self._get_extension_response_internal()
+ if response is None:
+ self._active = False
+ return response
+ return None
- return common.ExtensionParameter(common.DEFLATE_STREAM_EXTENSION)
+ def _setup_stream_options_internal(self, stream_options):
+ pass
def setup_stream_options(self, stream_options):
- stream_options.deflate_stream = True
+ if self._active:
+ self._setup_stream_options_internal(stream_options)
-_available_processors[common.DEFLATE_STREAM_EXTENSION] = (
- DeflateStreamExtensionProcessor)
-
-
-def _log_compression_ratio(logger, original_bytes, total_original_bytes,
- filtered_bytes, total_filtered_bytes):
+def _log_outgoing_compression_ratio(
+ logger, original_bytes, filtered_bytes, average_ratio):
# Print inf when ratio is not available.
ratio = float('inf')
- average_ratio = float('inf')
if original_bytes != 0:
ratio = float(filtered_bytes) / original_bytes
- if total_original_bytes != 0:
- average_ratio = (
- float(total_filtered_bytes) / total_original_bytes)
- logger.debug('Outgoing compress ratio: %f (average: %f)' %
- (ratio, average_ratio))
+ logger.debug('Outgoing compression ratio: %f (average: %f)' %
+ (ratio, average_ratio))
-def _log_decompression_ratio(logger, received_bytes, total_received_bytes,
- filtered_bytes, total_filtered_bytes):
+
+def _log_incoming_compression_ratio(
+ logger, received_bytes, filtered_bytes, average_ratio):
# Print inf when ratio is not available.
ratio = float('inf')
- average_ratio = float('inf')
- if received_bytes != 0:
+ if filtered_bytes != 0:
ratio = float(received_bytes) / filtered_bytes
- if total_filtered_bytes != 0:
- average_ratio = (
- float(total_received_bytes) / total_filtered_bytes)
- logger.debug('Incoming compress ratio: %f (average: %f)' %
- (ratio, average_ratio))
+
+ logger.debug('Incoming compression ratio: %f (average: %f)' %
+ (ratio, average_ratio))
+
+
+def _parse_window_bits(bits):
+ """Return parsed integer value iff the given string conforms to the
+ grammar of the window bits extension parameters.
+ """
+
+ if bits is None:
+ raise ValueError('Value is required')
+
+ # For non integer values such as "10.0", ValueError will be raised.
+ int_bits = int(bits)
+
+ # First condition is to drop leading zero case e.g. "08".
+ if bits != str(int_bits) or int_bits < 8 or int_bits > 15:
+ raise ValueError('Invalid value: %r' % bits)
+
+ return int_bits
+
+
+class _AverageRatioCalculator(object):
+ """Stores total bytes of original and result data, and calculates average
+ result / original ratio.
+ """
+
+ def __init__(self):
+ self._total_original_bytes = 0
+ self._total_result_bytes = 0
+
+ def add_original_bytes(self, value):
+ self._total_original_bytes += value
+
+ def add_result_bytes(self, value):
+ self._total_result_bytes += value
+
+ def get_average_ratio(self):
+ if self._total_original_bytes != 0:
+ return (float(self._total_result_bytes) /
+ self._total_original_bytes)
+ else:
+ return float('inf')
class DeflateFrameExtensionProcessor(ExtensionProcessorInterface):
- """WebSocket Per-frame DEFLATE extension processor.
+ """deflate-frame extension processor.
Specification:
http://tools.ietf.org/html/draft-tyoshino-hybi-websocket-perframe-deflate
@@ -120,34 +151,38 @@ class DeflateFrameExtensionProcessor(ExtensionProcessorInterface):
_NO_CONTEXT_TAKEOVER_PARAM = 'no_context_takeover'
def __init__(self, request):
+ ExtensionProcessorInterface.__init__(self, request)
self._logger = util.get_class_logger(self)
- self._request = request
-
self._response_window_bits = None
self._response_no_context_takeover = False
self._bfinal = False
- # Counters for statistics.
-
- # Total number of outgoing bytes supplied to this filter.
- self._total_outgoing_payload_bytes = 0
- # Total number of bytes sent to the network after applying this filter.
- self._total_filtered_outgoing_payload_bytes = 0
+ # Calculates
+ # (Total outgoing bytes supplied to this filter) /
+ # (Total bytes sent to the network after applying this filter)
+ self._outgoing_average_ratio_calculator = _AverageRatioCalculator()
- # Total number of bytes received from the network.
- self._total_incoming_payload_bytes = 0
- # Total number of incoming bytes obtained after applying this filter.
- self._total_filtered_incoming_payload_bytes = 0
+ # Calculates
+ # (Total bytes received from the network) /
+ # (Total incoming bytes obtained after applying this filter)
+ self._incoming_average_ratio_calculator = _AverageRatioCalculator()
def name(self):
return common.DEFLATE_FRAME_EXTENSION
- def get_extension_response(self):
+ def _get_extension_response_internal(self):
# Any unknown parameter will be just ignored.
- window_bits = self._request.get_parameter_value(
- self._WINDOW_BITS_PARAM)
+ window_bits = None
+ if self._request.has_parameter(self._WINDOW_BITS_PARAM):
+ window_bits = self._request.get_parameter_value(
+ self._WINDOW_BITS_PARAM)
+ try:
+ window_bits = _parse_window_bits(window_bits)
+ except ValueError, e:
+ return None
+
no_context_takeover = self._request.has_parameter(
self._NO_CONTEXT_TAKEOVER_PARAM)
if (no_context_takeover and
@@ -155,18 +190,10 @@ class DeflateFrameExtensionProcessor(ExtensionProcessorInterface):
self._NO_CONTEXT_TAKEOVER_PARAM) is not None):
return None
- if window_bits is not None:
- try:
- window_bits = int(window_bits)
- except ValueError, e:
- return None
- if window_bits < 8 or window_bits > 15:
- return None
-
- self._deflater = util._RFC1979Deflater(
+ self._rfc1979_deflater = util._RFC1979Deflater(
window_bits, no_context_takeover)
- self._inflater = util._RFC1979Inflater()
+ self._rfc1979_inflater = util._RFC1979Inflater()
self._compress_outgoing = True
@@ -191,7 +218,7 @@ class DeflateFrameExtensionProcessor(ExtensionProcessorInterface):
return response
- def setup_stream_options(self, stream_options):
+ def _setup_stream_options_internal(self, stream_options):
class _OutgoingFilter(object):
@@ -235,25 +262,28 @@ class DeflateFrameExtensionProcessor(ExtensionProcessorInterface):
"""
original_payload_size = len(frame.payload)
- self._total_outgoing_payload_bytes += original_payload_size
+ self._outgoing_average_ratio_calculator.add_original_bytes(
+ original_payload_size)
if (not self._compress_outgoing or
common.is_control_opcode(frame.opcode)):
- self._total_filtered_outgoing_payload_bytes += (
- original_payload_size)
+ self._outgoing_average_ratio_calculator.add_result_bytes(
+ original_payload_size)
return
- frame.payload = self._deflater.filter(
+ frame.payload = self._rfc1979_deflater.filter(
frame.payload, bfinal=self._bfinal)
frame.rsv1 = 1
filtered_payload_size = len(frame.payload)
- self._total_filtered_outgoing_payload_bytes += filtered_payload_size
+ self._outgoing_average_ratio_calculator.add_result_bytes(
+ filtered_payload_size)
- _log_compression_ratio(self._logger, original_payload_size,
- self._total_outgoing_payload_bytes,
- filtered_payload_size,
- self._total_filtered_outgoing_payload_bytes)
+ _log_outgoing_compression_ratio(
+ self._logger,
+ original_payload_size,
+ filtered_payload_size,
+ self._outgoing_average_ratio_calculator.get_average_ratio())
def _incoming_filter(self, frame):
"""Transform incoming frames. This method is called only by
@@ -261,33 +291,35 @@ class DeflateFrameExtensionProcessor(ExtensionProcessorInterface):
"""
received_payload_size = len(frame.payload)
- self._total_incoming_payload_bytes += received_payload_size
+ self._incoming_average_ratio_calculator.add_result_bytes(
+ received_payload_size)
if frame.rsv1 != 1 or common.is_control_opcode(frame.opcode):
- self._total_filtered_incoming_payload_bytes += (
- received_payload_size)
+ self._incoming_average_ratio_calculator.add_original_bytes(
+ received_payload_size)
return
- frame.payload = self._inflater.filter(frame.payload)
+ frame.payload = self._rfc1979_inflater.filter(frame.payload)
frame.rsv1 = 0
filtered_payload_size = len(frame.payload)
- self._total_filtered_incoming_payload_bytes += filtered_payload_size
+ self._incoming_average_ratio_calculator.add_original_bytes(
+ filtered_payload_size)
- _log_decompression_ratio(self._logger, received_payload_size,
- self._total_incoming_payload_bytes,
- filtered_payload_size,
- self._total_filtered_incoming_payload_bytes)
+ _log_incoming_compression_ratio(
+ self._logger,
+ received_payload_size,
+ filtered_payload_size,
+ self._incoming_average_ratio_calculator.get_average_ratio())
_available_processors[common.DEFLATE_FRAME_EXTENSION] = (
DeflateFrameExtensionProcessor)
+_compression_extension_names.append(common.DEFLATE_FRAME_EXTENSION)
-
-# Adding vendor-prefixed deflate-frame extension.
-# TODO(bashi): Remove this after WebKit stops using vendor prefix.
_available_processors[common.X_WEBKIT_DEFLATE_FRAME_EXTENSION] = (
DeflateFrameExtensionProcessor)
+_compression_extension_names.append(common.X_WEBKIT_DEFLATE_FRAME_EXTENSION)
def _parse_compression_method(data):
@@ -306,13 +338,13 @@ def _create_accepted_method_desc(method_name, method_params):
class CompressionExtensionProcessorBase(ExtensionProcessorInterface):
- """Base class for Per-frame and Per-message compression extension."""
+ """Base class for perframe-compress and permessage-compress extension."""
_METHOD_PARAM = 'method'
def __init__(self, request):
+ ExtensionProcessorInterface.__init__(self, request)
self._logger = util.get_class_logger(self)
- self._request = request
self._compression_method_name = None
self._compression_processor = None
self._compression_processor_hook = None
@@ -357,7 +389,7 @@ class CompressionExtensionProcessorBase(ExtensionProcessorInterface):
self._compression_processor = compression_processor
return processor_response
- def get_extension_response(self):
+ def _get_extension_response_internal(self):
processor_response = self._get_compression_processor_response()
if processor_response is None:
return None
@@ -372,7 +404,7 @@ class CompressionExtensionProcessorBase(ExtensionProcessorInterface):
(self._request.name(), self._compression_method_name))
return response
- def setup_stream_options(self, stream_options):
+ def _setup_stream_options_internal(self, stream_options):
if self._compression_processor is None:
return
self._compression_processor.setup_stream_options(stream_options)
@@ -384,8 +416,8 @@ class CompressionExtensionProcessorBase(ExtensionProcessorInterface):
return self._compression_processor
-class PerFrameCompressionExtensionProcessor(CompressionExtensionProcessorBase):
- """WebSocket Per-frame compression extension processor.
+class PerFrameCompressExtensionProcessor(CompressionExtensionProcessorBase):
+ """perframe-compress processor.
Specification:
http://tools.ietf.org/html/draft-ietf-hybi-websocket-perframe-compression
@@ -406,56 +438,66 @@ class PerFrameCompressionExtensionProcessor(CompressionExtensionProcessorBase):
_available_processors[common.PERFRAME_COMPRESSION_EXTENSION] = (
- PerFrameCompressionExtensionProcessor)
+ PerFrameCompressExtensionProcessor)
+_compression_extension_names.append(common.PERFRAME_COMPRESSION_EXTENSION)
-class DeflateMessageProcessor(ExtensionProcessorInterface):
- """Per-message deflate processor."""
+class PerMessageDeflateExtensionProcessor(ExtensionProcessorInterface):
+ """permessage-deflate extension processor. It's also used for
+ permessage-compress extension when the deflate method is chosen.
+
+ Specification:
+ http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression-08
+ """
_S2C_MAX_WINDOW_BITS_PARAM = 's2c_max_window_bits'
_S2C_NO_CONTEXT_TAKEOVER_PARAM = 's2c_no_context_takeover'
_C2S_MAX_WINDOW_BITS_PARAM = 'c2s_max_window_bits'
_C2S_NO_CONTEXT_TAKEOVER_PARAM = 'c2s_no_context_takeover'
- def __init__(self, request):
- self._request = request
+ def __init__(self, request, draft08=True):
+ """Construct PerMessageDeflateExtensionProcessor
+
+ Args:
+ draft08: Follow the constraints on the parameters that were not
+ specified for permessage-compress but are specified for
+ permessage-deflate as on
+ draft-ietf-hybi-permessage-compression-08.
+ """
+
+ ExtensionProcessorInterface.__init__(self, request)
self._logger = util.get_class_logger(self)
self._c2s_max_window_bits = None
self._c2s_no_context_takeover = False
- self._bfinal = False
-
- self._compress_outgoing_enabled = False
- # True if a message is fragmented and compression is ongoing.
- self._compress_ongoing = False
-
- # Counters for statistics.
-
- # Total number of outgoing bytes supplied to this filter.
- self._total_outgoing_payload_bytes = 0
- # Total number of bytes sent to the network after applying this filter.
- self._total_filtered_outgoing_payload_bytes = 0
-
- # Total number of bytes received from the network.
- self._total_incoming_payload_bytes = 0
- # Total number of incoming bytes obtained after applying this filter.
- self._total_filtered_incoming_payload_bytes = 0
+ self._draft08 = draft08
def name(self):
return 'deflate'
- def get_extension_response(self):
- # Any unknown parameter will be just ignored.
+ def _get_extension_response_internal(self):
+ if self._draft08:
+ for name in self._request.get_parameter_names():
+ if name not in [self._S2C_MAX_WINDOW_BITS_PARAM,
+ self._S2C_NO_CONTEXT_TAKEOVER_PARAM,
+ self._C2S_MAX_WINDOW_BITS_PARAM]:
+ self._logger.debug('Unknown parameter: %r', name)
+ return None
+ else:
+ # Any unknown parameter will be just ignored.
+ pass
- s2c_max_window_bits = self._request.get_parameter_value(
- self._S2C_MAX_WINDOW_BITS_PARAM)
- if s2c_max_window_bits is not None:
+ s2c_max_window_bits = None
+ if self._request.has_parameter(self._S2C_MAX_WINDOW_BITS_PARAM):
+ s2c_max_window_bits = self._request.get_parameter_value(
+ self._S2C_MAX_WINDOW_BITS_PARAM)
try:
- s2c_max_window_bits = int(s2c_max_window_bits)
+ s2c_max_window_bits = _parse_window_bits(s2c_max_window_bits)
except ValueError, e:
- return None
- if s2c_max_window_bits < 8 or s2c_max_window_bits > 15:
+ self._logger.debug('Bad %s parameter: %r',
+ self._S2C_MAX_WINDOW_BITS_PARAM,
+ e)
return None
s2c_no_context_takeover = self._request.has_parameter(
@@ -463,14 +505,32 @@ class DeflateMessageProcessor(ExtensionProcessorInterface):
if (s2c_no_context_takeover and
self._request.get_parameter_value(
self._S2C_NO_CONTEXT_TAKEOVER_PARAM) is not None):
+ self._logger.debug('%s parameter must not have a value: %r',
+ self._S2C_NO_CONTEXT_TAKEOVER_PARAM,
+ s2c_no_context_takeover)
return None
- self._deflater = util._RFC1979Deflater(
+ c2s_max_window_bits = self._request.has_parameter(
+ self._C2S_MAX_WINDOW_BITS_PARAM)
+ if (self._draft08 and
+ c2s_max_window_bits and
+ self._request.get_parameter_value(
+ self._C2S_MAX_WINDOW_BITS_PARAM) is not None):
+ self._logger.debug('%s parameter must not have a value in a '
+ 'client\'s opening handshake: %r',
+ self._C2S_MAX_WINDOW_BITS_PARAM,
+ c2s_max_window_bits)
+ return None
+
+ self._rfc1979_deflater = util._RFC1979Deflater(
s2c_max_window_bits, s2c_no_context_takeover)
- self._inflater = util._RFC1979Inflater()
+ self._rfc1979_inflater = util._RFC1979Inflater()
- self._compress_outgoing_enabled = True
+ self._framer = _PerMessageDeflateFramer(
+ s2c_max_window_bits, s2c_no_context_takeover)
+ self._framer.set_bfinal(False)
+ self._framer.set_compress_outgoing_enabled(True)
response = common.ExtensionParameter(self._request.name())
@@ -483,9 +543,15 @@ class DeflateMessageProcessor(ExtensionProcessorInterface):
self._S2C_NO_CONTEXT_TAKEOVER_PARAM, None)
if self._c2s_max_window_bits is not None:
+ if self._draft08 and c2s_max_window_bits:
+ self._logger.debug('Processor is configured to use %s but '
+ 'the client cannot accept it',
+ self._C2S_MAX_WINDOW_BITS_PARAM)
+ return None
response.add_parameter(
self._C2S_MAX_WINDOW_BITS_PARAM,
str(self._c2s_max_window_bits))
+
if self._c2s_no_context_takeover:
response.add_parameter(
self._C2S_NO_CONTEXT_TAKEOVER_PARAM, None)
@@ -502,100 +568,99 @@ class DeflateMessageProcessor(ExtensionProcessorInterface):
return response
- def setup_stream_options(self, stream_options):
- class _OutgoingMessageFilter(object):
-
- def __init__(self, parent):
- self._parent = parent
+ def _setup_stream_options_internal(self, stream_options):
+ self._framer.setup_stream_options(stream_options)
- def filter(self, message, end=True, binary=False):
- return self._parent._process_outgoing_message(
- message, end, binary)
+ def set_c2s_max_window_bits(self, value):
+ """If this option is specified, this class adds the c2s_max_window_bits
+ extension parameter to the handshake response, but doesn't reduce the
+ LZ77 sliding window size of its inflater. I.e., you can use this for
+ testing client implementation but cannot reduce memory usage of this
+ class.
+
+ If this method has been called with True and an offer without the
+ c2s_max_window_bits extension parameter is received,
+ - (When processing the permessage-deflate extension) this processor
+ declines the request.
+ - (When processing the permessage-compress extension) this processor
+ accepts the request.
+ """
- class _IncomingMessageFilter(object):
+ self._c2s_max_window_bits = value
- def __init__(self, parent):
- self._parent = parent
- self._decompress_next_message = False
+ def set_c2s_no_context_takeover(self, value):
+ """If this option is specified, this class adds the
+ c2s_no_context_takeover extension parameter to the handshake response,
+ but doesn't reset inflater for each message. I.e., you can use this for
+ testing client implementation but cannot reduce memory usage of this
+ class.
+ """
- def decompress_next_message(self):
- self._decompress_next_message = True
+ self._c2s_no_context_takeover = value
- def filter(self, message):
- message = self._parent._process_incoming_message(
- message, self._decompress_next_message)
- self._decompress_next_message = False
- return message
+ def set_bfinal(self, value):
+ self._framer.set_bfinal(value)
- self._outgoing_message_filter = _OutgoingMessageFilter(self)
- self._incoming_message_filter = _IncomingMessageFilter(self)
- stream_options.outgoing_message_filters.append(
- self._outgoing_message_filter)
- stream_options.incoming_message_filters.append(
- self._incoming_message_filter)
+ def enable_outgoing_compression(self):
+ self._framer.set_compress_outgoing_enabled(True)
- class _OutgoingFrameFilter(object):
+ def disable_outgoing_compression(self):
+ self._framer.set_compress_outgoing_enabled(False)
- def __init__(self, parent):
- self._parent = parent
- self._set_compression_bit = False
- def set_compression_bit(self):
- self._set_compression_bit = True
+class _PerMessageDeflateFramer(object):
+ """A framer for extensions with per-message DEFLATE feature."""
- def filter(self, frame):
- self._parent._process_outgoing_frame(
- frame, self._set_compression_bit)
- self._set_compression_bit = False
+ def __init__(self, deflate_max_window_bits, deflate_no_context_takeover):
+ self._logger = util.get_class_logger(self)
- class _IncomingFrameFilter(object):
+ self._rfc1979_deflater = util._RFC1979Deflater(
+ deflate_max_window_bits, deflate_no_context_takeover)
- def __init__(self, parent):
- self._parent = parent
+ self._rfc1979_inflater = util._RFC1979Inflater()
- def filter(self, frame):
- self._parent._process_incoming_frame(frame)
+ self._bfinal = False
- self._outgoing_frame_filter = _OutgoingFrameFilter(self)
- self._incoming_frame_filter = _IncomingFrameFilter(self)
- stream_options.outgoing_frame_filters.append(
- self._outgoing_frame_filter)
- stream_options.incoming_frame_filters.append(
- self._incoming_frame_filter)
+ self._compress_outgoing_enabled = False
- stream_options.encode_text_message_to_utf8 = False
+ # True if a message is fragmented and compression is ongoing.
+ self._compress_ongoing = False
- def set_c2s_max_window_bits(self, value):
- self._c2s_max_window_bits = value
+ # Calculates
+ # (Total outgoing bytes supplied to this filter) /
+ # (Total bytes sent to the network after applying this filter)
+ self._outgoing_average_ratio_calculator = _AverageRatioCalculator()
- def set_c2s_no_context_takeover(self, value):
- self._c2s_no_context_takeover = value
+ # Calculates
+ # (Total bytes received from the network) /
+ # (Total incoming bytes obtained after applying this filter)
+ self._incoming_average_ratio_calculator = _AverageRatioCalculator()
def set_bfinal(self, value):
self._bfinal = value
- def enable_outgoing_compression(self):
- self._compress_outgoing_enabled = True
-
- def disable_outgoing_compression(self):
- self._compress_outgoing_enabled = False
+ def set_compress_outgoing_enabled(self, value):
+ self._compress_outgoing_enabled = value
def _process_incoming_message(self, message, decompress):
if not decompress:
return message
received_payload_size = len(message)
- self._total_incoming_payload_bytes += received_payload_size
+ self._incoming_average_ratio_calculator.add_result_bytes(
+ received_payload_size)
- message = self._inflater.filter(message)
+ message = self._rfc1979_inflater.filter(message)
filtered_payload_size = len(message)
- self._total_filtered_incoming_payload_bytes += filtered_payload_size
+ self._incoming_average_ratio_calculator.add_original_bytes(
+ filtered_payload_size)
- _log_decompression_ratio(self._logger, received_payload_size,
- self._total_incoming_payload_bytes,
- filtered_payload_size,
- self._total_filtered_incoming_payload_bytes)
+ _log_incoming_compression_ratio(
+ self._logger,
+ received_payload_size,
+ filtered_payload_size,
+ self._incoming_average_ratio_calculator.get_average_ratio())
return message
@@ -607,18 +672,21 @@ class DeflateMessageProcessor(ExtensionProcessorInterface):
return message
original_payload_size = len(message)
- self._total_outgoing_payload_bytes += original_payload_size
+ self._outgoing_average_ratio_calculator.add_original_bytes(
+ original_payload_size)
- message = self._deflater.filter(
+ message = self._rfc1979_deflater.filter(
message, flush=end, bfinal=self._bfinal)
filtered_payload_size = len(message)
- self._total_filtered_outgoing_payload_bytes += filtered_payload_size
+ self._outgoing_average_ratio_calculator.add_result_bytes(
+ filtered_payload_size)
- _log_compression_ratio(self._logger, original_payload_size,
- self._total_outgoing_payload_bytes,
- filtered_payload_size,
- self._total_filtered_outgoing_payload_bytes)
+ _log_outgoing_compression_ratio(
+ self._logger,
+ original_payload_size,
+ filtered_payload_size,
+ self._outgoing_average_ratio_calculator.get_average_ratio())
if not self._compress_ongoing:
self._outgoing_frame_filter.set_compression_bit()
@@ -637,10 +705,81 @@ class DeflateMessageProcessor(ExtensionProcessorInterface):
frame.rsv1 = 1
+ def setup_stream_options(self, stream_options):
+ """Creates filters and sets them to the StreamOptions."""
+
+ class _OutgoingMessageFilter(object):
+
+ def __init__(self, parent):
+ self._parent = parent
+
+ def filter(self, message, end=True, binary=False):
+ return self._parent._process_outgoing_message(
+ message, end, binary)
+
+ class _IncomingMessageFilter(object):
+
+ def __init__(self, parent):
+ self._parent = parent
+ self._decompress_next_message = False
+
+ def decompress_next_message(self):
+ self._decompress_next_message = True
+
+ def filter(self, message):
+ message = self._parent._process_incoming_message(
+ message, self._decompress_next_message)
+ self._decompress_next_message = False
+ return message
+
+ self._outgoing_message_filter = _OutgoingMessageFilter(self)
+ self._incoming_message_filter = _IncomingMessageFilter(self)
+ stream_options.outgoing_message_filters.append(
+ self._outgoing_message_filter)
+ stream_options.incoming_message_filters.append(
+ self._incoming_message_filter)
+
+ class _OutgoingFrameFilter(object):
+
+ def __init__(self, parent):
+ self._parent = parent
+ self._set_compression_bit = False
+
+ def set_compression_bit(self):
+ self._set_compression_bit = True
+
+ def filter(self, frame):
+ self._parent._process_outgoing_frame(
+ frame, self._set_compression_bit)
+ self._set_compression_bit = False
+
+ class _IncomingFrameFilter(object):
+
+ def __init__(self, parent):
+ self._parent = parent
+
+ def filter(self, frame):
+ self._parent._process_incoming_frame(frame)
+
+ self._outgoing_frame_filter = _OutgoingFrameFilter(self)
+ self._incoming_frame_filter = _IncomingFrameFilter(self)
+ stream_options.outgoing_frame_filters.append(
+ self._outgoing_frame_filter)
+ stream_options.incoming_frame_filters.append(
+ self._incoming_frame_filter)
+
+ stream_options.encode_text_message_to_utf8 = False
+
-class PerMessageCompressionExtensionProcessor(
+_available_processors[common.PERMESSAGE_DEFLATE_EXTENSION] = (
+ PerMessageDeflateExtensionProcessor)
+# TODO(tyoshino): Reorganize class names.
+_compression_extension_names.append('deflate')
+
+
+class PerMessageCompressExtensionProcessor(
CompressionExtensionProcessorBase):
- """WebSocket Per-message compression extension processor.
+ """permessage-compress extension processor.
Specification:
http://tools.ietf.org/html/draft-ietf-hybi-permessage-compression
@@ -656,18 +795,13 @@ class PerMessageCompressionExtensionProcessor(
def _lookup_compression_processor(self, method_desc):
if method_desc.name() == self._DEFLATE_METHOD:
- return DeflateMessageProcessor(method_desc)
+ return PerMessageDeflateExtensionProcessor(method_desc, False)
return None
_available_processors[common.PERMESSAGE_COMPRESSION_EXTENSION] = (
- PerMessageCompressionExtensionProcessor)
-
-
-# Adding vendor-prefixed permessage-compress extension.
-# TODO(bashi): Remove this after WebKit stops using vendor prefix.
-_available_processors[common.X_WEBKIT_PERMESSAGE_COMPRESSION_EXTENSION] = (
- PerMessageCompressionExtensionProcessor)
+ PerMessageCompressExtensionProcessor)
+_compression_extension_names.append(common.PERMESSAGE_COMPRESSION_EXTENSION)
class MuxExtensionProcessor(ExtensionProcessorInterface):
@@ -676,52 +810,85 @@ class MuxExtensionProcessor(ExtensionProcessorInterface):
_QUOTA_PARAM = 'quota'
def __init__(self, request):
- self._request = request
+ ExtensionProcessorInterface.__init__(self, request)
+ self._quota = 0
+ self._extensions = []
def name(self):
return common.MUX_EXTENSION
- def get_extension_response(self, ws_request,
- logical_channel_extensions):
- # Mux extension cannot be used after extensions that depend on
- # frame boundary, extension data field, or any reserved bits
- # which are attributed to each frame.
- for extension in logical_channel_extensions:
- name = extension.name()
- if (name == common.PERFRAME_COMPRESSION_EXTENSION or
- name == common.DEFLATE_FRAME_EXTENSION or
- name == common.X_WEBKIT_DEFLATE_FRAME_EXTENSION):
- return None
-
+ def check_consistency_with_other_processors(self, processors):
+ before_mux = True
+ for processor in processors:
+ name = processor.name()
+ if name == self.name():
+ before_mux = False
+ continue
+ if not processor.is_active():
+ continue
+ if before_mux:
+ # Mux extension cannot be used after extensions
+ # that depend on frame boundary, extension data field, or any
+ # reserved bits which are attributed to each frame.
+ if (name == common.PERFRAME_COMPRESSION_EXTENSION or
+ name == common.DEFLATE_FRAME_EXTENSION or
+ name == common.X_WEBKIT_DEFLATE_FRAME_EXTENSION):
+ self.set_active(False)
+ return
+ else:
+ # Mux extension should not be applied before any history-based
+ # compression extension.
+ if (name == common.PERFRAME_COMPRESSION_EXTENSION or
+ name == common.DEFLATE_FRAME_EXTENSION or
+ name == common.X_WEBKIT_DEFLATE_FRAME_EXTENSION or
+ name == common.PERMESSAGE_COMPRESSION_EXTENSION or
+ name == common.X_WEBKIT_PERMESSAGE_COMPRESSION_EXTENSION):
+ self.set_active(False)
+ return
+
+ def _get_extension_response_internal(self):
+ self._active = False
quota = self._request.get_parameter_value(self._QUOTA_PARAM)
- if quota is None:
- ws_request.mux_quota = 0
- else:
+ if quota is not None:
try:
quota = int(quota)
except ValueError, e:
return None
if quota < 0 or quota >= 2 ** 32:
return None
- ws_request.mux_quota = quota
+ self._quota = quota
- ws_request.mux = True
- ws_request.mux_extensions = logical_channel_extensions
+ self._active = True
return common.ExtensionParameter(common.MUX_EXTENSION)
- def setup_stream_options(self, stream_options):
+ def _setup_stream_options_internal(self, stream_options):
pass
+ def set_quota(self, quota):
+ self._quota = quota
+
+ def quota(self):
+ return self._quota
+
+ def set_extensions(self, extensions):
+ self._extensions = extensions
+
+ def extensions(self):
+ return self._extensions
+
_available_processors[common.MUX_EXTENSION] = MuxExtensionProcessor
def get_extension_processor(extension_request):
- global _available_processors
processor_class = _available_processors.get(extension_request.name())
if processor_class is None:
return None
return processor_class(extension_request)
+def is_compression_extension(extension_name):
+ return extension_name in _compression_extension_names
+
+
# vi:sts=4 sw=4 et
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py
index e5c94ca90..c993a584b 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/_base.py
@@ -84,42 +84,29 @@ def get_default_port(is_secure):
return common.DEFAULT_WEB_SOCKET_PORT
-def validate_subprotocol(subprotocol, hixie):
+def validate_subprotocol(subprotocol):
"""Validate a value in the Sec-WebSocket-Protocol field.
- See
- - RFC 6455: Section 4.1., 4.2.2., and 4.3.
- - HyBi 00: Section 4.1. Opening handshake
-
- Args:
- hixie: if True, checks if characters in subprotocol are in range
- between U+0020 and U+007E. It's required by HyBi 00 but not by
- RFC 6455.
+ See the Section 4.1., 4.2.2., and 4.3. of RFC 6455.
"""
if not subprotocol:
raise HandshakeException('Invalid subprotocol name: empty')
- if hixie:
- # Parameter should be in the range U+0020 to U+007E.
- for c in subprotocol:
- if not 0x20 <= ord(c) <= 0x7e:
- raise HandshakeException(
- 'Illegal character in subprotocol name: %r' % c)
- else:
- # Parameter should be encoded HTTP token.
- state = http_header_util.ParsingState(subprotocol)
- token = http_header_util.consume_token(state)
- rest = http_header_util.peek(state)
- # If |rest| is not None, |subprotocol| is not one token or invalid. If
- # |rest| is None, |token| must not be None because |subprotocol| is
- # concatenation of |token| and |rest| and is not None.
- if rest is not None:
- raise HandshakeException('Invalid non-token string in subprotocol '
- 'name: %r' % rest)
+
+ # Parameter should be encoded HTTP token.
+ state = http_header_util.ParsingState(subprotocol)
+ token = http_header_util.consume_token(state)
+ rest = http_header_util.peek(state)
+ # If |rest| is not None, |subprotocol| is not one token or invalid. If
+ # |rest| is None, |token| must not be None because |subprotocol| is
+ # concatenation of |token| and |rest| and is not None.
+ if rest is not None:
+ raise HandshakeException('Invalid non-token string in subprotocol '
+ 'name: %r' % rest)
def parse_host_header(request):
- fields = request.headers_in['Host'].split(':', 1)
+ fields = request.headers_in[common.HOST_HEADER].split(':', 1)
if len(fields) == 1:
return fields[0], get_default_port(request.is_https())
try:
@@ -132,27 +119,6 @@ def format_header(name, value):
return '%s: %s\r\n' % (name, value)
-def build_location(request):
- """Build WebSocket location for request."""
- location_parts = []
- if request.is_https():
- location_parts.append(common.WEB_SOCKET_SECURE_SCHEME)
- else:
- location_parts.append(common.WEB_SOCKET_SCHEME)
- location_parts.append('://')
- host, port = parse_host_header(request)
- connection_port = request.connection.local_addr[1]
- if port != connection_port:
- raise HandshakeException('Header/connection port mismatch: %d/%d' %
- (port, connection_port))
- location_parts.append(host)
- if (port != get_default_port(request.is_https())):
- location_parts.append(':')
- location_parts.append(str(port))
- location_parts.append(request.uri)
- return ''.join(location_parts)
-
-
def get_mandatory_header(request, key):
value = request.headers_in.get(key)
if value is None:
@@ -180,16 +146,6 @@ def check_request_line(request):
request.protocol)
-def check_header_lines(request, mandatory_headers):
- check_request_line(request)
-
- # The expected field names, and the meaning of their corresponding
- # values, are as follows.
- # |Upgrade| and |Connection|
- for key, expected_value in mandatory_headers:
- validate_mandatory_header(request, key, expected_value)
-
-
def parse_token_list(data):
"""Parses a header value which follows 1#token and returns parsed elements
as a list of strings.
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py
index fc0e2a096..1d54a662d 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi.py
@@ -49,6 +49,7 @@ import re
from mod_pywebsocket import common
from mod_pywebsocket.extensions import get_extension_processor
+from mod_pywebsocket.extensions import is_compression_extension
from mod_pywebsocket.handshake._base import check_request_line
from mod_pywebsocket.handshake._base import format_header
from mod_pywebsocket.handshake._base import get_mandatory_header
@@ -180,43 +181,59 @@ class Handshaker(object):
processors.append(processor)
self._request.ws_extension_processors = processors
+ # List of extra headers. The extra handshake handler may add header
+ # data as name/value pairs to this list and pywebsocket appends
+ # them to the WebSocket handshake.
+ self._request.extra_headers = []
+
# Extra handshake handler may modify/remove processors.
self._dispatcher.do_extra_handshake(self._request)
processors = filter(lambda processor: processor is not None,
self._request.ws_extension_processors)
+ # Ask each processor if there are extensions on the request which
+ # cannot co-exist. When processor decided other processors cannot
+ # co-exist with it, the processor marks them (or itself) as
+ # "inactive". The first extension processor has the right to
+ # make the final call.
+ for processor in reversed(processors):
+ if processor.is_active():
+ processor.check_consistency_with_other_processors(
+ processors)
+ processors = filter(lambda processor: processor.is_active(),
+ processors)
+
accepted_extensions = []
- # We need to take care of mux extension here. Extensions that
- # are placed before mux should be applied to logical channels.
+ # We need to take into account of mux extension here.
+ # If mux extension exists:
+ # - Remove processors of extensions for logical channel,
+ # which are processors located before the mux processor
+ # - Pass extension requests for logical channel to mux processor
+ # - Attach the mux processor to the request. It will be referred
+ # by dispatcher to see whether the dispatcher should use mux
+ # handler or not.
mux_index = -1
for i, processor in enumerate(processors):
if processor.name() == common.MUX_EXTENSION:
mux_index = i
break
if mux_index >= 0:
- mux_processor = processors[mux_index]
- logical_channel_processors = processors[:mux_index]
- processors = processors[mux_index+1:]
-
- for processor in logical_channel_processors:
- extension_response = processor.get_extension_response()
- if extension_response is None:
- # Rejected.
- continue
- accepted_extensions.append(extension_response)
- # Pass a shallow copy of accepted_extensions as extensions for
- # logical channels.
- mux_response = mux_processor.get_extension_response(
- self._request, accepted_extensions[:])
- if mux_response is not None:
- accepted_extensions.append(mux_response)
+ logical_channel_extensions = []
+ for processor in processors[:mux_index]:
+ logical_channel_extensions.append(processor.request())
+ processor.set_active(False)
+ self._request.mux_processor = processors[mux_index]
+ self._request.mux_processor.set_extensions(
+ logical_channel_extensions)
+ processors = filter(lambda processor: processor.is_active(),
+ processors)
stream_options = StreamOptions()
- # When there is mux extension, here, |processors| contain only
- # prosessors for extensions placed after mux.
- for processor in processors:
+ for index, processor in enumerate(processors):
+ if not processor.is_active():
+ continue
extension_response = processor.get_extension_response()
if extension_response is None:
@@ -227,6 +244,14 @@ class Handshaker(object):
processor.setup_stream_options(stream_options)
+ if not is_compression_extension(processor.name()):
+ continue
+
+ # Inactivate all of the following compression extensions.
+ for j in xrange(index + 1, len(processors)):
+ if is_compression_extension(processors[j].name()):
+ processors[j].set_active(False)
+
if len(accepted_extensions) > 0:
self._request.ws_extensions = accepted_extensions
self._logger.debug(
@@ -242,7 +267,7 @@ class Handshaker(object):
raise HandshakeException(
'do_extra_handshake must choose one subprotocol from '
'ws_requested_protocols and set it to ws_protocol')
- validate_subprotocol(self._request.ws_protocol, hixie=False)
+ validate_subprotocol(self._request.ws_protocol)
self._logger.debug(
'Subprotocol accepted: %r',
@@ -375,6 +400,7 @@ class Handshaker(object):
response.append('HTTP/1.1 101 Switching Protocols\r\n')
+ # WebSocket headers
response.append(format_header(
common.UPGRADE_HEADER, common.WEBSOCKET_UPGRADE_TYPE))
response.append(format_header(
@@ -390,6 +416,11 @@ class Handshaker(object):
response.append(format_header(
common.SEC_WEBSOCKET_EXTENSIONS_HEADER,
common.format_extensions(self._request.ws_extensions)))
+
+ # Headers not specific for WebSocket
+ for name, value in self._request.extra_headers:
+ response.append(format_header(name, value))
+
response.append('\r\n')
return ''.join(response)
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py
index cc6f8dc43..8757717a6 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/handshake/hybi00.py
@@ -51,11 +51,12 @@ from mod_pywebsocket import common
from mod_pywebsocket.stream import StreamHixie75
from mod_pywebsocket import util
from mod_pywebsocket.handshake._base import HandshakeException
-from mod_pywebsocket.handshake._base import build_location
-from mod_pywebsocket.handshake._base import check_header_lines
+from mod_pywebsocket.handshake._base import check_request_line
from mod_pywebsocket.handshake._base import format_header
+from mod_pywebsocket.handshake._base import get_default_port
from mod_pywebsocket.handshake._base import get_mandatory_header
-from mod_pywebsocket.handshake._base import validate_subprotocol
+from mod_pywebsocket.handshake._base import parse_host_header
+from mod_pywebsocket.handshake._base import validate_mandatory_header
_MANDATORY_HEADERS = [
@@ -65,6 +66,56 @@ _MANDATORY_HEADERS = [
]
+def _validate_subprotocol(subprotocol):
+ """Checks if characters in subprotocol are in range between U+0020 and
+ U+007E. A value in the Sec-WebSocket-Protocol field need to satisfy this
+ requirement.
+
+ See the Section 4.1. Opening handshake of the spec.
+ """
+
+ if not subprotocol:
+ raise HandshakeException('Invalid subprotocol name: empty')
+
+ # Parameter should be in the range U+0020 to U+007E.
+ for c in subprotocol:
+ if not 0x20 <= ord(c) <= 0x7e:
+ raise HandshakeException(
+ 'Illegal character in subprotocol name: %r' % c)
+
+
+def _check_header_lines(request, mandatory_headers):
+ check_request_line(request)
+
+ # The expected field names, and the meaning of their corresponding
+ # values, are as follows.
+ # |Upgrade| and |Connection|
+ for key, expected_value in mandatory_headers:
+ validate_mandatory_header(request, key, expected_value)
+
+
+def _build_location(request):
+ """Build WebSocket location for request."""
+
+ location_parts = []
+ if request.is_https():
+ location_parts.append(common.WEB_SOCKET_SECURE_SCHEME)
+ else:
+ location_parts.append(common.WEB_SOCKET_SCHEME)
+ location_parts.append('://')
+ host, port = parse_host_header(request)
+ connection_port = request.connection.local_addr[1]
+ if port != connection_port:
+ raise HandshakeException('Header/connection port mismatch: %d/%d' %
+ (port, connection_port))
+ location_parts.append(host)
+ if (port != get_default_port(request.is_https())):
+ location_parts.append(':')
+ location_parts.append(str(port))
+ location_parts.append(request.unparsed_uri)
+ return ''.join(location_parts)
+
+
class Handshaker(object):
"""Opening handshake processor for the WebSocket protocol version HyBi 00.
"""
@@ -101,7 +152,7 @@ class Handshaker(object):
# 5.1 Reading the client's opening handshake.
# dispatcher sets it in self._request.
- check_header_lines(self._request, _MANDATORY_HEADERS)
+ _check_header_lines(self._request, _MANDATORY_HEADERS)
self._set_resource()
self._set_subprotocol()
self._set_location()
@@ -121,14 +172,14 @@ class Handshaker(object):
subprotocol = self._request.headers_in.get(
common.SEC_WEBSOCKET_PROTOCOL_HEADER)
if subprotocol is not None:
- validate_subprotocol(subprotocol, hixie=True)
+ _validate_subprotocol(subprotocol)
self._request.ws_protocol = subprotocol
def _set_location(self):
# |Host|
host = self._request.headers_in.get(common.HOST_HEADER)
if host is not None:
- self._request.ws_location = build_location(self._request)
+ self._request.ws_location = _build_location(self._request)
# TODO(ukai): check host is this host.
def _set_origin(self):
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py
index 2cc62de04..c244421cf 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/headerparserhandler.py
@@ -167,7 +167,9 @@ def _create_dispatcher():
handler_root, handler_scan, allow_handlers_outside_root)
for warning in dispatcher.source_warnings():
- apache.log_error('mod_pywebsocket: %s' % warning, apache.APLOG_WARNING)
+ apache.log_error(
+ 'mod_pywebsocket: Warning in source loading: %s' % warning,
+ apache.APLOG_WARNING)
return dispatcher
@@ -191,12 +193,16 @@ def headerparserhandler(request):
# Fallback to default http handler for request paths for which
# we don't have request handlers.
if not _dispatcher.get_handler_suite(request.uri):
- request.log_error('No handler for resource: %r' % request.uri,
- apache.APLOG_INFO)
- request.log_error('Fallback to Apache', apache.APLOG_INFO)
+ request.log_error(
+ 'mod_pywebsocket: No handler for resource: %r' % request.uri,
+ apache.APLOG_INFO)
+ request.log_error(
+ 'mod_pywebsocket: Fallback to Apache', apache.APLOG_INFO)
return apache.DECLINED
except dispatch.DispatchException, e:
- request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO)
+ request.log_error(
+ 'mod_pywebsocket: Dispatch failed for error: %s' % e,
+ apache.APLOG_INFO)
if not handshake_is_done:
return e.status
@@ -210,26 +216,30 @@ def headerparserhandler(request):
handshake.do_handshake(
request, _dispatcher, allowDraft75=allow_draft75)
except handshake.VersionException, e:
- request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO)
+ request.log_error(
+ 'mod_pywebsocket: Handshake failed for version error: %s' % e,
+ apache.APLOG_INFO)
request.err_headers_out.add(common.SEC_WEBSOCKET_VERSION_HEADER,
e.supported_versions)
return apache.HTTP_BAD_REQUEST
except handshake.HandshakeException, e:
# Handshake for ws/wss failed.
# Send http response with error status.
- request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO)
+ request.log_error(
+ 'mod_pywebsocket: Handshake failed for error: %s' % e,
+ apache.APLOG_INFO)
return e.status
handshake_is_done = True
request._dispatcher = _dispatcher
_dispatcher.transfer_data(request)
except handshake.AbortedByUserException, e:
- request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO)
+ request.log_error('mod_pywebsocket: Aborted: %s' % e, apache.APLOG_INFO)
except Exception, e:
# DispatchException can also be thrown if something is wrong in
# pywebsocket code. It's caught here, then.
- request.log_error('mod_pywebsocket: %s\n%s' %
+ request.log_error('mod_pywebsocket: Exception occurred: %s\n%s' %
(e, util.get_stack_trace()),
apache.APLOG_ERR)
# Unknown exceptions before handshake mean Apache must handle its
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py
index f0bdd2461..76334685b 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py
@@ -50,6 +50,7 @@ from mod_pywebsocket import handshake
from mod_pywebsocket import util
from mod_pywebsocket._stream_base import BadOperationException
from mod_pywebsocket._stream_base import ConnectionTerminatedException
+from mod_pywebsocket._stream_base import InvalidFrameException
from mod_pywebsocket._stream_hybi import Frame
from mod_pywebsocket._stream_hybi import Stream
from mod_pywebsocket._stream_hybi import StreamOptions
@@ -94,10 +95,12 @@ _DROP_CODE_UNKNOWN_MUX_OPCODE = 2004
_DROP_CODE_INVALID_MUX_CONTROL_BLOCK = 2005
_DROP_CODE_CHANNEL_ALREADY_EXISTS = 2006
_DROP_CODE_NEW_CHANNEL_SLOT_VIOLATION = 2007
+_DROP_CODE_UNKNOWN_REQUEST_ENCODING = 2010
-_DROP_CODE_UNKNOWN_REQUEST_ENCODING = 3002
_DROP_CODE_SEND_QUOTA_VIOLATION = 3005
+_DROP_CODE_SEND_QUOTA_OVERFLOW = 3006
_DROP_CODE_ACKNOWLEDGED = 3008
+_DROP_CODE_BAD_FRAGMENTATION = 3009
class MuxUnexpectedException(Exception):
@@ -158,8 +161,7 @@ def _encode_number(number):
def _create_add_channel_response(channel_id, encoded_handshake,
- encoding=0, rejected=False,
- outer_frame_mask=False):
+ encoding=0, rejected=False):
if encoding != 0 and encoding != 1:
raise ValueError('Invalid encoding %d' % encoding)
@@ -169,12 +171,10 @@ def _create_add_channel_response(channel_id, encoded_handshake,
_encode_channel_id(channel_id) +
_encode_number(len(encoded_handshake)) +
encoded_handshake)
- payload = _encode_channel_id(_CONTROL_CHANNEL_ID) + block
- return create_binary_frame(payload, mask=outer_frame_mask)
+ return block
-def _create_drop_channel(channel_id, code=None, message='',
- outer_frame_mask=False):
+def _create_drop_channel(channel_id, code=None, message=''):
if len(message) > 0 and code is None:
raise ValueError('Code must be specified if message is specified')
@@ -187,36 +187,31 @@ def _create_drop_channel(channel_id, code=None, message='',
reason_size = _encode_number(len(reason))
block += reason_size + reason
- payload = _encode_channel_id(_CONTROL_CHANNEL_ID) + block
- return create_binary_frame(payload, mask=outer_frame_mask)
+ return block
-def _create_flow_control(channel_id, replenished_quota,
- outer_frame_mask=False):
+def _create_flow_control(channel_id, replenished_quota):
first_byte = _MUX_OPCODE_FLOW_CONTROL << 5
block = (chr(first_byte) +
_encode_channel_id(channel_id) +
_encode_number(replenished_quota))
- payload = _encode_channel_id(_CONTROL_CHANNEL_ID) + block
- return create_binary_frame(payload, mask=outer_frame_mask)
+ return block
-def _create_new_channel_slot(slots, send_quota, outer_frame_mask=False):
+def _create_new_channel_slot(slots, send_quota):
if slots < 0 or send_quota < 0:
raise ValueError('slots and send_quota must be non-negative.')
first_byte = _MUX_OPCODE_NEW_CHANNEL_SLOT << 5
block = (chr(first_byte) +
_encode_number(slots) +
_encode_number(send_quota))
- payload = _encode_channel_id(_CONTROL_CHANNEL_ID) + block
- return create_binary_frame(payload, mask=outer_frame_mask)
+ return block
-def _create_fallback_new_channel_slot(outer_frame_mask=False):
+def _create_fallback_new_channel_slot():
first_byte = (_MUX_OPCODE_NEW_CHANNEL_SLOT << 5) | 1 # Set the F flag
block = (chr(first_byte) + _encode_number(0) + _encode_number(0))
- payload = _encode_channel_id(_CONTROL_CHANNEL_ID) + block
- return create_binary_frame(payload, mask=outer_frame_mask)
+ return block
def _parse_request_text(request_text):
@@ -318,44 +313,34 @@ class _MuxFramePayloadParser(object):
def _read_number(self):
if self._read_position + 1 > len(self._data):
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ raise ValueError(
'Cannot read the first byte of number field')
number = ord(self._data[self._read_position])
if number & 0x80 == 0x80:
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ raise ValueError(
'The most significant bit of the first byte of number should '
'be unset')
self._read_position += 1
pos = self._read_position
if number == 127:
if pos + 8 > len(self._data):
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
- 'Invalid number field')
+ raise ValueError('Invalid number field')
self._read_position += 8
number = struct.unpack('!Q', self._data[pos:pos+8])[0]
if number > 0x7FFFFFFFFFFFFFFF:
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
- 'Encoded number >= 2^63')
+ raise ValueError('Encoded number(%d) >= 2^63' % number)
if number <= 0xFFFF:
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ raise ValueError(
'%d should not be encoded by 9 bytes encoding' % number)
return number
if number == 126:
if pos + 2 > len(self._data):
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
- 'Invalid number field')
+ raise ValueError('Invalid number field')
self._read_position += 2
number = struct.unpack('!H', self._data[pos:pos+2])[0]
if number <= 125:
- raise PhysicalConnectionError(
- _DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ raise ValueError(
'%d should not be encoded by 3 bytes encoding' % number)
return number
@@ -366,7 +351,11 @@ class _MuxFramePayloadParser(object):
- the contents.
"""
- size = self._read_number()
+ try:
+ size = self._read_number()
+ except ValueError, e:
+ raise PhysicalConnectionError(_DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ str(e))
pos = self._read_position
if pos + size > len(self._data):
raise PhysicalConnectionError(
@@ -419,9 +408,11 @@ class _MuxFramePayloadParser(object):
try:
control_block.channel_id = self.read_channel_id()
+ control_block.send_quota = self._read_number()
except ValueError, e:
- raise PhysicalConnectionError(_DROP_CODE_INVALID_MUX_CONTROL_BLOCK)
- control_block.send_quota = self._read_number()
+ raise PhysicalConnectionError(_DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ str(e))
+
return control_block
def _read_drop_channel(self, first_byte, control_block):
@@ -455,8 +446,12 @@ class _MuxFramePayloadParser(object):
_DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
'Reserved bits must be unset')
control_block.fallback = first_byte & 1
- control_block.slots = self._read_number()
- control_block.send_quota = self._read_number()
+ try:
+ control_block.slots = self._read_number()
+ control_block.send_quota = self._read_number()
+ except ValueError, e:
+ raise PhysicalConnectionError(_DROP_CODE_INVALID_MUX_CONTROL_BLOCK,
+ str(e))
return control_block
def read_control_blocks(self):
@@ -549,8 +544,12 @@ class _LogicalConnection(object):
self._mux_handler = mux_handler
self._channel_id = channel_id
self._incoming_data = ''
+
+ # - Protects _waiting_write_completion
+ # - Signals the thread waiting for completion of write by mux handler
self._write_condition = threading.Condition()
self._waiting_write_completion = False
+
self._read_condition = threading.Condition()
self._read_state = self.STATE_ACTIVE
@@ -594,6 +593,7 @@ class _LogicalConnection(object):
self._waiting_write_completion = True
self._mux_handler.send_data(self._channel_id, data)
self._write_condition.wait()
+ # TODO(tyoshino): Raise an exception if woke up by on_writer_done.
finally:
self._write_condition.release()
@@ -607,20 +607,31 @@ class _LogicalConnection(object):
self._mux_handler.send_control_data(data)
- def notify_write_done(self):
+ def on_write_data_done(self):
"""Called when sending data is completed."""
try:
self._write_condition.acquire()
if not self._waiting_write_completion:
raise MuxUnexpectedException(
- 'Invalid call of notify_write_done for logical connection'
- ' %d' % self._channel_id)
+ 'Invalid call of on_write_data_done for logical '
+ 'connection %d' % self._channel_id)
+ self._waiting_write_completion = False
+ self._write_condition.notify()
+ finally:
+ self._write_condition.release()
+
+ def on_writer_done(self):
+ """Called by the mux handler when the writer thread has finished."""
+
+ try:
+ self._write_condition.acquire()
self._waiting_write_completion = False
self._write_condition.notify()
finally:
self._write_condition.release()
+
def append_frame_data(self, frame_data):
"""Appends incoming frame data. Called when mux_handler dispatches
frame data to the corresponding application.
@@ -686,37 +697,162 @@ class _LogicalConnection(object):
self._read_condition.release()
+class _InnerMessage(object):
+ """Holds the result of _InnerMessageBuilder.build().
+ """
+
+ def __init__(self, opcode, payload):
+ self.opcode = opcode
+ self.payload = payload
+
+
+class _InnerMessageBuilder(object):
+ """A class that holds the context of inner message fragmentation and
+ builds a message from fragmented inner frame(s).
+ """
+
+ def __init__(self):
+ self._control_opcode = None
+ self._pending_control_fragments = []
+ self._message_opcode = None
+ self._pending_message_fragments = []
+ self._frame_handler = self._handle_first
+
+ def _handle_first(self, frame):
+ if frame.opcode == common.OPCODE_CONTINUATION:
+ raise InvalidFrameException('Sending invalid continuation opcode')
+
+ if common.is_control_opcode(frame.opcode):
+ return self._process_first_fragmented_control(frame)
+ else:
+ return self._process_first_fragmented_message(frame)
+
+ def _process_first_fragmented_control(self, frame):
+ self._control_opcode = frame.opcode
+ self._pending_control_fragments.append(frame.payload)
+ if not frame.fin:
+ self._frame_handler = self._handle_fragmented_control
+ return None
+ return self._reassemble_fragmented_control()
+
+ def _process_first_fragmented_message(self, frame):
+ self._message_opcode = frame.opcode
+ self._pending_message_fragments.append(frame.payload)
+ if not frame.fin:
+ self._frame_handler = self._handle_fragmented_message
+ return None
+ return self._reassemble_fragmented_message()
+
+ def _handle_fragmented_control(self, frame):
+ if frame.opcode != common.OPCODE_CONTINUATION:
+ raise InvalidFrameException(
+ 'Sending invalid opcode %d while sending fragmented control '
+ 'message' % frame.opcode)
+ self._pending_control_fragments.append(frame.payload)
+ if not frame.fin:
+ return None
+ return self._reassemble_fragmented_control()
+
+ def _reassemble_fragmented_control(self):
+ opcode = self._control_opcode
+ payload = ''.join(self._pending_control_fragments)
+ self._control_opcode = None
+ self._pending_control_fragments = []
+ if self._message_opcode is not None:
+ self._frame_handler = self._handle_fragmented_message
+ else:
+ self._frame_handler = self._handle_first
+ return _InnerMessage(opcode, payload)
+
+ def _handle_fragmented_message(self, frame):
+ # Sender can interleave a control message while sending fragmented
+ # messages.
+ if common.is_control_opcode(frame.opcode):
+ if self._control_opcode is not None:
+ raise MuxUnexpectedException(
+ 'Should not reach here(Bug in builder)')
+ return self._process_first_fragmented_control(frame)
+
+ if frame.opcode != common.OPCODE_CONTINUATION:
+ raise InvalidFrameException(
+ 'Sending invalid opcode %d while sending fragmented message' %
+ frame.opcode)
+ self._pending_message_fragments.append(frame.payload)
+ if not frame.fin:
+ return None
+ return self._reassemble_fragmented_message()
+
+ def _reassemble_fragmented_message(self):
+ opcode = self._message_opcode
+ payload = ''.join(self._pending_message_fragments)
+ self._message_opcode = None
+ self._pending_message_fragments = []
+ self._frame_handler = self._handle_first
+ return _InnerMessage(opcode, payload)
+
+ def build(self, frame):
+ """Build an inner message. Returns an _InnerMessage instance when
+ the given frame is the last fragmented frame. Returns None otherwise.
+
+ Args:
+ frame: an inner frame.
+ Raises:
+ InvalidFrameException: when received invalid opcode. (e.g.
+ receiving non continuation data opcode but the fin flag of
+ the previous inner frame was not set.)
+ """
+
+ return self._frame_handler(frame)
+
+
class _LogicalStream(Stream):
"""Mimics the Stream class. This class interprets multiplexed WebSocket
frames.
"""
- def __init__(self, request, send_quota, receive_quota):
+ def __init__(self, request, stream_options, send_quota, receive_quota):
"""Constructs an instance.
Args:
request: _LogicalRequest instance.
+ stream_options: StreamOptions instance.
send_quota: Initial send quota.
receive_quota: Initial receive quota.
"""
- # TODO(bashi): Support frame filters.
- stream_options = StreamOptions()
# Physical stream is responsible for masking.
stream_options.unmask_receive = False
- # Control frames can be fragmented on logical channel.
- stream_options.allow_fragmented_control_frame = True
Stream.__init__(self, request, stream_options)
+
+ self._send_closed = False
self._send_quota = send_quota
- self._send_quota_condition = threading.Condition()
+ # - Protects _send_closed and _send_quota
+ # - Signals the thread waiting for send quota replenished
+ self._send_condition = threading.Condition()
+
+ # The opcode of the first frame in messages.
+ self._message_opcode = common.OPCODE_TEXT
+ # True when the last message was fragmented.
+ self._last_message_was_fragmented = False
+
self._receive_quota = receive_quota
self._write_inner_frame_semaphore = threading.Semaphore()
+ self._inner_message_builder = _InnerMessageBuilder()
+
def _create_inner_frame(self, opcode, payload, end=True):
- # TODO(bashi): Support extensions that use reserved bits.
- first_byte = (end << 7) | opcode
- return (_encode_channel_id(self._request.channel_id) +
- chr(first_byte) + payload)
+ frame = Frame(fin=end, opcode=opcode, payload=payload)
+ for frame_filter in self._options.outgoing_frame_filters:
+ frame_filter.filter(frame)
+
+ if len(payload) != len(frame.payload):
+ raise MuxUnexpectedException(
+ 'Mux extension must not be used after extensions which change '
+ ' frame boundary')
+
+ first_byte = ((frame.fin << 7) | (frame.rsv1 << 6) |
+ (frame.rsv2 << 5) | (frame.rsv3 << 4) | frame.opcode)
+ return chr(first_byte) + frame.payload
def _write_inner_frame(self, opcode, payload, end=True):
payload_length = len(payload)
@@ -730,14 +866,36 @@ class _LogicalStream(Stream):
# multiplexing control blocks can be inserted between fragmented
# inner frames on the physical channel.
self._write_inner_frame_semaphore.acquire()
+
+ # Consume an octet quota when this is the first fragmented frame.
+ if opcode != common.OPCODE_CONTINUATION:
+ try:
+ self._send_condition.acquire()
+ while (not self._send_closed) and self._send_quota == 0:
+ self._send_condition.wait()
+
+ if self._send_closed:
+ raise BadOperationException(
+ 'Logical connection %d is closed' %
+ self._request.channel_id)
+
+ self._send_quota -= 1
+ finally:
+ self._send_condition.release()
+
while write_position < payload_length:
try:
- self._send_quota_condition.acquire()
- while self._send_quota == 0:
+ self._send_condition.acquire()
+ while (not self._send_closed) and self._send_quota == 0:
self._logger.debug(
'No quota. Waiting FlowControl message for %d.' %
self._request.channel_id)
- self._send_quota_condition.wait()
+ self._send_condition.wait()
+
+ if self._send_closed:
+ raise BadOperationException(
+ 'Logical connection %d is closed' %
+ self.request._channel_id)
remaining = payload_length - write_position
write_length = min(self._send_quota, remaining)
@@ -749,18 +907,16 @@ class _LogicalStream(Stream):
opcode,
payload[write_position:write_position+write_length],
inner_frame_end)
- frame_data = self._writer.build(
- inner_frame, end=True, binary=True)
self._send_quota -= write_length
self._logger.debug('Consumed quota=%d, remaining=%d' %
(write_length, self._send_quota))
finally:
- self._send_quota_condition.release()
+ self._send_condition.release()
# Writing data will block the worker so we need to release
- # _send_quota_condition before writing.
- self._logger.debug('Sending inner frame: %r' % frame_data)
- self._request.connection.write(frame_data)
+ # _send_condition before writing.
+ self._logger.debug('Sending inner frame: %r' % inner_frame)
+ self._request.connection.write(inner_frame)
write_position += write_length
opcode = common.OPCODE_CONTINUATION
@@ -773,12 +929,18 @@ class _LogicalStream(Stream):
def replenish_send_quota(self, send_quota):
"""Replenish send quota."""
- self._send_quota_condition.acquire()
- self._send_quota += send_quota
- self._logger.debug('Replenished send quota for channel id %d: %d' %
- (self._request.channel_id, self._send_quota))
- self._send_quota_condition.notify()
- self._send_quota_condition.release()
+ try:
+ self._send_condition.acquire()
+ if self._send_quota + send_quota > 0x7FFFFFFFFFFFFFFF:
+ self._send_quota = 0
+ raise LogicalChannelError(
+ self._request.channel_id, _DROP_CODE_SEND_QUOTA_OVERFLOW)
+ self._send_quota += send_quota
+ self._logger.debug('Replenished send quota for channel id %d: %d' %
+ (self._request.channel_id, self._send_quota))
+ finally:
+ self._send_condition.notify()
+ self._send_condition.release()
def consume_receive_quota(self, amount):
"""Consumes receive quota. Returns False on failure."""
@@ -808,7 +970,19 @@ class _LogicalStream(Stream):
opcode = common.OPCODE_TEXT
message = message.encode('utf-8')
+ for message_filter in self._options.outgoing_message_filters:
+ message = message_filter.filter(message, end, binary)
+
+ if self._last_message_was_fragmented:
+ if opcode != self._message_opcode:
+ raise BadOperationException('Message types are different in '
+ 'frames for the same message')
+ opcode = common.OPCODE_CONTINUATION
+ else:
+ self._message_opcode = opcode
+
self._write_inner_frame(opcode, message, end)
+ self._last_message_was_fragmented = not end
def _receive_frame(self):
"""Overrides Stream._receive_frame.
@@ -821,6 +995,9 @@ class _LogicalStream(Stream):
opcode, payload, fin, rsv1, rsv2, rsv3 = Stream._receive_frame(self)
amount = len(payload)
+ # Replenish extra one octet when receiving the first fragmented frame.
+ if opcode != common.OPCODE_CONTINUATION:
+ amount += 1
self._receive_quota += amount
frame_data = _create_flow_control(self._request.channel_id,
amount)
@@ -829,6 +1006,21 @@ class _LogicalStream(Stream):
self._request.connection.write_control_data(frame_data)
return opcode, payload, fin, rsv1, rsv2, rsv3
+ def _get_message_from_frame(self, frame):
+ """Overrides Stream._get_message_from_frame.
+ """
+
+ try:
+ inner_message = self._inner_message_builder.build(frame)
+ except InvalidFrameException:
+ raise LogicalChannelError(
+ self._request.channel_id, _DROP_CODE_BAD_FRAGMENTATION)
+
+ if inner_message is None:
+ return None
+ self._original_opcode = inner_message.opcode
+ return inner_message.payload
+
def receive_message(self):
"""Overrides Stream.receive_message."""
@@ -875,12 +1067,13 @@ class _LogicalStream(Stream):
self._request.channel_id)
self._request.server_terminated = True
- def _drain_received_data(self):
- """Overrides Stream._drain_received_data. Nothing need to be done for
- logical channel.
- """
+ def stop_sending(self):
+ """Stops accepting new send operation (_write_inner_frame)."""
- pass
+ self._send_condition.acquire()
+ self._send_closed = True
+ self._send_condition.notify()
+ self._send_condition.release()
class _OutgoingData(object):
@@ -911,8 +1104,17 @@ class _PhysicalConnectionWriter(threading.Thread):
self._logger = util.get_class_logger(self)
self._mux_handler = mux_handler
self.setDaemon(True)
+
+ # When set, make this thread stop accepting new data, flush pending
+ # data and exit.
self._stop_requested = False
+ # The close code of the physical connection.
+ self._close_code = common.STATUS_NORMAL_CLOSURE
+ # Deque for passing write data. It's protected by _deque_condition
+ # until _stop_requested is set.
self._deque = collections.deque()
+ # - Protects _deque, _stop_requested and _close_code
+ # - Signals threads waiting for them to be available
self._deque_condition = threading.Condition()
def put_outgoing_data(self, data):
@@ -937,8 +1139,11 @@ class _PhysicalConnectionWriter(threading.Thread):
self._deque_condition.release()
def _write_data(self, outgoing_data):
+ message = (_encode_channel_id(outgoing_data.channel_id) +
+ outgoing_data.data)
try:
- self._mux_handler.physical_connection.write(outgoing_data.data)
+ self._mux_handler.physical_stream.send_message(
+ message=message, end=True, binary=True)
except Exception, e:
util.prepend_message_to_exception(
'Failed to send message to %r: ' %
@@ -948,33 +1153,51 @@ class _PhysicalConnectionWriter(threading.Thread):
# TODO(bashi): It would be better to block the thread that sends
# control data as well.
if outgoing_data.channel_id != _CONTROL_CHANNEL_ID:
- self._mux_handler.notify_write_done(outgoing_data.channel_id)
+ self._mux_handler.notify_write_data_done(outgoing_data.channel_id)
def run(self):
- self._deque_condition.acquire()
- while not self._stop_requested:
- if len(self._deque) == 0:
- self._deque_condition.wait()
- continue
-
- outgoing_data = self._deque.popleft()
- self._deque_condition.release()
- self._write_data(outgoing_data)
+ try:
self._deque_condition.acquire()
+ while not self._stop_requested:
+ if len(self._deque) == 0:
+ self._deque_condition.wait()
+ continue
- # Flush deque
- try:
- while len(self._deque) > 0:
outgoing_data = self._deque.popleft()
+
+ self._deque_condition.release()
self._write_data(outgoing_data)
+ self._deque_condition.acquire()
+
+ # Flush deque.
+ #
+ # At this point, self._deque_condition is always acquired.
+ try:
+ while len(self._deque) > 0:
+ outgoing_data = self._deque.popleft()
+ self._write_data(outgoing_data)
+ finally:
+ self._deque_condition.release()
+
+ # Close physical connection.
+ try:
+ # Don't wait the response here. The response will be read
+ # by the reader thread.
+ self._mux_handler.physical_stream.close_connection(
+ self._close_code, wait_response=False)
+ except Exception, e:
+ util.prepend_message_to_exception(
+ 'Failed to close the physical connection: %r' % e)
+ raise
finally:
- self._deque_condition.release()
+ self._mux_handler.notify_writer_done()
- def stop(self):
+ def stop(self, close_code=common.STATUS_NORMAL_CLOSURE):
"""Stops the writer thread."""
self._deque_condition.acquire()
self._stop_requested = True
+ self._close_code = close_code
self._deque_condition.notify()
self._deque_condition.release()
@@ -1055,6 +1278,9 @@ class _Worker(threading.Thread):
try:
# Non-critical exceptions will be handled by dispatcher.
self._mux_handler.dispatcher.transfer_data(self._request)
+ except LogicalChannelError, e:
+ self._mux_handler.fail_logical_channel(
+ e.channel_id, e.drop_code, e.message)
finally:
self._mux_handler.notify_worker_done(self._request.channel_id)
@@ -1083,8 +1309,6 @@ class _MuxHandshaker(hybi.Handshaker):
# these headers are included already.
request.headers_in[common.UPGRADE_HEADER] = (
common.WEBSOCKET_UPGRADE_TYPE)
- request.headers_in[common.CONNECTION_HEADER] = (
- common.UPGRADE_CONNECTION_TYPE)
request.headers_in[common.SEC_WEBSOCKET_VERSION_HEADER] = (
str(common.VERSION_HYBI_LATEST))
request.headers_in[common.SEC_WEBSOCKET_KEY_HEADER] = (
@@ -1095,8 +1319,9 @@ class _MuxHandshaker(hybi.Handshaker):
self._logger.debug('Creating logical stream for %d' %
self._request.channel_id)
- return _LogicalStream(self._request, self._send_quota,
- self._receive_quota)
+ return _LogicalStream(
+ self._request, stream_options, self._send_quota,
+ self._receive_quota)
def _create_handshake_response(self, accept):
"""Override hybi._create_handshake_response."""
@@ -1105,7 +1330,9 @@ class _MuxHandshaker(hybi.Handshaker):
response.append('HTTP/1.1 101 Switching Protocols\r\n')
- # Upgrade, Connection and Sec-WebSocket-Accept should be excluded.
+ # Upgrade and Sec-WebSocket-Accept should be excluded.
+ response.append('%s: %s\r\n' % (
+ common.CONNECTION_HEADER, common.UPGRADE_CONNECTION_TYPE))
if self._request.ws_protocol is not None:
response.append('%s: %s\r\n' % (
common.SEC_WEBSOCKET_PROTOCOL_HEADER,
@@ -1169,8 +1396,6 @@ class _HandshakeDeltaBase(object):
del headers[key]
else:
headers[key] = value
- # TODO(bashi): Support extensions
- headers['Sec-WebSocket-Extensions'] = ''
return headers
@@ -1232,8 +1457,12 @@ class _MuxHandler(object):
# Create "Implicitly Opened Connection".
logical_connection = _LogicalConnection(self, _DEFAULT_CHANNEL_ID)
- self._handshake_base = _HandshakeDeltaBase(
- self.original_request.headers_in)
+ headers = copy.copy(self.original_request.headers_in)
+ # Add extensions for logical channel.
+ headers[common.SEC_WEBSOCKET_EXTENSIONS_HEADER] = (
+ common.format_extensions(
+ self.original_request.mux_processor.extensions()))
+ self._handshake_base = _HandshakeDeltaBase(headers)
logical_request = _LogicalRequest(
_DEFAULT_CHANNEL_ID,
self.original_request.method,
@@ -1245,8 +1474,9 @@ class _MuxHandler(object):
# but we will send FlowControl later so set the initial quota to
# _INITIAL_QUOTA_FOR_CLIENT.
self._channel_slots.append(_INITIAL_QUOTA_FOR_CLIENT)
+ send_quota = self.original_request.mux_processor.quota()
if not self._do_handshake_for_logical_request(
- logical_request, send_quota=self.original_request.mux_quota):
+ logical_request, send_quota=send_quota):
raise MuxUnexpectedException(
'Failed handshake on the default channel id')
self._add_logical_channel(logical_request)
@@ -1287,7 +1517,6 @@ class _MuxHandler(object):
if not self._worker_done_notify_received:
self._logger.debug('Waiting worker(s) timed out')
return False
-
finally:
self._logical_channels_condition.release()
@@ -1297,7 +1526,7 @@ class _MuxHandler(object):
return True
- def notify_write_done(self, channel_id):
+ def notify_write_data_done(self, channel_id):
"""Called by the writer thread when a write operation has done.
Args:
@@ -1308,7 +1537,7 @@ class _MuxHandler(object):
self._logical_channels_condition.acquire()
if channel_id in self._logical_channels:
channel_data = self._logical_channels[channel_id]
- channel_data.request.connection.notify_write_done()
+ channel_data.request.connection.on_write_data_done()
else:
self._logger.debug('Seems that logical channel for %d has gone'
% channel_id)
@@ -1469,9 +1698,11 @@ class _MuxHandler(object):
return
channel_data = self._logical_channels[block.channel_id]
channel_data.drop_code = _DROP_CODE_ACKNOWLEDGED
+
# Close the logical channel
channel_data.request.connection.set_read_state(
_LogicalConnection.STATE_TERMINATED)
+ channel_data.request.ws_stream.stop_sending()
finally:
self._logical_channels_condition.release()
@@ -1506,8 +1737,11 @@ class _MuxHandler(object):
return
channel_data = self._logical_channels[channel_id]
fin, rsv1, rsv2, rsv3, opcode, payload = parser.read_inner_frame()
+ consuming_byte = len(payload)
+ if opcode != common.OPCODE_CONTINUATION:
+ consuming_byte += 1
if not channel_data.request.ws_stream.consume_receive_quota(
- len(payload)):
+ consuming_byte):
# The client violates quota. Close logical channel.
raise LogicalChannelError(
channel_id, _DROP_CODE_SEND_QUOTA_VIOLATION)
@@ -1569,15 +1803,32 @@ class _MuxHandler(object):
finished.
"""
- # Terminate all logical connections
- self._logger.debug('termiating all logical connections...')
+ self._logger.debug(
+ 'Termiating all logical connections waiting for incoming data '
+ '...')
self._logical_channels_condition.acquire()
for channel_data in self._logical_channels.values():
try:
channel_data.request.connection.set_read_state(
_LogicalConnection.STATE_TERMINATED)
except Exception:
- pass
+ self._logger.debug(traceback.format_exc())
+ self._logical_channels_condition.release()
+
+ def notify_writer_done(self):
+ """This method is called by the writer thread when the writer has
+ finished.
+ """
+
+ self._logger.debug(
+ 'Termiating all logical connections waiting for write '
+ 'completion ...')
+ self._logical_channels_condition.acquire()
+ for channel_data in self._logical_channels.values():
+ try:
+ channel_data.request.connection.on_writer_done()
+ except Exception:
+ self._logger.debug(traceback.format_exc())
self._logical_channels_condition.release()
def fail_physical_connection(self, code, message):
@@ -1590,8 +1841,7 @@ class _MuxHandler(object):
self._logger.debug('Failing the physical connection...')
self._send_drop_channel(_CONTROL_CHANNEL_ID, code, message)
- self.physical_stream.close_connection(
- common.STATUS_INTERNAL_ENDPOINT_ERROR)
+ self._writer.stop(common.STATUS_INTERNAL_ENDPOINT_ERROR)
def fail_logical_channel(self, channel_id, code, message):
"""Fail a logical channel.
@@ -1611,8 +1861,10 @@ class _MuxHandler(object):
# called later and it will send DropChannel.
channel_data.drop_code = code
channel_data.drop_message = message
+
channel_data.request.connection.set_read_state(
_LogicalConnection.STATE_TERMINATED)
+ channel_data.request.ws_stream.stop_sending()
else:
self._send_drop_channel(channel_id, code, message)
finally:
@@ -1620,7 +1872,8 @@ class _MuxHandler(object):
def use_mux(request):
- return hasattr(request, 'mux') and request.mux
+ return hasattr(request, 'mux_processor') and (
+ request.mux_processor.is_active())
def start(request, dispatcher):
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py
index 07a33d9c9..2bf3b0c28 100755
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/standalone.py
@@ -76,6 +76,9 @@ SUPPORTING TLS
To support TLS, run standalone.py with -t, -k, and -c options.
+Note that when ssl module is used and the key/cert location is incorrect,
+TLS connection silently fails while pyOpenSSL fails on startup.
+
SUPPORTING CLIENT AUTHENTICATION
@@ -140,18 +143,6 @@ import sys
import threading
import time
-_HAS_SSL = False
-_HAS_OPEN_SSL = False
-try:
- import ssl
- _HAS_SSL = True
-except ImportError:
- try:
- import OpenSSL.SSL
- _HAS_OPEN_SSL = True
- except ImportError:
- pass
-
from mod_pywebsocket import common
from mod_pywebsocket import dispatch
from mod_pywebsocket import handshake
@@ -168,6 +159,10 @@ _DEFAULT_REQUEST_QUEUE_SIZE = 128
# 1024 is practically large enough to contain WebSocket handshake lines.
_MAX_MEMORIZED_LINES = 1024
+# Constants for the --tls_module flag.
+_TLS_BY_STANDARD_MODULE = 'ssl'
+_TLS_BY_PYOPENSSL = 'pyopenssl'
+
class _StandaloneConnection(object):
"""Mimic mod_python mp_conn."""
@@ -231,11 +226,23 @@ class _StandaloneRequest(object):
self.headers_in = request_handler.headers
def get_uri(self):
- """Getter to mimic request.uri."""
+ """Getter to mimic request.uri.
+
+ This method returns the raw data at the Request-URI part of the
+ Request-Line, while the uri method on the request object of mod_python
+ returns the path portion after parsing the raw data. This behavior is
+ kept for compatibility.
+ """
return self._request_handler.path
uri = property(get_uri)
+ def get_unparsed_uri(self):
+ """Getter to mimic request.unparsed_uri."""
+
+ return self._request_handler.path
+ unparsed_uri = property(get_unparsed_uri)
+
def get_method(self):
"""Getter to mimic request.method."""
@@ -253,39 +260,68 @@ class _StandaloneRequest(object):
return self._use_tls
- def _drain_received_data(self):
- """Don't use this method from WebSocket handler. Drains unread data
- in the receive buffer.
- """
- raw_socket = self._request_handler.connection
- drained_data = util.drain_received_data(raw_socket)
+def _import_ssl():
+ global ssl
+ try:
+ import ssl
+ return True
+ except ImportError:
+ return False
+
- if drained_data:
- self._logger.debug(
- 'Drained data following close frame: %r', drained_data)
+def _import_pyopenssl():
+ global OpenSSL
+ try:
+ import OpenSSL.SSL
+ return True
+ except ImportError:
+ return False
class _StandaloneSSLConnection(object):
- """A wrapper class for OpenSSL.SSL.Connection to provide makefile method
- which is not supported by the class.
+ """A wrapper class for OpenSSL.SSL.Connection to
+ - provide makefile method which is not supported by the class
+ - tweak shutdown method since OpenSSL.SSL.Connection.shutdown doesn't
+ accept the "how" argument.
+ - convert SysCallError exceptions that its recv method may raise into a
+ return value of '', meaning EOF. We cannot overwrite the recv method on
+ self._connection since it's immutable.
"""
+ _OVERRIDDEN_ATTRIBUTES = ['_connection', 'makefile', 'shutdown', 'recv']
+
def __init__(self, connection):
self._connection = connection
def __getattribute__(self, name):
- if name in ('_connection', 'makefile'):
+ if name in _StandaloneSSLConnection._OVERRIDDEN_ATTRIBUTES:
return object.__getattribute__(self, name)
return self._connection.__getattribute__(name)
def __setattr__(self, name, value):
- if name in ('_connection', 'makefile'):
+ if name in _StandaloneSSLConnection._OVERRIDDEN_ATTRIBUTES:
return object.__setattr__(self, name, value)
return self._connection.__setattr__(name, value)
def makefile(self, mode='r', bufsize=-1):
- return socket._fileobject(self._connection, mode, bufsize)
+ return socket._fileobject(self, mode, bufsize)
+
+ def shutdown(self, unused_how):
+ self._connection.shutdown()
+
+ def recv(self, bufsize, flags=0):
+ if flags != 0:
+ raise ValueError('Non-zero flags not allowed')
+
+ try:
+ return self._connection.recv(bufsize)
+ except OpenSSL.SSL.SysCallError, (err, message):
+ if err == -1:
+ # Suppress "unexpected EOF" exception. See the OpenSSL document
+ # for SSL_get_error.
+ return ''
+ raise
def _alias_handlers(dispatcher, websock_handlers_map_file):
@@ -340,7 +376,7 @@ class WebSocketServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
warnings = options.dispatcher.source_warnings()
if warnings:
for warning in warnings:
- logging.warning('mod_pywebsocket: %s' % warning)
+ logging.warning('Warning in source loading: %s' % warning)
self._logger = util.get_class_logger(self)
@@ -387,25 +423,25 @@ class WebSocketServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
except Exception, e:
self._logger.info('Skip by failure: %r', e)
continue
- if self.websocket_server_options.use_tls:
- if _HAS_SSL:
- if self.websocket_server_options.tls_client_auth:
- client_cert_ = ssl.CERT_REQUIRED
+ server_options = self.websocket_server_options
+ if server_options.use_tls:
+ # For the case of _HAS_OPEN_SSL, we do wrapper setup after
+ # accept.
+ if server_options.tls_module == _TLS_BY_STANDARD_MODULE:
+ if server_options.tls_client_auth:
+ if server_options.tls_client_cert_optional:
+ client_cert_ = ssl.CERT_OPTIONAL
+ else:
+ client_cert_ = ssl.CERT_REQUIRED
else:
client_cert_ = ssl.CERT_NONE
socket_ = ssl.wrap_socket(socket_,
- keyfile=self.websocket_server_options.private_key,
- certfile=self.websocket_server_options.certificate,
+ keyfile=server_options.private_key,
+ certfile=server_options.certificate,
ssl_version=ssl.PROTOCOL_SSLv23,
- ca_certs=self.websocket_server_options.tls_client_ca,
- cert_reqs=client_cert_)
- if _HAS_OPEN_SSL:
- ctx = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
- ctx.use_privatekey_file(
- self.websocket_server_options.private_key)
- ctx.use_certificate_file(
- self.websocket_server_options.certificate)
- socket_ = OpenSSL.SSL.Connection(ctx, socket_)
+ ca_certs=server_options.tls_client_ca,
+ cert_reqs=client_cert_,
+ do_handshake_on_connect=False)
self._sockets.append((socket_, addrinfo))
def server_bind(self):
@@ -479,7 +515,7 @@ class WebSocketServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
self._logger.critical('Not supported: fileno')
return self._sockets[0][0].fileno()
- def handle_error(self, rquest, client_address):
+ def handle_error(self, request, client_address):
"""Override SocketServer.handle_error."""
self._logger.error(
@@ -496,8 +532,63 @@ class WebSocketServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer):
"""
accepted_socket, client_address = self.socket.accept()
- if self.websocket_server_options.use_tls and _HAS_OPEN_SSL:
- accepted_socket = _StandaloneSSLConnection(accepted_socket)
+
+ server_options = self.websocket_server_options
+ if server_options.use_tls:
+ if server_options.tls_module == _TLS_BY_STANDARD_MODULE:
+ try:
+ accepted_socket.do_handshake()
+ except ssl.SSLError, e:
+ self._logger.debug('%r', e)
+ raise
+
+ # Print cipher in use. Handshake is done on accept.
+ self._logger.debug('Cipher: %s', accepted_socket.cipher())
+ self._logger.debug('Client cert: %r',
+ accepted_socket.getpeercert())
+ elif server_options.tls_module == _TLS_BY_PYOPENSSL:
+ # We cannot print the cipher in use. pyOpenSSL doesn't provide
+ # any method to fetch that.
+
+ ctx = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD)
+ ctx.use_privatekey_file(server_options.private_key)
+ ctx.use_certificate_file(server_options.certificate)
+
+ def default_callback(conn, cert, errnum, errdepth, ok):
+ return ok == 1
+
+ # See the OpenSSL document for SSL_CTX_set_verify.
+ if server_options.tls_client_auth:
+ verify_mode = OpenSSL.SSL.VERIFY_PEER
+ if not server_options.tls_client_cert_optional:
+ verify_mode |= OpenSSL.SSL.VERIFY_FAIL_IF_NO_PEER_CERT
+ ctx.set_verify(verify_mode, default_callback)
+ ctx.load_verify_locations(server_options.tls_client_ca,
+ None)
+ else:
+ ctx.set_verify(OpenSSL.SSL.VERIFY_NONE, default_callback)
+
+ accepted_socket = OpenSSL.SSL.Connection(ctx, accepted_socket)
+ accepted_socket.set_accept_state()
+
+ # Convert SSL related error into socket.error so that
+ # SocketServer ignores them and keeps running.
+ #
+ # TODO(tyoshino): Convert all kinds of errors.
+ try:
+ accepted_socket.do_handshake()
+ except OpenSSL.SSL.Error, e:
+ # Set errno part to 1 (SSL_ERROR_SSL) like the ssl module
+ # does.
+ self._logger.debug('%r', e)
+ raise socket.error(1, '%r' % e)
+ cert = accepted_socket.get_peer_certificate()
+ self._logger.debug('Client cert subject: %r',
+ cert.get_subject().get_components())
+ accepted_socket = _StandaloneSSLConnection(accepted_socket)
+ else:
+ raise ValueError('No TLS support module is available')
+
return accepted_socket, client_address
def serve_forever(self, poll_interval=0.5):
@@ -636,7 +727,7 @@ class WebSocketRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
self._logger.info('Fallback to CGIHTTPRequestHandler')
return True
except dispatch.DispatchException, e:
- self._logger.info('%s', e)
+ self._logger.info('Dispatch failed for error: %s', e)
self.send_error(e.status)
return False
@@ -652,7 +743,7 @@ class WebSocketRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
allowDraft75=self._options.allow_draft75,
strict=self._options.strict)
except handshake.VersionException, e:
- self._logger.info('%s', e)
+ self._logger.info('Handshake failed for version error: %s', e)
self.send_response(common.HTTP_STATUS_BAD_REQUEST)
self.send_header(common.SEC_WEBSOCKET_VERSION_HEADER,
e.supported_versions)
@@ -660,14 +751,14 @@ class WebSocketRequestHandler(CGIHTTPServer.CGIHTTPRequestHandler):
return False
except handshake.HandshakeException, e:
# Handshake for ws(s) failed.
- self._logger.info('%s', e)
+ self._logger.info('Handshake failed for error: %s', e)
self.send_error(e.status)
return False
request._dispatcher = self._options.dispatcher
self._options.dispatcher.transfer_data(request)
except handshake.AbortedByUserException, e:
- self._logger.info('%s', e)
+ self._logger.info('Aborted: %s', e)
return False
def log_request(self, code='-', size='-'):
@@ -799,6 +890,12 @@ def _build_option_parser():
'as CGI programs. Must be executable.'))
parser.add_option('-t', '--tls', dest='use_tls', action='store_true',
default=False, help='use TLS (wss://)')
+ parser.add_option('--tls-module', '--tls_module', dest='tls_module',
+ type='choice',
+ choices = [_TLS_BY_STANDARD_MODULE, _TLS_BY_PYOPENSSL],
+ help='Use ssl module if "%s" is specified. '
+ 'Use pyOpenSSL module if "%s" is specified' %
+ (_TLS_BY_STANDARD_MODULE, _TLS_BY_PYOPENSSL))
parser.add_option('-k', '--private-key', '--private_key',
dest='private_key',
default='', help='TLS private key file.')
@@ -806,7 +903,12 @@ def _build_option_parser():
default='', help='TLS certificate file.')
parser.add_option('--tls-client-auth', dest='tls_client_auth',
action='store_true', default=False,
- help='Requires TLS client auth on every connection.')
+ help='Requests TLS client auth on every connection.')
+ parser.add_option('--tls-client-cert-optional',
+ dest='tls_client_cert_optional',
+ action='store_true', default=False,
+ help=('Makes client certificate optional even though '
+ 'TLS client auth is enabled.'))
parser.add_option('--tls-client-ca', dest='tls_client_ca', default='',
help=('Specifies a pem file which contains a set of '
'concatenated CA certificates which are used to '
@@ -933,6 +1035,12 @@ def _main(args=None):
_configure_logging(options)
+ if options.allow_draft75:
+ logging.warning('--allow_draft75 option is obsolete.')
+
+ if options.strict:
+ logging.warning('--strict option is obsolete.')
+
# TODO(tyoshino): Clean up initialization of CGI related values. Move some
# of code here to WebSocketRequestHandler class if it's better.
options.cgi_directories = []
@@ -955,20 +1063,53 @@ def _main(args=None):
options.is_executable_method = __check_script
if options.use_tls:
- if not (_HAS_SSL or _HAS_OPEN_SSL):
- logging.critical('TLS support requires ssl or pyOpenSSL module.')
+ if options.tls_module is None:
+ if _import_ssl():
+ options.tls_module = _TLS_BY_STANDARD_MODULE
+ logging.debug('Using ssl module')
+ elif _import_pyopenssl():
+ options.tls_module = _TLS_BY_PYOPENSSL
+ logging.debug('Using pyOpenSSL module')
+ else:
+ logging.critical(
+ 'TLS support requires ssl or pyOpenSSL module.')
+ sys.exit(1)
+ elif options.tls_module == _TLS_BY_STANDARD_MODULE:
+ if not _import_ssl():
+ logging.critical('ssl module is not available')
+ sys.exit(1)
+ elif options.tls_module == _TLS_BY_PYOPENSSL:
+ if not _import_pyopenssl():
+ logging.critical('pyOpenSSL module is not available')
+ sys.exit(1)
+ else:
+ logging.critical('Invalid --tls-module option: %r',
+ options.tls_module)
sys.exit(1)
+
if not options.private_key or not options.certificate:
logging.critical(
'To use TLS, specify private_key and certificate.')
sys.exit(1)
- if options.tls_client_auth:
- if not options.use_tls:
+ if (options.tls_client_cert_optional and
+ not options.tls_client_auth):
+ logging.critical('Client authentication must be enabled to '
+ 'specify tls_client_cert_optional')
+ sys.exit(1)
+ else:
+ if options.tls_module is not None:
+ logging.critical('Use --tls-module option only together with '
+ '--use-tls option.')
+ sys.exit(1)
+
+ if options.tls_client_auth:
+ logging.critical('TLS must be enabled for client authentication.')
+ sys.exit(1)
+
+ if options.tls_client_cert_optional:
logging.critical('TLS must be enabled for client authentication.')
sys.exit(1)
- if not _HAS_SSL:
- logging.critical('Client authentication requires ssl module.')
if not options.scan_dir:
options.scan_dir = options.websock_handlers
diff --git a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py
index 7bb0b5d9e..adaca3a08 100644
--- a/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py
+++ b/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/util.py
@@ -56,6 +56,11 @@ import socket
import traceback
import zlib
+try:
+ from mod_pywebsocket import fast_masking
+except ImportError:
+ pass
+
def get_stack_trace():
"""Get the current stack trace as string.
@@ -169,45 +174,39 @@ class RepeatedXorMasker(object):
ended and resumes from that point on the next mask method call.
"""
- def __init__(self, mask):
- self._mask = map(ord, mask)
- self._mask_size = len(self._mask)
- self._count = 0
+ def __init__(self, masking_key):
+ self._masking_key = masking_key
+ self._masking_key_index = 0
- def mask(self, s):
+ def _mask_using_swig(self, s):
+ masked_data = fast_masking.mask(
+ s, self._masking_key, self._masking_key_index)
+ self._masking_key_index = (
+ (self._masking_key_index + len(s)) % len(self._masking_key))
+ return masked_data
+
+ def _mask_using_array(self, s):
result = array.array('B')
result.fromstring(s)
+
# Use temporary local variables to eliminate the cost to access
# attributes
- count = self._count
- mask = self._mask
- mask_size = self._mask_size
- for i in xrange(len(result)):
- result[i] ^= mask[count]
- count = (count + 1) % mask_size
- self._count = count
+ masking_key = map(ord, self._masking_key)
+ masking_key_size = len(masking_key)
+ masking_key_index = self._masking_key_index
- return result.tostring()
-
-
-class DeflateRequest(object):
- """A wrapper class for request object to intercept send and recv to perform
- deflate compression and decompression transparently.
- """
+ for i in xrange(len(result)):
+ result[i] ^= masking_key[masking_key_index]
+ masking_key_index = (masking_key_index + 1) % masking_key_size
- def __init__(self, request):
- self._request = request
- self.connection = DeflateConnection(request.connection)
+ self._masking_key_index = masking_key_index
- def __getattribute__(self, name):
- if name in ('_request', 'connection'):
- return object.__getattribute__(self, name)
- return self._request.__getattribute__(name)
+ return result.tostring()
- def __setattr__(self, name, value):
- if name in ('_request', 'connection'):
- return object.__setattr__(self, name, value)
- return self._request.__setattr__(name, value)
+ if 'fast_masking' in globals():
+ mask = _mask_using_swig
+ else:
+ mask = _mask_using_array
# By making wbits option negative, we can suppress CMF/FLG (2 octet) and
@@ -252,6 +251,7 @@ class _Deflater(object):
self._logger.debug('Compress result %r', compressed_bytes)
return compressed_bytes
+
class _Inflater(object):
def __init__(self):
@@ -346,6 +346,7 @@ class _RFC1979Deflater(object):
return self._deflater.compress_and_flush(bytes)[:-4]
return self._deflater.compress(bytes)
+
class _RFC1979Inflater(object):
"""A decompressor class for byte sequence compressed and flushed following
the algorithm described in the RFC1979 section 2.1.
@@ -405,111 +406,4 @@ class DeflateSocket(object):
return len(bytes)
-class DeflateConnection(object):
- """A wrapper class for request object to intercept write and read to
- perform deflate compression and decompression transparently.
- """
-
- def __init__(self, connection):
- self._connection = connection
-
- self._logger = get_class_logger(self)
-
- self._deflater = _Deflater(zlib.MAX_WBITS)
- self._inflater = _Inflater()
-
- def get_remote_addr(self):
- return self._connection.remote_addr
- remote_addr = property(get_remote_addr)
-
- def put_bytes(self, bytes):
- self.write(bytes)
-
- def read(self, size=-1):
- """Reads at most size bytes. Blocks until there's at least one byte
- available.
- """
-
- # TODO(tyoshino): Allow call with size=0.
- if not (size == -1 or size > 0):
- raise Exception('size must be -1 or positive')
-
- data = ''
- while True:
- if size == -1:
- data += self._inflater.decompress(-1)
- else:
- data += self._inflater.decompress(size - len(data))
-
- if size >= 0 and len(data) != 0:
- break
-
- # TODO(tyoshino): Make this read efficient by some workaround.
- #
- # In 3.0.3 and prior of mod_python, read blocks until length bytes
- # was read. We don't know the exact size to read while using
- # deflate, so read byte-by-byte.
- #
- # _StandaloneRequest.read that ultimately performs
- # socket._fileobject.read also blocks until length bytes was read
- read_data = self._connection.read(1)
- if not read_data:
- break
- self._inflater.append(read_data)
- return data
-
- def write(self, bytes):
- self._connection.write(self._deflater.compress_and_flush(bytes))
-
-
-def _is_ewouldblock_errno(error_number):
- """Returns True iff error_number indicates that receive operation would
- block. To make this portable, we check availability of errno and then
- compare them.
- """
-
- for error_name in ['WSAEWOULDBLOCK', 'EWOULDBLOCK', 'EAGAIN']:
- if (error_name in dir(errno) and
- error_number == getattr(errno, error_name)):
- return True
- return False
-
-
-def drain_received_data(raw_socket):
- # Set the socket non-blocking.
- original_timeout = raw_socket.gettimeout()
- raw_socket.settimeout(0.0)
-
- drained_data = []
-
- # Drain until the socket is closed or no data is immediately
- # available for read.
- while True:
- try:
- data = raw_socket.recv(1)
- if not data:
- break
- drained_data.append(data)
- except socket.error, e:
- # e can be either a pair (errno, string) or just a string (or
- # something else) telling what went wrong. We suppress only
- # the errors that indicates that the socket blocks. Those
- # exceptions can be parsed as a pair (errno, string).
- try:
- error_number, message = e
- except:
- # Failed to parse socket.error.
- raise e
-
- if _is_ewouldblock_errno(error_number):
- break
- else:
- raise e
-
- # Rollback timeout value.
- raw_socket.settimeout(original_timeout)
-
- return ''.join(drained_data)
-
-
# vi:sts=4 sw=4 et
diff --git a/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py b/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py
index 68c2fb7f5..c7082c84a 100755..100644
--- a/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py
+++ b/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -157,7 +155,3 @@ def main():
return 2
return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())
diff --git a/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py b/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py
index b3b4d583e..028a4c6f2 100644
--- a/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py
+++ b/Tools/Scripts/webkitpy/to_be_moved/update_webgl_conformance_tests_unittest.py
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# Copyright (C) 2010 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -29,7 +28,7 @@
"""Unit tests for update_webgl_conformance_tests."""
-import unittest
+import unittest2 as unittest
from webkitpy.to_be_moved import update_webgl_conformance_tests as webgl
@@ -96,7 +95,3 @@ class TestTranslation(unittest.TestCase):
input_text = head + input_text + foot
output_text = head + output_text + foot
self.assert_translate(input_text, output_text)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/tool/bot/botinfo.py b/Tools/Scripts/webkitpy/tool/bot/botinfo.py
index b9fd938aa..11a3d40f4 100644
--- a/Tools/Scripts/webkitpy/tool/bot/botinfo.py
+++ b/Tools/Scripts/webkitpy/tool/bot/botinfo.py
@@ -29,11 +29,12 @@
# FIXME: We should consider hanging one of these off the tool object.
class BotInfo(object):
- def __init__(self, tool):
+ def __init__(self, tool, port_name):
self._tool = tool
+ self._port_name = port_name
def summary_text(self):
# bot_id is also stored on the options dictionary on the tool.
bot_id = self._tool.status_server.bot_id
bot_id_string = "Bot: %s " % (bot_id) if bot_id else ""
- return "%sPort: %s Platform: %s" % (bot_id_string, self._tool.port().name(), self._tool.platform.display_name())
+ return "%sPort: %s Platform: %s" % (bot_id_string, self._port_name, self._tool.platform.display_name())
diff --git a/Tools/Scripts/webkitpy/tool/bot/botinfo_unittest.py b/Tools/Scripts/webkitpy/tool/bot/botinfo_unittest.py
index 820ff559e..04861f452 100644
--- a/Tools/Scripts/webkitpy/tool/bot/botinfo_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/botinfo_unittest.py
@@ -26,11 +26,12 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.tool.bot.botinfo import BotInfo
from webkitpy.tool.mocktool import MockTool
from webkitpy.common.net.statusserver_mock import MockStatusServer
+from webkitpy.port.test import TestPort
class BotInfoTest(unittest.TestCase):
@@ -38,4 +39,4 @@ class BotInfoTest(unittest.TestCase):
def test_summary_text(self):
tool = MockTool()
tool.status_server = MockStatusServer("MockBotId")
- self.assertEqual(BotInfo(tool).summary_text(), "Bot: MockBotId Port: MockPort Platform: MockPlatform 1.0")
+ self.assertEqual(BotInfo(tool, 'port-name').summary_text(), "Bot: MockBotId Port: port-name Platform: MockPlatform 1.0")
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
index 491ba79da..a95c7b103 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
@@ -55,6 +55,7 @@ class CommitQueueTask(PatchAnalysisTask):
def _validate_changelog(self):
return self._run_command([
"validate-changelog",
+ "--check-oops",
"--non-interactive",
self._patch.id(),
],
@@ -88,7 +89,7 @@ class CommitQueueTask(PatchAnalysisTask):
# no one has set commit-queue- since we started working on the patch.)
if not self.validate():
return False
- # FIXME: We should understand why the land failure occured and retry if possible.
+ # FIXME: We should understand why the land failure occurred and retry if possible.
if not self._land():
return self.report_failure()
return True
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
index 2211b1de0..1eabde1b5 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
@@ -28,7 +28,7 @@
from datetime import datetime
import logging
-import unittest
+import unittest2 as unittest
from webkitpy.common.net import bugzilla
from webkitpy.common.net.layouttestresults import LayoutTestResults
@@ -124,6 +124,7 @@ class GoldenScriptError(ScriptError):
class CommitQueueTaskTest(unittest.TestCase):
def _run_through_task(self, commit_queue, expected_logs, expected_exception=None, expect_retry=False):
+ self.maxDiff = None
tool = MockTool(log_executive=True)
patch = tool.bugs.fetch_attachment(10000)
task = CommitQueueTask(commit_queue, patch)
@@ -140,7 +141,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -160,7 +161,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -218,7 +219,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_failed: failure_message='ChangeLog did not pass validation' script_error='MOCK validate failure' patch='10000'
"""
self._run_through_task(commit_queue, expected_logs, GoldenScriptError)
@@ -237,7 +238,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_failed: failure_message='Patch does not build' script_error='MOCK build failure' patch='10000'
@@ -261,7 +262,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_failed: failure_message='Patch does not build' script_error='MOCK build failure' patch='10000'
@@ -280,7 +281,7 @@ command_failed: failure_message='Unable to build without patch' script_error='MO
ScriptError("MOCK tests failure"),
])
# CommitQueueTask will only report flaky tests if we successfully parsed
- # results.html and returned a LayoutTestResults object, so we fake one.
+ # results.json and returned a LayoutTestResults object, so we fake one.
commit_queue.test_results = lambda: LayoutTestResults([])
expected_logs = """run_webkit_patch: ['clean']
command_passed: success_message='Cleaned working directory' patch='10000'
@@ -288,7 +289,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -322,7 +323,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -358,7 +359,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -372,7 +373,7 @@ command_failed: failure_message='Patch does not pass tests' script_error='MOCK t
patch = tool.bugs.fetch_attachment(10000)
task = CommitQueueTask(commit_queue, patch)
success = OutputCapture().assert_outputs(self, task.run, expected_logs=expected_logs)
- self.assertEqual(success, False)
+ self.assertFalse(success)
def test_test_failure(self):
commit_queue = MockCommitQueue([
@@ -390,7 +391,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -429,7 +430,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -472,7 +473,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -511,7 +512,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
@@ -545,7 +546,7 @@ run_webkit_patch: ['update']
command_passed: success_message='Updated working directory' patch='10000'
run_webkit_patch: ['apply-attachment', '--no-update', '--non-interactive', 10000]
command_passed: success_message='Applied patch' patch='10000'
-run_webkit_patch: ['validate-changelog', '--non-interactive', 10000]
+run_webkit_patch: ['validate-changelog', '--check-oops', '--non-interactive', 10000]
command_passed: success_message='ChangeLog validated' patch='10000'
run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
command_passed: success_message='Built patch' patch='10000'
diff --git a/Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py b/Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py
index 3cee3f059..b639856f3 100644
--- a/Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/expectedfailures_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.tool.bot.expectedfailures import ExpectedFailures
diff --git a/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py b/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
index 9d0b71408..b70a6371e 100644
--- a/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from datetime import datetime
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.thirdparty.mock import Mock
@@ -40,7 +40,7 @@ class FeedersTest(unittest.TestCase):
feeder = CommitQueueFeeder(MockTool())
expected_logs = """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
-MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
+MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.\n\nnon-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
index 7be4a4a30..b9fdf669c 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter.py
@@ -42,7 +42,8 @@ class FlakyTestReporter(object):
def __init__(self, tool, bot_name):
self._tool = tool
self._bot_name = bot_name
- self._bot_info = BotInfo(tool)
+ # FIXME: Use the real port object
+ self._bot_info = BotInfo(tool, tool.deprecated_port().name())
def _author_emails_for_test(self, flaky_test):
test_path = path_for_layout_test(flaky_test)
@@ -139,12 +140,8 @@ If you would like to track this test fix with another bug, please close this bug
bug = self._tool.bugs.fetch_bug(bug.duplicate_of())
return bug
- # Maybe this logic should move into Bugzilla? a reopen=True arg to post_comment?
def _update_bug_for_flaky_test(self, bug, latest_flake_message):
- if bug.is_closed():
- self._tool.bugs.reopen_bug(bug.id(), latest_flake_message)
- else:
- self._tool.bugs.post_comment_to_bug(bug.id(), latest_flake_message)
+ self._tool.bugs.post_comment_to_bug(bug.id(), latest_flake_message)
# This method is needed because our archive paths include a leading tmp/layout-test-results
def _find_in_archive(self, path, archive):
diff --git a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
index 48c511281..5e30a66aa 100644
--- a/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.config.committers import Committer
from webkitpy.common.system.filesystem_mock import MockFileSystem
@@ -46,7 +46,7 @@ class MockCommitInfo(object):
def author(self):
# It's definitely possible to have commits with authors who
- # are not in our committers.py list.
+ # are not in our contributors.json list.
if not self._author_email:
return None
return Committer("Mock Committer", self._author_email)
diff --git a/Tools/Scripts/webkitpy/tool/bot/irc_command.py b/Tools/Scripts/webkitpy/tool/bot/irc_command.py
index 1c061a8db..9b9915769 100644
--- a/Tools/Scripts/webkitpy/tool/bot/irc_command.py
+++ b/Tools/Scripts/webkitpy/tool/bot/irc_command.py
@@ -33,6 +33,7 @@ import re
from webkitpy.common.config import irc as config_irc
from webkitpy.common.config import urls
from webkitpy.common.config.committers import CommitterList
+from webkitpy.common.net.web import Web
from webkitpy.common.system.executive import ScriptError
from webkitpy.tool.bot.queueengine import TerminateQueue
from webkitpy.tool.grammar import join_with_separators
@@ -48,19 +49,121 @@ def _post_error_and_check_for_bug_url(tool, nicks_string, exception):
# FIXME: Merge with Command?
class IRCCommand(object):
+ usage_string = None
+ help_string = None
+
+ def execute(self, nick, args, tool, sheriff):
+ raise NotImplementedError("subclasses must implement")
+
+ @classmethod
+ def usage(cls, nick):
+ return "%s: Usage: %s" % (nick, cls.usage_string)
+
+ @classmethod
+ def help(cls, nick):
+ return "%s: %s" % (nick, cls.help_string)
+
+
+class CreateBug(IRCCommand):
+ usage_string = "create-bug BUG_TITLE"
+ help_string = "Creates a Bugzilla bug with the given title."
+
+ def execute(self, nick, args, tool, sheriff):
+ if not args:
+ return self.usage(nick)
+
+ bug_title = " ".join(args)
+ bug_description = "%s\nRequested by %s on %s." % (bug_title, nick, config_irc.channel)
+
+ # There happens to be a committers list hung off of Bugzilla, so
+ # re-using that one makes things easiest for now.
+ requester = tool.bugs.committers.contributor_by_irc_nickname(nick)
+ requester_email = requester.bugzilla_email() if requester else None
+
+ try:
+ bug_id = tool.bugs.create_bug(bug_title, bug_description, cc=requester_email, assignee=requester_email)
+ bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
+ return "%s: Created bug: %s" % (nick, bug_url)
+ except Exception, e:
+ return "%s: Failed to create bug:\n%s" % (nick, e)
+
+
+class Help(IRCCommand):
+ usage_string = "help [COMMAND]"
+ help_string = "Provides help on my individual commands."
+
+ def execute(self, nick, args, tool, sheriff):
+ if args:
+ for command_name in args:
+ if command_name in commands:
+ self._post_command_help(nick, tool, commands[command_name])
+ else:
+ tool.irc().post("%s: Available commands: %s" % (nick, ", ".join(sorted(visible_commands.keys()))))
+ tool.irc().post('%s: Type "%s: help COMMAND" for help on my individual commands.' % (nick, sheriff.name()))
+
+ def _post_command_help(self, nick, tool, command):
+ tool.irc().post(command.usage(nick))
+ tool.irc().post(command.help(nick))
+ aliases = " ".join(sorted(filter(lambda alias: commands[alias] == command and alias not in visible_commands, commands)))
+ if aliases:
+ tool.irc().post("%s: Aliases: %s" % (nick, aliases))
+
+
+class Hi(IRCCommand):
+ usage_string = "hi"
+ help_string = "Responds with hi."
+
+ def execute(self, nick, args, tool, sheriff):
+ if len(args) and re.match(sheriff.name() + r'_*\s*!\s*', ' '.join(args)):
+ return "%s: hi %s!" % (nick, nick)
+ quips = tool.bugs.quips()
+ quips.append('"Only you can prevent forest fires." -- Smokey the Bear')
+ return random.choice(quips)
+
+
+class PingPong(IRCCommand):
+ usage_string = "ping"
+ help_string = "Responds with pong."
+
def execute(self, nick, args, tool, sheriff):
- raise NotImplementedError, "subclasses must implement"
+ return nick + ": pong"
+
+
+class YouThere(IRCCommand):
+ usage_string = "yt?"
+ help_string = "Responds with yes."
+
+ def execute(self, nick, args, tool, sheriff):
+ return "%s: yes" % nick
class Restart(IRCCommand):
+ usage_string = "restart"
+ help_string = "Restarts sherrifbot. Will update its WebKit checkout, and re-join the channel momentarily."
+
def execute(self, nick, args, tool, sheriff):
tool.irc().post("Restarting...")
raise TerminateQueue()
+class RollChromiumDEPS(IRCCommand):
+ usage_string = "roll-chromium-deps REVISION"
+ help_string = "Rolls WebKit's Chromium DEPS to the given revision???"
+
+ def execute(self, nick, args, tool, sheriff):
+ if not len(args):
+ return self.usage(nick)
+ tool.irc().post("%s: Will roll Chromium DEPS to %s" % (nick, ' '.join(args)))
+ tool.irc().post("%s: Rolling Chromium DEPS to %s" % (nick, ' '.join(args)))
+ tool.irc().post("%s: Rolled Chromium DEPS to %s" % (nick, ' '.join(args)))
+ tool.irc().post("%s: Thank You" % nick)
+
+
class Rollout(IRCCommand):
- def _extract_revisions(self, arg):
+ usage_string = "rollout SVN_REVISION [SVN_REVISIONS] REASON"
+ help_string = "Opens a rollout bug, CCing author + reviewer, and attaching the reverse-diff of the given revisions marked as commit-queue=?."
+ def _extract_revisions(self, arg):
revision_list = []
possible_revisions = arg.split(",")
for revision in possible_revisions:
@@ -110,15 +213,28 @@ class Rollout(IRCCommand):
return ", ".join(target_nicks)
def _update_working_copy(self, tool):
- tool.scm().ensure_clean_working_directory(force_clean=True)
- tool.executive.run_and_throw_if_fail(tool.port().update_webkit_command(), quiet=True, cwd=tool.scm().checkout_root)
+ tool.scm().discard_local_changes()
+ tool.executive.run_and_throw_if_fail(tool.deprecated_port().update_webkit_command(), quiet=True, cwd=tool.scm().checkout_root)
+
+ def _check_diff_failure(self, error_log, tool):
+ if not error_log:
+ return None
+
+ revert_failure_message_start = error_log.find("Failed to apply reverse diff for revision")
+ if revert_failure_message_start == -1:
+ return None
+
+ lines = error_log[revert_failure_message_start:].split('\n')[1:]
+ files = itertools.takewhile(lambda line: tool.filesystem.exists(tool.scm().absolute_path(line)), lines)
+ if files:
+ return "Failed to apply reverse diff for file(s): %s" % ", ".join(files)
+ return None
def execute(self, nick, args, tool, sheriff):
svn_revision_list, rollout_reason = self._parse_args(args)
if (not svn_revision_list or not rollout_reason):
- # return is equivalent to an irc().post(), but makes for easier unit testing.
- return "%s: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON" % nick
+ return self.usage(nick)
revision_urls_string = join_with_separators([urls.view_revision_url(revision) for revision in svn_revision_list])
tool.irc().post("%s: Preparing rollout for %s ..." % (nick, revision_urls_string))
@@ -137,109 +253,60 @@ class Rollout(IRCCommand):
tool.irc().post("%s: Created rollout: %s" % (nicks_string, bug_url))
except ScriptError, e:
tool.irc().post("%s: Failed to create rollout patch:" % nicks_string)
+ diff_failure = self._check_diff_failure(e.output, tool)
+ if diff_failure:
+ return "%s: %s" % (nicks_string, diff_failure)
_post_error_and_check_for_bug_url(tool, nicks_string, e)
-class RollChromiumDEPS(IRCCommand):
- def _parse_args(self, args):
- if not args:
- return
- revision = args[0].lstrip("r")
- if not revision.isdigit():
- return
- return revision
-
- def execute(self, nick, args, tool, sheriff):
- revision = self._parse_args(args)
-
- roll_target = "r%s" % revision if revision else "last-known good revision"
- tool.irc().post("%s: Rolling Chromium DEPS to %s" % (nick, roll_target))
-
- try:
- bug_id = sheriff.post_chromium_deps_roll(revision, roll_target)
- bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
- tool.irc().post("%s: Created DEPS roll: %s" % (nick, bug_url))
- except ScriptError, e:
- match = re.search(r"Current Chromium DEPS revision \d+ is newer than \d+\.", e.output)
- if match:
- tool.irc().post("%s: %s" % (nick, match.group(0)))
- return
- tool.irc().post("%s: Failed to create DEPS roll:" % nick)
- _post_error_and_check_for_bug_url(tool, nick, e)
-
-
-class Help(IRCCommand):
- def execute(self, nick, args, tool, sheriff):
- return "%s: Available commands: %s" % (nick, ", ".join(sorted(visible_commands.keys())))
+class Whois(IRCCommand):
+ usage_string = "whois SEARCH_STRING"
+ help_string = "Searches known contributors and returns any matches with irc, email and full name. Wild card * permitted."
+ def _full_record_and_nick(self, contributor):
+ result = ''
-class Hi(IRCCommand):
- def execute(self, nick, args, tool, sheriff):
- quips = tool.bugs.quips()
- quips.append('"Only you can prevent forest fires." -- Smokey the Bear')
- return random.choice(quips)
+ if contributor.irc_nicknames:
+ result += ' (:%s)' % ', :'.join(contributor.irc_nicknames)
+ if contributor.can_review:
+ result += ' (r)'
+ elif contributor.can_commit:
+ result += ' (c)'
-class Whois(IRCCommand):
- def _nick_or_full_record(self, contributor):
- if contributor.irc_nicknames:
- return ', '.join(contributor.irc_nicknames)
- return unicode(contributor)
+ return unicode(contributor) + result
def execute(self, nick, args, tool, sheriff):
- if len(args) != 1:
- return "%s: Usage: whois SEARCH_STRING" % nick
- search_string = args[0]
+ if not args:
+ return self.usage(nick)
+ search_string = unicode(" ".join(args))
# FIXME: We should get the ContributorList off the tool somewhere.
contributors = CommitterList().contributors_by_search_string(search_string)
if not contributors:
- return "%s: Sorry, I don't know any contributors matching '%s'." % (nick, search_string)
+ return unicode("%s: Sorry, I don't know any contributors matching '%s'.") % (nick, search_string)
if len(contributors) > 5:
- return "%s: More than 5 contributors match '%s', could you be more specific?" % (nick, search_string)
+ return unicode("%s: More than 5 contributors match '%s', could you be more specific?") % (nick, search_string)
if len(contributors) == 1:
contributor = contributors[0]
if not contributor.irc_nicknames:
- return "%s: %s hasn't told me their nick. Boo hoo :-(" % (nick, contributor)
- if contributor.emails and search_string.lower() not in map(lambda email: email.lower(), contributor.emails):
- formattedEmails = ', '.join(contributor.emails)
- return "%s: %s is %s (%s). Why do you ask?" % (nick, search_string, self._nick_or_full_record(contributor), formattedEmails)
- else:
- return "%s: %s is %s. Why do you ask?" % (nick, search_string, self._nick_or_full_record(contributor))
- contributor_nicks = map(self._nick_or_full_record, contributors)
+ return unicode("%s: %s hasn't told me their nick. Boo hoo :-(") % (nick, contributor)
+ return unicode("%s: %s is %s. Why do you ask?") % (nick, search_string, self._full_record_and_nick(contributor))
+ contributor_nicks = map(self._full_record_and_nick, contributors)
contributors_string = join_with_separators(contributor_nicks, only_two_separator=" or ", last_separator=', or ')
- return "%s: I'm not sure who you mean? %s could be '%s'." % (nick, contributors_string, search_string)
-
-
-class CreateBug(IRCCommand):
- def execute(self, nick, args, tool, sheriff):
- if not args:
- return "%s: Usage: create-bug BUG_TITLE" % nick
-
- bug_title = " ".join(args)
- bug_description = "%s\nRequested by %s on %s." % (bug_title, nick, config_irc.channel)
-
- # There happens to be a committers list hung off of Bugzilla, so
- # re-using that one makes things easiest for now.
- requester = tool.bugs.committers.contributor_by_irc_nickname(nick)
- requester_email = requester.bugzilla_email() if requester else None
-
- try:
- bug_id = tool.bugs.create_bug(bug_title, bug_description, cc=requester_email, assignee=requester_email)
- bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
- return "%s: Created bug: %s" % (nick, bug_url)
- except Exception, e:
- return "%s: Failed to create bug:\n%s" % (nick, e)
+ return unicode("%s: I'm not sure who you mean? %s could be '%s'.") % (nick, contributors_string, search_string)
# FIXME: Lame. We should have an auto-registering CommandCenter.
visible_commands = {
+ "create-bug": CreateBug,
"help": Help,
"hi": Hi,
+ "ping": PingPong,
"restart": Restart,
+ "roll-chromium-deps": RollChromiumDEPS,
"rollout": Rollout,
"whois": Whois,
- "create-bug": CreateBug,
- "roll-chromium-deps": RollChromiumDEPS,
+ "yt?": YouThere,
}
# Add revert as an "easter egg" command. Why?
@@ -248,3 +315,5 @@ visible_commands = {
# people to use and it seems silly to have them hunt around for "rollout" instead.
commands = visible_commands.copy()
commands["revert"] = Rollout
+# "hello" Alias for "hi" command for the purposes of testing aliases
+commands["hello"] = Hi
diff --git a/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py b/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
index e307e6ea9..1bf26a158 100644
--- a/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py
@@ -26,12 +26,15 @@
# (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 unittest
+import os
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.bot.irc_command import *
from webkitpy.tool.mocktool import MockTool
+from webkitpy.common.net.web_mock import MockWeb
from webkitpy.common.system.executive_mock import MockExecutive
+from webkitpy.common.system.filesystem_mock import MockFileSystem
class IRCCommandTest(unittest.TestCase):
@@ -39,21 +42,23 @@ class IRCCommandTest(unittest.TestCase):
whois = Whois()
self.assertEqual("tom: Usage: whois SEARCH_STRING",
whois.execute("tom", [], None, None))
- self.assertEqual("tom: Usage: whois SEARCH_STRING",
+ self.assertEqual('tom: Adam Barth is "Adam Barth" <abarth@webkit.org> (:abarth) (r). Why do you ask?',
whois.execute("tom", ["Adam", "Barth"], None, None))
self.assertEqual("tom: Sorry, I don't know any contributors matching 'unknown@example.com'.",
whois.execute("tom", ["unknown@example.com"], None, None))
- self.assertEqual("tom: tonyg@chromium.org is tonyg-cr. Why do you ask?",
+ self.assertEqual('tom: tonyg@chromium.org is "Tony Gentilcore" <tonyg@chromium.org> (:tonyg-cr) (r). Why do you ask?',
whois.execute("tom", ["tonyg@chromium.org"], None, None))
- self.assertEqual("tom: TonyG@Chromium.org is tonyg-cr. Why do you ask?",
+ self.assertEqual('tom: TonyG@Chromium.org is "Tony Gentilcore" <tonyg@chromium.org> (:tonyg-cr) (r). Why do you ask?',
whois.execute("tom", ["TonyG@Chromium.org"], None, None))
- self.assertEqual("tom: rniwa is rniwa (rniwa@webkit.org). Why do you ask?",
+ self.assertEqual('tom: rniwa is "Ryosuke Niwa" <rniwa@webkit.org> (:rniwa) (r). Why do you ask?',
whois.execute("tom", ["rniwa"], None, None))
- self.assertEqual("tom: lopez is xan (xan.lopez@gmail.com, xan@gnome.org, xan@webkit.org, xlopez@igalia.com). Why do you ask?",
+ self.assertEqual('tom: lopez is "Xan Lopez" <xan.lopez@gmail.com> (:xan) (r). Why do you ask?',
whois.execute("tom", ["lopez"], None, None))
+ self.assertEqual(u'tom: Osztrogon\u00e1c is "Csaba Osztrogon\u00e1c" <ossy@webkit.org> (:ossy) (r). Why do you ask?',
+ whois.execute("tom", [u'Osztrogon\u00e1c'], None, None))
self.assertEqual('tom: "Vicki Murley" <vicki@apple.com> hasn\'t told me their nick. Boo hoo :-(',
whois.execute("tom", ["vicki@apple.com"], None, None))
- self.assertEqual('tom: I\'m not sure who you mean? gavinp or gbarra could be \'Gavin\'.',
+ self.assertEqual('tom: I\'m not sure who you mean? "Gavin Peters" <gavinp@chromium.org> (:gavinp) (c) or "Gavin Barraclough" <barraclough@apple.com> (:gbarra) (r) could be \'Gavin\'.',
whois.execute("tom", ["Gavin"], None, None))
self.assertEqual('tom: More than 5 contributors match \'david\', could you be more specific?',
whois.execute("tom", ["david"], None, None))
@@ -77,11 +82,6 @@ class IRCCommandTest(unittest.TestCase):
self.assertEqual("tom: Failed to create bug:\nException from bugzilla!",
create_bug.execute("tom", example_args, tool, None))
- def test_roll_chromium_deps(self):
- roll = RollChromiumDEPS()
- self.assertEqual(None, roll._parse_args([]))
- self.assertEqual("1234", roll._parse_args(["1234"]))
-
def test_rollout_updates_working_copy(self):
rollout = Rollout()
tool = MockTool()
@@ -114,4 +114,30 @@ class IRCCommandTest(unittest.TestCase):
self.assertEqual("tom: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON",
rollout.execute("tom", [], None, None))
+ tool = MockTool()
+ tool.filesystem.files["/mock-checkout/test/file/one"] = ""
+ tool.filesystem.files["/mock-checkout/test/file/two"] = ""
+ self.assertEqual("Failed to apply reverse diff for file(s): test/file/one, test/file/two",
+ rollout._check_diff_failure("""
+Preparing rollout for bug 123456.
+Updating working directory
+Failed to apply reverse diff for revision 123456 because of the following conflicts:
+test/file/one
+test/file/two
+Failed to apply reverse diff for revision 123456 because of the following conflicts:
+test/file/one
+test/file/two
+Updating OpenSource
+Current branch master is up to date.
+ """, tool))
+ self.assertEqual(None, rollout._check_diff_failure("""
+Preparing rollout for bug 123456.
+Updating working directory
+Some other error report involving file paths:
+test/file/one
+test/file/two
+Updating OpenSource
+Current branch master is up to date.
+ """, tool))
+
# FIXME: We need a better way to test IRCCommands which call tool.irc().post()
diff --git a/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py b/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py
index f96b7b6b5..7e1767023 100644
--- a/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
import random
from webkitpy.common.system.outputcapture import OutputCapture
@@ -88,8 +88,11 @@ class IRCBotTest(unittest.TestCase):
OutputCapture().assert_outputs(self, run, args=["hi"], expected_logs=expected_logs)
def test_help(self):
- expected_logs = "MOCK: irc.post: mock_nick: Available commands: create-bug, help, hi, restart, roll-chromium-deps, rollout, whois\n"
+ expected_logs = 'MOCK: irc.post: mock_nick: Available commands: create-bug, help, hi, ping, restart, roll-chromium-deps, rollout, whois, yt?\nMOCK: irc.post: mock_nick: Type "mock-sheriff-bot: help COMMAND" for help on my individual commands.\n'
OutputCapture().assert_outputs(self, run, args=["help"], expected_logs=expected_logs)
+ expected_logs = 'MOCK: irc.post: mock_nick: Usage: hi\nMOCK: irc.post: mock_nick: Responds with hi.\nMOCK: irc.post: mock_nick: Aliases: hello\n'
+ OutputCapture().assert_outputs(self, run, args=["help hi"], expected_logs=expected_logs)
+ OutputCapture().assert_outputs(self, run, args=["help hello"], expected_logs=expected_logs)
def test_restart(self):
expected_logs = "MOCK: irc.post: Restarting...\n"
@@ -103,14 +106,6 @@ class IRCBotTest(unittest.TestCase):
expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
OutputCapture().assert_outputs(self, run, args=["revert 21654 This patch broke the world"], expected_logs=expected_logs)
- def test_roll_chromium_deps(self):
- expected_logs = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to r21654\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
- OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps 21654"], expected_logs=expected_logs)
-
- def test_roll_chromium_deps_to_lkgr(self):
- expected_logs = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to last-known good revision\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
- OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps"], expected_logs=expected_logs)
-
def test_multi_rollout(self):
expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 21656 This 21654 patch broke the world"], expected_logs=expected_logs)
diff --git a/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py b/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py
index 4e09f896f..a9e53ddb2 100644
--- a/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py
+++ b/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2011 Google Inc. All rights reserved.
+# Copyright (c) 2013 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
@@ -35,31 +35,32 @@ from webkitpy.tool.steps.runtests import RunTests
_log = logging.getLogger(__name__)
+# FIXME: This class no longer has a clear purpose, and should probably
+# be made part of Port, or renamed to LayoutTestResultsArchiver or something more fitting?
class LayoutTestResultsReader(object):
- def __init__(self, tool, archive_directory):
- self._tool = tool
+ def __init__(self, host, results_directory, archive_directory):
+ self._host = host
+ self._results_directory = results_directory
self._archive_directory = archive_directory
# FIXME: This exists for mocking, but should instead be mocked via
- # tool.filesystem.read_text_file. They have different error handling at the moment.
+ # host.filesystem.read_text_file. They have different error handling at the moment.
def _read_file_contents(self, path):
try:
- return self._tool.filesystem.read_text_file(path)
+ return self._host.filesystem.read_text_file(path)
except IOError, e: # File does not exist or can't be read.
return None
# FIXME: This logic should move to the port object.
def _create_layout_test_results(self):
- results_path = self._tool.port().layout_tests_results_path()
+ results_path = self._host.filesystem.join(self._results_directory, "full_results.json")
results_html = self._read_file_contents(results_path)
if not results_html:
return None
return LayoutTestResults.results_from_string(results_html)
def _create_unit_test_results(self):
- results_path = self._tool.port().unit_tests_results_path()
- if not results_path:
- return None
+ results_path = self._host.filesystem.join(self._results_directory, "webkit_unit_tests_output.xml")
results_xml = self._read_file_contents(results_path)
if not results_xml:
return None
@@ -69,36 +70,28 @@ class LayoutTestResultsReader(object):
layout_test_results = self._create_layout_test_results()
unit_test_results = self._create_unit_test_results()
if layout_test_results:
- # FIXME: We should not have to set failure_limit_count, but we
- # do until run-webkit-tests can be updated save off the value
- # of --exit-after-N-failures in results.html/results.json.
- # https://bugs.webkit.org/show_bug.cgi?id=58481
+ # FIXME: This is used to detect if we had N failures due to
+ # N tests failing, or if we hit the "exit-after-n-failures" limit.
+ # These days we could just check for the "interrupted" key in results.json instead!
layout_test_results.set_failure_limit_count(RunTests.NON_INTERACTIVE_FAILURE_LIMIT_COUNT)
if unit_test_results:
layout_test_results.add_unit_test_failures(unit_test_results)
return layout_test_results
- def _results_directory(self):
- results_path = self._tool.port().layout_tests_results_path()
- # FIXME: This is wrong in two ways:
- # 1. It assumes that results.html is at the top level of the results tree.
- # 2. This uses the "old" ports.py infrastructure instead of the new layout_tests/port
- # which will not support Chromium. However the new arch doesn't work with old-run-webkit-tests
- # so we have to use this for now.
- return self._tool.filesystem.dirname(results_path)
-
def archive(self, patch):
- results_directory = self._results_directory()
- results_name, _ = self._tool.filesystem.splitext(self._tool.filesystem.basename(results_directory))
+ filesystem = self._host.filesystem
+ workspace = self._host.workspace
+ results_directory = self._results_directory
+ results_name, _ = filesystem.splitext(filesystem.basename(results_directory))
# Note: We name the zip with the bug_id instead of patch_id to match work_item_log_path().
- zip_path = self._tool.workspace.find_unused_filename(self._archive_directory, "%s-%s" % (patch.bug_id(), results_name), "zip")
+ zip_path = workspace.find_unused_filename(self._archive_directory, "%s-%s" % (patch.bug_id(), results_name), "zip")
if not zip_path:
return None
- if not self._tool.filesystem.isdir(results_directory):
+ if not filesystem.isdir(results_directory):
_log.info("%s does not exist, not archiving." % results_directory)
return None
- archive = self._tool.workspace.create_zip(zip_path, results_directory)
+ archive = workspace.create_zip(filesystem.abspath(zip_path), filesystem.abspath(results_directory))
# Remove the results directory to prevent http logs, etc. from getting huge between runs.
# We could have create_zip remove the original, but this is more explicit.
- self._tool.filesystem.rmtree(results_directory)
+ filesystem.rmtree(results_directory)
return archive
diff --git a/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py b/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py
index 6079632bd..c779bb8df 100644
--- a/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py
@@ -26,32 +26,33 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.net.layouttestresults import LayoutTestResults
-from webkitpy.tool.bot.layouttestresultsreader import *
-from webkitpy.tool.mocktool import MockTool
+from webkitpy.common.host_mock import MockHost
+
+from .layouttestresultsreader import LayoutTestResultsReader
class LayoutTestResultsReaderTest(unittest.TestCase):
def test_missing_layout_test_results(self):
- tool = MockTool()
- reader = LayoutTestResultsReader(tool, "/var/logs")
+ host = MockHost()
+ reader = LayoutTestResultsReader(host, "/mock-results", "/var/logs")
layout_tests_results_path = '/mock-results/full_results.json'
unit_tests_results_path = '/mock-results/webkit_unit_tests_output.xml'
- tool.filesystem = MockFileSystem({layout_tests_results_path: None,
+ host.filesystem = MockFileSystem({layout_tests_results_path: None,
unit_tests_results_path: None})
# Make sure that our filesystem mock functions as we expect.
- self.assertRaises(IOError, tool.filesystem.read_text_file, layout_tests_results_path)
- self.assertRaises(IOError, tool.filesystem.read_text_file, unit_tests_results_path)
- # layout_test_results shouldn't raise even if the results.html file is missing.
- self.assertEqual(reader.results(), None)
+ self.assertRaises(IOError, host.filesystem.read_text_file, layout_tests_results_path)
+ self.assertRaises(IOError, host.filesystem.read_text_file, unit_tests_results_path)
+ # layout_test_results shouldn't raise even if the results.json file is missing.
+ self.assertIsNone(reader.results())
def test_create_unit_test_results(self):
- tool = MockTool()
- reader = LayoutTestResultsReader(tool, "/var/logs")
+ host = MockHost()
+ reader = LayoutTestResultsReader(host, "/mock-results", "/var/logs")
unit_tests_results_path = '/mock-results/webkit_unit_tests_output.xml'
no_failures_xml = """<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="3" failures="0" disabled="0" errors="0" time="11.35" name="AllTests">
@@ -61,45 +62,59 @@ class LayoutTestResultsReaderTest(unittest.TestCase):
<testcase name="CrashIfSettingUnsetRowIndex" status="run" time="0.123" classname="RenderTableCellDeathTest" />
</testsuite>
</testsuites>"""
- tool.filesystem = MockFileSystem({unit_tests_results_path: no_failures_xml})
+ host.filesystem = MockFileSystem({unit_tests_results_path: no_failures_xml})
self.assertEqual(reader._create_unit_test_results(), [])
def test_missing_unit_test_results_path(self):
- tool = MockTool()
- tool.port().unit_tests_results_path = lambda: None
- reader = LayoutTestResultsReader(tool, "/var/logs")
+ host = MockHost()
+ reader = LayoutTestResultsReader(host, "/mock-results", "/var/logs")
reader._create_layout_test_results = lambda: LayoutTestResults([])
+ reader._create_unit_test_results = lambda: None
# layout_test_results shouldn't raise even if the unit tests xml file is missing.
- self.assertNotEquals(reader.results(), None)
+ self.assertIsNotNone(reader.results(), None)
self.assertEqual(reader.results().failing_tests(), [])
def test_layout_test_results(self):
- reader = LayoutTestResultsReader(MockTool(), "/var/logs")
+ reader = LayoutTestResultsReader(MockHost(), "/mock-results", "/var/logs")
reader._read_file_contents = lambda path: None
- self.assertEqual(reader.results(), None)
+ self.assertIsNone(reader.results())
reader._read_file_contents = lambda path: ""
- self.assertEqual(reader.results(), None)
+ self.assertIsNone(reader.results())
reader._create_layout_test_results = lambda: LayoutTestResults([])
results = reader.results()
- self.assertNotEquals(results, None)
+ self.assertIsNotNone(results)
self.assertEqual(results.failure_limit_count(), 30) # This value matches RunTests.NON_INTERACTIVE_FAILURE_LIMIT_COUNT
def test_archive_last_layout_test_results(self):
- tool = MockTool()
- reader = LayoutTestResultsReader(tool, "/var/logs")
- patch = tool.bugs.fetch_attachment(10001)
- tool.filesystem = MockFileSystem()
+ host = MockHost()
+ results_directory = "/mock-results"
+ reader = LayoutTestResultsReader(host, results_directory, "/var/logs")
+ patch = host.bugs.fetch_attachment(10001)
+ host.filesystem = MockFileSystem()
# Should fail because the results_directory does not exist.
expected_logs = "/mock-results does not exist, not archiving.\n"
archive = OutputCapture().assert_outputs(self, reader.archive, [patch], expected_logs=expected_logs)
- self.assertEqual(archive, None)
+ self.assertIsNone(archive)
- results_directory = "/mock-results"
- # Sanity check what we assume our mock results directory is.
- self.assertEqual(reader._results_directory(), results_directory)
- tool.filesystem.maybe_make_directory(results_directory)
- self.assertTrue(tool.filesystem.exists(results_directory))
+ host.filesystem.maybe_make_directory(results_directory)
+ self.assertTrue(host.filesystem.exists(results_directory))
+
+ self.assertIsNotNone(reader.archive(patch))
+ self.assertFalse(host.filesystem.exists(results_directory))
- self.assertNotEqual(reader.archive(patch), None)
- self.assertFalse(tool.filesystem.exists(results_directory))
+ def test_archive_last_layout_test_results_with_relative_path(self):
+ host = MockHost()
+ results_directory = "/mock-checkout/layout-test-results"
+
+ host.filesystem.maybe_make_directory(results_directory)
+ host.filesystem.maybe_make_directory('/var/logs')
+ self.assertTrue(host.filesystem.exists(results_directory))
+
+ host.filesystem.chdir('/var')
+ reader = LayoutTestResultsReader(host, results_directory, 'logs')
+ patch = host.bugs.fetch_attachment(10001)
+ # Should fail because the results_directory does not exist.
+ self.assertIsNotNone(reader.archive(patch))
+ self.assertEqual(host.workspace.source_path, results_directory)
+ self.assertEqual(host.workspace.zip_path, '/var/logs/50000-layout-test-results.zip')
diff --git a/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py b/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py
index cde1c842e..b01c6c7e2 100644
--- a/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py
+++ b/Tools/Scripts/webkitpy/tool/bot/patchanalysistask.py
@@ -192,7 +192,7 @@ class PatchAnalysisTask(object):
return True
if self._test():
- # Only report flaky tests if we were successful at parsing results.html and archiving results.
+ # Only report flaky tests if we were successful at parsing results.json and archiving results.
if first_results and first_results_archive:
self._report_flaky_tests(first_results.failing_test_results(), first_results_archive)
return True
diff --git a/Tools/Scripts/webkitpy/tool/bot/queueengine.py b/Tools/Scripts/webkitpy/tool/bot/queueengine.py
index 6d5576e28..90e553f86 100644
--- a/Tools/Scripts/webkitpy/tool/bot/queueengine.py
+++ b/Tools/Scripts/webkitpy/tool/bot/queueengine.py
@@ -69,15 +69,14 @@ class QueueEngineDelegate:
class QueueEngine:
- def __init__(self, name, delegate, wakeup_event):
+ def __init__(self, name, delegate, wakeup_event, seconds_to_sleep=120):
self._name = name
self._delegate = delegate
self._wakeup_event = wakeup_event
self._output_tee = OutputTee()
+ self._seconds_to_sleep = seconds_to_sleep
log_date_format = "%Y-%m-%d %H:%M:%S"
- sleep_duration_text = "2 mins" # This could be generated from seconds_to_sleep
- seconds_to_sleep = 120
handled_error_code = 2
# Child processes exit with a special code to the parent queue process can detect the error was handled.
@@ -153,10 +152,14 @@ class QueueEngine:
return datetime.now()
def _sleep_message(self, message):
- wake_time = self._now() + timedelta(seconds=self.seconds_to_sleep)
- return "%s Sleeping until %s (%s)." % (message, wake_time.strftime(self.log_date_format), self.sleep_duration_text)
+ wake_time = self._now() + timedelta(seconds=self._seconds_to_sleep)
+ if self._seconds_to_sleep < 3 * 60:
+ sleep_duration_text = str(self._seconds_to_sleep) + ' seconds'
+ else:
+ sleep_duration_text = str(round(self._seconds_to_sleep / 60)) + ' minutes'
+ return "%s Sleeping until %s (%s)." % (message, wake_time.strftime(self.log_date_format), sleep_duration_text)
def _sleep(self, message):
_log.info(self._sleep_message(message))
- self._wakeup_event.wait(self.seconds_to_sleep)
+ self._wakeup_event.wait(self._seconds_to_sleep)
self._wakeup_event.clear()
diff --git a/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py b/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py
index 0ee8b5ad8..de9fa2398 100644
--- a/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/queueengine_unittest.py
@@ -31,7 +31,7 @@ import os
import shutil
import tempfile
import threading
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.outputcapture import OutputCapture
@@ -168,12 +168,12 @@ class QueueEngineTest(unittest.TestCase):
def test_now(self):
"""Make sure there are no typos in the QueueEngine.now() method."""
engine = QueueEngine("test", None, None)
- self.assertTrue(isinstance(engine._now(), datetime.datetime))
+ self.assertIsInstance(engine._now(), datetime.datetime)
def test_sleep_message(self):
engine = QueueEngine("test", None, None)
engine._now = lambda: datetime.datetime(2010, 1, 1)
- expected_sleep_message = "MESSAGE Sleeping until 2010-01-01 00:02:00 (2 mins)."
+ expected_sleep_message = "MESSAGE Sleeping until 2010-01-01 00:02:00 (120 seconds)."
self.assertEqual(engine._sleep_message("MESSAGE"), expected_sleep_message)
def setUp(self):
@@ -181,7 +181,3 @@ class QueueEngineTest(unittest.TestCase):
def tearDown(self):
shutil.rmtree(self.temp_dir)
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/tool/bot/sheriff.py b/Tools/Scripts/webkitpy/tool/bot/sheriff.py
index b4e95aec0..9ef487537 100644
--- a/Tools/Scripts/webkitpy/tool/bot/sheriff.py
+++ b/Tools/Scripts/webkitpy/tool/bot/sheriff.py
@@ -36,6 +36,9 @@ class Sheriff(object):
self._tool = tool
self._sheriffbot = sheriffbot
+ def name(self):
+ return self._sheriffbot.name
+
def responsible_nicknames_from_commit_info(self, commit_info):
nestedList = [party.irc_nicknames for party in commit_info.responsible_parties() if party.irc_nicknames]
return reduce(lambda list, childList: list + childList, nestedList)
@@ -88,18 +91,6 @@ class Sheriff(object):
])
return urls.parse_bug_id(output)
- def post_chromium_deps_roll(self, revision, revision_name):
- args = [
- "post-chromium-deps-roll",
- "--force-clean",
- "--non-interactive",
- "--parent-command=sheriff-bot",
- ]
- # revision can be None, but revision_name is always something meaningful.
- args += [revision, revision_name]
- output = self._sheriffbot.run_webkit_patch(args)
- return urls.parse_bug_id(output)
-
def post_blame_comment_on_bug(self, commit_info, builders, tests):
if not commit_info.bug_id():
return
diff --git a/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py b/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py
index 02fc03608..cf989c9ce 100644
--- a/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.buildbot import Builder
from webkitpy.common.system.outputcapture import OutputCapture
diff --git a/Tools/Scripts/webkitpy/tool/commands/__init__.py b/Tools/Scripts/webkitpy/tool/commands/__init__.py
index 45711815e..a584ee037 100644
--- a/Tools/Scripts/webkitpy/tool/commands/__init__.py
+++ b/Tools/Scripts/webkitpy/tool/commands/__init__.py
@@ -5,11 +5,11 @@ from webkitpy.tool.commands.analyzechangelog import AnalyzeChangeLog
from webkitpy.tool.commands.applywatchlistlocal import ApplyWatchListLocal
from webkitpy.tool.commands.bugfortest import BugForTest
from webkitpy.tool.commands.bugsearch import BugSearch
-from webkitpy.tool.commands.chromechannels import ChromeChannels
from webkitpy.tool.commands.download import *
-from webkitpy.tool.commands.earlywarningsystem import *
+from webkitpy.tool.commands.earlywarningsystem import AbstractEarlyWarningSystem
from webkitpy.tool.commands.findusers import FindUsers
from webkitpy.tool.commands.gardenomatic import GardenOMatic
+from webkitpy.tool.commands.newcommitbot import NewCommitBot
from webkitpy.tool.commands.openbugs import OpenBugs
from webkitpy.tool.commands.perfalizer import Perfalizer
from webkitpy.tool.commands.prettydiff import PrettyDiff
@@ -17,7 +17,8 @@ from webkitpy.tool.commands.queries import *
from webkitpy.tool.commands.queues import *
from webkitpy.tool.commands.rebaseline import Rebaseline
from webkitpy.tool.commands.rebaselineserver import RebaselineServer
-from webkitpy.tool.commands.roll import *
from webkitpy.tool.commands.sheriffbot import *
from webkitpy.tool.commands.upload import *
from webkitpy.tool.commands.suggestnominations import *
+
+AbstractEarlyWarningSystem.load_ews_classes()
diff --git a/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py b/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py
index 0a7788c11..25a36ce0b 100644
--- a/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py
+++ b/Tools/Scripts/webkitpy/tool/commands/abstractlocalservercommand.py
@@ -25,10 +25,10 @@
from optparse import make_option
import threading
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
-class AbstractLocalServerCommand(AbstractDeclarativeCommand):
+class AbstractLocalServerCommand(Command):
server = None
launch_path = "/"
@@ -37,7 +37,7 @@ class AbstractLocalServerCommand(AbstractDeclarativeCommand):
make_option("--httpd-port", action="store", type="int", default=8127, help="Port to use for the HTTP server"),
make_option("--no-show-results", action="store_false", default=True, dest="show_results", help="Don't launch a browser with the rebaseline server"),
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
def _prepare_config(self, options, args, tool):
return None
@@ -53,5 +53,5 @@ class AbstractLocalServerCommand(AbstractDeclarativeCommand):
# FIXME: This seems racy.
threading.Timer(0.1, lambda: self._tool.user.open_url(server_url)).start()
- httpd = self.server(httpd_port=options.httpd_port, config=config) # pylint: disable-msg=E1102
+ httpd = self.server(httpd_port=options.httpd_port, config=config) # pylint: disable=E1102
httpd.serve_forever()
diff --git a/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py b/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py
index 0593f2cfc..fcc76ca14 100644
--- a/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py
+++ b/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py
@@ -30,16 +30,16 @@ import logging
from webkitpy.common.system.executive import ScriptError
from webkitpy.tool.commands.stepsequence import StepSequence
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
_log = logging.getLogger(__name__)
-class AbstractSequencedCommand(AbstractDeclarativeCommand):
+class AbstractSequencedCommand(Command):
steps = None
def __init__(self):
self._sequence = StepSequence(self.steps)
- AbstractDeclarativeCommand.__init__(self, self._sequence.options())
+ Command.__init__(self, self._sequence.options())
def _prepare_state(self, options, args, tool):
return None
diff --git a/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py b/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py
index 22869584d..25e719f61 100644
--- a/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py
+++ b/Tools/Scripts/webkitpy/tool/commands/adduserstogroups.py
@@ -26,10 +26,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
-class AddUsersToGroups(AbstractDeclarativeCommand):
+class AddUsersToGroups(Command):
name = "add-users-to-groups"
help_text = "Add users matching subtring to specified groups"
diff --git a/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py b/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
index b88b61f55..1a1e810de 100644
--- a/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
+++ b/Tools/Scripts/webkitpy/tool/commands/analyzechangelog.py
@@ -35,11 +35,11 @@ from webkitpy.common.checkout.changelog import ChangeLog
from webkitpy.common.config.contributionareas import ContributionAreas
from webkitpy.common.system.filesystem import FileSystem
from webkitpy.common.system.executive import Executive
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
from webkitpy.tool import steps
-class AnalyzeChangeLog(AbstractDeclarativeCommand):
+class AnalyzeChangeLog(Command):
name = "analyze-changelog"
help_text = "Experimental command for analyzing change logs."
long_help = "This command parses changelogs in a specified directory and summarizes the result as JSON files."
@@ -48,7 +48,7 @@ class AnalyzeChangeLog(AbstractDeclarativeCommand):
options = [
steps.Options.changelog_count,
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
@staticmethod
def _enumerate_changelogs(filesystem, dirname, changelog_count):
@@ -180,6 +180,7 @@ class ChangeLogAnalyzer(object):
def _analyze_entries(self, entries, changelog_path):
dirname = self._filesystem.dirname(changelog_path)
+ i = 0
for i, entry in enumerate(entries):
self._print_status('(%s) entries' % i)
assert(entry.authors())
@@ -201,6 +202,5 @@ class ChangeLogAnalyzer(object):
self._summary['reviewed' if reviewers_for_entry else 'unreviewed'] += 1
- i += 1
self._print_status('(%s) entries' % i)
return i
diff --git a/Tools/Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py b/Tools/Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py
index 661d2d85f..9c13740a2 100644
--- a/Tools/Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py
@@ -36,7 +36,7 @@ from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.commands.analyzechangelog import AnalyzeChangeLog
from webkitpy.tool.commands.analyzechangelog import ChangeLogAnalyzer
from webkitpy.tool.commands.commandtest import CommandsTest
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
class AnalyzeChangeLogTest(CommandsTest):
diff --git a/Tools/Scripts/webkitpy/tool/commands/bugfortest.py b/Tools/Scripts/webkitpy/tool/commands/bugfortest.py
index 36aa6b5f1..f6f84115e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/bugfortest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/bugfortest.py
@@ -26,14 +26,14 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
from webkitpy.tool.bot.flakytestreporter import FlakyTestReporter
# This is mostly a command for testing FlakyTestReporter, however
# it could be easily expanded to auto-create bugs, etc. if another
# command outside of webkitpy wanted to use it.
-class BugForTest(AbstractDeclarativeCommand):
+class BugForTest(Command):
name = "bug-for-test"
help_text = "Finds the bugzilla bug for a given test"
diff --git a/Tools/Scripts/webkitpy/tool/commands/bugsearch.py b/Tools/Scripts/webkitpy/tool/commands/bugsearch.py
index a1d74c548..1f3af7a70 100644
--- a/Tools/Scripts/webkitpy/tool/commands/bugsearch.py
+++ b/Tools/Scripts/webkitpy/tool/commands/bugsearch.py
@@ -26,10 +26,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
-class BugSearch(AbstractDeclarativeCommand):
+class BugSearch(Command):
name = "bug-search"
help_text = "List bugs matching a query"
argument_names = "QUERY"
diff --git a/Tools/Scripts/webkitpy/tool/commands/chromechannels.py b/Tools/Scripts/webkitpy/tool/commands/chromechannels.py
deleted file mode 100644
index da093b48c..000000000
--- a/Tools/Scripts/webkitpy/tool/commands/chromechannels.py
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright (c) 2012 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.
-
-from optparse import make_option
-
-from webkitpy.common.net.omahaproxy import OmahaProxy
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
-
-import re
-
-
-class ChromeChannels(AbstractDeclarativeCommand):
- name = "chrome-channels"
- help_text = "List which chrome channels include the patches in bugs returned by QUERY."
- argument_names = "QUERY"
- long_help = """Retrieves the current list of Chrome releases from omahaproxy.appspot.com,
-and then runs the bugzilla quicksearch QUERY on bugs.bugzilla.org. For each bug
-returned by query, a single svn commit is deduced, and a short summary is
-printed of each bug listing which Chrome channels contain each bugs associated
-commit.
-
-The QUERY can be as simple as a bug number, or a comma delimited list of bug
-numbers. See https://bugzilla.mozilla.org/page.cgi?id=quicksearch.html for full
-documentation on the query format."""
-
- chrome_channels = OmahaProxy.chrome_channels
- commited_pattern = "Committed r([0-9]+): <http://trac.webkit.org/changeset/\\1>"
- rollout_pattern = "Rolled out in http://trac.webkit.org/changeset/[0-9]+"
-
- def __init__(self):
- AbstractDeclarativeCommand.__init__(self)
- self._re_committed = re.compile(self.commited_pattern)
- self._re_rollout = re.compile(self.rollout_pattern)
- self._omahaproxy = OmahaProxy()
-
- def _channels_for_bug(self, revisions, bug):
- comments = bug.comments()
- commit = None
-
- # Scan the comments, looking for a sane list of commits and rollbacks.
- for comment in comments:
- commit_match = self._re_committed.search(comment['text'])
- if commit_match:
- if commit:
- return "%5s %s\n... has too confusing a commit history to parse, skipping\n" % (bug.id(), bug.title())
- commit = int(commit_match.group(1))
- if self._re_rollout.search(comment['text']):
- commit = None
- if not commit:
- return "%5s %s\n... does not appear to have an associated commit.\n" % (bug.id(), bug.title())
-
- # We now know that we have a commit, so gather up the list of platforms
- # by channel, then print.
- by_channel = {}
- for revision in revisions:
- channel = revision['channel']
- if revision['commit'] < commit:
- continue
- if not channel in by_channel:
- by_channel[revision['channel']] = " %6s:" % channel
- by_channel[channel] += " %s," % revision['platform']
- if not by_channel:
- return "%5s %s (r%d)\n... not yet released in any Chrome channels.\n" % (bug.id(), bug.title(), commit)
- retval = "%5s %s (r%d)\n" % (bug.id(), bug.title(), commit)
- for channel in self.chrome_channels:
- if channel in by_channel:
- retval += by_channel[channel][:-1]
- retval += "\n"
- return retval
-
- def execute(self, options, args, tool):
- search_string = args[0]
- revisions = self._omahaproxy.get_revisions()
- bugs = tool.bugs.queries.fetch_bugs_matching_quicksearch(search_string)
- if not bugs:
- print "No bugs found matching '%s'" % search_string
- return
- for bug in bugs:
- print self._channels_for_bug(revisions, bug),
diff --git a/Tools/Scripts/webkitpy/tool/commands/chromechannels_unittest.py b/Tools/Scripts/webkitpy/tool/commands/chromechannels_unittest.py
deleted file mode 100644
index 037aebbfe..000000000
--- a/Tools/Scripts/webkitpy/tool/commands/chromechannels_unittest.py
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright (c) 2012 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.
-
-from webkitpy.tool.commands.chromechannels import ChromeChannels
-from webkitpy.tool.commands.commandtest import CommandsTest
-from webkitpy.tool.mocktool import MockTool
-from webkitpy.common.net.omahaproxy import OmahaProxy
-
-
-class MockOmahaProxy(OmahaProxy):
- revisions = [{"commit": 20, "channel": "canary", "platform": "Mac", "date": "07/04/76"},
- {"commit": 20, "channel": "canary", "platform": "Windows", "date": "07/04/76"},
- {"commit": 25, "channel": "dev", "platform": "Mac", "date": "07/01/76"},
- {"commit": 30, "channel": "dev", "platform": "Windows", "date": "03/29/82"},
- {"commit": 30, "channel": "dev", "platform": "Linux", "date": "03/29/82"},
- {"commit": 15, "channel": "beta", "platform": "Windows", "date": "07/04/67"},
- {"commit": 15, "channel": "beta", "platform": "Linux", "date": "07/04/67"},
- {"commit": 10, "channel": "stable", "platform": "Windows", "date": "07/01/67"},
- {"commit": 20, "channel": "stable", "platform": "Linux", "date": "09/16/10"},
- ]
-
- def get_revisions(self):
- return self.revisions
-
-
-class TestableChromeChannels(ChromeChannels):
- def __init__(self):
- ChromeChannels.__init__(self)
- self._omahaproxy = MockOmahaProxy()
-
-
-class ChromeChannelsTest(CommandsTest):
-
- single_bug_expectations = {
- 50001: """50001 Bug with a patch needing review. (r35)
-... not yet released in any Chrome channels.
-""",
- 50002: """50002 The third bug
-... has too confusing a commit history to parse, skipping
-""",
- 50003: """50003 The fourth bug
-... does not appear to have an associated commit.
-""",
- 50004: """50004 The fifth bug (r15)
- canary: Mac, Windows
- dev: Mac, Windows, Linux
- beta: Windows, Linux
- stable: Linux
-"""}
-
- def test_single_bug(self):
- testable_chrome_channels = TestableChromeChannels()
- tool = MockTool()
- testable_chrome_channels.bind_to_tool(tool)
- revisions = testable_chrome_channels._omahaproxy.get_revisions()
- for bug_id, expectation in self.single_bug_expectations.items():
- self.assertEqual(testable_chrome_channels._channels_for_bug(revisions, testable_chrome_channels._tool.bugs.fetch_bug(bug_id)),
- expectation)
-
- def test_with_query(self):
- expected_stdout = \
-"""50001 Bug with a patch needing review. (r35)
-... not yet released in any Chrome channels.
-50002 The third bug
-... has too confusing a commit history to parse, skipping
-50003 The fourth bug
-... does not appear to have an associated commit.
-50004 The fifth bug (r15)
- canary: Mac, Windows
- dev: Mac, Windows, Linux
- beta: Windows, Linux
- stable: Linux
-"""
- self.assert_execute_outputs(TestableChromeChannels(), ["foo"], expected_stdout=expected_stdout)
diff --git a/Tools/Scripts/webkitpy/tool/commands/commandtest.py b/Tools/Scripts/webkitpy/tool/commands/commandtest.py
index 65f45b58f..655c33fda 100644
--- a/Tools/Scripts/webkitpy/tool/commands/commandtest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/commandtest.py
@@ -42,6 +42,7 @@ class CommandsTest(TestCase):
options.obsolete_patches = True
options.open_bug = True
options.port = 'MOCK port'
+ options.update_changelogs = False
options.quiet = True
options.reviewer = 'MOCK reviewer'
command.bind_to_tool(tool)
diff --git a/Tools/Scripts/webkitpy/tool/commands/download.py b/Tools/Scripts/webkitpy/tool/commands/download.py
index bdd780d2c..85f576928 100644
--- a/Tools/Scripts/webkitpy/tool/commands/download.py
+++ b/Tools/Scripts/webkitpy/tool/commands/download.py
@@ -38,7 +38,7 @@ from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCom
from webkitpy.tool.commands.stepsequence import StepSequence
from webkitpy.tool.comments import bug_comment_from_commit_text
from webkitpy.tool.grammar import pluralize
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
_log = logging.getLogger(__name__)
@@ -47,7 +47,7 @@ class Clean(AbstractSequencedCommand):
name = "clean"
help_text = "Clean the working copy"
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
]
def _prepare_state(self, options, args, tool):
@@ -58,7 +58,7 @@ class Update(AbstractSequencedCommand):
name = "update"
help_text = "Update working copy (used internally)"
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
]
@@ -67,7 +67,7 @@ class Build(AbstractSequencedCommand):
name = "build"
help_text = "Update working copy and build"
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.Build,
]
@@ -80,7 +80,7 @@ class BuildAndTest(AbstractSequencedCommand):
name = "build-and-test"
help_text = "Update working copy, build, and run the tests"
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.Build,
steps.RunTests,
@@ -114,8 +114,9 @@ If a bug id is provided, or one can be found in the ChangeLog land will update t
}
-class LandCowboy(AbstractSequencedCommand):
- name = "land-cowboy"
+class LandCowhand(AbstractSequencedCommand):
+ # Gender-blind term for cowboy, see: http://en.wiktionary.org/wiki/cowhand
+ name = "land-cowhand"
help_text = "Prepares a ChangeLog and lands the current working directory diff."
steps = [
steps.PrepareChangeLog,
@@ -132,9 +133,12 @@ class LandCowboy(AbstractSequencedCommand):
options.check_style_filter = "-changelog"
-class LandCowhand(LandCowboy):
- # Gender-blind term for cowboy, see: http://en.wiktionary.org/wiki/cowhand
- name = "land-cowhand"
+class LandCowboy(LandCowhand):
+ name = "land-cowboy"
+
+ def _prepare_state(self, options, args, tool):
+ _log.warning("land-cowboy is deprecated, use land-cowhand instead.")
+ LandCowhand._prepare_state(self, options, args, tool)
class CheckStyleLocal(AbstractSequencedCommand):
@@ -145,11 +149,11 @@ class CheckStyleLocal(AbstractSequencedCommand):
]
-class AbstractPatchProcessingCommand(AbstractDeclarativeCommand):
+class AbstractPatchProcessingCommand(Command):
# Subclasses must implement the methods below. We don't declare them here
# because we want to be able to implement them with mix-ins.
#
- # pylint: disable-msg=E1101
+ # pylint: disable=E1101
# def _fetch_list_of_patches_to_process(self, options, args, tool):
# def _prepare_to_process(self, options, args, tool):
# def _process_patch(self, options, args, tool):
@@ -185,12 +189,22 @@ class AbstractPatchSequencingCommand(AbstractPatchProcessingCommand):
AbstractPatchProcessingCommand.__init__(self, options)
def _prepare_to_process(self, options, args, tool):
- self._prepare_sequence.run_and_handle_errors(tool, options)
+ try:
+ self.state = self._prepare_state(options, args, tool)
+ except ScriptError, e:
+ _log.error(e.message_with_output())
+ self._exit(e.exit_code or 2)
+ self._prepare_sequence.run_and_handle_errors(tool, options, self.state)
def _process_patch(self, patch, options, args, tool):
- state = { "patch" : patch }
+ state = {}
+ state.update(self.state or {})
+ state["patch"] = patch
self._main_sequence.run_and_handle_errors(tool, options, state)
+ def _prepare_state(self, options, args, tool):
+ return None
+
class ProcessAttachmentsMixin(object):
def _fetch_list_of_patches_to_process(self, options, args, tool):
@@ -235,7 +249,7 @@ class CheckStyle(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
help_text = "Run check-webkit-style on the specified attachments"
argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
main_steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.ApplyPatch,
steps.CheckStyle,
@@ -247,7 +261,7 @@ class BuildAttachment(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
help_text = "Apply and build patches from bugzilla"
argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
main_steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.ApplyPatch,
steps.Build,
@@ -259,7 +273,7 @@ class BuildAndTestAttachment(AbstractPatchSequencingCommand, ProcessAttachmentsM
help_text = "Apply, build, and test patches from bugzilla"
argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
main_steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.ApplyPatch,
steps.Build,
@@ -270,7 +284,7 @@ class BuildAndTestAttachment(AbstractPatchSequencingCommand, ProcessAttachmentsM
class AbstractPatchApplyingCommand(AbstractPatchSequencingCommand):
prepare_steps = [
steps.EnsureLocalCommitIfNeeded,
- steps.CleanWorkingDirectoryWithLocalCommits,
+ steps.CleanWorkingDirectory,
steps.Update,
]
main_steps = [
@@ -299,7 +313,7 @@ class ApplyWatchList(AbstractPatchSequencingCommand, ProcessAttachmentsMixin):
help_text = "Applies the watchlist to the specified attachments"
argument_names = "ATTACHMENT_ID [ATTACHMENT_IDS]"
main_steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.ApplyPatch,
steps.ApplyWatchList,
@@ -310,7 +324,7 @@ Downloads the attachment, applies it locally, runs the watchlist against it, and
class AbstractPatchLandingCommand(AbstractPatchSequencingCommand):
main_steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.ApplyPatch,
steps.ValidateChangeLogs,
@@ -413,7 +427,7 @@ Applies the inverse diff for the provided revision(s).
Creates an appropriate rollout ChangeLog, including a trac link and bug link.
"""
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.RevertRevision,
steps.PrepareChangeLogForRevert,
@@ -424,7 +438,7 @@ class CreateRollout(AbstractRolloutPrepCommand):
name = "create-rollout"
help_text = "Creates a bug to track the broken SVN revision(s) and uploads a rollout patch."
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.RevertRevision,
steps.CreateBug,
@@ -470,7 +484,7 @@ Opens the generated ChangeLogs in $EDITOR.
Shows the prepared diff for confirmation.
Commits the revert and updates the bug (including re-opening the bug if necessary)."""
steps = [
- steps.CleanWorkingDirectory,
+ steps.DiscardLocalChanges,
steps.Update,
steps.RevertRevision,
steps.PrepareChangeLogForRevert,
diff --git a/Tools/Scripts/webkitpy/tool/commands/download_unittest.py b/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
index 14bf2ce5e..d35706f7e 100644
--- a/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/download_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.thirdparty.mock import Mock
@@ -99,6 +99,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
"""
@@ -140,6 +141,7 @@ Message2."
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -153,7 +155,7 @@ Updating bug 50000
self.assertEqual(mock_tool.scm().create_patch.call_count, 0)
self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
- def test_land_cowboy(self):
+ def test_land_cowhand(self):
expected_logs = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1', '--filter', '-changelog'], cwd=/mock-checkout
MOCK run_command: ['ruby', '-I', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch/prettify.rb'], cwd=None, input=Patch1
@@ -167,6 +169,8 @@ Running Perl unit tests
MOCK run_and_throw_if_fail: ['mock-test-webkitperl'], cwd=/mock-checkout
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['mock-run-javacriptcore-tests'], cwd=/mock-checkout
+Running bindings generation tests
+MOCK run_and_throw_if_fail: ['mock-run-bindings-tests'], cwd=/mock-checkout
Running WebKit unit tests
MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests'], cwd=/mock-checkout
Running run-webkit-tests
@@ -176,6 +180,9 @@ Committed r49824: <http://trac.webkit.org/changeset/49824>
No bug id provided.
"""
mock_tool = MockTool(log_executive=True)
+ self.assert_execute_outputs(LandCowhand(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
+
+ expected_logs = "land-cowboy is deprecated, use land-cowhand instead.\n" + expected_logs
self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
def test_land_red_builders(self):
@@ -183,6 +190,7 @@ No bug id provided.
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -214,6 +222,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -231,6 +240,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -241,6 +251,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -258,6 +269,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
@@ -268,6 +280,7 @@ Building WebKit
Running Python unit tests
Running Perl unit tests
Running JavaScriptCore tests
+Running bindings generation tests
Running WebKit unit tests
Running run-webkit-tests
Committed r49824: <http://trac.webkit.org/changeset/49824>
diff --git a/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py b/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
index 98a9a36ed..b5e285c64 100644
--- a/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
+++ b/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py
@@ -26,11 +26,13 @@
# (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 json
import logging
from optparse import make_option
from webkitpy.common.config.committers import CommitterList
from webkitpy.common.config.ports import DeprecatedPort
+from webkitpy.common.system.filesystem import FileSystem
from webkitpy.common.system.executive import ScriptError
from webkitpy.tool.bot.earlywarningsystemtask import EarlyWarningSystemTask, EarlyWarningSystemTaskDelegate
from webkitpy.tool.bot.expectedfailures import ExpectedFailures
@@ -45,22 +47,16 @@ _log = logging.getLogger(__name__)
class AbstractEarlyWarningSystem(AbstractReviewQueue, EarlyWarningSystemTaskDelegate):
_build_style = "release"
# FIXME: Switch _default_run_tests from opt-in to opt-out once more bots are ready to run tests.
- _default_run_tests = False
-
- # Subclasses must override.
- port_name = None
+ run_tests = False
def __init__(self):
- options = [make_option("--run-tests", action="store_true", dest="run_tests", default=self._default_run_tests, help="Run the Layout tests for each patch")]
+ options = [make_option("--run-tests", action="store_true", dest="run_tests", default=self.run_tests, help="Run the Layout tests for each patch")]
AbstractReviewQueue.__init__(self, options=options)
- self.port = DeprecatedPort.port(self.port_name)
def begin_work_queue(self):
- # FIXME: This violates abstraction
- self._tool._deprecated_port = self.port
AbstractReviewQueue.begin_work_queue(self)
self._expected_failures = ExpectedFailures()
- self._layout_test_results_reader = LayoutTestResultsReader(self._tool, self._log_directory())
+ self._layout_test_results_reader = LayoutTestResultsReader(self._tool, self._port.results_directory(), self._log_directory())
def _failing_tests_message(self, task, patch):
results = task.results_from_patch_test_run(patch)
@@ -72,11 +68,13 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue, EarlyWarningSystemTaskDele
def _post_reject_message_on_bug(self, tool, patch, status_id, extra_message_text=None):
results_link = tool.status_server.results_url_for_status(status_id)
message = "Attachment %s did not pass %s (%s):\nOutput: %s" % (patch.id(), self.name, self.port_name, results_link)
+ if extra_message_text:
+ message += "\n\n%s" % extra_message_text
# FIXME: We might want to add some text about rejecting from the commit-queue in
# the case where patch.commit_queue() isn't already set to '-'.
if self.watchers:
tool.bugs.add_cc_to_bug(patch.bug_id(), self.watchers)
- tool.bugs.set_flag_on_attachment(patch.id(), "commit-queue", "-", message, extra_message_text)
+ tool.bugs.set_flag_on_attachment(patch.id(), "commit-queue", "-", message)
def review_patch(self, patch):
task = EarlyWarningSystemTask(self, patch, self._options.run_tests)
@@ -105,7 +103,7 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue, EarlyWarningSystemTaskDele
return self.name
def run_command(self, command):
- self.run_webkit_patch(command + [self.port.flag()])
+ self.run_webkit_patch(command + [self._deprecated_port.flag()])
def command_passed(self, message, patch):
pass
@@ -139,78 +137,21 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue, EarlyWarningSystemTaskDele
# FIXME: Why does this not exit(1) like the superclass does?
_log.error(script_error.message_with_output())
+ @classmethod
+ def load_ews_classes(cls):
+ filesystem = FileSystem()
+ json_path = filesystem.join(filesystem.dirname(filesystem.path_to_module('webkitpy.common.config')), 'ews.json')
+ try:
+ ewses = json.loads(filesystem.read_text_file(json_path))
+ except ValueError:
+ return None
-class GtkEWS(AbstractEarlyWarningSystem):
- name = "gtk-ews"
- port_name = "gtk"
- watchers = AbstractEarlyWarningSystem.watchers + [
- "xan.lopez@gmail.com",
- ]
-
-
-class EflEWS(AbstractEarlyWarningSystem):
- name = "efl-ews"
- port_name = "efl"
- watchers = AbstractEarlyWarningSystem.watchers + [
- "leandro@profusion.mobi",
- "antognolli@profusion.mobi",
- "lucas.demarchi@profusion.mobi",
- "gyuyoung.kim@samsung.com",
- ]
-
-
-class QtEWS(AbstractEarlyWarningSystem):
- name = "qt-ews"
- port_name = "qt"
- watchers = AbstractEarlyWarningSystem.watchers + [
- "webkit-ews@sed.inf.u-szeged.hu",
- ]
-
-
-class QtWK2EWS(AbstractEarlyWarningSystem):
- name = "qt-wk2-ews"
- port_name = "qt"
- watchers = AbstractEarlyWarningSystem.watchers + [
- "webkit-ews@sed.inf.u-szeged.hu",
- ]
-
-
-class WinEWS(AbstractEarlyWarningSystem):
- name = "win-ews"
- port_name = "win"
- # Use debug, the Apple Win port fails to link Release on 32-bit Windows.
- # https://bugs.webkit.org/show_bug.cgi?id=39197
- _build_style = "debug"
-
-
-class AbstractChromiumEWS(AbstractEarlyWarningSystem):
- port_name = "chromium"
- watchers = AbstractEarlyWarningSystem.watchers + [
- "dglazkov@chromium.org",
- ]
-
-
-class ChromiumLinuxEWS(AbstractChromiumEWS):
- # FIXME: We should rename this command to cr-linux-ews, but that requires
- # a database migration. :(
- name = "chromium-ews"
- port_name = "chromium-xvfb"
- _default_run_tests = True
-
-
-class ChromiumWindowsEWS(AbstractChromiumEWS):
- name = "cr-win-ews"
-
-
-class ChromiumAndroidEWS(AbstractChromiumEWS):
- name = "cr-android-ews"
- port_name = "chromium-android"
- watchers = AbstractChromiumEWS.watchers + [
- "peter+ews@chromium.org",
- ]
-
-
-class MacEWS(AbstractEarlyWarningSystem):
- name = "mac-ews"
- port_name = "mac"
- _default_run_tests = True
+ classes = []
+ for name, config in ewses.iteritems():
+ classes.append(type(str(name.replace(' ', '')), (AbstractEarlyWarningSystem,), {
+ 'name': config['port'] + '-ews',
+ 'port_name': config['port'],
+ 'watchers': config.get('watchers', []),
+ 'run_tests': config.get('runTests', cls.run_tests),
+ }))
+ return classes
diff --git a/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py b/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
index b33129a20..78dae3ba9 100644
--- a/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py
@@ -47,44 +47,45 @@ class AbstractEarlyWarningSystemTest(QueuesTest):
ews._expected_failures.unexpected_failures_observed = lambda results: set(["foo.html", "bar.html"])
task = Mock()
patch = ews._tool.bugs.fetch_attachment(10000)
- self.assertEqual(ews._failing_tests_message(task, patch), "New failing tests:\nbar.html\nfoo.html")
+ self.assertMultiLineEqual(ews._failing_tests_message(task, patch), "New failing tests:\nbar.html\nfoo.html")
-class EarlyWarningSytemTest(QueuesTest):
+class EarlyWarningSystemTest(QueuesTest):
def _default_expected_logs(self, ews):
- string_replacemnts = {
+ string_replacements = {
"name": ews.name,
"port": ews.port_name,
}
+ if ews.run_tests:
+ run_tests_line = "Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=%(port)s\n" % string_replacements
+ else:
+ run_tests_line = ""
+ string_replacements['run_tests_line'] = run_tests_line
+
expected_logs = {
"begin_work_queue": self._default_begin_work_queue_logs(ews.name),
- "process_work_item": "MOCK: update_status: %(name)s Pass\nMOCK: release_work_item: %(name)s 10000\n" % string_replacemnts,
+ "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=%(port)s
+Running: webkit-patch --status-host=example.com update --port=%(port)s
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=%(port)s
+Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=%(port)s
+%(run_tests_line)sMOCK: update_status: %(name)s Pass
+MOCK: release_work_item: %(name)s 10000
+""" % string_replacements,
"handle_unexpected_error": "Mock error message\n",
"handle_script_error": "ScriptError error message\n\nMOCK output\n",
}
return expected_logs
- def _test_builder_ews(self, ews):
+ def _test_ews(self, ews):
ews.bind_to_tool(MockTool())
options = Mock()
options.port = None
- options.run_tests = ews._default_run_tests
+ options.run_tests = ews.run_tests
self.assert_queue_outputs(ews, expected_logs=self._default_expected_logs(ews), options=options)
- def _test_testing_ews(self, ews):
- ews.test_results = lambda: None
- ews.bind_to_tool(MockTool())
- expected_logs = self._default_expected_logs(ews)
- self.assert_queue_outputs(ews, expected_logs=expected_logs)
-
- def test_builder_ewses(self):
- self._test_builder_ews(MacEWS())
- self._test_builder_ews(ChromiumWindowsEWS())
- self._test_builder_ews(ChromiumAndroidEWS())
- self._test_builder_ews(QtEWS())
- self._test_builder_ews(QtWK2EWS())
- self._test_builder_ews(GtkEWS())
- self._test_builder_ews(EflEWS())
-
- def test_testing_ewses(self):
- self._test_testing_ews(ChromiumLinuxEWS())
+ def test_ewses(self):
+ classes = AbstractEarlyWarningSystem.load_ews_classes()
+ self.assertTrue(classes)
+ self.maxDiff = None
+ for ews_class in classes:
+ self._test_ews(ews_class())
diff --git a/Tools/Scripts/webkitpy/tool/commands/findusers.py b/Tools/Scripts/webkitpy/tool/commands/findusers.py
index 4363c8cf2..ae4702373 100644
--- a/Tools/Scripts/webkitpy/tool/commands/findusers.py
+++ b/Tools/Scripts/webkitpy/tool/commands/findusers.py
@@ -26,10 +26,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
-class FindUsers(AbstractDeclarativeCommand):
+class FindUsers(Command):
name = "find-users"
help_text = "Find users matching substring"
diff --git a/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py b/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py
index c87c1a265..e9762858d 100644
--- a/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py
+++ b/Tools/Scripts/webkitpy/tool/commands/gardenomatic.py
@@ -22,7 +22,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.layout_tests.port import builders
+from webkitpy.port import builders
from webkitpy.tool.commands.rebaseline import AbstractRebaseliningCommand
from webkitpy.tool.servers.gardeningserver import GardeningHTTPServer
diff --git a/Tools/Scripts/webkitpy/tool/commands/newcommitbot.py b/Tools/Scripts/webkitpy/tool/commands/newcommitbot.py
new file mode 100644
index 000000000..958576158
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/commands/newcommitbot.py
@@ -0,0 +1,172 @@
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Copyright (c) 2013 Apple 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 logging
+import re
+
+from webkitpy.common.config.committers import CommitterList
+from webkitpy.common.system.executive import ScriptError
+from webkitpy.tool.bot.irc_command import IRCCommand
+from webkitpy.tool.bot.irc_command import Help
+from webkitpy.tool.bot.irc_command import Hi
+from webkitpy.tool.bot.irc_command import PingPong
+from webkitpy.tool.bot.irc_command import Restart
+from webkitpy.tool.bot.irc_command import YouThere
+from webkitpy.tool.bot.ircbot import IRCBot
+from webkitpy.tool.commands.queues import AbstractQueue
+from webkitpy.tool.commands.stepsequence import StepSequenceErrorHandler
+
+_log = logging.getLogger(__name__)
+
+
+class Agent(object):
+ def __init__(self, tool, newcommitbot):
+ self._tool = tool
+ self._newcommitbot = newcommitbot
+
+ def name(self):
+ return 'WKR'
+
+
+class NewCommitBot(AbstractQueue, StepSequenceErrorHandler):
+ name = "WKR"
+ watchers = AbstractQueue.watchers + ["rniwa@webkit.org"]
+
+ _commands = {
+ "hi": Hi,
+ "ping": PingPong,
+ "restart": Restart,
+ "yt?": YouThere,
+ }
+
+ _maximum_number_of_revisions_to_avoid_spamming_irc = 10
+
+ # AbstractQueue methods
+
+ def begin_work_queue(self):
+ AbstractQueue.begin_work_queue(self)
+ self._last_svn_revision = int(self._tool.scm().head_svn_revision())
+ self._irc_bot = IRCBot(self.name, self._tool, Agent(self._tool, self), self._commands)
+ self._tool.ensure_irc_connected(self._irc_bot.irc_delegate())
+
+ def work_item_log_path(self, failure_map):
+ return None
+
+ def next_work_item(self):
+ self._irc_bot.process_pending_messages()
+
+ _log.info('Last SVN revision: %d' % self._last_svn_revision)
+
+ count = 0
+ while count < self._maximum_number_of_revisions_to_avoid_spamming_irc:
+ new_revision = self._last_svn_revision + 1
+ try:
+ commit_log = self._tool.executive.run_command(['svn', 'log', 'https://svn.webkit.org/repository/webkit/trunk', '--non-interactive', '--revision',
+ self._tool.scm().strip_r_from_svn_revision(new_revision)])
+ except ScriptError:
+ break
+
+ self._last_svn_revision = new_revision
+ if self._is_empty_log(commit_log):
+ continue
+
+ count += 1
+ _log.info('Found revision %d' % new_revision)
+ self._tool.irc().post(self._summarize_commit_log(commit_log).encode('utf-8'))
+
+ def _is_empty_log(self, commit_log):
+ return re.match(r'^\-+$', commit_log)
+
+ def process_work_item(self, failure_map):
+ return True
+
+ _patch_by_regex = re.compile(r'^Patch\s+by\s+(?P<author>.+?)\s+on(\s+\d{4}-\d{2}-\d{2})?\n?', re.MULTILINE | re.IGNORECASE)
+ _rollout_regex = re.compile(r'(rolling out|reverting) (?P<revisions>r?\d+((,\s*|,?\s*and\s+)?r?\d+)*)\.?\s*', re.MULTILINE | re.IGNORECASE)
+ _requested_by_regex = re.compile(r'^\"?(?P<reason>.+?)\"? \(Requested\s+by\s+(?P<author>.+?)\s+on\s+#webkit\)\.', re.MULTILINE | re.IGNORECASE)
+ _bugzilla_url_regex = re.compile(r'http(s?)://bugs\.webkit\.org/show_bug\.cgi\?id=(?P<id>\d+)', re.MULTILINE)
+ _trac_url_regex = re.compile(r'http(s?)://trac.webkit.org/changeset/(?P<revision>\d+)', re.MULTILINE)
+
+ @classmethod
+ def _summarize_commit_log(self, commit_log, committer_list=CommitterList()):
+ patch_by = self._patch_by_regex.search(commit_log)
+ commit_log = self._patch_by_regex.sub('', commit_log, count=1)
+
+ rollout = self._rollout_regex.search(commit_log)
+ commit_log = self._rollout_regex.sub('', commit_log, count=1)
+
+ requested_by = self._requested_by_regex.search(commit_log)
+
+ commit_log = self._bugzilla_url_regex.sub(r'https://webkit.org/b/\g<id>', commit_log)
+ commit_log = self._trac_url_regex.sub(r'https://trac.webkit.org/r\g<revision>', commit_log)
+
+ for contributor in committer_list.contributors():
+ if not contributor.irc_nicknames:
+ continue
+ name_with_nick = "%s (%s)" % (contributor.full_name, contributor.irc_nicknames[0])
+ if contributor.full_name in commit_log:
+ commit_log = commit_log.replace(contributor.full_name, name_with_nick)
+ for email in contributor.emails:
+ commit_log = commit_log.replace(' <' + email + '>', '')
+ else:
+ for email in contributor.emails:
+ commit_log = commit_log.replace(email, name_with_nick)
+
+ lines = commit_log.split('\n')[1:-2] # Ignore lines with ----------.
+
+ firstline = re.match(r'^(?P<revision>r\d+) \| (?P<email>[^\|]+) \| (?P<timestamp>[^|]+) \| [^\n]+', lines[0])
+ assert firstline
+ author = firstline.group('email')
+ if patch_by:
+ author = patch_by.group('author')
+
+ linkified_revision = 'https://trac.webkit.org/%s' % firstline.group('revision')
+ lines[0] = '%s by %s' % (linkified_revision, author)
+
+ if rollout:
+ if requested_by:
+ author = requested_by.group('author')
+ contributor = committer_list.contributor_by_irc_nickname(author)
+ if contributor:
+ author = "%s (%s)" % (contributor.full_name, contributor.irc_nicknames[0])
+ return '%s rolled out %s in %s : %s' % (author, rollout.group('revisions'),
+ linkified_revision, requested_by.group('reason'))
+ lines[0] = '%s rolled out %s in %s' % (author, rollout.group('revisions'), linkified_revision)
+
+ return ' '.join(filter(lambda line: len(line), lines)[0:4])
+
+ def handle_unexpected_error(self, failure_map, message):
+ _log.error(message)
+
+ # StepSequenceErrorHandler methods
+
+ @classmethod
+ def handle_script_error(cls, tool, state, script_error):
+ # Ideally we would post some information to IRC about what went wrong
+ # here, but we don't have the IRC password in the child process.
+ pass
diff --git a/Tools/Scripts/webkitpy/tool/commands/newcommitbot_unittest.py b/Tools/Scripts/webkitpy/tool/commands/newcommitbot_unittest.py
new file mode 100644
index 000000000..05bf45664
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/commands/newcommitbot_unittest.py
@@ -0,0 +1,129 @@
+# Copyright (C) 2013 Apple 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 unittest2 as unittest
+
+from webkitpy.tool.commands.newcommitbot import NewCommitBot
+
+
+class NewCommitBotTest(unittest.TestCase):
+ def test_summarize_commit_log_basic(self):
+ self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
+r143106 | jochen@chromium.org | 2013-02-16 10:27:07 -0800 (Sat, 16 Feb 2013) | 10 lines
+
+[chromium] initialize all variables of TestRunner classes
+https://bugs.webkit.org/show_bug.cgi?id=110013
+
+Reviewed by Adam Barth.
+
+* DumpRenderTree/chromium/TestRunner/src/TestInterfaces.cpp:
+(WebTestRunner::TestInterfaces::TestInterfaces):
+* DumpRenderTree/chromium/TestRunner/src/TestRunner.cpp:
+(WebTestRunner::TestRunner::TestRunner):
+
+------------------------------------------------------------------------"""),
+ "https://trac.webkit.org/r143106 by Jochen Eisinger (jochen__) [chromium] initialize all variables of TestRunner classes"
+ " https://webkit.org/b/110013 Reviewed by Adam Barth (abarth).")
+
+ self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
+r140066 | simon.fraser@apple.com | 2013-01-17 16:10:31 -0800 (Thu, 17 Jan 2013) | 10 lines
+
+Allow PaintInfo to carry all PaintBehavior flags
+https://bugs.webkit.org/show_bug.cgi?id=106980
+
+Reviewed by Beth Dakin.
+
+In r139908 I missed one instance of the PaintInfo constructor that should take PaintBehaviorNormal
+instead of "false".
+
+* rendering/RenderScrollbarPart.cpp:
+(WebCore::RenderScrollbarPart::paintIntoRect):
+------------------------------------------------------------------------"""),
+ "https://trac.webkit.org/r140066 by Simon Fraser (smfr)"
+ " Allow PaintInfo to carry all PaintBehavior flags https://webkit.org/b/106980 Reviewed by Beth Dakin (dethbakin).")
+
+ def test_summarize_commit_log_rollout(self):
+ self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
+r143104 | commit-queue@webkit.org | 2013-02-16 09:09:01 -0800 (Sat, 16 Feb 2013) | 27 lines
+
+Unreviewed, rolling out r142734.
+http://trac.webkit.org/changeset/142734
+https://bugs.webkit.org/show_bug.cgi?id=110018
+
+"Triggered crashes on lots of websites" (Requested by ggaren
+on #webkit).
+
+Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-16
+
+Source/WebCore:
+
+------------------------------------------------------------------------"""),
+ "Geoffrey Garen (ggaren) rolled out r142734 in https://trac.webkit.org/r143104 : Triggered crashes on lots of websites")
+
+ self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
+r139884 | kov@webkit.org | 2013-01-16 08:26:10 -0800 (Wed, 16 Jan 2013) | 23 lines
+
+[GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying
+https://bugs.webkit.org/show_bug.cgi?id=105552
+
+Reverting 139877. It made a couple of API tests fail.
+
+* platform/graphics/gstreamer/GStreamerVersioning.cpp:
+* platform/graphics/gstreamer/GStreamerVersioning.h:
+* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
+(StreamingClient):
+(_WebKitWebSrcPrivate):
+
+------------------------------------------------------------------------"""),
+ "Gustavo Noronha Silva (kov) rolled out 139877 in https://trac.webkit.org/r139884"
+ " [GStreamer][Soup] Let GStreamer provide the buffer data is downloaded to, to avoid copying"
+ " https://webkit.org/b/105552 It made a couple of API tests fail.")
+
+ self.assertEqual(NewCommitBot._summarize_commit_log("""------------------------------------------------------------------------
+r135487 | commit-queue@webkit.org | 2012-11-22 00:09:25 -0800 (Thu, 22 Nov 2012) | 52 lines
+
+Unreviewed, rolling out r134927 and r134944.
+http://trac.webkit.org/changeset/134927
+http://trac.webkit.org/changeset/134944
+https://bugs.webkit.org/show_bug.cgi?id=103028
+
+Reverting the reverts after merging. (Requested by vsevik on
+#webkit).
+
+Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-11-22
+
+* English.lproj/localizedStrings.js:
+* WebCore.gypi:
+* WebCore.vcproj/WebCore.vcproj:
+* inspector/compile-front-end.py:
+* inspector/front-end/AdvancedSearchController.js:
+* inspector/front-end/CallStackSidebarPane.js:
+
+------------------------------------------------------------------------"""),
+ "Vsevolod Vlasov (vsevik) rolled out r134927 and r134944 in https://trac.webkit.org/r135487 :"
+ " Reverting the reverts after merging.")
diff --git a/Tools/Scripts/webkitpy/tool/commands/openbugs.py b/Tools/Scripts/webkitpy/tool/commands/openbugs.py
index 8c55aba14..b2ed532e6 100644
--- a/Tools/Scripts/webkitpy/tool/commands/openbugs.py
+++ b/Tools/Scripts/webkitpy/tool/commands/openbugs.py
@@ -30,12 +30,12 @@ import logging
import re
import sys
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
_log = logging.getLogger(__name__)
-class OpenBugs(AbstractDeclarativeCommand):
+class OpenBugs(Command):
name = "open-bugs"
help_text = "Finds all bug numbers passed in arguments (or stdin if no args provided) and opens them in a web browser"
diff --git a/Tools/Scripts/webkitpy/tool/commands/perfalizer_unittest.py b/Tools/Scripts/webkitpy/tool/commands/perfalizer_unittest.py
index feb7b05b3..3efb46129 100644
--- a/Tools/Scripts/webkitpy/tool/commands/perfalizer_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/perfalizer_unittest.py
@@ -26,12 +26,12 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.buildbot import Builder
from webkitpy.common.system.executive import ScriptError
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.layout_tests.port.test import TestPort
+from webkitpy.port.test import TestPort
from webkitpy.tool.commands.perfalizer import PerfalizerTask
from webkitpy.tool.mocktool import MockTool
diff --git a/Tools/Scripts/webkitpy/tool/commands/queries.py b/Tools/Scripts/webkitpy/tool/commands/queries.py
index 7cc846715..ff1b46ef2 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queries.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queries.py
@@ -1,6 +1,7 @@
# Copyright (c) 2009 Google Inc. All rights reserved.
# Copyright (c) 2009 Apple Inc. All rights reserved.
# Copyright (c) 2012 Intel Corporation. All rights reserved.
+# Copyright (c) 2013 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
@@ -41,33 +42,31 @@ from webkitpy.common.checkout.commitinfo import CommitInfo
from webkitpy.common.config.committers import CommitterList
import webkitpy.common.config.urls as config_urls
from webkitpy.common.net.buildbot import BuildBot
+from webkitpy.common.net.bugzilla import Bugzilla
from webkitpy.common.net.regressionwindow import RegressionWindow
from webkitpy.common.system.crashlogs import CrashLogs
from webkitpy.common.system.user import User
+from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCommand
from webkitpy.tool.grammar import pluralize
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
from webkitpy.layout_tests.models.test_expectations import TestExpectations
-from webkitpy.layout_tests.port import platform_options, configuration_options
+from webkitpy.port import platform_options, configuration_options
_log = logging.getLogger(__name__)
-class SuggestReviewers(AbstractDeclarativeCommand):
+class SuggestReviewers(AbstractSequencedCommand):
name = "suggest-reviewers"
help_text = "Suggest reviewers for a patch based on recent changes to the modified files."
+ steps = [
+ steps.SuggestReviewers,
+ ]
- def __init__(self):
- options = [
- steps.Options.git_commit,
- ]
- AbstractDeclarativeCommand.__init__(self, options=options)
-
- def execute(self, options, args, tool):
- reviewers = tool.checkout().suggested_reviewers(options.git_commit)
- print "\n".join([reviewer.full_name for reviewer in reviewers])
+ def _prepare_state(self, options, args, tool):
+ options.suggest_reviewers = True
-class BugsToCommit(AbstractDeclarativeCommand):
+class BugsToCommit(Command):
name = "bugs-to-commit"
help_text = "List bugs in the commit-queue"
@@ -78,7 +77,7 @@ class BugsToCommit(AbstractDeclarativeCommand):
print "%s" % bug_id
-class PatchesInCommitQueue(AbstractDeclarativeCommand):
+class PatchesInCommitQueue(Command):
name = "patches-in-commit-queue"
help_text = "List patches in the commit-queue"
@@ -89,14 +88,14 @@ class PatchesInCommitQueue(AbstractDeclarativeCommand):
print patch.url()
-class PatchesToCommitQueue(AbstractDeclarativeCommand):
+class PatchesToCommitQueue(Command):
name = "patches-to-commit-queue"
help_text = "Patches which should be added to the commit queue"
def __init__(self):
options = [
make_option("--bugs", action="store_true", dest="bugs", help="Output bug links instead of patch links"),
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
@staticmethod
def _needs_commit_queue(patch):
@@ -123,7 +122,7 @@ class PatchesToCommitQueue(AbstractDeclarativeCommand):
print "%s" % tool.bugs.attachment_url_for_id(patch.id(), action="edit")
-class PatchesToReview(AbstractDeclarativeCommand):
+class PatchesToReview(Command):
name = "patches-to-review"
help_text = "List bugs which have attachments pending review"
@@ -136,7 +135,7 @@ class PatchesToReview(AbstractDeclarativeCommand):
make_option("--cc-email",
help="Specifies the email on the CC field (defaults to your bugzilla login email)"),
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
def _print_report(self, report, cc_email, print_all):
if print_all:
@@ -176,7 +175,8 @@ class PatchesToReview(AbstractDeclarativeCommand):
report = self._generate_report(bugs, options.include_cq_denied)
self._print_report(report, cc_email, options.all)
-class WhatBroke(AbstractDeclarativeCommand):
+
+class WhatBroke(Command):
name = "what-broke"
help_text = "Print failing buildbots (%s) and what revisions broke them" % config_urls.buildbot_url
@@ -222,7 +222,7 @@ class WhatBroke(AbstractDeclarativeCommand):
print "All builders are passing!"
-class ResultsFor(AbstractDeclarativeCommand):
+class ResultsFor(Command):
name = "results-for"
help_text = "Print a list of failures for the passed revision from bots on %s" % config_urls.buildbot_url
argument_names = "REVISION"
@@ -244,7 +244,7 @@ class ResultsFor(AbstractDeclarativeCommand):
self._print_layout_test_results(build.layout_test_results())
-class FailureReason(AbstractDeclarativeCommand):
+class FailureReason(Command):
name = "failure-reason"
help_text = "Lists revisions where individual test failures started at %s" % config_urls.buildbot_url
@@ -330,7 +330,7 @@ class FailureReason(AbstractDeclarativeCommand):
return self._explain_failures_for_builder(builder, start_revision=int(start_revision))
-class FindFlakyTests(AbstractDeclarativeCommand):
+class FindFlakyTests(Command):
name = "find-flaky-tests"
help_text = "Lists tests that often fail for a single build at %s" % config_urls.buildbot_url
@@ -399,7 +399,7 @@ class FindFlakyTests(AbstractDeclarativeCommand):
return self._walk_backwards_from(builder, latest_revision, limit=int(limit))
-class TreeStatus(AbstractDeclarativeCommand):
+class TreeStatus(Command):
name = "tree-status"
help_text = "Print the status of the %s buildbots" % config_urls.buildbot_url
long_help = """Fetches build status from http://build.webkit.org/one_box_per_builder
@@ -411,7 +411,7 @@ and displayes the status of each builder."""
print "%s : %s" % (status_string.ljust(4), builder["name"])
-class CrashLog(AbstractDeclarativeCommand):
+class CrashLog(Command):
name = "crash-log"
help_text = "Print the newest crash log for the given process"
long_help = """Finds the newest crash log matching the given process name
@@ -426,7 +426,7 @@ and PID and prints it to stdout."""
print crash_logs.find_newest_log(args[0], pid)
-class PrintExpectations(AbstractDeclarativeCommand):
+class PrintExpectations(Command):
name = 'print-expectations'
help_text = 'Print the expected result for the given test(s) on the given port(s)'
@@ -446,7 +446,7 @@ class PrintExpectations(AbstractDeclarativeCommand):
help='display the paths for all applicable expectation files'),
] + platform_options(use_globs=True)
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
self._expectation_models = {}
def execute(self, options, args, tool):
@@ -514,13 +514,10 @@ class PrintExpectations(AbstractDeclarativeCommand):
def _model(self, options, port_name, tests):
port = self._tool.port_factory.get(port_name, options)
- expectations_path = port.path_to_test_expectations_file()
- if not expectations_path in self._expectation_models:
- self._expectation_models[expectations_path] = TestExpectations(port, tests).model()
- return self._expectation_models[expectations_path]
+ return TestExpectations(port, tests).model()
-class PrintBaselines(AbstractDeclarativeCommand):
+class PrintBaselines(Command):
name = 'print-baselines'
help_text = 'Prints the baseline locations for given test(s) on the given port(s)'
@@ -533,7 +530,7 @@ class PrintBaselines(AbstractDeclarativeCommand):
make_option('--include-virtual-tests', action='store_true',
help='Include virtual tests'),
] + platform_options(use_globs=True)
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
self._platform_regexp = re.compile('platform/([^\/]+)/(.+)')
def execute(self, options, args, tool):
@@ -579,3 +576,36 @@ class PrintBaselines(AbstractDeclarativeCommand):
if platform_matchobj:
return platform_matchobj.group(1)
return None
+
+
+class FindResolvedBugs(Command):
+ name = "find-resolved-bugs"
+ help_text = "Collect the RESOLVED bugs in the given TestExpectations file"
+ argument_names = "TEST_EXPECTATIONS_FILE"
+
+ def execute(self, options, args, tool):
+ filename = args[0]
+ if not tool.filesystem.isfile(filename):
+ print "The given path is not a file, please pass a valid path."
+ return
+
+ ids = set()
+ inputfile = tool.filesystem.open_text_file_for_reading(filename)
+ for line in inputfile:
+ result = re.search("(https://bugs\.webkit\.org/show_bug\.cgi\?id=|webkit\.org/b/)([0-9]+)", line)
+ if result:
+ ids.add(result.group(2))
+ inputfile.close()
+
+ resolved_ids = set()
+ num_of_bugs = len(ids)
+ bugzilla = Bugzilla()
+ for i, bugid in enumerate(ids, start=1):
+ bug = bugzilla.fetch_bug(bugid)
+ print "Checking bug %s \t [%d/%d]" % (bugid, i, num_of_bugs)
+ if not bug.is_open():
+ resolved_ids.add(bugid)
+
+ print "Resolved bugs in %s :" % (filename)
+ for bugid in resolved_ids:
+ print "https://bugs.webkit.org/show_bug.cgi?id=%s" % (bugid)
diff --git a/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
index b252c0b0e..8800cac3b 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queries_unittest.py
@@ -27,13 +27,13 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.net.bugzilla import Bugzilla
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.thirdparty.mock import Mock
-from webkitpy.layout_tests.port.test import TestPort
+from webkitpy.port.test import TestPort
from webkitpy.tool.commands.commandtest import CommandsTest
from webkitpy.tool.commands.queries import *
from webkitpy.tool.mocktool import MockTool, MockOptions
@@ -173,7 +173,7 @@ class PrintExpectationsTest(unittest.TestCase):
command.execute(options, tests, tool)
finally:
stdout, _, _ = oc.restore_output()
- self.assertEqual(stdout, expected_stdout)
+ self.assertMultiLineEqual(stdout, expected_stdout)
def test_basic(self):
self.run_test(['failures/expected/text.html', 'failures/expected/image.html'],
@@ -223,10 +223,19 @@ class PrintExpectationsTest(unittest.TestCase):
def test_paths(self):
self.run_test([],
- ('LayoutTests/platform/test/TestExpectations\n'
+ ('LayoutTests/TestExpectations\n'
+ 'LayoutTests/platform/test/TestExpectations\n'
'LayoutTests/platform/test-win-xp/TestExpectations\n'),
paths=True)
+ def test_platform(self):
+ self.run_test(['platform/test-mac-leopard/http/test.html'],
+ ('// For test-mac-snowleopard\n'
+ 'platform/test-mac-leopard [ Pass Skip WontFix ]\n' # Note that this is the expectation (from being skipped internally), not the test name
+ '\n'
+ '// For test-mac-leopard\n'
+ 'platform/test-mac-leopard/http/test.html [ Pass ]\n'),
+ platform='test-mac-*')
class PrintBaselinesTest(unittest.TestCase):
def setUp(self):
@@ -255,7 +264,7 @@ class PrintBaselinesTest(unittest.TestCase):
self.capture_output()
command.execute(MockOptions(all=False, include_virtual_tests=False, csv=False, platform=None), ['passes/text.html'], self.tool)
stdout, _, _ = self.restore_output()
- self.assertEqual(stdout,
+ self.assertMultiLineEqual(stdout,
('// For test-win-xp\n'
'passes/text-expected.png\n'
'passes/text-expected.txt\n'))
@@ -266,7 +275,7 @@ class PrintBaselinesTest(unittest.TestCase):
self.capture_output()
command.execute(MockOptions(all=False, include_virtual_tests=False, csv=False, platform='test-win-*'), ['passes/text.html'], self.tool)
stdout, _, _ = self.restore_output()
- self.assertEqual(stdout,
+ self.assertMultiLineEqual(stdout,
('// For test-win-vista\n'
'passes/text-expected.png\n'
'passes/text-expected.txt\n'
@@ -285,6 +294,6 @@ class PrintBaselinesTest(unittest.TestCase):
self.capture_output()
command.execute(MockOptions(all=False, platform='*xp', csv=True, include_virtual_tests=False), ['passes/text.html'], self.tool)
stdout, _, _ = self.restore_output()
- self.assertEqual(stdout,
+ self.assertMultiLineEqual(stdout,
('test-win-xp,passes/text.html,None,png,passes/text-expected.png,None\n'
'test-win-xp,passes/text.html,None,txt,passes/text-expected.txt,None\n'))
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues.py b/Tools/Scripts/webkitpy/tool/commands/queues.py
index edfbee402..74724cffb 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues.py
@@ -72,7 +72,8 @@ class AbstractQueue(Command, QueueEngineDelegate):
make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue. Dangerous!"),
make_option("--exit-after-iteration", action="store", type="int", dest="iterations", default=None, help="Stop running the queue after iterating this number of times."),
]
- Command.__init__(self, "Run the %s" % self.name, options=options_list)
+ self.help_text = "Run the %s" % self.name
+ Command.__init__(self, options=options_list)
self._iteration_count = 0
def _cc_watchers(self, bug_id):
@@ -94,12 +95,17 @@ class AbstractQueue(Command, QueueEngineDelegate):
if self._options.port:
webkit_patch_args += ["--port=%s" % self._options.port]
webkit_patch_args.extend(args)
- # FIXME: There is probably no reason to use run_and_throw_if_fail anymore.
- # run_and_throw_if_fail was invented to support tee'd output
- # (where we write both to a log file and to the console at once),
- # but the queues don't need live-progress, a dump-of-output at the
- # end should be sufficient.
- return self._tool.executive.run_and_throw_if_fail(webkit_patch_args, cwd=self._tool.scm().checkout_root)
+
+ try:
+ args_for_printing = list(webkit_patch_args)
+ args_for_printing[0] = 'webkit-patch' # Printing our path for each log is redundant.
+ _log.info("Running: %s" % self._tool.executive.command_for_printing(args_for_printing))
+ command_output = self._tool.executive.run_command(webkit_patch_args, cwd=self._tool.scm().checkout_root)
+ except ScriptError, e:
+ # Make sure the whole output gets printed if the command failed.
+ _log.error(e.message_with_output(output_limit=None))
+ raise
+ return command_output
def _log_directory(self):
return os.path.join("..", "%s-logs" % self.name)
@@ -143,7 +149,7 @@ class AbstractQueue(Command, QueueEngineDelegate):
def execute(self, options, args, tool, engine=QueueEngine):
self._options = options # FIXME: This code is wrong. Command.options is a list, this assumes an Options element!
self._tool = tool # FIXME: This code is wrong too! Command.bind_to_tool handles this!
- return engine(self.name, self, self._tool.wakeup_event).run()
+ return engine(self.name, self, self._tool.wakeup_event, self._options.seconds_to_sleep).run()
@classmethod
def _log_from_script_error_for_upload(cls, script_error, output_limit=None):
@@ -241,10 +247,44 @@ class AbstractPatchQueue(AbstractQueue):
self._update_status(message, patch)
self._release_work_item(patch)
- # FIXME: This probably belongs at a layer below AbstractPatchQueue, but shared by CommitQueue and the EarlyWarningSystem.
+ def work_item_log_path(self, patch):
+ return os.path.join(self._log_directory(), "%s.log" % patch.bug_id())
+
+
+# Used to share code between the EWS and commit-queue.
+class PatchProcessingQueue(AbstractPatchQueue):
+ # Subclasses must override.
+ port_name = None
+
+ def __init__(self, options=None):
+ self._port = None # We can't instantiate port here because tool isn't avaialble.
+ AbstractPatchQueue.__init__(self, options)
+
+ # FIXME: This is a hack to map between the old port names and the new port names.
+ def _new_port_name_from_old(self, port_name, platform):
+ # ApplePort.determine_full_port_name asserts if the name doesn't include version.
+ if port_name == 'mac':
+ return 'mac-' + platform.os_version
+ if port_name == 'win':
+ return 'win-future'
+ return port_name
+
+ def begin_work_queue(self):
+ AbstractPatchQueue.begin_work_queue(self)
+ if not self.port_name:
+ return
+ # FIXME: This is only used for self._deprecated_port.flag()
+ self._deprecated_port = DeprecatedPort.port(self.port_name)
+ # FIXME: This violates abstraction
+ self._tool._deprecated_port = self._deprecated_port
+ self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform))
+
def _upload_results_archive_for_patch(self, patch, results_archive_zip):
+ if not self._port:
+ self._port = self._tool.port_factory.get(self._new_port_name_from_old(self.port_name, self._tool.platform))
+
bot_id = self._tool.status_server.bot_id or "bot"
- description = "Archive of layout-test-results from %s" % bot_id
+ description = "Archive of layout-test-results from %s for %s" % (bot_id, self._port.name())
# results_archive is a ZipFile object, grab the File object (.fp) to pass to Mechanize for uploading.
results_archive_file = results_archive_zip.fp
# Rewind the file object to start (since Mechanize won't do that automatically)
@@ -255,30 +295,21 @@ class AbstractPatchQueue(AbstractQueue):
comment_text = "The attached test failures were seen while running run-webkit-tests on the %s.\n" % (self.name)
# FIXME: We could easily list the test failures from the archive here,
# currently callers do that separately.
- comment_text += BotInfo(self._tool).summary_text()
+ comment_text += BotInfo(self._tool, self._port.name()).summary_text()
self._tool.bugs.add_attachment_to_bug(patch.bug_id(), results_archive_file, description, filename="layout-test-results.zip", comment_text=comment_text)
- def work_item_log_path(self, patch):
- return os.path.join(self._log_directory(), "%s.log" % patch.bug_id())
-
-class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskDelegate):
+class CommitQueue(PatchProcessingQueue, StepSequenceErrorHandler, CommitQueueTaskDelegate):
name = "commit-queue"
- port_name = "chromium-xvfb"
-
- def __init__(self):
- AbstractPatchQueue.__init__(self)
- self.port = DeprecatedPort.port(self.port_name)
+ port_name = "mac-mountainlion"
# AbstractPatchQueue methods
def begin_work_queue(self):
- # FIXME: This violates abstraction
- self._tool._deprecated_port = self.port
- AbstractPatchQueue.begin_work_queue(self)
+ PatchProcessingQueue.begin_work_queue(self)
self.committer_validator = CommitterValidator(self._tool)
self._expected_failures = ExpectedFailures()
- self._layout_test_results_reader = LayoutTestResultsReader(self._tool, self._log_directory())
+ self._layout_test_results_reader = LayoutTestResultsReader(self._tool, self._port.results_directory(), self._log_directory())
def next_work_item(self):
return self._next_patch()
@@ -319,7 +350,7 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
# CommitQueueTaskDelegate methods
def run_command(self, command):
- self.run_webkit_patch(command + [self.port.flag()])
+ self.run_webkit_patch(command + [self._deprecated_port.flag()])
def command_passed(self, message, patch):
self._update_status(message, patch=patch)
@@ -348,10 +379,10 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
reporter.report_flaky_tests(patch, flaky_test_results, results_archive)
def did_pass_testing_ews(self, patch):
- # Currently, chromium-ews is the only testing EWS. Once there are more,
- # should make sure they all pass.
- status = self._tool.status_server.patch_status("chromium-ews", patch.id())
- return status == self._pass_status
+ # Only Mac and Mac WK2 run tests
+ # FIXME: We shouldn't have to hard-code it here.
+ patch_status = self._tool.status_server.patch_status
+ return patch_status("mac-ews", patch.id()) == self._pass_status or patch_status("mac-wk2-ews", patch.id()) == self._pass_status
# StepSequenceErrorHandler methods
@@ -376,10 +407,10 @@ class CommitQueue(AbstractPatchQueue, StepSequenceErrorHandler, CommitQueueTaskD
raise TryAgain()
-class AbstractReviewQueue(AbstractPatchQueue, StepSequenceErrorHandler):
+class AbstractReviewQueue(PatchProcessingQueue, StepSequenceErrorHandler):
"""This is the base-class for the EWS queues and the style-queue."""
def __init__(self, options=None):
- AbstractPatchQueue.__init__(self, options)
+ PatchProcessingQueue.__init__(self, options)
def review_patch(self, patch):
raise NotImplementedError("subclasses must implement")
@@ -387,7 +418,7 @@ class AbstractReviewQueue(AbstractPatchQueue, StepSequenceErrorHandler):
# AbstractPatchQueue methods
def begin_work_queue(self):
- AbstractPatchQueue.begin_work_queue(self)
+ PatchProcessingQueue.begin_work_queue(self)
def next_work_item(self):
return self._next_patch()
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
index 0a32f29be..a09164dde 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -88,7 +88,7 @@ class AbstractQueueTest(CommandsTest):
if port:
expected_run_args.append("--port=%s" % port)
expected_run_args.extend(run_args)
- tool.executive.run_and_throw_if_fail.assert_called_with(expected_run_args, cwd='/mock-checkout')
+ tool.executive.run_command.assert_called_with(expected_run_args, cwd='/mock-checkout')
def test_run_webkit_patch(self):
self._assert_run_webkit_patch([1])
@@ -134,7 +134,7 @@ class FeederQueueTest(QueuesTest):
"begin_work_queue": self._default_begin_work_queue_logs("feeder-queue"),
"process_work_item": """Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
Warning, attachment 10001 on bug 50000 has invalid committer (non-committer@example.com)
-MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.' and additional comment 'non-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
+MOCK setting flag 'commit-queue' to '-' on attachment '10001' with comment 'Rejecting attachment 10001 from commit-queue.\n\nnon-committer@example.com does not have committer permissions according to http://trac.webkit.org/browser/trunk/Tools/Scripts/webkitpy/common/config/committers.py.
- If you do not have committer rights please read http://webkit.org/coding/contributing.html for instructions on how to use bugzilla flags.
@@ -156,7 +156,7 @@ class AbstractPatchQueueTest(CommandsTest):
queue.bind_to_tool(tool)
queue._options = Mock()
queue._options.port = None
- self.assertEqual(queue._next_patch(), None)
+ self.assertIsNone(queue._next_patch())
tool.status_server = MockStatusServer(work_items=[2, 10000, 10001])
expected_stdout = "MOCK: fetch_attachment: 2 is not a known attachment id\n" # A mock-only message to prevent us from making mistakes.
expected_logs = "MOCK: release_work_item: None 2\n"
@@ -166,18 +166,20 @@ class AbstractPatchQueueTest(CommandsTest):
self.assertEqual(queue._next_patch().id(), 10001)
self.assertEqual(queue._next_patch(), None) # When the queue is empty
+
+class PatchProcessingQueueTest(CommandsTest):
def test_upload_results_archive_for_patch(self):
- queue = AbstractPatchQueue()
+ queue = PatchProcessingQueue()
queue.name = "mock-queue"
tool = MockTool()
queue.bind_to_tool(tool)
queue._options = Mock()
queue._options.port = None
patch = queue._tool.bugs.fetch_attachment(10001)
- expected_logs = """MOCK add_attachment_to_bug: bug_id=50000, description=Archive of layout-test-results from bot filename=layout-test-results.zip mimetype=None
+ expected_logs = """MOCK add_attachment_to_bug: bug_id=50000, description=Archive of layout-test-results from bot for mac-snowleopard filename=layout-test-results.zip mimetype=None
-- Begin comment --
The attached test failures were seen while running run-webkit-tests on the mock-queue.
-Port: MockPort Platform: MockPlatform 1.0
+Port: mac-snowleopard Platform: MockPlatform 1.0
-- End comment --
"""
OutputCapture().assert_outputs(self, queue._upload_results_archive_for_patch, [patch, Mock()], expected_logs=expected_logs)
@@ -236,18 +238,25 @@ class CommitQueueTest(QueuesTest):
tool.filesystem.write_text_file('/tmp/layout-test-results/webkit_unit_tests_output.xml', '')
expected_logs = {
"begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
- "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
+ "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=mac
+MOCK: update_status: commit-queue Cleaned working directory
+Running: webkit-patch --status-host=example.com update --port=mac
MOCK: update_status: commit-queue Updated working directory
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=mac
MOCK: update_status: commit-queue Applied patch
+Running: webkit-patch --status-host=example.com validate-changelog --check-oops --non-interactive 10000 --port=mac
MOCK: update_status: commit-queue ChangeLog validated
+Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=mac
MOCK: update_status: commit-queue Built patch
+Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=mac
MOCK: update_status: commit-queue Passed tests
+Running: webkit-patch --status-host=example.com land-attachment --force-clean --non-interactive --parent-command=commit-queue 10000 --port=mac
MOCK: update_status: commit-queue Landed patch
MOCK: update_status: commit-queue Pass
MOCK: release_work_item: commit-queue 10000
""",
"handle_script_error": "ScriptError error message\n\nMOCK output\n",
- "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
+ "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n",
}
self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs)
@@ -257,13 +266,13 @@ MOCK: release_work_item: commit-queue 10000
"process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
MOCK: update_status: commit-queue Updated working directory
MOCK: update_status: commit-queue Patch does not apply
-MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'MOCK script error
+MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMOCK script error
Full output: http://dummy_url'
MOCK: update_status: commit-queue Fail
MOCK: release_work_item: commit-queue 10000
""",
"handle_script_error": "ScriptError error message\n\nMOCK output\n",
- "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
+ "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n",
}
queue = CommitQueue()
@@ -283,7 +292,7 @@ MOCK: release_work_item: commit-queue 10000
"process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
MOCK: update_status: commit-queue Updated working directory
MOCK: update_status: commit-queue Patch does not apply
-MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'New failing tests:
+MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nNew failing tests:
mock_test_name.html
another_test_name.html
Full output: http://dummy_url'
@@ -291,7 +300,7 @@ MOCK: update_status: commit-queue Fail
MOCK: release_work_item: commit-queue 10000
""",
"handle_script_error": "ScriptError error message\n\nMOCK output\n",
- "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
+ "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n",
}
queue = CommitQueue()
@@ -307,56 +316,56 @@ MOCK: release_work_item: commit-queue 10000
self.assert_queue_outputs(queue, expected_logs=expected_logs)
def test_rollout(self):
- tool = MockTool(log_executive=True)
+ tool = MockTool()
tool.filesystem.write_text_file('/tmp/layout-test-results/full_results.json', '') # Otherwise the commit-queue will hit a KeyError trying to read the results from the MockFileSystem.
tool.filesystem.write_text_file('/tmp/layout-test-results/webkit_unit_tests_output.xml', '')
tool.buildbot.light_tree_on_fire()
expected_logs = {
"begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
- "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean', '--port=%(port_name)s'], cwd=/mock-checkout
+ "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=%(port)s
MOCK: update_status: commit-queue Cleaned working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update', '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com update --port=%(port)s
MOCK: update_status: commit-queue Updated working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--no-update', '--non-interactive', 10000, '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=%(port)s
MOCK: update_status: commit-queue Applied patch
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'validate-changelog', '--non-interactive', 10000, '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com validate-changelog --check-oops --non-interactive 10000 --port=%(port)s
MOCK: update_status: commit-queue ChangeLog validated
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=%(port)s
MOCK: update_status: commit-queue Built patch
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build-and-test', '--no-clean', '--no-update', '--test', '--non-interactive', '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=%(port)s
MOCK: update_status: commit-queue Passed tests
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 10000, '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com land-attachment --force-clean --non-interactive --parent-command=commit-queue 10000 --port=%(port)s
MOCK: update_status: commit-queue Landed patch
MOCK: update_status: commit-queue Pass
MOCK: release_work_item: commit-queue 10000
-""" % {"port_name": CommitQueue.port_name},
+""" % {"port": "mac"},
"handle_script_error": "ScriptError error message\n\nMOCK output\n",
- "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.' and additional comment 'Mock error message'\n",
+ "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10000' with comment 'Rejecting attachment 10000 from commit-queue.\n\nMock error message'\n",
}
self.assert_queue_outputs(CommitQueue(), tool=tool, expected_logs=expected_logs)
def test_rollout_lands(self):
- tool = MockTool(log_executive=True)
+ tool = MockTool()
tool.buildbot.light_tree_on_fire()
rollout_patch = tool.bugs.fetch_attachment(10005) # _patch6, a rollout patch.
assert(rollout_patch.is_rollout())
expected_logs = {
"begin_work_queue": self._default_begin_work_queue_logs("commit-queue"),
- "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean', '--port=%(port_name)s'], cwd=/mock-checkout
+ "process_work_item": """Running: webkit-patch --status-host=example.com clean --port=%(port)s
MOCK: update_status: commit-queue Cleaned working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update', '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com update --port=%(port)s
MOCK: update_status: commit-queue Updated working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--no-update', '--non-interactive', 10005, '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10005 --port=%(port)s
MOCK: update_status: commit-queue Applied patch
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'validate-changelog', '--non-interactive', 10005, '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com validate-changelog --check-oops --non-interactive 10005 --port=%(port)s
MOCK: update_status: commit-queue ChangeLog validated
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 10005, '--port=%(port_name)s'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com land-attachment --force-clean --non-interactive --parent-command=commit-queue 10005 --port=%(port)s
MOCK: update_status: commit-queue Landed patch
MOCK: update_status: commit-queue Pass
MOCK: release_work_item: commit-queue 10005
-""" % {"port_name": CommitQueue.port_name},
+""" % {"port": "mac"},
"handle_script_error": "ScriptError error message\n\nMOCK output\n",
- "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue.' and additional comment 'Mock error message'\n",
+ "handle_unexpected_error": "MOCK setting flag 'commit-queue' to '-' on attachment '10005' with comment 'Rejecting attachment 10005 from commit-queue.\n\nMock error message'\n",
}
self.assert_queue_outputs(CommitQueue(), tool=tool, work_item=rollout_patch, expected_logs=expected_logs)
@@ -373,9 +382,9 @@ MOCK: update_status: commit-queue Tests passed, but commit failed (checkout out
state = {'patch': None}
OutputCapture().assert_outputs(self, sequence.run_and_handle_errors, [tool, options, state], expected_exception=TryAgain, expected_logs=expected_logs)
- self.assertEqual(options.update, True)
- self.assertEqual(options.build, False)
- self.assertEqual(options.test, False)
+ self.assertTrue(options.update)
+ self.assertFalse(options.build)
+ self.assertFalse(options.test)
def test_manual_reject_during_processing(self):
queue = SecondThoughtsCommitQueue(MockTool())
@@ -384,15 +393,22 @@ MOCK: update_status: commit-queue Tests passed, but commit failed (checkout out
queue._tool.filesystem.write_text_file('/tmp/layout-test-results/webkit_unit_tests_output.xml', '')
queue._options = Mock()
queue._options.port = None
- expected_logs = """MOCK: update_status: commit-queue Cleaned working directory
+ expected_logs = """Running: webkit-patch --status-host=example.com clean --port=mac
+MOCK: update_status: commit-queue Cleaned working directory
+Running: webkit-patch --status-host=example.com update --port=mac
MOCK: update_status: commit-queue Updated working directory
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000 --port=mac
MOCK: update_status: commit-queue Applied patch
+Running: webkit-patch --status-host=example.com validate-changelog --check-oops --non-interactive 10000 --port=mac
MOCK: update_status: commit-queue ChangeLog validated
+Running: webkit-patch --status-host=example.com build --no-clean --no-update --build-style=release --port=mac
MOCK: update_status: commit-queue Built patch
+Running: webkit-patch --status-host=example.com build-and-test --no-clean --no-update --test --non-interactive --port=mac
MOCK: update_status: commit-queue Passed tests
MOCK: update_status: commit-queue Retry
MOCK: release_work_item: commit-queue 10000
"""
+ self.maxDiff = None
OutputCapture().assert_outputs(self, queue.process_work_item, [QueuesTest.mock_work_item], expected_logs=expected_logs)
def test_report_flaky_tests(self):
@@ -449,15 +465,15 @@ class StyleQueueTest(QueuesTest):
def test_style_queue_with_style_exception(self):
expected_logs = {
"begin_work_queue": self._default_begin_work_queue_logs("style-queue"),
- "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'], cwd=/mock-checkout
+ "process_work_item": """Running: webkit-patch --status-host=example.com clean
MOCK: update_status: style-queue Cleaned working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com update
MOCK: update_status: style-queue Updated working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--no-update', '--non-interactive', 10000], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000
MOCK: update_status: style-queue Applied patch
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-watchlist-local', 50000], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com apply-watchlist-local 50000
MOCK: update_status: style-queue Watchlist applied
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'check-style-local', '--non-interactive', '--quiet'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com check-style-local --non-interactive --quiet
MOCK: update_status: style-queue Style checked
MOCK: update_status: style-queue Pass
MOCK: release_work_item: style-queue 10000
@@ -465,21 +481,24 @@ MOCK: release_work_item: style-queue 10000
"handle_unexpected_error": "Mock error message\n",
"handle_script_error": "MOCK output\n",
}
- tool = MockTool(log_executive=True, executive_throws_when_run=set(['check-style']))
+ tool = MockTool(executive_throws_when_run=set(['check-style']))
self.assert_queue_outputs(StyleQueue(), expected_logs=expected_logs, tool=tool)
def test_style_queue_with_watch_list_exception(self):
expected_logs = {
"begin_work_queue": self._default_begin_work_queue_logs("style-queue"),
- "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'], cwd=/mock-checkout
+ "process_work_item": """Running: webkit-patch --status-host=example.com clean
MOCK: update_status: style-queue Cleaned working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'update'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com update
MOCK: update_status: style-queue Updated working directory
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--no-update', '--non-interactive', 10000], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com apply-attachment --no-update --non-interactive 10000
MOCK: update_status: style-queue Applied patch
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-watchlist-local', 50000], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com apply-watchlist-local 50000
+Exception for ['echo', '--status-host=example.com', 'apply-watchlist-local', 50000]
+
+MOCK command output
MOCK: update_status: style-queue Unabled to apply watchlist
-MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'check-style-local', '--non-interactive', '--quiet'], cwd=/mock-checkout
+Running: webkit-patch --status-host=example.com check-style-local --non-interactive --quiet
MOCK: update_status: style-queue Style checked
MOCK: update_status: style-queue Pass
MOCK: release_work_item: style-queue 10000
@@ -487,5 +506,5 @@ MOCK: release_work_item: style-queue 10000
"handle_unexpected_error": "Mock error message\n",
"handle_script_error": "MOCK output\n",
}
- tool = MockTool(log_executive=True, executive_throws_when_run=set(['apply-watchlist-local']))
+ tool = MockTool(executive_throws_when_run=set(['apply-watchlist-local']))
self.assert_queue_outputs(StyleQueue(), expected_logs=expected_logs, tool=tool)
diff --git a/Tools/Scripts/webkitpy/tool/commands/queuestest.py b/Tools/Scripts/webkitpy/tool/commands/queuestest.py
index 314a64021..c633b8479 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queuestest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queuestest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.net.bugzilla import Attachment
from webkitpy.common.system.outputcapture import OutputCapture
@@ -37,7 +37,7 @@ from webkitpy.tool.mocktool import MockTool
class MockQueueEngine(object):
- def __init__(self, name, queue, wakeup_event):
+ def __init__(self, name, queue, wakeup_event, seconds_to_sleep):
pass
def run(self):
@@ -79,7 +79,7 @@ class QueuesTest(unittest.TestCase):
tool = MockTool()
# This is a hack to make it easy for callers to not have to setup a custom MockFileSystem just to test the commit-queue
# the cq tries to read the layout test results, and will hit a KeyError in MockFileSystem if we don't do this.
- tool.filesystem.write_text_file('/mock-results/results.html', "")
+ tool.filesystem.write_text_file('/mock-results/full_results.json', "")
if not expected_stdout:
expected_stdout = {}
if not expected_stderr:
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index d9209b118..06d42d097 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -36,9 +36,9 @@ from webkitpy.common.system.executive import ScriptError
from webkitpy.layout_tests.controllers.test_result_writer import TestResultWriter
from webkitpy.layout_tests.models import test_failures
from webkitpy.layout_tests.models.test_expectations import TestExpectations, BASELINE_SUFFIX_LIST
-from webkitpy.layout_tests.port import builders
-from webkitpy.layout_tests.port import factory
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.port import builders
+from webkitpy.port import factory
+from webkitpy.tool.multicommandtool import Command
_log = logging.getLogger(__name__)
@@ -49,8 +49,8 @@ def _baseline_name(fs, test_name, suffix):
return fs.splitext(test_name)[0] + TestResultWriter.FILENAME_SUFFIX_EXPECTED + "." + suffix
-class AbstractRebaseliningCommand(AbstractDeclarativeCommand):
- # not overriding execute() - pylint: disable-msg=W0223
+class AbstractRebaseliningCommand(Command):
+ # not overriding execute() - pylint: disable=W0223
move_overwritten_baselines_option = optparse.make_option("--move-overwritten-baselines", action="store_true", default=False,
help="Move overwritten baselines elsewhere in the baseline path. This is for bringing up new ports.")
@@ -88,7 +88,7 @@ class RebaselineTest(AbstractRebaseliningCommand):
self._scm_changes = {'add': []}
def _results_url(self, builder_name):
- return self._tool.buildbot_for_builder_name(builder_name).builder_with_name(builder_name).latest_layout_test_results_url()
+ return self._tool.buildbot.builder_with_name(builder_name).latest_layout_test_results_url()
def _baseline_directory(self, builder_name):
port = self._tool.port_factory.get_from_builder_name(builder_name)
@@ -152,7 +152,7 @@ class RebaselineTest(AbstractRebaseliningCommand):
path = port.path_to_test_expectations_file()
lock = self._tool.make_file_lock(path + '.lock')
lock.acquire_lock()
- expectations = TestExpectations(port, include_overrides=False)
+ expectations = TestExpectations(port, include_generic=False, include_overrides=False)
for test_configuration in port.all_test_configurations():
if test_configuration.version == port.test_configuration().version:
expectationsString = expectations.remove_configuration_from_test(test_name, test_configuration)
@@ -266,7 +266,7 @@ class AnalyzeBaselines(AbstractRebaseliningCommand):
class AbstractParallelRebaselineCommand(AbstractRebaseliningCommand):
- # not overriding execute() - pylint: disable-msg=W0223
+ # not overriding execute() - pylint: disable=W0223
def _run_webkit_patch(self, args, verbose):
try:
@@ -454,22 +454,18 @@ class Rebaseline(AbstractParallelRebaselineCommand):
])
def _builders_to_pull_from(self):
- chromium_buildbot_builder_names = []
webkit_buildbot_builder_names = []
for name in builders.all_builder_names():
- if self._tool.port_factory.get_from_builder_name(name).is_chromium():
- chromium_buildbot_builder_names.append(name)
- else:
- webkit_buildbot_builder_names.append(name)
+ webkit_buildbot_builder_names.append(name)
- titles = ["build.webkit.org bots", "build.chromium.org bots"]
- lists = [webkit_buildbot_builder_names, chromium_buildbot_builder_names]
+ titles = ["build.webkit.org bots"]
+ lists = [webkit_buildbot_builder_names]
chosen_names = self._tool.user.prompt_with_multiple_lists("Which builder to pull results from:", titles, lists, can_choose_multiple=True)
return [self._builder_with_name(name) for name in chosen_names]
def _builder_with_name(self, name):
- return self._tool.buildbot_for_builder_name(name).builder_with_name(name)
+ return self._tool.buildbot.builder_with_name(name)
def _tests_to_update(self, builder):
failing_tests = builder.latest_layout_test_results().tests_matching_failure_types([test_failures.FailureTextMismatch])
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
index cc25fae2b..43a8786fe 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.checkout.baselineoptimizer import BaselineOptimizer
@@ -39,15 +39,15 @@ from webkitpy.tool.mocktool import MockTool, MockOptions
class _BaseTestCase(unittest.TestCase):
MOCK_WEB_RESULT = 'MOCK Web result, convert 404 to None=True'
- WEB_PREFIX = 'http://example.com/f/builders/WebKit Mac10.7/results/layout-test-results'
+ WEB_PREFIX = 'http://example.com/f/builders/Apple Lion Release WK1 (Tests)/results/layout-test-results'
command_constructor = None
def setUp(self):
self.tool = MockTool()
- self.command = self.command_constructor() # lint warns that command_constructor might not be set, but this is intentional; pylint: disable-msg=E1102
+ self.command = self.command_constructor() # lint warns that command_constructor might not be set, but this is intentional; pylint: disable=E1102
self.command.bind_to_tool(self.tool)
- self.lion_port = self.tool.port_factory.get_from_builder_name("WebKit Mac10.7")
+ self.lion_port = self.tool.port_factory.get_from_builder_name("Apple Lion Release WK1 (Tests)")
self.lion_expectations_path = self.lion_port.path_to_test_expectations_file()
# FIXME: we should override builders._exact_matches here to point to a set
@@ -78,20 +78,21 @@ class TestRebaselineTest(_BaseTestCase):
def setUp(self):
super(TestRebaselineTest, self).setUp()
- self.options = MockOptions(builder="WebKit Mac10.7", test="userscripts/another-test.html", suffixes="txt",
+ self.options = MockOptions(builder="Apple Lion Release WK1 (Tests)", test="userscripts/another-test.html", suffixes="txt",
move_overwritten_baselines_to=None, results_directory=None)
def test_baseline_directory(self):
command = self.command
- self.assertEqual(command._baseline_directory("Apple Win XP Debug (Tests)"), "/mock-checkout/LayoutTests/platform/win-xp")
- self.assertEqual(command._baseline_directory("Apple Win 7 Release (Tests)"), "/mock-checkout/LayoutTests/platform/win")
- self.assertEqual(command._baseline_directory("Apple Lion Release WK1 (Tests)"), "/mock-checkout/LayoutTests/platform/mac-lion")
- self.assertEqual(command._baseline_directory("Apple Lion Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/mac-wk2")
- self.assertEqual(command._baseline_directory("GTK Linux 32-bit Release"), "/mock-checkout/LayoutTests/platform/gtk")
- self.assertEqual(command._baseline_directory("EFL Linux 64-bit Release WK2"), "/mock-checkout/LayoutTests/platform/efl-wk2")
- self.assertEqual(command._baseline_directory("Qt Linux Release"), "/mock-checkout/LayoutTests/platform/qt")
- self.assertEqual(command._baseline_directory("WebKit Mac10.7"), "/mock-checkout/LayoutTests/platform/chromium-mac-lion")
- self.assertEqual(command._baseline_directory("WebKit Mac10.6"), "/mock-checkout/LayoutTests/platform/chromium-mac-snowleopard")
+ self.assertMultiLineEqual(command._baseline_directory("Apple Win XP Debug (Tests)"), "/mock-checkout/LayoutTests/platform/win-xp")
+ self.assertMultiLineEqual(command._baseline_directory("Apple Win 7 Release (Tests)"), "/mock-checkout/LayoutTests/platform/win")
+ self.assertMultiLineEqual(command._baseline_directory("Apple Lion Release WK1 (Tests)"), "/mock-checkout/LayoutTests/platform/mac-lion")
+ self.assertMultiLineEqual(command._baseline_directory("Apple Lion Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/mac-wk2")
+ self.assertMultiLineEqual(command._baseline_directory("Apple MountainLion Release WK1 (Tests)"), "/mock-checkout/LayoutTests/platform/mac")
+ self.assertMultiLineEqual(command._baseline_directory("Apple MountainLion Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/mac")
+ self.assertMultiLineEqual(command._baseline_directory("GTK Linux 64-bit Debug"), "/mock-checkout/LayoutTests/platform/gtk-wk1")
+ self.assertMultiLineEqual(command._baseline_directory("GTK Linux 64-bit Release WK2 (Tests)"), "/mock-checkout/LayoutTests/platform/gtk-wk2")
+ self.assertMultiLineEqual(command._baseline_directory("EFL Linux 64-bit Release WK2"), "/mock-checkout/LayoutTests/platform/efl-wk2")
+ self.assertMultiLineEqual(command._baseline_directory("Qt Linux Release"), "/mock-checkout/LayoutTests/platform/qt")
def test_rebaseline_updates_expectations_file_noop(self):
self._zero_out_test_expectations()
@@ -105,12 +106,12 @@ Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
self.options.suffixes = "png,wav,txt"
self.command._rebaseline_test_and_update_expectations(self.options)
- self.assertEqual(self.tool.web.urls_fetched,
+ self.assertItemsEqual(self.tool.web.urls_fetched,
[self.WEB_PREFIX + '/userscripts/another-test-actual.png',
self.WEB_PREFIX + '/userscripts/another-test-actual.wav',
self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
new_expectations = self._read(self.lion_expectations_path)
- self.assertEqual(new_expectations, """Bug(B) [ Mac Linux XP Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
+ self.assertMultiLineEqual(new_expectations, """Bug(B) [ Mac Linux XP Debug ] fast/dom/Window/window-postmessage-clone-really-deep-array.html [ Pass ]
Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
""")
@@ -121,79 +122,78 @@ Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
self.options.suffixes = 'png,wav,txt'
self.command._rebaseline_test_and_update_expectations(self.options)
- self.assertEqual(self.tool.web.urls_fetched,
+ self.assertItemsEqual(self.tool.web.urls_fetched,
[self.WEB_PREFIX + '/userscripts/another-test-actual.png',
self.WEB_PREFIX + '/userscripts/another-test-actual.wav',
self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
new_expectations = self._read(self.lion_expectations_path)
- self.assertEqual(new_expectations, "Bug(x) [ MountainLion SnowLeopard ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
+ self.assertMultiLineEqual(new_expectations, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
def test_rebaseline_does_not_include_overrides(self):
self._write(self.lion_expectations_path, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
- self._write(self.lion_port.path_from_chromium_base('skia', 'skia_test_expectations.txt'), "Bug(y) [ Mac ] other-test.html [ Failure ]\n")
self._write("userscripts/another-test.html", "Dummy test contents")
self.options.suffixes = 'png,wav,txt'
self.command._rebaseline_test_and_update_expectations(self.options)
- self.assertEqual(self.tool.web.urls_fetched,
+ self.assertItemsEqual(self.tool.web.urls_fetched,
[self.WEB_PREFIX + '/userscripts/another-test-actual.png',
self.WEB_PREFIX + '/userscripts/another-test-actual.wav',
self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
new_expectations = self._read(self.lion_expectations_path)
- self.assertEqual(new_expectations, "Bug(x) [ MountainLion SnowLeopard ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
+ self.assertMultiLineEqual(new_expectations, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nBug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
def test_rebaseline_test(self):
- self.command._rebaseline_test("WebKit Linux", "userscripts/another-test.html", None, "txt", self.WEB_PREFIX)
- self.assertEqual(self.tool.web.urls_fetched, [self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
+ self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", None, "txt", self.WEB_PREFIX)
+ self.assertItemsEqual(self.tool.web.urls_fetched, [self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
def test_rebaseline_test_with_results_directory(self):
self._write(self.lion_expectations_path, "Bug(x) [ Mac ] userscripts/another-test.html [ ImageOnlyFailure ]\nbug(z) [ Linux ] userscripts/another-test.html [ ImageOnlyFailure ]\n")
self.options.results_directory = '/tmp'
self.command._rebaseline_test_and_update_expectations(self.options)
- self.assertEqual(self.tool.web.urls_fetched, ['file:///tmp/userscripts/another-test-actual.txt'])
+ self.assertItemsEqual(self.tool.web.urls_fetched, ['file:///tmp/userscripts/another-test-actual.txt'])
def test_rebaseline_test_and_print_scm_changes(self):
self.command._print_scm_changes = True
self.command._scm_changes = {'add': [], 'delete': []}
self.tool._scm.exists = lambda x: False
- self.command._rebaseline_test("WebKit Linux", "userscripts/another-test.html", None, "txt", None)
+ self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", None, "txt", None)
- self.assertEqual(self.command._scm_changes, {'add': ['/mock-checkout/LayoutTests/platform/chromium-linux/userscripts/another-test-expected.txt'], 'delete': []})
+ self.assertDictEqual(self.command._scm_changes, {'add': ['/mock-checkout/LayoutTests/platform/mac-lion/userscripts/another-test-expected.txt'], 'delete': []})
def test_rebaseline_and_copy_test(self):
self._write("userscripts/another-test-expected.txt", "generic result")
- self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", None)
+ self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", None)
- self.assertEqual(self._read('platform/chromium-mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
- self.assertEqual(self._read('platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt'), 'generic result')
+ self.assertMultiLineEqual(self._read('platform/mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
+ self.assertMultiLineEqual(self._read('platform/mac-wk2/userscripts/another-test-expected.txt'), 'generic result')
def test_rebaseline_and_copy_test_no_existing_result(self):
- self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", None)
+ self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", None)
- self.assertEqual(self._read('platform/chromium-mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
- self.assertFalse(self.tool.filesystem.exists(self._expand('platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt')))
+ self.assertMultiLineEqual(self._read('platform/mac-lion/userscripts/another-test-expected.txt'), self.MOCK_WEB_RESULT)
+ self.assertFalse(self.tool.filesystem.exists(self._expand('platform/mac-lion-wk2/userscripts/another-test-expected.txt')))
def test_rebaseline_and_copy_test_with_lion_result(self):
- self._write("platform/chromium-mac-lion/userscripts/another-test-expected.txt", "original lion result")
+ self._write("platform/mac-lion/userscripts/another-test-expected.txt", "original lion result")
- self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", self.WEB_PREFIX)
+ self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", self.WEB_PREFIX)
- self.assertEqual(self.tool.web.urls_fetched, [self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
- self.assertEqual(self._read("platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt"), "original lion result")
- self.assertEqual(self._read("platform/chromium-mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
+ self.assertItemsEqual(self.tool.web.urls_fetched, [self.WEB_PREFIX + '/userscripts/another-test-actual.txt'])
+ self.assertMultiLineEqual(self._read("platform/mac-wk2/userscripts/another-test-expected.txt"), "original lion result")
+ self.assertMultiLineEqual(self._read("platform/mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
def test_rebaseline_and_copy_no_overwrite_test(self):
- self._write("platform/chromium-mac-lion/userscripts/another-test-expected.txt", "original lion result")
- self._write("platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt", "original snowleopard result")
+ self._write("platform/mac-lion/userscripts/another-test-expected.txt", "original lion result")
+ self._write("platform/mac-lion-wk2/userscripts/another-test-expected.txt", "original lion wk2 result")
- self.command._rebaseline_test("WebKit Mac10.7", "userscripts/another-test.html", ["chromium-mac-snowleopard"], "txt", None)
+ self.command._rebaseline_test("Apple Lion Release WK1 (Tests)", "userscripts/another-test.html", ["mac-lion-wk2"], "txt", None)
- self.assertEqual(self._read("platform/chromium-mac-snowleopard/userscripts/another-test-expected.txt"), "original snowleopard result")
- self.assertEqual(self._read("platform/chromium-mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
+ self.assertMultiLineEqual(self._read("platform/mac-lion-wk2/userscripts/another-test-expected.txt"), "original lion wk2 result")
+ self.assertMultiLineEqual(self._read("platform/mac-lion/userscripts/another-test-expected.txt"), self.MOCK_WEB_RESULT)
def test_rebaseline_test_internal_with_move_overwritten_baselines_to(self):
self.tool.executive = MockExecutive2()
@@ -220,8 +220,8 @@ Bug(A) [ Debug ] : fast/css/large-list-of-rules-crash.html [ Failure ]
out, _, _ = oc.restore_output()
builders._exact_matches = old_exact_matches
- self.assertEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-leopard/failures/expected/image-expected.txt')), 'original snowleopard result')
- self.assertEqual(out, '{"add": []}\n')
+ self.assertMultiLineEqual(self._read(self.tool.filesystem.join(port.layout_tests_dir(), 'platform/test-mac-leopard/failures/expected/image-expected.txt')), 'original snowleopard result')
+ self.assertMultiLineEqual(out, '{"add": []}\n')
class TestRebaselineJson(_BaseTestCase):
@@ -335,8 +335,8 @@ class TestRebaselineExpectations(_BaseTestCase):
# FIXME: change this to use the test- ports.
calls = filter(lambda x: x != ['qmake', '-v'], self.tool.executive.calls)
- self.assertTrue(len(calls) == 1)
- self.assertTrue(len(calls[0]) == 26)
+ self.assertEqual(len(calls), 1)
+ self.assertEqual(len(calls[0]), 22)
def test_rebaseline_expectations_noop(self):
self._zero_out_test_expectations()
@@ -362,7 +362,7 @@ class TestRebaselineExpectations(_BaseTestCase):
'Bug(y) userscripts/test.html [ Crash ]\n')}
self._write('/userscripts/another-test.html', '')
- self.assertEqual(self.command._tests_to_rebaseline(self.lion_port), {'userscripts/another-test.html': set(['png', 'txt', 'wav'])})
+ self.assertDictEqual(self.command._tests_to_rebaseline(self.lion_port), {'userscripts/another-test.html': set(['png', 'txt', 'wav'])})
self.assertEqual(self._read(self.lion_expectations_path), '')
@@ -383,7 +383,7 @@ class TestAnalyzeBaselines(_BaseTestCase):
self.tool.port_factory.get = (lambda port_name=None, options=None: self.port)
self.lines = []
self.command._optimizer_class = _FakeOptimizer
- self.command._write = (lambda msg: self.lines.append(msg)) # pylint bug warning about unnecessary lambda? pylint: disable-msg=W0108
+ self.command._write = (lambda msg: self.lines.append(msg)) # pylint bug warning about unnecessary lambda? pylint: disable=W0108
def test_default(self):
self.command.execute(MockOptions(suffixes='txt', missing=False, platform=None), ['passes/text.html'], self.tool)
diff --git a/Tools/Scripts/webkitpy/tool/commands/roll.py b/Tools/Scripts/webkitpy/tool/commands/roll.py
deleted file mode 100644
index 37481b2b8..000000000
--- a/Tools/Scripts/webkitpy/tool/commands/roll.py
+++ /dev/null
@@ -1,74 +0,0 @@
-# Copyright (c) 2011 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.
-
-from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCommand
-
-from webkitpy.tool import steps
-
-
-class RollChromiumDEPS(AbstractSequencedCommand):
- name = "roll-chromium-deps"
- help_text = "Updates Chromium DEPS (defaults to the last-known good revision of Chromium)"
- argument_names = "[CHROMIUM_REVISION]"
- steps = [
- steps.UpdateChromiumDEPS,
- steps.PrepareChangeLogForDEPSRoll,
- steps.ConfirmDiff,
- steps.Commit,
- ]
-
- def _prepare_state(self, options, args, tool):
- return {
- "chromium_revision": (args and args[0]),
- }
-
-
-class PostChromiumDEPSRoll(AbstractSequencedCommand):
- name = "post-chromium-deps-roll"
- help_text = "Posts a patch to update Chromium DEPS (revision defaults to the last-known good revision of Chromium)"
- argument_names = "CHROMIUM_REVISION CHROMIUM_REVISION_NAME"
- steps = [
- steps.CleanWorkingDirectory,
- steps.Update,
- steps.UpdateChromiumDEPS,
- steps.PrepareChangeLogForDEPSRoll,
- steps.CreateBug,
- steps.PostDiff,
- ]
-
- def _prepare_state(self, options, args, tool):
- options.review = False
- options.request_commit = True
-
- chromium_revision = args[0]
- chromium_revision_name = args[1]
- return {
- "chromium_revision": chromium_revision,
- "bug_title": "Roll Chromium DEPS to %s" % chromium_revision_name,
- "bug_description": "A DEPS roll a day keeps the build break away.",
- }
diff --git a/Tools/Scripts/webkitpy/tool/commands/roll_unittest.py b/Tools/Scripts/webkitpy/tool/commands/roll_unittest.py
deleted file mode 100644
index 1dae497bc..000000000
--- a/Tools/Scripts/webkitpy/tool/commands/roll_unittest.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2011 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.
-
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.commands.commandtest import CommandsTest
-from webkitpy.tool.commands.roll import *
-from webkitpy.tool.mocktool import MockOptions, MockTool
-
-
-class RollCommandsTest(CommandsTest):
- def test_update_chromium_deps(self):
- expected_logs = """Updating Chromium DEPS to 6764
-MOCK: MockDEPS.write_variable(chromium_rev, 6764)
-MOCK: user.open_url: file://...
-Was that diff correct?
-Committed r49824: <http://trac.webkit.org/changeset/49824>
-"""
- self.assert_execute_outputs(RollChromiumDEPS(), [6764], expected_logs=expected_logs)
-
- def test_update_chromium_deps_older_revision(self):
- options = MockOptions(non_interactive=False)
- expected_logs = """Current Chromium DEPS revision 6564 is newer than 5764.
-Unable to update Chromium DEPS
-"""
- self.assert_execute_outputs(RollChromiumDEPS(), [5764], options=options, expected_logs=expected_logs, expected_exception=SystemExit)
-
-
-class PostRollCommandsTest(CommandsTest):
- def test_prepare_state(self):
- postroll = PostChromiumDEPSRoll()
- options = MockOptions()
- tool = MockTool()
- lkgr_state = postroll._prepare_state(options, [None, "last-known good revision"], tool)
- self.assertEqual(None, lkgr_state["chromium_revision"])
- self.assertEqual("Roll Chromium DEPS to last-known good revision", lkgr_state["bug_title"])
- revision_state = postroll._prepare_state(options, ["1234", "r1234"], tool)
- self.assertEqual("1234", revision_state["chromium_revision"])
- self.assertEqual("Roll Chromium DEPS to r1234", revision_state["bug_title"])
diff --git a/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py b/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py
index 0f91be3ef..aea3b51bf 100644
--- a/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py
+++ b/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py
@@ -38,7 +38,7 @@ _log = logging.getLogger(__name__)
class SheriffBot(AbstractQueue, StepSequenceErrorHandler):
- name = "sheriff-bot"
+ name = "webkitbot"
watchers = AbstractQueue.watchers + [
"abarth@webkit.org",
"eric@webkit.org",
@@ -49,7 +49,7 @@ class SheriffBot(AbstractQueue, StepSequenceErrorHandler):
def begin_work_queue(self):
AbstractQueue.begin_work_queue(self)
self._sheriff = Sheriff(self._tool, self)
- self._irc_bot = IRCBot("sheriffbot", self._tool, self._sheriff, irc_commands)
+ self._irc_bot = IRCBot(self.name, self._tool, self._sheriff, irc_commands)
self._tool.ensure_irc_connected(self._irc_bot.irc_delegate())
def work_item_log_path(self, failure_map):
diff --git a/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py b/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py
index 9aa57b123..76caaf3c0 100644
--- a/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/sheriffbot_unittest.py
@@ -26,8 +26,22 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.tool.commands.queuestest import QueuesTest
+from webkitpy.tool.commands.queuestest import QueuesTest, MockQueueEngine
+from webkitpy.tool.commands import SheriffBot
+from webkitpy.tool.mocktool import MockTool, MockOptions
+from webkitpy.tool.bot.irc_command import Rollout
class SheriffBotTest(QueuesTest):
- pass # No unittests as the moment.
+ def test_command_aliases(self):
+ tool = MockTool()
+ options = MockOptions()
+ options.ensure_value("confirm", False)
+ options.ensure_value("seconds_to_sleep", 120)
+ sheriffbot = SheriffBot()
+ sheriffbot.execute(options, [], tool, MockQueueEngine)
+ sheriffbot.begin_work_queue()
+ irc_bot = sheriffbot._irc_bot
+ # Test Rollout command aliases
+ revert_command, args = irc_bot._parse_command_and_args("revert")
+ self.assertEqual(revert_command, Rollout)
diff --git a/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py b/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py
index c197a1116..6244c295f 100644
--- a/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py
+++ b/Tools/Scripts/webkitpy/tool/commands/suggestnominations.py
@@ -32,12 +32,119 @@ import re
from webkitpy.common.checkout.changelog import ChangeLogEntry
from webkitpy.common.config.committers import CommitterList
-from webkitpy.tool import steps
from webkitpy.tool.grammar import join_with_separators
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
-class SuggestNominations(AbstractDeclarativeCommand):
+class CommitLogError(Exception):
+ def __init__(self):
+ Exception.__init__(self)
+
+
+class CommitLogMissingReviewer(CommitLogError):
+ def __init__(self):
+ CommitLogError.__init__(self)
+
+
+class AbstractCommitLogCommand(Command):
+ _leading_indent_regexp = re.compile(r"^[ ]{4}", re.MULTILINE)
+ _reviewed_by_regexp = re.compile(ChangeLogEntry.reviewed_by_regexp, re.MULTILINE)
+ _patch_by_regexp = re.compile(r'^Patch by (?P<name>.+?)\s+<(?P<email>[^<>]+)> on (?P<date>\d{4}-\d{2}-\d{2})$', re.MULTILINE)
+ _committer_regexp = re.compile(r'^Author: (?P<email>\S+)\s+<[^>]+>$', re.MULTILINE)
+ _date_regexp = re.compile(r'^Date: (?P<date>\d{4}-\d{2}-\d{2}) (?P<time>\d{2}:\d{2}:\d{2}) [\+\-]\d{4}$', re.MULTILINE)
+ _revision_regexp = re.compile(r'^git-svn-id: http://svn.webkit.org/repository/webkit/trunk@(?P<svnid>\d+) (?P<gitid>[0-9a-f\-]{36})$', re.MULTILINE)
+
+ def __init__(self, options=None):
+ options = options or []
+ options += [
+ make_option("--max-commit-age", action="store", dest="max_commit_age", type="int", default=9, help="Specify maximum commit age to consider (in months)."),
+ ]
+ options = sorted(options, cmp=lambda a, b: cmp(a._long_opts, b._long_opts))
+ super(AbstractCommitLogCommand, self).__init__(options=options)
+ # FIXME: This should probably be on the tool somewhere.
+ self._committer_list = CommitterList()
+
+ def _init_options(self, options):
+ self.verbose = options.verbose
+ self.max_commit_age = options.max_commit_age
+
+ # FIXME: This should move to scm.py
+ def _recent_commit_messages(self):
+ git_log = self._tool.executive.run_command(['git', 'log', '--date=iso', '--since="%s months ago"' % self.max_commit_age])
+ messages = re.compile(r"^commit \w{40}$", re.MULTILINE).split(git_log)[1:] # Ignore the first message which will be empty.
+ for message in messages:
+ # Unindent all the lines
+ (message, _) = self._leading_indent_regexp.subn("", message)
+ yield message.lstrip() # Remove any leading newlines from the log message.
+
+ def _author_name_from_email(self, email):
+ contributor = self._committer_list.contributor_by_email(email)
+ return contributor.full_name if contributor else None
+
+ def _contributor_from_email(self, email):
+ contributor = self._committer_list.contributor_by_email(email)
+ return contributor if contributor else None
+
+ def _parse_commit_message(self, commit_message):
+ committer_match = self._committer_regexp.search(commit_message)
+ if not committer_match:
+ raise CommitLogError
+
+ committer_email = committer_match.group('email')
+ if not committer_email:
+ raise CommitLogError
+
+ committer = self._contributor_from_email(committer_email)
+ if not committer:
+ raise CommitLogError
+
+ commit_date_match = self._date_regexp.search(commit_message)
+ if not commit_date_match:
+ raise CommitLogError
+ commit_date = commit_date_match.group('date')
+
+ revision_match = self._revision_regexp.search(commit_message)
+ if not revision_match:
+ raise CommitLogError
+ revision = revision_match.group('svnid')
+
+ # Look for "Patch by" line first, which is used for non-committer contributors;
+ # otherwise, use committer info determined above.
+ author_match = self._patch_by_regexp.search(commit_message)
+ if not author_match:
+ author_match = committer_match
+
+ author_email = author_match.group('email')
+ if not author_email:
+ author_email = committer_email
+
+ author_name = author_match.group('name') if 'name' in author_match.groupdict() else None
+ if not author_name:
+ author_name = self._author_name_from_email(author_email)
+ if not author_name:
+ raise CommitLogError
+
+ contributor = self._contributor_from_email(author_email)
+ if contributor and author_name != contributor.full_name and contributor.full_name:
+ author_name = contributor.full_name
+
+ reviewer_match = self._reviewed_by_regexp.search(commit_message)
+ if not reviewer_match:
+ raise CommitLogMissingReviewer
+ reviewers = reviewer_match.group('reviewer')
+
+ return {
+ 'committer': committer,
+ 'commit_date': commit_date,
+ 'revision': revision,
+ 'author_email': author_email,
+ 'author_name': author_name,
+ 'contributor': contributor,
+ 'reviewers': reviewers,
+ }
+
+
+class SuggestNominations(AbstractCommitLogCommand):
name = "suggest-nominations"
help_text = "Suggest contributors for committer/reviewer nominations"
@@ -45,118 +152,70 @@ class SuggestNominations(AbstractDeclarativeCommand):
options = [
make_option("--committer-minimum", action="store", dest="committer_minimum", type="int", default=10, help="Specify minimum patch count for Committer nominations."),
make_option("--reviewer-minimum", action="store", dest="reviewer_minimum", type="int", default=80, help="Specify minimum patch count for Reviewer nominations."),
- make_option("--max-commit-age", action="store", dest="max_commit_age", type="int", default=9, help="Specify max commit age to consider for nominations (in months)."),
make_option("--show-commits", action="store_true", dest="show_commits", default=False, help="Show commit history with nomination suggestions."),
]
-
- AbstractDeclarativeCommand.__init__(self, options=options)
- # FIXME: This should probably be on the tool somewhere.
- self._committer_list = CommitterList()
-
- _counters_by_name = {}
- _counters_by_email = {}
+ super(SuggestNominations, self).__init__(options=options)
def _init_options(self, options):
+ super(SuggestNominations, self)._init_options(options)
self.committer_minimum = options.committer_minimum
self.reviewer_minimum = options.reviewer_minimum
- self.max_commit_age = options.max_commit_age
self.show_commits = options.show_commits
- self.verbose = options.verbose
- # FIXME: This should move to scm.py
- def _recent_commit_messages(self):
- git_log = self._tool.executive.run_command(['git', 'log', '--since="%s months ago"' % self.max_commit_age])
- match_git_svn_id = re.compile(r"\n\n git-svn-id:.*\n", re.MULTILINE)
- match_get_log_lines = re.compile(r"^\S.*\n", re.MULTILINE)
- match_leading_indent = re.compile(r"^[ ]{4}", re.MULTILINE)
+ def _count_commit(self, commit, analysis):
+ author_name = commit['author_name']
+ author_email = commit['author_email']
+ revision = commit['revision']
+ commit_date = commit['commit_date']
+
+ # See if we already have a contributor with this author_name or email
+ counter_by_name = analysis['counters_by_name'].get(author_name)
+ counter_by_email = analysis['counters_by_email'].get(author_email)
+ if counter_by_name:
+ if counter_by_email:
+ if counter_by_name != counter_by_email:
+ # Merge these two counters This is for the case where we had
+ # John Smith (jsmith@gmail.com) and Jonathan Smith (jsmith@apple.com)
+ # and just found a John Smith (jsmith@apple.com). Now we know the
+ # two names are the same person
+ counter_by_name['names'] |= counter_by_email['names']
+ counter_by_name['emails'] |= counter_by_email['emails']
+ counter_by_name['count'] += counter_by_email.get('count', 0)
+ analysis['counters_by_email'][author_email] = counter_by_name
+ else:
+ # Add email to the existing counter
+ analysis['counters_by_email'][author_email] = counter_by_name
+ counter_by_name['emails'] |= set([author_email])
+ else:
+ if counter_by_email:
+ # Add name to the existing counter
+ analysis['counters_by_name'][author_name] = counter_by_email
+ counter_by_email['names'] |= set([author_name])
+ else:
+ # Create new counter
+ new_counter = {'names': set([author_name]), 'emails': set([author_email]), 'latest_name': author_name, 'latest_email': author_email, 'commits': ""}
+ analysis['counters_by_name'][author_name] = new_counter
+ analysis['counters_by_email'][author_email] = new_counter
- messages = re.split(r"commit \w{40}", git_log)[1:] # Ignore the first message which will be empty.
- for message in messages:
- # Remove any lines from git and unindent all the lines
- (message, _) = match_git_svn_id.subn("", message)
- (message, _) = match_get_log_lines.subn("", message)
- (message, _) = match_leading_indent.subn("", message)
- yield message.lstrip() # Remove any leading newlines from the log message.
+ assert(analysis['counters_by_name'][author_name] == analysis['counters_by_email'][author_email])
+ counter = analysis['counters_by_name'][author_name]
+ counter['count'] = counter.get('count', 0) + 1
- # e.g. Patch by Eric Seidel <eric@webkit.org> on 2011-09-15
- patch_by_regexp = r'^Patch by (?P<name>.+?)\s+<(?P<email>[^<>]+)> on (?P<date>\d{4}-\d{2}-\d{2})$'
+ if revision.isdigit():
+ revision = "http://trac.webkit.org/changeset/" + revision
+ counter['commits'] += " commit: %s on %s by %s (%s)\n" % (revision, commit_date, author_name, author_email)
def _count_recent_patches(self):
- # This entire block could be written as a map/reduce over the messages.
- for message in self._recent_commit_messages():
- # FIXME: This should use ChangeLogEntry to do the entire parse instead
- # of grabbing at its regexps.
- dateline_match = re.match(ChangeLogEntry.date_line_regexp, message, re.MULTILINE)
- if not dateline_match:
- # Modern commit messages don't just dump the ChangeLog entry, but rather
- # have a special Patch by line for non-committers.
- dateline_match = re.search(self.patch_by_regexp, message, re.MULTILINE)
- if not dateline_match:
- continue
-
- author_email = dateline_match.group("email")
- if not author_email:
- continue
-
- # We only care about reviewed patches, so make sure it has a valid reviewer line.
- reviewer_match = re.search(ChangeLogEntry.reviewed_by_regexp, message, re.MULTILINE)
- # We might also want to validate the reviewer name against the committer list.
- if not reviewer_match or not reviewer_match.group("reviewer"):
- continue
-
- author_name = dateline_match.group("name")
- if not author_name:
+ analysis = {
+ 'counters_by_name': {},
+ 'counters_by_email': {},
+ }
+ for commit_message in self._recent_commit_messages():
+ try:
+ self._count_commit(self._parse_commit_message(commit_message), analysis)
+ except CommitLogError, exception:
continue
-
- if re.search("([^a-zA-Z]and[^a-zA-Z])|(,)|(@)", author_name):
- # This entry seems to have multiple reviewers, or invalid characters, so reject it.
- continue
-
- svn_id_match = re.search(ChangeLogEntry.svn_id_regexp, message, re.MULTILINE)
- if svn_id_match:
- svn_id = svn_id_match.group("svnid")
- if not svn_id_match or not svn_id:
- svn_id = "unknown"
- commit_date = dateline_match.group("date")
-
- # See if we already have a contributor with this name or email
- counter_by_name = self._counters_by_name.get(author_name)
- counter_by_email = self._counters_by_email.get(author_email)
- if counter_by_name:
- if counter_by_email:
- if counter_by_name != counter_by_email:
- # Merge these two counters This is for the case where we had
- # John Smith (jsmith@gmail.com) and Jonathan Smith (jsmith@apple.com)
- # and just found a John Smith (jsmith@apple.com). Now we know the
- # two names are the same person
- counter_by_name['names'] |= counter_by_email['names']
- counter_by_name['emails'] |= counter_by_email['emails']
- counter_by_name['count'] += counter_by_email.get('count', 0)
- self._counters_by_email[author_email] = counter_by_name
- else:
- # Add email to the existing counter
- self._counters_by_email[author_email] = counter_by_name
- counter_by_name['emails'] |= set([author_email])
- else:
- if counter_by_email:
- # Add name to the existing counter
- self._counters_by_name[author_name] = counter_by_email
- counter_by_email['names'] |= set([author_name])
- else:
- # Create new counter
- new_counter = {'names': set([author_name]), 'emails': set([author_email]), 'latest_name': author_name, 'latest_email': author_email, 'commits': ""}
- self._counters_by_name[author_name] = new_counter
- self._counters_by_email[author_email] = new_counter
-
- assert(self._counters_by_name[author_name] == self._counters_by_email[author_email])
- counter = self._counters_by_name[author_name]
- counter['count'] = counter.get('count', 0) + 1
-
- if svn_id.isdigit():
- svn_id = "http://trac.webkit.org/changeset/" + svn_id
- counter['commits'] += " commit: %s on %s by %s (%s)\n" % (svn_id, commit_date, author_name, author_email)
-
- return self._counters_by_email
+ return analysis['counters_by_email']
def _collect_nominations(self, counters_by_email):
nominations = []
@@ -172,7 +231,7 @@ class SuggestNominations(AbstractDeclarativeCommand):
if patch_count >= self.committer_minimum and (not contributor or not contributor.can_commit):
roles.append("committer")
- if patch_count >= self.reviewer_minimum and (not contributor or not contributor.can_review):
+ if patch_count >= self.reviewer_minimum and contributor and contributor.can_commit and not contributor.can_review:
roles.append("reviewer")
if roles:
nominations.append({
@@ -183,7 +242,7 @@ class SuggestNominations(AbstractDeclarativeCommand):
})
return nominations
- def _print_nominations(self, nominations):
+ def _print_nominations(self, nominations, counters_by_email):
def nomination_cmp(a_nomination, b_nomination):
roles_result = cmp(a_nomination['roles'], b_nomination['roles'])
if roles_result:
@@ -197,7 +256,7 @@ class SuggestNominations(AbstractDeclarativeCommand):
# This is a little bit of a hack, but its convienent to just pass the nomination dictionary to the formating operator.
nomination['roles_string'] = join_with_separators(nomination['roles']).upper()
print "%(roles_string)s: %(author_name)s (%(author_email)s) has %(patch_count)s reviewed patches" % nomination
- counter = self._counters_by_email[nomination['author_email']]
+ counter = counters_by_email[nomination['author_email']]
if self.show_commits:
print counter['commits']
@@ -238,10 +297,9 @@ class SuggestNominations(AbstractDeclarativeCommand):
self._init_options(options)
patch_counts = self._count_recent_patches()
nominations = self._collect_nominations(patch_counts)
- self._print_nominations(nominations)
+ self._print_nominations(nominations, patch_counts)
if self.verbose:
self._print_counts(patch_counts)
-
if __name__ == "__main__":
SuggestNominations()
diff --git a/Tools/Scripts/webkitpy/tool/commands/suggestnominations_unittest.py b/Tools/Scripts/webkitpy/tool/commands/suggestnominations_unittest.py
index 88be25303..63054c516 100644
--- a/Tools/Scripts/webkitpy/tool/commands/suggestnominations_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/suggestnominations_unittest.py
@@ -36,7 +36,7 @@ class SuggestNominationsTest(CommandsTest):
mock_git_output = """commit 60831dde5beb22f35aef305a87fca7b5f284c698
Author: fpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
-Date: Thu Sep 15 19:56:21 2011 +0000
+Date: 2011-09-15 19:56:21 +0000
Value profiles collect no information for global variables
https://bugs.webkit.org/show_bug.cgi?id=68143
@@ -45,21 +45,43 @@ Date: Thu Sep 15 19:56:21 2011 +0000
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
"""
- mock_same_author_commit_message = """Value profiles collect no information for global variables
+ mock_same_author_commit_message = """Author: fpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
+Date: 2011-09-15 19:56:21 +0000
+
+Value profiles collect no information for global variables
https://bugs.webkit.org/show_bug.cgi?id=68143
-Reviewed by Geoffrey Garen."""
+Reviewed by Geoffrey Garen.
+
+git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+"""
+
+ def _make_options(self, **kwargs):
+ defaults = {
+ 'committer_minimum': 10,
+ 'max_commit_age': 9,
+ 'reviewer_minimum': 80,
+ 'show_commits': False,
+ 'verbose': False,
+ }
+ options = MockOptions(**defaults)
+ options.update(**kwargs)
+ return options
def test_recent_commit_messages(self):
tool = MockTool()
suggest_nominations = SuggestNominations()
- suggest_nominations._init_options(options=MockOptions(reviewer_minimum=80, committer_minimum=10, max_commit_age=9, show_commits=False, verbose=False))
+ suggest_nominations._init_options(options=self._make_options())
suggest_nominations.bind_to_tool(tool)
tool.executive.run_command = lambda command: self.mock_git_output
self.assertEqual(list(suggest_nominations._recent_commit_messages()), [self.mock_same_author_commit_message])
- mock_non_committer_commit_message = """Let TestWebKitAPI work for chromium
+ mock_non_committer_commit_message = """
+Author: commit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
+Date: 2009-09-15 14:08:42 +0000
+
+Let TestWebKitAPI work for chromium
https://bugs.webkit.org/show_bug.cgi?id=67756
Patch by Xianzhu Wang <wangxianzhu@chromium.org> on 2011-09-15
@@ -67,11 +89,15 @@ Reviewed by Sam Weinig.
Source/WebKit/chromium:
-* WebKit.gyp:"""
+* WebKit.gyp:
+
+git-svn-id: http://svn.webkit.org/repository/webkit/trunk@95188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+"""
def test_basic(self):
expected_stdout = "REVIEWER: Xianzhu Wang (wangxianzhu@chromium.org) has 88 reviewed patches\n"
+ options = self._make_options()
suggest_nominations = SuggestNominations()
- suggest_nominations._init_options(options=MockOptions(reviewer_minimum=80, committer_minimum=10, max_commit_age=9, show_commits=False, verbose=False))
+ suggest_nominations._init_options(options=options)
suggest_nominations._recent_commit_messages = lambda: [self.mock_non_committer_commit_message for _ in range(88)]
- self.assert_execute_outputs(suggest_nominations, [], expected_stdout=expected_stdout, options=MockOptions(reviewer_minimum=80, committer_minimum=10, max_commit_age=9, show_commits=False, verbose=False))
+ self.assert_execute_outputs(suggest_nominations, [], expected_stdout=expected_stdout, options=options)
diff --git a/Tools/Scripts/webkitpy/tool/commands/upload.py b/Tools/Scripts/webkitpy/tool/commands/upload.py
index 5cd0de9e0..69dc4f715 100644
--- a/Tools/Scripts/webkitpy/tool/commands/upload.py
+++ b/Tools/Scripts/webkitpy/tool/commands/upload.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# Copyright (c) 2009, 2010 Google Inc. All rights reserved.
# Copyright (c) 2009 Apple Inc. All rights reserved.
#
@@ -44,12 +43,12 @@ from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCommand
from webkitpy.tool.comments import bug_comment_from_svn_revision
from webkitpy.tool.grammar import pluralize, join_with_separators
-from webkitpy.tool.multicommandtool import AbstractDeclarativeCommand
+from webkitpy.tool.multicommandtool import Command
_log = logging.getLogger(__name__)
-class CommitMessageForCurrentDiff(AbstractDeclarativeCommand):
+class CommitMessageForCurrentDiff(Command):
name = "commit-message"
help_text = "Print a commit message suitable for the uncommitted changes"
@@ -57,7 +56,7 @@ class CommitMessageForCurrentDiff(AbstractDeclarativeCommand):
options = [
steps.Options.git_commit,
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
def execute(self, options, args, tool):
# This command is a useful test to make sure commit_message_for_this_commit
@@ -65,7 +64,7 @@ class CommitMessageForCurrentDiff(AbstractDeclarativeCommand):
print "%s" % tool.checkout().commit_message_for_this_commit(options.git_commit).message()
-class CleanPendingCommit(AbstractDeclarativeCommand):
+class CleanPendingCommit(Command):
name = "clean-pending-commit"
help_text = "Clear r+ on obsolete patches so they do not appear in the pending-commit list."
@@ -95,7 +94,7 @@ class CleanPendingCommit(AbstractDeclarativeCommand):
# FIXME: This should be share more logic with AssignToCommitter and CleanPendingCommit
-class CleanReviewQueue(AbstractDeclarativeCommand):
+class CleanReviewQueue(Command):
name = "clean-review-queue"
help_text = "Clear r? on obsolete patches so they do not appear in the pending-review list."
@@ -120,7 +119,7 @@ class CleanReviewQueue(AbstractDeclarativeCommand):
self._tool.bugs.obsolete_attachment(patch.id(), message)
-class AssignToCommitter(AbstractDeclarativeCommand):
+class AssignToCommitter(Command):
name = "assign-to-committer"
help_text = "Assign bug to whoever attached the most recent r+'d patch"
@@ -242,6 +241,15 @@ class LandSafely(AbstractPatchUploadingCommand):
]
+class HasLanded(AbstractPatchUploadingCommand):
+ name = "has-landed"
+ help_text = "Check that the current code was successfully landed and no changes remain."
+ argument_names = "[BUGID]"
+ steps = [
+ steps.HasLanded,
+ ]
+
+
class Prepare(AbstractSequencedCommand):
name = "prepare"
help_text = "Creates a bug (or prompts for an existing bug) and prepares the ChangeLogs"
@@ -298,7 +306,7 @@ class EditChangeLogs(AbstractSequencedCommand):
]
-class PostCommits(AbstractDeclarativeCommand):
+class PostCommits(Command):
name = "post-commits"
help_text = "Attach a range of local commits to bugs as patch files"
argument_names = "COMMITISH"
@@ -312,7 +320,7 @@ class PostCommits(AbstractDeclarativeCommand):
steps.Options.review,
steps.Options.request_commit,
]
- AbstractDeclarativeCommand.__init__(self, options=options, requires_local_commits=True)
+ Command.__init__(self, options=options, requires_local_commits=True)
def _comment_text_for_commit(self, options, commit_message, tool, commit_id):
comment_text = None
@@ -350,7 +358,7 @@ class PostCommits(AbstractDeclarativeCommand):
# FIXME: This command needs to be brought into the modern age with steps and CommitInfo.
-class MarkBugFixed(AbstractDeclarativeCommand):
+class MarkBugFixed(Command):
name = "mark-bug-fixed"
help_text = "Mark the specified bug as fixed"
argument_names = "[SVN_REVISION]"
@@ -361,7 +369,7 @@ class MarkBugFixed(AbstractDeclarativeCommand):
make_option("--open", action="store_true", default=False, dest="open_bug", help="Open bug in default web browser (Mac only)."),
make_option("--update-only", action="store_true", default=False, dest="update_only", help="Add comment to the bug, but do not close it."),
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
# FIXME: We should be using checkout().changelog_entries_for_revision(...) instead here.
def _fetch_commit_log(self, tool, svn_revision):
@@ -431,7 +439,7 @@ class MarkBugFixed(AbstractDeclarativeCommand):
# FIXME: Requires unit test. Blocking issue: too complex for now.
-class CreateBug(AbstractDeclarativeCommand):
+class CreateBug(Command):
name = "create-bug"
help_text = "Create a bug from local changes or local commits"
argument_names = "[COMMITISH]"
@@ -444,7 +452,7 @@ class CreateBug(AbstractDeclarativeCommand):
make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review."),
make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review."),
]
- AbstractDeclarativeCommand.__init__(self, options=options)
+ Command.__init__(self, options=options)
def create_bug_from_commit(self, options, args, tool):
commit_ids = tool.scm().commit_ids_from_commitish_arguments(args)
diff --git a/Tools/Scripts/webkitpy/tool/comments.py b/Tools/Scripts/webkitpy/tool/comments.py
index 771953e69..771953e69 100755..100644
--- a/Tools/Scripts/webkitpy/tool/comments.py
+++ b/Tools/Scripts/webkitpy/tool/comments.py
diff --git a/Tools/Scripts/webkitpy/tool/gcovr b/Tools/Scripts/webkitpy/tool/gcovr
new file mode 100755
index 000000000..e4a1f8850
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/gcovr
@@ -0,0 +1,1029 @@
+#! /usr/bin/env python
+#
+# A report generator for gcov 3.4
+#
+# This routine generates a format that is similar to the format generated
+# by the Python coverage.py module. This code is similar to the
+# data processing performed by lcov's geninfo command. However, we
+# don't worry about parsing the *.gcna files, and backwards compatibility for
+# older versions of gcov is not supported.
+#
+# Outstanding issues
+# - verify that gcov 3.4 or newer is being used
+# - verify support for symbolic links
+#
+# gcovr is a FAST project. For documentation, bug reporting, and
+# updates, see https://software.sandia.gov/trac/fast/wiki/gcovr
+#
+# _________________________________________________________________________
+#
+# FAST: Utilities for Agile Software Development
+# Copyright (c) 2008 Sandia Corporation.
+# This software is distributed under the BSD License.
+# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
+# the U.S. Government retains certain rights in this software.
+# For more information, see the FAST README.txt file.
+#
+# $Revision: 2839 $
+# $Date: 2013-05-27 11:13:17 -0700 (Mon, 27 May 2013) $
+# _________________________________________________________________________
+#
+
+import copy
+import glob
+import os
+import re
+import subprocess
+import sys
+import time
+import xml.dom.minidom
+
+from optparse import OptionParser
+from string import Template
+from os.path import normpath
+
+__version__ = "2.5-prerelease"
+src_revision = "$Revision: 2839 $"
+gcov_cmd = "gcov"
+
+output_re = re.compile("[Cc]reating [`'](.*)'$")
+source_re = re.compile("cannot open (source|graph) file")
+
+starting_dir = os.getcwd()
+
+
+def version_str():
+ ans = __version__
+ m = re.match('\$Revision:\s*(\S+)\s*\$', src_revision)
+ if m:
+ ans = ans + " (r%s)" % (m.group(1))
+ return ans
+
+#
+# Container object for coverage statistics
+#
+class CoverageData(object):
+
+ def __init__(self, fname, uncovered, uncovered_exceptional, covered, branches, noncode):
+ self.fname=fname
+ # Shallow copies are cheap & "safe" because the caller will
+ # throw away their copies of covered & uncovered after calling
+ # us exactly *once*
+ self.uncovered = copy.copy(uncovered)
+ self.uncovered_exceptional = copy.copy(uncovered_exceptional)
+ self.covered = copy.copy(covered)
+ self.noncode = copy.copy(noncode)
+ # But, a deep copy is required here
+ self.all_lines = copy.deepcopy(uncovered)
+ self.all_lines.update(uncovered_exceptional)
+ self.all_lines.update(covered.keys())
+ self.branches = copy.deepcopy(branches)
+
+ def update(self, uncovered, uncovered_exceptional, covered, branches, noncode):
+ self.all_lines.update(uncovered)
+ self.all_lines.update(uncovered_exceptional)
+ self.all_lines.update(covered.keys())
+ self.uncovered.update(uncovered)
+ self.uncovered_exceptional.update(uncovered_exceptional)
+ self.noncode.intersection_update(noncode)
+ for k in covered.keys():
+ self.covered[k] = self.covered.get(k,0) + covered[k]
+ for k in branches.keys():
+ for b in branches[k]:
+ d = self.branches.setdefault(k, {})
+ d[b] = d.get(b, 0) + branches[k][b]
+ self.uncovered.difference_update(self.covered.keys())
+ self.uncovered_exceptional.difference_update(self.covered.keys())
+
+ def uncovered_str(self, exceptional):
+ if options.show_branch:
+ # Don't do any aggregation on branch results
+ tmp = []
+ for line in self.branches.keys():
+ for branch in self.branches[line]:
+ if self.branches[line][branch] == 0:
+ tmp.append(line)
+ break
+
+ tmp.sort()
+ return ",".join([str(x) for x in tmp]) or ""
+
+ if exceptional:
+ tmp = list(self.uncovered_exceptional)
+ else:
+ tmp = list(self.uncovered)
+ if len(tmp) == 0:
+ return ""
+
+ tmp.sort()
+ first = None
+ last = None
+ ranges=[]
+ for item in tmp:
+ if last is None:
+ first=item
+ last=item
+ elif item == (last+1):
+ last=item
+ else:
+ if len(self.noncode.intersection(range(last+1,item))) \
+ == item - last - 1:
+ last = item
+ continue
+
+ if first==last:
+ ranges.append(str(first))
+ else:
+ ranges.append(str(first)+"-"+str(last))
+ first=item
+ last=item
+ if first==last:
+ ranges.append(str(first))
+ else:
+ ranges.append(str(first)+"-"+str(last))
+ return ",".join(ranges)
+
+ def coverage(self):
+ if ( options.show_branch ):
+ total = 0
+ cover = 0
+ for line in self.branches.keys():
+ for branch in self.branches[line].keys():
+ total += 1
+ cover += self.branches[line][branch] > 0 and 1 or 0
+ else:
+ total = len(self.all_lines)
+ cover = len(self.covered)
+
+ percent = total and str(int(100.0*cover/total)) or "--"
+ return (total, cover, percent)
+
+ def summary(self):
+ tmp = options.filter.sub('',self.fname)
+ if not self.fname.endswith(tmp):
+ # Do no truncation if the filter does not start matching at
+ # the beginning of the string
+ tmp = self.fname
+ tmp = tmp.ljust(40)
+ if len(tmp) > 40:
+ tmp=tmp+"\n"+" "*40
+
+ (total, cover, percent) = self.coverage()
+ uncovered_lines = self.uncovered_str(False)
+ if not options.show_branch:
+ t = self.uncovered_str(True)
+ if len(t):
+ uncovered_lines += " [* " + t + "]";
+ return ( total, cover,
+ tmp + str(total).rjust(8) + str(cover).rjust(8) + \
+ percent.rjust(6) + "% " + uncovered_lines )
+
+
+def resolve_symlinks(orig_path):
+ """
+ Return the normalized absolute path name with all symbolic links resolved
+ """
+ drive,tmp = os.path.splitdrive(os.path.abspath(orig_path))
+ if not drive:
+ drive = os.path.sep
+ parts = tmp.split(os.path.sep)
+ actual_path = [drive]
+ while parts:
+ actual_path.append(parts.pop(0))
+ if not os.path.islink(os.path.join(*actual_path)):
+ continue
+ actual_path[-1] = os.readlink(os.path.join(*actual_path))
+ tmp_drive, tmp_path = os.path.splitdrive(
+ resolve_symlinks(os.path.join(*actual_path)) )
+ if tmp_drive:
+ drive = tmp_drive
+ actual_path = [drive] + tmp_path.split(os.path.sep)
+ return os.path.join(*actual_path)
+
+
+def path_startswith(path, base):
+ return path.startswith(base) and (
+ len(base) == len(path) or path[len(base)] == os.path.sep )
+
+
+class PathAliaser(object):
+ def __init__(self):
+ self.aliases = {}
+ self.master_targets = set()
+ self.preferred_name = {}
+
+ def master_path(self, path):
+ match_found = False
+ while True:
+ for base, alias in self.aliases.items():
+ if path_startswith(path, base):
+ path = alias + path[len(base):]
+ match_found = True
+ break
+ for master_base in self.master_targets:
+ if path_startswith(path, master_base):
+ return path, master_base, True
+ if match_found:
+ sys.stderr.write(
+ "(ERROR) violating fundamental assumption while walking "
+ "directory tree.\n\tPlease report this to the gcovr "
+ "developers.\n" )
+ return path, None, match_found
+
+ def unalias_path(self, path):
+ path = resolve_symlinks(path)
+ path, master_base, known_path = self.master_path(path)
+ if not known_path:
+ return path
+ # Try and resolve the preferred name for this location
+ if master_base in self.preferred_name:
+ return self.preferred_name[master_base] + path[len(master_base):]
+ return path
+
+ def add_master_target(self, master):
+ self.master_targets.add(master)
+
+ def add_alias(self, target, master):
+ self.aliases[target] = master
+
+ def set_preferred(self, master, preferred):
+ self.preferred_name[master] = preferred
+
+aliases = PathAliaser()
+
+# This is UGLY. Here's why: UNIX resolves symbolic links by walking the
+# entire directory structure. What that means is that relative links
+# are always relative to the actual directory inode, and not the
+# "virtual" path that the user might have traversed (over symlinks) on
+# the way to that directory. Here's the canonical example:
+#
+# a / b / c / testfile
+# a / d / e --> ../../a/b
+# m / n --> /a
+# x / y / z --> /m/n/d
+#
+# If we start in "y", we will see the following directory structure:
+# y
+# |-- z
+# |-- e
+# |-- c
+# |-- testfile
+#
+# The problem is that using a simple traversal based on the Python
+# documentation:
+#
+# (os.path.join(os.path.dirname(path), os.readlink(result)))
+#
+# will not work: we will see a link to /m/n/d from /x/y, but completely
+# miss the fact that n is itself a link. If we then naively attempt to
+# apply the "c" relative link, we get an intermediate path that looks
+# like "/m/n/d/e/../../a/b", which would get normalized to "/m/n/a/b"; a
+# nonexistant path. The solution is that we need to walk the original
+# path, along with the full path of all links 1 directory at a time and
+# check for embedded symlinks.
+#
+def link_walker(path):
+ targets = [os.path.abspath(path)]
+ while targets:
+ target_dir = targets.pop(0)
+ actual_dir = resolve_symlinks(target_dir)
+ #print "target dir: %s (%s)" % (target_dir, actual_dir)
+ master_name, master_base, visited = aliases.master_path(actual_dir)
+ if visited:
+ #print " ...root already visited as %s" % master_name
+ aliases.add_alias(target_dir, master_name)
+ continue
+ if master_name != target_dir:
+ aliases.set_preferred(master_name, target_dir)
+ aliases.add_alias(target_dir, master_name)
+ aliases.add_master_target(master_name)
+ #print " ...master name = %s" % master_name
+ #print " ...walking %s" % target_dir
+ for root, dirs, files in os.walk(target_dir, topdown=True):
+ #print " ...reading %s" % root
+ for d in dirs:
+ tmp = os.path.abspath(os.path.join(root, d))
+ #print " ...checking %s" % tmp
+ if os.path.islink(tmp):
+ #print " ...buffering link %s" % tmp
+ targets.append(tmp)
+ yield root, dirs, files
+
+
+def search_file(expr, path):
+ """
+ Given a search path, recursively descend to find files that match a
+ regular expression.
+ """
+ ans = []
+ pattern = re.compile(expr)
+ if path is None or path == ".":
+ path = os.getcwd()
+ elif not os.path.exists(path):
+ raise IOError("Unknown directory '"+path+"'")
+ for root, dirs, files in link_walker(path):
+ for name in files:
+ if pattern.match(name):
+ name = os.path.join(root,name)
+ if os.path.islink(name):
+ ans.append( os.path.abspath(os.readlink(name)) )
+ else:
+ ans.append( os.path.abspath(name) )
+ return ans
+
+
+#
+# Get the list of datafiles in the directories specified by the user
+#
+def get_datafiles(flist, options):
+ allfiles=[]
+ for dir in flist:
+ if options.verbose:
+ sys.stdout.write( "Scanning directory %s for gcda/gcno files...\n"
+ % (dir, ) )
+ files = search_file(".*\.gc(da|no)$", dir)
+ # gcno files will *only* produce uncovered results; however,
+ # that is useful information for the case where a compilation
+ # unit is never actually exercised by the test code. So, we
+ # will process gcno files, but ONLY if there is no corresponding
+ # gcda file.
+ gcda_files = [file for file in files if file.endswith('gcda')]
+ tmp = set(gcda_files)
+ gcno_files = [ file for file in files if
+ file.endswith('gcno') and file[:-2]+'da' not in tmp ]
+ if options.verbose:
+ sys.stdout.write(
+ "Found %d files (and will process %d)\n" %
+ ( len(files), len(gcda_files) + len(gcno_files) ) )
+ allfiles.extend(gcda_files)
+ allfiles.extend(gcno_files)
+ return allfiles
+
+
+def process_gcov_data(file, covdata, options):
+ INPUT = open(file,"r")
+ #
+ # Get the filename
+ #
+ line = INPUT.readline()
+ segments=line.split(':',3)
+ if len(segments) != 4 or not segments[2].lower().strip().endswith('source'):
+ raise RuntimeError('Fatal error parsing gcov file, line 1: \n\t"%s"' % line.rstrip())
+ currdir = os.getcwd()
+ os.chdir(starting_dir)
+ fname = aliases.unalias_path(os.path.abspath((segments[-1]).strip()))
+ os.chdir(currdir)
+ if options.verbose:
+ sys.stdout.write("Parsing coverage data for file %s\n" % fname)
+ #
+ # Return if the filename does not match the filter
+ #
+ if not options.filter.match(fname):
+ if options.verbose:
+ sys.stdout.write(" Filtering coverage data for file %s\n" % fname)
+ return
+ #
+ # Return if the filename matches the exclude pattern
+ #
+ for i in range(0,len(options.exclude)):
+ if options.exclude[i].match(options.filter.sub('',fname)) or \
+ options.exclude[i].match(fname) or \
+ options.exclude[i].match(os.path.abspath(fname)):
+ if options.verbose:
+ sys.stdout.write(" Excluding coverage data for file %s\n" % fname)
+ return
+ #
+ # Parse each line, and record the lines
+ # that are uncovered
+ #
+ noncode = set()
+ uncovered = set()
+ uncovered_exceptional = set()
+ covered = {}
+ branches = {}
+ #first_record=True
+ lineno = 0
+ for line in INPUT:
+ segments=line.split(":",2)
+ #print "HERE", segments
+ tmp = segments[0].strip()
+ if len(segments) > 1:
+ try:
+ lineno = int(segments[1].strip())
+ except:
+ pass # keep previous line number!
+
+ if tmp[0] == '#':
+ uncovered.add( lineno )
+ elif tmp[0] == '=':
+ uncovered_exceptional.add( lineno )
+ elif tmp[0] in "0123456789":
+ covered[lineno] = int(segments[0].strip())
+ elif tmp[0] == '-':
+ # remember certain non-executed lines
+ code = segments[2].strip()
+ if len(code) == 0 or code == "{" or code == "}" or \
+ code.startswith("//") or code == 'else':
+ noncode.add( lineno )
+ elif tmp.startswith('branch'):
+ fields = line.split()
+ try:
+ count = int(fields[3])
+ branches.setdefault(lineno, {})[int(fields[1])] = count
+ except:
+ # We ignore branches that were "never executed"
+ pass
+ elif tmp.startswith('call'):
+ pass
+ elif tmp.startswith('function'):
+ pass
+ elif tmp[0] == 'f':
+ pass
+ #if first_record:
+ #first_record=False
+ #uncovered.add(prev)
+ #if prev in uncovered:
+ #tokens=re.split('[ \t]+',tmp)
+ #if tokens[3] != "0":
+ #uncovered.remove(prev)
+ #prev = int(segments[1].strip())
+ #first_record=True
+ else:
+ sys.stderr.write(
+ "(WARNING) Unrecognized GCOV output: '%s'\n"
+ "\tThis is indicitive of a gcov output parse error.\n"
+ "\tPlease report this to the gcovr developers." % tmp )
+ ##print 'uncovered',uncovered
+ ##print 'covered',covered
+ ##print 'branches',branches
+ ##print 'noncode',noncode
+ #
+ # If the file is already in covdata, then we
+ # remove lines that are covered here. Otherwise,
+ # initialize covdata
+ #
+ if not fname in covdata:
+ covdata[fname] = CoverageData(fname,uncovered,uncovered_exceptional,covered,branches,noncode)
+ else:
+ covdata[fname].update(uncovered,uncovered_exceptional,covered,branches,noncode)
+ INPUT.close()
+
+#
+# Process a datafile (generated by running the instrumented application)
+# and run gcov with the corresponding arguments
+#
+# This is trickier than it sounds: The gcda/gcno files are stored in the
+# same directory as the object files; however, gcov must be run from the
+# same directory where gcc/g++ was run. Normally, the user would know
+# where gcc/g++ was invoked from and could tell gcov the path to the
+# object (and gcda) files with the --object-directory command.
+# Unfortunately, we do everything backwards: gcovr looks for the gcda
+# files and then has to infer the original gcc working directory.
+#
+# In general, (but not always) we can assume that the gcda file is in a
+# subdirectory of the original gcc working directory, so we will first
+# try ".", and on error, move up the directory tree looking for the
+# correct working directory (letting gcov's own error codes dictate when
+# we hit the right directory). This covers 90+% of the "normal" cases.
+# The exception to this is if gcc was invoked with "-o ../[...]" (i.e.,
+# the object directory was a peer (not a parent/child) of the cwd. In
+# this case, things are really tough. We accept an argument
+# (--object-directory) that SHOULD BE THE SAME as the one povided to
+# gcc. We will then walk that path (backwards) in the hopes of
+# identifying the original gcc working directory (there is a bit of
+# trial-and-error here)
+#
+def process_datafile(filename, covdata, options):
+ #
+ # Launch gcov
+ #
+ abs_filename = os.path.abspath(filename)
+ (dirname,fname) = os.path.split(abs_filename)
+ #(name,ext) = os.path.splitext(base)
+
+ potential_wd = []
+ errors=[]
+ Done = False
+
+ if options.objdir:
+ src_components = abs_filename.split(os.sep)
+ components = normpath(options.objdir).split(os.sep)
+ idx = 1
+ while idx <= len(components):
+ if idx > len(src_components):
+ break
+ if components[-1*idx] != src_components[-1*idx]:
+ break
+ idx += 1
+ if idx > len(components):
+ pass # a parent dir; the normal process will find it
+ elif components[-1*idx] == '..':
+ dirs = [ os.path.join(src_components[:len(src_components)-idx+1]) ]
+ while idx <= len(components) and components[-1*idx] == '..':
+ tmp = []
+ for d in dirs:
+ for f in os.listdir(d):
+ x = os.path.join(d,f)
+ if os.path.isdir(x):
+ tmp.append(x)
+ dirs = tmp
+ idx += 1
+ potential_wd = dirs
+ else:
+ if components[0] == '':
+ # absolute path
+ tmp = [ options.objdir ]
+ else:
+ # relative path: check relative to both the cwd and the
+ # gcda file
+ tmp = [ os.path.join(x, options.objdir) for x in
+ [os.path.dirname(abs_filename), os.getcwd()] ]
+ potential_wd = [ testdir for testdir in tmp
+ if os.path.isdir(testdir) ]
+ if len(potential_wd) == 0:
+ errors.append("ERROR: cannot identify the location where GCC "
+ "was run using --object-directory=%s\n" %
+ options.objdir)
+ # Revert to the normal
+ #sys.exit(1)
+
+ # no objdir was specified (or it was a parent dir); walk up the dir tree
+ if len(potential_wd) == 0:
+ wd = os.path.split(abs_filename)[0]
+ while True:
+ potential_wd.append(wd)
+ wd = os.path.split(wd)[0]
+ if wd == potential_wd[-1]:
+ break
+
+ cmd = [ gcov_cmd, abs_filename,
+ "--branch-counts", "--branch-probabilities", "--preserve-paths",
+ '--object-directory', dirname ]
+
+ # NB: We are lazy English speakers, so we will only parse English output
+ env = dict(os.environ)
+ env['LC_ALL'] = 'en_US'
+
+
+ while len(potential_wd) > 0 and not Done:
+ # NB: either len(potential_wd) == 1, or all entires are absolute
+ # paths, so we don't have to chdir(starting_dir) at every
+ # iteration.
+ os.chdir(potential_wd.pop(0))
+
+
+ #if options.objdir:
+ # cmd.extend(["--object-directory", Template(options.objdir).substitute(filename=filename, head=dirname, tail=base, root=name, ext=ext)])
+
+ if options.verbose:
+ sys.stdout.write("Running gcov: '%s' in '%s'\n" % ( ' '.join(cmd), os.getcwd() ))
+ (out, err) = subprocess.Popen( cmd, env=env,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE ).communicate()
+ out=out.decode('utf-8')
+ err=err.decode('utf-8')
+
+ # find the files that gcov created
+ gcov_files = {'active':[], 'filter':[], 'exclude':[]}
+ for line in out.splitlines():
+ found = output_re.search(line.strip())
+ if found is not None:
+ fname = found.group(1)
+ if not options.gcov_filter.match(fname):
+ if options.verbose:
+ sys.stdout.write("Filtering gcov file %s\n" % fname)
+ gcov_files['filter'].append(fname)
+ continue
+ exclude=False
+ for i in range(0,len(options.gcov_exclude)):
+ if options.gcov_exclude[i].match(options.gcov_filter.sub('',fname)) or \
+ options.gcov_exclude[i].match(fname) or \
+ options.gcov_exclude[i].match(os.path.abspath(fname)):
+ exclude=True
+ break
+ if not exclude:
+ gcov_files['active'].append(fname)
+ elif options.verbose:
+ sys.stdout.write("Excluding gcov file %s\n" % fname)
+ gcov_files['exclude'].append(fname)
+
+ if source_re.search(err):
+ # gcov tossed errors: try the next potential_wd
+ errors.append(err)
+ else:
+ # Process *.gcov files
+ for fname in gcov_files['active']:
+ process_gcov_data(fname, covdata, options)
+ Done = True
+
+ if not options.keep:
+ for group in gcov_files.values():
+ for fname in group:
+ if os.path.exists(fname):
+ # Only remove files that actually exist.
+ os.remove(fname)
+
+ os.chdir(starting_dir)
+ if options.delete:
+ if not abs_filename.endswith('gcno'):
+ os.remove(abs_filename)
+
+ if not Done:
+ sys.stderr.write(
+ "(WARNING) GCOV produced the following errors processing %s:\n"
+ "\t %s"
+ "\t(gcovr could not infer a working directory that resolved it.)\n"
+ % ( filename, "\t ".join(errors) ) )
+
+#
+# Produce the classic gcovr text report
+#
+def print_text_report(covdata):
+ def _num_uncovered(key):
+ (total, covered, percent) = covdata[key].coverage()
+ return total - covered
+ def _percent_uncovered(key):
+ (total, covered, percent) = covdata[key].coverage()
+ if covered:
+ return -1.0*covered/total
+ else:
+ return total or 1e6
+ def _alpha(key):
+ return key
+
+ if options.output:
+ OUTPUT = open(options.output,'w')
+ else:
+ OUTPUT = sys.stdout
+ total_lines=0
+ total_covered=0
+ # Header
+ OUTPUT.write("-"*78 + '\n')
+ a = options.show_branch and "Branches" or "Lines"
+ b = options.show_branch and "Taken" or "Exec"
+ c = "Missing"
+ OUTPUT.write("File".ljust(40) + a.rjust(8) + b.rjust(8)+ " Cover " + c + "\n")
+ OUTPUT.write("-"*78 + '\n')
+
+ # Data
+ keys = list(covdata.keys())
+ keys.sort(key=options.sort_uncovered and _num_uncovered or \
+ options.sort_percent and _percent_uncovered or _alpha)
+ for key in keys:
+ (t, n, txt) = covdata[key].summary()
+ total_lines += t
+ total_covered += n
+ OUTPUT.write(txt + '\n')
+
+ # Footer & summary
+ OUTPUT.write("-"*78 + '\n')
+ percent = total_lines and str(int(100.0*total_covered/total_lines)) or "--"
+ OUTPUT.write("TOTAL".ljust(40) + str(total_lines).rjust(8) + \
+ str(total_covered).rjust(8) + str(percent).rjust(6)+"%" + '\n')
+ OUTPUT.write("-"*78 + '\n')
+
+ # Close logfile
+ if options.output:
+ OUTPUT.close()
+
+#
+# Produce an XML report in the Cobertura format
+#
+def print_xml_report(covdata):
+ branchTotal = 0
+ branchCovered = 0
+ lineTotal = 0
+ lineCovered = 0
+
+ options.show_branch = True
+ for key in covdata.keys():
+ (total, covered, percent) = covdata[key].coverage()
+ branchTotal += total
+ branchCovered += covered
+
+ options.show_branch = False
+ for key in covdata.keys():
+ (total, covered, percent) = covdata[key].coverage()
+ lineTotal += total
+ lineCovered += covered
+
+ impl = xml.dom.minidom.getDOMImplementation()
+ docType = impl.createDocumentType(
+ "coverage", None,
+ "http://cobertura.sourceforge.net/xml/coverage-03.dtd" )
+ doc = impl.createDocument(None, "coverage", docType)
+ root = doc.documentElement
+ root.setAttribute( "line-rate", lineTotal == 0 and '0.0' or
+ str(float(lineCovered) / lineTotal) )
+ root.setAttribute( "branch-rate", branchTotal == 0 and '0.0' or
+ str(float(branchCovered) / branchTotal) )
+ root.setAttribute( "timestamp", str(int(time.time())) )
+ root.setAttribute( "version", "gcovr %s" % (version_str(),) )
+
+ # Generate the <sources> element: this is either the root directory
+ # (specified by --root), or the CWD.
+ sources = doc.createElement("sources")
+ root.appendChild(sources)
+
+ # Generate the coverage output (on a per-package basis)
+ packageXml = doc.createElement("packages")
+ root.appendChild(packageXml)
+ packages = {}
+ source_dirs = set()
+
+ keys = list(covdata.keys())
+ keys.sort()
+ for f in keys:
+ data = covdata[f]
+ dir = options.filter.sub('',f)
+ if f.endswith(dir):
+ src_path = f[:-1*len(dir)]
+ if len(src_path) > 0:
+ while dir.startswith(os.path.sep):
+ src_path += os.path.sep
+ dir = dir[len(os.path.sep):]
+ source_dirs.add(src_path)
+ else:
+ # Do no truncation if the filter does not start matching at
+ # the beginning of the string
+ dir = f
+ (dir, fname) = os.path.split(dir)
+
+ package = packages.setdefault(
+ dir, [ doc.createElement("package"), {},
+ 0, 0, 0, 0 ] )
+ c = doc.createElement("class")
+ lines = doc.createElement("lines")
+ c.appendChild(lines)
+
+ class_lines = 0
+ class_hits = 0
+ class_branches = 0
+ class_branch_hits = 0
+ for line in data.all_lines:
+ hits = data.covered.get(line, 0)
+ class_lines += 1
+ if hits > 0:
+ class_hits += 1
+ l = doc.createElement("line")
+ l.setAttribute("number", str(line))
+ l.setAttribute("hits", str(hits))
+ branches = data.branches.get(line)
+ if branches is None:
+ l.setAttribute("branch", "false")
+ else:
+ b_hits = 0
+ for v in branches.values():
+ if v > 0:
+ b_hits += 1
+ coverage = 100*b_hits/len(branches)
+ l.setAttribute("branch", "true")
+ l.setAttribute( "condition-coverage",
+ "%i%% (%i/%i)" %
+ (coverage, b_hits, len(branches)) )
+ cond = doc.createElement('condition')
+ cond.setAttribute("number", "0")
+ cond.setAttribute("type", "jump")
+ cond.setAttribute("coverage", "%i%%" % ( coverage ) )
+ class_branch_hits += b_hits
+ class_branches += float(len(branches))
+ conditions = doc.createElement("conditions")
+ conditions.appendChild(cond)
+ l.appendChild(conditions)
+
+ lines.appendChild(l)
+
+ className = fname.replace('.', '_')
+ c.setAttribute("name", className)
+ c.setAttribute("filename", os.path.join(dir, fname))
+ c.setAttribute("line-rate", str(class_hits / (1.0*class_lines or 1.0)))
+ c.setAttribute( "branch-rate",
+ str(class_branch_hits / (1.0*class_branches or 1.0)) )
+ c.setAttribute("complexity", "0.0")
+
+ package[1][className] = c
+ package[2] += class_hits
+ package[3] += class_lines
+ package[4] += class_branch_hits
+ package[5] += class_branches
+
+ for packageName, packageData in packages.items():
+ package = packageData[0];
+ packageXml.appendChild(package)
+ classes = doc.createElement("classes")
+ package.appendChild(classes)
+ classNames = list(packageData[1].keys())
+ classNames.sort()
+ for className in classNames:
+ classes.appendChild(packageData[1][className])
+ package.setAttribute("name", packageName.replace(os.sep, '.'))
+ package.setAttribute("line-rate", str(packageData[2]/(1.0*packageData[3] or 1.0)))
+ package.setAttribute( "branch-rate", str(packageData[4] / (1.0*packageData[5] or 1.0) ))
+ package.setAttribute("complexity", "0.0")
+
+
+ # Populate the <sources> element: this is either the root directory
+ # (specified by --root), or relative directories based
+ # on the filter, or the CWD
+ if options.root is not None:
+ source = doc.createElement("source")
+ source.appendChild(doc.createTextNode(options.root.strip()))
+ sources.appendChild(source)
+ elif len(source_dirs) > 0:
+ cwd = os.getcwd()
+ for d in source_dirs:
+ source = doc.createElement("source")
+ if d.startswith(cwd):
+ reldir = d[len(cwd):].lstrip(os.path.sep)
+ elif cwd.startswith(d):
+ i = 1
+ while normpath(d) != normpath(os.path.join(*tuple([cwd]+['..']*i))):
+ i += 1
+ reldir = os.path.join(*tuple(['..']*i))
+ else:
+ reldir = d
+ source.appendChild(doc.createTextNode(reldir.strip()))
+ sources.appendChild(source)
+ else:
+ source = doc.createElement("source")
+ source.appendChild(doc.createTextNode('.'))
+ sources.appendChild(source)
+
+ if options.prettyxml:
+ import textwrap
+ lines = doc.toprettyxml(" ").split('\n')
+ for i in xrange(len(lines)):
+ n=0
+ while n < len(lines[i]) and lines[i][n] == " ":
+ n += 1
+ lines[i] = "\n".join(textwrap.wrap(lines[i], 78, break_long_words=False, break_on_hyphens=False, subsequent_indent=" "+ n*" "))
+ xmlString = "\n".join(lines)
+ #print textwrap.wrap(doc.toprettyxml(" "), 80)
+ else:
+ xmlString = doc.toprettyxml(indent="")
+ if options.output is None:
+ sys.stdout.write(xmlString+'\n')
+ else:
+ OUTPUT = open(options.output, 'w')
+ OUTPUT.write(xmlString +'\n')
+ OUTPUT.close()
+
+
+##
+## MAIN
+##
+
+#
+# Create option parser
+#
+parser = OptionParser()
+parser.add_option("--version",
+ help="Print the version number, then exit",
+ action="store_true",
+ dest="version",
+ default=False)
+parser.add_option("-v","--verbose",
+ help="Print progress messages",
+ action="store_true",
+ dest="verbose",
+ default=False)
+parser.add_option('--object-directory',
+ help="Specify the directory that contains the gcov data files. gcovr must be able to identify the path between the *.gcda files and the directory where gcc was originally run. Normally, gcovr can guess correctly. This option overrides gcovr's normal path detection and can specify either the path from gcc to the gcda file (i.e. what was passed to gcc's '-o' option), or the path from the gcda file to gcc's original working directory.",
+ action="store",
+ dest="objdir",
+ default=None)
+parser.add_option("-o","--output",
+ help="Print output to this filename",
+ action="store",
+ dest="output",
+ default=None)
+parser.add_option("-k","--keep",
+ help="Keep the temporary *.gcov files generated by gcov. By default, these are deleted.",
+ action="store_true",
+ dest="keep",
+ default=False)
+parser.add_option("-d","--delete",
+ help="Delete the coverage files after they are processed. These are generated by the users's program, and by default gcovr does not remove these files.",
+ action="store_true",
+ dest="delete",
+ default=False)
+parser.add_option("-f","--filter",
+ help="Keep only the data files that match this regular expression",
+ action="store",
+ dest="filter",
+ default=None)
+parser.add_option("-e","--exclude",
+ help="Exclude data files that match this regular expression",
+ action="append",
+ dest="exclude",
+ default=[])
+parser.add_option("--gcov-filter",
+ help="Keep only gcov data files that match this regular expression",
+ action="store",
+ dest="gcov_filter",
+ default=None)
+parser.add_option("--gcov-exclude",
+ help="Exclude gcov data files that match this regular expression",
+ action="append",
+ dest="gcov_exclude",
+ default=[])
+parser.add_option("-r","--root",
+ help="Defines the root directory. This is used to filter the files, and to standardize the output.",
+ action="store",
+ dest="root",
+ default=None)
+parser.add_option("-x","--xml",
+ help="Generate XML instead of the normal tabular output.",
+ action="store_true",
+ dest="xml",
+ default=False)
+parser.add_option("--xml-pretty",
+ help="Generate pretty XML instead of the normal dense format.",
+ action="store_true",
+ dest="prettyxml",
+ default=False)
+parser.add_option("-b","--branches",
+ help="Tabulate the branch coverage instead of the line coverage.",
+ action="store_true",
+ dest="show_branch",
+ default=None)
+parser.add_option("-u","--sort-uncovered",
+ help="Sort entries by increasing number of uncovered lines.",
+ action="store_true",
+ dest="sort_uncovered",
+ default=None)
+parser.add_option("-p","--sort-percentage",
+ help="Sort entries by decreasing percentage of covered lines.",
+ action="store_true",
+ dest="sort_percent",
+ default=None)
+parser.usage="gcovr [options]"
+parser.description="A utility to run gcov and generate a simple report that summarizes the coverage"
+#
+# Process options
+#
+(options, args) = parser.parse_args(args=sys.argv)
+if options.version:
+ sys.stdout.write(
+ "gcovr %s\n"
+ "\n"
+ "Copyright (2008) Sandia Corporation. Under the terms of Contract\n"
+ "DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government\n"
+ "retains certain rights in this software.\n"
+ % (version_str(),) )
+ sys.exit(0)
+if options.objdir:
+ tmp = options.objdir.replace('/',os.sep).replace('\\',os.sep)
+ while os.sep+os.sep in tmp:
+ tmp = tmp.replace(os.sep+os.sep, os.sep)
+ if normpath(options.objdir) != tmp:
+ sys.stderr.write(
+ "(WARNING) relative referencing in --object-directory.\n"
+ "\tthis could cause strange errors when gcovr attempts to\n"
+ "\tidentify the original gcc working directory.\n")
+#
+# Setup filters
+#
+for i in range(0,len(options.exclude)):
+ options.exclude[i] = re.compile(options.exclude[i])
+if options.filter is not None:
+ options.filter = re.compile(options.filter)
+elif options.root is not None:
+ if not options.root:
+ sys.stderr.write(
+ "(ERROR) empty --root option.\n"
+ "\tRoot specifies the path to the root directory of your project.\n"
+ "\tThis option cannot be an empty string.\n")
+ sys.exit(1)
+ options.filter = re.compile(re.escape(os.path.abspath(options.root)+os.sep))
+if options.filter is None:
+ options.filter = re.compile('')
+#
+for i in range(0,len(options.gcov_exclude)):
+ options.gcov_exclude[i] = re.compile(options.gcov_exclude[i])
+if options.gcov_filter is not None:
+ options.gcov_filter = re.compile(options.gcov_filter)
+else:
+ options.gcov_filter = re.compile('')
+#
+# Get data files
+#
+if len(args) == 1:
+ datafiles = get_datafiles(["."], options)
+else:
+ datafiles = get_datafiles(args[1:], options)
+#
+# Get coverage data
+#
+covdata = {}
+for file in datafiles:
+ process_datafile(file,covdata,options)
+if options.verbose:
+ sys.stdout.write("Gathered coveraged data for "+str(len(covdata))+" files\n")
+#
+# Print report
+#
+if options.xml or options.prettyxml:
+ print_xml_report(covdata)
+else:
+ print_text_report(covdata)
diff --git a/Tools/Scripts/webkitpy/tool/grammar_unittest.py b/Tools/Scripts/webkitpy/tool/grammar_unittest.py
index cab71db01..dd8081f32 100644
--- a/Tools/Scripts/webkitpy/tool/grammar_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/grammar_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.tool.grammar import join_with_separators
@@ -36,6 +36,3 @@ class GrammarTest(unittest.TestCase):
self.assertEqual(join_with_separators(["one"]), "one")
self.assertEqual(join_with_separators(["one", "two"]), "one and two")
self.assertEqual(join_with_separators(["one", "two", "three"]), "one, two, and three")
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/tool/main.py b/Tools/Scripts/webkitpy/tool/main.py
index 68348a05a..3fa6e6b5b 100755..100644
--- a/Tools/Scripts/webkitpy/tool/main.py
+++ b/Tools/Scripts/webkitpy/tool/main.py
@@ -48,6 +48,7 @@ class WebKitPatch(MultiCommandTool, Host):
make_option("--status-host", action="store", dest="status_host", type="string", help="Hostname (e.g. localhost or commit.webkit.org) where status updates should be posted."),
make_option("--bot-id", action="store", dest="bot_id", type="string", help="Identifier for this bot (if multiple bots are running for a queue)"),
make_option("--irc-password", action="store", dest="irc_password", type="string", help="Password to use when communicating via IRC."),
+ make_option("--seconds-to-sleep", action="store", default=120, type="int", help="Number of seconds to sleep in the task queue."),
make_option("--port", action="store", dest="port", default=None, help="Specify a port (e.g., mac, qt, gtk, ...)."),
]
@@ -61,8 +62,7 @@ class WebKitPatch(MultiCommandTool, Host):
self._irc = None
self._deprecated_port = None
- # FIXME: Rename this deprecated_port()
- def port(self):
+ def deprecated_port(self):
return self._deprecated_port
def path(self):
diff --git a/Tools/Scripts/webkitpy/tool/mocktool.py b/Tools/Scripts/webkitpy/tool/mocktool.py
index b8f0976bc..175d1b848 100644
--- a/Tools/Scripts/webkitpy/tool/mocktool.py
+++ b/Tools/Scripts/webkitpy/tool/mocktool.py
@@ -71,7 +71,7 @@ class MockTool(MockHost):
self.irc_password = "MOCK irc password"
self.wakeup_event = threading.Event()
- def port(self):
+ def deprecated_port(self):
return self._deprecated_port
def path(self):
@@ -83,6 +83,3 @@ class MockTool(MockHost):
def irc(self):
return self._irc
-
- def buildbot_for_builder_name(self, name):
- return MockBuildBot()
diff --git a/Tools/Scripts/webkitpy/tool/mocktool_unittest.py b/Tools/Scripts/webkitpy/tool/mocktool_unittest.py
index cceaa2e0a..35fdd3aac 100644
--- a/Tools/Scripts/webkitpy/tool/mocktool_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/mocktool_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from mocktool import MockOptions
@@ -53,7 +53,3 @@ class MockOptionsTest(unittest.TestCase):
# Test that keyword arguments work in the constructor.
options = MockOptions(foo='bar')
self.assertEqual(options.foo, 'bar')
-
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/tool/multicommandtool.py b/Tools/Scripts/webkitpy/tool/multicommandtool.py
index e2f91a7da..01b022f32 100644
--- a/Tools/Scripts/webkitpy/tool/multicommandtool.py
+++ b/Tools/Scripts/webkitpy/tool/multicommandtool.py
@@ -48,11 +48,12 @@ class TryAgain(Exception):
class Command(object):
name = None
show_in_main_help = False
- def __init__(self, help_text, argument_names=None, options=None, long_help=None, requires_local_commits=False):
- self.help_text = help_text
- self.long_help = long_help
- self.argument_names = argument_names
- self.required_arguments = self._parse_required_arguments(argument_names)
+ help_text = None
+ long_help = None
+ argument_names = None
+
+ def __init__(self, options=None, requires_local_commits=False):
+ self.required_arguments = self._parse_required_arguments(self.argument_names)
self.options = options
self.requires_local_commits = requires_local_commits
self._tool = None
@@ -139,15 +140,6 @@ class Command(object):
return self.check_arguments_and_execute(options, args)
-# FIXME: This should just be rolled into Command. help_text and argument_names do not need to be instance variables.
-class AbstractDeclarativeCommand(Command):
- help_text = None
- argument_names = None
- long_help = None
- def __init__(self, options=None, **kwargs):
- Command.__init__(self, self.help_text, self.argument_names, options=options, long_help=self.long_help, **kwargs)
-
-
class HelpPrintingOptionParser(OptionParser):
def __init__(self, epilog_method=None, *args, **kwargs):
self.epilog_method = epilog_method
@@ -168,7 +160,7 @@ class HelpPrintingOptionParser(OptionParser):
return ""
-class HelpCommand(AbstractDeclarativeCommand):
+class HelpCommand(Command):
name = "help"
help_text = "Display information about this program or its subcommands"
argument_names = "[COMMAND]"
@@ -177,7 +169,7 @@ class HelpCommand(AbstractDeclarativeCommand):
options = [
make_option("-a", "--all-commands", action="store_true", dest="show_all_commands", help="Print all available commands"),
]
- AbstractDeclarativeCommand.__init__(self, options)
+ Command.__init__(self, options)
self.show_all_commands = False # A hack used to pass --all-commands to _help_epilog even though it's called by the OptionParser.
def _help_epilog(self):
diff --git a/Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py b/Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py
index ecb1df007..a498e6929 100644
--- a/Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/multicommandtool_unittest.py
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import sys
-import unittest
+import unittest2 as unittest
from optparse import make_option
@@ -38,8 +38,9 @@ from webkitpy.tool.multicommandtool import MultiCommandTool, Command, TryAgain
class TrivialCommand(Command):
name = "trivial"
show_in_main_help = True
+ help_text = "help text"
def __init__(self, **kwargs):
- Command.__init__(self, "help text", **kwargs)
+ Command.__init__(self, **kwargs)
def execute(self, options, args, tool):
pass
@@ -53,9 +54,10 @@ class UncommonCommand(TrivialCommand):
class LikesToRetry(Command):
name = "likes-to-retry"
show_in_main_help = True
+ help_text = "help text"
def __init__(self, **kwargs):
- Command.__init__(self, "help text", **kwargs)
+ Command.__init__(self, **kwargs)
self.execute_count = 0
def execute(self, options, args, tool):
@@ -66,9 +68,11 @@ class LikesToRetry(Command):
class CommandTest(unittest.TestCase):
def test_name_with_arguments(self):
- command_with_args = TrivialCommand(argument_names="ARG1 ARG2")
+ TrivialCommand.argument_names = "ARG1 ARG2"
+ command_with_args = TrivialCommand()
self.assertEqual(command_with_args.name_with_arguments(), "trivial ARG1 ARG2")
+ TrivialCommand.argument_names = None
command_with_args = TrivialCommand(options=[make_option("--my_option")])
self.assertEqual(command_with_args.name_with_arguments(), "trivial [options]")
@@ -80,10 +84,12 @@ class CommandTest(unittest.TestCase):
self.assertRaises(Exception, Command._parse_required_arguments, "[ARG1 ARG2]")
def test_required_arguments(self):
- two_required_arguments = TrivialCommand(argument_names="ARG1 ARG2 [ARG3]")
+ TrivialCommand.argument_names = "ARG1 ARG2 [ARG3]"
+ two_required_arguments = TrivialCommand()
expected_logs = "2 arguments required, 1 argument provided. Provided: 'foo' Required: ARG1 ARG2\nSee 'trivial-tool help trivial' for usage.\n"
exit_code = OutputCapture().assert_outputs(self, two_required_arguments.check_arguments_and_execute, [None, ["foo"], TrivialTool()], expected_logs=expected_logs)
self.assertEqual(exit_code, 1)
+ TrivialCommand.argument_names = None
class TrivialTool(MultiCommandTool):
@@ -167,11 +173,8 @@ See 'trivial-tool help COMMAND' for more information on a specific command.
def test_command_help(self):
- command_with_options = TrivialCommand(options=[make_option("--my_option")], long_help="LONG HELP")
+ TrivialCommand.long_help = "LONG HELP"
+ command_with_options = TrivialCommand(options=[make_option("--my_option")])
tool = TrivialTool(commands=[command_with_options])
expected_subcommand_help = "trivial [options] help text\n\nLONG HELP\n\nOptions:\n --my_option=MY_OPTION\n\n"
self._assert_tool_main_outputs(tool, ["tool", "help", "trivial"], expected_subcommand_help)
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py b/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
index 77068acf4..b06984660 100644
--- a/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
+++ b/Tools/Scripts/webkitpy/tool/servers/gardeningserver.py
@@ -32,7 +32,7 @@ import urllib
from webkitpy.common.memoized import memoized
from webkitpy.tool.servers.reflectionhandler import ReflectionHandler
-from webkitpy.layout_tests.port import builders
+from webkitpy.port import builders
_log = logging.getLogger(__name__)
@@ -54,7 +54,7 @@ class GardeningHTTPServer(SocketServer.ThreadingMixIn, BaseHTTPServer.HTTPServer
class GardeningHTTPRequestHandler(ReflectionHandler):
STATIC_FILE_NAMES = frozenset()
- STATIC_FILE_EXTENSIONS = ('.js', '.css', '.html', '.gif', '.png')
+ STATIC_FILE_EXTENSIONS = ('.js', '.css', '.html', '.gif', '.png', '.ico')
STATIC_FILE_DIRECTORY = os.path.join(
os.path.dirname(__file__),
diff --git a/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py b/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
index 438cc0583..9f9efe807 100644
--- a/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/servers/gardeningserver_unittest.py
@@ -28,11 +28,11 @@
import json
import sys
-import unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.layout_tests.models.test_configuration import *
-from webkitpy.layout_tests.port import builders
+from webkitpy.port import builders
from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.mocktool import MockTool
from webkitpy.common.system.executive_mock import MockExecutive
diff --git a/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py b/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
index 9e9c379d6..41a32ba54 100644
--- a/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
+++ b/Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
@@ -32,7 +32,8 @@ import os.path
import BaseHTTPServer
from webkitpy.common.host import Host # FIXME: This should not be needed!
-from webkitpy.layout_tests.port.base import Port
+from webkitpy.common.system.executive import ScriptError
+from webkitpy.port.base import Port
from webkitpy.tool.servers.reflectionhandler import ReflectionHandler
@@ -114,13 +115,13 @@ def _rebaseline_test(test_file, baseline_target, baseline_move_to, test_config,
destination_path = filesystem.join(
target_expectations_directory, destination_file)
filesystem.copyfile(source_path, destination_path)
- exit_code = scm.add(destination_path, return_exit_code=True)
- if exit_code:
+ try:
+ scm.add(destination_path)
+ log(' Updated %s' % destination_file)
+ except ScriptError, error:
log(' Could not update %s in SCM, exit code %d' %
- (destination_file, exit_code))
+ (destination_file, error.exit_code))
return False
- else:
- log(' Updated %s' % destination_file)
return True
@@ -150,13 +151,13 @@ def _move_test_baselines(test_file, extensions_to_move, source_platform, destina
source_path = filesystem.join(source_directory, file_name)
destination_path = filesystem.join(destination_directory, file_name)
filesystem.copyfile(source_path, destination_path)
- exit_code = test_config.scm.add(destination_path, return_exit_code=True)
- if exit_code:
+ try:
+ test_config.scm.add(destination_path)
+ log(' Moved %s' % file_name)
+ except ScriptError, error:
log(' Could not update %s in SCM, exit code %d' %
- (file_name, exit_code))
+ (file_name, error.exit_code))
return False
- else:
- log(' Moved %s' % file_name)
return True
diff --git a/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py b/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py
index f5c1cbf5e..721154cb6 100644
--- a/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py
@@ -27,12 +27,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import json
-import unittest
+import unittest2 as unittest
from webkitpy.common.net import resultsjsonparser_unittest
from webkitpy.common.host_mock import MockHost
from webkitpy.layout_tests.layout_package.json_results_generator import strip_json_wrapper
-from webkitpy.layout_tests.port.base import Port
+from webkitpy.port.base import Port
from webkitpy.tool.commands.rebaselineserver import TestConfig, RebaselineServer
from webkitpy.tool.servers import rebaselineserver
@@ -211,7 +211,7 @@ class RebaselineTestTest(unittest.TestCase):
server._test_config = get_test_config()
server._gather_baselines(results_json)
self.assertEqual(results_json['tests']['svg/dynamic-updates/SVGFEDropShadowElement-dom-stdDeviation-attr.html']['state'], 'needs_rebaseline')
- self.assertFalse('prototype-chocolate.html' in results_json['tests'])
+ self.assertNotIn('prototype-chocolate.html', results_json['tests'])
def _assertRebaseline(self, test_files, results_files, test_name, baseline_target, baseline_move_to, expected_success, expected_log):
log = []
@@ -234,7 +234,7 @@ class GetActualResultFilesTest(unittest.TestCase):
'fast/text2-actual.txt',
'fast/text-notactual.txt',
))
- self.assertEqual(
+ self.assertItemsEqual(
('text-actual.txt',),
rebaselineserver._get_actual_result_files(
'fast/text.html', test_config))
diff --git a/Tools/Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py b/Tools/Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py
index d269dfcf5..e1d562364 100644
--- a/Tools/Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/servers/reflectionhandler_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.tool.servers.reflectionhandler import ReflectionHandler
diff --git a/Tools/Scripts/webkitpy/tool/steps/__init__.py b/Tools/Scripts/webkitpy/tool/steps/__init__.py
index 56429e8fe..655f7d50a 100644
--- a/Tools/Scripts/webkitpy/tool/steps/__init__.py
+++ b/Tools/Scripts/webkitpy/tool/steps/__init__.py
@@ -35,23 +35,23 @@ from webkitpy.tool.steps.attachtobug import AttachToBug
from webkitpy.tool.steps.build import Build
from webkitpy.tool.steps.checkstyle import CheckStyle
from webkitpy.tool.steps.cleanworkingdirectory import CleanWorkingDirectory
-from webkitpy.tool.steps.cleanworkingdirectorywithlocalcommits import CleanWorkingDirectoryWithLocalCommits
from webkitpy.tool.steps.closebug import CloseBug
from webkitpy.tool.steps.closebugforlanddiff import CloseBugForLandDiff
from webkitpy.tool.steps.closepatch import ClosePatch
from webkitpy.tool.steps.commit import Commit
from webkitpy.tool.steps.confirmdiff import ConfirmDiff
from webkitpy.tool.steps.createbug import CreateBug
+from webkitpy.tool.steps.discardlocalchanges import DiscardLocalChanges
from webkitpy.tool.steps.editchangelog import EditChangeLog
from webkitpy.tool.steps.ensurebugisopenandassigned import EnsureBugIsOpenAndAssigned
from webkitpy.tool.steps.ensurelocalcommitifneeded import EnsureLocalCommitIfNeeded
+from webkitpy.tool.steps.haslanded import HasLanded
from webkitpy.tool.steps.obsoletepatches import ObsoletePatches
from webkitpy.tool.steps.options import Options
from webkitpy.tool.steps.postdiff import PostDiff
from webkitpy.tool.steps.postdiffforcommit import PostDiffForCommit
from webkitpy.tool.steps.postdiffforrevert import PostDiffForRevert
from webkitpy.tool.steps.preparechangelog import PrepareChangeLog
-from webkitpy.tool.steps.preparechangelogfordepsroll import PrepareChangeLogForDEPSRoll
from webkitpy.tool.steps.preparechangelogforrevert import PrepareChangeLogForRevert
from webkitpy.tool.steps.promptforbugortitle import PromptForBugOrTitle
from webkitpy.tool.steps.reopenbugafterrollout import ReopenBugAfterRollout
@@ -60,6 +60,5 @@ from webkitpy.tool.steps.runtests import RunTests
from webkitpy.tool.steps.suggestreviewers import SuggestReviewers
from webkitpy.tool.steps.update import Update
from webkitpy.tool.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer
-from webkitpy.tool.steps.updatechromiumdeps import UpdateChromiumDEPS
from webkitpy.tool.steps.validatechangelogs import ValidateChangeLogs
from webkitpy.tool.steps.validatereviewer import ValidateReviewer
diff --git a/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py b/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py
index 9fab6f438..12be0bee2 100644
--- a/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/addsvnmimetypeforpng_unittest.py
@@ -21,7 +21,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.tool.steps.addsvnmimetypeforpng import AddSvnMimetypeForPng
from webkitpy.common.system.filesystem_mock import MockFileSystem
diff --git a/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py b/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py
index a978f4164..a740c3d3c 100644
--- a/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions, MockTool
diff --git a/Tools/Scripts/webkitpy/tool/steps/build.py b/Tools/Scripts/webkitpy/tool/steps/build.py
index a2a627229..b02830ca2 100644
--- a/Tools/Scripts/webkitpy/tool/steps/build.py
+++ b/Tools/Scripts/webkitpy/tool/steps/build.py
@@ -48,7 +48,7 @@ class Build(AbstractStep):
environment.disable_gcc_smartquotes()
env = environment.to_dictionary()
- build_webkit_command = self._tool.port().build_webkit_command(build_style=build_style)
+ build_webkit_command = self._tool.deprecated_port().build_webkit_command(build_style=build_style)
self._tool.executive.run_and_throw_if_fail(build_webkit_command, self._options.quiet,
cwd=self._tool.scm().checkout_root, env=env)
diff --git a/Tools/Scripts/webkitpy/tool/steps/checkstyle.py b/Tools/Scripts/webkitpy/tool/steps/checkstyle.py
index 0cb15f4c1..cec8a8132 100644
--- a/Tools/Scripts/webkitpy/tool/steps/checkstyle.py
+++ b/Tools/Scripts/webkitpy/tool/steps/checkstyle.py
@@ -57,7 +57,7 @@ class CheckStyle(AbstractStep):
args.append(self._options.check_style_filter)
try:
- self._tool.executive.run_and_throw_if_fail(self._tool.port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
+ self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
except ScriptError, e:
if self._options.non_interactive:
# We need to re-raise the exception here to have the
diff --git a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py b/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
index 191352440..a4cbe82c5 100644
--- a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
+++ b/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory.py
@@ -28,12 +28,10 @@
from webkitpy.tool.steps.abstractstep import AbstractStep
from webkitpy.tool.steps.options import Options
+from webkitpy.common.system.executive import ScriptError
class CleanWorkingDirectory(AbstractStep):
- def __init__(self, tool, options, allow_local_commits=False):
- AbstractStep.__init__(self, tool, options)
- self._allow_local_commits = allow_local_commits
@classmethod
def options(cls):
@@ -45,6 +43,8 @@ class CleanWorkingDirectory(AbstractStep):
def run(self, state):
if not self._options.clean:
return
- if not self._allow_local_commits:
- self._tool.scm().ensure_no_local_commits(self._options.force_clean)
- self._tool.scm().ensure_clean_working_directory(force_clean=self._options.force_clean)
+
+ if self._tool.scm().has_working_directory_changes() and not self._options.force_clean:
+ raise ScriptError("Working directory has changes, pass --force-clean to continue.")
+
+ self._tool.scm().discard_working_directory_changes()
diff --git a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py b/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py
index 15a8850a5..7e31a9bd8 100644
--- a/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/cleanworkingdirectory_unittest.py
@@ -26,27 +26,43 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.thirdparty.mock import Mock
from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.cleanworkingdirectory import CleanWorkingDirectory
+from webkitpy.common.system.executive import ScriptError
class CleanWorkingDirectoryTest(unittest.TestCase):
- def test_run(self):
+ def test_run_working_directory_changes_no_force(self):
tool = MockTool()
tool._scm = Mock()
- tool._scm.checkout_root = '/mock-checkout'
step = CleanWorkingDirectory(tool, MockOptions(clean=True, force_clean=False))
+ tool._scm.has_working_directory_changes = lambda: True
+ self.assertRaises(ScriptError, step.run, {})
+ self.assertEqual(tool._scm.discard_working_directory_changes.call_count, 0)
+
+ def test_run_working_directory_changes_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ step = CleanWorkingDirectory(tool, MockOptions(clean=True, force_clean=True))
+ tool._scm.has_working_directory_changes = lambda: True
+ step.run({})
+ self.assertEqual(tool._scm.discard_working_directory_changes.call_count, 1)
+
+ def test_run_no_local_changes(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ step = CleanWorkingDirectory(tool, MockOptions(clean=True, force_clean=False))
+ tool._scm.has_working_directory_changes = lambda: False
+ tool._scm.has_local_commits = lambda: False
step.run({})
- self.assertEqual(tool._scm.ensure_no_local_commits.call_count, 1)
- self.assertEqual(tool._scm.ensure_clean_working_directory.call_count, 1)
+ self.assertEqual(tool._scm.discard_working_directory_changes.call_count, 1)
def test_no_clean(self):
tool = MockTool()
tool._scm = Mock()
step = CleanWorkingDirectory(tool, MockOptions(clean=False))
step.run({})
- self.assertEqual(tool._scm.ensure_no_local_commits.call_count, 0)
- self.assertEqual(tool._scm.ensure_clean_working_directory.call_count, 0)
+ self.assertEqual(tool._scm.discard_working_directory_changes.call_count, 0)
diff --git a/Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py b/Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
index 6969c4e9a..b042d4258 100644
--- a/Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions, MockTool
diff --git a/Tools/Scripts/webkitpy/tool/steps/commit.py b/Tools/Scripts/webkitpy/tool/steps/commit.py
index 2bffa4c2a..1d5109a00 100644
--- a/Tools/Scripts/webkitpy/tool/steps/commit.py
+++ b/Tools/Scripts/webkitpy/tool/steps/commit.py
@@ -40,20 +40,17 @@ _log = logging.getLogger(__name__)
class Commit(AbstractStep):
- # FIXME: This option exists only to make sure we don't break scripts which include --ignore-builders
- # You can safely delete this option any time after 11/01/11.
@classmethod
def options(cls):
return AbstractStep.options() + [
- Options.check_builders,
Options.non_interactive,
]
def _commit_warning(self, error):
- working_directory_message = "" if error.working_directory_is_clean else " and working copy changes"
- return ('There are %s local commits%s. Everything will be committed as a single commit. '
+ return ('There are %s local commits (and possibly changes in the working directory. '
+ 'Everything will be committed as a single commit. '
'To avoid this prompt, set "git config webkit-patch.commit-should-always-squash true".' % (
- error.num_local_commits, working_directory_message))
+ error.num_local_commits))
def _check_test_expectations(self, changed_files):
test_expectations_files = [filename for filename in changed_files if filename.endswith('TestExpectations')]
@@ -63,7 +60,7 @@ class Commit(AbstractStep):
args = ["--diff-files"]
args.extend(test_expectations_files)
try:
- self._tool.executive.run_and_throw_if_fail(self._tool.port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
+ self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().check_webkit_style_command() + args, cwd=self._tool.scm().checkout_root)
except ScriptError, e:
if self._options.non_interactive:
raise
@@ -76,12 +73,11 @@ class Commit(AbstractStep):
raise Exception("Attempted to commit with a commit message shorter than 10 characters. Either your patch is missing a ChangeLog or webkit-patch may have a bug.")
self._check_test_expectations(self._changed_files(state))
-
self._state = state
username = None
password = None
- force_squash = False
+ force_squash = self._options.non_interactive
num_tries = 0
while num_tries < 3:
@@ -95,7 +91,7 @@ class Commit(AbstractStep):
self._state["commit_text"] = commit_text
break;
except AmbiguousCommitError, e:
- if self._options.non_interactive or self._tool.user.confirm(self._commit_warning(e)):
+ if self._tool.user.confirm(self._commit_warning(e)):
force_squash = True
else:
# This will correctly interrupt the rest of the commit process.
diff --git a/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py b/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
index 936e3ebab..c6b76b428 100644
--- a/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.system.executive import ScriptError
diff --git a/Tools/Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py b/Tools/Scripts/webkitpy/tool/steps/discardlocalchanges.py
index 4bbd383ae..8a84cc702 100644
--- a/Tools/Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py
+++ b/Tools/Scripts/webkitpy/tool/steps/discardlocalchanges.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Google Inc. All rights reserved.
+# 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
@@ -26,13 +26,27 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-from webkitpy.common.checkout.changelog import ChangeLog
from webkitpy.tool.steps.abstractstep import AbstractStep
+from webkitpy.tool.steps.options import Options
+from webkitpy.common.system.executive import ScriptError
-class PrepareChangeLogForDEPSRoll(AbstractStep):
+class DiscardLocalChanges(AbstractStep):
+
+ @classmethod
+ def options(cls):
+ return AbstractStep.options() + [
+ Options.clean,
+ Options.force_clean,
+ ]
+
def run(self, state):
- self._tool.executive.run_and_throw_if_fail(self._tool.port().prepare_changelog_command())
- changelog_paths = self._tool.checkout().modified_changelogs(git_commit=None)
- for changelog_path in changelog_paths:
- ChangeLog(changelog_path).update_with_unreviewed_message("Unreviewed. Rolled DEPS.\n\n")
+ if not self._options.clean:
+ return
+
+ if not self._options.force_clean:
+ if self._tool.scm().has_working_directory_changes():
+ raise ScriptError("Working directory has changes, pass --force-clean to continue.")
+ if self._tool.scm().has_local_commits():
+ raise ScriptError("Repository has local commits, pass --force-clean to continue.")
+ self._tool.scm().discard_local_changes()
diff --git a/Tools/Scripts/webkitpy/tool/steps/discardlocalchanges_unittest.py b/Tools/Scripts/webkitpy/tool/steps/discardlocalchanges_unittest.py
new file mode 100644
index 000000000..d38fc926c
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/steps/discardlocalchanges_unittest.py
@@ -0,0 +1,97 @@
+# 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 unittest2 as unittest
+
+from webkitpy.thirdparty.mock import Mock
+from webkitpy.tool.mocktool import MockOptions, MockTool
+from webkitpy.tool.steps.discardlocalchanges import DiscardLocalChanges
+from webkitpy.common.system.executive import ScriptError
+
+
+class DiscardLocalChangesTest(unittest.TestCase):
+ def test_skip_on_clean(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ step = DiscardLocalChanges(tool, MockOptions(clean=False))
+ step.run({})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 0)
+
+ def test_working_changes_exist_with_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ tool._scm.has_working_directory_changes = lambda: True
+ tool._scm.has_local_commits = lambda: False
+ step = DiscardLocalChanges(tool, MockOptions(clean=True, force_clean=True))
+ step.run({})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 1)
+
+ def test_local_commits_exist_with_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ tool._scm.has_working_directory_changes = lambda: False
+ tool._scm.has_local_commits = lambda: True
+ step = DiscardLocalChanges(tool, MockOptions(clean=True, force_clean=True))
+ step.run({})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 1)
+
+ def test_local_commits_and_working_changes_exist_with_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ tool._scm.has_working_directory_changes = lambda: True
+ tool._scm.has_local_commits = lambda: True
+ step = DiscardLocalChanges(tool, MockOptions(clean=True, force_clean=True))
+ step.run({})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 1)
+
+ def test_no_changes_exist_with_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ tool._scm.has_working_directory_changes = lambda: False
+ tool._scm.has_local_commits = lambda: False
+ step = DiscardLocalChanges(tool, MockOptions(clean=True, force_clean=True))
+ step.run({})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 1)
+
+ def test_error_working_changes_exist_without_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ tool._scm.has_working_directory_changes = lambda: True
+ tool._scm.has_local_commits = lambda: False
+ step = DiscardLocalChanges(tool, MockOptions(clean=True, force_clean=False))
+ self.assertRaises(ScriptError, step.run, {})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 0)
+
+ def test_error_local_commits_exist_without_force(self):
+ tool = MockTool()
+ tool._scm = Mock()
+ tool._scm.has_working_directory_changes = lambda: False
+ tool._scm.has_local_commits = lambda: True
+ step = DiscardLocalChanges(tool, MockOptions(clean=True, force_clean=False))
+ self.assertRaises(ScriptError, step.run, {})
+ self.assertEqual(tool._scm.discard_local_changes.call_count, 0)
diff --git a/Tools/Scripts/webkitpy/tool/steps/haslanded.py b/Tools/Scripts/webkitpy/tool/steps/haslanded.py
new file mode 100644
index 000000000..b0692b32b
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/steps/haslanded.py
@@ -0,0 +1,120 @@
+# 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 cStringIO as StringIO
+import logging
+import sys
+import re
+import tempfile
+
+from webkitpy.tool.steps.abstractstep import AbstractStep
+from webkitpy.common.system.executive import Executive, ScriptError
+from webkitpy.common.checkout import diff_parser
+
+from webkitpy.tool.steps import confirmdiff
+
+_log = logging.getLogger(__name__)
+
+
+class HasLanded(confirmdiff.ConfirmDiff):
+
+ @classmethod
+ def convert_to_svn(cls, diff):
+ lines = StringIO.StringIO(diff).readlines()
+ convert = diff_parser.get_diff_converter(lines)
+ return "".join(convert(x) for x in lines)
+
+ @classmethod
+ def strip_change_log(cls, diff):
+ output = []
+ skipping = False
+ for line in StringIO.StringIO(diff).readlines():
+ indexline = re.match("^Index: ([^\\n]*/)?([^/\\n]*)$", line)
+ if skipping and indexline:
+ skipping = False
+ if indexline and indexline.group(2) == "ChangeLog":
+ skipping = True
+ if not skipping:
+ output.append(line)
+ return "".join(output)
+
+ @classmethod
+ def diff_diff(cls, diff1, diff2, diff1_suffix, diff2_suffix, executive=None):
+ # Now this is where it gets complicated, we need to compare our diff to the diff at landed_revision.
+ diff1_patch = tempfile.NamedTemporaryFile(suffix=diff1_suffix + '.patch')
+ diff1_patch.write(diff1)
+ diff1_patch.flush()
+
+ # Check if there are any differences in the patch that don't happen
+ diff2_patch = tempfile.NamedTemporaryFile(suffix=diff2_suffix + '.patch')
+ diff2_patch.write(diff2)
+ diff2_patch.flush()
+
+ # Diff the two diff's together...
+ if not executive:
+ executive = Executive()
+
+ try:
+ return executive.run_command(
+ ["interdiff", diff1_patch.name, diff2_patch.name], decode_output=False)
+ except ScriptError, e:
+ _log.warning("Unable to find interdiff util (part of GNU difftools package) which is required.")
+ raise
+
+ def run(self, state):
+ # Check if there are changes first
+ if not self._tool.scm().local_changes_exist():
+ _log.warn("No local changes found, exiting.")
+ return True
+
+ # Check if there is a SVN revision in the bug from the commit queue
+ landed_revision = self.cached_lookup(state, "bug").commit_revision()
+ if not landed_revision:
+ raise ScriptError("Unable to find landed message in associated bug.")
+
+ # Now this is there it gets complicated, we need to compare our diff to the diff at landed_revision.
+ landed_diff_bin = self._tool.scm().diff_for_revision(landed_revision)
+ landed_diff_trimmed = self.strip_change_log(self.convert_to_svn(landed_diff_bin))
+
+ # Check if there are any differences in the patch that don't happen
+ local_diff_bin = self._tool.scm().create_patch()
+ local_diff_trimmed = self.strip_change_log(self.convert_to_svn(local_diff_bin))
+
+ # Diff the two diff's together...
+ diff_diff = self.diff_diff(landed_diff_trimmed, local_diff_trimmed,
+ '-landed', '-local',
+ executive=self._tool.executive)
+
+ with self._show_pretty_diff(diff_diff) as pretty_diff_file:
+ if not pretty_diff_file:
+ self._tool.user.page(diff_diff)
+
+ if self._tool.user.confirm("May I discard local changes?"):
+ # Discard changes if the user confirmed we should
+ _log.warn("Discarding changes as requested.")
+ self._tool.scm().discard_local_changes()
diff --git a/Tools/Scripts/webkitpy/tool/steps/haslanded_unittest.py b/Tools/Scripts/webkitpy/tool/steps/haslanded_unittest.py
new file mode 100644
index 000000000..3a67029a8
--- /dev/null
+++ b/Tools/Scripts/webkitpy/tool/steps/haslanded_unittest.py
@@ -0,0 +1,299 @@
+# Copyright (C) 2009 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 unittest2 as unittest
+import subprocess
+
+from webkitpy.tool.steps.haslanded import HasLanded
+
+
+class HasLandedTest(unittest.TestCase):
+ maxDiff = None
+
+ @unittest.skipUnless(subprocess.call('which interdiff', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0, "requires interdiff")
+ def test_run(self):
+ # These patches require trailing whitespace to remain valid patches.
+ diff1 = """\
+Index: a.py
+===================================================================
+--- a.py
++++ a.py
+@@ -1,3 +1,5 @@
+ A
+ B
+ C
++D
++E
+Index: b.py
+===================================================================
+--- b.py 2013-01-21 15:20:59.693887185 +1100
++++ b.py 2013-01-21 15:22:24.382555711 +1100
+@@ -1,3 +1,5 @@
+ 1
+ 2
+ 3
++4
++5
+"""
+
+ diff1_add_line = """\
+Index: a.py
+===================================================================
+--- a.py
++++ a.py
+@@ -1,3 +1,6 @@
+ A
+ B
+ C
++D
++E
++F
+Index: b.py
+===================================================================
+--- b.py
++++ b.py
+@@ -1,3 +1,5 @@
+ 1
+ 2
+ 3
++4
++5
+"""
+
+ diff1_remove_line = """\
+Index: a.py
+===================================================================
+--- a.py
++++ a.py
+@@ -1,3 +1,4 @@
+ A
+ B
+ C
++D
+Index: b.py
+===================================================================
+--- b.py
++++ b.py
+@@ -1,3 +1,5 @@
+ 1
+ 2
+ 3
++4
++5
+"""
+
+ diff1_add_file = diff1 + """\
+Index: c.py
+===================================================================
+--- c.py
++++ c.py
+@@ -1,3 +1,5 @@
+ 1
+ 2
+ 3
++4
++5
+"""
+
+ diff1_remove_file = """\
+Index: a.py
+===================================================================
+--- a.py
++++ a.py
+@@ -1,3 +1,5 @@
+ A
+ B
+ C
++D
++E
+"""
+ self.assertMultiLineEqual(
+ HasLanded.diff_diff(diff1, diff1_add_line, '', 'add-line'),
+ """\
+diff -u a.py a.py
+--- a.py
++++ a.py
+@@ -5,0 +6 @@
++F
+""")
+
+ self.assertMultiLineEqual(
+ HasLanded.diff_diff(diff1, diff1_remove_line, '', 'remove-line'),
+ """\
+diff -u a.py a.py
+--- a.py
++++ a.py
+@@ -5 +4,0 @@
+-E
+""")
+ self.assertMultiLineEqual(
+ HasLanded.diff_diff(diff1, diff1_add_file, '', 'add-file'),
+ """\
+only in patch2:
+unchanged:
+--- c.py
++++ c.py
+@@ -1,3 +1,5 @@
+ 1
+ 2
+ 3
++4
++5
+""")
+ self.assertMultiLineEqual(
+ HasLanded.diff_diff(diff1, diff1_remove_file, '', 'remove-file'),
+ """\
+reverted:
+--- b.py 2013-01-21 15:22:24.382555711 +1100
++++ b.py 2013-01-21 15:20:59.693887185 +1100
+@@ -1,5 +1,3 @@
+ 1
+ 2
+ 3
+-4
+-5
+""")
+
+ def test_convert_to_svn_and_strip_change_log(self):
+ # These patches require trailing whitespace to remain valid patches.
+ testbefore1 = HasLanded.convert_to_svn("""\
+diff --git a/Tools/ChangeLog b/Tools/ChangeLog
+index 219ba72..0390b73 100644
+--- a/Tools/ChangeLog
++++ b/Tools/ChangeLog
+@@ -1,3 +1,32 @@
++2013-01-17 Tim 'mithro' Ansell <mithro@mithis.com>
++
++ Adding "has-landed" command to webkit-patch which allows a person to
++ Reviewed by NOBODY (OOPS!).
++
+ 2013-01-20 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Extend diff_parser to support the --full-index output.
+diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+index 4bf8ec6..3a128cb 100644
+--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
++++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+""")
+ testafter1 = HasLanded.convert_to_svn("""\
+diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+index 4bf8ec6..3a128cb 100644
+--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
++++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+diff --git a/Tools/ChangeLog b/Tools/ChangeLog
+index 219ba72..0390b73 100644
+--- a/Tools/ChangeLog
++++ b/Tools/ChangeLog
+@@ -1,3 +1,32 @@
++2013-01-17 Tim 'mithro' Ansell <mithro@mithis.com>
++
++ Adding "has-landed" command to webkit-patch which allows a person to
++ Reviewed by NOBODY (OOPS!).
++
+ 2013-01-20 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Extend diff_parser to support the --full-index output.
+""")
+ testexpected1 = """\
+Index: Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+===================================================================
+--- Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
++++ Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+"""
+ testmiddle1 = HasLanded.convert_to_svn("""\
+diff --git a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+index 4bf8ec6..3a128cb 100644
+--- a/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
++++ b/Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+diff --git a/ChangeLog b/ChangeLog
+index 219ba72..0390b73 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,32 @@
++2013-01-17 Tim 'mithro' Ansell <mithro@mithis.com>
++
++ Adding "has-landed" command to webkit-patch which allows a person to
++ Reviewed by NOBODY (OOPS!).
++
+ 2013-01-20 Tim 'mithro' Ansell <mithro@mithis.com>
+
+ Extend diff_parser to support the --full-index output.
+diff --git a/Tools/Scripts/webkitpy/common/other.py b/Tools/Scripts/webkitpy/common/other.py
+index 4bf8ec6..3a128cb 100644
+--- a/Tools/Scripts/webkitpy/common/other.py
++++ b/Tools/Scripts/webkitpy/common/other.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+""")
+ testexpected2 = """\
+Index: Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+===================================================================
+--- Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
++++ Tools/Scripts/webkitpy/common/net/bugzilla/bug.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+Index: Tools/Scripts/webkitpy/common/other.py
+===================================================================
+--- Tools/Scripts/webkitpy/common/other.py
++++ Tools/Scripts/webkitpy/common/other.py
+@@ -28,6 +28,8 @@
++import re
++
+ from .attachment import Attachment
+
+"""
+
+ self.assertMultiLineEqual(testexpected1, HasLanded.strip_change_log(testbefore1))
+ self.assertMultiLineEqual(testexpected1, HasLanded.strip_change_log(testafter1))
+ self.assertMultiLineEqual(testexpected2, HasLanded.strip_change_log(testmiddle1))
diff --git a/Tools/Scripts/webkitpy/tool/steps/options.py b/Tools/Scripts/webkitpy/tool/steps/options.py
index c29e59d9c..7eda61459 100644
--- a/Tools/Scripts/webkitpy/tool/steps/options.py
+++ b/Tools/Scripts/webkitpy/tool/steps/options.py
@@ -33,7 +33,6 @@ class Options(object):
build = make_option("--build", action="store_true", dest="build", default=False, help="Build and run run-webkit-tests before committing.")
build_style = make_option("--build-style", action="store", dest="build_style", default=None, help="Whether to build debug, release, or both.")
cc = make_option("--cc", action="store", type="string", dest="cc", help="Comma-separated list of email addresses to carbon-copy.")
- check_builders = make_option("--ignore-builders", action="store_false", dest="check_builders", default=True, help="DEPRECATED: Will be removed any time after 11/01/11.")
check_style = make_option("--ignore-style", action="store_false", dest="check_style", default=True, help="Don't check to see if the patch has proper style before uploading.")
check_style_filter = make_option("--check-style-filter", action="store", type="string", dest="check_style_filter", default=None, help="Filter style-checker rules (see check-webkit-style --help).")
clean = make_option("--no-clean", action="store_false", dest="clean", default=True, help="Don't check if the working directory is clean before applying patches")
@@ -57,4 +56,5 @@ class Options(object):
suggest_reviewers = make_option("--suggest-reviewers", action="store_true", default=False, help="Offer to CC appropriate reviewers.")
test = make_option("--test", action="store_true", dest="test", default=False, help="Run run-webkit-tests before committing.")
update = make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory.")
+ update_changelogs = make_option("--update-changelogs", action="store_true", dest="update_changelogs", default=False, help="Update existing ChangeLog entries with new date, bug description, and touched files/functions.")
changelog_count = make_option("--changelog-count", action="store", type="int", dest="changelog_count", help="Number of changelogs to parse.")
diff --git a/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py b/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
index 4d80ab61f..716ab826d 100644
--- a/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
+++ b/Tools/Scripts/webkitpy/tool/steps/preparechangelog.py
@@ -27,6 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
+import re
import sys
from webkitpy.common.checkout.changelog import ChangeLog
@@ -44,6 +45,7 @@ class PrepareChangeLog(AbstractStep):
Options.quiet,
Options.email,
Options.git_commit,
+ Options.update_changelogs,
]
def _ensure_bug_url(self, state):
@@ -52,17 +54,60 @@ class PrepareChangeLog(AbstractStep):
bug_id = state.get("bug_id")
changelogs = self.cached_lookup(state, "changelogs")
for changelog_path in changelogs:
- changelog = ChangeLog(changelog_path)
+ changelog = ChangeLog(changelog_path, self._tool.filesystem)
if not changelog.latest_entry().bug_id():
changelog.set_short_description_and_bug_url(
self.cached_lookup(state, "bug_title"),
self._tool.bugs.bug_url_for_bug_id(bug_id))
+ def _resolve_existing_entry(self, changelog_path):
+ # When this is called, the top entry in the ChangeLog was just created
+ # by prepare-ChangeLog, as an clean updated version of the one below it.
+ with self._tool.filesystem.open_text_file_for_reading(changelog_path) as changelog_file:
+ entries_gen = ChangeLog.parse_entries_from_file(changelog_file)
+ entries = zip(entries_gen, range(2))
+
+ if not len(entries):
+ raise Exception("Expected to find at least two ChangeLog entries in %s but found none." % changelog_path)
+ if len(entries) == 1:
+ # If we get here, it probably means we've just rolled over to a
+ # new CL file, so we don't have anything to resolve.
+ return
+
+ (new_entry, _), (old_entry, _) = entries
+ final_entry = self._merge_entries(old_entry, new_entry)
+
+ changelog = ChangeLog(changelog_path, self._tool.filesystem)
+ changelog.delete_entries(2)
+ changelog.prepend_text(final_entry)
+
+ def _merge_entries(self, old_entry, new_entry):
+ final_entry = old_entry.contents()
+
+ final_entry = final_entry.replace(old_entry.date(), new_entry.date(), 1)
+
+ new_bug_desc = new_entry.bug_description()
+ old_bug_desc = old_entry.bug_description()
+ if new_bug_desc and old_bug_desc and new_bug_desc != old_bug_desc:
+ final_entry = final_entry.replace(old_bug_desc, new_bug_desc)
+
+ new_touched = new_entry.touched_functions()
+ old_touched = old_entry.touched_functions()
+ if new_touched != old_touched:
+ if old_entry.is_touched_files_text_clean():
+ final_entry = final_entry.replace(old_entry.touched_files_text(), new_entry.touched_files_text())
+ else:
+ final_entry += "\n" + new_entry.touched_files_text()
+
+ return final_entry + "\n"
+
def run(self, state):
if self.cached_lookup(state, "changelogs"):
self._ensure_bug_url(state)
- return
- args = self._tool.port().prepare_changelog_command()
+ if not self._options.update_changelogs:
+ return
+
+ args = self._tool.deprecated_port().prepare_changelog_command()
if state.get("bug_id"):
args.append("--bug=%s" % state["bug_id"])
args.append("--description=%s" % self.cached_lookup(state, 'bug_title'))
@@ -75,8 +120,15 @@ class PrepareChangeLog(AbstractStep):
args.extend(self._changed_files(state))
try:
- self._tool.executive.run_and_throw_if_fail(args, self._options.quiet, cwd=self._tool.scm().checkout_root)
+ output = self._tool.executive.run_and_throw_if_fail(args, self._options.quiet, cwd=self._tool.scm().checkout_root)
except ScriptError, e:
_log.error("Unable to prepare ChangeLogs.")
sys.exit(1)
+
+ # These are the ChangeLog entries added by prepare-Changelog
+ changelogs = re.findall(r'Editing the (\S*/ChangeLog) file.', output)
+ changelogs = set(self._tool.filesystem.join(self._tool.scm().checkout_root, f) for f in changelogs)
+ for changelog in changelogs & set(self.cached_lookup(state, "changelogs")):
+ self._resolve_existing_entry(changelog)
+
self.did_modify_checkout(state)
diff --git a/Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py b/Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
index fc31d1fa9..803f072a3 100644
--- a/Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
@@ -26,32 +26,108 @@
# (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
-import unittest
+import unittest2 as unittest
# Do not import changelog_unittest.ChangeLogTest directly as that will cause it to be run again.
from webkitpy.common.checkout import changelog_unittest
+from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.preparechangelog import PrepareChangeLog
-
class PrepareChangeLogTest(changelog_unittest.ChangeLogTest):
+ def test_resolve_existing_entry(self):
+ step = PrepareChangeLog(MockTool(), MockOptions())
+
+ headers = ["2013-01-18 Timothy Loh <timloh@chromium.com>\n\n",
+ "2013-01-20 Timothy Loh <timloh@chromium.com>\n\n",
+ u"2009-08-17 Tor Arne Vestb\xf8 <vestbo@webkit.org>\n\n",
+ u"2009-08-18 Tor Arne Vestb\xf8 <vestbo@webkit.org>\n\n",
+ "2013-01-18 Eric Seidel <eric@webkit.org>\n\n",
+ "2013-01-20 Eric Seidel <eric@webkit.org>\n\n",
+ ]
+
+ bug_descs = [" prepare-Changelog should support updating the list of changed files\n",
+ " webkit-patch upload should support updating the list of changed files\n"]
+
+ bug_url = " https://bugs.webkit.org/show_bug.cgi?id=74358\n\n"
+
+ descriptions = ["", " A description of the changes.\n\n",
+ " A description.\n\n With some\n line breaks\n\n"]
+
+ changes = [
+""" * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog):
+ (PrepareChangeLog.run):\n\n""",
+""" * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog._resolve_existing_entry):
+ (PrepareChangeLog):
+ (PrepareChangeLog.run):\n\n""",
+""" * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog): Some annotations
+ (PrepareChangeLog.run):
+ More annotations\n\n""",
+""" * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog): Some annotations
+ (PrepareChangeLog.run):
+ More annotations
+
+ * Scripts/webkitpy/tool/steps/preparechangelog.py:
+ (PrepareChangeLog._resolve_existing_entry):
+ (PrepareChangeLog):
+ (PrepareChangeLog.run):\n\n""",
+ ]
+
+ def make_entry(indices):
+ a, b, c, d = indices
+ return headers[a] + bug_descs[b] + bug_url + descriptions[c] + changes[d]
+
+ test_cases = [((0, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0)),
+ ((0, 0, 0, 0), (0, 0, 1, 0), (0, 0, 1, 0)),
+ ((1, 0, 0, 0), (0, 0, 2, 0), (1, 0, 2, 0)),
+ ((0, 1, 0, 0), (0, 0, 1, 0), (0, 1, 1, 0)),
+ ((0, 0, 0, 1), (0, 0, 0, 0), (0, 0, 0, 1)),
+ ((0, 0, 0, 0), (0, 0, 1, 1), (0, 0, 1, 0)),
+ ((0, 0, 0, 0), (0, 0, 2, 2), (0, 0, 2, 2)),
+ ((0, 0, 0, 1), (0, 0, 1, 2), (0, 0, 1, 3)),
+ ((1, 1, 0, 1), (0, 0, 0, 2), (1, 1, 0, 3)),
+ ((3, 0, 0, 0), (2, 0, 1, 0), (3, 0, 1, 0)),
+ ((4, 0, 0, 0), (0, 0, 0, 0), (0, 0, 0, 0)),
+ ((5, 0, 0, 0), (0, 0, 0, 0), (1, 0, 0, 0)),
+ ((0, 0, 0, 0), (4, 0, 0, 0), (4, 0, 0, 0)),
+ ((1, 0, 0, 0), (4, 0, 0, 0), (5, 0, 0, 0)),
+ ]
+
+ for new, old, final in test_cases:
+ new_entry = make_entry(new)
+ old_entry = make_entry(old)
+ start_file = new_entry + old_entry + self._rolled_over_footer
+
+ final_entry = make_entry(final)
+ end_file = final_entry + self._rolled_over_footer
+
+ path = "ChangeLog"
+ step._tool.filesystem = MockFileSystem()
+ step._tool.filesystem.write_text_file(path, start_file)
+ step._resolve_existing_entry(path)
+ actual_output = step._tool.filesystem.read_text_file(path)
+ self.assertEquals(actual_output, end_file)
+
def test_ensure_bug_url(self):
- # FIXME: This should use a MockFileSystem instead of a real FileSystem.
capture = OutputCapture()
step = PrepareChangeLog(MockTool(), MockOptions())
changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
+ changelog_path = "ChangeLog"
state = {
"bug_title": "Example title",
"bug_id": 1234,
"changelogs": [changelog_path],
}
- capture.assert_outputs(self, step.run, [state])
- actual_contents = self._read_file_contents(changelog_path, "utf-8")
+ step._tool.filesystem = MockFileSystem()
+ step._tool.filesystem.write_text_file(changelog_path, changelog_contents)
+ capture.assert_outputs(self, step._ensure_bug_url, [state])
+ actual_contents = step._tool.filesystem.read_text_file(changelog_path)
expected_message = "Example title\n http://example.com/1234"
expected_contents = changelog_contents.replace("Need a short description (OOPS!).\n Need the bug URL (OOPS!).", expected_message)
- os.remove(changelog_path)
- self.assertEqual(actual_contents.splitlines(), expected_contents.splitlines())
+ self.assertEqual(actual_contents, expected_contents)
diff --git a/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py b/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
index 95a99c320..82e7b0252 100644
--- a/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
+++ b/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
@@ -48,7 +48,7 @@ class PrepareChangeLogForRevert(AbstractStep):
def run(self, state):
# This could move to prepare-ChangeLog by adding a --revert= option.
- self._tool.executive.run_and_throw_if_fail(self._tool.port().prepare_changelog_command(), cwd=self._tool.scm().checkout_root)
+ self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().prepare_changelog_command(), cwd=self._tool.scm().checkout_root)
changelog_paths = self._tool.checkout().modified_changelogs(git_commit=None)
bug_url = self._tool.bugs.bug_url_for_bug_id(state["bug_id"]) if state["bug_id"] else None
message = self._message_for_revert(state["revision_list"], state["reason"], bug_url)
diff --git a/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py b/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py
index b82cb4aa2..3ec6e9a60 100644
--- a/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/preparechangelogforrevert_unittest.py
@@ -26,27 +26,17 @@
# (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 codecs
-import os
-import tempfile
-import unittest
+import unittest2 as unittest
# Do not import changelog_unittest.ChangeLogTest directly as that will cause it to be run again.
from webkitpy.common.checkout import changelog_unittest
from webkitpy.common.checkout.changelog import ChangeLog
+from webkitpy.common.system.filesystem_mock import MockFileSystem
from webkitpy.tool.steps.preparechangelogforrevert import *
class UpdateChangeLogsForRevertTest(unittest.TestCase):
- @staticmethod
- def _write_tmp_file_with_contents(byte_array):
- assert(isinstance(byte_array, str))
- (file_descriptor, file_path) = tempfile.mkstemp() # NamedTemporaryFile always deletes the file on close in python < 2.6
- with os.fdopen(file_descriptor, "w") as file:
- file.write(byte_array)
- return file_path
-
_revert_entry_with_bug_url = '''2009-08-19 Eric Seidel <eric@webkit.org>
Unreviewed, rolling out r12345.
@@ -110,13 +100,13 @@ class UpdateChangeLogsForRevertTest(unittest.TestCase):
def _assert_message_for_revert_output(self, args, expected_entry):
changelog_contents = u"%s\n%s" % (changelog_unittest.ChangeLogTest._new_entry_boilerplate, changelog_unittest.ChangeLogTest._example_changelog)
- changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
- changelog = ChangeLog(changelog_path)
+ changelog_path = "ChangeLog"
+ fs = MockFileSystem({changelog_path: changelog_contents.encode("utf-8")})
+ changelog = ChangeLog(changelog_path, fs)
changelog.update_with_unreviewed_message(PrepareChangeLogForRevert._message_for_revert(*args))
actual_entry = changelog.latest_entry()
- os.remove(changelog_path)
- self.assertEqual(actual_entry.contents(), expected_entry)
- self.assertEqual(actual_entry.reviewer_text(), None)
+ self.assertMultiLineEqual(actual_entry.contents(), expected_entry)
+ self.assertIsNone(actual_entry.reviewer_text())
# These checks could be removed to allow this to work on other entries:
self.assertEqual(actual_entry.author_name(), "Eric Seidel")
self.assertEqual(actual_entry.author_email(), "eric@webkit.org")
diff --git a/Tools/Scripts/webkitpy/tool/steps/runtests.py b/Tools/Scripts/webkitpy/tool/steps/runtests.py
index 6dc90f92c..a45628b2d 100644
--- a/Tools/Scripts/webkitpy/tool/steps/runtests.py
+++ b/Tools/Scripts/webkitpy/tool/steps/runtests.py
@@ -1,9 +1,9 @@
# 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
@@ -13,7 +13,7 @@
# * 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
@@ -27,7 +27,9 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import logging
-
+import os
+import platform
+import sys
from webkitpy.tool.steps.abstractstep import AbstractStep
from webkitpy.tool.steps.options import Options
from webkitpy.common.system.executive import ScriptError
@@ -41,6 +43,7 @@ class RunTests(AbstractStep):
@classmethod
def options(cls):
return AbstractStep.options() + [
+ Options.build_style,
Options.test,
Options.non_interactive,
Options.quiet,
@@ -53,44 +56,59 @@ class RunTests(AbstractStep):
if not self._options.non_interactive:
# FIXME: We should teach the commit-queue and the EWS how to run these tests.
- python_unittests_command = self._tool.port().run_python_unittests_command()
+ python_unittests_command = self._tool.deprecated_port().run_python_unittests_command()
if python_unittests_command:
_log.info("Running Python unit tests")
self._tool.executive.run_and_throw_if_fail(python_unittests_command, cwd=self._tool.scm().checkout_root)
- perl_unittests_command = self._tool.port().run_perl_unittests_command()
+ perl_unittests_command = self._tool.deprecated_port().run_perl_unittests_command()
if perl_unittests_command:
_log.info("Running Perl unit tests")
self._tool.executive.run_and_throw_if_fail(perl_unittests_command, cwd=self._tool.scm().checkout_root)
- javascriptcore_tests_command = self._tool.port().run_javascriptcore_tests_command()
+ javascriptcore_tests_command = self._tool.deprecated_port().run_javascriptcore_tests_command()
if javascriptcore_tests_command:
_log.info("Running JavaScriptCore tests")
self._tool.executive.run_and_throw_if_fail(javascriptcore_tests_command, quiet=True, cwd=self._tool.scm().checkout_root)
- webkit_unit_tests_command = self._tool.port().run_webkit_unit_tests_command()
+ bindings_tests_command = self._tool.deprecated_port().run_bindings_tests_command()
+ if bindings_tests_command:
+ _log.info("Running bindings generation tests")
+ args = bindings_tests_command
+ try:
+ self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
+ except ScriptError, e:
+ _log.info("Error running run-bindings-tests: %s" % e.message_with_output())
+
+ webkit_unit_tests_command = self._tool.deprecated_port().run_webkit_unit_tests_command()
if webkit_unit_tests_command:
_log.info("Running WebKit unit tests")
args = webkit_unit_tests_command
- if self._options.non_interactive:
- args.append("--gtest_output=xml:%s/webkit_unit_tests_output.xml" % self._tool.port().results_directory)
try:
self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
except ScriptError, e:
_log.info("Error running webkit_unit_tests: %s" % e.message_with_output())
+
_log.info("Running run-webkit-tests")
- args = self._tool.port().run_webkit_tests_command()
+ args = self._tool.deprecated_port().run_webkit_tests_command()
if self._options.non_interactive:
args.extend([
"--no-new-test-results",
- "--no-launch-safari",
- "--skip-failing-tests",
+ "--no-show-results",
"--exit-after-n-failures=%s" % self.NON_INTERACTIVE_FAILURE_LIMIT_COUNT,
- "--results-directory=%s" % self._tool.port().results_directory,
- "--quiet",
])
+ # old-run-webkit-tests does not support --skip-failing-tests
+ # Using --quiet one Windows fails when we try to use /dev/null, disabling for now until we find a fix
+ if sys.platform != "cygwin":
+ args.append("--quiet")
+ args.append("--skip-failing-tests")
+ else:
+ args.append("--no-build");
+
if self._options.quiet:
args.append("--quiet")
+
self._tool.executive.run_and_throw_if_fail(args, cwd=self._tool.scm().checkout_root)
+
diff --git a/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py b/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
index 78a867b36..ef8920e9b 100644
--- a/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/runtests_unittest.py
@@ -26,7 +26,9 @@
# (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 unittest
+import platform
+import sys
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions, MockTool
@@ -38,9 +40,22 @@ class RunTestsTest(unittest.TestCase):
tool._deprecated_port.run_python_unittests_command = lambda: None
tool._deprecated_port.run_perl_unittests_command = lambda: None
step = RunTests(tool, MockOptions(test=True, non_interactive=True, quiet=False))
- expected_logs = """Running WebKit unit tests
-MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests', '--gtest_output=xml:/mock-results/webkit_unit_tests_output.xml'], cwd=/mock-checkout
+
+ if sys.platform != "cygwin":
+ expected_logs = """Running bindings generation tests
+MOCK run_and_throw_if_fail: ['mock-run-bindings-tests'], cwd=/mock-checkout
+Running WebKit unit tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests'], cwd=/mock-checkout
+Running run-webkit-tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures=30', '--quiet', '--skip-failing-tests'], cwd=/mock-checkout
+"""
+ else:
+ expected_logs = """Running bindings generation tests
+MOCK run_and_throw_if_fail: ['mock-run-bindings-tests'], cwd=/mock-checkout
+Running WebKit unit tests
+MOCK run_and_throw_if_fail: ['mock-run-webkit-unit-tests'], cwd=/mock-checkout
Running run-webkit-tests
-MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-launch-safari', '--skip-failing-tests', '--exit-after-n-failures=30', '--results-directory=/mock-results', '--quiet'], cwd=/mock-checkout
+MOCK run_and_throw_if_fail: ['mock-run-webkit-tests', '--no-new-test-results', '--no-show-results', '--exit-after-n-failures=30', '--no-build'], cwd=/mock-checkout
"""
+
OutputCapture().assert_outputs(self, step.run, [{}], expected_logs=expected_logs)
diff --git a/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py b/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py
index c4ea47b4d..7172ba7f5 100644
--- a/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/steps_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.config.ports import DeprecatedPort
@@ -99,10 +99,9 @@ class StepsTest(unittest.TestCase):
mock_options = self._step_options()
mock_options.non_interactive = False
step = steps.RunTests(MockTool(log_executive=True), mock_options)
- # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
- mock_port = DeprecatedPort()
tool = MockTool(log_executive=True)
- tool.port = lambda: mock_port
+ # FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
+ tool._deprecated_port = DeprecatedPort()
step = steps.RunTests(tool, mock_options)
expected_logs = """Running Python unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitpy'], cwd=/mock-checkout
@@ -110,6 +109,8 @@ Running Perl unit tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/test-webkitperl'], cwd=/mock-checkout
Running JavaScriptCore tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-javascriptcore-tests'], cwd=/mock-checkout
+Running bindings generation tests
+MOCK run_and_throw_if_fail: ['Tools/Scripts/run-bindings-tests'], cwd=/mock-checkout
Running run-webkit-tests
MOCK run_and_throw_if_fail: ['Tools/Scripts/run-webkit-tests', '--quiet'], cwd=/mock-checkout
"""
diff --git a/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py b/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py
index 76bef35ac..40a24829b 100644
--- a/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py
+++ b/Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py
@@ -42,9 +42,12 @@ class SuggestReviewers(AbstractStep):
if not self._options.suggest_reviewers:
return
- reviewers = self._tool.checkout().suggested_reviewers(self._options.git_commit, self._changed_files(state))
+ reviewers = self._tool.checkout().suggested_reviewers(self._options.git_commit, self._changed_files(state))[:5]
print "The following reviewers have recently modified files in your patch:"
- print "\n".join([reviewer.full_name for reviewer in reviewers])
+ print ", ".join([reviewer.full_name for reviewer in reviewers])
+
+ if not state.get('bug_id'):
+ return
if not self._tool.user.confirm("Would you like to CC them?"):
return
reviewer_emails = [reviewer.bugzilla_email() for reviewer in reviewers]
diff --git a/Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py b/Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py
index 42254c86b..fc096f118 100644
--- a/Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/suggestreviewers_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions, MockTool
diff --git a/Tools/Scripts/webkitpy/tool/steps/update.py b/Tools/Scripts/webkitpy/tool/steps/update.py
index 0737ebcd0..f70354078 100644
--- a/Tools/Scripts/webkitpy/tool/steps/update.py
+++ b/Tools/Scripts/webkitpy/tool/steps/update.py
@@ -50,5 +50,5 @@ class Update(AbstractStep):
self._tool.executive.run_and_throw_if_fail(self._update_command(), quiet=self._options.quiet, cwd=self._tool.scm().checkout_root)
def _update_command(self):
- update_command = self._tool.port().update_webkit_command(self._options.non_interactive)
+ update_command = self._tool.deprecated_port().update_webkit_command(self._options.non_interactive)
return update_command
diff --git a/Tools/Scripts/webkitpy/tool/steps/update_unittest.py b/Tools/Scripts/webkitpy/tool/steps/update_unittest.py
index c1a934db5..49d6b4098 100644
--- a/Tools/Scripts/webkitpy/tool/steps/update_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/update_unittest.py
@@ -26,9 +26,9 @@
# (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 unittest
+import unittest2 as unittest
-from webkitpy.common.config.ports import ChromiumPort, ChromiumAndroidPort, ChromiumXVFBPort
+from webkitpy.common.config.ports import MacPort, MacWK2Port
from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.update import Update
@@ -41,14 +41,11 @@ class UpdateTest(unittest.TestCase):
step = Update(tool, options)
self.assertEqual(["mock-update-webkit"], step._update_command())
- tool._deprecated_port = ChromiumPort()
- self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--force-update"], step._update_command())
+ tool._deprecated_port = MacPort()
+ self.assertEqual(["Tools/Scripts/update-webkit"], step._update_command())
- tool._deprecated_port = ChromiumXVFBPort()
- self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--force-update"], step._update_command())
-
- tool._deprecated_port = ChromiumAndroidPort()
- self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--force-update", "--chromium-android"], step._update_command())
+ tool._deprecated_port = MacWK2Port()
+ self.assertEqual(["Tools/Scripts/update-webkit"], step._update_command())
def test_update_command_interactive(self):
tool = MockTool()
@@ -56,11 +53,8 @@ class UpdateTest(unittest.TestCase):
step = Update(tool, options)
self.assertEqual(["mock-update-webkit"], step._update_command())
- tool._deprecated_port = ChromiumPort()
- self.assertEqual(["Tools/Scripts/update-webkit", "--chromium"], step._update_command())
-
- tool._deprecated_port = ChromiumXVFBPort()
- self.assertEqual(["Tools/Scripts/update-webkit", "--chromium"], step._update_command())
+ tool._deprecated_port = MacPort()
+ self.assertEqual(["Tools/Scripts/update-webkit"], step._update_command())
- tool._deprecated_port = ChromiumAndroidPort()
- self.assertEqual(["Tools/Scripts/update-webkit", "--chromium", "--chromium-android"], step._update_command())
+ tool._deprecated_port = MacWK2Port()
+ self.assertEqual(["Tools/Scripts/update-webkit"], step._update_command())
diff --git a/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py b/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
index 3182cf3ab..d433e3f21 100644
--- a/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.tool.mocktool import MockOptions, MockTool
diff --git a/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py b/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py
deleted file mode 100644
index 23d861bfc..000000000
--- a/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright (C) 2011 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 logging
-import sys
-import urllib2
-
-from webkitpy.tool.steps.abstractstep import AbstractStep
-from webkitpy.tool.steps.options import Options
-from webkitpy.common.config import urls
-
-_log = logging.getLogger(__name__)
-
-
-class UpdateChromiumDEPS(AbstractStep):
- @classmethod
- def options(cls):
- return AbstractStep.options() + [
- Options.non_interactive,
- ]
-
- # Notice that this method throws lots of exciting exceptions!
- def _fetch_last_known_good_revision(self):
- return int(urllib2.urlopen(urls.chromium_lkgr_url).read())
-
- def _validate_revisions(self, current_chromium_revision, new_chromium_revision):
- if new_chromium_revision < current_chromium_revision:
- message = "Current Chromium DEPS revision %s is newer than %s." % (current_chromium_revision, new_chromium_revision)
- if self._options.non_interactive:
- _log.error(message)
- sys.exit(1)
- _log.info(message)
- new_chromium_revision = self._tool.user.prompt("Enter new chromium revision (enter nothing to cancel):\n")
- try:
- new_chromium_revision = int(new_chromium_revision)
- except ValueError, TypeError:
- new_chromium_revision = None
- if not new_chromium_revision:
- _log.error("Unable to update Chromium DEPS")
- sys.exit(1)
-
- def run(self, state):
- # Note that state["chromium_revision"] must be defined, but can be None.
- new_chromium_revision = state["chromium_revision"]
- if not new_chromium_revision:
- new_chromium_revision = self._fetch_last_known_good_revision()
-
- deps = self._tool.checkout().chromium_deps()
- current_chromium_revision = deps.read_variable("chromium_rev")
- self._validate_revisions(current_chromium_revision, new_chromium_revision)
- _log.info("Updating Chromium DEPS to %s" % new_chromium_revision)
- deps.write_variable("chromium_rev", new_chromium_revision)
diff --git a/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py
index 061baa5ec..e77e5c01e 100644
--- a/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py
+++ b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs.py
@@ -29,6 +29,7 @@
import logging
import sys
+from optparse import make_option
from webkitpy.tool.steps.abstractstep import AbstractStep
from webkitpy.tool.steps.options import Options
from webkitpy.common.checkout.diff_parser import DiffParser
@@ -42,12 +43,11 @@ class ValidateChangeLogs(AbstractStep):
@classmethod
def options(cls):
return AbstractStep.options() + [
+ make_option("--check-oops", action="store_true", default=False, help="Check there are no OOPS left in change log"),
Options.non_interactive,
]
def _check_changelog_diff(self, diff_file):
- if not self._tool.checkout().is_path_to_changelog(diff_file.filename):
- return True
# Each line is a tuple, the first value is the deleted line number
# Date, reviewer, bug title, bug url, and empty lines could all be
# identical in the most recent entries. If the diff starts any
@@ -64,6 +64,12 @@ class ValidateChangeLogs(AbstractStep):
return True
return False
+ def _changelog_contains_oops(self, diff_file):
+ for diff_line in diff_file.lines:
+ if 'OOPS!' in diff_line[2]:
+ return True
+ return False
+
def run(self, state):
changed_files = self.cached_lookup(state, "changed_files")
for filename in changed_files:
@@ -76,6 +82,11 @@ class ValidateChangeLogs(AbstractStep):
diff = self._tool.scm().diff_for_file(filename)
parsed_diff = DiffParser(diff.splitlines())
for filename, diff_file in parsed_diff.files.items():
+ if not self._tool.checkout().is_path_to_changelog(diff_file.filename):
+ continue
if not self._check_changelog_diff(diff_file):
_log.error("ChangeLog entry in %s is not at the top of the file." % diff_file.filename)
sys.exit(1)
+ if self._options.check_oops and self._changelog_contains_oops(diff_file):
+ _log.error("ChangeLog entry in %s contains OOPS!." % diff_file.filename)
+ sys.exit(1)
diff --git a/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py
index c3b723ed1..50ecc4646 100644
--- a/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/steps/validatechangelogs_unittest.py
@@ -26,7 +26,7 @@
# (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 unittest
+import unittest2 as unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.thirdparty.mock import Mock
@@ -38,7 +38,6 @@ class ValidateChangeLogsTest(unittest.TestCase):
def _assert_start_line_produces_output(self, start_line, should_fail=False, non_interactive=False):
tool = MockTool()
- tool._checkout.is_path_to_changelog = lambda path: True
step = ValidateChangeLogs(tool, MockOptions(git_commit=None, non_interactive=non_interactive))
diff_file = Mock()
diff_file.filename = "mock/ChangeLog"
@@ -56,3 +55,15 @@ class ValidateChangeLogsTest(unittest.TestCase):
self._assert_start_line_produces_output(1, non_interactive=False)
self._assert_start_line_produces_output(8, non_interactive=True, should_fail=True)
+
+ def test_changelog_contains_oops(self):
+ tool = MockTool()
+ tool._checkout.is_path_to_changelog = lambda path: True
+ step = ValidateChangeLogs(tool, MockOptions(git_commit=None, non_interactive=True, check_oops=True))
+ diff_file = Mock()
+ diff_file.filename = "mock/ChangeLog"
+ diff_file.lines = [(1, 1, "foo"), (2, 2, "bar OOPS! bar"), (3, 3, "foo")]
+ self.assertTrue(OutputCapture().assert_outputs(self, step._changelog_contains_oops, [diff_file], expected_logs=''))
+
+ diff_file.lines = [(1, 1, "foo"), (2, 2, "bar OOPS bar"), (3, 3, "foo")]
+ self.assertFalse(OutputCapture().assert_outputs(self, step._changelog_contains_oops, [diff_file], expected_logs=''))
diff --git a/Tools/Scripts/webkitpy/w3c/__init__.py b/Tools/Scripts/webkitpy/w3c/__init__.py
new file mode 100644
index 000000000..ef65bee5b
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/__init__.py
@@ -0,0 +1 @@
+# Required for Python to search this directory for module files
diff --git a/Tools/Scripts/webkitpy/w3c/test_converter.py b/Tools/Scripts/webkitpy/w3c/test_converter.py
new file mode 100644
index 000000000..2e9bfcb9a
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/test_converter.py
@@ -0,0 +1,193 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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 logging
+import re
+
+from webkitpy.common.host import Host
+from webkitpy.common.webkit_finder import WebKitFinder
+from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup, Tag
+
+
+_log = logging.getLogger(__name__)
+
+
+class W3CTestConverter(object):
+
+ def __init__(self):
+ self._host = Host()
+ self._filesystem = self._host.filesystem
+ self._webkit_root = WebKitFinder(self._filesystem).webkit_base()
+
+ # These settings might vary between WebKit and Blink
+ self._css_property_file = self.path_from_webkit_root('Source', 'WebCore', 'css', 'CSSPropertyNames.in')
+ self._css_property_split_string = '='
+
+ self.prefixed_properties = self.read_webkit_prefixed_css_property_list()
+
+ def path_from_webkit_root(self, *comps):
+ return self._filesystem.abspath(self._filesystem.join(self._webkit_root, *comps))
+
+ def read_webkit_prefixed_css_property_list(self):
+ prefixed_properties = []
+
+ contents = self._filesystem.read_text_file(self._css_property_file)
+ for line in contents.splitlines():
+ # Find lines starting with the -webkit- prefix.
+ match = re.match('-webkit-[\w|-]*', line)
+ if match:
+ # Ignore lines where both the prefixed and non-prefixed property
+ # are supported - denoted by -webkit-some-property = some-property.
+ fields = line.split(self._css_property_split_string)
+ if len(fields) == 2 and fields[1].strip() in fields[0].strip():
+ continue
+ prefixed_properties.append(match.group(0))
+
+ return prefixed_properties
+
+ def convert_for_webkit(self, new_path, filename):
+ """ Converts a file's |contents| so it will function correctly in its |new_path| in Webkit.
+
+ Returns the list of modified properties and the modified text if the file was modifed, None otherwise."""
+ contents = self._filesystem.read_binary_file(filename)
+ if filename.endswith('.css'):
+ return self.convert_css(contents, filename)
+ return self.convert_html(new_path, contents, filename)
+
+ def convert_css(self, contents, filename):
+ return self.add_webkit_prefix_to_unprefixed_properties(contents, filename)
+
+ def convert_html(self, new_path, contents, filename):
+ doc = BeautifulSoup(contents)
+ did_modify_paths = self.convert_testharness_paths(doc, new_path, filename)
+ converted_properties_and_content = self.convert_prefixed_properties(doc, filename)
+ return converted_properties_and_content if (did_modify_paths or converted_properties_and_content[0]) else None
+
+ def convert_testharness_paths(self, doc, new_path, filename):
+ """ Update links to testharness.js in the BeautifulSoup |doc| to point to the copy in |new_path|.
+
+ Returns whether the document was modified."""
+
+ # Look for the W3C-style path to any testharness files - scripts (.js) or links (.css)
+ pattern = re.compile('/resources/testharness')
+ script_tags = doc.findAll(src=pattern)
+ link_tags = doc.findAll(href=pattern)
+ testharness_tags = script_tags + link_tags
+
+ if not testharness_tags:
+ return False
+
+ resources_path = self.path_from_webkit_root('LayoutTests', 'resources')
+ resources_relpath = self._filesystem.relpath(resources_path, new_path)
+
+ for tag in testharness_tags:
+ # FIXME: We need to handle img, audio, video tags also.
+ attr = 'src'
+ if tag.name != 'script':
+ attr = 'href'
+
+ if not attr in tag.attrMap:
+ # FIXME: Figure out what to do w/ invalid tags. For now, we return False
+ # and leave the document unmodified, which means that it'll probably fail to run.
+ _log.error("Missing an attr in %s" % filename)
+ return False
+
+ old_path = tag[attr]
+ new_tag = Tag(doc, tag.name, tag.attrs)
+ new_tag[attr] = re.sub(pattern, resources_relpath + '/testharness', old_path)
+
+ self.replace_tag(tag, new_tag)
+
+ return True
+
+ def convert_prefixed_properties(self, doc, filename):
+ """ Searches a BeautifulSoup |doc| for any CSS properties requiring the -webkit- prefix and converts them.
+
+ Returns the list of converted properties and the modified document as a string """
+
+ converted_properties = []
+
+ # Look for inline and document styles.
+ inline_styles = doc.findAll(style=re.compile('.*'))
+ style_tags = doc.findAll('style')
+ all_styles = inline_styles + style_tags
+
+ for tag in all_styles:
+
+ # Get the text whether in a style tag or style attribute.
+ style_text = ''
+ if tag.name == 'style':
+ if not tag.contents:
+ continue
+ style_text = tag.contents[0]
+ else:
+ style_text = tag['style']
+
+ updated_style_text = self.add_webkit_prefix_to_unprefixed_properties(style_text, filename)
+
+ # Rewrite tag only if changes were made.
+ if updated_style_text[0]:
+ converted_properties.extend(updated_style_text[0])
+
+ new_tag = Tag(doc, tag.name, tag.attrs)
+ new_tag.insert(0, updated_style_text[1])
+
+ self.replace_tag(tag, new_tag)
+
+ return (converted_properties, doc.prettify())
+
+ def add_webkit_prefix_to_unprefixed_properties(self, text, filename):
+ """ Searches |text| for instances of properties requiring the -webkit- prefix and adds the prefix to them.
+
+ Returns the list of converted properties and the modified text."""
+
+ converted_properties = []
+
+ for prefixed_property in self.prefixed_properties:
+ # FIXME: add in both the prefixed and unprefixed versions, rather than just replacing them?
+ # That might allow the imported test to work in other browsers more easily.
+
+ unprefixed_property = prefixed_property.replace('-webkit-', '')
+
+ # Look for the various ways it might be in the CSS
+ # Match the the property preceded by either whitespace or left curly brace
+ # or at the beginning of the string (for inline style attribute)
+ pattern = '([\s{]|^)' + unprefixed_property + '(\s+:|:)'
+ if re.search(pattern, text):
+ _log.info('converting %s -> %s' % (unprefixed_property, prefixed_property))
+ converted_properties.append(prefixed_property)
+ text = re.sub(pattern, prefixed_property + ':', text)
+
+ # FIXME: Handle the JS versions of these properties and GetComputedStyle, too.
+ return (converted_properties, text)
+
+ def replace_tag(self, old_tag, new_tag):
+ index = old_tag.parent.contents.index(old_tag)
+ old_tag.parent.insert(index, new_tag)
+ old_tag.extract()
diff --git a/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py b/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
new file mode 100644
index 000000000..ff104abd5
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
@@ -0,0 +1,319 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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
+import re
+import unittest2 as unittest
+
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup
+from webkitpy.w3c.test_converter import W3CTestConverter
+
+
+DUMMY_FILENAME = 'dummy.html'
+
+class W3CTestConverterTest(unittest.TestCase):
+
+ def fake_dir_path(self, converter, dirname):
+ return converter.path_from_webkit_root("LayoutTests", "css", dirname)
+
+ def test_read_prefixed_property_list(self):
+ """ Tests that the current list of properties requiring the -webkit- prefix load correctly """
+
+ # FIXME: We should be passing in a MockHost here ...
+ converter = W3CTestConverter()
+ prop_list = converter.prefixed_properties
+ self.assertTrue(prop_list, 'No prefixed properties found')
+ for prop in prop_list:
+ self.assertTrue(prop.startswith('-webkit-'))
+
+ def test_convert_for_webkit_nothing_to_convert(self):
+ """ Tests convert_for_webkit() using a basic test that has nothing to convert """
+
+ test_html = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>CSS Test: DESCRIPTION OF TEST</title>
+<link rel="author" title="NAME_OF_AUTHOR"
+href="mailto:EMAIL OR http://CONTACT_PAGE"/>
+<link rel="help" href="RELEVANT_SPEC_SECTION"/>
+<meta name="assert" content="TEST ASSERTION"/>
+<style type="text/css"><![CDATA[
+CSS FOR TEST
+]]></style>
+</head>
+<body>
+CONTENT OF TEST
+</body>
+</html>
+"""
+ converter = W3CTestConverter()
+
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ converted = converter.convert_html('/nothing/to/convert', test_html, DUMMY_FILENAME)
+ finally:
+ oc.restore_output()
+
+ self.verify_no_conversion_happened(converted)
+
+ def test_convert_for_webkit_harness_only(self):
+ """ Tests convert_for_webkit() using a basic JS test that uses testharness.js only and has no prefixed properties """
+
+ test_html = """<head>
+<link href="/resources/testharness.css" rel="stylesheet" type="text/css">
+<script src="/resources/testharness.js"></script>
+</head>
+"""
+ converter = W3CTestConverter()
+ fake_dir_path = self.fake_dir_path(converter, "harnessonly")
+
+ converted = converter.convert_html(fake_dir_path, test_html, DUMMY_FILENAME)
+
+ self.verify_conversion_happened(converted)
+ self.verify_test_harness_paths(converter, converted[1], fake_dir_path, 1, 1)
+ self.verify_prefixed_properties(converted, [])
+
+ def test_convert_for_webkit_properties_only(self):
+ """ Tests convert_for_webkit() using a test that has 2 prefixed properties: 1 in a style block + 1 inline style """
+
+ test_html = """<html>
+<head>
+<link href="/resources/testharness.css" rel="stylesheet" type="text/css">
+<script src="/resources/testharness.js"></script>
+<style type="text/css">
+
+#block1 { @test0@: propvalue; }
+
+</style>
+</head>
+<body>
+<div id="elem1" style="@test1@: propvalue;"></div>
+</body>
+</html>
+"""
+ converter = W3CTestConverter()
+ fake_dir_path = self.fake_dir_path(converter, 'harnessandprops')
+ test_content = self.generate_test_content(converter.prefixed_properties, 1, test_html)
+
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ converted = converter.convert_html(fake_dir_path, test_content[1], DUMMY_FILENAME)
+ finally:
+ oc.restore_output()
+
+ self.verify_conversion_happened(converted)
+ self.verify_test_harness_paths(converter, converted[1], fake_dir_path, 1, 1)
+ self.verify_prefixed_properties(converted, test_content[0])
+
+ def test_convert_for_webkit_harness_and_properties(self):
+ """ Tests convert_for_webkit() using a basic JS test that uses testharness.js and testharness.css and has 4 prefixed properties: 3 in a style block + 1 inline style """
+
+ test_html = """<html>
+<head>
+<link href="/resources/testharness.css" rel="stylesheet" type="text/css">
+<script src="/resources/testharness.js"></script>
+<style type="text/css">
+
+#block1 { @test0@: propvalue; }
+#block2 { @test1@: propvalue; }
+#block3 { @test2@: propvalue; }
+
+</style>
+</head>
+<body>
+<div id="elem1" style="@test3@: propvalue;"></div>
+</body>
+</html>
+"""
+ converter = W3CTestConverter()
+ fake_dir_path = self.fake_dir_path(converter, 'harnessandprops')
+
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ test_content = self.generate_test_content(converter.prefixed_properties, 2, test_html)
+ converted = converter.convert_html(fake_dir_path, test_content[1], DUMMY_FILENAME)
+ finally:
+ oc.restore_output()
+
+ self.verify_conversion_happened(converted)
+ self.verify_test_harness_paths(converter, converted[1], fake_dir_path, 1, 1)
+ self.verify_prefixed_properties(converted, test_content[0])
+
+ def test_convert_test_harness_paths(self):
+ """ Tests convert_testharness_paths() with a test that uses all three testharness files """
+
+ test_html = """<head>
+<link href="/resources/testharness.css" rel="stylesheet" type="text/css">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+"""
+ converter = W3CTestConverter()
+
+ fake_dir_path = self.fake_dir_path(converter, 'testharnesspaths')
+
+ doc = BeautifulSoup(test_html)
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ converted = converter.convert_testharness_paths(doc, fake_dir_path, DUMMY_FILENAME)
+ finally:
+ oc.restore_output()
+
+ self.verify_conversion_happened(converted)
+ self.verify_test_harness_paths(converter, doc, fake_dir_path, 2, 1)
+
+ def test_convert_prefixed_properties(self):
+ """ Tests convert_prefixed_properties() file that has 20 properties requiring the -webkit- prefix:
+ 10 in one style block + 5 in another style
+ block + 5 inline styles, including one with multiple prefixed properties.
+ The properties in the test content are in all sorts of wack formatting.
+ """
+
+ test_html = """<html>
+<style type="text/css"><![CDATA[
+
+.block1 {
+ width: 300px;
+ height: 300px
+}
+
+.block2 {
+ @test0@: propvalue;
+}
+
+.block3{@test1@: propvalue;}
+
+.block4 { @test2@:propvalue; }
+
+.block5{ @test3@ :propvalue; }
+
+#block6 { @test4@ : propvalue; }
+
+#block7
+{
+ @test5@: propvalue;
+}
+
+#block8 { @test6@: propvalue; }
+
+#block9:pseudo
+{
+
+ @test7@: propvalue;
+ @test8@: propvalue propvalue propvalue;;
+}
+
+]]></style>
+</head>
+<body>
+ <div id="elem1" style="@test9@: propvalue;"></div>
+ <div id="elem2" style="propname: propvalue; @test10@ : propvalue; propname:propvalue;"></div>
+ <div id="elem2" style="@test11@: propvalue; @test12@ : propvalue; @test13@ :propvalue;"></div>
+ <div id="elem3" style="@test14@:propvalue"></div>
+</body>
+<style type="text/css"><![CDATA[
+
+.block10{ @test15@: propvalue; }
+.block11{ @test16@: propvalue; }
+.block12{ @test17@: propvalue; }
+#block13:pseudo
+{
+ @test18@: propvalue;
+ @test19@: propvalue;
+}
+
+]]></style>
+</html>
+"""
+ converter = W3CTestConverter()
+
+ test_content = self.generate_test_content(converter.prefixed_properties, 20, test_html)
+
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ converted = converter.convert_prefixed_properties(BeautifulSoup(test_content[1]), DUMMY_FILENAME)
+ finally:
+ oc.restore_output()
+
+ self.verify_conversion_happened(converted)
+ self.verify_prefixed_properties(converted, test_content[0])
+
+ def verify_conversion_happened(self, converted):
+ self.assertTrue(converted, "conversion didn't happen")
+
+ def verify_no_conversion_happened(self, converted):
+ self.assertEqual(converted, None, 'test should not have been converted')
+
+ def verify_test_harness_paths(self, converter, converted, test_path, num_src_paths, num_href_paths):
+ if isinstance(converted, basestring):
+ converted = BeautifulSoup(converted)
+
+ resources_dir = converter.path_from_webkit_root("LayoutTests", "resources")
+
+ # Verify the original paths are gone, and the new paths are present.
+ orig_path_pattern = re.compile('\"/resources/testharness')
+ self.assertEquals(len(converted.findAll(src=orig_path_pattern)), 0, 'testharness src path was not converted')
+ self.assertEquals(len(converted.findAll(href=orig_path_pattern)), 0, 'testharness href path was not converted')
+
+ new_relpath = os.path.relpath(resources_dir, test_path)
+ relpath_pattern = re.compile(new_relpath)
+ self.assertEquals(len(converted.findAll(src=relpath_pattern)), num_src_paths, 'testharness src relative path not correct')
+ self.assertEquals(len(converted.findAll(href=relpath_pattern)), num_href_paths, 'testharness href relative path not correct')
+
+ def verify_prefixed_properties(self, converted, test_properties):
+ self.assertEqual(len(converted[0]), len(test_properties), 'Incorrect number of properties converted')
+ for test_prop in test_properties:
+ self.assertTrue((test_prop in converted[1]), 'Property ' + test_prop + ' not found in converted doc')
+
+ def generate_test_content(self, full_property_list, num_test_properties, html):
+ """Inserts properties requiring a -webkit- prefix into the content, replacing \'@testXX@\' with a property."""
+ test_properties = []
+ count = 0
+ while count < num_test_properties:
+ test_properties.append(full_property_list[count])
+ count += 1
+
+ # Replace the tokens in the testhtml with the test properties. Walk backward
+ # through the list to replace the double-digit tokens first
+ index = len(test_properties) - 1
+ while index >= 0:
+ # Use the unprefixed version
+ test_prop = test_properties[index].replace('-webkit-', '')
+ # Replace the token
+ html = html.replace('@test' + str(index) + '@', test_prop)
+ index -= 1
+
+ return (test_properties, html)
diff --git a/Tools/Scripts/webkitpy/w3c/test_importer.py b/Tools/Scripts/webkitpy/w3c/test_importer.py
new file mode 100644
index 000000000..119bd7d92
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -0,0 +1,450 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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 script imports a directory of W3C CSS tests into WebKit.
+
+ You must have checked out the W3C repository to your local drive.
+
+ This script will import the tests into WebKit following these rules:
+
+ - Only tests that are approved or officially submitted awaiting review are imported
+
+ - All tests are imported into LayoutTests/csswg
+
+ - If the tests are approved, they'll be imported into a directory tree that
+ mirrors the CSS Mercurial repo. For example, <csswg_repo_root>/approved/css2.1 is brought in
+ as LayoutTests/csswg/approved/css2.1, maintaining the entire directory structure under that
+
+ - If the tests are submitted, they'll be brought in as LayoutTests/csswg/submitted and will also
+ maintain their directory structure under that. For example, everything under
+ <csswg_repo_root>/contributors/adobe/submitted is brought into submitted, mirroring its
+ directory structure in the csswg repo
+
+ - If the import directory specified is just a contributor folder, only the submitted folder
+ for that contributor is brought in. For example, to import all of Mozilla's tests, either
+ <csswg_repo_root>/contributors/mozilla or <csswg_repo_root>/contributors/mozilla/submitted
+ will work and are equivalent
+
+ - For the time being, this script won't work if you try to import the full set of submitted
+ tests under contributors/*/submitted. Since these are awaiting review, this is just a small
+ control mechanism to enforce carefully selecting what non-approved tests are imported.
+ It can obviously and easily be changed.
+
+ - By default, only reftests and jstest are imported. This can be overridden with a -a or --all
+ argument
+
+ - Also by default, if test files by the same name already exist in the destination directory,
+ they are overwritten with the idea that running this script would refresh files periodically.
+ This can also be overridden by a -n or --no-overwrite flag
+
+ - All files are converted to work in WebKit:
+ 1. Paths to testharness.js files are modified point to Webkit's copy of them in
+ LayoutTests/resources, using the correct relative path from the new location
+ 2. All CSS properties requiring the -webkit-vendor prefix are prefixed - this current
+ list of what needs prefixes is read from Source/WebCore/CSS/CSSProperties.in
+ 3. Each reftest has its own copy of its reference file following the naming conventions
+ new-run-webkit-tests expects
+ 4. If a reference files lives outside the directory of the test that uses it, it is checked
+ for paths to support files as it will be imported into a different relative position to the
+ test file (in the same directory)
+
+ - Upon completion, script outputs the total number tests imported, broken down by test type
+
+ - Also upon completion, each directory where files are imported will have w3c-import.log written
+ with a timestamp, the W3C Mercurial changeset if available, the list of CSS properties used that
+ require prefixes, the list of imported files, and guidance for future test modification and
+ maintenance.
+
+ - On subsequent imports, this file is read to determine if files have been removed in the newer changesets.
+ The script removes these files accordingly.
+"""
+
+# FIXME: Change this file to use the Host abstractions rather that os, sys, shutils, etc.
+
+import datetime
+import logging
+import mimetypes
+import optparse
+import os
+import shutil
+import sys
+
+from webkitpy.common.host import Host
+from webkitpy.common.webkit_finder import WebKitFinder
+from webkitpy.common.system.executive import ScriptError
+from webkitpy.w3c.test_parser import TestParser
+from webkitpy.w3c.test_converter import W3CTestConverter
+
+
+TEST_STATUS_UNKNOWN = 'unknown'
+TEST_STATUS_APPROVED = 'approved'
+TEST_STATUS_SUBMITTED = 'submitted'
+
+CHANGESET_NOT_AVAILABLE = 'Not Available'
+
+
+_log = logging.getLogger(__name__)
+
+
+def main(_argv, _stdout, _stderr):
+ options, args = parse_args()
+ import_dir = args[0]
+ if len(args) == 1:
+ repo_dir = os.path.dirname(import_dir)
+ else:
+ repo_dir = args[1]
+
+ if not os.path.exists(import_dir):
+ sys.exit('Source directory %s not found!' % import_dir)
+
+ if not os.path.exists(repo_dir):
+ sys.exit('Repository directory %s not found!' % repo_dir)
+ if not repo_dir in import_dir:
+ sys.exit('Repository directory %s must be a parent of %s' % (repo_dir, import_dir))
+
+ configure_logging()
+
+ test_importer = TestImporter(Host(), import_dir, repo_dir, options)
+ test_importer.do_import()
+
+
+def configure_logging():
+ class LogHandler(logging.StreamHandler):
+
+ def format(self, record):
+ if record.levelno > logging.INFO:
+ return "%s: %s" % (record.levelname, record.getMessage())
+ return record.getMessage()
+
+ logger = logging.getLogger()
+ logger.setLevel(logging.INFO)
+ handler = LogHandler()
+ handler.setLevel(logging.INFO)
+ logger.addHandler(handler)
+ return handler
+
+
+def parse_args():
+ parser = optparse.OptionParser(usage='usage: %prog [options] w3c_test_directory [repo_directory]')
+ parser.add_option('-n', '--no-overwrite', dest='overwrite', action='store_false', default=True,
+ help='Flag to prevent duplicate test files from overwriting existing tests. By default, they will be overwritten')
+ parser.add_option('-a', '--all', action='store_true', default=False,
+ help='Import all tests including reftests, JS tests, and manual/pixel tests. By default, only reftests and JS tests are imported')
+
+ options, args = parser.parse_args()
+ if len(args) not in (1, 2):
+ parser.error('Incorrect number of arguments')
+ return options, args
+
+
+class TestImporter(object):
+
+ def __init__(self, host, source_directory, repo_dir, options):
+ self.host = host
+ self.source_directory = source_directory
+ self.options = options
+
+ self.filesystem = self.host.filesystem
+
+ webkit_finder = WebKitFinder(self.filesystem)
+ self._webkit_root = webkit_finder.webkit_base()
+ self.repo_dir = repo_dir
+ subdirs = os.path.dirname(os.path.relpath(source_directory, repo_dir))
+
+ self.destination_directory = webkit_finder.path_from_webkit_base("LayoutTests", 'w3c', *subdirs)
+
+ self.changeset = CHANGESET_NOT_AVAILABLE
+ self.test_status = TEST_STATUS_UNKNOWN
+
+ self.import_list = []
+
+ def do_import(self):
+ self.find_importable_tests(self.source_directory)
+ self.load_changeset()
+ self.import_tests()
+
+ def load_changeset(self):
+ """Returns the current changeset from mercurial or "Not Available"."""
+ try:
+ self.changeset = self.host.executive.run_command(['hg', 'tip']).split('changeset:')[1]
+ except (OSError, ScriptError):
+ self.changeset = CHANGESET_NOT_AVAILABLE
+
+ def find_importable_tests(self, directory):
+ # FIXME: use filesystem
+ for root, dirs, files in os.walk(directory):
+ _log.info('Scanning ' + root + '...')
+ total_tests = 0
+ reftests = 0
+ jstests = 0
+
+ # "archive" and "data" dirs are internal csswg things that live in every approved directory.
+ # FIXME: skip 'incoming' tests for now, but we should rework the 'test_status' concept and
+ # support reading them as well.
+ DIRS_TO_SKIP = ('.git', '.hg', 'data', 'archive', 'incoming')
+ for d in DIRS_TO_SKIP:
+ if d in dirs:
+ dirs.remove(d)
+
+ copy_list = []
+
+ for filename in files:
+ # FIXME: This block should really be a separate function, but the early-continues make that difficult.
+
+ if filename.startswith('.') or filename.endswith('.pl'):
+ continue # For some reason the w3c repo contains random perl scripts we don't care about.
+
+ fullpath = os.path.join(root, filename)
+
+ mimetype = mimetypes.guess_type(fullpath)
+ if not 'html' in str(mimetype[0]) and not 'xml' in str(mimetype[0]):
+ copy_list.append({'src': fullpath, 'dest': filename})
+ continue
+
+ test_parser = TestParser(vars(self.options), filename=fullpath)
+ test_info = test_parser.analyze_test()
+ if test_info is None:
+ continue
+
+ if 'reference' in test_info.keys():
+ reftests += 1
+ total_tests += 1
+ test_basename = os.path.basename(test_info['test'])
+
+ # Add the ref file, following WebKit style.
+ # FIXME: Ideally we'd support reading the metadata
+ # directly rather than relying on a naming convention.
+ # Using a naming convention creates duplicate copies of the
+ # reference files.
+ ref_file = os.path.splitext(test_basename)[0] + '-expected'
+ ref_file += os.path.splitext(test_basename)[1]
+
+ copy_list.append({'src': test_info['reference'], 'dest': ref_file})
+ copy_list.append({'src': test_info['test'], 'dest': filename})
+
+ # Update any support files that need to move as well to remain relative to the -expected file.
+ if 'refsupport' in test_info.keys():
+ for support_file in test_info['refsupport']:
+ source_file = os.path.join(os.path.dirname(test_info['reference']), support_file)
+ source_file = os.path.normpath(source_file)
+
+ # Keep the dest as it was
+ to_copy = {'src': source_file, 'dest': support_file}
+
+ # Only add it once
+ if not(to_copy in copy_list):
+ copy_list.append(to_copy)
+ elif 'jstest' in test_info.keys():
+ jstests += 1
+ total_tests += 1
+ copy_list.append({'src': fullpath, 'dest': filename})
+ else:
+ total_tests += 1
+ copy_list.append({'src': fullpath, 'dest': filename})
+
+ if not total_tests:
+ # We can skip the support directory if no tests were found.
+ if 'support' in dirs:
+ dirs.remove('support')
+
+ if copy_list:
+ # Only add this directory to the list if there's something to import
+ self.import_list.append({'dirname': root, 'copy_list': copy_list,
+ 'reftests': reftests, 'jstests': jstests, 'total_tests': total_tests})
+
+ def import_tests(self):
+ converter = W3CTestConverter()
+ total_imported_tests = 0
+ total_imported_reftests = 0
+ total_imported_jstests = 0
+ total_prefixed_properties = {}
+
+ for dir_to_copy in self.import_list:
+ total_imported_tests += dir_to_copy['total_tests']
+ total_imported_reftests += dir_to_copy['reftests']
+ total_imported_jstests += dir_to_copy['jstests']
+
+ prefixed_properties = []
+
+ if not dir_to_copy['copy_list']:
+ continue
+
+ orig_path = dir_to_copy['dirname']
+
+ subpath = os.path.relpath(orig_path, self.repo_dir)
+ new_path = os.path.join(self.destination_directory, subpath)
+
+ if not(os.path.exists(new_path)):
+ os.makedirs(new_path)
+
+ copied_files = []
+
+ for file_to_copy in dir_to_copy['copy_list']:
+ # FIXME: Split this block into a separate function.
+ orig_filepath = os.path.normpath(file_to_copy['src'])
+
+ if os.path.isdir(orig_filepath):
+ # FIXME: Figure out what is triggering this and what to do about it.
+ _log.error('%s refers to a directory' % orig_filepath)
+ continue
+
+ if not(os.path.exists(orig_filepath)):
+ _log.warning('%s not found. Possible error in the test.', orig_filepath)
+ continue
+
+ new_filepath = os.path.join(new_path, file_to_copy['dest'])
+
+ if not(os.path.exists(os.path.dirname(new_filepath))):
+ os.makedirs(os.path.dirname(new_filepath))
+
+ if not self.options.overwrite and os.path.exists(new_filepath):
+ _log.info('Skipping import of existing file ' + new_filepath)
+ else:
+ # FIXME: Maybe doing a file diff is in order here for existing files?
+ # In other words, there's no sense in overwriting identical files, but
+ # there's no harm in copying the identical thing.
+ _log.info('Importing: %s', orig_filepath)
+ _log.info(' As: %s', new_filepath)
+
+ # Only html, xml, or css should be converted
+ # FIXME: Eventually, so should js when support is added for this type of conversion
+ mimetype = mimetypes.guess_type(orig_filepath)
+ if 'html' in str(mimetype[0]) or 'xml' in str(mimetype[0]) or 'css' in str(mimetype[0]):
+ converted_file = converter.convert_for_webkit(new_path, filename=orig_filepath)
+
+ if not converted_file:
+ shutil.copyfile(orig_filepath, new_filepath) # The file was unmodified.
+ else:
+ for prefixed_property in converted_file[0]:
+ total_prefixed_properties.setdefault(prefixed_property, 0)
+ total_prefixed_properties[prefixed_property] += 1
+
+ prefixed_properties.extend(set(converted_file[0]) - set(prefixed_properties))
+ outfile = open(new_filepath, 'wb')
+ outfile.write(converted_file[1])
+ outfile.close()
+ else:
+ shutil.copyfile(orig_filepath, new_filepath)
+
+ copied_files.append(new_filepath.replace(self._webkit_root, ''))
+
+ self.remove_deleted_files(new_path, copied_files)
+ self.write_import_log(new_path, copied_files, prefixed_properties)
+
+ _log.info('Import complete')
+
+ _log.info('IMPORTED %d TOTAL TESTS', total_imported_tests)
+ _log.info('Imported %d reftests', total_imported_reftests)
+ _log.info('Imported %d JS tests', total_imported_jstests)
+ _log.info('Imported %d pixel/manual tests', total_imported_tests - total_imported_jstests - total_imported_reftests)
+ _log.info('')
+ _log.info('Properties needing prefixes (by count):')
+ for prefixed_property in sorted(total_prefixed_properties, key=lambda p: total_prefixed_properties[p]):
+ _log.info(' %s: %s', prefixed_property, total_prefixed_properties[prefixed_property])
+
+ def setup_destination_directory(self):
+ """ Creates a destination directory that mirrors that of the source approved or submitted directory """
+
+ self.update_test_status()
+
+ start = self.source_directory.find(self.test_status)
+ new_subpath = self.source_directory[len(self.repo_dir):]
+
+ destination_directory = os.path.join(self.destination_directory, new_subpath)
+
+ if not os.path.exists(destination_directory):
+ os.makedirs(destination_directory)
+
+ _log.info('Tests will be imported into: %s', destination_directory)
+
+ def update_test_status(self):
+ """ Sets the test status to either 'approved' or 'submitted' """
+
+ status = TEST_STATUS_UNKNOWN
+
+ if 'approved' in self.source_directory.split(os.path.sep):
+ status = TEST_STATUS_APPROVED
+ elif 'submitted' in self.source_directory.split(os.path.sep):
+ status = TEST_STATUS_SUBMITTED
+
+ self.test_status = status
+
+ def remove_deleted_files(self, import_directory, new_file_list):
+ """ Reads an import log in |import_directory|, compares it to the |new_file_list|, and removes files not in the new list."""
+
+ previous_file_list = []
+
+ import_log_file = os.path.join(import_directory, 'w3c-import.log')
+ if not os.path.exists(import_log_file):
+ return
+
+ import_log = open(import_log_file, 'r')
+ contents = import_log.readlines()
+
+ if 'List of files\n' in contents:
+ list_index = contents.index('List of files:\n') + 1
+ previous_file_list = [filename.strip() for filename in contents[list_index:]]
+
+ deleted_files = set(previous_file_list) - set(new_file_list)
+ for deleted_file in deleted_files:
+ _log.info('Deleting file removed from the W3C repo: %s', deleted_file)
+ deleted_file = os.path.join(self._webkit_root, deleted_file)
+ os.remove(deleted_file)
+
+ import_log.close()
+
+ def write_import_log(self, import_directory, file_list, prop_list):
+ """ Writes a w3c-import.log file in each directory with imported files. """
+
+ now = datetime.datetime.now()
+
+ import_log = open(os.path.join(import_directory, 'w3c-import.log'), 'w')
+ import_log.write('The tests in this directory were imported from the W3C repository.\n')
+ import_log.write('Do NOT modify these tests directly in Webkit. Instead, push changes to the W3C CSS repo:\n\n')
+ import_log.write('http://hg.csswg.org/test\n\n')
+ import_log.write('Then run the Tools/Scripts/import-w3c-tests in Webkit to reimport\n\n')
+ import_log.write('Do NOT modify or remove this file\n\n')
+ import_log.write('------------------------------------------------------------------------\n')
+ import_log.write('Last Import: ' + now.strftime('%Y-%m-%d %H:%M') + '\n')
+ import_log.write('W3C Mercurial changeset: ' + self.changeset + '\n')
+ import_log.write('Test status at time of import: ' + self.test_status + '\n')
+ import_log.write('------------------------------------------------------------------------\n')
+ import_log.write('Properties requiring vendor prefixes:\n')
+ if prop_list:
+ for prop in prop_list:
+ import_log.write(prop + '\n')
+ else:
+ import_log.write('None\n')
+ import_log.write('------------------------------------------------------------------------\n')
+ import_log.write('List of files:\n')
+ for item in file_list:
+ import_log.write(item + '\n')
+
+ import_log.close()
diff --git a/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py b/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
new file mode 100644
index 000000000..9103623dc
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
@@ -0,0 +1,79 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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 optparse
+import shutil
+import tempfile
+import unittest2 as unittest
+
+from webkitpy.common.host_mock import MockHost
+from webkitpy.common.system.filesystem_mock import MockFileSystem
+from webkitpy.common.system.executive_mock import MockExecutive2, ScriptError
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.w3c.test_importer import TestImporter
+
+
+FAKE_SOURCE_DIR = '/blink/w3c'
+FAKE_REPO_DIR = '/blink'
+
+FAKE_FILES = {
+ '/blink/w3c/empty_dir/README.txt': '',
+ '/mock-checkout/LayoutTests/w3c/README.txt': '',
+}
+
+class TestImporterTest(unittest.TestCase):
+
+ def test_import_dir_with_no_tests_and_no_hg(self):
+ host = MockHost()
+ host.executive = MockExecutive2(exception=OSError())
+ host.filesystem = MockFileSystem(files=FAKE_FILES)
+
+ importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, optparse.Values({"overwrite": False}))
+
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ importer.do_import()
+ finally:
+ oc.restore_output()
+
+ def test_import_dir_with_no_tests(self):
+ host = MockHost()
+ host.executive = MockExecutive2(exception=ScriptError("abort: no repository found in '/Volumes/Source/src/wk/Tools/Scripts/webkitpy/w3c' (.hg not found)!"))
+ host.filesystem = MockFileSystem(files=FAKE_FILES)
+
+ importer = TestImporter(host, FAKE_SOURCE_DIR, FAKE_REPO_DIR, optparse.Values({"overwrite": False}))
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ importer.do_import()
+ finally:
+ oc.restore_output()
+
+ # FIXME: Needs more tests.
diff --git a/Tools/Scripts/webkitpy/w3c/test_parser.py b/Tools/Scripts/webkitpy/w3c/test_parser.py
new file mode 100644
index 000000000..bb66fdae6
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/test_parser.py
@@ -0,0 +1,162 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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 logging
+import re
+
+from webkitpy.common.host import Host
+from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup as Parser
+
+
+_log = logging.getLogger(__name__)
+
+
+class TestParser(object):
+
+ def __init__(self, options, filename):
+ self.options = options
+ self.filename = filename
+ self.host = Host()
+ self.filesystem = self.host.filesystem
+
+ self.test_doc = None
+ self.ref_doc = None
+ self.load_file(filename)
+
+ def load_file(self, filename):
+ if self.filesystem.isfile(filename):
+ try:
+ self.test_doc = Parser(self.filesystem.read_binary_file(filename))
+ except:
+ # FIXME: Figure out what to do if we can't parse the file.
+ _log.error("Failed to parse %s", filename)
+ self.test_doc is None
+ else:
+ if self.filesystem.isdir(filename):
+ # FIXME: Figure out what is triggering this and what to do about it.
+ _log.error("Trying to load %s, which is a directory", filename)
+ self.test_doc = None
+ self.ref_doc = None
+
+ def analyze_test(self, test_contents=None, ref_contents=None):
+ """ Analyzes a file to determine if it's a test, what type of test, and what reference or support files it requires. Returns all of the test info """
+
+ test_info = None
+
+ if test_contents is None and self.test_doc is None:
+ return test_info
+
+ if test_contents is not None:
+ self.test_doc = Parser(test_contents)
+
+ if ref_contents is not None:
+ self.ref_doc = Parser(ref_contents)
+
+ # First check if it's a reftest
+
+ matches = self.reference_links_of_type('match') + self.reference_links_of_type('mismatch')
+ if matches:
+ if len(matches) > 1:
+ # FIXME: Is this actually true? We should fix this.
+ _log.warning('Multiple references are not supported. Importing the first ref defined in %s',
+ self.filesystem.basename(self.filename))
+
+ try:
+ ref_file = self.filesystem.join(self.filesystem.dirname(self.filename), matches[0]['href'])
+ except KeyError as e:
+ # FIXME: Figure out what to do w/ invalid test files.
+ _log.error('%s has a reference link but is missing the "href"', self.filesystem)
+ return None
+
+ if self.ref_doc is None:
+ self.ref_doc = self.load_file(ref_file)
+
+ test_info = {'test': self.filename, 'reference': ref_file}
+
+ # If the ref file path is relative, we need to check it for
+ # relative paths also because when it lands in WebKit, it will be
+ # moved down into the test dir.
+ #
+ # Note: The test files themselves are not checked for support files
+ # outside their directories as the convention in the CSSWG is to
+ # put all support files in the same dir or subdir as the test.
+ #
+ # All non-test files in the test's directory tree are normally
+ # copied as part of the import as they are assumed to be required
+ # support files.
+ #
+ # *But*, there is exactly one case in the entire css2.1 suite where
+ # a test depends on a file that lives in a different directory,
+ # which depends on another file that lives outside of its
+ # directory. This code covers that case :)
+ if matches[0]['href'].startswith('..'):
+ support_files = self.support_files(self.ref_doc)
+ test_info['refsupport'] = support_files
+
+ elif self.is_jstest():
+ test_info = {'test': self.filename, 'jstest': True}
+ elif self.options['all'] is True and not('-ref' in self.filename) and not('reference' in self.filename):
+ test_info = {'test': self.filename}
+
+ return test_info
+
+ def reference_links_of_type(self, reftest_type):
+ return self.test_doc.findAll(rel=reftest_type)
+
+ def is_jstest(self):
+ """Returns whether the file appears to be a jstest, by searching for usage of W3C-style testharness paths."""
+ return bool(self.test_doc.find(src=re.compile('[\'\"/]?/resources/testharness')))
+
+ def support_files(self, doc):
+ """ Searches the file for all paths specified in url()'s, href or src attributes."""
+ support_files = []
+
+ if doc is None:
+ return support_files
+
+ elements_with_src_attributes = doc.findAll(src=re.compile('.*'))
+ elements_with_href_attributes = doc.findAll(href=re.compile('.*'))
+
+ url_pattern = re.compile('url\(.*\)')
+ urls = []
+ for url in doc.findAll(text=url_pattern):
+ url = re.search(url_pattern, url)
+ url = re.sub('url\([\'\"]?', '', url.group(0))
+ url = re.sub('[\'\"]?\)', '', url)
+ urls.append(url)
+
+ src_paths = [src_tag['src'] for src_tag in elements_with_src_attributes]
+ href_paths = [href_tag['href'] for href_tag in elements_with_href_attributes]
+
+ paths = src_paths + href_paths + urls
+ for path in paths:
+ if not(path.startswith('http:')) and not(path.startswith('mailto:')):
+ support_files.append(path)
+
+ return support_files
diff --git a/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py b/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py
new file mode 100644
index 000000000..7fb0c5b04
--- /dev/null
+++ b/Tools/Scripts/webkitpy/w3c/test_parser_unittest.py
@@ -0,0 +1,217 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2013 Adobe Systems Incorporated. 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 THE COPYRIGHT HOLDER "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 HOLDER 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
+import unittest2 as unittest
+
+from webkitpy.common.system.outputcapture import OutputCapture
+from webkitpy.w3c.test_parser import TestParser
+
+
+options = {'all': False, 'no_overwrite': False}
+
+
+class TestParserTest(unittest.TestCase):
+
+ def test_analyze_test_reftest_one_match(self):
+ test_html = """<head>
+<link rel="match" href="green-box-ref.xht" />
+</head>
+"""
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html)
+
+ self.assertNotEqual(test_info, None, 'did not find a test')
+ self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+ self.assertTrue('reference' in test_info.keys(), 'did not find a reference file')
+ self.assertTrue(test_info['reference'].startswith(test_path), 'reference path is not correct')
+ self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
+ self.assertFalse('jstest' in test_info.keys(), 'test should not have been analyzed as a jstest')
+
+ def test_analyze_test_reftest_multiple_matches(self):
+ test_html = """<head>
+<link rel="match" href="green-box-ref.xht" />
+<link rel="match" href="blue-box-ref.xht" />
+<link rel="match" href="orange-box-ref.xht" />
+</head>
+"""
+ oc = OutputCapture()
+ oc.capture_output()
+ try:
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html)
+ finally:
+ _, _, logs = oc.restore_output()
+
+ self.assertNotEqual(test_info, None, 'did not find a test')
+ self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+ self.assertTrue('reference' in test_info.keys(), 'did not find a reference file')
+ self.assertTrue(test_info['reference'].startswith(test_path), 'reference path is not correct')
+ self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
+ self.assertFalse('jstest' in test_info.keys(), 'test should not have been analyzed as a jstest')
+
+ self.assertEqual(logs, 'Multiple references are not supported. Importing the first ref defined in somefile.html\n')
+
+ def test_analyze_test_reftest_match_and_mismatch(self):
+ test_html = """<head>
+<link rel="match" href="green-box-ref.xht" />
+<link rel="match" href="blue-box-ref.xht" />
+<link rel="mismatch" href="orange-box-notref.xht" />
+</head>
+"""
+ oc = OutputCapture()
+ oc.capture_output()
+
+ try:
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html)
+ finally:
+ _, _, logs = oc.restore_output()
+
+ self.assertNotEqual(test_info, None, 'did not find a test')
+ self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+ self.assertTrue('reference' in test_info.keys(), 'did not find a reference file')
+ self.assertTrue(test_info['reference'].startswith(test_path), 'reference path is not correct')
+ self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
+ self.assertFalse('jstest' in test_info.keys(), 'test should not have been analyzed as a jstest')
+
+ self.assertEqual(logs, 'Multiple references are not supported. Importing the first ref defined in somefile.html\n')
+
+ def test_analyze_test_reftest_with_ref_support_Files(self):
+ """ Tests analyze_test() using a reftest that has refers to a reference file outside of the tests directory and the reference file has paths to other support files """
+
+ test_html = """<html>
+<head>
+<link rel="match" href="../reference/green-box-ref.xht" />
+</head>
+"""
+ ref_html = """<head>
+<link href="support/css/ref-stylesheet.css" rel="stylesheet" type="text/css">
+<style type="text/css">
+ background-image: url("../../support/some-image.png")
+</style>
+</head>
+<body>
+<div><img src="../support/black96x96.png" alt="Image download support must be enabled" /></div>
+</body>
+</html>
+"""
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html, ref_contents=ref_html)
+
+ self.assertNotEqual(test_info, None, 'did not find a test')
+ self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+ self.assertTrue('reference' in test_info.keys(), 'did not find a reference file')
+ self.assertTrue(test_info['reference'].startswith(test_path), 'reference path is not correct')
+ self.assertTrue('refsupport' in test_info.keys(), 'there should be refsupport files for this test')
+ self.assertEquals(len(test_info['refsupport']), 3, 'there should be 3 support files in this reference')
+ self.assertFalse('jstest' in test_info.keys(), 'test should not have been analyzed as a jstest')
+
+ def test_analyze_jstest(self):
+ """ Tests analyze_test() using a jstest """
+
+ test_html = """<head>
+<link href="/resources/testharness.css" rel="stylesheet" type="text/css">
+<script src="/resources/testharness.js"></script>
+</head>
+"""
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html)
+
+ self.assertNotEqual(test_info, None, 'test_info is None')
+ self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+ self.assertFalse('reference' in test_info.keys(), 'shold not have found a reference file')
+ self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
+ self.assertTrue('jstest' in test_info.keys(), 'test should be a jstest')
+
+ def test_analyze_pixel_test_all_true(self):
+ """ Tests analyze_test() using a test that is neither a reftest or jstest with all=False """
+
+ test_html = """<html>
+<head>
+<title>CSS Test: DESCRIPTION OF TEST</title>
+<link rel="author" title="NAME_OF_AUTHOR" />
+<style type="text/css"><![CDATA[
+CSS FOR TEST
+]]></style>
+</head>
+<body>
+CONTENT OF TEST
+</body>
+</html>
+"""
+ # Set options to 'all' so this gets found
+ options['all'] = True
+
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html)
+
+ self.assertNotEqual(test_info, None, 'test_info is None')
+ self.assertTrue('test' in test_info.keys(), 'did not find a test file')
+ self.assertFalse('reference' in test_info.keys(), 'shold not have found a reference file')
+ self.assertFalse('refsupport' in test_info.keys(), 'there should be no refsupport files for this test')
+ self.assertFalse('jstest' in test_info.keys(), 'test should not be a jstest')
+
+ def test_analyze_pixel_test_all_false(self):
+ """ Tests analyze_test() using a test that is neither a reftest or jstest, with -all=False """
+
+ test_html = """<html>
+<head>
+<title>CSS Test: DESCRIPTION OF TEST</title>
+<link rel="author" title="NAME_OF_AUTHOR" />
+<style type="text/css"><![CDATA[
+CSS FOR TEST
+]]></style>
+</head>
+<body>
+CONTENT OF TEST
+</body>
+</html>
+"""
+ # Set all to false so this gets skipped
+ options['all'] = False
+
+ test_path = '/some/madeup/path/'
+ parser = TestParser(options, test_path + 'somefile.html')
+ test_info = parser.analyze_test(test_contents=test_html)
+
+ self.assertEqual(test_info, None, 'test should have been skipped')
+
+ def test_analyze_non_html_file(self):
+ """ Tests analyze_test() with a file that has no html"""
+ # FIXME: use a mock filesystem
+ parser = TestParser(options, os.path.join(os.path.dirname(__file__), 'test_parser.py'))
+ test_info = parser.analyze_test()
+ self.assertEqual(test_info, None, 'no tests should have been found in this file')
diff --git a/Tools/Scripts/webkitpy/webkitpy.pyproj b/Tools/Scripts/webkitpy/webkitpy.pyproj
deleted file mode 100644
index 588cfeaf5..000000000
--- a/Tools/Scripts/webkitpy/webkitpy.pyproj
+++ /dev/null
@@ -1,538 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{59b0a791-93fe-40f8-a52b-ba19b73e8fa6}</ProjectGuid>
- <ProjectHome>.</ProjectHome>
- <StartupFile>layout_tests\run_webkit_tests.py</StartupFile>
- <SearchPath>
- </SearchPath>
- <WorkingDirectory>../</WorkingDirectory>
- <OutputPath>.</OutputPath>
- <Name>webkitpy</Name>
- <RootNamespace>webkitpy</RootNamespace>
- <IsWindowsApplication>False</IsWindowsApplication>
- <LaunchProvider>Standard Python launcher</LaunchProvider>
- <CommandLineArguments>--platform=mock --no-pixel-tests --no-retry-failures</CommandLineArguments>
- <InterpreterPath />
- <InterpreterArguments />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <DebugSymbols>true</DebugSymbols>
- <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <DebugSymbols>true</DebugSymbols>
- <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="bindings\main.py" />
- <Compile Include="bindings\__init__.py" />
- <Compile Include="common\checkout\baselineoptimizer.py" />
- <Compile Include="common\checkout\baselineoptimizer_unittest.py" />
- <Compile Include="common\checkout\changelog.py" />
- <Compile Include="common\checkout\changelog_unittest.py" />
- <Compile Include="common\checkout\checkout.py" />
- <Compile Include="common\checkout\checkout_mock.py" />
- <Compile Include="common\checkout\checkout_unittest.py" />
- <Compile Include="common\checkout\commitinfo.py" />
- <Compile Include="common\checkout\commitinfo_unittest.py" />
- <Compile Include="common\checkout\deps.py" />
- <Compile Include="common\checkout\deps_mock.py" />
- <Compile Include="common\checkout\diff_parser.py" />
- <Compile Include="common\checkout\diff_parser_unittest.py" />
- <Compile Include="common\checkout\diff_test_data.py" />
- <Compile Include="common\checkout\scm\commitmessage.py" />
- <Compile Include="common\checkout\scm\detection.py" />
- <Compile Include="common\checkout\scm\detection_unittest.py" />
- <Compile Include="common\checkout\scm\git.py" />
- <Compile Include="common\checkout\scm\scm.py" />
- <Compile Include="common\checkout\scm\scm_mock.py" />
- <Compile Include="common\checkout\scm\scm_unittest.py" />
- <Compile Include="common\checkout\scm\svn.py" />
- <Compile Include="common\checkout\scm\__init__.py" />
- <Compile Include="common\checkout\__init__.py" />
- <Compile Include="common\checksvnconfigfile.py" />
- <Compile Include="common\config\build.py" />
- <Compile Include="common\config\build_unittest.py" />
- <Compile Include="common\config\committers.py" />
- <Compile Include="common\config\committers_unittest.py" />
- <Compile Include="common\config\committervalidator.py" />
- <Compile Include="common\config\committervalidator_unittest.py" />
- <Compile Include="common\config\contributionareas.py" />
- <Compile Include="common\config\contributionareas_unittest.py" />
- <Compile Include="common\config\irc.py" />
- <Compile Include="common\config\ports.py" />
- <Compile Include="common\config\ports_mock.py" />
- <Compile Include="common\config\ports_unittest.py" />
- <Compile Include="common\config\urls.py" />
- <Compile Include="common\config\urls_unittest.py" />
- <Compile Include="common\config\__init__.py" />
- <Compile Include="common\editdistance.py" />
- <Compile Include="common\editdistance_unittest.py" />
- <Compile Include="common\find_files.py" />
- <Compile Include="common\find_files_unittest.py" />
- <Compile Include="common\host.py" />
- <Compile Include="common\host_mock.py" />
- <Compile Include="common\lru_cache.py" />
- <Compile Include="common\lru_cache_unittest.py" />
- <Compile Include="common\memoized.py" />
- <Compile Include="common\memoized_unittest.py" />
- <Compile Include="common\message_pool.py" />
- <Compile Include="common\net\bugzilla\attachment.py" />
- <Compile Include="common\net\bugzilla\bug.py" />
- <Compile Include="common\net\bugzilla\bugzilla.py" />
- <Compile Include="common\net\bugzilla\bugzilla_mock.py" />
- <Compile Include="common\net\bugzilla\bugzilla_unittest.py" />
- <Compile Include="common\net\bugzilla\bug_unittest.py" />
- <Compile Include="common\net\bugzilla\__init__.py" />
- <Compile Include="common\net\buildbot\buildbot.py" />
- <Compile Include="common\net\buildbot\buildbot_mock.py" />
- <Compile Include="common\net\buildbot\buildbot_unittest.py" />
- <Compile Include="common\net\buildbot\chromiumbuildbot.py" />
- <Compile Include="common\net\buildbot\__init__.py" />
- <Compile Include="common\net\credentials.py" />
- <Compile Include="common\net\credentials_unittest.py" />
- <Compile Include="common\net\failuremap.py" />
- <Compile Include="common\net\failuremap_unittest.py" />
- <Compile Include="common\net\file_uploader.py" />
- <Compile Include="common\net\htdigestparser.py" />
- <Compile Include="common\net\htdigestparser_unittest.py" />
- <Compile Include="common\net\irc\ircbot.py" />
- <Compile Include="common\net\irc\ircproxy.py" />
- <Compile Include="common\net\irc\ircproxy_unittest.py" />
- <Compile Include="common\net\irc\irc_mock.py" />
- <Compile Include="common\net\irc\__init__.py" />
- <Compile Include="common\net\layouttestresults.py" />
- <Compile Include="common\net\layouttestresults_unittest.py" />
- <Compile Include="common\net\networktransaction.py" />
- <Compile Include="common\net\networktransaction_unittest.py" />
- <Compile Include="common\net\omahaproxy.py" />
- <Compile Include="common\net\omahaproxy_unittest.py" />
- <Compile Include="common\net\regressionwindow.py" />
- <Compile Include="common\net\resultsjsonparser.py" />
- <Compile Include="common\net\resultsjsonparser_unittest.py" />
- <Compile Include="common\net\statusserver.py" />
- <Compile Include="common\net\statusserver_mock.py" />
- <Compile Include="common\net\statusserver_unittest.py" />
- <Compile Include="common\net\unittestresults.py" />
- <Compile Include="common\net\unittestresults_unittest.py" />
- <Compile Include="common\net\web.py" />
- <Compile Include="common\net\web_mock.py" />
- <Compile Include="common\net\__init__.py" />
- <Compile Include="common\newstringio.py" />
- <Compile Include="common\newstringio_unittest.py" />
- <Compile Include="common\prettypatch.py" />
- <Compile Include="common\prettypatch_unittest.py" />
- <Compile Include="common\read_checksum_from_png.py" />
- <Compile Include="common\read_checksum_from_png_unittest.py" />
- <Compile Include="common\system\autoinstall.py" />
- <Compile Include="common\system\crashlogs.py" />
- <Compile Include="common\system\crashlogs_unittest.py" />
- <Compile Include="common\system\environment.py" />
- <Compile Include="common\system\environment_unittest.py" />
- <Compile Include="common\system\executive.py" />
- <Compile Include="common\system\executive_mock.py" />
- <Compile Include="common\system\executive_unittest.py" />
- <Compile Include="common\system\fileset.py" />
- <Compile Include="common\system\filesystem.py" />
- <Compile Include="common\system\filesystem_mock.py" />
- <Compile Include="common\system\filesystem_mock_unittest.py" />
- <Compile Include="common\system\filesystem_unittest.py" />
- <Compile Include="common\system\file_lock.py" />
- <Compile Include="common\system\file_lock_integrationtest.py" />
- <Compile Include="common\system\logtesting.py" />
- <Compile Include="common\system\logutils.py" />
- <Compile Include="common\system\logutils_unittest.py" />
- <Compile Include="common\system\outputcapture.py" />
- <Compile Include="common\system\outputcapture_unittest.py" />
- <Compile Include="common\system\path.py" />
- <Compile Include="common\system\path_unittest.py" />
- <Compile Include="common\system\platforminfo.py" />
- <Compile Include="common\system\platforminfo_mock.py" />
- <Compile Include="common\system\platforminfo_unittest.py" />
- <Compile Include="common\system\stack_utils.py" />
- <Compile Include="common\system\stack_utils_unittest.py" />
- <Compile Include="common\system\systemhost.py" />
- <Compile Include="common\system\systemhost_mock.py" />
- <Compile Include="common\system\urlfetcher.py" />
- <Compile Include="common\system\urlfetcher_mock.py" />
- <Compile Include="common\system\user.py" />
- <Compile Include="common\system\user_mock.py" />
- <Compile Include="common\system\user_unittest.py" />
- <Compile Include="common\system\workspace.py" />
- <Compile Include="common\system\workspace_mock.py" />
- <Compile Include="common\system\workspace_unittest.py" />
- <Compile Include="common\system\zipfileset.py" />
- <Compile Include="common\system\zipfileset_mock.py" />
- <Compile Include="common\system\zipfileset_unittest.py" />
- <Compile Include="common\system\zip_mock.py" />
- <Compile Include="common\system\__init__.py" />
- <Compile Include="common\thread\messagepump.py" />
- <Compile Include="common\thread\messagepump_unittest.py" />
- <Compile Include="common\thread\threadedmessagequeue.py" />
- <Compile Include="common\thread\threadedmessagequeue_unittest.py" />
- <Compile Include="common\thread\__init__.py" />
- <Compile Include="common\version_check.py" />
- <Compile Include="common\watchlist\amountchangedpattern.py" />
- <Compile Include="common\watchlist\amountchangedpattern_unittest.py" />
- <Compile Include="common\watchlist\changedlinepattern.py" />
- <Compile Include="common\watchlist\changedlinepattern_unittest.py" />
- <Compile Include="common\watchlist\filenamepattern.py" />
- <Compile Include="common\watchlist\filenamepattern_unittest.py" />
- <Compile Include="common\watchlist\watchlist.py" />
- <Compile Include="common\watchlist\watchlistloader.py" />
- <Compile Include="common\watchlist\watchlistloader_unittest.py" />
- <Compile Include="common\watchlist\watchlistparser.py" />
- <Compile Include="common\watchlist\watchlistparser_unittest.py" />
- <Compile Include="common\watchlist\watchlistrule.py" />
- <Compile Include="common\watchlist\watchlistrule_unittest.py" />
- <Compile Include="common\watchlist\watchlist_mock.py" />
- <Compile Include="common\watchlist\watchlist_unittest.py" />
- <Compile Include="common\watchlist\__init__.py" />
- <Compile Include="common\webkitunittest.py" />
- <Compile Include="common\__init__.py" />
- <Compile Include="layout_tests\controllers\manager.py" />
- <Compile Include="layout_tests\controllers\manager_unittest.py" />
- <Compile Include="layout_tests\controllers\single_test_runner.py" />
- <Compile Include="layout_tests\controllers\test_expectations_editor.py" />
- <Compile Include="layout_tests\controllers\test_expectations_editor_unittest.py" />
- <Compile Include="layout_tests\controllers\test_result_writer.py" />
- <Compile Include="layout_tests\controllers\test_result_writer_unittest.py" />
- <Compile Include="layout_tests\controllers\worker.py" />
- <Compile Include="layout_tests\controllers\__init__.py" />
- <Compile Include="layout_tests\layout_package\json_layout_results_generator.py" />
- <Compile Include="layout_tests\layout_package\json_results_generator.py" />
- <Compile Include="layout_tests\layout_package\json_results_generator_unittest.py" />
- <Compile Include="layout_tests\layout_package\__init__.py" />
- <Compile Include="layout_tests\models\result_summary.py" />
- <Compile Include="layout_tests\models\test_configuration.py" />
- <Compile Include="layout_tests\models\test_configuration_unittest.py" />
- <Compile Include="layout_tests\models\test_expectations.py" />
- <Compile Include="layout_tests\models\test_expectations_unittest.py" />
- <Compile Include="layout_tests\models\test_failures.py" />
- <Compile Include="layout_tests\models\test_failures_unittest.py" />
- <Compile Include="layout_tests\models\test_input.py" />
- <Compile Include="layout_tests\models\test_results.py" />
- <Compile Include="layout_tests\models\test_results_unittest.py" />
- <Compile Include="layout_tests\models\__init__.py" />
- <Compile Include="layout_tests\port\apple.py" />
- <Compile Include="layout_tests\port\base.py" />
- <Compile Include="layout_tests\port\base_unittest.py" />
- <Compile Include="layout_tests\port\builders.py" />
- <Compile Include="layout_tests\port\builders_unittest.py" />
- <Compile Include="layout_tests\port\chromium.py" />
- <Compile Include="layout_tests\port\chromium_android.py" />
- <Compile Include="layout_tests\port\chromium_android_unittest.py" />
- <Compile Include="layout_tests\port\chromium_linux.py" />
- <Compile Include="layout_tests\port\chromium_linux_unittest.py" />
- <Compile Include="layout_tests\port\chromium_mac.py" />
- <Compile Include="layout_tests\port\chromium_mac_unittest.py" />
- <Compile Include="layout_tests\port\chromium_port_testcase.py" />
- <Compile Include="layout_tests\port\chromium_unittest.py" />
- <Compile Include="layout_tests\port\chromium_win.py" />
- <Compile Include="layout_tests\port\chromium_win_unittest.py" />
- <Compile Include="layout_tests\port\config.py" />
- <Compile Include="layout_tests\port\config_mock.py" />
- <Compile Include="layout_tests\port\config_standalone.py" />
- <Compile Include="layout_tests\port\config_unittest.py" />
- <Compile Include="layout_tests\port\driver.py" />
- <Compile Include="layout_tests\port\driver_unittest.py" />
- <Compile Include="layout_tests\port\efl.py" />
- <Compile Include="layout_tests\port\efl_unittest.py" />
- <Compile Include="layout_tests\port\factory.py" />
- <Compile Include="layout_tests\port\factory_unittest.py" />
- <Compile Include="layout_tests\port\gtk.py" />
- <Compile Include="layout_tests\port\gtk_unittest.py" />
- <Compile Include="layout_tests\port\http_lock.py" />
- <Compile Include="layout_tests\port\http_lock_unittest.py" />
- <Compile Include="layout_tests\port\leakdetector.py" />
- <Compile Include="layout_tests\port\leakdetector_unittest.py" />
- <Compile Include="layout_tests\port\mac.py" />
- <Compile Include="layout_tests\port\mac_unittest.py" />
- <Compile Include="layout_tests\port\mock_drt.py" />
- <Compile Include="layout_tests\port\mock_drt_unittest.py" />
- <Compile Include="layout_tests\port\port_testcase.py" />
- <Compile Include="layout_tests\port\pulseaudio_sanitizer.py" />
- <Compile Include="layout_tests\port\qt.py" />
- <Compile Include="layout_tests\port\qt_unittest.py" />
- <Compile Include="layout_tests\port\server_process.py" />
- <Compile Include="layout_tests\port\server_process_unittest.py" />
- <Compile Include="layout_tests\port\test.py" />
- <Compile Include="layout_tests\port\webkit.py" />
- <Compile Include="layout_tests\port\webkit_unittest.py" />
- <Compile Include="layout_tests\port\win.py" />
- <Compile Include="layout_tests\port\win_unittest.py" />
- <Compile Include="layout_tests\port\xvfbdriver.py" />
- <Compile Include="layout_tests\port\__init__.py" />
- <Compile Include="layout_tests\reftests\extract_reference_link.py" />
- <Compile Include="layout_tests\reftests\extract_reference_link_unittest.py" />
- <Compile Include="layout_tests\reftests\__init__.py" />
- <Compile Include="layout_tests\run_webkit_tests.py" />
- <Compile Include="layout_tests\run_webkit_tests_integrationtest.py" />
- <Compile Include="layout_tests\servers\apache_http_server.py" />
- <Compile Include="layout_tests\servers\apache_http_server_unittest.py" />
- <Compile Include="layout_tests\servers\http_server.py" />
- <Compile Include="layout_tests\servers\http_server_base.py" />
- <Compile Include="layout_tests\servers\http_server_integrationtest.py" />
- <Compile Include="layout_tests\servers\http_server_unittest.py" />
- <Compile Include="layout_tests\servers\websocket_server.py" />
- <Compile Include="layout_tests\servers\__init__.py" />
- <Compile Include="layout_tests\views\metered_stream.py" />
- <Compile Include="layout_tests\views\metered_stream_unittest.py" />
- <Compile Include="layout_tests\views\printing.py" />
- <Compile Include="layout_tests\views\printing_unittest.py" />
- <Compile Include="layout_tests\views\__init__.py" />
- <Compile Include="layout_tests\__init__.py" />
- <Compile Include="performance_tests\perftest.py" />
- <Compile Include="performance_tests\perftestsrunner.py" />
- <Compile Include="performance_tests\perftestsrunner_unittest.py" />
- <Compile Include="performance_tests\perftest_unittest.py" />
- <Compile Include="performance_tests\__init__.py" />
- <Compile Include="style\checker.py" />
- <Compile Include="style\checkers\changelog.py" />
- <Compile Include="style\checkers\changelog_unittest.py" />
- <Compile Include="style\checkers\common.py" />
- <Compile Include="style\checkers\common_unittest.py" />
- <Compile Include="style\checkers\cpp.py" />
- <Compile Include="style\checkers\cpp_unittest.py" />
- <Compile Include="style\checkers\jsonchecker.py" />
- <Compile Include="style\checkers\jsonchecker_unittest.py" />
- <Compile Include="style\checkers\png.py" />
- <Compile Include="style\checkers\png_unittest.py" />
- <Compile Include="style\checkers\python.py" />
- <Compile Include="style\checkers\python_unittest.py" />
- <Compile Include="style\checkers\python_unittest_input.py" />
- <Compile Include="style\checkers\test_expectations.py" />
- <Compile Include="style\checkers\test_expectations_unittest.py" />
- <Compile Include="style\checkers\text.py" />
- <Compile Include="style\checkers\text_unittest.py" />
- <Compile Include="style\checkers\watchlist.py" />
- <Compile Include="style\checkers\watchlist_unittest.py" />
- <Compile Include="style\checkers\xcodeproj.py" />
- <Compile Include="style\checkers\xcodeproj_unittest.py" />
- <Compile Include="style\checkers\xml.py" />
- <Compile Include="style\checkers\xml_unittest.py" />
- <Compile Include="style\checkers\__init__.py" />
- <Compile Include="style\checker_unittest.py" />
- <Compile Include="style\error_handlers.py" />
- <Compile Include="style\error_handlers_unittest.py" />
- <Compile Include="style\filereader.py" />
- <Compile Include="style\filereader_unittest.py" />
- <Compile Include="style\filter.py" />
- <Compile Include="style\filter_unittest.py" />
- <Compile Include="style\main.py" />
- <Compile Include="style\main_unittest.py" />
- <Compile Include="style\optparser.py" />
- <Compile Include="style\optparser_unittest.py" />
- <Compile Include="style\patchreader.py" />
- <Compile Include="style\patchreader_unittest.py" />
- <Compile Include="style\__init__.py" />
- <Compile Include="test\finder.py" />
- <Compile Include="test\finder_unittest.py" />
- <Compile Include="test\main.py" />
- <Compile Include="test\main_unittest.py" />
- <Compile Include="test\printer.py" />
- <Compile Include="test\runner.py" />
- <Compile Include="test\runner_unittest.py" />
- <Compile Include="test\skip.py" />
- <Compile Include="test\skip_unittest.py" />
- <Compile Include="test\__init__.py" />
- <Compile Include="thirdparty\BeautifulSoup.py" />
- <Compile Include="thirdparty\mock.py" />
- <Compile Include="thirdparty\mod_pywebsocket\common.py" />
- <Compile Include="thirdparty\mod_pywebsocket\dispatch.py" />
- <Compile Include="thirdparty\mod_pywebsocket\extensions.py" />
- <Compile Include="thirdparty\mod_pywebsocket\handshake\draft75.py" />
- <Compile Include="thirdparty\mod_pywebsocket\handshake\hybi.py" />
- <Compile Include="thirdparty\mod_pywebsocket\handshake\hybi00.py" />
- <Compile Include="thirdparty\mod_pywebsocket\handshake\_base.py" />
- <Compile Include="thirdparty\mod_pywebsocket\handshake\__init__.py" />
- <Compile Include="thirdparty\mod_pywebsocket\headerparserhandler.py" />
- <Compile Include="thirdparty\mod_pywebsocket\http_header_util.py" />
- <Compile Include="thirdparty\mod_pywebsocket\memorizingfile.py" />
- <Compile Include="thirdparty\mod_pywebsocket\msgutil.py" />
- <Compile Include="thirdparty\mod_pywebsocket\standalone.py" />
- <Compile Include="thirdparty\mod_pywebsocket\stream.py" />
- <Compile Include="thirdparty\mod_pywebsocket\util.py" />
- <Compile Include="thirdparty\mod_pywebsocket\_stream_base.py" />
- <Compile Include="thirdparty\mod_pywebsocket\_stream_hixie75.py" />
- <Compile Include="thirdparty\mod_pywebsocket\_stream_hybi.py" />
- <Compile Include="thirdparty\mod_pywebsocket\__init__.py" />
- <Compile Include="thirdparty\ordered_dict.py" />
- <Compile Include="thirdparty\__init__.py" />
- <Compile Include="thirdparty\__init___unittest.py" />
- <Compile Include="tool\bot\botinfo.py" />
- <Compile Include="tool\bot\botinfo_unittest.py" />
- <Compile Include="tool\bot\commitqueuetask.py" />
- <Compile Include="tool\bot\commitqueuetask_unittest.py" />
- <Compile Include="tool\bot\earlywarningsystemtask.py" />
- <Compile Include="tool\bot\expectedfailures.py" />
- <Compile Include="tool\bot\expectedfailures_unittest.py" />
- <Compile Include="tool\bot\feeders.py" />
- <Compile Include="tool\bot\feeders_unittest.py" />
- <Compile Include="tool\bot\flakytestreporter.py" />
- <Compile Include="tool\bot\flakytestreporter_unittest.py" />
- <Compile Include="tool\bot\irc_command.py" />
- <Compile Include="tool\bot\irc_command_unittest.py" />
- <Compile Include="tool\bot\ircbot.py" />
- <Compile Include="tool\bot\ircbot_unittest.py" />
- <Compile Include="tool\bot\layouttestresultsreader.py" />
- <Compile Include="tool\bot\layouttestresultsreader_unittest.py" />
- <Compile Include="tool\bot\patchanalysistask.py" />
- <Compile Include="tool\bot\queueengine.py" />
- <Compile Include="tool\bot\queueengine_unittest.py" />
- <Compile Include="tool\bot\sheriff.py" />
- <Compile Include="tool\bot\sheriff_unittest.py" />
- <Compile Include="tool\bot\stylequeuetask.py" />
- <Compile Include="tool\bot\__init__.py" />
- <Compile Include="tool\commands\abstractlocalservercommand.py" />
- <Compile Include="tool\commands\abstractsequencedcommand.py" />
- <Compile Include="tool\commands\adduserstogroups.py" />
- <Compile Include="tool\commands\analyzechangelog.py" />
- <Compile Include="tool\commands\analyzechangelog_unittest.py" />
- <Compile Include="tool\commands\applywatchlistlocal.py" />
- <Compile Include="tool\commands\applywatchlistlocal_unittest.py" />
- <Compile Include="tool\commands\bugfortest.py" />
- <Compile Include="tool\commands\bugsearch.py" />
- <Compile Include="tool\commands\chromechannels.py" />
- <Compile Include="tool\commands\chromechannels_unittest.py" />
- <Compile Include="tool\commands\commandtest.py" />
- <Compile Include="tool\commands\download.py" />
- <Compile Include="tool\commands\download_unittest.py" />
- <Compile Include="tool\commands\earlywarningsystem.py" />
- <Compile Include="tool\commands\earlywarningsystem_unittest.py" />
- <Compile Include="tool\commands\expectations.py" />
- <Compile Include="tool\commands\findusers.py" />
- <Compile Include="tool\commands\gardenomatic.py" />
- <Compile Include="tool\commands\openbugs.py" />
- <Compile Include="tool\commands\openbugs_unittest.py" />
- <Compile Include="tool\commands\prettydiff.py" />
- <Compile Include="tool\commands\queries.py" />
- <Compile Include="tool\commands\queries_unittest.py" />
- <Compile Include="tool\commands\queues.py" />
- <Compile Include="tool\commands\queuestest.py" />
- <Compile Include="tool\commands\queues_unittest.py" />
- <Compile Include="tool\commands\rebaseline.py" />
- <Compile Include="tool\commands\rebaselineserver.py" />
- <Compile Include="tool\commands\rebaseline_unittest.py" />
- <Compile Include="tool\commands\roll.py" />
- <Compile Include="tool\commands\roll_unittest.py" />
- <Compile Include="tool\commands\sheriffbot.py" />
- <Compile Include="tool\commands\sheriffbot_unittest.py" />
- <Compile Include="tool\commands\stepsequence.py" />
- <Compile Include="tool\commands\suggestnominations.py" />
- <Compile Include="tool\commands\suggestnominations_unittest.py" />
- <Compile Include="tool\commands\upload.py" />
- <Compile Include="tool\commands\upload_unittest.py" />
- <Compile Include="tool\commands\__init__.py" />
- <Compile Include="tool\comments.py" />
- <Compile Include="tool\grammar.py" />
- <Compile Include="tool\grammar_unittest.py" />
- <Compile Include="tool\main.py" />
- <Compile Include="tool\mocktool.py" />
- <Compile Include="tool\mocktool_unittest.py" />
- <Compile Include="tool\multicommandtool.py" />
- <Compile Include="tool\multicommandtool_unittest.py" />
- <Compile Include="tool\servers\gardeningserver.py" />
- <Compile Include="tool\servers\gardeningserver_unittest.py" />
- <Compile Include="tool\servers\rebaselineserver.py" />
- <Compile Include="tool\servers\rebaselineserver_unittest.py" />
- <Compile Include="tool\servers\reflectionhandler.py" />
- <Compile Include="tool\servers\__init__.py" />
- <Compile Include="tool\steps\abstractstep.py" />
- <Compile Include="tool\steps\addsvnmimetypeforpng.py" />
- <Compile Include="tool\steps\addsvnmimetypeforpng_unittest.py" />
- <Compile Include="tool\steps\applypatch.py" />
- <Compile Include="tool\steps\applypatchwithlocalcommit.py" />
- <Compile Include="tool\steps\applywatchlist.py" />
- <Compile Include="tool\steps\applywatchlist_unittest.py" />
- <Compile Include="tool\steps\attachtobug.py" />
- <Compile Include="tool\steps\build.py" />
- <Compile Include="tool\steps\checkstyle.py" />
- <Compile Include="tool\steps\cleanworkingdirectory.py" />
- <Compile Include="tool\steps\cleanworkingdirectorywithlocalcommits.py" />
- <Compile Include="tool\steps\cleanworkingdirectory_unittest.py" />
- <Compile Include="tool\steps\closebug.py" />
- <Compile Include="tool\steps\closebugforlanddiff.py" />
- <Compile Include="tool\steps\closebugforlanddiff_unittest.py" />
- <Compile Include="tool\steps\closepatch.py" />
- <Compile Include="tool\steps\commit.py" />
- <Compile Include="tool\steps\commit_unittest.py" />
- <Compile Include="tool\steps\confirmdiff.py" />
- <Compile Include="tool\steps\createbug.py" />
- <Compile Include="tool\steps\editchangelog.py" />
- <Compile Include="tool\steps\ensurebugisopenandassigned.py" />
- <Compile Include="tool\steps\ensurelocalcommitifneeded.py" />
- <Compile Include="tool\steps\metastep.py" />
- <Compile Include="tool\steps\obsoletepatches.py" />
- <Compile Include="tool\steps\options.py" />
- <Compile Include="tool\steps\postdiff.py" />
- <Compile Include="tool\steps\postdiffforcommit.py" />
- <Compile Include="tool\steps\postdiffforrevert.py" />
- <Compile Include="tool\steps\preparechangelog.py" />
- <Compile Include="tool\steps\preparechangelogfordepsroll.py" />
- <Compile Include="tool\steps\preparechangelogforrevert.py" />
- <Compile Include="tool\steps\preparechangelogforrevert_unittest.py" />
- <Compile Include="tool\steps\preparechangelog_unittest.py" />
- <Compile Include="tool\steps\promptforbugortitle.py" />
- <Compile Include="tool\steps\reopenbugafterrollout.py" />
- <Compile Include="tool\steps\revertrevision.py" />
- <Compile Include="tool\steps\runtests.py" />
- <Compile Include="tool\steps\runtests_unittest.py" />
- <Compile Include="tool\steps\steps_unittest.py" />
- <Compile Include="tool\steps\suggestreviewers.py" />
- <Compile Include="tool\steps\suggestreviewers_unittest.py" />
- <Compile Include="tool\steps\update.py" />
- <Compile Include="tool\steps\updatechangelogswithreviewer.py" />
- <Compile Include="tool\steps\updatechangelogswithreview_unittest.py" />
- <Compile Include="tool\steps\updatechromiumdeps.py" />
- <Compile Include="tool\steps\update_unittest.py" />
- <Compile Include="tool\steps\validatechangelogs.py" />
- <Compile Include="tool\steps\validatechangelogs_unittest.py" />
- <Compile Include="tool\steps\validatereviewer.py" />
- <Compile Include="tool\steps\__init__.py" />
- <Compile Include="tool\__init__.py" />
- <Compile Include="to_be_moved\update_webgl_conformance_tests.py" />
- <Compile Include="to_be_moved\update_webgl_conformance_tests_unittest.py" />
- <Compile Include="to_be_moved\__init__.py" />
- <Compile Include="__init__.py" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="bindings\" />
- <Folder Include="common\" />
- <Folder Include="common\checkout\" />
- <Folder Include="common\checkout\scm\" />
- <Folder Include="common\config\" />
- <Folder Include="common\net\" />
- <Folder Include="common\net\bugzilla\" />
- <Folder Include="common\net\buildbot\" />
- <Folder Include="common\net\irc\" />
- <Folder Include="common\system\" />
- <Folder Include="common\thread\" />
- <Folder Include="common\watchlist\" />
- <Folder Include="layout_tests\" />
- <Folder Include="layout_tests\controllers\" />
- <Folder Include="layout_tests\layout_package\" />
- <Folder Include="layout_tests\models\" />
- <Folder Include="layout_tests\port\" />
- <Folder Include="layout_tests\reftests\" />
- <Folder Include="layout_tests\servers\" />
- <Folder Include="layout_tests\views\" />
- <Folder Include="performance_tests\" />
- <Folder Include="style\" />
- <Folder Include="style\checkers\" />
- <Folder Include="test\" />
- <Folder Include="thirdparty\" />
- <Folder Include="thirdparty\mod_pywebsocket\" />
- <Folder Include="thirdparty\mod_pywebsocket\handshake\" />
- <Folder Include="tool\" />
- <Folder Include="tool\bot\" />
- <Folder Include="tool\commands\" />
- <Folder Include="tool\servers\" />
- <Folder Include="tool\steps\" />
- <Folder Include="to_be_moved\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
-</Project> \ No newline at end of file
diff --git a/Tools/Scripts/webkitpy/webkitpy.sln b/Tools/Scripts/webkitpy/webkitpy.sln
deleted file mode 100644
index c6583b857..000000000
--- a/Tools/Scripts/webkitpy/webkitpy.sln
+++ /dev/null
@@ -1,18 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "webkitpy", "webkitpy.pyproj", "{59B0A791-93FE-40F8-A52B-BA19B73E8FA6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {59B0A791-93FE-40F8-A52B-BA19B73E8FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {59B0A791-93FE-40F8-A52B-BA19B73E8FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/fake-data-failing-expected.txt b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/fake-data-failing-expected.txt
new file mode 100644
index 000000000..32e966fe3
--- /dev/null
+++ b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/fake-data-failing-expected.txt
@@ -0,0 +1,11 @@
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:2' included forbidden macro 'PLATFORM' => '#if PLATFORM(MAC)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:4' included forbidden macro 'CPU' => '#if CPU(X86)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:6' included forbidden macro 'OS' => '#if OS(DARWIN)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:8' included forbidden macro 'COMPILER' => '#if COMPILER(CLANG)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:10' included forbidden macro 'ENABLE' => '#if ENABLE(FEATURE)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:12' included forbidden macro 'HAVE' => '#if HAVE(FEATURE)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:14' included forbidden macro 'USE' => '#if USE(FEATURE)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:16' included forbidden macro 'COMPILER' => '#if COMPILER_SUPPORTS(FEATURE)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:18' included forbidden macro 'COMPILER' => '#if COMPILER_QUIRK(FEATURE)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:23' included forbidden macro 'PLATFORM' => ' #if PLATFORM(X)'
+ERROR: '--stripped--/Fake.framework/Headers/Fail.h:28' included forbidden macro 'PLATFORM' => '#if defined(ignored) && PLATFORM(X)'
diff --git a/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/pass-expected.txt b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/pass-expected.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/pass-expected.txt
diff --git a/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Fail.h b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Fail.h
new file mode 100644
index 000000000..6b420924c
--- /dev/null
+++ b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Fail.h
@@ -0,0 +1,29 @@
+// Common macros that we want to catch.
+#if PLATFORM(MAC)
+#endif
+#if CPU(X86)
+#endif
+#if OS(DARWIN)
+#endif
+#if COMPILER(CLANG)
+#endif
+#if ENABLE(FEATURE)
+#endif
+#if HAVE(FEATURE)
+#endif
+#if USE(FEATURE)
+#endif
+#if COMPILER_SUPPORTS(FEATURE)
+#endif
+#if COMPILER_QUIRK(FEATURE)
+#endif
+
+// Indented.
+#if 1
+ #if PLATFORM(X)
+ #endif
+#endif
+
+// Conditionals, we don't evalute. We just check for the existence of the macro.
+#if defined(ignored) && PLATFORM(X)
+#endif
diff --git a/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Pass.h b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Pass.h
new file mode 100644
index 000000000..3a8a15d38
--- /dev/null
+++ b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/resources/Fake.framework/Headers/Pass.h
@@ -0,0 +1,6 @@
+// A macro word in a #error should not matter, that is just a coincidence.
+#error PLATFORM
+
+// There are references to a OS2, but that is not the OS() macro.
+#if defined(__OS2__) || defined(OS2)
+#endif
diff --git a/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb
new file mode 100755
index 000000000..e362ba399
--- /dev/null
+++ b/Tools/Scripts/webkitruby/check-for-inappropriate-macros-in-external-headers-tests/run-test.rb
@@ -0,0 +1,74 @@
+#!/usr/bin/env ruby
+
+# Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+
+# Testing Tools/Scripts/check-for-macros-in-external-headers
+$test_directory = File.dirname(__FILE__)
+$tool = File.expand_path(File.join($test_directory, '..', '..', 'check-for-inappropriate-macros-in-external-headers'))
+puts "Testing: Tools/Scripts/check-for-inappropriate-macros-in-external-headers"
+
+$was_failure = false
+
+def sanitized_output(output)
+ lines = output.split("\n").map { |line| line.sub(/\'(.*)?\/(.*)?\.framework/, "'--stripped--/\\2.framework") }
+ lines.join("\n") + (lines.empty? ? "" : "\n")
+end
+
+def run_test(config)
+ ENV['TARGET_BUILD_DIR'] = File.join($test_directory, 'resources')
+ ENV['PROJECT_NAME'] = config[:framework]
+ ENV['SHALLOW_BUNDLE'] = config[:shallow] ? 'YES' : 'NO'
+ output = sanitized_output %x{ #{$tool} #{config[:paths].join(' ')} 2>&1 }
+
+ if config[:expectedToPass] != ($?.exitstatus == 0)
+ pass = false
+ else
+ expected_output = File.read File.join($test_directory, config[:expectedOutput])
+ pass = output == expected_output
+ end
+
+ puts "#{pass ? "PASS" : "FAIL"} - #{config[:name]}"
+ $was_failure = true if !pass
+end
+
+[
+ {
+ :name => 'test_good_fake_data',
+ :framework => 'Fake',
+ :shallow => true,
+ :paths => ['Headers/Pass.h'],
+ :expectedToPass => true,
+ :expectedOutput => 'pass-expected.txt'
+ },
+ {
+ :name => 'test_bad_fake_data',
+ :framework => 'Fake',
+ :shallow => true,
+ :paths => ['Headers/Fail.h'],
+ :expectedToPass => false,
+ :expectedOutput => 'fake-data-failing-expected.txt'
+ }
+].each { |x| run_test(x) }
+
+exit 1 if $was_failure
diff --git a/Tools/TestResultServer/app.yaml b/Tools/TestResultServer/app.yaml
index e5a2b3171..505fcb51d 100644
--- a/Tools/TestResultServer/app.yaml
+++ b/Tools/TestResultServer/app.yaml
@@ -1,4 +1,4 @@
-application: test-results
+application: webkit-test-results
version: 1
runtime: python
api_version: 1
diff --git a/Tools/TestResultServer/generate_builders_json.py b/Tools/TestResultServer/generate_builders_json.py
index 9be6552ce..43688455b 100644
--- a/Tools/TestResultServer/generate_builders_json.py
+++ b/Tools/TestResultServer/generate_builders_json.py
@@ -71,16 +71,12 @@ def insert_builder_and_test_data(masters):
for step in fetch_json(cached_build_json_url(master_url, builder, latest_cached_build))['steps']:
step_name = step['name']
-
- # The chromium bots call this step webkit-tests, the webkit.org bots call it layout-test. :(
- # The files stored at test-results.appspot.com use layout-tests as the test suite name, so normalize to that.
- if step_name in ['layout-test', 'webkit_tests']:
- step_name = 'layout-tests'
-
- is_test = step_name == 'layout-tests' if master['name'] == 'webkit.org' else 'test' in step_name and 'archive' not in step_name
- if not is_test:
+ if step_name != 'layout-test':
continue
+ # Adjust for backwards compatibility
+ step_name = 'layout-tests'
+
if step_name not in tests_object:
tests_object[step_name] = {'builders': []}
tests_object[step_name]['builders'].append(builder)
@@ -97,21 +93,13 @@ def main():
logging.getLogger().setLevel(logging.DEBUG if options.verbose else logging.INFO)
masters = [
- {'name': 'ChromiumWin', 'url': 'http://build.chromium.org/p/chromium.win'},
- {'name': 'ChromiumMac', 'url': 'http://build.chromium.org/p/chromium.mac'},
- {'name': 'ChromiumLinux', 'url': 'http://build.chromium.org/p/chromium.linux'},
- {'name': 'ChromiumChromiumOS', 'url': 'http://build.chromium.org/p/chromium.chromiumos'},
- {'name': 'ChromiumGPU', 'url': 'http://build.chromium.org/p/chromium.gpu'},
- {'name': 'ChromiumGPUFYI', 'url': 'http://build.chromium.org/p/chromium.gpu.fyi'},
- {'name': 'ChromiumPerfAv', 'url': 'http://build.chromium.org/p/chromium.perf_av'},
- {'name': 'ChromiumWebkit', 'url': 'http://build.chromium.org/p/chromium.webkit'},
{'name': 'webkit.org', 'url': 'http://build.webkit.org'},
]
insert_builder_and_test_data(masters)
json_file_prefix = ('// This file is auto-generated by Tools/TestResultServer/generate_builders_json.py. It should not be manually modified.\n'
- '// It uses jsonp instead of proper json because we want to be able to load it from a file URL in Chrome for local testing.\n'
+ '// It uses jsonp instead of proper json because we want to be able to load it from a file URL for local testing.\n'
'LOAD_BUILDBOT_DATA(')
json_file_suffix = ');\n';
diff --git a/Tools/TestResultServer/generate_builders_json_unittest.py b/Tools/TestResultServer/generate_builders_json_unittest.py
index 588c9397f..b38ee1a26 100644
--- a/Tools/TestResultServer/generate_builders_json_unittest.py
+++ b/Tools/TestResultServer/generate_builders_json_unittest.py
@@ -54,35 +54,21 @@ class GenerateBuildersJsonTest(unittest.TestCase):
def dummy_fetch_json(url):
fetched_urls.append(url)
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders':
- return {'WebKit Win': None, 'WebKit Linux': None, 'WebKit Mac': None}
if url == 'http://build.webkit.org/json/builders':
- return {'Apple Mac SnowLeopard Tests': None, 'Chromium Mac Builder': None, 'GTK': None}
+ return {'Apple Mac SnowLeopard Tests': None, 'EFL Linux Builder': None, 'GTK Linux Tests': None}
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Linux':
- return {'cachedBuilds': [1, 2], 'currentBuilds': []}
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Win':
- return {'cachedBuilds': [1, 2], 'currentBuilds': []}
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Mac':
- return {'cachedBuilds': [1, 2], 'currentBuilds': []}
if url == 'http://build.webkit.org/json/builders/Apple%20Mac%20SnowLeopard%20Tests':
return {'cachedBuilds': [1, 2], 'currentBuilds': []}
- if url == 'http://build.webkit.org/json/builders/Chromium%20Mac%20Builder':
+ if url == 'http://build.webkit.org/json/builders/EFL%20Linux%20Builder':
return {'cachedBuilds': [1, 2, 3], 'currentBuilds': [3]}
- if url == 'http://build.webkit.org/json/builders/GTK':
+ if url == 'http://build.webkit.org/json/builders/GTK%20Linux%20Tests':
return {'cachedBuilds': [2], 'currentBuilds': []}
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Linux/builds/2':
- return {'steps': [{'name': 'webkit_tests'}, {'name': 'browser_tests'}, {'name': 'mini_installer_test'}, {'name': 'archive_test_results'}, {'name': 'compile'}]}
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Win/builds/2':
- return {'steps': [{'name': 'webkit_tests'}, {'name': 'mini_installer_test'}, {'name': 'archive_test_results'}, {'name': 'compile'}]}
- if url == 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Mac/builds/2':
- return {'steps': [{'name': 'browser_tests'}, {'name': 'mini_installer_test'}, {'name': 'archive_test_results'}, {'name': 'compile'}]}
if url == 'http://build.webkit.org/json/builders/Apple%20Mac%20SnowLeopard%20Tests/builds/2':
return {'steps': [{'name': 'layout-test'}, {'name': 'archive_test_results'}, {'name': 'compile'}]}
- if url == 'http://build.webkit.org/json/builders/Chromium%20Mac%20Builder/builds/2':
+ if url == 'http://build.webkit.org/json/builders/EFL%20Linux%20Builder/builds/2':
return {'steps': [{'name': 'compile'}]}
- if url == 'http://build.webkit.org/json/builders/GTK/builds/2':
+ if url == 'http://build.webkit.org/json/builders/GTK%20Linux%20Tests/builds/2':
return {'steps': [{'name': 'layout-test'}, {'name': 'archive_test_results'}, {'name': 'compile'}]}
logging.error('Cannot fetch fake url: %s' % url)
@@ -90,42 +76,30 @@ class GenerateBuildersJsonTest(unittest.TestCase):
generate_builders_json.fetch_json = dummy_fetch_json
masters = [
- {'name': 'ChromiumWebkit', 'url': 'http://build.chromium.org/p/chromium.webkit'},
{'name': 'webkit.org', 'url': 'http://build.webkit.org'},
]
generate_builders_json.insert_builder_and_test_data(masters)
expected_fetched_urls = [
- 'http://build.chromium.org/p/chromium.webkit/json/builders',
- 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Linux',
- 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Linux/builds/2',
- 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Mac',
- 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Mac/builds/2',
- 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Win',
- 'http://build.chromium.org/p/chromium.webkit/json/builders/WebKit%20Win/builds/2',
'http://build.webkit.org/json/builders',
'http://build.webkit.org/json/builders/Apple%20Mac%20SnowLeopard%20Tests',
'http://build.webkit.org/json/builders/Apple%20Mac%20SnowLeopard%20Tests/builds/2',
- 'http://build.webkit.org/json/builders/GTK',
- 'http://build.webkit.org/json/builders/GTK/builds/2',
- 'http://build.webkit.org/json/builders/Chromium%20Mac%20Builder',
- 'http://build.webkit.org/json/builders/Chromium%20Mac%20Builder/builds/2']
+ 'http://build.webkit.org/json/builders/GTK%20Linux%20Tests',
+ 'http://build.webkit.org/json/builders/GTK%20Linux%20Tests/builds/2',
+ 'http://build.webkit.org/json/builders/EFL%20Linux%20Builder',
+ 'http://build.webkit.org/json/builders/EFL%20Linux%20Builder/builds/2']
self.assertEqual(fetched_urls, expected_fetched_urls)
expected_masters = [
{
- 'url': 'http://build.chromium.org/p/chromium.webkit',
- 'tests': {
- 'browser_tests': {'builders': ['WebKit Linux', 'WebKit Mac']},
- 'mini_installer_test': {'builders': ['WebKit Linux', 'WebKit Mac', 'WebKit Win']},
- 'layout-tests': {'builders': ['WebKit Linux', 'WebKit Win']}},
- 'name': 'ChromiumWebkit'},
- {
'url': 'http://build.webkit.org',
'tests': {
- 'layout-tests': {'builders': ['Apple Mac SnowLeopard Tests', 'GTK']}},
- 'name': 'webkit.org'}]
+ 'layout-tests': {'builders': ['Apple Mac SnowLeopard Tests', 'GTK Linux Tests']},
+ },
+ 'name': 'webkit.org'
+ },
+ ]
self.assertEqual(masters, expected_masters)
finally:
diff --git a/Tools/TestResultServer/static-dashboards/aggregate_results.html b/Tools/TestResultServer/static-dashboards/aggregate_results.html
index fa033a54d..2790ddceb 100644
--- a/Tools/TestResultServer/static-dashboards/aggregate_results.html
+++ b/Tools/TestResultServer/static-dashboards/aggregate_results.html
@@ -52,248 +52,11 @@ img {
</style>
<script src="builders.js"></script>
<script src="loader.js"></script>
+<script src="string.js"></script>
+<script src="history.js"></script>
<script src="dashboard_base.js"></script>
-<script>
-// @fileoverview Creates a dashboard for tracking number of passes/failures per run.
-//
-// Currently, only webkit tests are supported, but adding other test types
-// should just require the following steps:
-// -generate results.json for these tests
-// -copy them to the appropriate location
-// -add the builder name to the list of builders in dashboard_base.js.
-
-//////////////////////////////////////////////////////////////////////////////
-// Methods and objects from dashboard_base.js to override.
-//////////////////////////////////////////////////////////////////////////////
-function generatePage()
-{
- var html = htmlForTestTypeSwitcher(true) + '<br>';
- for (var builder in g_builders)
- html += htmlForBuilder(builder);
- document.body.innerHTML = html;
-}
-
-function handleValidHashParameter(key, value)
-{
- switch(key) {
- case 'rawValues':
- g_currentState[key] = value == 'true';
- return true;
-
- default:
- return false;
- }
-}
-
-g_defaultDashboardSpecificStateValues = {
- rawValues: false
-};
-
-function htmlForBuilder(builder)
-{
- var results = g_resultsByBuilder[builder];
- // Some keys were added later than others, so they don't have as many
- // builds. Use the shortest.
- // FIXME: Once 500 runs have finished, we can get rid of passing this
- // around and just assume all keys have the same number of builders for a
- // given builder.
- var numColumns = results[ALL_FIXABLE_COUNT_KEY].length;
- var html = '<div class=container><h2>' + builder + '</h2>';
-
- if (g_currentState.rawValues)
- html += rawValuesHTML(results, numColumns);
- else {
- html += '<a href="timeline_explorer.html' + (location.hash ? location.hash + '&' : '#') + 'builder=' + builder + '">' +
- chartHTML(results, numColumns) + '</a>';
- }
-
- html += '</div>';
- return html;
-}
-
-function rawValuesHTML(results, numColumns)
-{
- var html = htmlForSummaryTable(results, numColumns) +
- htmlForTestType(results, FIXABLE_COUNTS_KEY, FIXABLE_DESCRIPTION, numColumns);
- if (isLayoutTestResults()) {
- html += htmlForTestType(results, DEFERRED_COUNTS_KEY, DEFERRED_DESCRIPTION, numColumns) +
- htmlForTestType(results, WONTFIX_COUNTS_KEY, WONTFIX_DESCRIPTION, numColumns);
- }
- return html;
-}
-
-function chartHTML(results, numColumns)
-{
- var shouldShowWebKitRevisions = isTipOfTreeWebKitBuilder();
- var revisionKey = shouldShowWebKitRevisions ? WEBKIT_REVISIONS_KEY : CHROME_REVISIONS_KEY;
- var startRevision = results[revisionKey][numColumns - 1];
- var endRevision = results[revisionKey][0];
- var revisionLabel = shouldShowWebKitRevisions ? "WebKit Revision" : "Chromium Revision";
-
- var fixable = results[FIXABLE_COUNT_KEY].slice(0, numColumns);
- var html = chart("Total failing", {"": fixable}, revisionLabel, startRevision, endRevision);
-
- var values = valuesPerExpectation(results[FIXABLE_COUNTS_KEY], numColumns);
- // Don't care about number of passes for the charts.
- delete(values['P']);
-
- return html + chart("Detailed breakdown", values, revisionLabel, startRevision, endRevision);
-}
-
-var LABEL_COLORS = ['FF0000', '00FF00', '0000FF', '000000', 'FF6EB4', 'FFA812', '9B30FF', '00FFCC'];
-
-// FIXME: Find a better way to exclude outliers. This is just so we exclude
-// runs where every test failed.
-var MAX_VALUE = 10000;
-
-function filteredValues(values, desiredNumberOfPoints)
-{
- // Filter out values to make the graph a bit more readable and to keep URLs
- // from exceeding the browsers max length restriction.
- var filterAmount = Math.floor(values.length / desiredNumberOfPoints);
- if (filterAmount < 1)
- return values;
-
- return values.filter(function(element, index, array) {
- // Include the most recent and oldest values and exclude outliers.
- return (index % filterAmount == 0 || index == array.length - 1) && (array[index] < MAX_VALUE && array[index] != 0);
- });
-}
-
-function chartUrl(title, values, revisionLabel, startRevision, endRevision, desiredNumberOfPoints) {
- var maxValue = 0;
- for (var expectation in values)
- maxValue = Math.max(maxValue, Math.max.apply(null, filteredValues(values[expectation], desiredNumberOfPoints)));
-
- var chartData = '';
- var labels = '';
- var numLabels = 0;
-
- var first = true;
- for (var expectation in values) {
- chartData += (first ? 'e:' : ',') + extendedEncode(filteredValues(values[expectation], desiredNumberOfPoints).reverse(), maxValue);
-
- if (expectation) {
- numLabels++;
- labels += (first ? '' : '|') + expectationsMap()[expectation];
- }
- first = false;
- }
-
- var url = "http://chart.apis.google.com/chart?cht=lc&chs=600x400&chd=" +
- chartData + "&chg=15,15,1,3&chxt=x,x,y&chxl=1:||" + revisionLabel +
- "|&chxr=0," + startRevision + "," + endRevision + "|2,0," + maxValue + "&chtt=" + title;
-
-
- if (labels)
- url += "&chdl=" + labels + "&chco=" + LABEL_COLORS.slice(0, numLabels).join(',');
- return url;
-}
-
-function chart(title, values, revisionLabel, startRevision, endRevision)
-{
- var desiredNumberOfPoints = 400;
- var url = chartUrl(title, values, revisionLabel, startRevision, endRevision, desiredNumberOfPoints);
-
- while (url.length >= 2048) {
- // Decrease the desired number of points gradually until we get a URL that
- // doesn't exceed chartserver's max URL length.
- desiredNumberOfPoints = 3 / 4 * desiredNumberOfPoints;
- url = chartUrl(title, values, revisionLabel, startRevision, endRevision, desiredNumberOfPoints);
- }
-
- return '<img src="' + url + '">';
-}
-
-function htmlForRevisionRows(results, numColumns)
-{
- return htmlForTableRow('WebKit Revision', results[WEBKIT_REVISIONS_KEY].slice(0, numColumns)) +
- htmlForTableRow('Chrome Revision', results[CHROME_REVISIONS_KEY].slice(0, numColumns));
-}
-
-function wrapHTMLInTable(description, html)
-{
- return '<h3>' + description + '</h3><table><tbody>' + html + '</tbody></table>';
-}
-
-function htmlForSummaryTable(results, numColumns)
-{
- var percent = [];
- var fixable = results[FIXABLE_COUNT_KEY].slice(0, numColumns);
- var allFixable = results[ALL_FIXABLE_COUNT_KEY].slice(0, numColumns);
- for (var i = 0; i < numColumns; i++) {
- var percentage = 100 * (allFixable[i] - fixable[i]) / allFixable[i];
- // Round to the nearest tenth of a percent.
- percent.push(Math.round(percentage * 10) / 10 + '%');
- }
- var html = htmlForRevisionRows(results, numColumns) +
- htmlForTableRow('Percent passed', percent) +
- htmlForTableRow('Failures (deduped)', fixable) +
- htmlForTableRow('Fixable Tests', allFixable);
- return wrapHTMLInTable('Summary', html);
-}
-
-function valuesPerExpectation(counts, numColumns)
-{
- var values = {};
- for (var i = 0; i < numColumns; i++) {
- for (var expectation in expectationsMap()) {
- if (expectation in counts[i]) {
- var count = counts[i][expectation];
- if (!values[expectation])
- values[expectation] = [];
- values[expectation].push(count);
- }
- }
- }
- return values;
-}
-
-function htmlForTestType(results, key, description, numColumns)
-{
- var counts = results[key];
- var html = htmlForRevisionRows(results, numColumns);
- var values = valuesPerExpectation(counts, numColumns);
- for (var expectation in values)
- html += htmlForTableRow(expectationsMap()[expectation], values[expectation]);
- return wrapHTMLInTable(description, html);
-}
-
-function htmlForTableRow(columnName, values)
-{
- return '<tr><td>' + columnName + '</td><td>' + values.join('</td><td>') + '</td></tr>';
-}
-
-// Taken from http://code.google.com/apis/chart/docs/data_formats.html.
-function extendedEncode(arrVals, maxVal)
-{
- var map = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.';
- var mapLength = map.length;
- var mapLengthSquared = mapLength * mapLength;
-
- var chartData = '';
-
- for (var i = 0, len = arrVals.length; i < len; i++) {
- // In case the array vals were translated to strings.
- var numericVal = new Number(arrVals[i]);
- // Scale the value to maxVal.
- var scaledVal = Math.floor(mapLengthSquared * numericVal / maxVal);
-
- if(scaledVal > mapLengthSquared - 1)
- chartData += "..";
- else if (scaledVal < 0)
- chartData += '__';
- else {
- // Calculate first and second digits and add them to the output.
- var quotient = Math.floor(scaledVal / mapLength);
- var remainder = scaledVal - mapLength * quotient;
- chartData += map.charAt(quotient) + map.charAt(remainder);
- }
- }
-
- return chartData;
-}
-</script>
+<script src="ui.js"></script>
+<script src="aggregate_results.js"></script>
</head>
<body></body>
</html>
diff --git a/Tools/TestResultServer/static-dashboards/aggregate_results.js b/Tools/TestResultServer/static-dashboards/aggregate_results.js
new file mode 100644
index 000000000..0bec99ae2
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/aggregate_results.js
@@ -0,0 +1,273 @@
+// Copyright (C) 2013 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.
+//
+// @fileoverview Creates a dashboard for tracking number of passes/failures per run.
+//
+// Currently, only webkit tests are supported, but adding other test types
+// should just require the following steps:
+// -generate results.json for these tests
+// -copy them to the appropriate location
+// -add the builder name to the list of builders in dashboard_base.js.
+
+function generatePage(historyInstance)
+{
+ var html = ui.html.testTypeSwitcher(true) + '<br>';
+ for (var builder in currentBuilders())
+ html += htmlForBuilder(builder);
+ document.body.innerHTML = html;
+}
+
+function handleValidHashParameter(historyInstance, key, value)
+{
+ switch(key) {
+ case 'rawValues':
+ historyInstance.dashboardSpecificState[key] = value == 'true';
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+var defaultDashboardSpecificStateValues = {
+ rawValues: false
+};
+
+
+var aggregateResultsConfig = {
+ defaultStateValues: defaultDashboardSpecificStateValues,
+ generatePage: generatePage,
+ handleValidHashParameter: handleValidHashParameter,
+};
+
+// FIXME(jparent): Eventually remove all usage of global history object.
+var g_history = new history.History(aggregateResultsConfig);
+g_history.parseCrossDashboardParameters();
+
+function htmlForBuilder(builder)
+{
+ var results = g_resultsByBuilder[builder];
+ // Some keys were added later than others, so they don't have as many
+ // builds. Use the shortest.
+ // FIXME: Once 500 runs have finished, we can get rid of passing this
+ // around and just assume all keys have the same number of builders for a
+ // given builder.
+ var numColumns = results[ALL_FIXABLE_COUNT_KEY].length;
+ var html = '<div class=container><h2>' + builder + '</h2>';
+
+ if (g_history.dashboardSpecificState.rawValues)
+ html += rawValuesHTML(results, numColumns);
+ else {
+ html += '<a href="timeline_explorer.html' + (location.hash ? location.hash + '&' : '#') + 'builder=' + builder + '">' +
+ chartHTML(results, numColumns) + '</a>';
+ }
+
+ html += '</div>';
+ return html;
+}
+
+function rawValuesHTML(results, numColumns)
+{
+ var html = htmlForSummaryTable(results, numColumns) +
+ htmlForTestType(results, FIXABLE_COUNTS_KEY, FIXABLE_DESCRIPTION, numColumns);
+ if (g_history.isLayoutTestResults()) {
+ html += htmlForTestType(results, DEFERRED_COUNTS_KEY, DEFERRED_DESCRIPTION, numColumns) +
+ htmlForTestType(results, WONTFIX_COUNTS_KEY, WONTFIX_DESCRIPTION, numColumns);
+ }
+ return html;
+}
+
+function chartHTML(results, numColumns)
+{
+ var revisionKey = WEBKIT_REVISIONS_KEY;
+ var revisionLabel = "WebKit Revision";
+ var startRevision = results[revisionKey][numColumns - 1];
+ var endRevision = results[revisionKey][0];
+
+ var fixable = results[FIXABLE_COUNT_KEY].slice(0, numColumns);
+ var html = chart("Total failing", {"": fixable}, revisionLabel, startRevision, endRevision);
+
+ var values = valuesPerExpectation(results[FIXABLE_COUNTS_KEY], numColumns);
+ // Don't care about number of passes for the charts.
+ delete(values['P']);
+
+ return html + chart("Detailed breakdown", values, revisionLabel, startRevision, endRevision);
+}
+
+var LABEL_COLORS = ['FF0000', '00FF00', '0000FF', '000000', 'FF6EB4', 'FFA812', '9B30FF', '00FFCC'];
+
+// FIXME: Find a better way to exclude outliers. This is just so we exclude
+// runs where every test failed.
+var MAX_VALUE = 10000;
+
+function filteredValues(values, desiredNumberOfPoints)
+{
+ // Filter out values to make the graph a bit more readable and to keep URLs
+ // from exceeding the browsers max length restriction.
+ var filterAmount = Math.floor(values.length / desiredNumberOfPoints);
+ if (filterAmount < 1)
+ return values;
+
+ return values.filter(function(element, index, array) {
+ // Include the most recent and oldest values and exclude outliers.
+ return (index % filterAmount == 0 || index == array.length - 1) && (array[index] < MAX_VALUE && array[index] != 0);
+ });
+}
+
+function chartUrl(title, values, revisionLabel, startRevision, endRevision, desiredNumberOfPoints) {
+ var maxValue = 0;
+ for (var expectation in values)
+ maxValue = Math.max(maxValue, Math.max.apply(null, filteredValues(values[expectation], desiredNumberOfPoints)));
+
+ var chartData = '';
+ var labels = '';
+ var numLabels = 0;
+
+ var first = true;
+ for (var expectation in values) {
+ chartData += (first ? 'e:' : ',') + extendedEncode(filteredValues(values[expectation], desiredNumberOfPoints).reverse(), maxValue);
+
+ if (expectation) {
+ numLabels++;
+ labels += (first ? '' : '|') + expectationsMap()[expectation];
+ }
+ first = false;
+ }
+
+ var url = "http://chart.apis.google.com/chart?cht=lc&chs=600x400&chd=" +
+ chartData + "&chg=15,15,1,3&chxt=x,x,y&chxl=1:||" + revisionLabel +
+ "|&chxr=0," + startRevision + "," + endRevision + "|2,0," + maxValue + "&chtt=" + title;
+
+
+ if (labels)
+ url += "&chdl=" + labels + "&chco=" + LABEL_COLORS.slice(0, numLabels).join(',');
+ return url;
+}
+
+function chart(title, values, revisionLabel, startRevision, endRevision)
+{
+ var desiredNumberOfPoints = 400;
+ var url = chartUrl(title, values, revisionLabel, startRevision, endRevision, desiredNumberOfPoints);
+
+ while (url.length >= 2048) {
+ // Decrease the desired number of points gradually until we get a URL that
+ // doesn't exceed chartserver's max URL length.
+ desiredNumberOfPoints = 3 / 4 * desiredNumberOfPoints;
+ url = chartUrl(title, values, revisionLabel, startRevision, endRevision, desiredNumberOfPoints);
+ }
+
+ return '<img src="' + url + '">';
+}
+
+function wrapHTMLInTable(description, html)
+{
+ return '<h3>' + description + '</h3><table><tbody>' + html + '</tbody></table>';
+}
+
+function htmlForSummaryTable(results, numColumns)
+{
+ var percent = [];
+ var fixable = results[FIXABLE_COUNT_KEY].slice(0, numColumns);
+ var allFixable = results[ALL_FIXABLE_COUNT_KEY].slice(0, numColumns);
+ for (var i = 0; i < numColumns; i++) {
+ var percentage = 100 * (allFixable[i] - fixable[i]) / allFixable[i];
+ // Round to the nearest tenth of a percent.
+ percent.push(Math.round(percentage * 10) / 10 + '%');
+ }
+ var html = htmlForTableRow('WebKit Revision', results[WEBKIT_REVISIONS_KEY].slice(0, numColumns)) +
+ htmlForTableRow('Percent passed', percent) +
+ htmlForTableRow('Failures (deduped)', fixable) +
+ htmlForTableRow('Fixable Tests', allFixable);
+ return wrapHTMLInTable('Summary', html);
+}
+
+function valuesPerExpectation(counts, numColumns)
+{
+ var values = {};
+ for (var i = 0; i < numColumns; i++) {
+ for (var expectation in expectationsMap()) {
+ if (expectation in counts[i]) {
+ var count = counts[i][expectation];
+ if (!values[expectation])
+ values[expectation] = [];
+ values[expectation].push(count);
+ }
+ }
+ }
+ return values;
+}
+
+function htmlForTestType(results, key, description, numColumns)
+{
+ var counts = results[key];
+ var html = htmlForTableRow('WebKit Revision', results[WEBKIT_REVISIONS_KEY].slice(0, numColumns));
+ var values = valuesPerExpectation(counts, numColumns);
+ for (var expectation in values)
+ html += htmlForTableRow(expectationsMap()[expectation], values[expectation]);
+ return wrapHTMLInTable(description, html);
+}
+
+function htmlForTableRow(columnName, values)
+{
+ return '<tr><td>' + columnName + '</td><td>' + values.join('</td><td>') + '</td></tr>';
+}
+
+// Taken from http://code.google.com/apis/chart/docs/data_formats.html.
+function extendedEncode(arrVals, maxVal)
+{
+ var map = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-.';
+ var mapLength = map.length;
+ var mapLengthSquared = mapLength * mapLength;
+
+ var chartData = '';
+
+ for (var i = 0, len = arrVals.length; i < len; i++) {
+ // In case the array vals were translated to strings.
+ var numericVal = new Number(arrVals[i]);
+ // Scale the value to maxVal.
+ var scaledVal = Math.floor(mapLengthSquared * numericVal / maxVal);
+
+ if(scaledVal > mapLengthSquared - 1)
+ chartData += "..";
+ else if (scaledVal < 0)
+ chartData += '__';
+ else {
+ // Calculate first and second digits and add them to the output.
+ var quotient = Math.floor(scaledVal / mapLength);
+ var remainder = scaledVal - mapLength * quotient;
+ chartData += map.charAt(quotient) + map.charAt(remainder);
+ }
+ }
+
+ return chartData;
+}
+
+window.addEventListener('load', function() {
+ var resourceLoader = new loader.Loader();
+ resourceLoader.load();
+}, false);
diff --git a/Tools/TestResultServer/static-dashboards/builders.js b/Tools/TestResultServer/static-dashboards/builders.js
index 97dfe2729..b18002bb1 100644
--- a/Tools/TestResultServer/static-dashboards/builders.js
+++ b/Tools/TestResultServer/static-dashboards/builders.js
@@ -85,32 +85,13 @@ builders._requestBuilders();
// FIXME: Move everything below into the anonymous namespace above.
-CHROMIUM_WIN_BUILDER_MASTER = 'ChromiumWin';
-CHROMIUM_MAC_BUILDER_MASTER = 'ChromiumMac';
-CHROMIUM_LINUX_BUILDER_MASTER = 'ChromiumLinux';
-CHROMIUMOS_BUILDER_MASTER = 'ChromiumChromiumOS';
-CHROMIUM_GPU_BUILDER_MASTER = 'ChromiumGPU';
-CHROMIUM_GPU_FYI_BUILDER_MASTER = 'ChromiumGPUFYI';
-CHROMIUM_PERF_AV_BUILDER_MASTER = 'ChromiumPerfAv';
-CHROMIUM_WEBKIT_BUILDER_MASTER = 'ChromiumWebkit';
WEBKIT_BUILDER_MASTER = 'webkit.org';
-
var LEGACY_BUILDER_MASTERS_TO_GROUPS = {
- 'Chromium': '@DEPS - chromium.org',
- 'ChromiumWin': '@DEPS - chromium.org',
- 'ChromiumMac': '@DEPS - chromium.org',
- 'ChromiumLinux': '@DEPS - chromium.org',
- 'ChromiumChromiumOS': '@DEPS CrOS - chromium.org',
- 'ChromiumGPU': '@DEPS - chromium.org',
- 'ChromiumGPUFYI': '@DEPS FYI - chromium.org',
- 'ChromiumPerfAv': '@DEPS - chromium.org',
- 'ChromiumWebkit': '@ToT - chromium.org',
'webkit.org': '@ToT - webkit.org'
};
-function BuilderGroup(isToTWebKit)
+function BuilderGroup()
{
- this.isToTWebKit = isToTWebKit;
// Map of builderName (the name shown in the waterfall) to builderPath (the
// path used in the builder's URL)
this.builders = {};
@@ -122,15 +103,7 @@ BuilderGroup.prototype.append = function(builders) {
}, this);
};
-BuilderGroup.prototype.setup = function()
-{
- // FIXME: instead of copying these to globals, it would be better if
- // the rest of the code read things from the BuilderGroup instance directly
- g_defaultBuilderName = this._defaultBuilder();
- g_builders = this.builders;
-};
-
-BuilderGroup.prototype._defaultBuilder = function()
+BuilderGroup.prototype.defaultBuilder = function()
{
for (var builder in this.builders)
return builder;
@@ -139,12 +112,9 @@ BuilderGroup.prototype._defaultBuilder = function()
BuilderGroup.prototype.master = function()
{
- return builderMaster(this._defaultBuilder());
+ return builderMaster(this.defaultBuilder());
}
-BuilderGroup.TOT_WEBKIT = true;
-BuilderGroup.DEPS_WEBKIT = false;
-
var BUILDER_TO_MASTER = {};
function builderMaster(builderName)
@@ -166,128 +136,25 @@ function requestBuilderList(builderGroups, masterName, groupName, builderGroup,
builderGroups[groupName].append(builderList);
}
-function isChromiumContentShellTestRunner(builder)
-{
- return builder.indexOf('(Content Shell)') != -1;
-}
-
-function isChromiumWebkitTipOfTreeTestRunner(builder)
-{
- // FIXME: Remove the Android check once the android tests bot is actually uploading results.
- return builder.indexOf('ASAN') == -1 && !isChromiumContentShellTestRunner(builder) && builder.indexOf('Android') == -1 && !isChromiumWebkitDepsTestRunner(builder);
-}
-
-function isChromiumWebkitDepsTestRunner(builder)
-{
- return builder.indexOf('(deps)') != -1;
-}
-
// FIXME: Look into whether we can move the grouping logic into builders.jsonp and get rid of this code.
function loadBuildersList(groupName, testType) {
switch (testType) {
- case 'gl_tests':
- case 'gpu_tests':
- switch(groupName) {
- case '@DEPS - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.DEPS_WEBKIT);
- requestBuilderList(CHROMIUM_GPU_TESTS_BUILDER_GROUPS, CHROMIUM_GPU_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
-
- case '@DEPS FYI - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.DEPS_WEBKIT);
- requestBuilderList(CHROMIUM_GPU_TESTS_BUILDER_GROUPS, CHROMIUM_GPU_FYI_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
-
- case '@ToT - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
- requestBuilderList(CHROMIUM_GPU_TESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
- }
- break;
-
case 'layout-tests':
switch(groupName) {
- case 'Content Shell @ToT - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
- requestBuilderList(LAYOUT_TESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType, isChromiumContentShellTestRunner);
- break;
-
- case '@ToT - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
- requestBuilderList(LAYOUT_TESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType, isChromiumWebkitTipOfTreeTestRunner);
- break;
-
case '@ToT - webkit.org':
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
+ var builderGroup = new BuilderGroup();
requestBuilderList(LAYOUT_TESTS_BUILDER_GROUPS, WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType);
break;
-
- case '@DEPS - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.DEPS_WEBKIT);
- requestBuilderList(LAYOUT_TESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType, isChromiumWebkitDepsTestRunner);
- requestBuilderList(LAYOUT_TESTS_BUILDER_GROUPS, CHROMIUM_PERF_AV_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
+ default:
+ console.error('Tried to load builders for an unsupported group "' + groupName + '"');
}
break;
- case 'test_shell_tests':
- case 'webkit_unit_tests':
- switch(groupName) {
- case '@ToT - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
- requestBuilderList(TEST_SHELL_TESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType, isChromiumWebkitTipOfTreeTestRunner);
- break;
-
- case '@DEPS - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.DEPS_WEBKIT);
- requestBuilderList(TEST_SHELL_TESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType, isChromiumWebkitDepsTestRunner);
- break;
- }
- break;
-
default:
- switch(groupName) {
- case '@DEPS - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.DEPS_WEBKIT);
- requestBuilderList(CHROMIUM_GTESTS_BUILDER_GROUPS, CHROMIUM_WIN_BUILDER_MASTER, groupName, builderGroup, testType);
- requestBuilderList(CHROMIUM_GTESTS_BUILDER_GROUPS, CHROMIUM_MAC_BUILDER_MASTER, groupName, builderGroup, testType);
- requestBuilderList(CHROMIUM_GTESTS_BUILDER_GROUPS, CHROMIUM_LINUX_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
-
- case '@DEPS CrOS - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.DEPS_WEBKIT);
- requestBuilderList(CHROMIUM_GTESTS_BUILDER_GROUPS, CHROMIUMOS_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
-
- case '@ToT - chromium.org':
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
- requestBuilderList(CHROMIUM_GTESTS_BUILDER_GROUPS, CHROMIUM_WEBKIT_BUILDER_MASTER, groupName, builderGroup, testType);
- break;
- }
- break;
+ console.error('Tried to load builders for an unsupported test type "' + testType + '"');
}
}
-var TEST_SHELL_TESTS_BUILDER_GROUPS = {
- '@ToT - chromium.org': null,
- '@DEPS - chromium.org': null,
-};
-
var LAYOUT_TESTS_BUILDER_GROUPS = {
- '@ToT - chromium.org': null,
'@ToT - webkit.org': null,
- '@DEPS - chromium.org': null,
- 'Content Shell @ToT - chromium.org': null,
-};
-
-var CHROMIUM_GPU_TESTS_BUILDER_GROUPS = {
- '@DEPS - chromium.org': null,
- '@DEPS FYI - chromium.org': null,
- '@ToT - chromium.org': null,
-};
-
-var CHROMIUM_GTESTS_BUILDER_GROUPS = {
- '@DEPS - chromium.org': null,
- '@DEPS CrOS - chromium.org': null,
- '@ToT - chromium.org': null,
};
diff --git a/Tools/TestResultServer/static-dashboards/builders.jsonp b/Tools/TestResultServer/static-dashboards/builders.jsonp
index a813db093..205edc01d 100644
--- a/Tools/TestResultServer/static-dashboards/builders.jsonp
+++ b/Tools/TestResultServer/static-dashboards/builders.jsonp
@@ -1,1489 +1,11 @@
// This file is auto-generated by Tools/TestResultServer/generate_builders_json.py. It should not be manually modified.
-// It uses jsonp instead of proper json because we want to be able to load it from a file URL in Chrome for local testing.
+// It uses jsonp instead of proper json because we want to be able to load it from a file URL for local testing.
LOAD_BUILDBOT_DATA([
{
- "name": "ChromiumWin",
- "tests": {
- "ash_unittests": {
- "builders": [
- "Win Aura"
- ]
- },
- "aura_unittests": {
- "builders": [
- "Win Aura"
- ]
- },
- "base_unittests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "Win7 Tests (2)",
- "XP Tests (2)",
- "Vista Tests (2)",
- "XP Tests (dbg)(1)"
- ]
- },
- "browser_tests": {
- "builders": [
- "XP Tests (dbg)(5)",
- "XP Tests (1)",
- "Win7 Tests (dbg)(3)",
- "Win7 Tests (dbg)(5)",
- "Win7 Tests (2)",
- "XP Tests (3)",
- "Vista Tests (1)",
- "Vista Tests (3)",
- "XP Tests (2)",
- "XP Tests (dbg)(2)",
- "Win7 Tests (dbg)(6)",
- "XP Tests (dbg)(6)",
- "XP Tests (dbg)(4)",
- "Win7 Tests (dbg)(4)",
- "Win7 Tests (3)",
- "Win7 Tests (dbg)(2)",
- "Vista Tests (2)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(3)",
- "Win Aura"
- ]
- },
- "cacheinvalidation_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "cc_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "chrome_frame_net_tests": {
- "builders": [
- "Chrome Frame Tests (ie8)",
- "Chrome Frame Tests (ie6)",
- "Chrome Frame Tests (ie7)",
- "Chrome Frame Tests (ie9)"
- ]
- },
- "chrome_frame_tests": {
- "builders": [
- "Chrome Frame Tests (ie8)",
- "Chrome Frame Tests (ie6)",
- "Chrome Frame Tests (ie7)",
- "Chrome Frame Tests (ie9)"
- ]
- },
- "chrome_frame_unittests": {
- "builders": [
- "Chrome Frame Tests (ie8)",
- "Chrome Frame Tests (ie6)",
- "Chrome Frame Tests (ie7)",
- "Chrome Frame Tests (ie9)"
- ]
- },
- "compositor_unittests": {
- "builders": [
- "Win Aura"
- ]
- },
- "content_browsertests": {
- "builders": [
- "XP Tests (1)",
- "Vista Tests (1)",
- "XP Tests (dbg)(2)",
- "Win7 Tests (dbg)(2)",
- "Win7 Tests (1)",
- "Win Aura"
- ]
- },
- "content_unittests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "Win Aura",
- "XP Tests (dbg)(1)"
- ]
- },
- "courgette_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "crypto_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "googleurl_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "gpu_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "installer_util_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "interactive_ui_tests": {
- "builders": [
- "XP Tests (1)",
- "Interactive Tests (dbg)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "Win Aura"
- ]
- },
- "ipc_tests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "XP Tests (dbg)(1)"
- ]
- },
- "jingle_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "media_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "mini_installer_test": {
- "builders": [
- "XP Tests (1)",
- "Vista Tests (1)",
- "Win7 Tests (1)"
- ]
- },
- "net_unittests": {
- "builders": [
- "Win7 Tests (2)",
- "XP Tests (2)",
- "XP Tests (dbg)(2)",
- "Win7 Tests (dbg)(2)",
- "Vista Tests (2)"
- ]
- },
- "ppapi_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "printing_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "remoting_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- },
- "sbox_integration_tests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(3)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(3)"
- ]
- },
- "sbox_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(3)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(3)"
- ]
- },
- "sbox_validation_tests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(3)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(3)"
- ]
- },
- "sql_unittests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "XP Tests (dbg)(1)"
- ]
- },
- "sync_integration_tests": {
- "builders": [
- "Win7 Sync"
- ]
- },
- "sync_unit_tests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "XP Tests (dbg)(1)"
- ]
- },
- "ui_unittests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "XP Tests (dbg)(1)"
- ]
- },
- "unit_tests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "Win Aura",
- "XP Tests (dbg)(1)"
- ]
- },
- "views_unittests": {
- "builders": [
- "Win7 Tests (dbg)(1)",
- "XP Tests (3)",
- "Vista Tests (3)",
- "Win7 Tests (3)",
- "Win Aura",
- "XP Tests (dbg)(1)"
- ]
- },
- "webkit_compositor_bindings_unittests": {
- "builders": [
- "XP Tests (1)",
- "Win7 Tests (dbg)(1)",
- "Vista Tests (1)",
- "Win7 Tests (1)",
- "XP Tests (dbg)(1)"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.win"
- },
- {
- "name": "ChromiumMac",
- "tests": {
- "base_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "iOS Simulator (dbg)",
- "Mac 10.7 Tests (dbg)(3)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(3)"
- ]
- },
- "browser_tests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (3)",
- "Mac 10.7 Tests (dbg)(3)",
- "Mac 10.7 Tests (dbg)(2)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)",
- "Mac 10.6 Tests (dbg)(2)",
- "Mac 10.6 Tests (dbg)(3)",
- "Mac10.7 Tests (3)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "cacheinvalidation_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "cc_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "content_browsertests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "content_unittests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)"
- ]
- },
- "crypto_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "iOS Simulator (dbg)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "googleurl_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "iOS Simulator (dbg)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "gpu_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "interactive_ui_tests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(3)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(3)"
- ]
- },
- "ipc_tests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)"
- ]
- },
- "jingle_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "media_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(2)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(2)"
- ]
- },
- "net_unittests": {
- "builders": [
- "Mac10.6 Tests (3)",
- "Mac 10.7 Tests (dbg)(2)",
- "Mac 10.6 Tests (dbg)(2)",
- "Mac10.7 Tests (3)"
- ]
- },
- "ppapi_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "printing_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "remoting_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- },
- "sql_unittests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "iOS Simulator (dbg)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)"
- ]
- },
- "sync_integration_tests": {
- "builders": [
- "Mac10.6 Sync"
- ]
- },
- "sync_unit_tests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)"
- ]
- },
- "ui_unittests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)"
- ]
- },
- "unit_tests": {
- "builders": [
- "Mac10.6 Tests (2)",
- "Mac 10.6 Tests (dbg)(4)",
- "Mac10.7 Tests (2)",
- "Mac 10.7 Tests (dbg)(4)"
- ]
- },
- "webkit_compositor_bindings_unittests": {
- "builders": [
- "Mac10.7 Tests (1)",
- "Mac 10.7 Tests (dbg)(1)",
- "Mac10.6 Tests (1)",
- "Mac 10.6 Tests (dbg)(1)"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.mac"
- },
- {
- "name": "ChromiumLinux",
- "tests": {
- "Instrumentation tests: Smoke, SmallTest, MediumTest, LargeTest - ChromiumTestShellTest": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "Instrumentation tests: Smoke, SmallTest, MediumTest, LargeTest - ContentShellTest": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "aura_unittests": {
- "builders": [
- "Linux (aura)"
- ]
- },
- "base_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (Precise)",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "browser_tests": {
- "builders": [
- "Linux Tests (dbg)(1)",
- "Linux Tests x64",
- "Linux (Precise)"
- ]
- },
- "cacheinvalidation_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (aura)"
- ]
- },
- "cc_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Android Tests (dbg)"
- ]
- },
- "compositor_unittests": {
- "builders": [
- "Linux (aura)"
- ]
- },
- "content_browsertests": {
- "builders": [
- "Linux Tests (dbg)(1)",
- "Linux Tests x64",
- "Linux (Precise)",
- "Linux (aura)"
- ]
- },
- "content_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "crypto_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Linux (aura)"
- ]
- },
- "dbus_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64"
- ]
- },
- "device_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Linux (aura)"
- ]
- },
- "googleurl_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (aura)"
- ]
- },
- "gpu_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "interactive_ui_tests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64"
- ]
- },
- "ipc_tests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "jingle_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (aura)"
- ]
- },
- "media_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "net_unittests": {
- "builders": [
- "Linux Tests (dbg)(1)",
- "Linux Tests x64",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "ppapi_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (aura)"
- ]
- },
- "printing_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (aura)"
- ]
- },
- "remoting_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux (aura)"
- ]
- },
- "sandbox_linux_unittests": {
- "builders": [
- "Linux Tests x64",
- "Linux (Precise)"
- ]
- },
- "sql_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "sync_integration_tests": {
- "builders": [
- "Linux Sync"
- ]
- },
- "sync_unit_tests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "ui_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "unit_tests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Linux Clang (dbg)",
- "Android Tests (dbg)",
- "Linux (aura)"
- ]
- },
- "views_unittests": {
- "builders": [
- "Linux (aura)"
- ]
- },
- "webkit_compositor_bindings_unittests": {
- "builders": [
- "Linux Tests (dbg)(2)",
- "Linux Tests x64",
- "Android Tests (dbg)"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.linux"
- },
- {
- "name": "ChromiumChromiumOS",
- "tests": {
- "ash_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "aura_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "base_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "browser_tests": {
- "builders": [
- "Linux ChromiumOS Tests (2)",
- "Linux ChromiumOS Tests (dbg)(2)"
- ]
- },
- "cacheinvalidation_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "compositor_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "content_browsertests": {
- "builders": [
- "Linux ChromiumOS Tests (2)",
- "Linux ChromiumOS Tests (dbg)(2)"
- ]
- },
- "content_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "crypto_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "dbus_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "googleurl_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "gpu_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "interactive_ui_tests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(3)",
- "Linux ChromiumOS Tests (2)"
- ]
- },
- "ipc_tests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "jingle_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "media_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "net_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "ppapi_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "printing_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "remoting_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "sql_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "sync_unit_tests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "ui_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "unit_tests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- },
- "views_unittests": {
- "builders": [
- "Linux ChromiumOS Tests (dbg)(1)",
- "Linux ChromiumOS Tests (1)"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.chromiumos"
- },
- {
- "name": "ChromiumGPU",
- "tests": {
- "gl_tests": {
- "builders": [
- "Win7 Debug (NVIDIA)",
- "Mac Release (Intel)",
- "Mac Debug (Intel)",
- "Win7 Release (NVIDIA)",
- "Linux Debug (NVIDIA)",
- "Linux Release (NVIDIA)"
- ]
- },
- "gles2_conform_test": {
- "builders": [
- "Win7 Debug (NVIDIA)",
- "Mac Release (Intel)",
- "Mac Debug (Intel)",
- "Win7 Release (NVIDIA)",
- "Linux Debug (NVIDIA)",
- "Linux Release (NVIDIA)"
- ]
- },
- "gpu_frame_rate_test": {
- "builders": [
- "Mac Release (Intel)",
- "Win7 Release (NVIDIA)",
- "Linux Release (NVIDIA)"
- ]
- },
- "gpu_latency_tests": {
- "builders": [
- "Mac Release (Intel)",
- "Win7 Release (NVIDIA)",
- "Linux Release (NVIDIA)"
- ]
- },
- "gpu_tests": {
- "builders": [
- "Win7 Debug (NVIDIA)",
- "Mac Release (Intel)",
- "Mac Debug (Intel)",
- "Win7 Release (NVIDIA)",
- "Linux Debug (NVIDIA)",
- "Linux Release (NVIDIA)"
- ]
- },
- "gpu_throughput_tests": {
- "builders": [
- "Mac Release (Intel)",
- "Win7 Release (NVIDIA)",
- "Linux Release (NVIDIA)"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.gpu"
- },
- {
- "name": "ChromiumGPUFYI",
- "tests": {
- "content_unittests": {
- "builders": [
- "Linux Audio",
- "Win7 Audio"
- ]
- },
- "gl_tests": {
- "builders": [
- "Mac Release (ATI)",
- "WinXP Debug (NVIDIA)",
- "Linux Release (ATI)",
- "Mac Retina Release",
- "Win7 Release (Intel)",
- "Win7 Release (ATI)",
- "Linux Release (Intel)",
- "Mac Retina Debug",
- "WinXP Release (NVIDIA)"
- ]
- },
- "gles2_conform_test": {
- "builders": [
- "Mac Release (ATI)",
- "WinXP Debug (NVIDIA)",
- "Linux Release (ATI)",
- "Mac Retina Release",
- "Win7 Release (Intel)",
- "Win7 Release (ATI)",
- "Linux Release (Intel)",
- "Mac Retina Debug",
- "WinXP Release (NVIDIA)"
- ]
- },
- "gpu_frame_rate_test": {
- "builders": [
- "Mac Release (ATI)",
- "Linux Release (ATI)",
- "Mac Retina Release",
- "Win7 Release (Intel)",
- "Win7 Release (ATI)",
- "Linux Release (Intel)",
- "WinXP Release (NVIDIA)"
- ]
- },
- "gpu_latency_tests": {
- "builders": [
- "Mac Release (ATI)",
- "Linux Release (ATI)",
- "Mac Retina Release",
- "Win7 Release (Intel)",
- "Win7 Release (ATI)",
- "Linux Release (Intel)",
- "WinXP Release (NVIDIA)"
- ]
- },
- "gpu_tests": {
- "builders": [
- "Mac Release (ATI)",
- "WinXP Debug (NVIDIA)",
- "Linux Release (ATI)",
- "Mac Retina Release",
- "Win7 Release (Intel)",
- "Win7 Release (ATI)",
- "Linux Release (Intel)",
- "Mac Retina Debug",
- "WinXP Release (NVIDIA)"
- ]
- },
- "gpu_throughput_tests": {
- "builders": [
- "Mac Release (ATI)",
- "Linux Release (ATI)",
- "Mac Retina Release",
- "Win7 Release (Intel)",
- "Win7 Release (ATI)",
- "Linux Release (Intel)",
- "WinXP Release (NVIDIA)"
- ]
- },
- "media_unittests": {
- "builders": [
- "Linux Audio",
- "Win7 Audio"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.gpu.fyi"
- },
- {
- "name": "ChromiumPerfAv",
- "tests": {
- "layout-tests": {
- "builders": [
- "AV Win7",
- "AV Linux"
- ]
- },
- "media_tests_av_perf": {
- "builders": [
- "AV Win7",
- "AV Linux"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.perf_av"
- },
- {
- "name": "ChromiumWebkit",
- "tests": {
- "base_unittests": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "browser_tests": {
- "builders": [
- "Win7 (dbg)",
- "Linux Tests",
- "Mac10.6 Tests",
- "Mac10.8 Tests"
- ]
- },
- "cc_unittests": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "chrome_frame_net_tests": {
- "builders": [
- "Chrome Frame Tests"
- ]
- },
- "chrome_frame_tests": {
- "builders": [
- "Chrome Frame Tests"
- ]
- },
- "chrome_frame_unittests": {
- "builders": [
- "Chrome Frame Tests"
- ]
- },
- "content_browsertests": {
- "builders": [
- "Win7 (dbg)",
- "Linux Tests",
- "Mac10.6 Tests",
- "Mac10.8 Tests"
- ]
- },
- "content_unittests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests",
- "Linux Tests",
- "Mac10.6 Tests",
- "Android Tests (dbg)",
- "Mac10.8 Tests"
- ]
- },
- "dromaeo_domcoreattr_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_domcoremodify_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_domcorequery_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_domcoretraverse_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibattrjquery_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibattrprototype_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibeventjquery_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibeventprototype_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibmodifyjquery_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibmodifyprototype_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibstylejquery_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibstyleprototype_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibtraversejquery_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "dromaeo_jslibtraverseprototype_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "gl_tests": {
- "builders": [
- "GPU Win7 (NVIDIA)",
- "GPU Linux (NVIDIA)",
- "GPU Mac10.7",
- "GPU Win7 (dbg) (NVIDIA)",
- "GPU Mac10.7 (dbg)",
- "GPU Linux (dbg) (NVIDIA)"
- ]
- },
- "gpu_frame_rate_test": {
- "builders": [
- "GPU Win7 (NVIDIA)",
- "GPU Linux (NVIDIA)",
- "GPU Mac10.7"
- ]
- },
- "gpu_latency_tests": {
- "builders": [
- "GPU Win7 (NVIDIA)",
- "GPU Linux (NVIDIA)",
- "GPU Mac10.7"
- ]
- },
- "gpu_tests": {
- "builders": [
- "GPU Win7 (NVIDIA)",
- "GPU Linux (NVIDIA)",
- "GPU Mac10.7",
- "GPU Win7 (dbg) (NVIDIA)",
- "GPU Mac10.7 (dbg)",
- "GPU Linux (dbg) (NVIDIA)"
- ]
- },
- "gpu_throughput_tests": {
- "builders": [
- "GPU Win7 (NVIDIA)",
- "GPU Linux (NVIDIA)",
- "GPU Mac10.7"
- ]
- },
- "gpu_unittests": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "installer_util_unittests": {
- "builders": [
- "Vista Tests"
- ]
- },
- "interactive_ui_tests": {
- "builders": [
- "Win7 (dbg)",
- "Linux Tests",
- "Mac10.6 Tests",
- "Mac10.8 Tests"
- ]
- },
- "ipc_tests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests",
- "Linux Tests",
- "Mac10.6 Tests",
- "Android Tests (dbg)",
- "Mac10.8 Tests"
- ]
- },
- "layout-tests": {
- "builders": [
- "WebKit Linux 32",
- "WebKit Win7",
- "WebKit Linux ASAN",
- "WebKit Win7 (dbg)(2)",
- "WebKit (Content Shell) Linux",
- "WebKit (Content Shell) Win",
- "WebKit Mac10.7 (dbg)",
- "WebKit Mac10.6 (dbg)",
- "WebKit Linux",
- "WebKit Linux (dbg)",
- "WebKit Mac10.6",
- "WebKit Mac10.7",
- "WebKit Linux (deps)",
- "WebKit Mac10.8",
- "WebKit Mac10.6 (deps)",
- "WebKit (Content Shell) Mac10.6",
- "WebKit Win7 (dbg)(1)",
- "WebKit XP (deps)",
- "WebKit XP"
- ]
- },
- "media_unittests": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "memory test: test_shell": {
- "builders": [
- "Linux Valgrind"
- ]
- },
- "memory_test": {
- "builders": [
- "Mac10.6 Perf"
- ]
- },
- "mini_installer_test": {
- "builders": [
- "Vista Tests"
- ]
- },
- "net_unittests": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "new_tab_ui_cold_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "new_tab_ui_warm_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "sql_unittests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests",
- "Linux Tests",
- "Mac10.6 Tests",
- "Android Tests (dbg)",
- "Mac10.8 Tests"
- ]
- },
- "startup_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "sunspider_test": {
- "builders": [
- "Win7 Perf",
- "Mac10.6 Perf",
- "Linux Perf"
- ]
- },
- "sync_unit_tests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests",
- "Linux Tests",
- "Mac10.6 Tests",
- "Android Tests (dbg)",
- "Mac10.8 Tests"
- ]
- },
- "tab_switching_test": {
- "builders": [
- "Mac10.6 Perf"
- ]
- },
- "test_shell_tests": {
- "builders": [
- "WebKit Linux 32",
- "WebKit Win7",
- "WebKit Mac10.7 (dbg)",
- "WebKit Mac10.6 (dbg)",
- "WebKit Linux",
- "WebKit Linux (dbg)",
- "WebKit Mac10.6",
- "WebKit Mac10.7",
- "WebKit Linux (deps)",
- "WebKit Mac10.8",
- "WebKit Mac10.6 (deps)",
- "WebKit Win7 (dbg)(1)",
- "WebKit XP (deps)",
- "WebKit XP"
- ]
- },
- "ui_unittests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests",
- "Linux Tests",
- "Mac10.6 Tests",
- "Android Tests (dbg)",
- "Mac10.8 Tests"
- ]
- },
- "unit_tests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests",
- "Linux Tests",
- "Mac10.6 Tests",
- "Android Tests (dbg)",
- "Mac10.8 Tests"
- ]
- },
- "v8_benchmark_test": {
- "builders": [
- "Mac10.6 Perf"
- ]
- },
- "views_unittests": {
- "builders": [
- "Win7 (dbg)",
- "Vista Tests"
- ]
- },
- "webkit_compositor_bindings_unittests": {
- "builders": [
- "Android Tests (dbg)"
- ]
- },
- "webkit_unit_tests": {
- "builders": [
- "WebKit Linux 32",
- "WebKit Win7",
- "WebKit Android (GalaxyNexus)",
- "WebKit Mac10.7 (dbg)",
- "WebKit Mac10.6 (dbg)",
- "WebKit Linux",
- "WebKit Linux (dbg)",
- "WebKit Mac10.6",
- "WebKit Mac10.7",
- "WebKit Linux (deps)",
- "WebKit Mac10.8",
- "WebKit Mac10.6 (deps)",
- "WebKit Win7 (dbg)(1)",
- "WebKit XP (deps)",
- "WebKit XP"
- ]
- }
- },
- "url": "http://build.chromium.org/p/chromium.webkit"
- },
- {
"name": "webkit.org",
"tests": {
"layout-tests": {
"builders": [
- "Apple Lion (Leaks)",
"Apple Lion Debug WK1 (Tests)",
"Apple Lion Debug WK2 (Tests)",
"Apple Lion Release WK1 (Tests)",
@@ -1493,20 +15,17 @@ LOAD_BUILDBOT_DATA([
"Apple MountainLion Debug WK2 (Tests)",
"Apple MountainLion Release WK1 (Tests)",
"Apple MountainLion Release WK2 (Tests)",
+ "Apple Win 7 Debug (Tests)",
"Apple Win 7 Release (Tests)",
- "Apple Win XP Debug (Tests)",
- "Chromium Android Release (Tests)",
- "Chromium Linux Release (Tests)",
- "Chromium Mac Release (Tests)",
- "Chromium Win Release (Tests)",
"EFL Linux 64-bit Debug WK2",
"EFL Linux 64-bit Release",
"EFL Linux 64-bit Release WK2",
"GTK Linux 32-bit Release",
- "GTK Linux 64-bit Debug",
+ "GTK Linux 64-bit Debug WK1",
"GTK Linux 64-bit Release",
"GTK Linux 64-bit Release WK2 (Tests)",
"Qt Linux Release",
+ "Qt Mountain Lion Release",
"WinCairo Release"
]
}
diff --git a/Tools/TestResultServer/static-dashboards/dashboard_base.js b/Tools/TestResultServer/static-dashboards/dashboard_base.js
index f685ad6f6..cb0411a39 100644
--- a/Tools/TestResultServer/static-dashboards/dashboard_base.js
+++ b/Tools/TestResultServer/static-dashboards/dashboard_base.js
@@ -29,39 +29,8 @@
// @fileoverview Base JS file for pages that want to parse the results JSON
// from the testing bots. This deals with generic utility functions, visible
// history, popups and appending the script elements for the JSON files.
-//
-// The calling page is expected to implement the following "abstract"
-// functions/objects:
-var g_pageLoadStartTime = Date.now();
-var g_resourceLoader;
-
-// Generates the contents of the dashboard. The page should override this with
-// a function that generates the page assuming all resources have loaded.
-function generatePage() {}
-
-// Takes a key and a value and sets the g_currentState[key] = value iff key is
-// a valid hash parameter and the value is a valid value for that key.
-//
-// @return {boolean} Whether the key what inserted into the g_currentState.
-function handleValidHashParameter(key, value)
-{
- return false;
-}
-
-// Default hash parameters for the page. The page should override this to create
-// default states.
-var g_defaultDashboardSpecificStateValues = {};
-// The page should override this to modify page state due to
-// changing query parameters.
-// @param {Object} params New or modified query params as key: value.
-// @return {boolean} Whether changing this parameter should cause generatePage to be called.
-function handleQueryParameterChange(params)
-{
- return true;
-}
-
//////////////////////////////////////////////////////////////////////////////
// CONSTANTS
//////////////////////////////////////////////////////////////////////////////
@@ -86,13 +55,6 @@ var LAYOUT_TEST_EXPECTATIONS_MAP_ = {
'O': 'MISSING'
};
-var FAILURE_EXPECTATIONS_ = {
- 'T': 1,
- 'F': 1,
- 'C': 1,
- 'I': 1,
- 'Z': 1
-};
// Keys in the JSON files.
var WONTFIX_COUNTS_KEY = 'wontfixCounts';
@@ -111,44 +73,12 @@ var TESTS_KEY = 'tests';
var ONE_DAY_SECONDS = 60 * 60 * 24;
var ONE_WEEK_SECONDS = ONE_DAY_SECONDS * 7;
-// These should match the testtype uploaded to test-results.appspot.com.
-// See http://test-results.appspot.com/testfile.
+// These should match the testtype uploaded to webkit-test-results.appspot.com.
+// See http://webkit-test-results.appspot.com/testfile.
var TEST_TYPES = [
- 'base_unittests',
- 'browser_tests',
- 'cacheinvalidation_unittests',
- 'compositor_unittests',
- 'content_browsertests',
- 'content_unittests',
- 'courgette_unittests',
- 'crypto_unittests',
- 'googleurl_unittests',
- 'gfx_unittests',
- 'gl_tests',
- 'gpu_tests',
- 'gpu_unittests',
- 'installer_util_unittests',
- 'interactive_ui_tests',
- 'ipc_tests',
- 'jingle_unittests',
- 'layout-tests',
- 'media_unittests',
- 'mini_installer_test',
- 'net_unittests',
- 'printing_unittests',
- 'remoting_unittests',
- 'safe_browsing_tests',
- 'sql_unittests',
- 'sync_unit_tests',
- 'sync_integration_tests',
- 'test_shell_tests',
- 'ui_tests',
- 'unit_tests',
- 'views_unittests',
- 'webkit_unit_tests',
+ 'layout-tests'
];
-var RELOAD_REQUIRING_PARAMETERS = ['showAllRuns', 'group', 'testType'];
// Enum for indexing into the run-length encoded results in the JSON files.
// 0 is where the count is length is stored. 1 is the value.
@@ -162,480 +92,43 @@ function isFailingResult(value)
return 'FSTOCIZ'.indexOf(value) != -1;
}
-// Takes a key and a value and sets the g_currentState[key] = value iff key is
-// a valid hash parameter and the value is a valid value for that key. Handles
-// cross-dashboard parameters then falls back to calling
-// handleValidHashParameter for dashboard-specific parameters.
-//
-// @return {boolean} Whether the key what inserted into the g_currentState.
-function handleValidHashParameterWrapper(key, value)
-{
- switch(key) {
- case 'testType':
- validateParameter(g_crossDashboardState, key, value,
- function() { return TEST_TYPES.indexOf(value) != -1; });
- return true;
-
- case 'group':
- validateParameter(g_crossDashboardState, key, value,
- function() {
- return value in LAYOUT_TESTS_BUILDER_GROUPS ||
- value in CHROMIUM_GPU_TESTS_BUILDER_GROUPS ||
- value in CHROMIUM_GTESTS_BUILDER_GROUPS;
- });
- return true;
-
- // FIXME: This should probably be stored on g_crossDashboardState like everything else in this function.
- case 'builder':
- validateParameter(g_currentState, key, value,
- function() { return value in g_builders; });
- return true;
-
- case 'useTestData':
- case 'showAllRuns':
- g_crossDashboardState[key] = value == 'true';
- return true;
-
- case 'buildDir':
- if (value === 'Debug' || value == 'Release') {
- g_crossDashboardState['testType'] = 'layout-tests';
- g_crossDashboardState[key] = value;
- return true;
- } else
- return false;
-
- default:
- return handleValidHashParameter(key, value);
- }
-}
-
-var g_defaultCrossDashboardStateValues = {
- group: '@ToT - chromium.org',
- showAllRuns: false,
- testType: 'layout-tests',
- buildDir: '',
- useTestData: false,
-}
-
// Generic utility functions.
function $(id)
{
return document.getElementById(id);
}
-function stringContains(a, b)
-{
- return a.indexOf(b) != -1;
-}
-
-function caseInsensitiveContains(a, b)
-{
- return a.match(new RegExp(b, 'i'));
-}
-
-function startsWith(a, b)
-{
- return a.indexOf(b) == 0;
-}
-
-function endsWith(a, b)
-{
- return a.lastIndexOf(b) == a.length - b.length;
-}
-
-function isValidName(str)
-{
- return str.match(/[A-Za-z0-9\-\_,]/);
-}
-
-function trimString(str)
-{
- return str.replace(/^\s+|\s+$/g, '');
-}
-
-function collapseWhitespace(str)
-{
- return str.replace(/\s+/g, ' ');
-}
-
-function validateParameter(state, key, value, validateFn)
-{
- if (validateFn())
- state[key] = value;
- else
- console.log(key + ' value is not valid: ' + value);
-}
-
-function queryHashAsMap()
-{
- var hash = window.location.hash;
- var paramsList = hash ? hash.substring(1).split('&') : [];
- var paramsMap = {};
- var invalidKeys = [];
- for (var i = 0; i < paramsList.length; i++) {
- var thisParam = paramsList[i].split('=');
- if (thisParam.length != 2) {
- console.log('Invalid query parameter: ' + paramsList[i]);
- continue;
- }
-
- paramsMap[thisParam[0]] = decodeURIComponent(thisParam[1]);
- }
-
- // FIXME: remove support for mapping from the master parameter to the group
- // one once the waterfall starts to pass in the builder name instead.
- if (paramsMap.master) {
- paramsMap.group = LEGACY_BUILDER_MASTERS_TO_GROUPS[paramsMap.master];
- if (!paramsMap.group)
- console.log('ERROR: Unknown master name: ' + paramsMap.master);
- window.location.hash = window.location.hash.replace('master=' + paramsMap.master, 'group=' + paramsMap.group);
- delete paramsMap.master;
- }
-
- return paramsMap;
-}
-
-function parseParameter(parameters, key)
-{
- if (!(key in parameters))
- return;
- var value = parameters[key];
- if (!handleValidHashParameterWrapper(key, value))
- console.log("Invalid query parameter: " + key + '=' + value);
-}
-
-function parseCrossDashboardParameters()
-{
- g_crossDashboardState = {};
- var parameters = queryHashAsMap();
- for (parameterName in g_defaultCrossDashboardStateValues)
- parseParameter(parameters, parameterName);
-
- fillMissingValues(g_crossDashboardState, g_defaultCrossDashboardStateValues);
- if (currentBuilderGroup() === undefined)
- g_crossDashboardState.group = g_defaultCrossDashboardStateValues.group;
-}
-
-function parseDashboardSpecificParameters()
-{
- g_currentState = {};
- var parameters = queryHashAsMap();
- for (parameterName in g_defaultDashboardSpecificStateValues)
- parseParameter(parameters, parameterName);
-}
-
-function parseParameters()
-{
- var oldCrossDashboardState = g_crossDashboardState;
- var oldDashboardSpecificState = g_currentState;
-
- parseCrossDashboardParameters();
- parseDashboardSpecificParameters();
- parseParameter(queryHashAsMap(), 'builder');
-
- var crossDashboardDiffState = diffStates(oldCrossDashboardState, g_crossDashboardState);
- var dashboardSpecificDiffState = diffStates(oldDashboardSpecificState, g_currentState);
-
- fillMissingValues(g_currentState, g_defaultDashboardSpecificStateValues);
- if (!g_crossDashboardState.useTestData)
- fillMissingValues(g_currentState, {'builder': g_defaultBuilderName});
-
- // FIXME: dashboard_base shouldn't know anything about specific dashboard specific keys.
- if (dashboardSpecificDiffState.builder)
- delete g_currentState.tests;
- if (g_currentState.tests)
- delete g_currentState.builder;
-
- // Some parameters require loading different JSON files when the value changes. Do a reload.
- if (Object.keys(oldCrossDashboardState).length) {
- for (var key in g_crossDashboardState) {
- if (oldCrossDashboardState[key] != g_crossDashboardState[key] && RELOAD_REQUIRING_PARAMETERS.indexOf(key) != -1)
- window.location.reload();
- }
- }
-
- return dashboardSpecificDiffState;
-}
-
-function diffStates(oldState, newState)
-{
- // If there is no old state, everything in the current state is new.
- if (!oldState)
- return newState;
-
- var changedParams = {};
- for (curKey in newState) {
- var oldVal = oldState[curKey];
- var newVal = newState[curKey];
- // Add new keys or changed values.
- if (!oldVal || oldVal != newVal)
- changedParams[curKey] = newVal;
- }
- return changedParams;
-}
-
-function defaultValue(key)
-{
- if (key in g_defaultDashboardSpecificStateValues)
- return g_defaultDashboardSpecificStateValues[key];
- return g_defaultCrossDashboardStateValues[key];
-}
-
-function fillMissingValues(to, from)
-{
- for (var state in from) {
- if (!(state in to))
- to[state] = from[state];
- }
-}
-
-// FIXME: Rename this to g_dashboardSpecificState;
-var g_currentState = {};
-var g_crossDashboardState = {};
-parseCrossDashboardParameters();
-
-function isLayoutTestResults()
-{
- return g_crossDashboardState.testType == 'layout-tests';
-}
-
-function isGPUTestResults()
+function currentBuilderGroupCategory()
{
- return g_crossDashboardState.testType == 'gpu_tests';
+ return LAYOUT_TESTS_BUILDER_GROUPS;
}
-function currentBuilderGroupCategory()
+function currentBuilderGroupName()
{
- switch (g_crossDashboardState.testType) {
- case 'gl_tests':
- case 'gpu_tests':
- return CHROMIUM_GPU_TESTS_BUILDER_GROUPS;
- case 'layout-tests':
- return LAYOUT_TESTS_BUILDER_GROUPS;
- case 'test_shell_tests':
- case 'webkit_unit_tests':
- return TEST_SHELL_TESTS_BUILDER_GROUPS;
- default:
- return CHROMIUM_GTESTS_BUILDER_GROUPS;
- }
+ return g_history.crossDashboardState.group || Object.keys(currentBuilderGroupCategory())[0];
}
function currentBuilderGroup()
{
- return currentBuilderGroupCategory()[g_crossDashboardState.group]
+ return currentBuilderGroupCategory()[currentBuilderGroupName()];
}
-function isTipOfTreeWebKitBuilder()
+function currentBuilders()
{
- return currentBuilderGroup().isToTWebKit;
+ return currentBuilderGroup().builders;
}
-var g_defaultBuilderName, g_builders;
-function initBuilders()
+function isTipOfTreeWebKitBuilder()
{
- if (g_crossDashboardState.buildDir) {
- // If buildDir is set, point to the results.json in the local tree. Useful for debugging changes to the python JSON generator.
- g_defaultBuilderName = 'DUMMY_BUILDER_NAME';
- g_builders = {'DUMMY_BUILDER_NAME': ''};
- var loc = document.location.toString();
- var offset = loc.indexOf('webkit/');
- } else
- currentBuilderGroup().setup();
+ return true;
}
var g_resultsByBuilder = {};
var g_expectationsByPlatform = {};
-var g_staleBuilders = [];
-var g_buildersThatFailedToLoad = [];
-
-// TODO(aboxhall): figure out whether this is a performance bottleneck and
-// change calling code to understand the trie structure instead if necessary.
-function flattenTrie(trie, prefix)
-{
- var result = {};
- for (var name in trie) {
- var fullName = prefix ? prefix + "/" + name : name;
- var data = trie[name];
- if ("results" in data)
- result[fullName] = data;
- else {
- var partialResult = flattenTrie(data, fullName);
- for (var key in partialResult) {
- result[key] = partialResult[key];
- }
- }
- }
- return result;
-}
-
-function isTreeMap()
-{
- return endsWith(window.location.pathname, 'treemap.html');
-}
function isFlakinessDashboard()
{
- return endsWith(window.location.pathname, 'flakiness_dashboard.html');
-}
-
-var g_hasDoneInitialPageGeneration = false;
-// String of error messages to display to the user.
-var g_errorMessages = '';
-
-// Record a new error message.
-// @param {string} errorMsg The message to show to the user.
-function addError(errorMsg)
-{
- g_errorMessages += errorMsg + '<br>';
-}
-
-// Clear out error and warning messages.
-function clearErrors()
-{
- g_errorMessages = '';
-}
-
-// If there are errors, show big and red UI for errors so as to be noticed.
-function showErrors()
-{
- var errors = $('errors');
-
- if (!g_errorMessages) {
- if (errors)
- errors.parentNode.removeChild(errors);
- return;
- }
-
- if (!errors) {
- errors = document.createElement('H2');
- errors.style.color = 'red';
- errors.id = 'errors';
- document.body.appendChild(errors);
- }
-
- errors.innerHTML = g_errorMessages;
-}
-
-function addBuilderLoadErrors()
-{
- if (g_hasDoneInitialPageGeneration)
- return;
-
- if (g_buildersThatFailedToLoad.length)
- addError('ERROR: Failed to get data from ' + g_buildersThatFailedToLoad.toString() + '.');
-
- if (g_staleBuilders.length)
- addError('ERROR: Data from ' + g_staleBuilders.toString() + ' is more than 1 day stale.');
-}
-
-function resourceLoadingComplete()
-{
- g_resourceLoader = null;
- handleLocationChange();
-}
-
-function handleLocationChange()
-{
- if (g_resourceLoader)
- return;
-
- addBuilderLoadErrors();
- g_hasDoneInitialPageGeneration = true;
-
- var params = parseParameters();
- var shouldGeneratePage = true;
- if (Object.keys(params).length)
- shouldGeneratePage = handleQueryParameterChange(params);
-
- var newHash = permaLinkURLHash();
- var winHash = window.location.hash || "#";
- // Make sure the location is the same as the state we are using internally.
- // These get out of sync if processQueryParamChange changed state.
- if (newHash != winHash) {
- // This will cause another hashchange, and when we loop
- // back through here next time, we'll go through generatePage.
- window.location.hash = newHash;
- } else if (shouldGeneratePage)
- generatePage();
-}
-
-window.onhashchange = handleLocationChange;
-
-function combinedDashboardState()
-{
- var combinedState = Object.create(g_currentState);
- for (var key in g_crossDashboardState)
- combinedState[key] = g_crossDashboardState[key];
- return combinedState;
-}
-
-// Sets the page state. Takes varargs of key, value pairs.
-function setQueryParameter(var_args)
-{
- var state = combinedDashboardState();
- for (var i = 0; i < arguments.length; i += 2) {
- var key = arguments[i];
- state[key] = arguments[i + 1];
- }
- // Note: We use window.location.hash rather that window.location.replace
- // because of bugs in Chrome where extra entries were getting created
- // when back button was pressed and full page navigation was occuring.
- // FIXME: file those bugs.
- window.location.hash = permaLinkURLHash(state);
-}
-
-function permaLinkURLHash(opt_state)
-{
- var state = opt_state || combinedDashboardState();
- return '#' + joinParameters(state);
-}
-
-function joinParameters(stateObject)
-{
- var state = [];
- for (var key in stateObject) {
- var value = stateObject[key];
- if (value != defaultValue(key))
- state.push(key + '=' + encodeURIComponent(value));
- }
- return state.join('&');
-}
-
-function logTime(msg, startTime)
-{
- console.log(msg + ': ' + (Date.now() - startTime));
-}
-
-function hidePopup()
-{
- var popup = $('popup');
- if (popup)
- popup.parentNode.removeChild(popup);
-}
-
-function showPopup(target, html)
-{
- var popup = $('popup');
- if (!popup) {
- popup = document.createElement('div');
- popup.id = 'popup';
- document.body.appendChild(popup);
- }
-
- // Set html first so that we can get accurate size metrics on the popup.
- popup.innerHTML = html;
-
- var targetRect = target.getBoundingClientRect();
-
- var x = Math.min(targetRect.left - 10, document.documentElement.clientWidth - popup.offsetWidth);
- x = Math.max(0, x);
- popup.style.left = x + document.body.scrollLeft + 'px';
-
- var y = targetRect.top + targetRect.height;
- if (y + popup.offsetHeight > document.documentElement.clientHeight)
- y = targetRect.top - popup.offsetHeight;
- y = Math.max(0, y);
- popup.style.top = y + document.body.scrollTop + 'px';
+ return string.endsWith(window.location.pathname, 'flakiness_dashboard.html');
}
// Create a new function with some of its arguements
@@ -657,254 +150,8 @@ function partial(fn, var_args)
};
};
-// Returns the appropriate expectatiosn map for the current testType.
+// Returns the appropriate expectations map for the current testType.
function expectationsMap()
{
- return isLayoutTestResults() ? LAYOUT_TEST_EXPECTATIONS_MAP_ : GTEST_EXPECTATIONS_MAP_;
+ return g_history.isLayoutTestResults() ? LAYOUT_TEST_EXPECTATIONS_MAP_ : GTEST_EXPECTATIONS_MAP_;
}
-
-function toggleQueryParameter(param)
-{
- setQueryParameter(param, !queryParameterValue(param));
-}
-
-function queryParameterValue(parameter)
-{
- return g_currentState[parameter] || g_crossDashboardState[parameter];
-}
-
-function checkboxHTML(queryParameter, label, isChecked, opt_extraJavaScript)
-{
- var js = opt_extraJavaScript || '';
- return '<label style="padding-left: 2em">' +
- '<input type="checkbox" onchange="toggleQueryParameter(\'' + queryParameter + '\');' + js + '" ' +
- (isChecked ? 'checked' : '') + '>' + label +
- '</label> ';
-}
-
-function selectHTML(label, queryParameter, options)
-{
- var html = '<label style="padding-left: 2em">' + label + ': ' +
- '<select onchange="setQueryParameter(\'' + queryParameter + '\', this[this.selectedIndex].value)">';
-
- for (var i = 0; i < options.length; i++) {
- var value = options[i];
- html += '<option value="' + value + '" ' +
- (queryParameterValue(queryParameter) == value ? 'selected' : '') +
- '>' + value + '</option>'
- }
- html += '</select></label> ';
- return html;
-}
-
-// Returns the HTML for the select element to switch to different testTypes.
-function htmlForTestTypeSwitcher(opt_noBuilderMenu, opt_extraHtml, opt_includeNoneBuilder)
-{
- var html = '<div style="border-bottom:1px dashed">';
- html += '' +
- htmlForDashboardLink('Stats', 'aggregate_results.html') +
- htmlForDashboardLink('Timeline', 'timeline_explorer.html') +
- htmlForDashboardLink('Results', 'flakiness_dashboard.html') +
- htmlForDashboardLink('Treemap', 'treemap.html');
-
- html += selectHTML('Test type', 'testType', TEST_TYPES);
-
- if (!opt_noBuilderMenu) {
- var buildersForMenu = Object.keys(g_builders);
- if (opt_includeNoneBuilder)
- buildersForMenu.unshift('--------------');
- html += selectHTML('Builder', 'builder', buildersForMenu);
- }
-
- html += selectHTML('Group', 'group',
- Object.keys(currentBuilderGroupCategory()));
-
- if (!isTreeMap())
- html += checkboxHTML('showAllRuns', 'Show all runs', g_crossDashboardState.showAllRuns);
-
- if (opt_extraHtml)
- html += opt_extraHtml;
- return html + '</div>';
-}
-
-function selectBuilder(builder)
-{
- setQueryParameter('builder', builder);
-}
-
-function loadDashboard(fileName)
-{
- var pathName = window.location.pathname;
- pathName = pathName.substring(0, pathName.lastIndexOf('/') + 1);
- window.location = pathName + fileName + window.location.hash;
-}
-
-function htmlForTopLink(html, onClick, isSelected)
-{
- var cssText = isSelected ? 'font-weight: bold;' : 'color:blue;text-decoration:underline;cursor:pointer;';
- cssText += 'margin: 0 5px;';
- return '<span style="' + cssText + '" onclick="' + onClick + '">' + html + '</span>';
-}
-
-function htmlForDashboardLink(html, fileName)
-{
- var pathName = window.location.pathname;
- var currentFileName = pathName.substring(pathName.lastIndexOf('/') + 1);
- var isSelected = currentFileName == fileName;
- var onClick = 'loadDashboard(\'' + fileName + '\')';
- return htmlForTopLink(html, onClick, isSelected);
-}
-
-function revisionLink(results, index, key, singleUrlTemplate, rangeUrlTemplate)
-{
- var currentRevision = parseInt(results[key][index], 10);
- var previousRevision = parseInt(results[key][index + 1], 10);
-
- function singleUrl()
- {
- return singleUrlTemplate.replace('<rev>', currentRevision);
- }
-
- function rangeUrl()
- {
- return rangeUrlTemplate.replace('<rev1>', currentRevision).replace('<rev2>', previousRevision + 1);
- }
-
- if (currentRevision == previousRevision)
- return 'At <a href="' + singleUrl() + '">r' + currentRevision + '</a>';
- else if (currentRevision - previousRevision == 1)
- return '<a href="' + singleUrl() + '">r' + currentRevision + '</a>';
- else
- return '<a href="' + rangeUrl() + '">r' + (previousRevision + 1) + ' to r' + currentRevision + '</a>';
-}
-
-function chromiumRevisionLink(results, index)
-{
- return revisionLink(
- results,
- index,
- CHROME_REVISIONS_KEY,
- 'http://src.chromium.org/viewvc/chrome?view=rev&revision=<rev>',
- 'http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&range=<rev2>:<rev1>&mode=html');
-}
-
-function webKitRevisionLink(results, index)
-{
- return revisionLink(
- results,
- index,
- WEBKIT_REVISIONS_KEY,
- 'http://trac.webkit.org/changeset/<rev>',
- 'http://trac.webkit.org/log/trunk/?rev=<rev1>&stop_rev=<rev2>&limit=100&verbose=on');
-}
-
-// "Decompresses" the RLE-encoding of test results so that we can query it
-// by build index and test name.
-//
-// @param {Object} results results for the current builder
-// @return Object with these properties:
-// - testNames: array mapping test index to test names.
-// - resultsByBuild: array of builds, for each build a (sparse) array of test results by test index.
-// - flakyTests: array with the boolean value true at test indices that are considered flaky (more than one single-build failure).
-// - flakyDeltasByBuild: array of builds, for each build a count of flaky test results by expectation, as well as a total.
-function decompressResults(builderResults)
-{
- var builderTestResults = builderResults[TESTS_KEY];
- var buildCount = builderResults[FIXABLE_COUNTS_KEY].length;
- var resultsByBuild = new Array(buildCount);
- var flakyDeltasByBuild = new Array(buildCount);
-
- // Pre-sizing the test result arrays for each build saves us ~250ms
- var testCount = 0;
- for (var testName in builderTestResults)
- testCount++;
- for (var i = 0; i < buildCount; i++) {
- resultsByBuild[i] = new Array(testCount);
- resultsByBuild[i][testCount - 1] = undefined;
- flakyDeltasByBuild[i] = {};
- }
-
- // Using indices instead of the full test names for each build saves us
- // ~1500ms
- var testIndex = 0;
- var testNames = new Array(testCount);
- var flakyTests = new Array(testCount);
-
- // Decompress and "invert" test results (by build instead of by test) and
- // determine which are flaky.
- for (var testName in builderTestResults) {
- var oneBuildFailureCount = 0;
-
- testNames[testIndex] = testName;
- var testResults = builderTestResults[testName].results;
- for (var i = 0, rleResult, currentBuildIndex = 0; (rleResult = testResults[i]) && currentBuildIndex < buildCount; i++) {
- var count = rleResult[RLE.LENGTH];
- var value = rleResult[RLE.VALUE];
-
- if (count == 1 && value in FAILURE_EXPECTATIONS_)
- oneBuildFailureCount++;
-
- for (var j = 0; j < count; j++) {
- resultsByBuild[currentBuildIndex++][testIndex] = value;
- if (currentBuildIndex == buildCount)
- break;
- }
- }
-
- if (oneBuildFailureCount > 2)
- flakyTests[testIndex] = true;
-
- testIndex++;
- }
-
- // Now that we know which tests are flaky, count the test results that are
- // from flaky tests for each build.
- testIndex = 0;
- for (var testName in builderTestResults) {
- if (!flakyTests[testIndex++])
- continue;
-
- var testResults = builderTestResults[testName].results;
- for (var i = 0, rleResult, currentBuildIndex = 0; (rleResult = testResults[i]) && currentBuildIndex < buildCount; i++) {
- var count = rleResult[RLE.LENGTH];
- var value = rleResult[RLE.VALUE];
-
- for (var j = 0; j < count; j++) {
- var buildTestResults = flakyDeltasByBuild[currentBuildIndex++];
- function addFlakyDelta(key)
- {
- if (!(key in buildTestResults))
- buildTestResults[key] = 0;
- buildTestResults[key]++;
- }
- addFlakyDelta(value);
- if (value != 'P' && value != 'N')
- addFlakyDelta('total');
- if (currentBuildIndex == buildCount)
- break;
- }
- }
- }
-
- return {
- testNames: testNames,
- resultsByBuild: resultsByBuild,
- flakyTests: flakyTests,
- flakyDeltasByBuild: flakyDeltasByBuild
- };
-}
-
-document.addEventListener('mousedown', function(e) {
- // Clear the open popup, unless the click was inside the popup.
- var popup = $('popup');
- if (popup && e.target != popup && !(popup.compareDocumentPosition(e.target) & 16))
- hidePopup();
-}, false);
-
-window.addEventListener('load', function() {
- // This doesn't seem totally accurate as there is a race between
- // onload firing and the last script tag being executed.
- logTime('Time to load JS', g_pageLoadStartTime);
- g_resourceLoader = new loader.Loader();
- g_resourceLoader.load();
-}, false);
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
index 625d4238d..725bcc863 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.html
@@ -32,5 +32,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<link rel="stylesheet" href="flakiness_dashboard_tests.css"></link>
<script src="builders.js"></script>
<script src="loader.js"></script>
+<script src="string.js"></script>
+<script src="history.js"></script>
<script src="dashboard_base.js"></script>
+<script src="ui.js"></script>
<script src="flakiness_dashboard.js"></script>
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
index d44e3e58e..42ddf7e87 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard.js
@@ -40,23 +40,6 @@ var TEST_RESULTS_BASE_PATH = 'http://build.chromium.org/f/chromium/layout_test_r
var GPU_RESULTS_BASE_PATH = 'http://chromium-browser-gpu-tests.commondatastorage.googleapis.com/runs/'
var PLATFORMS = {
- 'CHROMIUM': {
- expectationsDirectory: 'chromium',
- subPlatforms: {
- 'LION': { fallbackPlatforms: ['CHROMIUM'] },
- 'SNOWLEOPARD': { fallbackPlatforms: ['CHROMIUM'] },
- 'XP': { fallbackPlatforms: ['CHROMIUM'] },
- 'VISTA': { fallbackPlatforms: ['CHROMIUM'] },
- 'WIN7': { fallbackPlatforms: ['CHROMIUM'] },
- 'LUCID': { fallbackPlatforms: ['CHROMIUM'] },
- 'ANDROID': { fallbackPlatforms: ['CHROMIUM'], expectationsDirectory: 'chromium-android' }
- },
- platformModifierUnions: {
- 'MAC': ['CHROMIUM_LION', 'CHROMIUM_SNOWLEOPARD'],
- 'WIN': ['CHROMIUM_XP', 'CHROMIUM_VISTA', 'CHROMIUM_WIN7'],
- 'LINUX': ['CHROMIUM_LUCID']
- }
- },
'APPLE': {
subPlatforms: {
'MAC': {
@@ -66,16 +49,15 @@ var PLATFORMS = {
expectationsDirectory: 'mac-lion',
subPlatforms: {
'WK1': { fallbackPlatforms: ['APPLE_MAC_LION', 'APPLE_MAC'] },
- 'WK2': { fallbackPlatforms: ['APPLE_MAC_LION', 'APPLE_MAC', 'WK2'] }
+ 'WK2': { fallbackPlatforms: ['APPLE_MAC_LION', 'APPLE_MAC', 'WK2'], expectationsDirectory: 'mac-wk2'}
}
},
- 'SNOWLEOPARD': {
- expectationsDirectory: 'mac-snowleopard',
+ 'MOUNTAINLION': {
subPlatforms: {
- 'WK1': { fallbackPlatforms: ['APPLE_MAC_SNOWLEOPARD', 'APPLE_MAC'] },
- 'WK2': { fallbackPlatforms: ['APPLE_MAC_SNOWLEOPARD', 'APPLE_MAC', 'WK2'] }
+ 'WK1': { fallbackPlatforms: ['APPLE_MAC_MOUNTAINLION', 'APPLE_MAC'] },
+ 'WK2': { fallbackPlatforms: ['APPLE_MAC_MOUNTAINLION', 'APPLE_MAC', 'WK2'], expectationsDirectory: 'mac-wk2'}
}
- }
+ },
}
},
'WIN': {
@@ -134,46 +116,44 @@ var VIRTUAL_SUITES = {
'platform/chromium/virtual/gpu/canvas/philip': 'canvas/philip'
};
-//////////////////////////////////////////////////////////////////////////////
-// Methods and objects from dashboard_base.js to override.
-//////////////////////////////////////////////////////////////////////////////
-function generatePage()
+var resourceLoader;
+
+function generatePage(historyInstance)
{
- if (g_crossDashboardState.useTestData)
+ if (historyInstance.crossDashboardState.useTestData)
return;
- updateDefaultBuilderState();
document.body.innerHTML = '<div id="loading-ui">LOADING...</div>';
- showErrors();
+ resourceLoader.showErrors();
// tests expands to all tests that match the CSV list.
// result expands to all tests that ever have the given result
- if (g_currentState.tests || g_currentState.result)
+ if (historyInstance.dashboardSpecificState.tests || historyInstance.dashboardSpecificState.result)
generatePageForIndividualTests(individualTests());
- else if (g_currentState.expectationsUpdate)
+ else if (historyInstance.dashboardSpecificState.expectationsUpdate)
generatePageForExpectationsUpdate();
else
- generatePageForBuilder(g_currentState.builder);
+ generatePageForBuilder(historyInstance.dashboardSpecificState.builder || currentBuilderGroup().defaultBuilder());
- for (var builder in g_builders)
+ for (var builder in currentBuilders())
processTestResultsForBuilderAsync(builder);
postHeightChangedMessage();
}
-function handleValidHashParameter(key, value)
+function handleValidHashParameter(historyInstance, key, value)
{
switch(key) {
case 'tests':
- validateParameter(g_currentState, key, value,
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
function() {
- return isValidName(value);
+ return string.isValidName(value);
});
return true;
case 'result':
value = value.toUpperCase();
- validateParameter(g_currentState, key, value,
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
function() {
for (var result in LAYOUT_TEST_EXPECTATIONS_MAP_) {
if (value == LAYOUT_TEST_EXPECTATIONS_MAP_[result])
@@ -184,17 +164,18 @@ function handleValidHashParameter(key, value)
return true;
case 'builder':
- validateParameter(g_currentState, key, value,
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
function() {
- return value in g_builders;
+ return value in currentBuilders();
});
+
return true;
case 'sortColumn':
- validateParameter(g_currentState, key, value,
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
function() {
// Get all possible headers since the actual used set of headers
- // depends on the values in g_currentState, which are currently being set.
+ // depends on the values in historyInstance.dashboardSpecificState, which are currently being set.
var headers = tableHeaders(true);
for (var i = 0; i < headers.length; i++) {
if (value == sortColumnFromTableHeader(headers[i]))
@@ -205,7 +186,7 @@ function handleValidHashParameter(key, value)
return true;
case 'sortOrder':
- validateParameter(g_currentState, key, value,
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
function() {
return value == FORWARD || value == BACKWARD;
});
@@ -214,7 +195,7 @@ function handleValidHashParameter(key, value)
case 'resultsHeight':
case 'updateIndex':
case 'revision':
- validateParameter(g_currentState, key, Number(value),
+ history.validateParameter(historyInstance.dashboardSpecificState, key, Number(value),
function() {
return value.match(/^\d+$/);
});
@@ -232,7 +213,7 @@ function handleValidHashParameter(key, value)
case 'showUnexpectedPasses':
case 'showWontFixSkip':
case 'expectationsUpdate':
- g_currentState[key] = value == 'true';
+ historyInstance.dashboardSpecificState[key] = value == 'true';
return true;
default:
@@ -240,7 +221,27 @@ function handleValidHashParameter(key, value)
}
}
-g_defaultDashboardSpecificStateValues = {
+// @param {Object} params New or modified query parameters as key: value.
+function handleQueryParameterChange(historyInstance, params)
+{
+ for (key in params) {
+ if (key == 'tests') {
+ // Entering cross-builder view, only keep valid keys for that view.
+ for (var currentKey in historyInstance.dashboardSpecificState) {
+ if (isInvalidKeyForCrossBuilderView(currentKey)) {
+ delete historyInstance.dashboardSpecificState[currentKey];
+ }
+ }
+ } else if (isInvalidKeyForCrossBuilderView(key)) {
+ delete historyInstance.dashboardSpecificState.tests;
+ delete historyInstance.dashboardSpecificState.result;
+ }
+ }
+
+ return true;
+}
+
+var defaultDashboardSpecificStateValues = {
sortOrder: BACKWARD,
sortColumn: 'flakiness',
showExpectations: false,
@@ -248,20 +249,40 @@ g_defaultDashboardSpecificStateValues = {
showLargeExpectations: false,
legacyExpectationsSemantics: true,
showChrome: true,
- showCorrectExpectations: !isLayoutTestResults(),
- showWrongExpectations: !isLayoutTestResults(),
- showWontFixSkip: !isLayoutTestResults(),
- showSlow: !isLayoutTestResults(),
- showSkipped: !isLayoutTestResults(),
- showUnexpectedPasses: !isLayoutTestResults(),
+ showCorrectExpectations: false,
+ showWrongExpectations: false,
+ showWontFixSkip: false,
+ showSlow: false,
+ showSkipped: false,
+ showUnexpectedPasses: false,
expectationsUpdate: false,
updateIndex: 0,
resultsHeight: 300,
revision: null,
tests: '',
result: '',
+ builder: null
};
+var DB_SPECIFIC_INVALIDATING_PARAMETERS = {
+ 'tests' : 'builder',
+ 'testType': 'builder',
+ 'group': 'builder'
+};
+
+
+var flakinessConfig = {
+ defaultStateValues: defaultDashboardSpecificStateValues,
+ generatePage: generatePage,
+ handleValidHashParameter: handleValidHashParameter,
+ handleQueryParameterChange: handleQueryParameterChange,
+ invalidatingHashParameters: DB_SPECIFIC_INVALIDATING_PARAMETERS
+};
+
+// FIXME(jparent): Eventually remove all usage of global history object.
+var g_history = new history.History(flakinessConfig);
+g_history.parseCrossDashboardParameters();
+
//////////////////////////////////////////////////////////////////////////////
// GLOBALS
//////////////////////////////////////////////////////////////////////////////
@@ -325,75 +346,45 @@ function createResultsObjectForTest(test, builder)
function matchingElement(stringToMatch, elementsMap)
{
for (var element in elementsMap) {
- if (stringContains(stringToMatch, elementsMap[element]))
+ if (string.contains(stringToMatch, elementsMap[element]))
return element;
}
}
function determineWKPlatform(builderName, basePlatform)
{
- var isWK2Builder = stringContains(builderName, 'WK2') || stringContains(builderName, 'WEBKIT2');
+ var isWK2Builder = string.contains(builderName, 'WK2') || string.contains(builderName, 'WEBKIT2');
return basePlatform + (isWK2Builder ? '_WK2' : '_WK1');
}
-function nonChromiumPlatform(builderNameUpperCase)
+function determineBuilderPlatform(builderNameUpperCase)
{
- if (stringContains(builderNameUpperCase, 'WINDOWS 7'))
+ if (string.contains(builderNameUpperCase, 'WINDOWS 7'))
return 'APPLE_WIN_WIN7';
- if (stringContains(builderNameUpperCase, 'WINDOWS XP'))
+ if (string.contains(builderNameUpperCase, 'WINDOWS XP'))
return 'APPLE_WIN_XP';
- if (stringContains(builderNameUpperCase, 'QT LINUX'))
+ if (string.contains(builderNameUpperCase, 'QT LINUX'))
return 'QT_LINUX';
- if (stringContains(builderNameUpperCase, 'LION'))
+ if (string.contains(builderNameUpperCase, 'MOUNTAINLION'))
+ return determineWKPlatform(builderNameUpperCase, 'APPLE_MAC_MOUNTAINLION');
+ if (string.contains(builderNameUpperCase, 'LION'))
return determineWKPlatform(builderNameUpperCase, 'APPLE_MAC_LION');
- if (stringContains(builderNameUpperCase, 'SNOWLEOPARD'))
- return determineWKPlatform(builderNameUpperCase, 'APPLE_MAC_SNOWLEOPARD');
- if (stringContains(builderNameUpperCase, 'GTK LINUX'))
+ if (string.contains(builderNameUpperCase, 'GTK LINUX'))
return determineWKPlatform(builderNameUpperCase, 'GTK_LINUX');
- if (stringContains(builderNameUpperCase, 'EFL'))
+ if (string.contains(builderNameUpperCase, 'EFL'))
return determineWKPlatform(builderNameUpperCase, 'EFL_LINUX');
}
-function chromiumPlatform(builderNameUpperCase)
-{
- if (stringContains(builderNameUpperCase, 'MAC')) {
- if (stringContains(builderNameUpperCase, '10.7'))
- return 'CHROMIUM_LION';
- // The webkit.org 'Chromium Mac Release (Tests)' bot runs SnowLeopard.
- return 'CHROMIUM_SNOWLEOPARD';
- }
- if (stringContains(builderNameUpperCase, 'WIN7'))
- return 'CHROMIUM_WIN7';
- if (stringContains(builderNameUpperCase, 'VISTA'))
- return 'CHROMIUM_VISTA';
- if (stringContains(builderNameUpperCase, 'WIN') || stringContains(builderNameUpperCase, 'XP'))
- return 'CHROMIUM_XP';
- if (stringContains(builderNameUpperCase, 'LINUX'))
- return 'CHROMIUM_LUCID';
- if (stringContains(builderNameUpperCase, 'ANDROID'))
- return 'CHROMIUM_ANDROID';
- // The interactive bot is XP, but doesn't have an OS in it's name.
- if (stringContains(builderNameUpperCase, 'INTERACTIVE'))
- return 'CHROMIUM_XP';
-}
-
-
function platformAndBuildType(builderName)
{
if (!g_perBuilderPlatformAndBuildType[builderName]) {
var builderNameUpperCase = builderName.toUpperCase();
-
- var platform = '';
- if (isLayoutTestResults() && g_crossDashboardState.group == '@ToT - webkit.org' && !stringContains(builderNameUpperCase, 'CHROMIUM'))
- platform = nonChromiumPlatform(builderNameUpperCase);
- else
- platform = chromiumPlatform(builderNameUpperCase);
-
+ var platform = determineBuilderPlatform(builderNameUpperCase);
if (!platform)
console.error('Could not resolve platform for builder: ' + builderName);
- var buildType = stringContains(builderNameUpperCase, 'DBG') || stringContains(builderNameUpperCase, 'DEBUG') ? 'DEBUG' : 'RELEASE';
+ var buildType = string.contains(builderNameUpperCase, 'DEBUG') ? 'DEBUG' : 'RELEASE';
g_perBuilderPlatformAndBuildType[builderName] = {platform: platform, buildType: buildType};
}
return g_perBuilderPlatformAndBuildType[builderName];
@@ -479,7 +470,7 @@ var g_allTestsTrie;
function getAllTestsTrie()
{
if (!g_allTestsTrie)
- g_allTestsTrie = new TestTrie(g_builders, g_resultsByBuilder);
+ g_allTestsTrie = new TestTrie(currentBuilders(), g_resultsByBuilder);
return g_allTestsTrie;
}
@@ -489,10 +480,10 @@ function getAllTestsTrie()
// tests in the directory.
function individualTests()
{
- if (g_currentState.result)
- return allTestsWithResult(g_currentState.result);
+ if (g_history.dashboardSpecificState.result)
+ return allTestsWithResult(g_history.dashboardSpecificState.result);
- if (!g_currentState.tests)
+ if (!g_history.dashboardSpecificState.tests)
return [];
return individualTestsForSubstringList();
@@ -501,11 +492,11 @@ function individualTests()
function substringList()
{
// Convert windows slashes to unix slashes.
- var tests = g_currentState.tests.replace(/\\/g, '/');
- var separator = stringContains(tests, ' ') ? ' ' : ',';
+ var tests = g_history.dashboardSpecificState.tests.replace(/\\/g, '/');
+ var separator = string.contains(tests, ' ') ? ' ' : ',';
var testList = tests.split(separator);
- if (isLayoutTestResults())
+ if (g_history.isLayoutTestResults())
return testList;
var testListWithoutModifiers = [];
@@ -534,7 +525,7 @@ function individualTestsForSubstringList()
var hasAnyMatches = false;
getAllTestsTrie().forEach(function(triePath) {
- if (caseInsensitiveContains(triePath, path)) {
+ if (string.caseInsensitiveContains(triePath, path)) {
testsMap[triePath] = 1;
hasAnyMatches = true;
}
@@ -610,7 +601,7 @@ function allTestsWithSamePlatformAndBuildType(platform, buildType)
{
if (!g_allTestsByPlatformAndBuildType[platform][buildType]) {
var tests = {};
- for (var thisBuilder in g_builders) {
+ for (var thisBuilder in currentBuilders()) {
var thisBuilderBuildInfo = platformAndBuildType(thisBuilder);
if (thisBuilderBuildInfo.buildType == buildType && thisBuilderBuildInfo.platform == platform) {
addTestsForBuilder(thisBuilder, tests);
@@ -642,7 +633,7 @@ function filterBugs(modifiers)
return {bugs: '', modifiers: modifiers};
for (var j = 0; j < bugs.length; j++)
modifiers = modifiers.replace(bugs[j], '');
- return {bugs: bugs.join(' '), modifiers: collapseWhitespace(trimString(modifiers))};
+ return {bugs: bugs.join(' '), modifiers: string.collapseWhitespace(string.trimString(modifiers))};
}
function populateExpectationsData(resultsObject)
@@ -656,7 +647,7 @@ function populateExpectationsData(resultsObject)
var filteredModifiers = filterBugs(expectations.modifiers);
resultsObject.modifiers = filteredModifiers.modifiers;
resultsObject.bugs = filteredModifiers.bugs;
- resultsObject.isWontFixSkip = stringContains(expectations.modifiers, 'WONTFIX') || stringContains(expectations.modifiers, 'SKIP');
+ resultsObject.isWontFixSkip = string.contains(expectations.modifiers, 'WONTFIX') || string.contains(expectations.modifiers, 'SKIP');
}
function platformObjectForName(platformName)
@@ -685,8 +676,8 @@ function getParsedExpectations(data)
var expectations = [];
var lines = data.split('\n');
lines.forEach(function(line) {
- line = trimString(line);
- if (!line || startsWith(line, '#'))
+ line = string.trimString(line);
+ if (!line || string.startsWith(line, '#'))
return;
// This code mimics _tokenize_line_using_new_format() in
@@ -825,33 +816,6 @@ function processExpectationsForPlatform(platformObject, platformName, expectatio
var modifiers = expectationsArray[i].modifiers;
var expectations = expectationsArray[i].expectations;
- var shouldProcessExpectation = false;
- var hasPlatformModifierUnions = false;
- if (platformObject.fallbackPlatforms) {
- platformObject.fallbackPlatforms.forEach(function(fallbackPlatform) {
- if (shouldProcessExpectation)
- return;
-
- var fallbackPlatformObject = platformObjectForName(fallbackPlatform);
- if (!fallbackPlatformObject.platformModifierUnions)
- return;
-
- modifiers.split(' ').forEach(function(modifier) {
- if (modifier in fallbackPlatformObject.platformModifierUnions) {
- hasPlatformModifierUnions = true;
- if (fallbackPlatformObject.platformModifierUnions[modifier].indexOf(platformName) != -1)
- shouldProcessExpectation = true;
- }
- });
- });
- }
-
- if (!hasPlatformModifierUnions)
- shouldProcessExpectation = true;
-
- if (!shouldProcessExpectation)
- continue;
-
getAllTestsTrie().forEach(function(triePath) {
addTestToAllExpectationsForPlatform(triePath, platformName, expectations, modifiers);
}, path);
@@ -895,8 +859,8 @@ function processMissingTestsWithExpectations(builder, platform, buildType)
// Test has expectations, but no result in the builders results.
// This means it's either SKIP or passes on all builds.
- if (!allTestsForPlatformAndBuildType[test] && !stringContains(expectations.modifiers, 'WONTFIX')) {
- if (stringContains(expectations.modifiers, 'SKIP'))
+ if (!allTestsForPlatformAndBuildType[test] && !string.contains(expectations.modifiers, 'WONTFIX')) {
+ if (string.contains(expectations.modifiers, 'SKIP'))
skipped.push(test);
else if (!expectations.expectations.match(/^\s*PASS\s*$/)) {
// Don't show tests expected to always pass. This is used in ways like
@@ -919,7 +883,7 @@ function processTestResultsForBuilderAsync(builder)
function processTestRunsForAllBuilders()
{
- for (var builder in g_builders)
+ for (var builder in currentBuilders())
processTestRunsForBuilder(builder);
}
@@ -935,8 +899,7 @@ function processTestRunsForBuilder(builderName)
}
processExpectations();
- var start = Date.now();
-
+
var buildInfo = platformAndBuildType(builderName);
var platform = buildInfo.platform;
var buildType = buildInfo.buildType;
@@ -989,7 +952,6 @@ function processTestRunsForBuilder(builderName)
}
g_perBuilderFailures[builderName] = failures;
- logTime('processTestRunsForBuilder: ' + builderName, start);
}
function processMissingAndExtraExpectations(resultsForTest)
@@ -1048,14 +1010,14 @@ function processMissingAndExtraExpectations(resultsForTest)
var missingExpectations = [];
var extraExpectations = [];
- if (isLayoutTestResults()) {
+ if (g_history.isLayoutTestResults()) {
var expectationsArray = resultsForTest.expectations ? resultsForTest.expectations.split(' ') : [];
extraExpectations = expectationsArray.filter(
function(element) {
// FIXME: Once all the FAIL lines are removed from
// TestExpectations, delete all the legacyExpectationsSemantics
// code.
- if (g_currentState.legacyExpectationsSemantics) {
+ if (g_history.dashboardSpecificState.legacyExpectationsSemantics) {
if (element == 'FAIL') {
for (var i = 0; i < FAIL_RESULTS.length; i++) {
if (resultsMap[FAIL_RESULTS[i]])
@@ -1065,7 +1027,7 @@ function processMissingAndExtraExpectations(resultsForTest)
}
}
- return element && !resultsMap[element] && !stringContains(element, 'BUG');
+ return element && !resultsMap[element] && !string.contains(element, 'BUG');
});
for (var result in resultsMap) {
@@ -1076,7 +1038,7 @@ function processMissingAndExtraExpectations(resultsForTest)
// FIXME: Once all the FAIL lines are removed from
// TestExpectations, delete all the legacyExpectationsSemantics
// code.
- if (g_currentState.legacyExpectationsSemantics) {
+ if (g_history.dashboardSpecificState.legacyExpectationsSemantics) {
if (expectation == 'FAIL') {
for (var j = 0; j < FAIL_RESULTS.length; j++) {
if (result == FAIL_RESULTS[j]) {
@@ -1105,9 +1067,9 @@ function processMissingAndExtraExpectations(resultsForTest)
// hundred runs. It's not worth the manual maintenance effort.
// Also, if a test times out, then it should not be marked as slow.
var minTimeForNeedsSlow = isDebug(resultsForTest.builder) ? 2 : 1;
- if (isSlowTest(resultsForTest) && !resultsMap['TIMEOUT'] && (!resultsForTest.modifiers || !stringContains(resultsForTest.modifiers, 'SLOW')))
+ if (isSlowTest(resultsForTest) && !resultsMap['TIMEOUT'] && (!resultsForTest.modifiers || !string.contains(resultsForTest.modifiers, 'SLOW')))
missingExpectations.push('SLOW');
- else if (isFastTest(resultsForTest) && resultsForTest.modifiers && stringContains(resultsForTest.modifiers, 'SLOW'))
+ else if (isFastTest(resultsForTest) && resultsForTest.modifiers && string.contains(resultsForTest.modifiers, 'SLOW'))
extraExpectations.push('SLOW');
// If there are no missing results or modifiers besides build
@@ -1148,7 +1110,7 @@ function linkHTMLToOpenWindow(url, text)
return '<a href="' + url + '" target="_blank">' + text + '</a>';
}
-// FIXME: replaced with chromiumRevisionLink/webKitRevisionLink
+// FIXME: replaced with ui.html.chromiumRevisionLink/ui.html.webKitRevisionLink
function createBlameListHTML(revisions, index, urlBase, separator, repo)
{
var thisRevision = revisions[index];
@@ -1199,7 +1161,7 @@ function indexesForFailures(builder, testName)
// Returns the path to the failure log for this non-webkit test.
function pathToFailureLog(testName)
{
- return '/steps/' + g_crossDashboardState.testType + '/logs/' + testName.split('.')[1]
+ return '/steps/' + g_history.crossDashboardState.testType + '/logs/' + testName.split('.')[1]
}
function showPopupForBuild(e, builder, index, opt_testName)
@@ -1225,7 +1187,7 @@ function showPopupForBuild(e, builder, index, opt_testName)
if (master.name == WEBKIT_BUILDER_MASTER) {
var revision = g_resultsByBuilder[builder].webkitRevision[index];
- html += '<li><span class=link onclick="setQueryParameter(\'revision\',' +
+ html += '<li><span class=link onclick="g_history.setQueryParameter(\'revision\',' +
revision + ')">Show results for WebKit r' + revision +
'</span></li>';
} else {
@@ -1235,17 +1197,17 @@ function showPopupForBuild(e, builder, index, opt_testName)
'</li>';
var chromeRevision = g_resultsByBuilder[builder].chromeRevision[index];
- if (chromeRevision && isLayoutTestResults()) {
- html += '<li><a href="' + TEST_RESULTS_BASE_PATH + g_builders[builder] +
+ if (chromeRevision && g_history.isLayoutTestResults()) {
+ html += '<li><a href="' + TEST_RESULTS_BASE_PATH + currentBuilders()[builder] +
'/' + chromeRevision + '/layout-test-results.zip">layout-test-results.zip</a></li>';
}
}
- if (!isLayoutTestResults() && opt_testName && isFailure(builder, opt_testName, index))
+ if (!g_history.isLayoutTestResults() && opt_testName && isFailure(builder, opt_testName, index))
html += '<li>' + linkHTMLToOpenWindow(buildBasePath + pathToFailureLog(opt_testName), 'Failure log') + '</li>';
html += '</ul>';
- showPopup(e.target, html);
+ ui.popup.show(e.target, html);
}
function htmlForTestResults(test)
@@ -1307,28 +1269,27 @@ function htmlForTestsWithExpectationsButNoFailures(builder)
var showUnexpectedPassesLink = linkHTMLToToggleState('showUnexpectedPasses', 'tests that have not failed in last ' + g_resultsByBuilder[builder].buildNumbers.length + ' runs');
var showSkippedLink = linkHTMLToToggleState('showSkipped', 'skipped tests in TestExpectations');
-
var html = '';
- if (tests.length || skippedPaths.length) {
+ if (g_history.isLayoutTestResults() && (tests.length || skippedPaths.length)) {
var buildInfo = platformAndBuildType(builder);
html += '<h2 style="display:inline-block">Expectations for ' + buildInfo.platform + '-' + buildInfo.buildType + '</h2> ';
- if (!g_currentState.showUnexpectedPasses && tests.length)
+ if (!g_history.dashboardSpecificState.showUnexpectedPasses && tests.length)
html += showUnexpectedPassesLink;
html += ' ';
- if (!g_currentState.showSkipped && skippedPaths.length)
+ if (!g_history.dashboardSpecificState.showSkipped && skippedPaths.length)
html += showSkippedLink;
}
var open = '<div onclick="selectContents(this)">';
- if (g_currentState.showUnexpectedPasses && tests.length) {
+ if (g_history.dashboardSpecificState.showUnexpectedPasses && tests.length) {
html += '<div id="passing-tests">' + showUnexpectedPassesLink;
for (var i = 0; i < tests.length; i++)
html += open + tests[i].test + '</div>';
html += '</div>';
}
- if (g_currentState.showSkipped && skippedPaths.length)
+ if (g_history.dashboardSpecificState.showSkipped && skippedPaths.length)
html += '<div id="skipped-tests">' + showSkippedLink + open + skippedPaths.join('</div>' + open) + '</div></div>';
return html + '<br>';
}
@@ -1336,19 +1297,23 @@ function htmlForTestsWithExpectationsButNoFailures(builder)
// Returns whether we should exclude test results from the test table.
function shouldHideTest(testResult)
{
+ // For non-layout tests, we always show everything.
+ if (!g_history.isLayoutTestResults())
+ return false;
+
if (testResult.isWontFixSkip)
- return !g_currentState.showWontFixSkip;
+ return !g_history.dashboardSpecificState.showWontFixSkip;
if (testResult.isFlaky)
- return !g_currentState.showFlaky;
+ return !g_history.dashboardSpecificState.showFlaky;
if (isSlowTest(testResult))
- return !g_currentState.showSlow;
+ return !g_history.dashboardSpecificState.showSlow;
if (testResult.meetsExpectations)
- return !g_currentState.showCorrectExpectations;
+ return !g_history.dashboardSpecificState.showCorrectExpectations;
- return !g_currentState.showWrongExpectations;
+ return !g_history.dashboardSpecificState.showWrongExpectations;
}
// Sets the browser's selection to the element's contents.
@@ -1372,7 +1337,7 @@ function createBugHTML(test)
function isCrossBuilderView()
{
- return g_currentState.tests || g_currentState.result || g_currentState.expectationsUpdate;
+ return g_history.dashboardSpecificState.tests || g_history.dashboardSpecificState.result || g_history.dashboardSpecificState.expectationsUpdate;
}
function tableHeaders(opt_getAll)
@@ -1384,7 +1349,7 @@ function tableHeaders(opt_getAll)
if (!isCrossBuilderView() || opt_getAll)
headers.push('test');
- if (isLayoutTestResults() || opt_getAll)
+ if (g_history.isLayoutTestResults() || opt_getAll)
headers.push('bugs', 'modifiers', 'expectations');
headers.push('slowest run', 'flakiness (numbers are runtimes in seconds)');
@@ -1405,23 +1370,23 @@ function htmlForSingleTestRow(test)
var html = '';
for (var i = 0; i < headers.length; i++) {
var header = headers[i];
- if (startsWith(header, 'test') || startsWith(header, 'builder')) {
+ if (string.startsWith(header, 'test') || string.startsWith(header, 'builder')) {
// If isCrossBuilderView() is true, we're just viewing a single test
// with results for many builders, so the first column is builder names
// instead of test paths.
var testCellClassName = 'test-link' + (isCrossBuilderView() ? ' builder-name' : '');
- var testCellHTML = isCrossBuilderView() ? test.builder : '<span class="link" onclick="setQueryParameter(\'tests\',\'' + test.test +'\');">' + test.test + '</span>';
+ var testCellHTML = isCrossBuilderView() ? test.builder : '<span class="link" onclick="g_history.setQueryParameter(\'tests\',\'' + test.test +'\');">' + test.test + '</span>';
html += '<tr><td class="' + testCellClassName + '">' + testCellHTML;
- } else if (startsWith(header, 'bugs'))
+ } else if (string.startsWith(header, 'bugs'))
html += '<td class=options-container>' + (test.bugs ? htmlForBugs(test.bugs) : createBugHTML(test));
- else if (startsWith(header, 'modifiers'))
+ else if (string.startsWith(header, 'modifiers'))
html += '<td class=options-container>' + test.modifiers;
- else if (startsWith(header, 'expectations'))
+ else if (string.startsWith(header, 'expectations'))
html += '<td class=options-container>' + test.expectations;
- else if (startsWith(header, 'slowest'))
+ else if (string.startsWith(header, 'slowest'))
html += '<td>' + (test.slowestTime ? test.slowestTime + 's' : '');
- else if (startsWith(header, 'flakiness'))
+ else if (string.startsWith(header, 'flakiness'))
html += htmlForTestResults(test);
}
return html;
@@ -1436,8 +1401,8 @@ function htmlForTableColumnHeader(headerName, opt_fillColSpan)
{
// Use the first word of the header title as the sortkey
var thisSortValue = sortColumnFromTableHeader(headerName);
- var arrowHTML = thisSortValue == g_currentState.sortColumn ?
- '<span class=' + g_currentState.sortOrder + '>' + (g_currentState.sortOrder == FORWARD ? '&uarr;' : '&darr;' ) + '</span>' : '';
+ var arrowHTML = thisSortValue == g_history.dashboardSpecificState.sortColumn ?
+ '<span class=' + g_history.dashboardSpecificState.sortOrder + '>' + (g_history.dashboardSpecificState.sortOrder == FORWARD ? '&uarr;' : '&darr;' ) + '</span>' : '';
return '<th sortValue=' + thisSortValue +
// Extend last th through all the rest of the columns.
(opt_fillColSpan ? ' colspan=10000' : '') +
@@ -1462,13 +1427,11 @@ function htmlForTestTable(rowsHTML, opt_excludeHeaders)
function appendHTML(html)
{
- var startTime = Date.now();
// InnerHTML to a div that's not in the document. This is
// ~300ms faster in Safari 4 and Chrome 4 on mac.
var div = document.createElement('div');
div.innerHTML = html;
document.body.appendChild(div);
- logTime('Time to innerHTML', startTime);
postHeightChangedMessage();
}
@@ -1515,12 +1478,12 @@ function changeSort(e)
var sort = 'sortColumn';
var orderKey = 'sortOrder';
- if (sortValue == g_currentState[sort] && g_currentState[orderKey] == FORWARD)
+ if (sortValue == g_history.dashboardSpecificState[sort] && g_history.dashboardSpecificState[orderKey] == FORWARD)
order = BACKWARD;
else
order = FORWARD;
- setQueryParameter(sort, sortValue, orderKey, order);
+ g_history.setQueryParameter(sort, sortValue, orderKey, order);
}
function sortTests(tests, column, order)
@@ -1575,37 +1538,15 @@ function realModifiers(modifierString)
{
var modifiers = modifierString.split(' ');;
return modifiers.filter(function(modifier) {
- if (modifier in BUILD_TYPES || startsWith(modifier, 'BUG'))
- return false;
-
- var matchesPlatformOrUnion = false;
- traversePlatformsTree(function(platform, platformName) {
- if (matchesPlatformOrUnion)
- return;
-
- if (platform.fallbackPlatforms) {
- platform.fallbackPlatforms.forEach(function(fallbackPlatform) {
- if (matchesPlatformOrUnion)
- return;
-
- var fallbackPlatformObject = platformObjectForName(fallbackPlatform);
- if (!fallbackPlatformObject.platformModifierUnions)
- return;
-
- matchesPlatformOrUnion = modifier in fallbackPlatformObject.subPlatforms || modifier in fallbackPlatformObject.platformModifierUnions;
- });
- }
- });
-
- return !matchesPlatformOrUnion;
+ return !(modifier in BUILD_TYPES || string.startsWith(modifier, 'BUG'));
}).join(' ');
}
function generatePageForExpectationsUpdate()
{
// Always show all runs when auto-updating expectations.
- if (!g_crossDashboardState.showAllRuns)
- setQueryParameter('showAllRuns', true);
+ if (!g_history.crossDashboardState.showAllRuns)
+ g_history.setQueryParameter('showAllRuns', true);
processTestRunsForAllBuilders();
var testsNeedingUpdate = {};
@@ -1626,7 +1567,7 @@ function generatePageForExpectationsUpdate()
}
}
- for (var builder in g_builders) {
+ for (var builder in currentBuilders()) {
var tests = g_perBuilderWithExpectationsButNoFailures[builder]
for (var i = 0; i < tests.length; i++) {
// Anything extra in this case is what is listed in expectations
@@ -1651,13 +1592,13 @@ function generatePageForExpectationsUpdate()
// @param {Array.<string>} keys Keys into the testNeedingUpdate object.
function showUpdateInfoForTest(testsNeedingUpdate, keys)
{
- var test = keys[g_currentState.updateIndex];
+ var test = keys[g_history.dashboardSpecificState.updateIndex];
document.body.innerHTML = '';
// FIXME: Make this DOM creation less verbose.
var index = document.createElement('div');
index.style.cssFloat = 'right';
- index.textContent = (g_currentState.updateIndex + 1) + ' of ' + keys.length + ' tests';
+ index.textContent = (g_history.dashboardSpecificState.updateIndex + 1) + ' of ' + keys.length + ' tests';
document.body.appendChild(index);
var buttonRegion = document.createElement('div');
@@ -1672,7 +1613,7 @@ function showUpdateInfoForTest(testsNeedingUpdate, keys)
previousBtn.value = 'previous';
previousBtn.addEventListener('click',
function() {
- setUpdateIndex(g_currentState.updateIndex - 1, testsNeedingUpdate, keys);
+ setUpdateIndex(g_history.dashboardSpecificState.updateIndex - 1, testsNeedingUpdate, keys);
},
false);
buttonRegion.appendChild(previousBtn);
@@ -1734,7 +1675,7 @@ function finishUpdate()
// @param {Array.<string>} keys Keys into the testNeedingUpdate object.
function handleUpdate(testsNeedingUpdate, keys)
{
- var test = keys[g_currentState.updateIndex];
+ var test = keys[g_history.dashboardSpecificState.updateIndex];
var updates = testsNeedingUpdate[test];
for (var builder in updates) {
// Add included tests, and delete excluded tests if
@@ -1758,7 +1699,7 @@ function handleUpdate(testsNeedingUpdate, keys)
// @param {Array.<string>} keys Keys into the testNeedingUpdate object.
function nextUpdate(testsNeedingUpdate, keys)
{
- setUpdateIndex(g_currentState.updateIndex + 1, testsNeedingUpdate, keys);
+ setUpdateIndex(g_history.dashboardSpecificState.updateIndex + 1, testsNeedingUpdate, keys);
}
@@ -1773,7 +1714,7 @@ function setUpdateIndex(newIndex, testsNeedingUpdate, keys)
newIndex = keys.length - 1;
else if (newIndex == keys.length)
newIndex = 0;
- setQueryParameter("updateIndex", newIndex);
+ g_history.setQueryParameter("updateIndex", newIndex);
showUpdateInfoForTest(testsNeedingUpdate, keys);
}
@@ -1793,7 +1734,7 @@ function htmlForIndividualTestOnAllBuilders(test)
}
var skippedBuilders = []
- for (builder in currentBuilderGroup().builders) {
+ for (builder in currentBuilders()) {
if (shownBuilders.indexOf(builder) == -1)
skippedBuilders.push(builder);
}
@@ -1818,12 +1759,12 @@ function htmlForIndividualTestOnAllBuildersWithResultsLinks(test)
html += '<div class=expectations test=' + test + '><div>' +
linkHTMLToToggleState('showExpectations', 'results')
- if (isLayoutTestResults() || isGPUTestResults()) {
- if (isLayoutTestResults())
+ if (g_history.isLayoutTestResults() || g_history.isGPUTestResults()) {
+ if (g_history.isLayoutTestResults())
html += ' | ' + linkHTMLToToggleState('showLargeExpectations', 'large thumbnails');
if (testResults && currentBuilderGroup().master().name == WEBKIT_BUILDER_MASTER) {
- var revision = g_currentState.revision || '';
- html += '<form onsubmit="setQueryParameter(\'revision\', revision.value);' +
+ var revision = g_history.dashboardSpecificState.revision || '';
+ html += '<form onsubmit="g_history.setQueryParameter(\'revision\', revision.value);' +
'return false;">Show results for WebKit revision: ' +
'<input name=revision placeholder="e.g. 65540" value="' + revision +
'" id=revision-input></form>';
@@ -1831,8 +1772,8 @@ function htmlForIndividualTestOnAllBuildersWithResultsLinks(test)
html += ' | <b>Only shows actual results/diffs from the most recent *failure* on each bot.</b>';
} else {
html += ' | <span>Results height:<input ' +
- 'onchange="setQueryParameter(\'resultsHeight\',this.value)" value="' +
- g_currentState.resultsHeight + '" style="width:2.5em">px</span>';
+ 'onchange="g_history.setQueryParameter(\'resultsHeight\',this.value)" value="' +
+ g_history.dashboardSpecificState.resultsHeight + '" style="width:2.5em">px</span>';
}
html += '</div></div>';
return html;
@@ -1922,21 +1863,21 @@ function addExpectationItem(expectationsContainers, parentContainer, platform, p
childContainer.appendChild(expectationsTitle(platformPart + suitePart, path, opt_builder));
childContainer.className = 'expectations-item';
item.className = 'expectation ' + fileExtension;
- if (g_currentState.showLargeExpectations)
+ if (g_history.dashboardSpecificState.showLargeExpectations)
item.className += ' large';
childContainer.appendChild(item);
handleFinishedLoadingExpectations(container);
};
var url = base + platformPart + path;
- if (isImage || !startsWith(base, 'http://svn.webkit.org')) {
+ if (isImage || !string.startsWith(base, 'http://svn.webkit.org')) {
var dummyNode = document.createElement(isImage ? 'img' : 'script');
dummyNode.src = url;
dummyNode.onload = function() {
var item;
if (isImage) {
item = dummyNode;
- if (startsWith(base, 'http://svn.webkit.org'))
+ if (string.startsWith(base, 'http://svn.webkit.org'))
maybeAddPngChecksum(item, url);
} else {
item = document.createElement('iframe');
@@ -2030,11 +1971,11 @@ function consolidateUsedPlatforms(container)
platforms['WIN'] = {};
platforms['LINUX'] = {};
allPlatforms.forEach(function(platform) {
- if (startsWith(platform, 'MAC'))
+ if (string.startsWith(platform, 'MAC'))
platforms['MAC'][platform] = 1;
- else if (startsWith(platform, 'WIN'))
+ else if (string.startsWith(platform, 'WIN'))
platforms['WIN'][platform] = 1;
- else if (startsWith(platform, 'LINUX'))
+ else if (string.startsWith(platform, 'LINUX'))
platforms['LINUX'][platform] = 1;
});
@@ -2048,7 +1989,7 @@ function consolidateUsedPlatforms(container)
var nodesToRemove = [];
for (var j = 0, usedPlatformsLength = usedPlatforms.length; j < usedPlatformsLength; j++) {
var usedPlatform = usedPlatforms[j];
- if (startsWith(usedPlatform.textContent, platform))
+ if (string.startsWith(usedPlatform.textContent, platform))
nodesToRemove.push(usedPlatform);
}
@@ -2077,11 +2018,11 @@ function expectationsTitle(platform, path, builder)
var innerHTML;
if (builder) {
var resultsType;
- if (endsWith(path, '-crash-log.txt'))
+ if (string.endsWith(path, '-crash-log.txt'))
resultsType = 'STACKTRACE';
- else if (endsWith(path, '-actual.txt') || endsWith(path, '-actual.png'))
+ else if (string.endsWith(path, '-actual.txt') || string.endsWith(path, '-actual.png'))
resultsType = 'ACTUAL RESULTS';
- else if (endsWith(path, '-wdiff.html'))
+ else if (string.endsWith(path, '-wdiff.html'))
resultsType = 'WDIFF';
else
resultsType = 'DIFF';
@@ -2103,12 +2044,12 @@ function expectationsTitle(platform, path, builder)
function loadExpectations(expectationsContainer)
{
var test = expectationsContainer.getAttribute('test');
- if (isLayoutTestResults())
+ if (g_history.isLayoutTestResults())
loadExpectationsLayoutTests(test, expectationsContainer);
else {
var results = g_testToResultsMap[test];
for (var i = 0; i < results.length; i++)
- if (isGPUTestResults())
+ if (g_history.isGPUTestResults())
loadGPUResultsForBuilder(results[i].builder, test, expectationsContainer);
else
loadNonWebKitResultsForBuilder(results[i].builder, test, expectationsContainer);
@@ -2168,7 +2109,7 @@ function appendNonWebKitResults(container, url, itemClassName, opt_title)
var item = document.createElement('iframe');
item.src = dummyNode.src;
item.className = itemClassName;
- item.style.height = g_currentState.resultsHeight + 'px';
+ item.style.height = g_history.dashboardSpecificState.resultsHeight + 'px';
if (opt_title) {
var childContainer = document.createElement('div');
@@ -2255,9 +2196,9 @@ function loadExpectationsLayoutTests(test, expectationsContainer)
var revisionContainer = document.createElement('div');
revisionContainer.textContent = "Showing results for: "
expectationsContainer.appendChild(revisionContainer);
- for (var builder in g_builders) {
+ for (var builder in currentBuilders()) {
if (builderMaster(builder).name == WEBKIT_BUILDER_MASTER) {
- var latestRevision = g_currentState.revision || g_resultsByBuilder[builder].webkitRevision[0];
+ var latestRevision = g_history.dashboardSpecificState.revision || g_resultsByBuilder[builder].webkitRevision[0];
var buildInfo = buildInfoForRevision(builder, latestRevision);
var revisionInfo = document.createElement('div');
revisionInfo.style.cssText = 'background:lightgray;margin:0 3px;padding:0 2px;display:inline-block;';
@@ -2272,15 +2213,15 @@ function loadExpectationsLayoutTests(test, expectationsContainer)
var testWithoutSuffix = test.substring(0, test.lastIndexOf('.'));
var actualResultSuffixes = ['-actual.txt', '-actual.png', '-crash-log.txt', '-diff.txt', '-wdiff.html', '-diff.png'];
- for (var builder in g_builders) {
+ for (var builder in currentBuilders()) {
var actualResultsBase;
if (builderMaster(builder).name == WEBKIT_BUILDER_MASTER) {
- var latestRevision = g_currentState.revision || g_resultsByBuilder[builder].webkitRevision[0];
+ var latestRevision = g_history.dashboardSpecificState.revision || g_resultsByBuilder[builder].webkitRevision[0];
var buildInfo = buildInfoForRevision(builder, latestRevision);
actualResultsBase = 'http://build.webkit.org/results/' + builder +
'/r' + buildInfo.revisionStart + ' (' + buildInfo.buildNumber + ')/';
} else
- actualResultsBase = TEST_RESULTS_BASE_PATH + g_builders[builder] + '/results/layout-test-results/';
+ actualResultsBase = TEST_RESULTS_BASE_PATH + currentBuilders()[builder] + '/results/layout-test-results/';
for (var i = 0; i < actualResultSuffixes.length; i++) {
addExpectationItem(expectationsContainers, expectationsContainer, null,
@@ -2324,7 +2265,7 @@ function allFallbacks()
function appendExpectations()
{
- var expectations = g_currentState.showExpectations ? document.getElementsByClassName('expectations') : [];
+ var expectations = g_history.dashboardSpecificState.showExpectations ? document.getElementsByClassName('expectations') : [];
// Loading expectations is *very* slow. Use a large timeout to avoid
// totally hanging the renderer.
performChunkedAction(expectations, function(chunk) {
@@ -2346,13 +2287,13 @@ function hideLoadingUI()
function generatePageForIndividualTests(tests)
{
console.log('Number of tests: ' + tests.length);
- if (g_currentState.showChrome)
+ if (g_history.dashboardSpecificState.showChrome)
appendHTML(htmlForNavBar());
performChunkedAction(tests, function(chunk) {
appendHTML(htmlForIndividualTests(chunk));
}, appendExpectations, 500);
- if (g_currentState.showChrome)
- $('tests-input').value = g_currentState.tests;
+ if (g_history.dashboardSpecificState.showChrome)
+ $('tests-input').value = g_history.dashboardSpecificState.tests;
}
function performChunkedAction(tests, handleChunk, onComplete, timeout, opt_index) {
@@ -2374,8 +2315,8 @@ function htmlForIndividualTests(tests)
for (var i = 0; i < tests.length; i++) {
var test = tests[i];
var testNameHtml = '';
- if (g_currentState.showChrome || tests.length > 1) {
- if (isLayoutTestResults()) {
+ if (g_history.dashboardSpecificState.showChrome || tests.length > 1) {
+ if (g_history.isLayoutTestResults()) {
var suite = lookupVirtualTestSuite(test);
var base = suite ? baseTest(test, suite) : test;
var tracURL = TEST_URL_BASE_PATH_TRAC + base;
@@ -2392,13 +2333,13 @@ function htmlForIndividualTests(tests)
function htmlForNavBar()
{
var extraHTML = '';
- var html = htmlForTestTypeSwitcher(false, extraHTML, isCrossBuilderView());
+ var html = ui.html.testTypeSwitcher(false, extraHTML, isCrossBuilderView());
html += '<div class=forms><form id=result-form ' +
- 'onsubmit="setQueryParameter(\'result\', result.value);' +
+ 'onsubmit="g_history.setQueryParameter(\'result\', result.value);' +
'return false;">Show all tests with result: ' +
'<input name=result placeholder="e.g. CRASH" id=result-input>' +
'</form><form id=tests-form ' +
- 'onsubmit="setQueryParameter(\'tests\', tests.value);' +
+ 'onsubmit="g_history.setQueryParameter(\'tests\', tests.value);' +
'return false;"><span>Show tests on all platforms: </span>' +
'<input name=tests ' +
'placeholder="Comma or space-separated list of tests or partial ' +
@@ -2410,14 +2351,14 @@ function htmlForNavBar()
function checkBoxToToggleState(key, text)
{
- var stateEnabled = g_currentState[key];
- return '<label><input type=checkbox ' + (stateEnabled ? 'checked ' : '') + 'onclick="setQueryParameter(\'' + key + '\', ' + !stateEnabled + ')">' + text + '</label> ';
+ var stateEnabled = g_history.dashboardSpecificState[key];
+ return '<label><input type=checkbox ' + (stateEnabled ? 'checked ' : '') + 'onclick="g_history.setQueryParameter(\'' + key + '\', ' + !stateEnabled + ')">' + text + '</label> ';
}
function linkHTMLToToggleState(key, linkText)
{
- var stateEnabled = g_currentState[key];
- return '<span class=link onclick="setQueryParameter(\'' + key + '\', ' + !stateEnabled + ')">' + (stateEnabled ? 'Hide' : 'Show') + ' ' + linkText + '</span>';
+ var stateEnabled = g_history.dashboardSpecificState[key];
+ return '<span class=link onclick="g_history.setQueryParameter(\'' + key + '\', ' + !stateEnabled + ')">' + (stateEnabled ? 'Hide' : 'Show') + ' ' + linkText + '</span>';
}
function headerForTestTableHtml()
@@ -2435,7 +2376,7 @@ function generatePageForBuilder(builderName)
processTestRunsForBuilder(builderName);
var results = g_perBuilderFailures[builderName];
- sortTests(results, g_currentState.sortColumn, g_currentState.sortOrder);
+ sortTests(results, g_history.dashboardSpecificState.sortColumn, g_history.dashboardSpecificState.sortOrder);
var testsHTML = '';
if (results.length) {
@@ -2445,7 +2386,7 @@ function generatePageForBuilder(builderName)
testsHTML = htmlForTestTable(tableRowsHTML);
} else {
testsHTML = '<div>No tests found. ';
- if (isLayoutTestResults())
+ if (g_history.isLayoutTestResults())
testsHTML += 'Try showing tests with correct expectations.</div>';
else
testsHTML += 'This means no tests have failed!</div>';
@@ -2453,7 +2394,7 @@ function generatePageForBuilder(builderName)
var html = htmlForNavBar();
- if (isLayoutTestResults())
+ if (g_history.isLayoutTestResults())
html += htmlForTestsWithExpectationsButNoFailures(builderName) + headerForTestTableHtml();
html += '<br>' + testsHTML;
@@ -2481,37 +2422,7 @@ var VALID_KEYS_FOR_CROSS_BUILDER_VIEW = {
function isInvalidKeyForCrossBuilderView(key)
{
- return !(key in VALID_KEYS_FOR_CROSS_BUILDER_VIEW) && !(key in g_defaultCrossDashboardStateValues);
-}
-
-function updateDefaultBuilderState()
-{
- if (isCrossBuilderView())
- delete g_defaultDashboardSpecificStateValues.builder;
- else
- g_defaultDashboardSpecificStateValues.builder = g_defaultBuilderName;
-}
-
-// Sets the page state to regenerate the page.
-// @param {Object} params New or modified query parameters as key: value.
-function handleQueryParameterChange(params)
-{
- for (key in params) {
- if (key == 'tests') {
- // Entering cross-builder view, only keep valid keys for that view.
- for (var currentKey in g_currentState) {
- if (isInvalidKeyForCrossBuilderView(currentKey)) {
- delete g_currentState[currentKey];
- }
- }
- } else if (isInvalidKeyForCrossBuilderView(key)) {
- delete g_currentState.tests;
- delete g_currentState.result;
- }
- }
-
- updateDefaultBuilderState();
- return true;
+ return !(key in VALID_KEYS_FOR_CROSS_BUILDER_VIEW) && !(key in history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES);
}
function hideLegend()
@@ -2529,11 +2440,6 @@ g_fallbacksMap['MAC-LION'] = ['chromium-mac', 'chromium'];
g_fallbacksMap['LINUX-32'] = ['chromium-linux-x86', 'chromium-linux', 'chromium-win', 'chromium'];
g_fallbacksMap['LINUX-64'] = ['chromium-linux', 'chromium-win', 'chromium'];
-function htmlForFallbackHelp(fallbacks)
-{
- return '<ol class=fallback-list><li>' + fallbacks.join('</li><li>') + '</li></ol>';
-}
-
function showLegend()
{
var legend = $('legend');
@@ -2549,18 +2455,11 @@ function showLegend()
html += '<div class=' + expectation + '>' + expectationsMap()[expectation] + '</div>';
html += '<div class=merge>WEBKIT MERGE</div>';
- if (isLayoutTestResults()) {
- html += '</div><br style="clear:both">' +
- '</div><h3>Test expectatons fallback order.</h3>';
-
- for (var platform in g_fallbacksMap)
- html += '<div class=fallback-header>' + platform + '</div>' + htmlForFallbackHelp(g_fallbacksMap[platform]);
-
- html += '<div>TIMES:</div>' +
+ if (g_history.isLayoutTestResults())
+ html += '</div><br style="clear:both"><div>TIMES:</div>' +
htmlForSlowTimes(MIN_SECONDS_FOR_SLOW_TEST) +
'<div>DEBUG TIMES:</div>' +
htmlForSlowTimes(MIN_SECONDS_FOR_SLOW_TEST_DEBUG);
- }
legend.innerHTML = html;
}
@@ -2592,7 +2491,7 @@ function postHeightChangedMessage()
}
if (window != parent)
- window.addEventListener('blur', hidePopup);
+ window.addEventListener('blur', ui.popup.hide);
document.addEventListener('keydown', function(e) {
if (e.keyIdentifier == 'U+003F' || e.keyIdentifier == 'U+00BF') {
@@ -2602,6 +2501,11 @@ document.addEventListener('keydown', function(e) {
} else if (e.keyIdentifier == 'U+001B') {
// escape key
hideLegend();
- hidePopup();
+ ui.popup.hide();
}
}, false);
+
+window.addEventListener('load', function() {
+ resourceLoader = new loader.Loader();
+ resourceLoader.load();
+}, false);
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_embedded_unittests.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_embedded_unittests.js
index 5599b3e65..039467a85 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_embedded_unittests.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_embedded_unittests.js
@@ -27,7 +27,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
test('hidePopupOnBlur', 2, function() {
- showPopup(document.body, 'dummy content');
+ ui.popup.show(document.body, 'dummy content');
ok(document.querySelector('#popup'));
// Cause the window to be blurred.
diff --git a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
index ac264b407..b008adf95 100644
--- a/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
+++ b/Tools/TestResultServer/static-dashboards/flakiness_dashboard_unittests.js
@@ -26,45 +26,52 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// FIXME(jparent): Rename this once it isn't globals.
function resetGlobals()
{
allExpectations = null;
allTests = null;
g_expectationsByPlatform = {};
g_resultsByBuilder = {};
- g_builders = {};
g_allExpectations = null;
g_allTestsTrie = null;
- g_currentState = {};
- g_crossDashboardState = {};
+ var historyInstance = new history.History(flakinessConfig);
+ // FIXME(jparent): Remove this once global isn't used.
+ g_history = historyInstance;
g_testToResultsMap = {};
- for (var key in g_defaultCrossDashboardStateValues)
- g_crossDashboardState[key] = g_defaultCrossDashboardStateValues[key];
+ for (var key in history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES)
+ historyInstance.crossDashboardState[key] = history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES[key];
LOAD_BUILDBOT_DATA([{
- name: 'ChromiumWebkit',
- url: 'dummyurl',
- tests: {'layout-tests': {'builders': ['WebKit Linux', 'WebKit Linux (dbg)', 'WebKit Mac10.7', 'WebKit Win']}}
- },
- {
name: 'webkit.org',
url: 'dummyurl',
- tests: {'layout-tests': {'builders': ['Apple SnowLeopard Tests', 'Qt Linux Tests', 'Chromium Mac10.7 Tests', 'GTK Win']}}
+ tests: {'layout-tests': {'builders': ['Apple Lion Release WK2 (Tests)', 'Apple Lion Debug WK2 (Tests)', 'GTK Linux 64-bit Release', 'Qt Linux Tests']}}
}]);
+
for (var group in LAYOUT_TESTS_BUILDER_GROUPS)
LAYOUT_TESTS_BUILDER_GROUPS[group] = null;
+
+ return historyInstance;
}
-function runExpectationsTest(builder, test, expectations, modifiers)
+function stubResultsByBuilder(data)
{
- g_builders[builder] = true;
+ for (var builder in currentBuilders())
+ {
+ g_resultsByBuilder[builder] = data[builder] || {'tests': []};
+ };
+}
+function runExpectationsTest(builder, test, expectations, modifiers)
+{
// Put in some dummy results. processExpectations expects the test to be
// there.
var tests = {};
tests[test] = {'results': [[100, 'F']], 'times': [[100, 0]]};
- g_resultsByBuilder[builder] = {'tests': tests};
+ var results = {};
+ results[builder] = {'tests': tests};
+ stubResultsByBuilder(results);
processExpectations();
var resultsForTest = createResultsObjectForTest(test, builder);
@@ -75,76 +82,67 @@ function runExpectationsTest(builder, test, expectations, modifiers)
equal(resultsForTest.modifiers, modifiers, message);
}
-test('flattenTrie', 1, function() {
- resetGlobals();
- var tests = {
- 'bar.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
- 'foo': {
- 'bar': {
- 'baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
- }
- }
- };
- var expectedFlattenedTests = {
- 'bar.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
- 'foo/bar/baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
- };
- equal(JSON.stringify(flattenTrie(tests)), JSON.stringify(expectedFlattenedTests))
-});
-
test('releaseFail', 2, function() {
resetGlobals();
- var builder = 'WebKit Win';
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
+ var builder = 'Apple Lion Release WK2 (Tests)';
var test = 'foo/1.html';
var expectationsArray = [
{'modifiers': 'RELEASE', 'expectations': 'FAIL'}
];
- g_expectationsByPlatform['CHROMIUM'] = getParsedExpectations('[ Release ] ' + test + ' [ Failure ]');
+ g_expectationsByPlatform['APPLE_MAC_LION_WK2'] = getParsedExpectations('[ Release ] ' + test + ' [ Failure ]');
runExpectationsTest(builder, test, 'FAIL', 'RELEASE');
});
test('releaseFailDebugCrashReleaseBuilder', 2, function() {
resetGlobals();
- var builder = 'WebKit Win';
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
+ var builder = 'Apple Lion Release WK2 (Tests)';
var test = 'foo/1.html';
var expectationsArray = [
{'modifiers': 'RELEASE', 'expectations': 'FAIL'},
{'modifiers': 'DEBUG', 'expectations': 'CRASH'}
];
- g_expectationsByPlatform['CHROMIUM'] = getParsedExpectations('[ Release ] ' + test + ' [ Failure ]\n' +
+ g_expectationsByPlatform['APPLE_MAC_LION_WK2'] = getParsedExpectations('[ Release ] ' + test + ' [ Failure ]\n' +
'[ Debug ] ' + test + ' [ Crash ]');
runExpectationsTest(builder, test, 'FAIL', 'RELEASE');
});
test('releaseFailDebugCrashDebugBuilder', 2, function() {
resetGlobals();
- var builder = 'WebKit Win (dbg)';
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
+ var builder = 'Apple Lion Debug WK2 (Tests)';
var test = 'foo/1.html';
var expectationsArray = [
{'modifiers': 'RELEASE', 'expectations': 'FAIL'},
{'modifiers': 'DEBUG', 'expectations': 'CRASH'}
];
- g_expectationsByPlatform['CHROMIUM'] = getParsedExpectations('[ Release ] ' + test + ' [ Failure ]\n' +
+ g_expectationsByPlatform['APPLE_MAC_LION_WK2'] = getParsedExpectations('[ Release ] ' + test + ' [ Failure ]\n' +
'[ Debug ] ' + test + ' [ Crash ]');
runExpectationsTest(builder, test, 'CRASH', 'DEBUG');
});
-test('overrideJustBuildType', 12, function() {
+test('overrideJustBuildType', 4, function() {
resetGlobals();
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
var test = 'bar/1.html';
- g_expectationsByPlatform['CHROMIUM'] = getParsedExpectations('bar [ WontFix Failure Pass Timeout ]\n' +
- '[ Mac ] ' + test + ' [ WontFix Failure ]\n' +
- '[ Linux Debug ] ' + test + ' [ Crash ]');
-
- runExpectationsTest('WebKit Win', test, 'FAIL PASS TIMEOUT', 'WONTFIX');
- runExpectationsTest('WebKit Win (dbg)(3)', test, 'FAIL PASS TIMEOUT', 'WONTFIX');
- runExpectationsTest('WebKit Linux', test, 'FAIL PASS TIMEOUT', 'WONTFIX');
- runExpectationsTest('WebKit Linux (dbg)(3)', test, 'CRASH', 'LINUX DEBUG');
- runExpectationsTest('WebKit Mac10.7', test, 'FAIL', 'MAC WONTFIX');
- runExpectationsTest('WebKit Mac10.7 (dbg)(3)', test, 'FAIL', 'MAC WONTFIX');
+ g_expectationsByPlatform['APPLE_MAC_LION_WK2'] = getParsedExpectations('bar [ WontFix Failure Pass Timeout ]\n' +
+ '[ Release ] ' + test + ' [ WontFix Failure ]\n' +
+ '[ Debug ] ' + test + ' [ Crash ]');
+
+ runExpectationsTest('Apple Lion Release WK2 (Tests)', test, 'FAIL', 'RELEASE WONTFIX');
+ runExpectationsTest('Apple Lion Debug WK2 (Tests)', test, 'CRASH', 'DEBUG');
});
-test('platformAndBuildType', 78, function() {
+test('platformAndBuildType', 30, function() {
+ var historyInstance = new history.History(flakinessConfig);
+ // FIXME(jparent): Change to use the flakiness_db's history object
+ // once it exists, rather than tracking global.
+ g_history = historyInstance;
+
var runPlatformAndBuildTypeTest = function(builder, expectedPlatform, expectedBuildType) {
g_perBuilderPlatformAndBuildType = {};
buildInfo = platformAndBuildType(builder);
@@ -152,40 +150,12 @@ test('platformAndBuildType', 78, function() {
equal(buildInfo.platform, expectedPlatform, message);
equal(buildInfo.buildType, expectedBuildType, message);
}
- runPlatformAndBuildTypeTest('WebKit Win (deps)', 'CHROMIUM_XP', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Win (deps)(dbg)(1)', 'CHROMIUM_XP', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Win (deps)(dbg)(2)', 'CHROMIUM_XP', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Linux (deps)', 'CHROMIUM_LUCID', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Linux (deps)(dbg)(1)', 'CHROMIUM_LUCID', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Linux (deps)(dbg)(2)', 'CHROMIUM_LUCID', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Mac10.6 (deps)', 'CHROMIUM_SNOWLEOPARD', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Mac10.6 (deps)(dbg)(1)', 'CHROMIUM_SNOWLEOPARD', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Mac10.6 (deps)(dbg)(2)', 'CHROMIUM_SNOWLEOPARD', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Win', 'CHROMIUM_XP', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Win7', 'CHROMIUM_WIN7', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Win (dbg)(1)', 'CHROMIUM_XP', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Win (dbg)(2)', 'CHROMIUM_XP', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Linux', 'CHROMIUM_LUCID', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Linux 32', 'CHROMIUM_LUCID', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Linux (dbg)(1)', 'CHROMIUM_LUCID', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Linux (dbg)(2)', 'CHROMIUM_LUCID', 'DEBUG');
- runPlatformAndBuildTypeTest('WebKit Mac10.6', 'CHROMIUM_SNOWLEOPARD', 'RELEASE');
- runPlatformAndBuildTypeTest('WebKit Mac10.6 (dbg)', 'CHROMIUM_SNOWLEOPARD', 'DEBUG');
- runPlatformAndBuildTypeTest('XP Tests', 'CHROMIUM_XP', 'RELEASE');
- runPlatformAndBuildTypeTest('Interactive Tests (dbg)', 'CHROMIUM_XP', 'DEBUG');
-
- g_crossDashboardState.group = '@ToT - webkit.org';
- g_crossDashboardState.testType = 'layout-tests';
- runPlatformAndBuildTypeTest('Chromium Win Release (Tests)', 'CHROMIUM_XP', 'RELEASE');
- runPlatformAndBuildTypeTest('Chromium Linux Release (Tests)', 'CHROMIUM_LUCID', 'RELEASE');
- runPlatformAndBuildTypeTest('Chromium Mac Release (Tests)', 'CHROMIUM_SNOWLEOPARD', 'RELEASE');
-
// FIXME: These platforms should match whatever we use in the TestExpectations format.
runPlatformAndBuildTypeTest('Lion Release (Tests)', 'APPLE_MAC_LION_WK1', 'RELEASE');
runPlatformAndBuildTypeTest('Lion Debug (Tests)', 'APPLE_MAC_LION_WK1', 'DEBUG');
- runPlatformAndBuildTypeTest('SnowLeopard Intel Release (Tests)', 'APPLE_MAC_SNOWLEOPARD_WK1', 'RELEASE');
- runPlatformAndBuildTypeTest('SnowLeopard Intel Leaks', 'APPLE_MAC_SNOWLEOPARD_WK1', 'RELEASE');
- runPlatformAndBuildTypeTest('SnowLeopard Intel Debug (Tests)', 'APPLE_MAC_SNOWLEOPARD_WK1', 'DEBUG');
+ runPlatformAndBuildTypeTest('MountainLion Release (Tests)', 'APPLE_MAC_MOUNTAINLION_WK1', 'RELEASE');
+ runPlatformAndBuildTypeTest('MountainLion Leaks', 'APPLE_MAC_MOUNTAINLION_WK1', 'RELEASE');
+ runPlatformAndBuildTypeTest('MountainLion Debug (Tests)', 'APPLE_MAC_MOUNTAINLION_WK1', 'DEBUG');
runPlatformAndBuildTypeTest('GTK Linux 32-bit Release', 'GTK_LINUX_WK1', 'RELEASE');
runPlatformAndBuildTypeTest('GTK Linux 32-bit Debug', 'GTK_LINUX_WK1', 'DEBUG');
runPlatformAndBuildTypeTest('GTK Linux 64-bit Debug', 'GTK_LINUX_WK1', 'DEBUG');
@@ -195,21 +165,20 @@ test('platformAndBuildType', 78, function() {
runPlatformAndBuildTypeTest('Windows XP Debug (Tests)', 'APPLE_WIN_XP', 'DEBUG');
// FIXME: Should WebKit2 be it's own platform?
- runPlatformAndBuildTypeTest('SnowLeopard Intel Release (WebKit2 Tests)', 'APPLE_MAC_SNOWLEOPARD_WK2', 'RELEASE');
- runPlatformAndBuildTypeTest('SnowLeopard Intel Debug (WebKit2 Tests)', 'APPLE_MAC_SNOWLEOPARD_WK2', 'DEBUG');
+ runPlatformAndBuildTypeTest('MountainLion Release (WebKit2 Tests)', 'APPLE_MAC_MOUNTAINLION_WK2', 'RELEASE');
+ runPlatformAndBuildTypeTest('MountainLion Debug (WebKit2 Tests)', 'APPLE_MAC_MOUNTAINLION_WK2', 'DEBUG');
runPlatformAndBuildTypeTest('Windows 7 Release (WebKit2 Tests)', 'APPLE_WIN_WIN7', 'RELEASE');
});
test('realModifiers', 3, function() {
- equal(realModifiers('BUG(Foo) LINUX LION WIN DEBUG SLOW'), 'SLOW');
- equal(realModifiers('BUG(Foo) LUCID MAC XP RELEASE SKIP'), 'SKIP');
+ equal(realModifiers('BUG(Foo) DEBUG SLOW'), 'SLOW');
+ equal(realModifiers('BUG(Foo) RELEASE'), '');
equal(realModifiers('BUG(Foo)'), '');
});
test('allTestsWithSamePlatformAndBuildType', 1, function() {
// FIXME: test that allTestsWithSamePlatformAndBuildType actually returns the right set of tests.
- var expectedPlatformsList = ['CHROMIUM_LION', 'CHROMIUM_SNOWLEOPARD', 'CHROMIUM_XP', 'CHROMIUM_VISTA', 'CHROMIUM_WIN7', 'CHROMIUM_LUCID',
- 'CHROMIUM_ANDROID', 'APPLE_MAC_LION_WK1', 'APPLE_MAC_LION_WK2', 'APPLE_MAC_SNOWLEOPARD_WK1', 'APPLE_MAC_SNOWLEOPARD_WK2',
+ var expectedPlatformsList = ['APPLE_MAC_LION_WK1', 'APPLE_MAC_LION_WK2', 'APPLE_MAC_MOUNTAINLION_WK1', 'APPLE_MAC_MOUNTAINLION_WK2',
'APPLE_WIN_XP', 'APPLE_WIN_WIN7', 'GTK_LINUX_WK1', 'GTK_LINUX_WK2', 'QT_LINUX', 'EFL_LINUX_WK1', 'EFL_LINUX_WK2'];
var actualPlatformsList = Object.keys(g_allTestsByPlatformAndBuildType);
deepEqual(expectedPlatformsList, actualPlatformsList);
@@ -225,11 +194,12 @@ test('filterBugs',4, function() {
equal(filtered.bugs, '');
});
-test('getExpectations', 16, function() {
+test('getExpectations', 14, function() {
resetGlobals();
- g_builders['WebKit Win'] = true;
- g_resultsByBuilder = {
- 'WebKit Win': {
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
+ stubResultsByBuilder({
+ 'Apple Lion Release WK2 (Tests)' : {
'tests': {
'foo/test1.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
'foo/test2.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
@@ -237,16 +207,15 @@ test('getExpectations', 16, function() {
'test1.html': {'results': [[100, 'F']], 'times': [[100, 0]]}
}
}
- }
+ });
- g_expectationsByPlatform['CHROMIUM'] = getParsedExpectations('Bug(123) foo [ Failure Pass Crash ]\n' +
+ g_expectationsByPlatform['APPLE_MAC_LION_WK2'] = getParsedExpectations('Bug(123) foo [ Failure Pass Crash ]\n' +
'Bug(Foo) [ Release ] foo/test1.html [ Failure ]\n' +
'[ Debug ] foo/test1.html [ Crash ]\n' +
'Bug(456) foo/test2.html [ Failure ]\n' +
- '[ Linux Debug ] foo/test2.html [ Crash ]\n' +
+ '[ Debug ] foo/test2.html [ Crash ]\n' +
'[ Release ] test1.html [ Failure ]\n' +
'[ Debug ] test1.html [ Crash ]\n');
- g_expectationsByPlatform['CHROMIUM_ANDROID'] = getParsedExpectations('Bug(654) foo/test2.html [ Crash ]\n');
g_expectationsByPlatform['GTK'] = getParsedExpectations('Bug(42) foo/test2.html [ ImageOnlyFailure ]\n' +
'[ Debug ] test1.html [ Crash ]\n');
@@ -256,34 +225,28 @@ test('getExpectations', 16, function() {
processExpectations();
- var expectations = getExpectations('foo/test1.html', 'CHROMIUM_XP', 'DEBUG');
+ var expectations = getExpectations('foo/test1.html', 'APPLE_MAC_LION_WK2', 'DEBUG');
equal(JSON.stringify(expectations), '{"modifiers":"DEBUG","expectations":"CRASH"}');
- var expectations = getExpectations('foo/test1.html', 'CHROMIUM_LUCID', 'RELEASE');
+ var expectations = getExpectations('foo/test1.html', 'APPLE_MAC_LION_WK2', 'RELEASE');
equal(JSON.stringify(expectations), '{"modifiers":"Bug(Foo) RELEASE","expectations":"FAIL"}');
- var expectations = getExpectations('foo/test2.html', 'CHROMIUM_LUCID', 'RELEASE');
+ var expectations = getExpectations('foo/test2.html', 'APPLE_MAC_LION_WK2', 'RELEASE');
equal(JSON.stringify(expectations), '{"modifiers":"Bug(456)","expectations":"FAIL"}');
- var expectations = getExpectations('foo/test2.html', 'CHROMIUM_LION', 'DEBUG');
- equal(JSON.stringify(expectations), '{"modifiers":"Bug(456)","expectations":"FAIL"}');
-
- var expectations = getExpectations('foo/test2.html', 'CHROMIUM_LUCID', 'DEBUG');
- equal(JSON.stringify(expectations), '{"modifiers":"LINUX DEBUG","expectations":"CRASH"}');
-
- var expectations = getExpectations('foo/test2.html', 'CHROMIUM_ANDROID', 'RELEASE');
- equal(JSON.stringify(expectations), '{"modifiers":"Bug(654)","expectations":"CRASH"}');
+ var expectations = getExpectations('foo/test2.html', 'APPLE_MAC_LION_WK2', 'DEBUG');
+ equal(JSON.stringify(expectations), '{"modifiers":"DEBUG","expectations":"CRASH"}');
- var expectations = getExpectations('test1.html', 'CHROMIUM_ANDROID', 'RELEASE');
+ var expectations = getExpectations('test1.html', 'APPLE_MAC_LION_WK2', 'RELEASE');
equal(JSON.stringify(expectations), '{"modifiers":"RELEASE","expectations":"FAIL"}');
- var expectations = getExpectations('foo/test3.html', 'CHROMIUM_LUCID', 'DEBUG');
+ var expectations = getExpectations('foo/test3.html', 'APPLE_MAC_LION_WK2', 'DEBUG');
equal(JSON.stringify(expectations), '{"modifiers":"Bug(123)","expectations":"FAIL PASS CRASH"}');
- var expectations = getExpectations('test1.html', 'CHROMIUM_XP', 'DEBUG');
+ var expectations = getExpectations('test1.html', 'APPLE_MAC_LION_WK2', 'DEBUG');
equal(JSON.stringify(expectations), '{"modifiers":"DEBUG","expectations":"CRASH"}');
- var expectations = getExpectations('test1.html', 'CHROMIUM_LUCID', 'RELEASE');
+ var expectations = getExpectations('test1.html', 'APPLE_MAC_LION_WK2', 'RELEASE');
equal(JSON.stringify(expectations), '{"modifiers":"RELEASE","expectations":"FAIL"}');
var expectations = getExpectations('foo/test1.html', 'GTK_LINUX_WK1', 'RELEASE');
@@ -306,34 +269,41 @@ test('getExpectations', 16, function() {
});
test('substringList', 2, function() {
- g_crossDashboardState.testType = 'gtest';
- g_currentState.tests = 'test.FLAKY_foo test.FAILS_foo1 test.DISABLED_foo2 test.MAYBE_foo3 test.foo4';
+ var historyInstance = new history.History(flakinessConfig);
+ // FIXME(jparent): Remove this once global isn't used.
+ g_history = historyInstance;
+ historyInstance.crossDashboardState.testType = 'gtest';
+ historyInstance.dashboardSpecificState.tests = 'test.FLAKY_foo test.FAILS_foo1 test.DISABLED_foo2 test.MAYBE_foo3 test.foo4';
equal(substringList().toString(), 'test.foo,test.foo1,test.foo2,test.foo3,test.foo4');
- g_crossDashboardState.testType = 'layout-tests';
- g_currentState.tests = 'foo/bar.FLAKY_foo.html';
+ historyInstance.crossDashboardState.testType = 'layout-tests';
+ historyInstance.dashboardSpecificState.tests = 'foo/bar.FLAKY_foo.html';
equal(substringList().toString(), 'foo/bar.FLAKY_foo.html');
});
test('htmlForTestsWithExpectationsButNoFailures', 4, function() {
- var builder = 'WebKit Win';
+ var historyInstance = new history.History(defaultDashboardSpecificStateValues, generatePage, handleValidHashParameter);
+ // FIXME(jparent): Remove this once global isn't used.
+ g_history = historyInstance;
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+ var builder = 'Apple Lion Release WK2 (Tests)';
g_perBuilderWithExpectationsButNoFailures[builder] = ['passing-test1.html', 'passing-test2.html'];
g_perBuilderSkippedPaths[builder] = ['skipped-test1.html'];
g_resultsByBuilder[builder] = { buildNumbers: [5, 4, 3, 1] };
- g_currentState.showUnexpectedPasses = true;
- g_currentState.showSkipped = true;
+ historyInstance.dashboardSpecificState.showUnexpectedPasses = true;
+ historyInstance.dashboardSpecificState.showSkipped = true;
- g_crossDashboardState.group = '@ToT - chromium.org';
- g_crossDashboardState.testType = 'layout-tests';
+ historyInstance.crossDashboardState.group = '@ToT - webkit.org';
+ historyInstance.crossDashboardState.testType = 'layout-tests';
var container = document.createElement('div');
container.innerHTML = htmlForTestsWithExpectationsButNoFailures(builder);
equal(container.querySelectorAll('#passing-tests > div').length, 2);
equal(container.querySelectorAll('#skipped-tests > div').length, 1);
- g_currentState.showUnexpectedPasses = false;
- g_currentState.showSkipped = false;
+ historyInstance.dashboardSpecificState.showUnexpectedPasses = false;
+ historyInstance.dashboardSpecificState.showSkipped = false;
var container = document.createElement('div');
container.innerHTML = htmlForTestsWithExpectationsButNoFailures(builder);
@@ -348,78 +318,53 @@ test('headerForTestTableHtml', 1, function() {
});
test('htmlForTestTypeSwitcherGroup', 6, function() {
+ var historyInstance = new history.History(flakinessConfig);
+ // FIXME(jparent): Remove this once global isn't used.
+ g_history = historyInstance;
var container = document.createElement('div');
- g_crossDashboardState.testType = 'ui_tests';
- container.innerHTML = htmlForTestTypeSwitcher(true);
+ historyInstance.crossDashboardState.testType = 'ui_tests';
+ container.innerHTML = ui.html.testTypeSwitcher(true);
var selects = container.querySelectorAll('select');
equal(selects.length, 2);
var group = selects[1];
equal(group.parentNode.textContent.indexOf('Group:'), 0);
- equal(group.children.length, 3);
+ equal(group.children.length, 1);
- g_crossDashboardState.testType = 'layout-tests';
- container.innerHTML = htmlForTestTypeSwitcher(true);
+ historyInstance.crossDashboardState.testType = 'layout-tests';
+ container.innerHTML = ui.html.testTypeSwitcher(true);
var selects = container.querySelectorAll('select');
equal(selects.length, 2);
var group = selects[1];
equal(group.parentNode.textContent.indexOf('Group:'), 0);
- equal(group.children.length, 4);
+ equal(group.children.length, 1);
});
test('htmlForIndividualTestOnAllBuilders', 1, function() {
resetGlobals();
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
equal(htmlForIndividualTestOnAllBuilders('foo/nonexistant.html'), '<div class="not-found">Test not found. Either it does not exist, is skipped or passes on all platforms.</div>');
});
test('htmlForIndividualTestOnAllBuildersWithResultsLinksNonexistant', 1, function() {
resetGlobals();
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
equal(htmlForIndividualTestOnAllBuildersWithResultsLinks('foo/nonexistant.html'),
'<div class="not-found">Test not found. Either it does not exist, is skipped or passes on all platforms.</div>' +
'<div class=expectations test=foo/nonexistant.html>' +
'<div>' +
- '<span class=link onclick="setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
- '<span class=link onclick="setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span> | ' +
+ '<span class=link onclick="g_history.setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
+ '<span class=link onclick="g_history.setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span> | ' +
'<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b>' +
'</div>' +
'</div>');
});
test('htmlForIndividualTestOnAllBuildersWithResultsLinks', 1, function() {
- resetGlobals();
- loadBuildersList('@ToT - chromium.org', 'layout-tests');
-
- var builderName = 'WebKit Linux';
- var test = 'dummytest.html';
- g_testToResultsMap[test] = [createResultsObjectForTest(test, builderName)];
-
- equal(htmlForIndividualTestOnAllBuildersWithResultsLinks(test),
- '<table class=test-table><thead><tr>' +
- '<th sortValue=test><div class=table-header-content><span></span><span class=header-text>test</span></div></th>' +
- '<th sortValue=bugs><div class=table-header-content><span></span><span class=header-text>bugs</span></div></th>' +
- '<th sortValue=modifiers><div class=table-header-content><span></span><span class=header-text>modifiers</span></div></th>' +
- '<th sortValue=expectations><div class=table-header-content><span></span><span class=header-text>expectations</span></div></th>' +
- '<th sortValue=slowest><div class=table-header-content><span></span><span class=header-text>slowest run</span></div></th>' +
- '<th sortValue=flakiness colspan=10000><div class=table-header-content><span></span><span class=header-text>flakiness (numbers are runtimes in seconds)</span></div></th>' +
- '</tr></thead>' +
- '<tbody></tbody>' +
- '</table>' +
- '<div>The following builders either don\'t run this test (e.g. it\'s skipped) or all runs passed:</div>' +
- '<div class=skipped-builder-list>' +
- '<div class=skipped-builder>WebKit Linux (dbg)</div><div class=skipped-builder>WebKit Mac10.7</div><div class=skipped-builder>WebKit Win</div>' +
- '</div>' +
- '<div class=expectations test=dummytest.html>' +
- '<div><span class=link onclick="setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
- '<span class=link onclick="setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span> | ' +
- '<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
- '</div>');
-});
-
-test('htmlForIndividualTestOnAllBuildersWithResultsLinksWebkitMaster', 1, function() {
- resetGlobals();
- g_crossDashboardState.group = '@ToT - webkit.org';
+ var historyInstance = resetGlobals();
+ historyInstance.crossDashboardState.group = '@ToT - webkit.org';
loadBuildersList('@ToT - webkit.org', 'layout-tests');
- var builderName = 'Apple SnowLeopard Tests';
+ var builderName = 'Apple Lion Release WK2 (Tests)';
var test = 'dummytest.html';
g_testToResultsMap[test] = [createResultsObjectForTest(test, builderName)];
@@ -436,51 +381,52 @@ test('htmlForIndividualTestOnAllBuildersWithResultsLinksWebkitMaster', 1, functi
'</table>' +
'<div>The following builders either don\'t run this test (e.g. it\'s skipped) or all runs passed:</div>' +
'<div class=skipped-builder-list>' +
- '<div class=skipped-builder>Qt Linux Tests</div><div class=skipped-builder>Chromium Mac10.7 Tests</div><div class=skipped-builder>GTK Win</div>' +
+ '<div class=skipped-builder>Apple Lion Debug WK2 (Tests)</div><div class=skipped-builder>GTK Linux 64-bit Release</div><div class=skipped-builder>Qt Linux Tests</div>' +
'</div>' +
'<div class=expectations test=dummytest.html>' +
- '<div><span class=link onclick="setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
- '<span class=link onclick="setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span>' +
- '<form onsubmit="setQueryParameter(\'revision\', revision.value);return false;">' +
+ '<div><span class=link onclick="g_history.setQueryParameter(\'showExpectations\', true)">Show results</span> | ' +
+ '<span class=link onclick="g_history.setQueryParameter(\'showLargeExpectations\', true)">Show large thumbnails</span>' +
+ '<form onsubmit="g_history.setQueryParameter(\'revision\', revision.value);return false;">' +
'Show results for WebKit revision: <input name=revision placeholder="e.g. 65540" value="" id=revision-input>' +
'</form></div>' +
'</div>');
});
test('htmlForIndividualTests', 4, function() {
- resetGlobals();
+ var historyInstance = resetGlobals();
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
var test1 = 'foo/nonexistant.html';
var test2 = 'bar/nonexistant.html';
- g_currentState.showChrome = false;
+ historyInstance.dashboardSpecificState.showChrome = false;
var tests = [test1, test2];
equal(htmlForIndividualTests(tests),
'<h2><a href="http://trac.webkit.org/browser/trunk/LayoutTests/foo/nonexistant.html" target="_blank">foo/nonexistant.html</a></h2>' +
htmlForIndividualTestOnAllBuilders(test1) +
'<div class=expectations test=foo/nonexistant.html>' +
- '<div><span class=link onclick=\"setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
- '<span class=link onclick=\"setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
+ '<div><span class=link onclick=\"g_history.setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
+ '<span class=link onclick=\"g_history.setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
'<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
'</div>' +
'<hr>' +
'<h2><a href="http://trac.webkit.org/browser/trunk/LayoutTests/bar/nonexistant.html" target="_blank">bar/nonexistant.html</a></h2>' +
htmlForIndividualTestOnAllBuilders(test2) +
'<div class=expectations test=bar/nonexistant.html>' +
- '<div><span class=link onclick=\"setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
- '<span class=link onclick=\"setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
+ '<div><span class=link onclick=\"g_history.setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
+ '<span class=link onclick=\"g_history.setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
'<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
'</div>');
tests = [test1];
equal(htmlForIndividualTests(tests), htmlForIndividualTestOnAllBuilders(test1) +
'<div class=expectations test=foo/nonexistant.html>' +
- '<div><span class=link onclick=\"setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
- '<span class=link onclick=\"setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
+ '<div><span class=link onclick=\"g_history.setQueryParameter(\'showExpectations\', true)\">Show results</span> | ' +
+ '<span class=link onclick=\"g_history.setQueryParameter(\'showLargeExpectations\', true)\">Show large thumbnails</span> | ' +
'<b>Only shows actual results/diffs from the most recent *failure* on each bot.</b></div>' +
'</div>');
- g_currentState.showChrome = true;
+ historyInstance.dashboardSpecificState.showChrome = true;
equal(htmlForIndividualTests(tests),
'<h2><a href="http://trac.webkit.org/browser/trunk/LayoutTests/foo/nonexistant.html" target="_blank">foo/nonexistant.html</a></h2>' +
@@ -495,16 +441,16 @@ test('htmlForIndividualTests', 4, function() {
});
test('htmlForSingleTestRow', 1, function() {
- resetGlobals();
+ var historyInstance = resetGlobals();
var builder = 'dummyBuilder';
- BUILDER_TO_MASTER[builder] = CHROMIUM_WEBKIT_BUILDER_MASTER;
+ BUILDER_TO_MASTER[builder] = WEBKIT_BUILDER_MASTER;
var test = createResultsObjectForTest('foo/exists.html', builder);
- g_currentState.showCorrectExpectations = true;
+ historyInstance.dashboardSpecificState.showCorrectExpectations = true;
g_resultsByBuilder[builder] = {buildNumbers: [2, 1], webkitRevision: [1234, 1233]};
test.rawResults = [[1, 'F'], [2, 'I']];
test.rawTimes = [[1, 0], [2, 5]];
var expected = '<tr>' +
- '<td class="test-link"><span class="link" onclick="setQueryParameter(\'tests\',\'foo/exists.html\');">foo/exists.html</span>' +
+ '<td class="test-link"><span class="link" onclick="g_history.setQueryParameter(\'tests\',\'foo/exists.html\');">foo/exists.html</span>' +
'<td class=options-container><a href="https://bugs.webkit.org/enter_bug.cgi?assigned_to=webkit-unassigned%40lists.webkit.org&product=WebKit&form_name=enter_bug&component=Tools%20%2F%20Tests&short_desc=Layout%20Test%20foo%2Fexists.html%20is%20failing&comment=The%20following%20layout%20test%20is%20failing%20on%20%5Binsert%20platform%5D%0A%0Afoo%2Fexists.html%0A%0AProbable%20cause%3A%0A%0A%5Binsert%20probable%20cause%5D" class="file-bug">FILE BUG</a>' +
'<td class=options-container>' +
'<td class=options-container>' +
@@ -526,87 +472,11 @@ test('baseTest', 2, function() {
// FIXME: Create builders_tests.js and move this there.
-test('isChromiumWebkitTipOfTreeTestRunner', 1, function() {
- var builderList = ["WebKit Linux", "WebKit Linux (dbg)", "WebKit Linux 32", "WebKit Mac10.6", "WebKit Mac10.6 (dbg)",
- "WebKit Mac10.6 (deps)", "WebKit Mac10.7", "WebKit Win", "WebKit Win (dbg)(1)", "WebKit Win (dbg)(2)", "WebKit Win (deps)",
- "WebKit Win7", "Linux (Content Shell)"];
- var expectedBuilders = ["WebKit Linux", "WebKit Linux (dbg)", "WebKit Linux 32", "WebKit Mac10.6",
- "WebKit Mac10.6 (dbg)", "WebKit Mac10.7", "WebKit Win", "WebKit Win (dbg)(1)", "WebKit Win (dbg)(2)", "WebKit Win7"];
- deepEqual(builderList.filter(isChromiumWebkitTipOfTreeTestRunner), expectedBuilders);
-});
-
-test('isChromiumWebkitDepsTestRunner', 1, function() {
- var builderList = ["Chrome Frame Tests", "GPU Linux (NVIDIA)", "GPU Linux (dbg) (NVIDIA)", "GPU Mac", "GPU Mac (dbg)", "GPU Win7 (NVIDIA)", "GPU Win7 (dbg) (NVIDIA)", "Linux Perf", "Linux Tests",
- "Linux Valgrind", "Mac Builder (dbg)", "Mac10.6 Perf", "Mac10.6 Tests", "Vista Perf", "Vista Tests", "WebKit Linux", "WebKit Linux ASAN", "WebKit Linux (dbg)", "WebKit Linux (deps)", "WebKit Linux 32",
- "WebKit Mac10.6", "WebKit Mac10.6 (dbg)", "WebKit Mac10.6 (deps)", "WebKit Mac10.7", "WebKit Win", "WebKit Win (dbg)(1)", "WebKit Win (dbg)(2)", "WebKit Win (deps)",
- "WebKit Win7", "Win (dbg)", "Win Builder"];
- var expectedBuilders = ["WebKit Linux (deps)", "WebKit Mac10.6 (deps)", "WebKit Win (deps)"];
- deepEqual(builderList.filter(isChromiumWebkitDepsTestRunner), expectedBuilders);
-});
-
-test('queryHashAsMap', 2, function() {
- equal(window.location.hash, '#useTestData=true');
- deepEqual(queryHashAsMap(), {useTestData: 'true'});
-});
-
-test('parseCrossDashboardParameters', 2, function() {
- equal(window.location.hash, '#useTestData=true');
- parseCrossDashboardParameters();
-
- var expectedParameters = {};
- for (var key in g_defaultCrossDashboardStateValues)
- expectedParameters[key] = g_defaultCrossDashboardStateValues[key];
- expectedParameters.useTestData = true;
-
- deepEqual(g_crossDashboardState, expectedParameters);
-});
-
-test('diffStates', 5, function() {
- var newState = {a: 1, b: 2};
- deepEqual(diffStates(null, newState), newState);
-
- var oldState = {a: 1};
- deepEqual(diffStates(oldState, newState), {b: 2});
-
- // FIXME: This is kind of weird. I think the existing users of this code work correctly, but it's a confusing result.
- var oldState = {c: 1};
- deepEqual(diffStates(oldState, newState), {a:1, b: 2});
-
- var oldState = {a: 1, b: 2};
- deepEqual(diffStates(oldState, newState), {});
-
- var oldState = {a: 2, b: 3};
- deepEqual(diffStates(oldState, newState), {a: 1, b: 2});
-});
-
-test('addBuilderLoadErrors', 1, function() {
- clearErrors();
- g_hasDoneInitialPageGeneration = false;
- g_buildersThatFailedToLoad = ['builder1', 'builder2'];
- g_staleBuilders = ['staleBuilder1'];
- addBuilderLoadErrors();
- equal(g_errorMessages, 'ERROR: Failed to get data from builder1,builder2.<br>ERROR: Data from staleBuilder1 is more than 1 day stale.<br>');
-});
-
-test('builderGroupIsToTWebKitAttribute', 2, function() {
- var dummyMaster = new builders.BuilderMaster('Chromium', 'dummyurl', {'layout-tests': {'builders': ['WebKit Linux', 'WebKit Linux (dbg)', 'WebKit Mac10.7', 'WebKit Win']}});
- var testBuilderGroups = {
- '@ToT - dummy.org': new BuilderGroup(BuilderGroup.TOT_WEBKIT),
- '@DEPS - dummy.org': new BuilderGroup(BuilderGroup.DEPS_WEBKIT),
- }
-
- var testJSONData = "{ \"Dummy Builder 1\": null, \"Dummy Builder 2\": null }";
- requestBuilderList(testBuilderGroups, 'ChromiumWebkit', '@ToT - dummy.org', testBuilderGroups['@ToT - dummy.org'], 'layout-tests');
- equal(testBuilderGroups['@ToT - dummy.org'].isToTWebKit, true);
- requestBuilderList(testBuilderGroups, 'ChromiumWebkit', '@DEPS - dummy.org', testBuilderGroups['@DEPS - dummy.org'], 'layout-tests');
- equal(testBuilderGroups['@DEPS - dummy.org'].isToTWebKit, false);
-});
-
test('requestBuilderListAddsBuilderGroupEntry', 1, function() {
var testBuilderGroups = { '@ToT - dummy.org': null };
- var builderGroup = new BuilderGroup(BuilderGroup.TOT_WEBKIT);
+ var builderGroup = new BuilderGroup();
var groupName = '@ToT - dummy.org';
- requestBuilderList(testBuilderGroups, 'ChromiumWebkit', groupName, builderGroup, 'layout-tests');
+ requestBuilderList(testBuilderGroups, 'webkit.org', groupName, builderGroup, 'layout-tests');
equal(testBuilderGroups['@ToT - dummy.org'], builderGroup);
})
@@ -637,9 +507,9 @@ test('sortTests', 4, function() {
});
test('popup', 2, function() {
- showPopup(document.body, 'dummy content');
+ ui.popup.show(document.body, 'dummy content');
ok(document.querySelector('#popup'));
- hidePopup();
+ ui.popup.hide();
ok(!document.querySelector('#popup'));
});
@@ -712,3 +582,56 @@ test('TestTrie', 3, function() {
}, "foo/bar");
deepEqual(leafsOfPartialTrieTraversal, expectedLeafs);
});
+
+test('changeTestTypeInvalidatesGroup', 1, function() {
+ var historyInstance = resetGlobals();
+ var originalGroup = '@ToT - webkit.org';
+ var originalTestType = 'layout-tests';
+ loadBuildersList(originalGroup, originalTestType);
+ historyInstance.crossDashboardState.group = originalGroup;
+ historyInstance.crossDashboardState.testType = originalTestType;
+
+ historyInstance.invalidateQueryParameters({'testType': 'ui_tests'});
+ notEqual(historyInstance.crossDashboardState.group, originalGroup, "group should have been invalidated");
+});
+
+test('shouldHideTest', 10, function() {
+ var historyInstance = new history.History(flakinessConfig);
+ historyInstance.parseParameters();
+ // FIXME(jparent): Change to use the flakiness_dashboard's history object
+ // once it exists, rather than tracking global.
+ g_history = historyInstance;
+ var test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+
+ equal(shouldHideTest(test), true, 'default layout test, hide it.');
+ historyInstance.dashboardSpecificState.showCorrectExpectations = true;
+ equal(shouldHideTest(test), false, 'show correct expectations.');
+ historyInstance.dashboardSpecificState.showCorrectExpectations = false;
+
+ test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+ test.isWontFixSkip = true;
+ equal(shouldHideTest(test), true, 'by default hide these too');
+ historyInstance.dashboardSpecificState.showWontFixSkip = true;
+ equal(shouldHideTest(test), false, 'now we should show it');
+ historyInstance.dashboardSpecificState.showWontFixSkip = false;
+
+ test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+ test.isFlaky = true;
+ equal(shouldHideTest(test), false, 'we show flaky tests by default');
+ historyInstance.dashboardSpecificState.showFlaky = false;
+ equal(shouldHideTest(test), true, 'do not show flaky test');
+ historyInstance.dashboardSpecificState.showFlaky = true;
+
+ test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+ test.slowestNonTimeoutCrashTime = MIN_SECONDS_FOR_SLOW_TEST + 1;
+ equal(shouldHideTest(test), true, 'we hide slow tests by default');
+ historyInstance.dashboardSpecificState.showSlow = true;
+ equal(shouldHideTest(test), false, 'now show slow test');
+ historyInstance.dashboardSpecificState.showSlow = false;
+
+ test = createResultsObjectForTest('foo/test.html', 'dummyBuilder');
+ historyInstance.crossDashboardState.testType = 'not layout tests';
+ equal(shouldHideTest(test), false, 'show all non layout tests');
+ test.isWontFixSkip = true;
+ equal(shouldHideTest(test), false, 'show all non layout tests, even if wont fix');
+});
diff --git a/Tools/TestResultServer/static-dashboards/history.js b/Tools/TestResultServer/static-dashboards/history.js
new file mode 100644
index 000000000..3220c3df1
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/history.js
@@ -0,0 +1,307 @@
+// Copyright (C) 2013 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.
+
+
+var history = history || {};
+
+(function() {
+
+history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES = {
+ group: null,
+ showAllRuns: false,
+ testType: 'layout-tests',
+ useTestData: false,
+}
+
+history.validateParameter = function(state, key, value, validateFn)
+{
+ if (validateFn())
+ state[key] = value;
+ else
+ console.log(key + ' value is not valid: ' + value);
+}
+
+history.isTreeMap = function()
+{
+ return string.endsWith(window.location.pathname, 'treemap.html');
+}
+
+// TODO(jparent): Make private once callers move here.
+history.queryHashAsMap = function()
+{
+ var hash = window.location.hash;
+ var paramsList = hash ? hash.substring(1).split('&') : [];
+ var paramsMap = {};
+ var invalidKeys = [];
+ for (var i = 0; i < paramsList.length; i++) {
+ var thisParam = paramsList[i].split('=');
+ if (thisParam.length != 2) {
+ console.log('Invalid query parameter: ' + paramsList[i]);
+ continue;
+ }
+
+ paramsMap[thisParam[0]] = decodeURIComponent(thisParam[1]);
+ }
+
+ // FIXME: remove support for mapping from the master parameter to the group
+ // one once the waterfall starts to pass in the builder name instead.
+ if (paramsMap.master) {
+ paramsMap.group = LEGACY_BUILDER_MASTERS_TO_GROUPS[paramsMap.master];
+ if (!paramsMap.group)
+ console.log('ERROR: Unknown master name: ' + paramsMap.master);
+ window.location.hash = window.location.hash.replace('master=' + paramsMap.master, 'group=' + paramsMap.group);
+ delete paramsMap.master;
+ }
+
+ return paramsMap;
+}
+
+history._diffStates = function(oldState, newState)
+{
+ // If there is no old state, everything in the current state is new.
+ if (!oldState)
+ return newState;
+
+ var changedParams = {};
+ for (curKey in newState) {
+ var oldVal = oldState[curKey];
+ var newVal = newState[curKey];
+ // Add new keys or changed values.
+ if (!oldVal || oldVal != newVal)
+ changedParams[curKey] = newVal;
+ }
+ return changedParams;
+}
+
+history._fillMissingValues = function(to, from)
+{
+ for (var state in from) {
+ if (!(state in to))
+ to[state] = from[state];
+ }
+}
+
+history.History = function(configuration)
+{
+ this.crossDashboardState = {};
+ this.dashboardSpecificState = {};
+
+ if (configuration) {
+ this._defaultDashboardSpecificStateValues = configuration.defaultStateValues;
+ this._handleValidHashParameter = configuration.handleValidHashParameter;
+ this._handleQueryParameterChange = configuration.handleQueryParameterChange || function(historyInstance, params) { return true; };
+ this._dashboardSpecificInvalidatingParameters = configuration.invalidatingHashParameters;
+ this._generatePage = configuration.generatePage;
+ }
+}
+
+var RELOAD_REQUIRING_PARAMETERS = ['showAllRuns', 'group', 'testType'];
+
+var CROSS_DB_INVALIDATING_PARAMETERS = {
+ 'testType': 'group'
+};
+
+history.History.prototype = {
+ initialize: function()
+ {
+ window.onhashchange = this._handleLocationChange.bind(this);
+ this._handleLocationChange();
+ },
+ isLayoutTestResults: function()
+ {
+ return this.crossDashboardState.testType == 'layout-tests';
+ },
+ isGPUTestResults: function()
+ {
+ return this.crossDashboardState.testType == 'gpu_tests';
+ },
+ parseCrossDashboardParameters: function()
+ {
+ this.crossDashboardState = {};
+ var parameters = history.queryHashAsMap();
+ for (parameterName in history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES)
+ this.parseParameter(parameters, parameterName);
+
+ history._fillMissingValues(this.crossDashboardState, history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES);
+ },
+ _parseDashboardSpecificParameters: function()
+ {
+ this.dashboardSpecificState = {};
+ var parameters = history.queryHashAsMap();
+ for (parameterName in this._defaultDashboardSpecificStateValues)
+ this.parseParameter(parameters, parameterName);
+ },
+ // TODO(jparent): Make private once callers move here.
+ parseParameters: function()
+ {
+ var oldCrossDashboardState = this.crossDashboardState;
+ var oldDashboardSpecificState = this.dashboardSpecificState;
+
+ this.parseCrossDashboardParameters();
+
+ // Some parameters require loading different JSON files when the value changes. Do a reload.
+ if (Object.keys(oldCrossDashboardState).length) {
+ for (var key in this.crossDashboardState) {
+ if (oldCrossDashboardState[key] != this.crossDashboardState[key] && RELOAD_REQUIRING_PARAMETERS.indexOf(key) != -1) {
+ window.location.reload();
+ return false;
+ }
+ }
+ }
+
+ this._parseDashboardSpecificParameters();
+ var dashboardSpecificDiffState = history._diffStates(oldDashboardSpecificState, this.dashboardSpecificState);
+
+ history._fillMissingValues(this.dashboardSpecificState, this._defaultDashboardSpecificStateValues);
+
+ // FIXME: dashboard_base shouldn't know anything about specific dashboard specific keys.
+ if (dashboardSpecificDiffState.builder)
+ delete this.dashboardSpecificState.tests;
+ if (this.dashboardSpecificState.tests)
+ delete this.dashboardSpecificState.builder;
+
+ var shouldGeneratePage = true;
+ if (Object.keys(dashboardSpecificDiffState).length)
+ shouldGeneratePage = this._handleQueryParameterChange(this, dashboardSpecificDiffState);
+ return shouldGeneratePage;
+ },
+ // TODO(jparent): Make private once callers move here.
+ parseParameter: function(parameters, key)
+ {
+ if (!(key in parameters))
+ return;
+ var value = parameters[key];
+ if (!this._handleValidHashParameterWrapper(key, value))
+ console.log("Invalid query parameter: " + key + '=' + value);
+ },
+ // Takes a key and a value and sets the this.dashboardSpecificState[key] = value iff key is
+ // a valid hash parameter and the value is a valid value for that key. Handles
+ // cross-dashboard parameters then falls back to calling
+ // handleValidHashParameter for dashboard-specific parameters.
+ //
+ // @return {boolean} Whether the key what inserted into the this.dashboardSpecificState.
+ _handleValidHashParameterWrapper: function(key, value)
+ {
+ switch(key) {
+ case 'testType':
+ history.validateParameter(this.crossDashboardState, key, value,
+ function() { return TEST_TYPES.indexOf(value) != -1; });
+ return true;
+
+ case 'group':
+ history.validateParameter(this.crossDashboardState, key, value,
+ function() {
+ return value in LAYOUT_TESTS_BUILDER_GROUPS;
+ });
+ return true;
+
+ case 'useTestData':
+ case 'showAllRuns':
+ this.crossDashboardState[key] = value == 'true';
+ return true;
+
+ default:
+ return this._handleValidHashParameter(this, key, value);
+ }
+ },
+ queryParameterValue: function(parameter)
+ {
+ return this.dashboardSpecificState[parameter] || this.crossDashboardState[parameter];
+ },
+ // Sets the page state. Takes varargs of key, value pairs.
+ setQueryParameter: function(var_args)
+ {
+ var queryParamsAsState = {};
+ for (var i = 0; i < arguments.length; i += 2) {
+ var key = arguments[i];
+ queryParamsAsState[key] = arguments[i + 1];
+ }
+
+ this.invalidateQueryParameters(queryParamsAsState);
+
+ var newState = this._combinedDashboardState();
+ for (var key in queryParamsAsState) {
+ newState[key] = queryParamsAsState[key];
+ }
+
+ // Note: We use window.location.hash rather that window.location.replace
+ // because of bugs in Chrome where extra entries were getting created
+ // when back button was pressed and full page navigation was occuring.
+ // FIXME: file those bugs.
+ window.location.hash = this._permaLinkURLHash(newState);
+ },
+ toggleQueryParameter: function(param)
+ {
+ this.setQueryParameter(param, !this.queryParameterValue(param));
+ },
+ invalidateQueryParameters: function(queryParamsAsState)
+ {
+ for (var key in queryParamsAsState) {
+ if (key in CROSS_DB_INVALIDATING_PARAMETERS)
+ delete this.crossDashboardState[CROSS_DB_INVALIDATING_PARAMETERS[key]];
+ if (this._dashboardSpecificInvalidatingParameters && key in this._dashboardSpecificInvalidatingParameters)
+ delete this.dashboardSpecificState[this._dashboardSpecificInvalidatingParameters[key]];
+ }
+ },
+ _joinParameters: function(stateObject)
+ {
+ var state = [];
+ for (var key in stateObject) {
+ var value = stateObject[key];
+ if (value != this._defaultValue(key))
+ state.push(key + '=' + encodeURIComponent(value));
+ }
+ return state.join('&');
+ },
+ _permaLinkURLHash: function(opt_state)
+ {
+ var state = opt_state || this._combinedDashboardState();
+ return '#' + this._joinParameters(state);
+ },
+ _combinedDashboardState: function()
+ {
+ var combinedState = Object.create(this.dashboardSpecificState);
+ for (var key in this.crossDashboardState)
+ combinedState[key] = this.crossDashboardState[key];
+ return combinedState;
+ },
+ _defaultValue: function(key)
+ {
+ if (key in this._defaultDashboardSpecificStateValues)
+ return this._defaultDashboardSpecificStateValues[key];
+ return history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES[key];
+ },
+ _handleLocationChange: function()
+ {
+ if (this.parseParameters())
+ this._generatePage(this);
+ }
+
+}
+
+})();
diff --git a/Tools/TestResultServer/static-dashboards/history_unittests.js b/Tools/TestResultServer/static-dashboards/history_unittests.js
new file mode 100644
index 000000000..75594536c
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/history_unittests.js
@@ -0,0 +1,65 @@
+// Copyright (C) 2013 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.
+
+test('queryHashAsMap', 2, function() {
+ equal(window.location.hash, '#useTestData=true');
+ deepEqual(history.queryHashAsMap(), {useTestData: 'true'});
+});
+
+test('diffStates', 5, function() {
+ var newState = {a: 1, b: 2};
+ deepEqual(history._diffStates(null, newState), newState);
+
+ var oldState = {a: 1};
+ deepEqual(history._diffStates(oldState, newState), {b: 2});
+
+ // FIXME: This is kind of weird. I think the existing users of this code work correctly, but it's a confusing result.
+ var oldState = {c: 1};
+ deepEqual(history._diffStates(oldState, newState), {a:1, b: 2});
+
+ var oldState = {a: 1, b: 2};
+ deepEqual(history._diffStates(oldState, newState), {});
+
+ var oldState = {a: 2, b: 3};
+ deepEqual(history._diffStates(oldState, newState), {a: 1, b: 2});
+});
+
+test('parseCrossDashboardParameters', 2, function() {
+ var historyInstance = new history.History();
+ // FIXME(jparent): Remove this once parseParameters moves onto history obj.
+ g_history = historyInstance;
+ equal(window.location.hash, '#useTestData=true');
+ historyInstance.parseCrossDashboardParameters();
+
+ var expectedParameters = {};
+ for (var key in history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES)
+ expectedParameters[key] = history.DEFAULT_CROSS_DASHBOARD_STATE_VALUES[key];
+ expectedParameters.useTestData = true;
+
+ deepEqual(historyInstance.crossDashboardState, expectedParameters);
+});
diff --git a/Tools/TestResultServer/static-dashboards/loader.js b/Tools/TestResultServer/static-dashboards/loader.js
index c74890161..9504e9317 100644
--- a/Tools/TestResultServer/static-dashboards/loader.js
+++ b/Tools/TestResultServer/static-dashboards/loader.js
@@ -31,13 +31,13 @@ var loader = loader || {};
(function() {
-var TEST_RESULTS_SERVER = 'http://test-results.appspot.com/';
+var TEST_RESULTS_SERVER = 'http://webkit-test-results.appspot.com/';
var CHROMIUM_EXPECTATIONS_URL = 'http://svn.webkit.org/repository/webkit/trunk/LayoutTests/platform/chromium/TestExpectations';
function pathToBuilderResultsFile(builderName) {
return TEST_RESULTS_SERVER + 'testfile?builder=' + builderName +
'&master=' + builderMaster(builderName).name +
- '&testtype=' + g_crossDashboardState.testType + '&name=';
+ '&testtype=' + g_history.crossDashboardState.testType + '&name=';
}
loader.request = function(url, success, error, opt_isBinaryData)
@@ -64,6 +64,32 @@ loader.Loader = function()
this._loadResultsFiles,
this._loadExpectationsFiles,
];
+
+ this._buildersThatFailedToLoad = [];
+ this._staleBuilders = [];
+ this._errors = new ui.Errors();
+ // TODO(jparent): Pass in the appropriate history obj per db.
+ this._history = g_history;
+}
+
+// TODO(aboxhall): figure out whether this is a performance bottleneck and
+// change calling code to understand the trie structure instead if necessary.
+loader.Loader._flattenTrie = function(trie, prefix)
+{
+ var result = {};
+ for (var name in trie) {
+ var fullName = prefix ? prefix + "/" + name : name;
+ var data = trie[name];
+ if ("results" in data)
+ result[fullName] = data;
+ else {
+ var partialResult = loader.Loader._flattenTrie(data, fullName);
+ for (var key in partialResult) {
+ result[key] = partialResult[key];
+ }
+ }
+ }
+ return result;
}
loader.Loader.prototype = {
@@ -71,34 +97,36 @@ loader.Loader.prototype = {
{
this._loadNext();
},
+ showErrors: function()
+ {
+ this._errors.show();
+ },
_loadNext: function()
{
var loadingStep = this._loadingSteps.shift();
if (!loadingStep) {
- resourceLoadingComplete();
+ this._addErrors();
+ this._history.initialize();
return;
}
loadingStep.apply(this);
},
_loadBuildersList: function()
{
- loadBuildersList(g_crossDashboardState.group, g_crossDashboardState.testType);
- initBuilders();
+ loadBuildersList(currentBuilderGroupName(), this._history.crossDashboardState.testType);
this._loadNext();
},
_loadResultsFiles: function()
{
- parseParameters();
-
- for (var builderName in g_builders)
+ for (var builderName in currentBuilders())
this._loadResultsFileForBuilder(builderName);
},
_loadResultsFileForBuilder: function(builderName)
{
var resultsFilename;
- if (isTreeMap())
+ if (history.isTreeMap())
resultsFilename = 'times_ms.json';
- else if (g_crossDashboardState.showAllRuns)
+ else if (this._history.crossDashboardState.showAllRuns)
resultsFilename = 'results.json';
else
resultsFilename = 'results-small.json';
@@ -114,7 +142,7 @@ loader.Loader.prototype = {
},
_handleResultsFileLoaded: function(builderName, fileData)
{
- if (isTreeMap())
+ if (history.isTreeMap())
this._processTimesJSONData(builderName, fileData);
else
this._processResultsJSONData(builderName, fileData);
@@ -151,10 +179,10 @@ loader.Loader.prototype = {
continue;
if ((Date.now() / 1000) - lastRunSeconds > ONE_DAY_SECONDS)
- g_staleBuilders.push(builderName);
+ this._staleBuilders.push(builderName);
if (json_version >= 4)
- builds[builderName][TESTS_KEY] = flattenTrie(builds[builderName][TESTS_KEY]);
+ builds[builderName][TESTS_KEY] = loader.Loader._flattenTrie(builds[builderName][TESTS_KEY]);
g_resultsByBuilder[builderName] = builds[builderName];
}
},
@@ -163,26 +191,11 @@ loader.Loader.prototype = {
console.error('Failed to load results file for ' + builderName + '.');
// FIXME: loader shouldn't depend on state defined in dashboard_base.js.
- g_buildersThatFailedToLoad.push(builderName);
+ this._buildersThatFailedToLoad.push(builderName);
// Remove this builder from builders, so we don't try to use the
// data that isn't there.
- delete g_builders[builderName];
-
- // Change the default builder name if it has been deleted.
- if (g_defaultBuilderName == builderName) {
- g_defaultBuilderName = null;
- for (var availableBuilderName in g_builders) {
- g_defaultBuilderName = availableBuilderName;
- g_defaultDashboardSpecificStateValues.builder = availableBuilderName;
- break;
- }
- if (!g_defaultBuilderName) {
- var error = 'No tests results found for ' + g_crossDashboardState.testType + '. Reload the page to try fetching it again.';
- console.error(error);
- addError(error);
- }
- }
+ delete currentBuilders()[builderName];
// Proceed as if the resource had loaded.
this._handleResourceLoad();
@@ -194,7 +207,7 @@ loader.Loader.prototype = {
},
_haveResultsFilesLoaded: function()
{
- for (var builder in g_builders) {
+ for (var builder in currentBuilders()) {
if (!g_resultsByBuilder[builder])
return false;
}
@@ -202,7 +215,7 @@ loader.Loader.prototype = {
},
_loadExpectationsFiles: function()
{
- if (!isFlakinessDashboard() && !g_crossDashboardState.useTestData) {
+ if (!isFlakinessDashboard() && !this._history.crossDashboardState.useTestData) {
this._loadNext();
return;
}
@@ -232,6 +245,14 @@ loader.Loader.prototype = {
partial(function(platformName, xhr) {
console.error('Could not load expectations file for ' + platformName);
}, platformWithExpectations));
+ },
+ _addErrors: function()
+ {
+ if (this._buildersThatFailedToLoad.length)
+ this._errors.addError('ERROR: Failed to get data from ' + this._buildersThatFailedToLoad.toString() +'.');
+
+ if (this._staleBuilders.length)
+ this._errors.addError('ERROR: Data from ' + this._staleBuilders.toString() + ' is more than 1 day stale.');
}
}
diff --git a/Tools/TestResultServer/static-dashboards/loader_unittests.js b/Tools/TestResultServer/static-dashboards/loader_unittests.js
index 881e0179a..fb92c1286 100644
--- a/Tools/TestResultServer/static-dashboards/loader_unittests.js
+++ b/Tools/TestResultServer/static-dashboards/loader_unittests.js
@@ -29,7 +29,11 @@
module('loader');
test('loading steps', 1, function() {
+ resetGlobals();
var loadedSteps = [];
+ g_history._handleLocationChange = function() {
+ deepEqual(loadedSteps, ['step 1', 'step 2']);
+ }
var resourceLoader = new loader.Loader();
function loadingStep1() {
loadedSteps.push('step 1');
@@ -40,21 +44,15 @@ test('loading steps', 1, function() {
resourceLoader.load();
}
- var loadingCompleteCallback = resourceLoadingComplete;
- resourceLoadingComplete = function() {
- deepEqual(loadedSteps, ['step 1', 'step 2']);
- }
-
- try {
- resourceLoader._loadingSteps = [loadingStep1, loadingStep2];
- resourceLoader.load();
- } finally {
- resourceLoadingComplete = loadingCompleteCallback;
- }
+ resourceLoader._loadingSteps = [loadingStep1, loadingStep2];
+ resourceLoader.load();
});
-test('results files loading', 5, function() {
- var expectedLoadedBuilders = ["WebKit Linux", "WebKit Win"];
+// Total number of assertions is 1 for the deepEqual of the builder lists
+// and then 2 per builder (one for ok, one for deepEqual of tests).
+test('results files loading', 9, function() {
+ resetGlobals();
+ var expectedLoadedBuilders = ['Apple Lion Debug WK2 (Tests)', 'Apple Lion Release WK2 (Tests)', 'GTK Linux 64-bit Release', 'Qt Linux Tests'];
var loadedBuilders = [];
var resourceLoader = new loader.Loader();
resourceLoader._loadNext = function() {
@@ -67,28 +65,25 @@ test('results files loading', 5, function() {
var requestFunction = loader.request;
loader.request = function(url, successCallback, errorCallback) {
- var builderName = /builder=([\w ]+)&/.exec(url)[1];
+ var builderName = /builder=([\w ().-]+)&/.exec(url)[1];
loadedBuilders.push(builderName);
successCallback({responseText: '{"version": 4, "' + builderName + '": {"secondsSinceEpoch": [' + Date.now() + '], "tests": {}}}'});
}
- g_builders = {"WebKit Linux": true, "WebKit Win": true};
-
- builders.masters['ChromiumWebkit'] = {'tests': {'layout-tests': {builders: ["WebKit Linux", "WebKit Win"]}}};
- loadBuildersList('@ToT - chromium.org', 'layout-tests');
-
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
try {
resourceLoader._loadResultsFiles();
} finally {
- g_builders = undefined;
- g_resultsByBuilder = {};
loader.request = requestFunction;
}
});
test('expectations files loading', 1, function() {
- var expectedLoadedPlatforms = ["chromium", "chromium-android", "efl", "efl-wk1", "efl-wk2", "gtk",
- "gtk-wk2", "mac", "mac-lion", "mac-snowleopard", "qt", "win", "wk2"];
+ resetGlobals();
+ g_history.parseCrossDashboardParameters();
+ var expectedLoadedPlatforms = ["efl", "efl-wk1", "efl-wk2", "gtk", "gtk-wk2",
+ "mac", "mac-lion", "mac-wk2", "mac-wk2", "qt", "win", "wk2"];
var loadedPlatforms = [];
var resourceLoader = new loader.Loader();
resourceLoader._loadNext = function() {
@@ -109,10 +104,9 @@ test('expectations files loading', 1, function() {
});
test('results file failing to load', 2, function() {
- // FIXME: loader shouldn't depend on state defined in dashboard_base.js.
- g_buildersThatFailedToLoad = [];
- g_builders = {};
-
+ resetGlobals();
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
var resourceLoader = new loader.Loader();
var resourceLoadCount = 0;
resourceLoader._handleResourceLoad = function() {
@@ -120,14 +114,56 @@ test('results file failing to load', 2, function() {
}
var builder1 = 'builder1';
- g_builders[builder1] = true;
+ currentBuilders()[builder1] = true;
resourceLoader._handleResultsFileLoadError(builder1);
var builder2 = 'builder2';
- g_builders[builder2] = true;
+ currentBuilders()[builder2] = true;
resourceLoader._handleResultsFileLoadError(builder2);
- deepEqual(g_buildersThatFailedToLoad, [builder1, builder2]);
+ deepEqual(resourceLoader._buildersThatFailedToLoad, [builder1, builder2]);
equal(resourceLoadCount, 2);
-})
+});
+
+test('Default builder gets set.', 3, function() {
+ resetGlobals();
+ loadBuildersList('@ToT - webkit.org', 'layout-tests');
+
+ var defaultBuilder = currentBuilderGroup().defaultBuilder();
+ ok(defaultBuilder, "Default builder should exist.");
+
+ // Simulate error loading the default builder data, then make sure
+ // a new defaultBuilder is set, and isn't the now invalid one.
+ var resourceLoader = new loader.Loader();
+ resourceLoader._handleResultsFileLoadError(defaultBuilder);
+ var newDefaultBuilder = currentBuilderGroup().defaultBuilder();
+ ok(newDefaultBuilder, "There should still be a default builder.");
+ notEqual(newDefaultBuilder, defaultBuilder, "Default builder should not be the old default builder");
+});
+
+test('addBuilderLoadErrors', 1, function() {
+ var resourceLoader = new loader.Loader();
+ resourceLoader._buildersThatFailedToLoad = ['builder1', 'builder2'];
+ resourceLoader._staleBuilders = ['staleBuilder1'];
+ resourceLoader._addErrors();
+ equal(resourceLoader._errors._messages, 'ERROR: Failed to get data from builder1,builder2.<br>ERROR: Data from staleBuilder1 is more than 1 day stale.<br>');
+});
+
+
+test('flattenTrie', 1, function() {
+ resetGlobals();
+ var tests = {
+ 'bar.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
+ 'foo': {
+ 'bar': {
+ 'baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
+ }
+ }
+ };
+ var expectedFlattenedTests = {
+ 'bar.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
+ 'foo/bar/baz.html': {'results': [[100, 'F']], 'times': [[100, 0]]},
+ };
+ equal(JSON.stringify(loader.Loader._flattenTrie(tests)), JSON.stringify(expectedFlattenedTests))
+});
diff --git a/Tools/TestResultServer/static-dashboards/run-embedded-unittests.html b/Tools/TestResultServer/static-dashboards/run-embedded-unittests.html
index a863873c3..161ecbb64 100644
--- a/Tools/TestResultServer/static-dashboards/run-embedded-unittests.html
+++ b/Tools/TestResultServer/static-dashboards/run-embedded-unittests.html
@@ -47,9 +47,17 @@ THE POSSIBILITY OF SUCH DAMAGE.
window.parent = null;
</script>
+<script src="string.js"></script>
+<script src="history.js"></script>
+<script src="history_unittests.js"></script>
<script src="dashboard_base.js"></script>
+<script src="ui.js"></script>
<script src="loader.js"></script>
<script src="loader_unittests.js"></script>
+<script>
+ // Mock out loader.request so that we don't actually make xhrs for tests.
+ loader.request = function(url, successCallback, errorCallback) {};
+</script>
<script src="flakiness_dashboard.js"></script>
<script>
diff --git a/Tools/TestResultServer/static-dashboards/run-unittests.html b/Tools/TestResultServer/static-dashboards/run-unittests.html
index 452d55452..d33c65589 100644
--- a/Tools/TestResultServer/static-dashboards/run-unittests.html
+++ b/Tools/TestResultServer/static-dashboards/run-unittests.html
@@ -41,9 +41,17 @@ THE POSSIBILITY OF SUCH DAMAGE.
<link rel="stylesheet" href="flakiness_dashboard_tests.css"></link>
<script src="builders.js"></script>
<script src="builders_unittests.js"></script>
+<script src="string.js"></script>
+<script src="history.js"></script>
+<script src="history_unittests.js"></script>
<script src="dashboard_base.js"></script>
+<script src="ui.js"></script>
<script src="loader.js"></script>
<script src="loader_unittests.js"></script>
+<script>
+ // Mock out loader.request so that we don't actually make xhrs for tests.
+ loader.request = function(url, successCallback, errorCallback) {};
+</script>
<script src="flakiness_dashboard.js"></script>
<script>
diff --git a/Tools/TestResultServer/static-dashboards/string.js b/Tools/TestResultServer/static-dashboards/string.js
new file mode 100644
index 000000000..3e1f7f9fb
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/string.js
@@ -0,0 +1,69 @@
+// Copyright (C) 2013 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.
+
+// @fileoverview Generic string utility functions.
+var string = string || {};
+
+(function() {
+
+string.contains = function(a, b)
+{
+ return a.indexOf(b) != -1;
+}
+
+string.caseInsensitiveContains = function(a, b)
+{
+ return a.match(new RegExp(b, 'i'));
+}
+
+string.startsWith = function(a, b)
+{
+ return a.indexOf(b) == 0;
+}
+
+string.endsWith = function(a, b)
+{
+ return a.lastIndexOf(b) == a.length - b.length;
+}
+
+string.isValidName = function(str)
+{
+ return str.match(/[A-Za-z0-9\-\_,]/);
+}
+
+string.trimString = function(str)
+{
+ return str.replace(/^\s+|\s+$/g, '');
+}
+
+string.collapseWhitespace = function(str)
+{
+ return str.replace(/\s+/g, ' ');
+}
+
+})(); \ No newline at end of file
diff --git a/Tools/TestResultServer/static-dashboards/timeline_explorer.html b/Tools/TestResultServer/static-dashboards/timeline_explorer.html
index 4cdd9a86b..05d2b51b8 100644
--- a/Tools/TestResultServer/static-dashboards/timeline_explorer.html
+++ b/Tools/TestResultServer/static-dashboards/timeline_explorer.html
@@ -98,355 +98,11 @@ body {
<script src="dygraph-combined.js"></script>
<script src="builders.js"></script>
<script src="loader.js"></script>
+<script src="string.js"></script>
+<script src="history.js"></script>
<script src="dashboard_base.js"></script>
-<script>
-var FAILING_TESTS_DATASET_NAME = 'Failing tests';
-
-var g_dygraph;
-var g_buildIndicesByTimestamp = {};
-var g_currentBuildIndex = -1;
-var g_currentBuilderTestResults;
-
-//////////////////////////////////////////////////////////////////////////////
-// Methods and objects from dashboard_base.js to override.
-//////////////////////////////////////////////////////////////////////////////
-function generatePage()
-{
- g_buildIndicesByTimestamp = {};
- var results = g_resultsByBuilder[g_currentState.builder];
-
- for (var i = 0; i < results[FIXABLE_COUNTS_KEY].length; i++) {
- var buildDate = new Date(results[TIMESTAMPS_KEY][i] * 1000);
- g_buildIndicesByTimestamp[buildDate.getTime()] = i;
- }
-
- if (g_currentState.buildTimestamp != -1 && g_currentState.buildTimestamp in g_buildIndicesByTimestamp) {
- var newBuildIndex = g_buildIndicesByTimestamp[g_currentState.buildTimestamp];
-
- if (newBuildIndex == g_currentBuildIndex) {
- // This happens when selectBuild is called, which updates the UI
- // immediately, in addition to updating the location hash (we don't
- // just rely on the hash change since we don't want to regenerate the
- // whole page just because the user clicked on something)
- return;
- } else if (newBuildIndex)
- g_currentBuildIndex = newBuildIndex;
- }
-
- initCurrentBuilderTestResults();
-
- $('test-type-switcher').innerHTML = htmlForTestTypeSwitcher( false,
- checkboxHTML('ignoreFlakyTests', 'Ignore flaky tests', g_currentState.ignoreFlakyTests, 'g_currentBuildIndex = -1')
- );
-
- updateTimelineForBuilder();
-}
-
-function initCurrentBuilderTestResults()
-{
- var startTime = Date.now();
- g_currentBuilderTestResults = decompressResults(g_resultsByBuilder[g_currentState.builder]);
- console.log( 'Time to get test results by build: ' + (Date.now() - startTime));
-}
-
-function handleValidHashParameter(key, value)
-{
- switch(key) {
- case 'buildTimestamp':
- g_currentState.buildTimestamp = parseInt(value, 10);
- return true;
- case 'ignoreFlakyTests':
- g_currentState.ignoreFlakyTests = value == 'true';
- return true;
- default:
- return false;
- }
-}
-
-g_defaultDashboardSpecificStateValues = {
- buildTimestamp: -1,
- ignoreFlakyTests: true
-};
-
-function shouldShowWebKitRevisionsOnly()
-{
- return isTipOfTreeWebKitBuilder();
-}
-
-function updateTimelineForBuilder()
-{
- var builder = g_currentState.builder;
- var results = g_resultsByBuilder[builder];
- var graphData = [];
-
- var annotations = [];
-
- // Dygraph prefers to be handed data in chronological order.
- for (var i = results[FIXABLE_COUNTS_KEY].length - 1; i >= 0; i--) {
- var buildDate = new Date(results[TIMESTAMPS_KEY][i] * 1000);
- // FIXME: Find a better way to exclude outliers. This is just so we
- // exclude runs where every test failed.
- var failureCount = Math.min(results[FIXABLE_COUNT_KEY][i], 10000);
-
- if (g_currentState.ignoreFlakyTests)
- failureCount -= g_currentBuilderTestResults.flakyDeltasByBuild[i].total || 0;
-
- graphData.push([buildDate, failureCount]);
-
- if (!shouldShowWebKitRevisionsOnly() && (results[WEBKIT_REVISIONS_KEY][i] != results[WEBKIT_REVISIONS_KEY][i + 1])) {
- annotations.push({
- series: FAILING_TESTS_DATASET_NAME,
- x: buildDate,
- shortText: 'R',
- text: 'WebKit roll: r' + results[WEBKIT_REVISIONS_KEY][i + 1] + ' to ' + results[WEBKIT_REVISIONS_KEY][i]
- });
- }
- }
-
- var windowWidth = document.documentElement.clientWidth;
- var windowHeight = document.documentElement.clientHeight;
- var switcherNode = $('test-type-switcher');
- var inspectorNode = $('inspector-container');
- var graphWidth = windowWidth - 20 - inspectorNode.offsetWidth;
- var graphHeight = windowHeight - switcherNode.offsetTop - switcherNode.offsetHeight - 20;
-
- var containerNode = $('timeline-container');
- containerNode.style.height = graphHeight + 'px';
- containerNode.style.width = graphWidth + 'px';
- inspectorNode.style.height = graphHeight + 'px';
-
- g_dygraph = new Dygraph(
- containerNode,
- graphData, {
- labels: ['Date', FAILING_TESTS_DATASET_NAME],
- width: graphWidth,
- height: graphHeight,
- clickCallback: function(event, date) {
- selectBuild(results, builder, g_dygraph, g_buildIndicesByTimestamp[date]);
- },
- drawCallback: function(dygraph, isInitial) {
- if (isInitial)
- return;
- updateBuildIndicator(results, dygraph);
- },
- // xValueParser is necessary for annotations to work, even though we
- // already have Date instances
- xValueParser: function(input) { return input.getTime(); }
- });
- if (annotations.length)
- g_dygraph.setAnnotations(annotations);
-
- inspectorNode.style.visibility = 'visible';
-
- if (g_currentBuildIndex != -1)
- selectBuild(results, builder, g_dygraph, g_currentBuildIndex);
-}
-
-function selectBuild(results, builder, dygraph, index)
-{
- g_currentBuildIndex = index;
- updateBuildIndicator(results, dygraph);
- updateBuildInspector(results, builder, dygraph, index);
- setQueryParameter('buildTimestamp', results[TIMESTAMPS_KEY][index] * 1000);
-}
-
-function updateBuildIndicator(results, dygraph)
-{
- var indicatorNode = $('indicator');
-
- if (!indicatorNode) {
- var containerNode = $('timeline-container');
- indicatorNode = document.createElement('div');
- indicatorNode.id = 'indicator';
- indicatorNode.style.height = containerNode.offsetHeight + 'px';
- containerNode.appendChild(indicatorNode);
- }
-
- if (g_currentBuildIndex == -1)
- indicatorNode.style.display = 'none';
- else {
- indicatorNode.style.display = 'block';
- var buildDate = new Date(results[TIMESTAMPS_KEY][g_currentBuildIndex] * 1000);
- var domCoords = dygraph.toDomCoords(buildDate, 0);
- indicatorNode.style.left = domCoords[0] + 'px';
- }
-}
-
-function updateBuildInspector(results, builder, dygraph, index)
-{
- var html = '<table id="inspector-table"><caption>Details</caption>';
-
- function addRow(label, value)
- {
- html += '<tr><td class="label">' + label + '</td><td>' + value + '</td></tr>';
- }
-
- // Builder and results links
- var buildNumber = results[BUILD_NUMBERS_KEY][index];
- addRow('', '');
- var master = builderMaster(builder);
- var buildUrl = master.logPath(builder, results[BUILD_NUMBERS_KEY][index]);
- if (master.name == WEBKIT_BUILDER_MASTER) {
- var resultsUrl = 'http://build.webkit.org/results/' + builder + '/r' + results[WEBKIT_REVISIONS_KEY][index] +
- ' (' + results[BUILD_NUMBERS_KEY][index] + ')';
- } else {
- var resultsUrl = 'http://build.chromium.org/f/chromium/layout_test_results/' +
- g_builders[builder] + '/' + results[CHROME_REVISIONS_KEY][index];
- }
-
- addRow('Build:', '<a href="' + buildUrl + '" target="_blank">' + buildNumber + '</a> (<a href="' + resultsUrl + '" target="_blank">results</a>)');
-
- // Revision link(s)
- if (!shouldShowWebKitRevisionsOnly())
- addRow('Chromium change:', chromiumRevisionLink(results, index));
- addRow('WebKit change:', webKitRevisionLink(results, index));
-
- // Test status/counts
- addRow('', '');
-
- function addNumberRow(label, currentValue, previousValue)
- {
- var delta = currentValue - previousValue;
- var deltaText = ''
- if (delta < 0)
- deltaText = ' <span class="delta negative">' + delta + '</span>';
- else if (delta > 0)
- deltaText = ' <span class="delta positive">+' + delta + '</span>';
-
- addRow(label, currentValue + deltaText);
- }
-
- var expectations = expectationsMap();
- var flakyDeltasByBuild = g_currentBuilderTestResults.flakyDeltasByBuild;
- for (var expectationKey in expectations) {
- if (expectationKey in results[FIXABLE_COUNTS_KEY][index]) {
- var currentCount = results[FIXABLE_COUNTS_KEY][index][expectationKey];
- var previousCount = results[FIXABLE_COUNTS_KEY][index + 1][expectationKey];
- if (g_currentState.ignoreFlakyTests) {
- currentCount -= flakyDeltasByBuild[index][expectationKey] || 0;
- previousCount -= flakyDeltasByBuild[index + 1][expectationKey] || 0;
- }
- addNumberRow(expectations[expectationKey], currentCount, previousCount);
- }
- }
-
- var currentTotal = results[FIXABLE_COUNT_KEY][index];
- var previousTotal = results[FIXABLE_COUNT_KEY][index + 1];
- if (g_currentState.ignoreFlakyTests) {
- currentTotal -= flakyDeltasByBuild[index].total || 0;
- previousTotal -= flakyDeltasByBuild[index + 1].total || 0;
- }
- addNumberRow('Total failing tests:', currentTotal, previousTotal);
-
- html += '</table>';
-
- html += '<div id="changes-button" class="buttons">';
- html += '<button>Show changed test results</button>';
- html += '</div>';
-
- html += '<div id="build-buttons" class="buttons">';
- html += '<button>Previous build</button> <button>Next build</button>';
- html += '</div>';
-
- var inspectorNode = $('inspector-container');
- inspectorNode.innerHTML = html;
-
- inspectorNode.getElementsByTagName('button')[0].onclick = function() {
- showResultsDelta(index, buildNumber, buildUrl, resultsUrl);
- };
- inspectorNode.getElementsByTagName('button')[1].onclick = function() {
- selectBuild(results, builder, dygraph, index + 1);
- };
- inspectorNode.getElementsByTagName('button')[2].onclick = function() {
- selectBuild(results, builder, dygraph, index - 1);
- };
-}
-
-function showResultsDelta(index, buildNumber, buildUrl, resultsUrl)
-{
- var flakyTests = g_currentBuilderTestResults.flakyTests;
- var currentResults = g_currentBuilderTestResults.resultsByBuild[index];
- var testNames = g_currentBuilderTestResults.testNames;
- var previousResults = g_currentBuilderTestResults.resultsByBuild[index + 1];
- var expectations = expectationsMap();
-
- var deltas = {};
- function addDelta(category, testIndex)
- {
- if (g_currentState.ignoreFlakyTests && flakyTests[testIndex])
- return;
- if (!(category in deltas))
- deltas[category] = [];
- var testName = testNames[testIndex];
- var flakinessDashboardUrl = 'flakiness_dashboard.html' + (location.hash ? location.hash + '&' : '#') + 'tests=' + testName;
- var html = '<a href="' + flakinessDashboardUrl + '">' + testName + '</a>';
- if (flakyTests[testIndex])
- html += ' <span style="color: #f66">possibly flaky</span>';
- deltas[category].push(html);
- }
-
- for (var testIndex = 0; testIndex < currentResults.length; testIndex++) {
- if (currentResults[testIndex] === undefined)
- continue;
-
- if (previousResults[testIndex] !== undefined) {
- if (currentResults[testIndex] == previousResults[testIndex])
- continue;
- addDelta('Was <b>' + expectations[previousResults[testIndex]] + '</b> now <b>' + expectations[currentResults[testIndex]] + '</b>', testIndex);
- } else
- addDelta('Newly <b>' + expectations[currentResults[testIndex]] + '</b>', testIndex);
- }
-
- for (var testIndex = 0; testIndex < previousResults.length; testIndex++) {
- if (previousResults[testIndex] === undefined)
- continue;
- if (currentResults[testIndex] === undefined)
- addDelta('Was <b>' + expectations[previousResults[testIndex]] + '</b>', testIndex);
- }
-
- var html = '';
-
- html += '<head><base target="_blank"></head>';
- html += '<h1>Changes in test results</h1>';
-
- html += '<p>For build <a href="' + buildUrl + '" target="_blank">' +
- buildNumber + '</a> ' + '(<a href="' + resultsUrl +
- '" target="_blank">results</a>)</p>';
-
- for (var deltaCategory in deltas) {
- html += '<p><div>' + deltaCategory + ' (' + deltas[deltaCategory].length + ')</div><ul>';
- deltas[deltaCategory].forEach(function(deltaHtml) {
- html += '<li>' + deltaHtml + '</li>';
- });
- html += '</ul></p>';
- }
-
- var deltaWindow = window.open();
- deltaWindow.document.write(html);
-}
-
-document.addEventListener('keydown', function(e) {
- if (g_currentBuildIndex == -1)
- return;
-
- switch (e.keyIdentifier) {
- case 'Left':
- selectBuild(
- g_resultsByBuilder[g_currentState.builder],
- g_currentState.builder,
- g_dygraph,
- g_currentBuildIndex + 1);
- break;
- case 'Right':
- selectBuild(
- g_resultsByBuilder[g_currentState.builder],
- g_currentState.builder,
- g_dygraph,
- g_currentBuildIndex - 1);
- break;
- }
-});
-</script>
+<script src="timeline_explorer.js"></script>
+<script src="ui.js"></script>
</head>
<body>
<div id="test-type-switcher"></div>
diff --git a/Tools/TestResultServer/static-dashboards/timeline_explorer.js b/Tools/TestResultServer/static-dashboards/timeline_explorer.js
new file mode 100644
index 000000000..dffab47a1
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/timeline_explorer.js
@@ -0,0 +1,480 @@
+// Copyright (C) 2013 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.
+var FAILING_TESTS_DATASET_NAME = 'Failing tests';
+
+var g_dygraph;
+var g_buildIndicesByTimestamp = {};
+var g_currentBuildIndex = -1;
+var g_currentBuilderTestResults;
+
+var defaultDashboardSpecificStateValues = {
+ builder: null,
+ buildTimestamp: -1,
+ ignoreFlakyTests: true
+};
+
+var DB_SPECIFIC_INVALIDATING_PARAMETERS = {
+ 'testType': 'builder',
+ 'group': 'builder'
+};
+
+function generatePage(historyInstance)
+{
+ g_buildIndicesByTimestamp = {};
+ var results = g_resultsByBuilder[historyInstance.dashboardSpecificState.builder || currentBuilderGroup().defaultBuilder()];
+
+ for (var i = 0; i < results[FIXABLE_COUNTS_KEY].length; i++) {
+ var buildDate = new Date(results[TIMESTAMPS_KEY][i] * 1000);
+ g_buildIndicesByTimestamp[buildDate.getTime()] = i;
+ }
+
+ if (historyInstance.dashboardSpecificState.buildTimestamp != -1 && historyInstance.dashboardSpecificState.buildTimestamp in g_buildIndicesByTimestamp) {
+ var newBuildIndex = g_buildIndicesByTimestamp[historyInstance.dashboardSpecificState.buildTimestamp];
+
+ if (newBuildIndex == g_currentBuildIndex) {
+ // This happens when selectBuild is called, which updates the UI
+ // immediately, in addition to updating the location hash (we don't
+ // just rely on the hash change since we don't want to regenerate the
+ // whole page just because the user clicked on something)
+ return;
+ } else if (newBuildIndex)
+ g_currentBuildIndex = newBuildIndex;
+ }
+
+ initCurrentBuilderTestResults();
+
+ $('test-type-switcher').innerHTML = ui.html.testTypeSwitcher( false,
+ ui.html.checkbox('ignoreFlakyTests', 'Ignore flaky tests', historyInstance.dashboardSpecificState.ignoreFlakyTests, 'g_currentBuildIndex = -1')
+ );
+
+ updateTimelineForBuilder();
+}
+
+function handleValidHashParameter(historyInstance, key, value)
+{
+ switch(key) {
+ case 'builder':
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
+ function() { return value in currentBuilders(); });
+ return true;
+ case 'buildTimestamp':
+ historyInstance.dashboardSpecificState.buildTimestamp = parseInt(value, 10);
+ return true;
+ case 'ignoreFlakyTests':
+ historyInstance.dashboardSpecificState.ignoreFlakyTests = value == 'true';
+ return true;
+ default:
+ return false;
+ }
+}
+
+var timelineConfig = {
+ defaultStateValues: defaultDashboardSpecificStateValues,
+ generatePage: generatePage,
+ handleValidHashParameter: handleValidHashParameter,
+ invalidatingHashParameters: DB_SPECIFIC_INVALIDATING_PARAMETERS
+};
+
+// FIXME(jparent): Eventually remove all usage of global history object.
+var g_history = new history.History(timelineConfig);
+g_history.parseCrossDashboardParameters();
+
+function initCurrentBuilderTestResults()
+{
+ var startTime = Date.now();
+ g_currentBuilderTestResults = _decompressResults(g_resultsByBuilder[g_history.dashboardSpecificState.builder || currentBuilderGroup().defaultBuilder()]);
+ console.log( 'Time to get test results by build: ' + (Date.now() - startTime));
+}
+
+function updateTimelineForBuilder()
+{
+ var builder = g_history.dashboardSpecificState.builder || currentBuilderGroup().defaultBuilder();
+ var results = g_resultsByBuilder[builder];
+ var graphData = [];
+
+ var annotations = [];
+
+ // Dygraph prefers to be handed data in chronological order.
+ for (var i = results[FIXABLE_COUNTS_KEY].length - 1; i >= 0; i--) {
+ var buildDate = new Date(results[TIMESTAMPS_KEY][i] * 1000);
+ // FIXME: Find a better way to exclude outliers. This is just so we
+ // exclude runs where every test failed.
+ var failureCount = Math.min(results[FIXABLE_COUNT_KEY][i], 10000);
+
+ if (g_history.dashboardSpecificState.ignoreFlakyTests)
+ failureCount -= g_currentBuilderTestResults.flakyDeltasByBuild[i].total || 0;
+
+ graphData.push([buildDate, failureCount]);
+ }
+
+ var windowWidth = document.documentElement.clientWidth;
+ var windowHeight = document.documentElement.clientHeight;
+ var switcherNode = $('test-type-switcher');
+ var inspectorNode = $('inspector-container');
+ var graphWidth = windowWidth - 20 - inspectorNode.offsetWidth;
+ var graphHeight = windowHeight - switcherNode.offsetTop - switcherNode.offsetHeight - 20;
+
+ var containerNode = $('timeline-container');
+ containerNode.style.height = graphHeight + 'px';
+ containerNode.style.width = graphWidth + 'px';
+ inspectorNode.style.height = graphHeight + 'px';
+
+ g_dygraph = new Dygraph(
+ containerNode,
+ graphData, {
+ labels: ['Date', FAILING_TESTS_DATASET_NAME],
+ width: graphWidth,
+ height: graphHeight,
+ clickCallback: function(event, date) {
+ selectBuild(results, builder, g_dygraph, g_buildIndicesByTimestamp[date]);
+ },
+ drawCallback: function(dygraph, isInitial) {
+ if (isInitial)
+ return;
+ updateBuildIndicator(results, dygraph);
+ },
+ // xValueParser is necessary for annotations to work, even though we
+ // already have Date instances
+ xValueParser: function(input) { return input.getTime(); }
+ });
+ if (annotations.length)
+ g_dygraph.setAnnotations(annotations);
+
+ inspectorNode.style.visibility = 'visible';
+
+ if (g_currentBuildIndex != -1)
+ selectBuild(results, builder, g_dygraph, g_currentBuildIndex);
+}
+
+function selectBuild(results, builder, dygraph, index)
+{
+ g_currentBuildIndex = index;
+ updateBuildIndicator(results, dygraph);
+ updateBuildInspector(results, builder, dygraph, index);
+ g_history.setQueryParameter('buildTimestamp', results[TIMESTAMPS_KEY][index] * 1000);
+}
+
+function updateBuildIndicator(results, dygraph)
+{
+ var indicatorNode = $('indicator');
+
+ if (!indicatorNode) {
+ var containerNode = $('timeline-container');
+ indicatorNode = document.createElement('div');
+ indicatorNode.id = 'indicator';
+ indicatorNode.style.height = containerNode.offsetHeight + 'px';
+ containerNode.appendChild(indicatorNode);
+ }
+
+ if (g_currentBuildIndex == -1)
+ indicatorNode.style.display = 'none';
+ else {
+ indicatorNode.style.display = 'block';
+ var buildDate = new Date(results[TIMESTAMPS_KEY][g_currentBuildIndex] * 1000);
+ var domCoords = dygraph.toDomCoords(buildDate, 0);
+ indicatorNode.style.left = domCoords[0] + 'px';
+ }
+}
+
+function updateBuildInspector(results, builder, dygraph, index)
+{
+ var html = '<table id="inspector-table"><caption>Details</caption>';
+
+ function addRow(label, value)
+ {
+ html += '<tr><td class="label">' + label + '</td><td>' + value + '</td></tr>';
+ }
+
+ // Builder and results links
+ var buildNumber = results[BUILD_NUMBERS_KEY][index];
+ addRow('', '');
+ var master = builderMaster(builder);
+ var buildUrl = master.logPath(builder, results[BUILD_NUMBERS_KEY][index]);
+ var resultsUrl = 'http://build.webkit.org/results/' + builder + '/r' + results[WEBKIT_REVISIONS_KEY][index] +
+ ' (' + results[BUILD_NUMBERS_KEY][index] + ')';
+
+ addRow('Build:', '<a href="' + buildUrl + '" target="_blank">' + buildNumber + '</a> (<a href="' + resultsUrl + '" target="_blank">results</a>)');
+
+ // Revision link
+ addRow('WebKit change:', ui.html.webKitRevisionLink(results, index));
+
+ // Test status/counts
+ addRow('', '');
+
+ function addNumberRow(label, currentValue, previousValue)
+ {
+ var delta = currentValue - previousValue;
+ var deltaText = ''
+ if (delta < 0)
+ deltaText = ' <span class="delta negative">' + delta + '</span>';
+ else if (delta > 0)
+ deltaText = ' <span class="delta positive">+' + delta + '</span>';
+
+ addRow(label, currentValue + deltaText);
+ }
+
+ var expectations = expectationsMap();
+ var flakyDeltasByBuild = g_currentBuilderTestResults.flakyDeltasByBuild;
+ for (var expectationKey in expectations) {
+ if (expectationKey in results[FIXABLE_COUNTS_KEY][index]) {
+ var currentCount = results[FIXABLE_COUNTS_KEY][index][expectationKey];
+ var previousCount = results[FIXABLE_COUNTS_KEY][index + 1][expectationKey];
+ if (g_history.dashboardSpecificState.ignoreFlakyTests) {
+ currentCount -= flakyDeltasByBuild[index][expectationKey] || 0;
+ previousCount -= flakyDeltasByBuild[index + 1][expectationKey] || 0;
+ }
+ addNumberRow(expectations[expectationKey], currentCount, previousCount);
+ }
+ }
+
+ var currentTotal = results[FIXABLE_COUNT_KEY][index];
+ var previousTotal = results[FIXABLE_COUNT_KEY][index + 1];
+ if (g_history.dashboardSpecificState.ignoreFlakyTests) {
+ currentTotal -= flakyDeltasByBuild[index].total || 0;
+ previousTotal -= flakyDeltasByBuild[index + 1].total || 0;
+ }
+ addNumberRow('Total failing tests:', currentTotal, previousTotal);
+
+ html += '</table>';
+
+ html += '<div id="changes-button" class="buttons">';
+ html += '<button>Show changed test results</button>';
+ html += '</div>';
+
+ html += '<div id="build-buttons" class="buttons">';
+ html += '<button>Previous build</button> <button>Next build</button>';
+ html += '</div>';
+
+ var inspectorNode = $('inspector-container');
+ inspectorNode.innerHTML = html;
+
+ inspectorNode.getElementsByTagName('button')[0].onclick = function() {
+ showResultsDelta(index, buildNumber, buildUrl, resultsUrl);
+ };
+ inspectorNode.getElementsByTagName('button')[1].onclick = function() {
+ selectBuild(results, builder, dygraph, index + 1);
+ };
+ inspectorNode.getElementsByTagName('button')[2].onclick = function() {
+ selectBuild(results, builder, dygraph, index - 1);
+ };
+}
+
+function showResultsDelta(index, buildNumber, buildUrl, resultsUrl)
+{
+ var flakyTests = g_currentBuilderTestResults.flakyTests;
+ var currentResults = g_currentBuilderTestResults.resultsByBuild[index];
+ var testNames = g_currentBuilderTestResults.testNames;
+ var previousResults = g_currentBuilderTestResults.resultsByBuild[index + 1];
+ var expectations = expectationsMap();
+
+ var deltas = {};
+ function addDelta(category, testIndex)
+ {
+ if (g_history.dashboardSpecificState.ignoreFlakyTests && flakyTests[testIndex])
+ return;
+ if (!(category in deltas))
+ deltas[category] = [];
+ var testName = testNames[testIndex];
+ var flakinessDashboardUrl = 'flakiness_dashboard.html' + (location.hash ? location.hash + '&' : '#') + 'tests=' + testName;
+ var html = '<a href="' + flakinessDashboardUrl + '">' + testName + '</a>';
+ if (flakyTests[testIndex])
+ html += ' <span style="color: #f66">possibly flaky</span>';
+ deltas[category].push(html);
+ }
+
+ for (var testIndex = 0; testIndex < currentResults.length; testIndex++) {
+ if (currentResults[testIndex] === undefined)
+ continue;
+
+ if (previousResults[testIndex] !== undefined) {
+ if (currentResults[testIndex] == previousResults[testIndex])
+ continue;
+ addDelta('Was <b>' + expectations[previousResults[testIndex]] + '</b> now <b>' + expectations[currentResults[testIndex]] + '</b>', testIndex);
+ } else
+ addDelta('Newly <b>' + expectations[currentResults[testIndex]] + '</b>', testIndex);
+ }
+
+ for (var testIndex = 0; testIndex < previousResults.length; testIndex++) {
+ if (previousResults[testIndex] === undefined)
+ continue;
+ if (currentResults[testIndex] === undefined)
+ addDelta('Was <b>' + expectations[previousResults[testIndex]] + '</b>', testIndex);
+ }
+
+ var html = '';
+
+ html += '<head><base target="_blank"></head>';
+ html += '<h1>Changes in test results</h1>';
+
+ html += '<p>For build <a href="' + buildUrl + '" target="_blank">' +
+ buildNumber + '</a> ' + '(<a href="' + resultsUrl +
+ '" target="_blank">results</a>)</p>';
+
+ for (var deltaCategory in deltas) {
+ html += '<p><div>' + deltaCategory + ' (' + deltas[deltaCategory].length + ')</div><ul>';
+ deltas[deltaCategory].forEach(function(deltaHtml) {
+ html += '<li>' + deltaHtml + '</li>';
+ });
+ html += '</ul></p>';
+ }
+
+ var deltaWindow = window.open();
+ deltaWindow.document.write(html);
+}
+
+var _FAILURE_EXPECTATIONS = {
+ 'T': 1,
+ 'F': 1,
+ 'C': 1,
+ 'I': 1,
+ 'Z': 1
+};
+
+// "Decompresses" the RLE-encoding of test results so that we can query it
+// by build index and test name.
+//
+// @param {Object} results results for the current builder
+// @return Object with these properties:
+// - testNames: array mapping test index to test names.
+// - resultsByBuild: array of builds, for each build a (sparse) array of test results by test index.
+// - flakyTests: array with the boolean value true at test indices that are considered flaky (more than one single-build failure).
+// - flakyDeltasByBuild: array of builds, for each build a count of flaky test results by expectation, as well as a total.
+function _decompressResults(builderResults)
+{
+ var builderTestResults = builderResults[TESTS_KEY];
+ var buildCount = builderResults[FIXABLE_COUNTS_KEY].length;
+ var resultsByBuild = new Array(buildCount);
+ var flakyDeltasByBuild = new Array(buildCount);
+
+ // Pre-sizing the test result arrays for each build saves us ~250ms
+ var testCount = 0;
+ for (var testName in builderTestResults)
+ testCount++;
+ for (var i = 0; i < buildCount; i++) {
+ resultsByBuild[i] = new Array(testCount);
+ resultsByBuild[i][testCount - 1] = undefined;
+ flakyDeltasByBuild[i] = {};
+ }
+
+ // Using indices instead of the full test names for each build saves us
+ // ~1500ms
+ var testIndex = 0;
+ var testNames = new Array(testCount);
+ var flakyTests = new Array(testCount);
+
+ // Decompress and "invert" test results (by build instead of by test) and
+ // determine which are flaky.
+ for (var testName in builderTestResults) {
+ var oneBuildFailureCount = 0;
+
+ testNames[testIndex] = testName;
+ var testResults = builderTestResults[testName].results;
+ for (var i = 0, rleResult, currentBuildIndex = 0; (rleResult = testResults[i]) && currentBuildIndex < buildCount; i++) {
+ var count = rleResult[RLE.LENGTH];
+ var value = rleResult[RLE.VALUE];
+
+ if (count == 1 && value in _FAILURE_EXPECTATIONS)
+ oneBuildFailureCount++;
+
+ for (var j = 0; j < count; j++) {
+ resultsByBuild[currentBuildIndex++][testIndex] = value;
+ if (currentBuildIndex == buildCount)
+ break;
+ }
+ }
+
+ if (oneBuildFailureCount > 2)
+ flakyTests[testIndex] = true;
+
+ testIndex++;
+ }
+
+ // Now that we know which tests are flaky, count the test results that are
+ // from flaky tests for each build.
+ testIndex = 0;
+ for (var testName in builderTestResults) {
+ if (!flakyTests[testIndex++])
+ continue;
+
+ var testResults = builderTestResults[testName].results;
+ for (var i = 0, rleResult, currentBuildIndex = 0; (rleResult = testResults[i]) && currentBuildIndex < buildCount; i++) {
+ var count = rleResult[RLE.LENGTH];
+ var value = rleResult[RLE.VALUE];
+
+ for (var j = 0; j < count; j++) {
+ var buildTestResults = flakyDeltasByBuild[currentBuildIndex++];
+ function addFlakyDelta(key)
+ {
+ if (!(key in buildTestResults))
+ buildTestResults[key] = 0;
+ buildTestResults[key]++;
+ }
+ addFlakyDelta(value);
+ if (value != 'P' && value != 'N')
+ addFlakyDelta('total');
+ if (currentBuildIndex == buildCount)
+ break;
+ }
+ }
+ }
+
+ return {
+ testNames: testNames,
+ resultsByBuild: resultsByBuild,
+ flakyTests: flakyTests,
+ flakyDeltasByBuild: flakyDeltasByBuild
+ };
+}
+
+document.addEventListener('keydown', function(e) {
+ if (g_currentBuildIndex == -1)
+ return;
+
+ var builder = g_history.dashboardSpecificState.builder || currentBuilderGroup().defaultBuilder();
+ switch (e.keyIdentifier) {
+ case 'Left':
+ selectBuild(
+ g_resultsByBuilder[builder],
+ builder,
+ g_dygraph,
+ g_currentBuildIndex + 1);
+ break;
+ case 'Right':
+ selectBuild(
+ g_resultsByBuilder[builder],
+ builder,
+ g_dygraph,
+ g_currentBuildIndex - 1);
+ break;
+ }
+});
+
+window.addEventListener('load', function() {
+ var resourceLoader = new loader.Loader();
+ resourceLoader.load();
+}, false);
diff --git a/Tools/TestResultServer/static-dashboards/treemap.html b/Tools/TestResultServer/static-dashboards/treemap.html
index aa7ae437e..acf9af99a 100644
--- a/Tools/TestResultServer/static-dashboards/treemap.html
+++ b/Tools/TestResultServer/static-dashboards/treemap.html
@@ -109,256 +109,13 @@ td {
</style>
<script src="builders.js"></script>
<script src="loader.js"></script>
+<script src="string.js"></script>
+<script src="history.js"></script>
<script src="dashboard_base.js"></script>
-<script src='webtreemap.js'></script>
+<script src="ui.js"></script>
+<script src="treemap.js"></script>
+<script src="webtreemap.js"></script>
<div id='header-container'></div>
<p>Click on a box to zoom in. Click on the outermost box to zoom out. <a href="" onclick="showAverages();return false;">Show averages</a></p>
<div id='map'></div>
-
-<script>
-var TEST_URL_BASE_PATH = "http://svn.webkit.org/repository/webkit/trunk/";
-
-function humanReadableTime(milliseconds)
-{
- if (milliseconds < 1000)
- return Math.floor(milliseconds) + 'ms';
- else if (milliseconds < 60000)
- return (milliseconds / 1000).toPrecision(2) + 's';
-
- var minutes = Math.floor(milliseconds / 60000);
- var seconds = Math.floor((milliseconds - minutes * 60000) / 1000);
- return minutes + 'm' + seconds + 's';
-}
-
-// This looks like:
-// { "data": {"$area": (sum of all timings)},
-// "name": (name of this node),
-// "children": [ (child nodes, in the same format as this) ] }
-// childCount is added just to be includes in the node's name
-function convertToWebTreemapFormat(treename, tree, path)
-{
- var total = 0;
- var childCount = 0;
- var children = [];
- for (var name in tree) {
- var treeNode = tree[name];
- if (typeof treeNode == "number") {
- var time = treeNode;
- var node = {
- "data": {"$area": time},
- "name": name + " (" + humanReadableTime(time) + ")"
- };
- children.push(node);
- total += time;
- childCount++;
- } else {
- var newPath = path ? path + '/' + name : name;
- var subtree = convertToWebTreemapFormat(name, treeNode, newPath);
- children.push(subtree);
- total += subtree["data"]["$area"];
- childCount += subtree["childCount"];
- }
- }
-
- children.sort(function(a, b) {
- aTime = a.data["$area"]
- bTime = b.data["$area"]
- return bTime - aTime;
- });
-
- return {
- "data": {"$area": total},
- "name": treename + " (" + humanReadableTime(total) + " - " + childCount + " tests)",
- "children": children,
- "childCount": childCount,
- "path": path
- };
-}
-
-function listOfAllNonLeafNodes(tree, list)
-{
- if (!tree.children)
- return;
-
- if (!list)
- list = [];
- list.push(tree);
-
- tree.children.forEach(function(child) {
- listOfAllNonLeafNodes(child, list);
- });
- return list;
-}
-
-function reverseSortByAverage(list)
-{
- list.sort(function(a, b) {
- var avgA = a.data['$area'] / a.childCount;
- var avgB = b.data['$area'] / b.childCount;
- return avgB - avgA;
- });
-}
-
-function showAverages()
-{
- if (!document.getElementById('map'))
- return;
-
- var table = document.createElement('table');
- table.innerHTML = '<th>directory</th><th># tests</th><th>avg time / test</th>';
-
- var allNodes = listOfAllNonLeafNodes(g_webTree);
- reverseSortByAverage(allNodes);
- allNodes.forEach(function(node) {
- var average = node.data['$area'] / node.childCount;
- if (average > 100 && node.childCount != 1) {
- var tr = document.createElement('tr');
- tr.innerHTML = '<td></td><td>' + node.childCount + '</td><td>' + humanReadableTime(average) + '</td>';
- tr.querySelector('td').innerText = node.path;
- table.appendChild(tr);
- }
- });
-
- var map = document.getElementById('map');
- map.parentNode.replaceChild(table, map);
-}
-
-var g_isGeneratingPage = false;
-var g_webTree;
-
-function generatePage()
-{
- $('header-container').innerHTML = htmlForTestTypeSwitcher();
-
- g_isGeneratingPage = true;
-
- var rawTree = g_resultsByBuilder[g_currentState.builder];
- g_webTree = convertToWebTreemapFormat('LayoutTests', rawTree);
- appendTreemap($('map'), g_webTree);
-
- if (g_currentState.treemapfocus)
- focusPath(g_webTree, g_currentState.treemapfocus)
-
- g_isGeneratingPage = false;
-}
-
-function focusPath(tree, path)
-{
- var parts = decodeURIComponent(path).split('/');
- if (extractName(tree) != parts[0]) {
- console.error('Could not focus tree rooted at ' + parts[0]);
- return;
- }
-
- for (var i = 1; i < parts.length; i++) {
- var children = tree.children;
- for (var j = 0; j < children.length; j++) {
- var child = children[j];
- if (extractName(child) == parts[i]) {
- tree = child;
- focus(tree);
- break;
- }
- }
- if (j == children.length) {
- console.error('Could not find tree at ' + parts[i]);
- break;
- }
- }
-
-}
-
-function handleValidHashParameter(key, value)
-{
- switch(key) {
- case 'builder':
- validateParameter(g_currentState, key, value,
- function() { return value in g_builders; });
- return true;
-
- case 'treemapfocus':
- validateParameter(g_currentState, key, value,
- function() {
- // FIXME: There's probably a simpler regexp here. Just trying to match ascii + forward-slash.
- // e.g. LayoutTests/foo/bar.html
- return (value.match(/^(\w+\/\w*)*$/));
- });
- return true;
-
- default:
- return false;
- }
-}
-
-g_defaultDashboardSpecificStateValues = {
- treemapfocus: '',
-}
-
-function handleQueryParameterChange(params)
-{
- for (var param in params) {
- if (param != 'treemapfocus') {
- $('map').innerHTML = 'Loading...';
- return true;
- }
- }
- return false;
-}
-
-// Overrides handleResourceLoadError in dashboard_base.js.
-function handleResourceLoadError(builderName, e)
-{
- $('map').innerHTML = '<span class=error>Could not load data for ' + builderName + '. ' +
- 'Either there was a server-side error or ' + builderName + ' does not run ' +
- g_crossDashboardState.testType + '.</span>';
-}
-
-function extractName(node)
-{
- return node.name.split(' ')[0];
-}
-
-function fullName(node)
-{
- var buffer = [extractName(node)];
- while (node.parent) {
- node = node.parent;
- buffer.unshift(extractName(node));
- }
- return buffer.join('/');
-}
-
-function handleFocus(tree)
-{
- var currentlyFocusedNode = $('focused-leaf');
- if (currentlyFocusedNode)
- currentlyFocusedNode.id = '';
-
- if (!tree.children)
- tree.dom.id = 'focused-leaf';
-
- var name = fullName(tree);
-
- if (!tree.children && !tree.extraDom && isLayoutTestResults()) {
- tree.extraDom = document.createElement('pre');
- tree.extraDom.className = 'extra-dom';
- tree.dom.appendChild(tree.extraDom);
-
- loader.request(TEST_URL_BASE_PATH + name,
- function(xhr) {
- tree.extraDom.onmousedown = function(e) {
- e.stopPropagation();
- };
- tree.extraDom.textContent = xhr.responseText;
- },
- function (xhr) {
- tree.extraDom.textContent = "Could not load test."
- });
- }
-
- // We don't want the focus calls during generatePage to try to modify the query state.
- if (!g_isGeneratingPage)
- setQueryParameter('treemapfocus', name);
-}
-</script>
diff --git a/Tools/TestResultServer/static-dashboards/treemap.js b/Tools/TestResultServer/static-dashboards/treemap.js
new file mode 100644
index 000000000..db99b8ab8
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/treemap.js
@@ -0,0 +1,287 @@
+// Copyright (C) 2013 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.
+
+var defaultDashboardSpecificStateValues = {
+ builder: null,
+ treemapfocus: '',
+};
+
+var DB_SPECIFIC_INVALIDATING_PARAMETERS = {
+ 'testType': 'builder',
+ 'group': 'builder'
+};
+
+function generatePage(historyInstance)
+{
+ $('header-container').innerHTML = ui.html.testTypeSwitcher();
+
+ g_isGeneratingPage = true;
+
+ var rawTree = g_resultsByBuilder[historyInstance.dashboardSpecificState.builder || currentBuilderGroup().defaultBuilder()];
+ g_webTree = convertToWebTreemapFormat('LayoutTests', rawTree);
+ appendTreemap($('map'), g_webTree);
+
+ if (historyInstance.dashboardSpecificState.treemapfocus)
+ focusPath(g_webTree, historyInstance.dashboardSpecificState.treemapfocus)
+
+ g_isGeneratingPage = false;
+}
+
+function handleValidHashParameter(historyInstance, key, value)
+{
+ switch(key) {
+ case 'builder':
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
+ function() { return value in currentBuilders(); });
+ return true;
+
+ case 'treemapfocus':
+ history.validateParameter(historyInstance.dashboardSpecificState, key, value,
+ function() {
+ // FIXME: There's probably a simpler regexp here. Just trying to match ascii + forward-slash.
+ // e.g. LayoutTests/foo/bar.html
+ return (value.match(/^(\w+\/\w*)*$/));
+ });
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+function handleQueryParameterChange(historyInstance, params)
+{
+ for (var param in params) {
+ if (param != 'treemapfocus') {
+ $('map').innerHTML = 'Loading...';
+ return true;
+ }
+ }
+ return false;
+}
+
+var treemapConfig = {
+ defaultStateValues: defaultDashboardSpecificStateValues,
+ generatePage: generatePage,
+ handleValidHashParameter: handleValidHashParameter,
+ handleQueryParameterChange: handleQueryParameterChange,
+ invalidatingHashParameters: DB_SPECIFIC_INVALIDATING_PARAMETERS
+};
+
+// FIXME(jparent): Eventually remove all usage of global history object.
+var g_history = new history.History(treemapConfig);
+g_history.parseCrossDashboardParameters();
+
+var TEST_URL_BASE_PATH = "http://svn.webkit.org/repository/webkit/trunk/";
+
+function humanReadableTime(milliseconds)
+{
+ if (milliseconds < 1000)
+ return Math.floor(milliseconds) + 'ms';
+ else if (milliseconds < 60000)
+ return (milliseconds / 1000).toPrecision(2) + 's';
+
+ var minutes = Math.floor(milliseconds / 60000);
+ var seconds = Math.floor((milliseconds - minutes * 60000) / 1000);
+ return minutes + 'm' + seconds + 's';
+}
+
+// This looks like:
+// { "data": {"$area": (sum of all timings)},
+// "name": (name of this node),
+// "children": [ (child nodes, in the same format as this) ] }
+// childCount is added just to be includes in the node's name
+function convertToWebTreemapFormat(treename, tree, path)
+{
+ var total = 0;
+ var childCount = 0;
+ var children = [];
+ for (var name in tree) {
+ var treeNode = tree[name];
+ if (typeof treeNode == "number") {
+ var time = treeNode;
+ var node = {
+ "data": {"$area": time},
+ "name": name + " (" + humanReadableTime(time) + ")"
+ };
+ children.push(node);
+ total += time;
+ childCount++;
+ } else {
+ var newPath = path ? path + '/' + name : name;
+ var subtree = convertToWebTreemapFormat(name, treeNode, newPath);
+ children.push(subtree);
+ total += subtree["data"]["$area"];
+ childCount += subtree["childCount"];
+ }
+ }
+
+ children.sort(function(a, b) {
+ aTime = a.data["$area"]
+ bTime = b.data["$area"]
+ return bTime - aTime;
+ });
+
+ return {
+ "data": {"$area": total},
+ "name": treename + " (" + humanReadableTime(total) + " - " + childCount + " tests)",
+ "children": children,
+ "childCount": childCount,
+ "path": path
+ };
+}
+
+function listOfAllNonLeafNodes(tree, list)
+{
+ if (!tree.children)
+ return;
+
+ if (!list)
+ list = [];
+ list.push(tree);
+
+ tree.children.forEach(function(child) {
+ listOfAllNonLeafNodes(child, list);
+ });
+ return list;
+}
+
+function reverseSortByAverage(list)
+{
+ list.sort(function(a, b) {
+ var avgA = a.data['$area'] / a.childCount;
+ var avgB = b.data['$area'] / b.childCount;
+ return avgB - avgA;
+ });
+}
+
+function showAverages()
+{
+ if (!document.getElementById('map'))
+ return;
+
+ var table = document.createElement('table');
+ table.innerHTML = '<th>directory</th><th># tests</th><th>avg time / test</th>';
+
+ var allNodes = listOfAllNonLeafNodes(g_webTree);
+ reverseSortByAverage(allNodes);
+ allNodes.forEach(function(node) {
+ var average = node.data['$area'] / node.childCount;
+ if (average > 100 && node.childCount != 1) {
+ var tr = document.createElement('tr');
+ tr.innerHTML = '<td></td><td>' + node.childCount + '</td><td>' + humanReadableTime(average) + '</td>';
+ tr.querySelector('td').innerText = node.path;
+ table.appendChild(tr);
+ }
+ });
+
+ var map = document.getElementById('map');
+ map.parentNode.replaceChild(table, map);
+}
+
+var g_isGeneratingPage = false;
+var g_webTree;
+
+function focusPath(tree, path)
+{
+ var parts = decodeURIComponent(path).split('/');
+ if (extractName(tree) != parts[0]) {
+ console.error('Could not focus tree rooted at ' + parts[0]);
+ return;
+ }
+
+ for (var i = 1; i < parts.length; i++) {
+ var children = tree.children;
+ for (var j = 0; j < children.length; j++) {
+ var child = children[j];
+ if (extractName(child) == parts[i]) {
+ tree = child;
+ focus(tree);
+ break;
+ }
+ }
+ if (j == children.length) {
+ console.error('Could not find tree at ' + parts[i]);
+ break;
+ }
+ }
+
+}
+
+function extractName(node)
+{
+ return node.name.split(' ')[0];
+}
+
+function fullName(node)
+{
+ var buffer = [extractName(node)];
+ while (node.parent) {
+ node = node.parent;
+ buffer.unshift(extractName(node));
+ }
+ return buffer.join('/');
+}
+
+function handleFocus(tree)
+{
+ var currentlyFocusedNode = $('focused-leaf');
+ if (currentlyFocusedNode)
+ currentlyFocusedNode.id = '';
+
+ if (!tree.children)
+ tree.dom.id = 'focused-leaf';
+
+ var name = fullName(tree);
+
+ if (!tree.children && !tree.extraDom && g_history.isLayoutTestResults()) {
+ tree.extraDom = document.createElement('pre');
+ tree.extraDom.className = 'extra-dom';
+ tree.dom.appendChild(tree.extraDom);
+
+ loader.request(TEST_URL_BASE_PATH + name,
+ function(xhr) {
+ tree.extraDom.onmousedown = function(e) {
+ e.stopPropagation();
+ };
+ tree.extraDom.textContent = xhr.responseText;
+ },
+ function (xhr) {
+ tree.extraDom.textContent = "Could not load test."
+ });
+ }
+
+ // We don't want the focus calls during generatePage to try to modify the query state.
+ if (!g_isGeneratingPage)
+ g_history.setQueryParameter('treemapfocus', name);
+}
+
+window.addEventListener('load', function() {
+ var resourceLoader = new loader.Loader();
+ resourceLoader.load();
+}, false);
diff --git a/Tools/TestResultServer/static-dashboards/ui.js b/Tools/TestResultServer/static-dashboards/ui.js
new file mode 100644
index 000000000..8907986fb
--- /dev/null
+++ b/Tools/TestResultServer/static-dashboards/ui.js
@@ -0,0 +1,225 @@
+// Copyright (C) 2013 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.
+
+var ui = ui || {};
+
+(function() {
+
+ui.popup = {};
+
+ui.popup.hide = function()
+{
+ var popup = $('popup');
+ if (popup) {
+ popup.parentNode.removeChild(popup);
+ document.removeEventListener('mousedown', ui.popup._handleMouseDown, false);
+ }
+}
+
+ui.popup.show = function(target, html)
+{
+ var popup = $('popup');
+ if (!popup) {
+ popup = document.createElement('div');
+ popup.id = 'popup';
+ document.body.appendChild(popup);
+ document.addEventListener('mousedown', ui.popup._handleMouseDown, false);
+ }
+
+ // Set html first so that we can get accurate size metrics on the popup.
+ popup.innerHTML = html;
+
+ var targetRect = target.getBoundingClientRect();
+
+ var x = Math.min(targetRect.left - 10, document.documentElement.clientWidth - popup.offsetWidth);
+ x = Math.max(0, x);
+ popup.style.left = x + document.body.scrollLeft + 'px';
+
+ var y = targetRect.top + targetRect.height;
+ if (y + popup.offsetHeight > document.documentElement.clientHeight)
+ y = targetRect.top - popup.offsetHeight;
+ y = Math.max(0, y);
+ popup.style.top = y + document.body.scrollTop + 'px';
+}
+
+ui.popup._handleMouseDown = function(e) {
+ // Clear the open popup, unless the click was inside the popup.
+ var popup = $('popup');
+ if (popup && e.target != popup && !(popup.compareDocumentPosition(e.target) & 16))
+ ui.popup.hide();
+}
+
+ui.html = {};
+
+ui.html.checkbox = function(queryParameter, label, isChecked, opt_extraJavaScript)
+{
+ var js = opt_extraJavaScript || '';
+ return '<label style="padding-left: 2em">' +
+ '<input type="checkbox" onchange="g_history.toggleQueryParameter(\'' + queryParameter + '\');' + js + '" ' +
+ (isChecked ? 'checked' : '') + '>' + label +
+ '</label> ';
+}
+
+ui.html.select = function(label, queryParameter, options)
+{
+ var html = '<label style="padding-left: 2em">' + label + ': ' +
+ '<select onchange="g_history.setQueryParameter(\'' + queryParameter + '\', this[this.selectedIndex].value)">';
+
+ for (var i = 0; i < options.length; i++) {
+ var value = options[i];
+ html += '<option value="' + value + '" ' +
+ (g_history.queryParameterValue(queryParameter) == value ? 'selected' : '') +
+ '>' + value + '</option>'
+ }
+ html += '</select></label> ';
+ return html;
+}
+
+// Returns the HTML for the select element to switch to different testTypes.
+ui.html.testTypeSwitcher = function(opt_noBuilderMenu, opt_extraHtml, opt_includeNoneBuilder)
+{
+ var html = '<div style="border-bottom:1px dashed">';
+ html += '' +
+ ui.html._dashboardLink('Stats', 'aggregate_results.html') +
+ ui.html._dashboardLink('Timeline', 'timeline_explorer.html') +
+ ui.html._dashboardLink('Results', 'flakiness_dashboard.html') +
+ ui.html._dashboardLink('Treemap', 'treemap.html');
+
+ html += ui.html.select('Test type', 'testType', TEST_TYPES);
+
+ if (!opt_noBuilderMenu) {
+ var buildersForMenu = Object.keys(currentBuilders());
+ if (opt_includeNoneBuilder)
+ buildersForMenu.unshift('--------------');
+ html += ui.html.select('Builder', 'builder', buildersForMenu);
+ }
+
+ html += ui.html.select('Group', 'group',
+ Object.keys(currentBuilderGroupCategory()));
+
+ if (!history.isTreeMap())
+ html += ui.html.checkbox('showAllRuns', 'Show all runs', g_history.crossDashboardState.showAllRuns);
+
+ if (opt_extraHtml)
+ html += opt_extraHtml;
+ return html + '</div>';
+}
+
+ui.html._loadDashboard = function(fileName)
+{
+ var pathName = window.location.pathname;
+ pathName = pathName.substring(0, pathName.lastIndexOf('/') + 1);
+ window.location = pathName + fileName + window.location.hash;
+}
+
+ui.html._topLink = function(html, onClick, isSelected)
+{
+ var cssText = isSelected ? 'font-weight: bold;' : 'color:blue;text-decoration:underline;cursor:pointer;';
+ cssText += 'margin: 0 5px;';
+ return '<span style="' + cssText + '" onclick="' + onClick + '">' + html + '</span>';
+}
+
+ui.html._dashboardLink = function(html, fileName)
+{
+ var pathName = window.location.pathname;
+ var currentFileName = pathName.substring(pathName.lastIndexOf('/') + 1);
+ var isSelected = currentFileName == fileName;
+ var onClick = 'ui.html._loadDashboard(\'' + fileName + '\')';
+ return ui.html._topLink(html, onClick, isSelected);
+}
+
+ui.html._revisionLink = function(results, index, key, singleUrlTemplate, rangeUrlTemplate)
+{
+ var currentRevision = parseInt(results[key][index], 10);
+ var previousRevision = parseInt(results[key][index + 1], 10);
+
+ function singleUrl()
+ {
+ return singleUrlTemplate.replace('<rev>', currentRevision);
+ }
+
+ function rangeUrl()
+ {
+ return rangeUrlTemplate.replace('<rev1>', currentRevision).replace('<rev2>', previousRevision + 1);
+ }
+
+ if (currentRevision == previousRevision)
+ return 'At <a href="' + singleUrl() + '">r' + currentRevision + '</a>';
+ else if (currentRevision - previousRevision == 1)
+ return '<a href="' + singleUrl() + '">r' + currentRevision + '</a>';
+ else
+ return '<a href="' + rangeUrl() + '">r' + (previousRevision + 1) + ' to r' + currentRevision + '</a>';
+}
+
+ui.html.chromiumRevisionLink = function(results, index)
+{
+ return ui.html._revisionLink(
+ results,
+ index,
+ CHROME_REVISIONS_KEY,
+ 'http://src.chromium.org/viewvc/chrome?view=rev&revision=<rev>',
+ 'http://build.chromium.org/f/chromium/perf/dashboard/ui/changelog.html?url=/trunk/src&range=<rev2>:<rev1>&mode=html');
+}
+
+ui.html.webKitRevisionLink = function(results, index)
+{
+ return ui.html._revisionLink(
+ results,
+ index,
+ WEBKIT_REVISIONS_KEY,
+ 'http://trac.webkit.org/changeset/<rev>',
+ 'http://trac.webkit.org/log/trunk/?rev=<rev1>&stop_rev=<rev2>&limit=100&verbose=on');
+}
+
+
+ui.Errors = function() {
+ this._messages = '';
+ // Element to display the errors within.
+ this._containerElement = null;
+}
+
+ui.Errors.prototype = {
+ show: function()
+ {
+ if (!this._containerElement) {
+ this._containerElement = document.createElement('H2');
+ this._containerElement.style.color = 'red';
+ this._containerElement.id = 'errors';
+ document.body.appendChild(this._containerElement);
+ }
+
+ this._containerElement.innerHTML = this._messages;
+ },
+ // Record a new error message.
+ addError: function(message)
+ {
+ this._messages += message + '<br>';
+ }
+}
+
+})(); \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/CMakeLists.txt b/Tools/TestWebKitAPI/CMakeLists.txt
index 16033ec15..23f2184ce 100644
--- a/Tools/TestWebKitAPI/CMakeLists.txt
+++ b/Tools/TestWebKitAPI/CMakeLists.txt
@@ -1,6 +1,6 @@
-SET(TESTWEBKITAPI_DIR "${TOOLS_DIR}/TestWebKitAPI")
+set(TESTWEBKITAPI_DIR "${TOOLS_DIR}/TestWebKitAPI")
-INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}
+include_directories(${CMAKE_BINARY_DIR}
${TESTWEBKITAPI_DIR}
${CMAKE_SOURCE_DIR}/Source
${DERIVED_SOURCES_WEBCORE_DIR}
@@ -16,24 +16,29 @@ INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}
${WEBCORE_DIR}/platform/network
${WEBKIT2_DIR}/Shared
${WEBKIT2_DIR}/Shared/API/c
+ ${WEBKIT2_DIR}/Shared/Plugins
${WEBKIT2_DIR}/UIProcess
+ ${WEBKIT2_DIR}/WebProcess/InjectedBundle
+ ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c
${WTF_DIR}
)
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
-ADD_LIBRARY(TestWebKitAPIInjectedBundle SHARED
+add_library(TestWebKitAPIInjectedBundle SHARED
${bundle_harness_SOURCES}
${TESTWEBKITAPI_DIR}/InjectedBundleController.cpp
${TESTWEBKITAPI_DIR}/InjectedBundleMain.cpp
${TESTWEBKITAPI_DIR}/PlatformUtilities.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/CanHandleRequest_Bundle.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp
@@ -46,25 +51,31 @@ ADD_LIBRARY(TestWebKitAPIInjectedBundle SHARED
${TESTWEBKITAPI_DIR}/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/UserMessage_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WKConnection_Bundle.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillLoad_Bundle.cpp
${TESTWEBKITAPI_DIR}/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp
)
-TARGET_LINK_LIBRARIES(TestWebKitAPIInjectedBundle ${WTF_LIBRARY_NAME})
-ADD_DEPENDENCIES(TestWebKitAPIInjectedBundle ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+set(TestWebKitAPI_LIBRARIES
+ WTF
+ WebKit2
+)
+
+target_link_libraries(TestWebKitAPIInjectedBundle ${TestWebKitAPI_LIBRARIES})
+add_dependencies(TestWebKitAPIInjectedBundle ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
-GET_PROPERTY(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
+get_property(TestWebKitAPIInjectedBundle_PATH TARGET TestWebKitAPIInjectedBundle PROPERTY LOCATION)
-ADD_DEFINITIONS(-DGTEST_LINKED_AS_SHARED_LIBRARY=1
+add_definitions(-DGTEST_LINKED_AS_SHARED_LIBRARY=1
-DTEST_WEBKIT2_RESOURCES_DIR=\"${TESTWEBKITAPI_DIR}/Tests/WebKit2\"
-DTEST_INJECTED_BUNDLE_PATH=\"${TestWebKitAPIInjectedBundle_PATH}\"
)
-SET(test_wtf_LIBRARIES
- ${WTF_LIBRARY_NAME}
+set(test_wtf_LIBRARIES
+ WTF
gtest
)
-ADD_EXECUTABLE(test_wtf
+add_executable(test_wtf
${test_main_SOURCES}
${TESTWEBKITAPI_DIR}/TestsController.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/AtomicString.cpp
@@ -73,12 +84,15 @@ ADD_EXECUTABLE(test_wtf
${TESTWEBKITAPI_DIR}/Tests/WTF/Functional.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/HashMap.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/IntegerToStringConversion.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/ListHashSet.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/MD5.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/MathExtras.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/MetaAllocator.cpp
- ${TESTWEBKITAPI_DIR}/Tests/WTF/MemoryInstrumentationTest.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/RedBlackTree.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/SHA1.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/SaturatedArithmeticOperations.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/StringBuilder.cpp
+ ${TESTWEBKITAPI_DIR}/Tests/WTF/StringHasher.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/StringImpl.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/StringOperators.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/TemporaryChange.cpp
@@ -88,29 +102,25 @@ ADD_EXECUTABLE(test_wtf
${TESTWEBKITAPI_DIR}/Tests/WTF/WTFString.cpp
)
-TARGET_LINK_LIBRARIES(test_wtf ${test_wtf_LIBRARIES})
-ADD_DEPENDENCIES(test_wtf ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
-ADD_TEST(test_wtf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_wtf)
-SET_TESTS_PROPERTIES(test_wtf PROPERTIES TIMEOUT 60)
+target_link_libraries(test_wtf ${test_wtf_LIBRARIES})
+add_dependencies(test_wtf ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+add_test(test_wtf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_wtf)
+set_tests_properties(test_wtf PROPERTIES TIMEOUT 60)
-SET(test_webcore_LIBRARIES
+set(test_webcore_LIBRARIES
gtest
- ${WTF_LIBRARY_NAME}
- ${WebCore_LIBRARY_NAME}
-)
-
-ADD_EXECUTABLE(test_webcore
- ${test_main_SOURCES}
- ${TESTWEBKITAPI_DIR}/TestsController.cpp
- ${TESTWEBKITAPI_DIR}/Tests/WebCore/KURL.cpp
+ WTF
+ WebCore
)
-TARGET_LINK_LIBRARIES(test_webcore ${test_webcore_LIBRARIES})
-ADD_DEPENDENCIES(test_webcore ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
-ADD_TEST(test_webcore ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webcore)
-SET_TESTS_PROPERTIES(test_webcore PROPERTIES TIMEOUT 60)
+foreach (testName ${test_webcore_BINARIES})
+ add_executable(test_webcore_${testName} ${test_main_SOURCES} ${TESTWEBKITAPI_DIR}/TestsController.cpp ${TESTWEBKITAPI_DIR}/Tests/WebCore/${testName}.cpp)
+ add_test(test_webcore_${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webcore_${testName})
+ set_tests_properties(test_webcore_${testName} PROPERTIES TIMEOUT 60)
+ target_link_libraries(test_webcore_${testName} ${test_webcore_LIBRARIES})
+endforeach ()
-ADD_LIBRARY(TestWebKitAPIBase
+add_library(TestWebKitAPIBase
${test_main_SOURCES}
${webkit2_api_harness_SOURCES}
${TESTWEBKITAPI_DIR}/JavaScriptTest.cpp
@@ -118,28 +128,29 @@ ADD_LIBRARY(TestWebKitAPIBase
${TESTWEBKITAPI_DIR}/TestsController.cpp
)
-ADD_DEPENDENCIES(TestWebKitAPIBase ${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
+add_dependencies(TestWebKitAPIBase WebKit2 ${ForwardingHeadersForTestWebKitAPI_NAME} ${ForwardingNetworkHeadersForTestWebKitAPI_NAME})
-SET(test_webkit2_api_LIBRARIES
+set(test_webkit2_api_LIBRARIES
TestWebKitAPIBase
- ${WTF_LIBRARY_NAME}
- ${JavaScriptCore_LIBRARY_NAME}
- ${WebKit2_LIBRARY_NAME}
+ WTF
+ JavaScriptCore
+ WebKit2
gtest
)
-FOREACH(testName ${test_webkit2_api_BINARIES})
- ADD_EXECUTABLE(test_webkit2_api_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
- ADD_TEST(test_webkit2_api_${testName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webkit2_api_${testName})
- SET_TESTS_PROPERTIES(test_webkit2_api_${testName} PROPERTIES TIMEOUT 60)
- TARGET_LINK_LIBRARIES(test_webkit2_api_${testName} ${test_webkit2_api_LIBRARIES})
-ENDFOREACH()
+foreach (testName ${test_webkit2_api_BINARIES})
+ get_filename_component(testBaseName ${testName} NAME)
+ add_executable(test_webkit2_api_${testBaseName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
+ add_test(test_webkit2_api_${testBaseName} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/test_webkit2_api_${testBaseName})
+ set_tests_properties(test_webkit2_api_${testBaseName} PROPERTIES TIMEOUT 60)
+ target_link_libraries(test_webkit2_api_${testBaseName} ${test_webkit2_api_LIBRARIES})
+endforeach ()
# We don't run tests that are expected to fail. We could use the WILL_FAIL
# property, but it reports failure when the test crashes or timeouts and would
# make the bot red.
-FOREACH(testName ${test_webkit2_api_fail_BINARIES})
- ADD_EXECUTABLE(test_webkit2_api_fail_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
- TARGET_LINK_LIBRARIES(test_webkit2_api_fail_${testName} ${test_webkit2_api_LIBRARIES})
-ENDFOREACH()
+foreach (testName ${test_webkit2_api_fail_BINARIES})
+ add_executable(test_webkit2_api_fail_${testName} ${TESTWEBKITAPI_DIR}/Tests/WebKit2/${testName}.cpp)
+ target_link_libraries(test_webkit2_api_fail_${testName} ${test_webkit2_api_LIBRARIES})
+endforeach ()
diff --git a/Tools/TestWebKitAPI/Configurations/Base.xcconfig b/Tools/TestWebKitAPI/Configurations/Base.xcconfig
index 1e029d4eb..834faa366 100644
--- a/Tools/TestWebKitAPI/Configurations/Base.xcconfig
+++ b/Tools/TestWebKitAPI/Configurations/Base.xcconfig
@@ -25,8 +25,11 @@ CLANG_CXX_LANGUAGE_STANDARD = gnu++0x;
CLANG_CXX_LIBRARY = libc++;
CLANG_WARN_CXX0X_EXTENSIONS = NO;
HEADER_SEARCH_PATHS = ${BUILT_PRODUCTS_DIR}/usr/local/include $(WEBCORE_PRIVATE_HEADERS_DIR)/ForwardingHeaders $(WEBCORE_PRIVATE_HEADERS_DIR)/icu;
-FRAMEWORK_SEARCH_PATHS = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks;
-GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) ENABLE_DASHBOARD_SUPPORT WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST GTEST_HAS_TR1_TUPLE=0 GTEST_HAS_RTTI=0;
+FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(PLATFORM_NAME));
+FRAMEWORK_SEARCH_PATHS_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks;
+
+GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST GTEST_HAS_TR1_TUPLE=0 GTEST_HAS_RTTI=0 $(GCC_PREPROCESSOR_DEFINITIONS_$(PLATFORM_NAME));
+GCC_PREPROCESSOR_DEFINITIONS_macosx = ENABLE_DASHBOARD_SUPPORT;
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
PREBINDING = NO
GCC_C_LANGUAGE_STANDARD = gnu99
@@ -40,7 +43,7 @@ GCC_WARN_UNUSED_FUNCTION = YES
GCC_WARN_UNUSED_VARIABLE = YES
WARNING_CFLAGS = -Wall -W -Wno-unused-parameter
LINKER_DISPLAYS_MANGLED_NAMES = YES;
-VALID_ARCHS = i386 x86_64;
+OTHER_CPLUSPLUSFLAGS = $(OTHER_CPLUSPLUSFLAGS) -ftemplate-depth=256;
// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
@@ -48,6 +51,7 @@ DEBUG_DEFINES_debug = ;
DEBUG_DEFINES_normal = NDEBUG;
DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
+SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx;
TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
@@ -63,3 +67,8 @@ SDKROOT_TARGETING_SAME_OS_X_VERSION_ = macosx;
WEBKIT_UMBRELLA_FRAMEWORKS_DIR = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
WEBCORE_PRIVATE_HEADERS_DIR = $(WEBKIT_UMBRELLA_FRAMEWORKS_DIR)/WebCore.framework/PrivateHeaders;
+
+EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
+EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm;
+EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *Mac.h *Mac.cpp *Mac.mm *InjectedBundle* *PlatformUtilities* Tests/WebKit2/* Tests/WebKit2ObjC/* *_Bundle* JavaScriptTest.*;
+EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
diff --git a/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig b/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
index c2ab7cd23..5fc6f7449 100644
--- a/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
+++ b/Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
@@ -21,5 +21,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-PRODUCT_NAME = TestWebKitAPI
-GCC_ENABLE_OBJC_EXCEPTIONS = YES
+PRODUCT_NAME = TestWebKitAPI;
+GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+
+OTHER_LDFLAGS = -lgtest -framework JavaScriptCore -framework WebKit $(OTHER_LDFLAGS_$(PLATFORM_NAME));
+OTHER_LDFLAGS_iphoneos = -framework WebCore;
+OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
+OTHER_LDFLAGS_macosx = -framework Cocoa -framework Carbon -framework WebKit2;
diff --git a/Tools/TestWebKitAPI/DerivedSources.pri b/Tools/TestWebKitAPI/DerivedSources.pri
new file mode 100644
index 000000000..cb391ad59
--- /dev/null
+++ b/Tools/TestWebKitAPI/DerivedSources.pri
@@ -0,0 +1,12 @@
+# -------------------------------------------------------------------
+# Derived sources for TestWebKitAPI
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+TEMPLATE = derived
+
+# Make sure forwarded headers needed by this project are present
+fwheader_generator.commands = perl $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl $${ROOT_WEBKIT_DIR}/Tools/TestWebKitAPI $${ROOT_BUILD_DIR}/Source/include qt
+fwheader_generator.depends = $${ROOT_WEBKIT_DIR}/Source/WebKit2/Scripts/generate-forwarding-headers.pl
+GENERATORS += fwheader_generator
diff --git a/Tools/TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h b/Tools/TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h
new file mode 100644
index 000000000..de0a7454e
--- /dev/null
+++ b/Tools/TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h
@@ -0,0 +1,4 @@
+#ifndef TestWebKitAPI_FWD_LayoutUnit_h
+#define TestWebKitAPI_FWD_LayoutUnit_h
+#include <LayoutUnit.h>
+#endif
diff --git a/Tools/TestWebKitAPI/GNUmakefile.am b/Tools/TestWebKitAPI/GNUmakefile.am
index 01b115878..a3b3f9857 100644
--- a/Tools/TestWebKitAPI/GNUmakefile.am
+++ b/Tools/TestWebKitAPI/GNUmakefile.am
@@ -1,10 +1,3 @@
-BUILT_SOURCES += \
- generate-testwebkitapi-forwarding-headers
-wk2_tests_sources = $(shell ls $(srcdir)/Tools/TestWebKitAPI/Tests/WebKit2/*.cpp)
-generate-testwebkitapi-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(wk2_tests_sources)
- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk
- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include soup
-
noinst_LTLIBRARIES += \
Libraries/libTestWebKitAPIMain.la
@@ -21,19 +14,32 @@ Libraries_libTestWebKitAPIMain_la_CPPFLAGS = \
-isystem $(srcdir)/Source/ThirdParty/gtest/include \
-I$(srcdir)/Tools/TestWebKitAPI \
-I$(srcdir)/Source/ThirdParty/gtest/include \
+ -I$(top_builddir)/DerivedSources/WebCore/include \
-I$(top_builddir)/DerivedSources/WebKit2/include \
$(global_cppflags) \
$(javascriptcore_cppflags) \
$(GTK_CFLAGS)
noinst_PROGRAMS += \
- Programs/TestWebKitAPI/TestWTF
+ Programs/TestWebKitAPI/TestWTF \
+ Programs/TestWebKitAPI/TestJavaScriptCore \
+ Programs/TestWebKitAPI/TestWebCore \
+ Programs/TestWebKitAPI/TestGtk
+
+if ENABLE_WEBKIT2
+noinst_PROGRAMS += \
+ Programs/TestWebKitAPI/TestWebKit2
+endif # ENABLE_WEBKIT2
Programs_TestWebKitAPI_TestWTF_CPPFLAGS = \
$(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
$(GLIB_LIBS) \
$(CAIRO_CFLAGS)
+Programs_TestWebKitAPI_TestWTF_CXXFLAGS = \
+ -DGTEST_HAS_RTTI=0 \
+ $(global_cxxflags)
+
Programs_TestWebKitAPI_TestWTF_LDADD = \
Libraries/libTestWebKitAPIMain.la \
Libraries/libgtest.la \
@@ -51,36 +57,145 @@ Programs_TestWebKitAPI_TestWTF_SOURCES = \
Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp \
Tools/TestWebKitAPI/Tests/WTF/Functional.cpp \
Tools/TestWebKitAPI/Tests/WTF/HashMap.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/HashSet.cpp \
Tools/TestWebKitAPI/Tests/WTF/IntegerToStringConversion.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/MD5.cpp \
Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp \
Tools/TestWebKitAPI/Tests/WTF/MediaTime.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/MetaAllocator.cpp \
Tools/TestWebKitAPI/Tests/WTF/RedBlackTree.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/SHA1.cpp \
Tools/TestWebKitAPI/Tests/WTF/SaturatedArithmeticOperations.cpp \
Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp \
Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp \
Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp \
Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp \
- Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp \
Tools/TestWebKitAPI/Tests/WTF/Vector.cpp \
+ Tools/TestWebKitAPI/Tests/WTF/VectorBasic.cpp \
Tools/TestWebKitAPI/Tests/WTF/VectorReverse.cpp \
Tools/TestWebKitAPI/WTFStringUtilities.h
-noinst_PROGRAMS += \
- Programs/TestWebKitAPI/TestGtk
+Programs_TestWebKitAPI_TestJavaScriptCore_CPPFLAGS = \
+ $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS)
+
+Programs_TestWebKitAPI_TestJavaScriptCore_CXXFLAGS = \
+ -DGTEST_HAS_RTTI=0 \
+ $(global_cxxflags)
+
+Programs_TestWebKitAPI_TestJavaScriptCore_LDADD = \
+ Libraries/libTestWebKitAPIMain.la \
+ Libraries/libgtest.la \
+ libWTF.la \
+ $(GTK_LIBS)
+
+Programs_TestWebKitAPI_TestJavaScriptCore_LDFLAGS = \
+ -no-install \
+ -no-fast-install
+
+Programs_TestWebKitAPI_TestJavaScriptCore_SOURCES = \
+ Tools/TestWebKitAPI/Tests/JavaScriptCore/VMInspector.cpp
+
+webcore_layer_deps = \
+ libPlatform.la \
+ libPlatformGtk.la \
+ libWebCorePlatform.la \
+ libWebCoreGtk.la \
+ libWebCore.la \
+ libWebCoreModules.la
+if ENABLE_SVG
+webcore_layer_deps += \
+ libWebCoreSVG.la
+endif
+if ENABLE_INDEXED_DATABASE
+webcore_layer_deps += \
+ libLevelDB.la
+endif
+if USE_OPENGL
+webcore_layer_deps += \
+ libANGLE.la
+endif
+
+webcore_layer_archives = $(foreach lib, $(webcore_layer_deps), $(shell echo $(lib) | sed "s/\(.*\)\.la/.libs\/\1.a/"))
+
+WebCoreLayer.a: $(webcore_layer_deps)
+ $(AM_V_GEN)
+ $(AM_V_at)$(shell rm -f $@)
+ $(AM_V_at)$(foreach archive, $(webcore_layer_archives), $(shell ar t $(archive) | xargs -n50 ar cruT $@))
+
+DISTCLEANFILES += \
+ $(top_builddir)/WebCoreLayer.a
+
+Programs_TestWebKitAPI_TestWebCore_CPPFLAGS = \
+ $(Libraries_libTestWebKitAPIMain_la_CPPFLAGS) \
+ -I$(top_builddir)/DerivedSources/WebCore/include
+
+Programs_TestWebKitAPI_TestWebCore_CXXFLAGS = \
+ -DGTEST_HAS_RTTI=0 \
+ $(global_cxxflags)
+
+Programs_TestWebKitAPI_TestWebCore_LDADD = \
+ Libraries/libTestWebKitAPIMain.la \
+ Libraries/libgtest.la \
+ libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ libWTF.la \
+ WebCoreLayer.a \
+ $(CAIRO_LIBS) \
+ $(CLUTTER_LIBS) \
+ $(FREETYPE_LIBS) \
+ $(GAMEPAD_LIBS) \
+ $(GEOCLUE_LIBS) \
+ $(GAIL_LIBS) \
+ $(GLIB_LIBS) \
+ $(GSTREAMER_LIBS) \
+ $(GTK_LIBS) \
+ $(JPEG_LIBS) \
+ $(LIBSECRET_LIBS) \
+ $(LIBSOUP_LIBS) \
+ $(LIBXML_LIBS) \
+ $(LIBXSLT_LIBS) \
+ $(OPENGL_LIBS) \
+ $(PANGO_LIBS) \
+ $(PNG_LIBS) \
+ $(SQLITE3_LIBS) \
+ $(UNICODE_LIBS) \
+ $(WEBP_LIBS) \
+ $(XRENDER_LIBS) \
+ $(XT_LIBS) \
+ $(ZLIB_LIBS)
+
+Programs_TestWebKitAPI_TestWebCore_LDFLAGS = \
+ -no-install \
+ -no-fast-install
+
+Programs_TestWebKitAPI_TestWebCore_SOURCES = \
+ Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp \
+ Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
Programs_TestWebKitAPI_TestGtk_CPPFLAGS = \
$(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
+ $(platform_cppflags) \
+ $(platformgtk_cppflags) \
$(webcore_cppflags) \
$(webcoregtk_cppflags) \
+ $(FREETYPE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBSOUP_CFLAGS)
+Programs_TestWebKitAPI_TestGtk_CXXFLAGS = \
+ -DGTEST_HAS_RTTI=0 \
+ $(global_cxxflags)
+
Programs_TestWebKitAPI_TestGtk_LDADD = \
Libraries/libTestWebKitAPIMain.la \
Libraries/libgtest.la \
libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
- libwebkitgtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ libPlatformGtk.la \
+ libWebCore.la \
+ libWebCoreGtk.la \
+ $(FREETYPE_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBSOUP_LIBS)
@@ -96,22 +211,24 @@ Programs_TestWebKitAPI_TestGtk_SOURCES = \
Tools/TestWebKitAPI/config.h \
Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
-if ENABLE_WEBKIT2
-noinst_PROGRAMS += \
- Programs/TestWebKitAPI/TestWebKit2
-
Programs_TestWebKitAPI_TestWebKit2_CPPFLAGS = \
$(Programs_TestWebKitAPI_TestWTF_CPPFLAGS) \
-I$(top_builddir)/DerivedSources/WebKit2/include \
+ $(FREETYPE_CFLAGS) \
$(GLIB_CFLAGS) \
$(GTK_CFLAGS) \
$(LIBSOUP_CFLAGS)
+Programs_TestWebKitAPI_TestWebKit2_CXXFLAGS = \
+ -DGTEST_HAS_RTTI=0 \
+ $(global_cxxflags)
+
Programs_TestWebKitAPI_TestWebKit2_LDADD = \
Libraries/libTestWebKitAPIMain.la \
Libraries/libgtest.la \
libjavascriptcoregtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
libwebkit2gtk-@WEBKITGTK_API_MAJOR_VERSION@.@WEBKITGTK_API_MINOR_VERSION@.la \
+ $(FREETYPE_LIBS) \
$(GLIB_LIBS) \
$(GTK_LIBS) \
$(LIBSOUP_LIBS)
@@ -146,7 +263,10 @@ Programs_TestWebKitAPI_TestWebKit2_SOURCES = \
Tools/TestWebKitAPI/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/LoadAlternateHTMLStringWithNonDirectoryURL.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/LoadCanceledNoServerRedirectCallback.cpp \
+ Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp \
+ Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp \
+ Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages.cpp \
@@ -160,6 +280,7 @@ Programs_TestWebKitAPI_TestWebKit2_SOURCES = \
Tools/TestWebKitAPI/Tests/WebKit2/RestoreSessionStateContainingFormData.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp \
+ Tools/TestWebKitAPI/Tests/WebKit2/TerminateTwice.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/UserMessage.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/WillSendSubmitEvent.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/WKConnection.cpp \
@@ -168,8 +289,10 @@ Programs_TestWebKitAPI_TestWebKit2_SOURCES = \
Tools/TestWebKitAPI/Tests/WebKit2/WKString.cpp \
Tools/TestWebKitAPI/Tests/WebKit2/WKStringJSString.cpp
+if ENABLE_WEBKIT2
noinst_LTLIBRARIES += \
Libraries/libTestWebKitAPIInjectedBundle.la
+endif # ENABLE_WEBKIT2
Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES = \
Tools/TestWebKitAPI/InjectedBundleController.cpp \
@@ -213,12 +336,27 @@ Libraries_libTestWebKitAPIInjectedBundle_la_CPPFLAGS = \
$(GTK_CFLAGS)
Libraries_libTestWebKitAPIInjectedBundle_la_CXXFLAGS = \
+ -DGTEST_HAS_RTTI=0 \
$(global_cxxflags)
Libraries_libTestWebKitAPIInjectedBundle_la_CFLAGS = \
$(global_cflags)
+
+
+stamp-testwebkitapi-webcore-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebCore_SOURCES)
+ $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI/Tests/WebCore $(GENSOURCES_WEBCORE)/include gtk \
+ && echo timestamp > $(@F)
+
+stamp-testwebkitapi-webkit2-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_TestWebKitAPI_TestWebKit2_SOURCES) $(Libraries_libTestWebKitAPIInjectedBundle_la_SOURCES)
+ $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/TestWebKitAPI $(GENSOURCES_WEBKIT2)/include gtk \
+ && echo timestamp > $(@F)
+
+BUILT_SOURCES += $(top_builddir)/stamp-testwebkitapi-webcore-forwarding-headers
+if ENABLE_WEBKIT2
+BUILT_SOURCES += $(top_builddir)/stamp-testwebkitapi-webkit2-forwarding-headers
endif # ENABLE_WEBKIT2
+
EXTRA_DIST += \
Tools/TestWebKitAPI/Tests/WebKit2/18-characters.html \
Tools/TestWebKitAPI/Tests/WebKit2/file-with-anchor.html \
diff --git a/Tools/TestWebKitAPI/InjectedBundle.pri b/Tools/TestWebKitAPI/InjectedBundle.pri
new file mode 100644
index 000000000..171a200f0
--- /dev/null
+++ b/Tools/TestWebKitAPI/InjectedBundle.pri
@@ -0,0 +1,56 @@
+# -------------------------------------------------------------------
+# Project file for TestWebKitAPI's InjectedBundle
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+TEMPLATE = lib
+TARGET = TestWebKitAPIInjectedBundle
+
+INCLUDEPATH += $$PWD
+INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/ThirdParty/gtest/include
+
+SOURCES += \
+ $$PWD/InjectedBundleController.cpp \
+ $$PWD/InjectedBundleController.h \
+ $$PWD/InjectedBundleMain.cpp \
+ $$PWD/InjectedBundleTest.h \
+ $$PWD/PlatformUtilities.cpp \
+ $$PWD/PlatformUtilities.h \
+ $$PWD/qt/InjectedBundleControllerQt.cpp \
+ $$PWD/qt/PlatformUtilitiesQt.cpp \
+ $$PWD/Tests/WebKit2/CanHandleRequest_Bundle.cpp \
+ $$PWD/Tests/WebKit2/DocumentStartUserScriptAlertCrash_Bundle.cpp \
+ $$PWD/Tests/WebKit2/DOMWindowExtensionBasic_Bundle.cpp \
+ $$PWD/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp \
+ $$PWD/Tests/WebKit2/GetInjectedBundleInitializationUserDataCallback_Bundle.cpp \
+ $$PWD/Tests/WebKit2/HitTestResultNodeHandle_Bundle.cpp \
+ $$PWD/Tests/WebKit2/InjectedBundleBasic_Bundle.cpp \
+ $$PWD/Tests/WebKit2/InjectedBundleFrameHitTest_Bundle.cpp \
+ $$PWD/Tests/WebKit2/InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp \
+ $$PWD/Tests/WebKit2/LoadCanceledNoServerRedirectCallback_Bundle.cpp \
+ $$PWD/Tests/WebKit2/MouseMoveAfterCrash_Bundle.cpp \
+ $$PWD/Tests/WebKit2/NewFirstVisuallyNonEmptyLayout_Bundle.cpp \
+ $$PWD/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp \
+ $$PWD/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp \
+ $$PWD/Tests/WebKit2/NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp \
+ $$PWD/Tests/WebKit2/ParentFrame_Bundle.cpp \
+ $$PWD/Tests/WebKit2/ResponsivenessTimerDoesntFireEarly_Bundle.cpp \
+ $$PWD/Tests/WebKit2/ShouldGoToBackForwardListItem_Bundle.cpp \
+ $$PWD/Tests/WebKit2/UserMessage_Bundle.cpp \
+ $$PWD/Tests/WebKit2/WillSendSubmitEvent_Bundle.cpp \
+ $$PWD/Tests/WebKit2/WKConnection_Bundle.cpp
+
+
+DESTDIR = $${ROOT_BUILD_DIR}/lib
+
+QT += core webkit
+
+WEBKIT += wtf javascriptcore webcore webkit2
+
+CONFIG += plugin rpath compiling_thirdparty_code
+
+LIBS += -L$${ROOT_BUILD_DIR}/Source/ThirdParty/gtest/$$targetSubDir() -lgtest
+
+DEFINES += APITEST_SOURCE_DIR=\\\"$$PWD\\\" \
+ ROOT_BUILD_DIR=\\\"$${ROOT_BUILD_DIR}\\\"
diff --git a/Tools/TestWebKitAPI/PlatformEfl.cmake b/Tools/TestWebKitAPI/PlatformEfl.cmake
index b1aa579de..28eaf77f5 100644
--- a/Tools/TestWebKitAPI/PlatformEfl.cmake
+++ b/Tools/TestWebKitAPI/PlatformEfl.cmake
@@ -1,51 +1,67 @@
-ADD_CUSTOM_TARGET(forwarding-headersEflForTestWebKitAPI
+add_custom_target(forwarding-headersEflForTestWebKitAPI
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
+ COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include CoordinatedGraphics
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
)
-SET(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
+set(ForwardingHeadersForTestWebKitAPI_NAME forwarding-headersEflForTestWebKitAPI)
-ADD_CUSTOM_TARGET(forwarding-headersSoupForTestWebKitAPI
+add_custom_target(forwarding-headersSoupForTestWebKitAPI
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT2_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${TESTWEBKITAPI_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
)
-SET(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
+set(ForwardingNetworkHeadersForTestWebKitAPI_NAME forwarding-headersSoupForTestWebKitAPI)
-INCLUDE_DIRECTORIES(
+include_directories(
+ ${WEBKIT2_DIR}/UIProcess/API/C/CoordinatedGraphics
${WEBKIT2_DIR}/UIProcess/API/C/soup
${WEBKIT2_DIR}/UIProcess/API/C/efl
${WEBKIT2_DIR}/UIProcess/API/efl
+ ${ECORE_EVAS_INCLUDE_DIRS}
${ECORE_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
+ ${EO_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
${LIBSOUP_INCLUDE_DIRS}
)
-SET(test_main_SOURCES
+set(test_main_SOURCES
${TESTWEBKITAPI_DIR}/efl/main.cpp
)
-SET(bundle_harness_SOURCES
+set(bundle_harness_SOURCES
${TESTWEBKITAPI_DIR}/efl/InjectedBundleController.cpp
${TESTWEBKITAPI_DIR}/efl/PlatformUtilities.cpp
)
-SET(webkit2_api_harness_SOURCES
+set(webkit2_api_harness_SOURCES
${TESTWEBKITAPI_DIR}/efl/PlatformUtilities.cpp
${TESTWEBKITAPI_DIR}/efl/PlatformWebView.cpp
)
# The list below works like a test expectation. Tests in the
-# test_webkit2_api_BINARIES list are added to the test runner and
-# tried on the bots on every build. Tests in test_webkit2_api_fail_BINARIES
+# test_{webkit2_api|webcore}_BINARIES list are added to the test runner and
+# tried on the bots on every build. Tests in test_{webkit2_api|webcore}_BINARIES
# are compiled and suffixed with fail and skipped from the test runner.
#
# Make sure that the tests are passing on both Debug and
-# Release builds before adding it to test_webkit2_api_BINARIES.
+# Release builds before adding it to test_{webkit2_api|webcore}_BINARIES.
-SET(test_webkit2_api_BINARIES
+set(test_webcore_BINARIES
+ LayoutUnit
+ KURL
+)
+
+# In here we list the bundles that are used by our specific WK2 API Tests
+list(APPEND bundle_harness_SOURCES
+ ${TESTWEBKITAPI_DIR}/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp
+)
+
+set(test_webkit2_api_BINARIES
AboutBlankLoad
+ CloseThenTerminate
CookieManager
+ DidAssociateFormControls
DOMWindowExtensionNoCache
DocumentStartUserScriptAlertCrash
EvaluateJavaScript
@@ -57,43 +73,58 @@ SET(test_webkit2_api_BINARIES
GetInjectedBundleInitializationUserDataCallback
HitTestResultNodeHandle
InjectedBundleBasic
+ InjectedBundleFrameHitTest
InjectedBundleInitializationUserDataCallbackWins
LoadAlternateHTMLStringWithNonDirectoryURL
LoadCanceledNoServerRedirectCallback
+ LoadPageOnCrash
MouseMoveAfterCrash
NewFirstVisuallyNonEmptyLayout
NewFirstVisuallyNonEmptyLayoutFails
+ NewFirstVisuallyNonEmptyLayoutForImages
PageLoadBasic
PageLoadDidChangeLocationWithinPageForFrame
+ PageVisibilityState
ParentFrame
PreventEmptyUserAgent
PrivateBrowsingPushStateNoHistoryCallback
+ ReloadPageAfterCrash
+ ResizeWindowAfterCrash
+ ResponsivenessTimerDoesntFireEarly
+ TerminateTwice
+ UserMessage
WKConnection
WKPreferences
WKString
WKStringJSString
WKURL
+ WillLoad
WillSendSubmitEvent
+ CoordinatedGraphics/WKViewUserViewportToContents
+ efl/WKViewClientWebProcessCallbacks
)
-SET(test_webkit2_api_fail_BINARIES
+# Seccomp filters is an internal API and its symbols
+# are not (and should not) be exposed by default. We
+# can only test it when building shared core.
+if (ENABLE_SECCOMP_FILTERS AND SHARED_CORE)
+ list(APPEND test_webkit2_api_BINARIES
+ SeccompFilters
+ )
+endif ()
+
+set(test_webkit2_api_fail_BINARIES
CanHandleRequest
DOMWindowExtensionBasic
DownloadDecideDestinationCrash
- NewFirstVisuallyNonEmptyLayoutForImages
NewFirstVisuallyNonEmptyLayoutFrames
+ ResizeReversePaginatedWebView
RestoreSessionStateContainingFormData
+ ScrollPinningBehaviors
ShouldGoToBackForwardListItem
WKPageGetScaleFactorNotZero
)
-ADD_DEFINITIONS(-DTHEME_DIR="${THEME_BINARY_DIR}")
-
# Tests disabled because of missing features on the test harness:
#
-# ResponsivenessTimerDoesntFireEarly
# SpacebarScrolling
-#
-# Flaky test, fails on Release but passes on Debug:
-#
-# UserMessage
diff --git a/Tools/TestWebKitAPI/PlatformWebView.h b/Tools/TestWebKitAPI/PlatformWebView.h
index 653a17cca..3eb791a19 100644
--- a/Tools/TestWebKitAPI/PlatformWebView.h
+++ b/Tools/TestWebKitAPI/PlatformWebView.h
@@ -47,10 +47,21 @@ typedef HWND PlatformWindow;
typedef WKViewRef PlatformWKView;
typedef GtkWidget *PlatformWindow;
#elif PLATFORM(EFL)
-typedef struct _Evas_Object Evas_Object;
typedef struct _Ecore_Evas Ecore_Evas;
+#if USE(EO)
+typedef struct _Eo Evas_Object;
+#else
+typedef struct _Evas_Object Evas_Object;
+#endif
typedef Evas_Object* PlatformWKView;
typedef Ecore_Evas* PlatformWindow;
+#elif PLATFORM(QT)
+QT_BEGIN_NAMESPACE
+class QQuickView;
+QT_END_NAMESPACE
+class QQuickWebView;
+typedef QQuickWebView* PlatformWKView;
+typedef QQuickView* PlatformWindow;
#endif
namespace TestWebKitAPI {
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp b/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp
deleted file mode 100644
index 696f40c67..000000000
--- a/Tools/TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp
+++ /dev/null
@@ -1,165 +0,0 @@
-#
-# Copyright (C) 2012 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.
-#
-
-{
- 'variables': {
- 'tools_dir': '../..',
- 'source_dir': '../../../Source',
- 'conditions': [
- # Location of the chromium src directory and target type is different
- # if webkit is built inside chromium or as standalone project.
- ['inside_chromium_build==0', {
- # Webkit is being built outside of the full chromium project.
- # e.g. via build-webkit --chromium
- 'chromium_src_dir': '<(source_dir)/WebKit/chromium',
- },{
- # WebKit is checked out in src/chromium/third_party/WebKit
- 'chromium_src_dir': '<(tools_dir)/../../..',
- }],
- ],
- },
- 'includes': [
- '../TestWebKitAPI.gypi',
- '../../../Source/WebKit/chromium/features.gypi',
- ],
- 'targets': [
- {
- 'target_name': 'TestWebKitAPI',
- 'type': 'executable',
- 'dependencies': [
- '<(source_dir)/WebKit/chromium/WebKit.gyp:webkit',
- '<(source_dir)/WTF/WTF.gyp/WTF.gyp:wtf',
- '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
- '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
- '<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/testing/gtest.gyp:gtest',
- '<(chromium_src_dir)/testing/gmock.gyp:gmock',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
- ],
- 'include_dirs': [
- '<(tools_dir)/TestWebKitAPI',
- # Needed by tests/RunAllTests.cpp, as well as ChromiumCurrentTime.cpp and
- # ChromiumThreading.cpp in chromium shared library configuration.
- '<(source_dir)/WebKit/chromium/public',
- ],
- 'sources': [
- # Reuse the same testing driver of Chromium's webkit_unit_tests.
- '<(source_dir)/WebKit/chromium/tests/RunAllTests.cpp',
- '<@(TestWebKitAPI_files)',
- ],
- 'conditions': [
- ['inside_chromium_build==1 and component=="shared_library"', {
- 'sources': [
- # To satisfy linking of WTF::currentTime() etc. in shared library configuration,
- # as the symbols are not exported from the DLLs.
- '<(source_dir)/WebKit/chromium/src/ChromiumCurrentTime.cpp',
- '<(source_dir)/WebKit/chromium/src/ChromiumThreading.cpp',
- ],
- }],
- ['OS=="android" and gtest_target_type == "shared_library"', {
- 'type': 'shared_library',
- 'dependencies': [
- '<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code',
- ],
- }],
- ],
- },
- ], # targets
- 'conditions': [
- ['OS=="android" and gtest_target_type == "shared_library"', {
- # Wrap libTestWebKitAPI.so into an android apk for execution.
- 'targets': [{
- 'target_name': 'TestWebKitAPI_apk',
- 'type': 'none',
- 'dependencies': [
- '<(chromium_src_dir)/base/base.gyp:base',
- 'TestWebKitAPI',
- ],
- 'variables': {
- 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)TestWebKitAPI<(SHARED_LIB_SUFFIX)',
- 'input_jars_paths': [
- '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
- ],
- 'conditions': [
- ['inside_chromium_build==1', {
- 'ant_build_to_chromium_src': '<(ant_build_out)/../../',
- }, {
- 'ant_build_to_chromium_src': '<(chromium_src_dir)',
- }],
- ],
- },
- # Part of the following was copied from <(chromium_src_dir)/build/apk_test.gpyi.
- # Not including it because gyp include doesn't support variable in path or under
- # conditions. And we also have some different requirements.
- 'actions': [{
- 'action_name': 'apk_TestWebKitAPI',
- 'message': 'Building TestWebKitAPI test apk.',
- 'inputs': [
- '<(chromium_src_dir)/testing/android/AndroidManifest.xml',
- '<(chromium_src_dir)/testing/android/generate_native_test.py',
- '<(input_shlib_path)',
- '<@(input_jars_paths)',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/TestWebKitAPI_apk/TestWebKitAPI-debug.apk',
- ],
- 'action': [
- '<(chromium_src_dir)/testing/android/generate_native_test.py',
- '--native_library',
- '<(input_shlib_path)',
- '--jars',
- '"<@(input_jars_paths)"',
- '--output',
- '<(PRODUCT_DIR)/TestWebKitAPI_apk',
- '--strip-binary=<(android_strip)',
- '--ant-args',
- '-DANDROID_SDK=<(android_sdk)',
- '--ant-args',
- '-DANDROID_SDK_ROOT=<(android_sdk_root)',
- '--ant-args',
- '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
- '--ant-args',
- '-DANDROID_SDK_VERSION=<(android_sdk_version)',
- '--ant-args',
- '-DANDROID_TOOLCHAIN=<(android_toolchain)',
- '--ant-args',
- '-DANDROID_GDBSERVER=<(android_gdbserver)',
- '--ant-args',
- '-DPRODUCT_DIR=<(ant_build_out)',
- '--ant-args',
- '-DCHROMIUM_SRC=<(ant_build_to_chromium_src)',
- '--app_abi',
- '<(android_app_abi)',
- ],
- }],
- }],
- }],
- ],
-}
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.gypi b/Tools/TestWebKitAPI/TestWebKitAPI.gypi
deleted file mode 100644
index 2c07940c8..000000000
--- a/Tools/TestWebKitAPI/TestWebKitAPI.gypi
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Copyright (C) 2011 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.
-#
-
-{
- 'variables': {
- 'TestWebKitAPI_files': [
- 'Tests/WTF/AtomicString.cpp',
- 'Tests/WTF/CheckedArithmeticOperations.cpp',
- 'Tests/WTF/CString.cpp',
- 'Tests/WTF/Functional.cpp',
- 'Tests/WTF/HashMap.cpp',
- 'Tests/WTF/MathExtras.cpp',
- 'Tests/WTF/MediaTime.cpp',
- 'Tests/WTF/MemoryInstrumentationTest.cpp',
- 'Tests/WTF/RedBlackTree.cpp',
- 'Tests/WTF/SaturatedArithmeticOperations.cpp',
- 'Tests/WTF/StringBuilder.cpp',
- 'Tests/WTF/StringImpl.cpp',
- 'Tests/WTF/StringOperators.cpp',
- 'Tests/WTF/TemporaryChange.cpp',
- 'Tests/WTF/Vector.cpp',
- 'Tests/WTF/VectorBasic.cpp',
- 'Tests/WTF/VectorReverse.cpp',
- 'Tests/WTF/WTFString.cpp',
- ],
- },
-}
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.pri b/Tools/TestWebKitAPI/TestWebKitAPI.pri
new file mode 100644
index 000000000..ddc9934f4
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.pri
@@ -0,0 +1,22 @@
+
+INCLUDEPATH += $$PWD $${ROOT_WEBKIT_DIR}/Source/ThirdParty/gtest/include
+WEBKIT += wtf javascriptcore webkit2
+
+DEFINES += QT_NO_CAST_FROM_ASCII
+
+QT += core core-private gui gui-private webkit quick quick-private
+
+CONFIG += compiling_thirdparty_code
+
+SOURCES += \
+ $$PWD/JavaScriptTest.cpp \
+ $$PWD/PlatformUtilities.cpp \
+ $$PWD/TestsController.cpp \
+ $$PWD/qt/main.cpp \
+ $$PWD/qt/PlatformUtilitiesQt.cpp \
+ $$PWD/qt/PlatformWebViewQt.cpp
+
+LIBS += -L$${ROOT_BUILD_DIR}/Source/ThirdParty/gtest/$$targetSubDir() -lgtest
+
+DEFINES += ROOT_BUILD_DIR=\\\"$${ROOT_BUILD_DIR}\\\"
+
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.pro b/Tools/TestWebKitAPI/TestWebKitAPI.pro
new file mode 100644
index 000000000..b9d0cd5b6
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.pro
@@ -0,0 +1,11 @@
+TEMPLATE = subdirs
+CONFIG += ordered
+
+derived_sources.file = DerivedSources.pri
+injected_bundle.file = InjectedBundle.pri
+tests.file = Tests.pri
+
+SUBDIRS += derived_sources injected_bundle tests
+
+addStrictSubdirOrderBetween(derived_sources, injected_bundle)
+addStrictSubdirOrderBetween(derived_sources, tests)
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln
new file mode 100644
index 000000000..38b2fd6b3
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln
@@ -0,0 +1,29 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWebKitAPI", "TestWebKitAPI.vcxproj", "{AF94D13A-36C1-45FF-9B0B-EB5D3FF6F43D}"
+ ProjectSection(ProjectDependencies) = postProject
+ {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8} = {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gtest-md", "..\..\..\Source\ThirdParty\gtest\msvc\gtest-md.vcxproj", "{C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {AF94D13A-36C1-45FF-9B0B-EB5D3FF6F43D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {AF94D13A-36C1-45FF-9B0B-EB5D3FF6F43D}.Debug|Win32.Build.0 = Debug|Win32
+ {AF94D13A-36C1-45FF-9B0B-EB5D3FF6F43D}.Release|Win32.ActiveCfg = Release|Win32
+ {AF94D13A-36C1-45FF-9B0B-EB5D3FF6F43D}.Release|Win32.Build.0 = Release|Win32
+ {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Debug|Win32.Build.0 = Debug|Win32
+ {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release|Win32.ActiveCfg = Release|Win32
+ {C8F6C172-56F2-4E76-B5FA-C3B423B31BE8}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj
new file mode 100644
index 000000000..d6db8309a
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj
@@ -0,0 +1,314 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{AF94D13A-36C1-45FF-9B0B-EB5D3FF6F43D}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>TestWebKitAPI</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="TestWebKitAPIProduction.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\config.h" />
+ <ClInclude Include="..\Test.h" />
+ <ClInclude Include="..\TestsController.h" />
+ <ClInclude Include="..\win\HostWindow.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\TestsController.cpp" />
+ <ClCompile Include="..\Tests\WebCore\LayoutUnit.cpp" />
+ <ClCompile Include="..\Tests\WebCore\win\BitmapImage.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WebKit\win\WebViewDestruction.cpp" />
+ <ClCompile Include="..\Tests\WTF\cf\RetainPtr.cpp" />
+ <ClCompile Include="..\Tests\WTF\cf\RetainPtrHashing.cpp" />
+ <ClCompile Include="..\Tests\WTF\CheckedArithmeticOperations.cpp" />
+ <ClCompile Include="..\Tests\WTF\Functional.cpp" />
+ <ClCompile Include="..\Tests\WTF\HashMap.cpp" />
+ <ClCompile Include="..\Tests\WTF\MD5.cpp" />
+ <ClCompile Include="..\Tests\WTF\MathExtras.cpp" />
+ <ClCompile Include="..\Tests\WTF\MediaTime.cpp" />
+ <ClCompile Include="..\Tests\WTF\SHA1.cpp" />
+ <ClCompile Include="..\Tests\WTF\SaturatedArithmeticOperations.cpp" />
+ <ClCompile Include="..\Tests\WTF\StringHasher.cpp" />
+ <ClCompile Include="..\Tests\WTF\StringOperators.cpp" />
+ <ClCompile Include="..\Tests\WTF\Vector.cpp" />
+ <ClCompile Include="..\Tests\WTF\VectorBasic.cpp" />
+ <ClCompile Include="..\Tests\WTF\VectorReverse.cpp" />
+ <ClCompile Include="..\win\HostWindow.cpp" />
+ <ClCompile Include="..\win\main.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="TestWebKitAPIPostBuild.cmd" />
+ <None Include="TestWebKitAPIPreBuild.cmd" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters
new file mode 100644
index 000000000..27cf75cb4
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Tests">
+ <UniqueIdentifier>{80b7e5c5-5c50-4363-ae7b-a0956e6a688d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="win">
+ <UniqueIdentifier>{e0b41579-994a-4d5e-9c2a-2ec14cd0c606}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Tests\WTF">
+ <UniqueIdentifier>{87f2c8f6-8710-4785-a918-2aec42c9f1d3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Tests\WebCore">
+ <UniqueIdentifier>{77db1e64-3c2d-4de3-adc1-860d4ea1c3c2}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Tests\WebKit">
+ <UniqueIdentifier>{f8236406-78aa-4c83-b393-b060b09405a3}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Tests\WTF\cf">
+ <UniqueIdentifier>{909ce22a-2223-4afa-af44-2d0153f13cc6}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\config.h" />
+ <ClInclude Include="..\Test.h" />
+ <ClInclude Include="..\TestsController.h" />
+ <ClInclude Include="..\win\HostWindow.h">
+ <Filter>win</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\TestsController.cpp" />
+ <ClCompile Include="..\win\HostWindow.cpp">
+ <Filter>win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\win\main.cpp">
+ <Filter>win</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WebCore\win\BitmapImage.cpp">
+ <Filter>Tests\WebCore</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WebCore\LayoutUnit.cpp">
+ <Filter>Tests\WebCore</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WebKit\win\WebViewDestruction.cpp">
+ <Filter>Tests\WebKit</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\CheckedArithmeticOperations.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\Functional.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\HashMap.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\MD5.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\MathExtras.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\MediaTime.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\SHA1.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\SaturatedArithmeticOperations.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\StringHasher.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\StringOperators.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\Vector.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\VectorBasic.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\VectorReverse.cpp">
+ <Filter>Tests\WTF</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\cf\RetainPtr.cpp">
+ <Filter>Tests\WTF\cf</Filter>
+ </ClCompile>
+ <ClCompile Include="..\Tests\WTF\cf\RetainPtrHashing.cpp">
+ <Filter>Tests\WTF\cf</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="TestWebKitAPIPostBuild.cmd" />
+ <None Include="TestWebKitAPIPreBuild.cmd" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props
new file mode 100644
index 000000000..07bdf91db
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>CFNetwork$(DebugSuffix).lib;CoreFoundation$(DebugSuffix).lib;WebKit$(DebugSuffix).lib;WTF$(DebugSuffix).lib;JavaScriptCore$(DebugSuffix).lib;gtest$(DebugSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)..;$(ProjectDir)..\win;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\private\JavaScriptCore;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders;$(ConfigurationBuildDir)\Include\private;..\..\..\Source\ThirdParty\gtest\include;$(WebKit_Libraries)\include;$(WebKit_Libraries)\Include\private;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props
new file mode 100644
index 000000000..5b75cd8ba
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <AdditionalDependencies>CFLite.lib;WebKit.lib;JavaScriptCore.lib;gtest.lib;WTF.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)..;$(ProjectDir)..\win;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\private\JavaScriptCore;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders;$(ConfigurationBuildDir)\Include\private;..\..\..\Source\ThirdParty\gtest\include;$(WebKit_Libraries)\include;$(WebKit_Libraries)\Include\private;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project>
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebug.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebug.props
new file mode 100644
index 000000000..76cef1409
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebug.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="TestWebKitAPICommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props
new file mode 100644
index 000000000..ce507e69c
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefinesCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\WinCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\cURL.props" />
+ <Import Project="TestWebKitAPICommonWinCairo.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project>
diff --git a/Tools/WinLauncher/WinLauncherPostBuild.cmd b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPostBuild.cmd
index 26707cac6..26707cac6 100644
--- a/Tools/WinLauncher/WinLauncherPostBuild.cmd
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPostBuild.cmd
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd
index a77077674..a77077674 100644
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIPreBuild.cmd
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props
new file mode 100644
index 000000000..bac3a5bf2
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="TestWebKitAPICommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props
new file mode 100644
index 000000000..a25ac6c9b
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="TestWebKitAPICommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props
new file mode 100644
index 000000000..759c7fc3c
--- /dev/null
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefinesCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\WinCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\cURL.props" />
+ <Import Project="TestWebKitAPICommonWinCairo.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project>
diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
index 4c0925f17..2d1688b9b 100644
--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
@@ -7,22 +7,28 @@
objects = {
/* Begin PBXBuildFile section */
+ 00BC16871680FE810065F1E5 /* PublicSuffix.mm in Sources */ = {isa = PBXBuildFile; fileRef = 00BC16851680FE810065F1E5 /* PublicSuffix.mm */; };
00CD9F6315BE312C002DA2CE /* BackForwardList.mm in Sources */ = {isa = PBXBuildFile; fileRef = 00CD9F6215BE312C002DA2CE /* BackForwardList.mm */; };
0BCD833514857CE400EA2003 /* HashMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BCD833414857CE400EA2003 /* HashMap.cpp */; };
0BCD856A1485C98B00EA2003 /* TemporaryChange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */; };
0F17BBD615AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */; };
0FC6C4CC141027E0005B7F0C /* RedBlackTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */; };
0FC6C4CF141034AD005B7F0C /* MetaAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */; };
+ 14464013167A8305000BD218 /* LayoutUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14464012167A8305000BD218 /* LayoutUnit.cpp */; };
14F3B11315E45EAB00210069 /* SaturatedArithmeticOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */; };
1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A02C84E125D4A8400E3F4BD /* Find.cpp */; };
1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; };
1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */; };
+ 1A7BFC0C171A0BDB00BC5F64 /* WillSendSubmitEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A7BFC0A171A0BDB00BC5F64 /* WillSendSubmitEvent.mm */; };
1A9E52C913E65EF4006917F5 /* 18-characters.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C045F9461385C2F800C0F3CD /* 18-characters.html */; };
1AA9E55914980A9900001A8A /* Functional.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA9E55714980A9900001A8A /* Functional.cpp */; };
1ADBEFAE130C689C00D61D19 /* ForceRepaint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */; };
1ADBEFE3130C6AA100D61D19 /* simple-accelerated-compositing.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */; };
+ 1AE72F48173EB214006362F0 /* TerminateTwice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE72F47173EB214006362F0 /* TerminateTwice.cpp */; };
1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */; };
+ 1AEF994917A09F5400998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */; };
261516D615B0E60500A2C201 /* SetAndUpdateCacheModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */; };
+ 26300B1816755CD90066886D /* ListHashSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26300B1716755CD90066886D /* ListHashSet.cpp */; };
265AF55015D1E48A00B0CB4A /* WTFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265AF54F15D1E48A00B0CB4A /* WTFString.cpp */; };
266FAFD315E5775200F61D5B /* IntegerToStringConversion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266FAFD215E5775200F61D5B /* IntegerToStringConversion.cpp */; };
26A2C72F15E2E73C005B1A14 /* CString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A2C72E15E2E73C005B1A14 /* CString.cpp */; };
@@ -31,9 +37,21 @@
26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */; };
26F1B44415CA434F00D1E4BF /* AtomicString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F1B44215CA434F00D1E4BF /* AtomicString.cpp */; };
26F1B44515CA434F00D1E4BF /* StringImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F1B44315CA434F00D1E4BF /* StringImpl.cpp */; };
+ 290A9BB71735DE8A00D71BBC /* CloseNewWindowInNavigationPolicyDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 290A9BB51735DE8A00D71BBC /* CloseNewWindowInNavigationPolicyDelegate.mm */; };
+ 290A9BB91735F63800D71BBC /* OpenNewWindow.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 290A9BB81735F42300D71BBC /* OpenNewWindow.html */; };
+ 290F4275172A221C00939FF0 /* custom-protocol-sync-xhr.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */; };
+ 290F4278172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 290F4276172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm */; };
+ 290F427B172A23A500939FF0 /* TestProtocol.mm in Sources */ = {isa = PBXBuildFile; fileRef = 290F4279172A23A500939FF0 /* TestProtocol.mm */; };
2943BE86161DFEB800999E3D /* UserContentTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2943BE84161DFEB800999E3D /* UserContentTest.mm */; };
+ 297234B4173AD04800983601 /* CustomProtocolsInvalidScheme.mm in Sources */ = {isa = PBXBuildFile; fileRef = 297234B2173AD04800983601 /* CustomProtocolsInvalidScheme.mm */; };
+ 297234B7173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 297234B5173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp */; };
29AB8AA1164C735800D49BEC /* CustomProtocolsTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29AB8A9F164C735800D49BEC /* CustomProtocolsTest.mm */; };
29AB8AA4164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 29AB8AA2164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm */; };
+ 2D640B5517875DFF00BFAF99 /* ScrollPinningBehaviors.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2D640B5417875DFF00BFAF99 /* ScrollPinningBehaviors.cpp */; };
+ 2DD7D3AA178205D00026E1E3 /* ResizeReversePaginatedWebView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2DD7D3A9178205D00026E1E3 /* ResizeReversePaginatedWebView.cpp */; };
+ 2DD7D3AF178227B30026E1E3 /* lots-of-text-vertical-lr.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */; };
+ 2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E7765CC16C4D80A00BA2BB1 /* mainIOS.mm */; };
+ 2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2E7765CE16C4D81100BA2BB1 /* mainMac.mm */; };
333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */; };
33BE5AF5137B5A6C00705813 /* MouseMoveAfterCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */; };
33BE5AF9137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */; };
@@ -43,6 +61,7 @@
33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */; };
37200B9213A16230007A4FAD /* VectorReverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37200B9113A16230007A4FAD /* VectorReverse.cpp */; };
3722C8691461E03E00C45D00 /* RenderedImageFromDOMRange.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */; };
+ 3751AF7C169518F800764319 /* DOMNodeFromJSObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3751AF7A169518F800764319 /* DOMNodeFromJSObject.mm */; };
3776BC63150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */; };
378E64731632646D00B6C676 /* InjectedBundleFrameHitTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */; };
378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */; };
@@ -53,10 +72,14 @@
37A6895F148A9B50005100FA /* SubresourceErrorCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */; };
37DC678D140D7C5000ABCCDB /* DOMRangeOfString.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */; };
37DC6791140D7D7600ABCCDB /* DOMRangeOfString.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */; };
+ 37E1064C1697681800B78BD0 /* DOMHTMLTableCellElementCellAbove.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */; };
+ 37E1064D16976C8500B78BD0 /* DOMHTMLTableCellCellAbove.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */; };
+ 37E38C34169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */; };
440A1D3914A0103A008A66F2 /* KURL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 440A1D3814A0103A008A66F2 /* KURL.cpp */; };
+ 4BB4160216815B2600824238 /* JSWrapperForNodeInWebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */; };
+ 4BB4160416815F9100824238 /* ElementAtPointInWebFrame.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */; };
4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */; };
4BFDFFA9131477770061F24B /* HitTestResultNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4BFDFFA8131477770061F24B /* HitTestResultNodeHandle.cpp */; };
- 4F4D2C0E1626FE2700320FE1 /* MemoryInstrumentationTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F4D2C0D1626FE2700320FE1 /* MemoryInstrumentationTest.cpp */; };
51393E201523944A005F39C5 /* DOMWindowExtensionBasic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51393E1E1523944A005F39C5 /* DOMWindowExtensionBasic.cpp */; };
51393E221523952D005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51393E1D1523944A005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp */; };
5142B2711517C88B00C32B19 /* ContextMenuCanCopyURL.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5142B2701517C88B00C32B19 /* ContextMenuCanCopyURL.mm */; };
@@ -77,11 +100,18 @@
76E182DA1547550100F1FADD /* WillSendSubmitEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76E182D91547550100F1FADD /* WillSendSubmitEvent.cpp */; };
76E182DD1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */; };
76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 76E182DE15475A8300F1FADD /* auto-submitting-form.html */; };
+ 7C8DDAAB1735DEEE00EA5AC0 /* CloseThenTerminate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C8DDAA91735DE1D00EA5AC0 /* CloseThenTerminate.cpp */; };
+ 7CFBCADF1743234F00B2BFCF /* WillLoad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFBCADD1743234F00B2BFCF /* WillLoad.cpp */; };
+ 7CFBCAE51743238F00B2BFCF /* WillLoad_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */; };
81B50193140F232300D9EB58 /* StringBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 81B50192140F232300D9EB58 /* StringBuilder.cpp */; };
+ 8A2C750E16CED9550024F352 /* ResizeWindowAfterCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A2C750D16CED9550024F352 /* ResizeWindowAfterCrash.cpp */; };
+ 8A3AF93B16C9ED2700D248C1 /* ReloadPageAfterCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8A3AF93A16C9ED2700D248C1 /* ReloadPageAfterCrash.cpp */; };
+ 8AA28C1A16D2FA7B002FF4DB /* LoadPageOnCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8AA28C1916D2FA7B002FF4DB /* LoadPageOnCrash.cpp */; };
930AD402150698D00067970F /* lots-of-text.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 930AD401150698B30067970F /* lots-of-text.html */; };
9318778915EEC57700A9CCE3 /* NewFirstVisuallyNonEmptyLayoutForImages.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93AF4ECA1506F035007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages.cpp */; };
9361002914DC95A70061379D /* lots-of-iframes.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 9361002814DC957B0061379D /* lots-of-iframes.html */; };
939BA91714103412001A01BD /* DeviceScaleFactorOnBack.mm in Sources */ = {isa = PBXBuildFile; fileRef = 939BA91614103412001A01BD /* DeviceScaleFactorOnBack.mm */; };
+ 93ABA80916DDAB91002DB2FA /* StringHasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93ABA80816DDAB91002DB2FA /* StringHasher.cpp */; };
93AF4ECE1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93AF4ECD1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp */; };
93AF4ED01506F123007FD57E /* lots-of-images.html in Resources */ = {isa = PBXBuildFile; fileRef = 93AF4ECF1506F123007FD57E /* lots-of-images.html */; };
93AF4ED11506F130007FD57E /* lots-of-images.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93AF4ECF1506F123007FD57E /* lots-of-images.html */; };
@@ -102,13 +132,14 @@
A5E2027515B21F6E00C13E14 /* WindowlessWebViewWithMedia.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = A5E2027015B2180600C13E14 /* WindowlessWebViewWithMedia.html */; };
A7A966DB140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */; };
B4039F9D15E6D8B3007255D6 /* MathExtras.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B4039F9C15E6D8B3007255D6 /* MathExtras.cpp */; };
+ B55AD1D2179F336C00AC1494 /* PreventImageLoadWithAutoResizing.mm in Sources */ = {isa = PBXBuildFile; fileRef = B55AD1D1179F336600AC1494 /* PreventImageLoadWithAutoResizing.mm */; };
+ B55AD1D5179F3B3000AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B55AD1D3179F3ABF00AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp */; };
B55F11A01516834F00915916 /* AttributedString.mm in Sources */ = {isa = PBXBuildFile; fileRef = B55F119F1516834F00915916 /* AttributedString.mm */; };
B55F11B71517D03300915916 /* attributedStringCustomFont.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = B55F11B01517A2C400915916 /* attributedStringCustomFont.html */; };
B55F11BE15191A0600915916 /* Ahem.ttf in Copy Resources */ = {isa = PBXBuildFile; fileRef = B55F11B9151916E600915916 /* Ahem.ttf */; };
BC029B181486AD6400817DA9 /* RetainPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC029B161486AD6400817DA9 /* RetainPtr.cpp */; };
BC029B1C1486B25900817DA9 /* RetainPtr.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC029B1B1486B25900817DA9 /* RetainPtr.mm */; };
BC131885117114B600B69727 /* PlatformUtilitiesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */; };
- BC131A9B1171316900B69727 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC131A9A1171316900B69727 /* main.mm */; };
BC131AA9117131FC00B69727 /* TestsController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC131AA8117131FC00B69727 /* TestsController.cpp */; };
BC22D31514DC689800FFB1DD /* UserMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22D31314DC689800FFB1DD /* UserMessage.cpp */; };
BC22D31914DC68B900FFB1DD /* UserMessage_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC22D31714DC68B800FFB1DD /* UserMessage_Bundle.cpp */; };
@@ -135,17 +166,14 @@
BC901E331492AF390074A667 /* WKConnection_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC901E311492AF390074A667 /* WKConnection_Bundle.cpp */; };
BC90955D125548AA00083756 /* PlatformWebViewMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC90955C125548AA00083756 /* PlatformWebViewMac.mm */; };
BC90964C125561BF00083756 /* VectorBasic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC90964B125561BF00083756 /* VectorBasic.cpp */; };
- BC90964E1255620C00083756 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC90964D1255620C00083756 /* JavaScriptCore.framework */; };
BC90977A125571AB00083756 /* PageLoadBasic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC909779125571AB00083756 /* PageLoadBasic.cpp */; };
BC909784125571CF00083756 /* simple.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = BC909778125571AB00083756 /* simple.html */; };
BC90995E12567BC100083756 /* WKString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC90995D12567BC100083756 /* WKString.cpp */; };
BC9099941256ACF100083756 /* WKStringJSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9099931256ACF100083756 /* WKStringJSString.cpp */; };
- BCA61DB511700EFD00460D1E /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA61DB411700EFD00460D1E /* WebKit2.framework */; };
BCAA485614A0444C0088FAC4 /* simple-tall.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = BCAA485514A021640088FAC4 /* simple-tall.html */; };
BCAA485814A044D40088FAC4 /* EditorCommands.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCAA485714A044D40088FAC4 /* EditorCommands.mm */; };
BCB68040126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB6803F126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp */; };
BCB68042126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCB68041126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp */; };
- BCB9E9F111235BDE00A137E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCB9E9F011235BDE00A137E0 /* Cocoa.framework */; };
BCBD3710125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBD370F125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp */; };
BCBD3737125ABBEB00D2C29F /* icon.png in Copy Resources */ = {isa = PBXBuildFile; fileRef = BCBD372E125ABBE600D2C29F /* icon.png */; };
BCBD3761125ABCFE00D2C29F /* FrameMIMETypePNG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCBD3760125ABCFE00D2C29F /* FrameMIMETypePNG.cpp */; };
@@ -153,13 +181,11 @@
C01363C813C3997300EF3964 /* StringOperators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C01363C713C3997300EF3964 /* StringOperators.cpp */; };
C01A23F21266156700C9ED55 /* spacebar-scrolling.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C02B7882126615410026BF0F /* spacebar-scrolling.html */; };
C02B77F2126612140026BF0F /* SpacebarScrolling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */; };
- C02B7854126613AE0026BF0F /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C02B7853126613AE0026BF0F /* Carbon.framework */; };
C045F9451385C2EA00C0F3CD /* DownloadDecideDestinationCrash.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C045F9441385C2E900C0F3CD /* DownloadDecideDestinationCrash.cpp */; };
C07E6CAF13FD67650038B22B /* DynamicDeviceScaleFactor.mm in Sources */ = {isa = PBXBuildFile; fileRef = C07E6CAE13FD67650038B22B /* DynamicDeviceScaleFactor.mm */; };
C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C07E6CB113FD738A0038B22B /* devicePixelRatio.html */; };
C081224213FC172400DC39AE /* JavaScriptTestMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C081224013FC172400DC39AE /* JavaScriptTestMac.mm */; };
C081224513FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = C081224413FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m */; };
- C081224913FC1B0300DC39AE /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C081224813FC1B0300DC39AE /* WebKit.framework */; };
C08587BF13FE956C001EF4E5 /* WebKitAgnosticTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = C08587BD13FE956C001EF4E5 /* WebKitAgnosticTest.mm */; };
C08587FC13FEC39B001EF4E5 /* InstanceMethodSwizzler.mm in Sources */ = {isa = PBXBuildFile; fileRef = C08587FB13FEC39B001EF4E5 /* InstanceMethodSwizzler.mm */; };
C085880013FEC3A6001EF4E5 /* InstanceMethodSwizzler.mm in Sources */ = {isa = PBXBuildFile; fileRef = C08587FF13FEC3A6001EF4E5 /* InstanceMethodSwizzler.mm */; };
@@ -171,18 +197,33 @@
C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */; };
C0C5D3BE14598B6F00A802A6 /* GetBackingScaleFactor.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5D3BC14598B6F00A802A6 /* GetBackingScaleFactor.mm */; };
C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */; };
+ C2CF975A16CEC7140054E99D /* JSContextBackForwardCache2.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C2CF975916CEC69E0054E99D /* JSContextBackForwardCache2.html */; };
+ C2CF975B16CEC71B0054E99D /* JSContextBackForwardCache1.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C2CF975816CEC69E0054E99D /* JSContextBackForwardCache1.html */; };
+ C2EB2DD316CAC7AC009B52EE /* WebViewDidCreateJavaScriptContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = C2EB2DD116CAC7AC009B52EE /* WebViewDidCreateJavaScriptContext.mm */; };
C507E8A714C6545B005D6B3B /* InspectorBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = C507E8A614C6545B005D6B3B /* InspectorBar.mm */; };
+ C5101C4F176B8D9200EE9B15 /* findRanges.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C5101C4E176B8BB900EE9B15 /* findRanges.html */; };
+ C51AFB99169F49FF009CCF66 /* FindMatches.mm in Sources */ = {isa = PBXBuildFile; fileRef = C51AFB98169F49FF009CCF66 /* FindMatches.mm */; };
C540F776152E4DA000A40C8C /* SimplifyMarkup.mm in Sources */ = {isa = PBXBuildFile; fileRef = C540F775152E4DA000A40C8C /* SimplifyMarkup.mm */; };
C540F784152E5A9A00A40C8C /* verboseMarkup.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C540F783152E5A7800A40C8C /* verboseMarkup.html */; };
+ C54237F016B8955800E638FC /* PasteboardNotifications.mm in Sources */ = {isa = PBXBuildFile; fileRef = C54237EE16B8955800E638FC /* PasteboardNotifications.mm */; };
+ C54237F116B8957D00E638FC /* PasteboardNotifications_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C54237ED16B8955800E638FC /* PasteboardNotifications_Bundle.cpp */; };
+ C5E1AFFE16B221F1006CC1F2 /* execCopy.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = C5E1AFFD16B22179006CC1F2 /* execCopy.html */; };
+ CD5393C81757BA9700C07123 /* MD5.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393C71757BA9700C07123 /* MD5.cpp */; };
+ CD5393CA1757BAC400C07123 /* SHA1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5393C91757BAC400C07123 /* SHA1.cpp */; };
CD5497B415857F0C00B5BC30 /* MediaTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD5497B315857F0C00B5BC30 /* MediaTime.cpp */; };
E1220DA0155B25480013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1220D9F155B25480013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.mm */; };
E1220DCA155B28AA0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = E1220DC9155B287D0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html */; };
+ E194E1BB177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = E194E1BA177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm */; };
+ E194E1BD177E53C7009C4D4E /* StopLoadingFromDidReceiveResponse.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = E194E1BC177E534A009C4D4E /* StopLoadingFromDidReceiveResponse.html */; };
E490296814E2E3A4002BEDD1 /* TypingStyleCrash.mm in Sources */ = {isa = PBXBuildFile; fileRef = E490296714E2E3A4002BEDD1 /* TypingStyleCrash.mm */; };
- F3FC3EE313678B7300126A65 /* libgtest.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3FC3EE213678B7300126A65 /* libgtest.a */; };
+ E4A757D4178AF1B100B5D7A4 /* Deque.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */; };
F660AA0D15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F660AA0C15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp */; };
F660AA1115A5F631003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F660AA0F15A5F624003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp */; };
F660AA1315A619C9003A1243 /* InjectedBundleInitializationUserDataCallbackWins.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F660AA1215A619C8003A1243 /* InjectedBundleInitializationUserDataCallbackWins.cpp */; };
F660AA1515A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F660AA1415A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp */; };
+ F6B7BE9417469209008A3445 /* DidAssociateFormControls.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6B7BE93174691EF008A3445 /* DidAssociateFormControls.cpp */; };
+ F6B7BE9517469212008A3445 /* DidAssociateFormControls_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6B7BE92174691EF008A3445 /* DidAssociateFormControls_Bundle.cpp */; };
+ F6B7BE9717469B96008A3445 /* associate-form-controls.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = F6B7BE9617469B7E008A3445 /* associate-form-controls.html */; };
F6F3F29113342FEB00A6BF19 /* CookieManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */; };
F6F49C6915545C8E0007F39D /* DOMWindowExtensionNoCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6F49C6715545C8D0007F39D /* DOMWindowExtensionNoCache.cpp */; };
F6F49C6B15545CA70007F39D /* DOMWindowExtensionNoCache_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6F49C6615545C8D0007F39D /* DOMWindowExtensionNoCache_Bundle.cpp */; };
@@ -217,38 +258,48 @@
dstPath = TestWebKitAPI.resources;
dstSubfolderSpec = 7;
files = (
- 52B8CF9815868D9100281053 /* SetDocumentURI.html in Copy Resources */,
+ 290A9BB91735F63800D71BBC /* OpenNewWindow.html in Copy Resources */,
+ 290F4275172A221C00939FF0 /* custom-protocol-sync-xhr.html in Copy Resources */,
+ C2CF975B16CEC71B0054E99D /* JSContextBackForwardCache1.html in Copy Resources */,
+ C2CF975A16CEC7140054E99D /* JSContextBackForwardCache2.html in Copy Resources */,
+ 1A9E52C913E65EF4006917F5 /* 18-characters.html in Copy Resources */,
+ F6B7BE9717469B96008A3445 /* associate-form-controls.html in Copy Resources */,
+ 379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */,
B55F11BE15191A0600915916 /* Ahem.ttf in Copy Resources */,
B55F11B71517D03300915916 /* attributedStringCustomFont.html in Copy Resources */,
76E182DF154767E600F1FADD /* auto-submitting-form.html in Copy Resources */,
26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */,
5142B2731517C8C800C32B19 /* ContextMenuCanCopyURL.html in Copy Resources */,
+ C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */,
+ 37E1064C1697681800B78BD0 /* DOMHTMLTableCellElementCellAbove.html in Copy Resources */,
+ 37DC6791140D7D7600ABCCDB /* DOMRangeOfString.html in Copy Resources */,
+ C5E1AFFE16B221F1006CC1F2 /* execCopy.html in Copy Resources */,
+ BC2D006412AA04CE00E732A3 /* file-with-anchor.html in Copy Resources */,
+ C5101C4F176B8D9200EE9B15 /* findRanges.html in Copy Resources */,
+ 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */,
9B4F8FA7159D52DD002D9F94 /* HTMLCollectionNamedItem.html in Copy Resources */,
9B26FCCA159D16DE00CC3765 /* HTMLFormCollectionNamedItem.html in Copy Resources */,
- E1220DCA155B28AA0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html in Copy Resources */,
- 517E7E04151119C100D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.html in Copy Resources */,
- A5E2027515B21F6E00C13E14 /* WindowlessWebViewWithMedia.html in Copy Resources */,
- 379028B914FAC24C007E6B43 /* acceptsFirstMouse.html in Copy Resources */,
- 33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */,
- 1A9E52C913E65EF4006917F5 /* 18-characters.html in Copy Resources */,
- C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */,
+ BCBD3737125ABBEB00D2C29F /* icon.png in Copy Resources */,
378E64791632707400B6C676 /* link-with-title.html in Copy Resources */,
9361002914DC95A70061379D /* lots-of-iframes.html in Copy Resources */,
93AF4ED11506F130007FD57E /* lots-of-images.html in Copy Resources */,
930AD402150698D00067970F /* lots-of-text.html in Copy Resources */,
+ 2DD7D3AF178227B30026E1E3 /* lots-of-text-vertical-lr.html in Copy Resources */,
+ E1220DCA155B28AA0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html in Copy Resources */,
+ 517E7E04151119C100D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.html in Copy Resources */,
33E79E06137B5FD900E32D99 /* mouse-move-listener.html in Copy Resources */,
A57A34F216AF6B2B00C2501F /* PageVisibilityStateWithWindowChanges.html in Copy Resources */,
F6FDDDD614241C6F004F1729 /* push-state.html in Copy Resources */,
- BCBD3737125ABBEB00D2C29F /* icon.png in Copy Resources */,
- 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */,
- BC909784125571CF00083756 /* simple.html in Copy Resources */,
+ 52B8CF9815868D9100281053 /* SetDocumentURI.html in Copy Resources */,
+ 1ADBEFE3130C6AA100D61D19 /* simple-accelerated-compositing.html in Copy Resources */,
C0ADBE9612FCA79B00D2C129 /* simple-form.html in Copy Resources */,
+ 33DC8912141955FE00747EF7 /* simple-iframe.html in Copy Resources */,
BCAA485614A0444C0088FAC4 /* simple-tall.html in Copy Resources */,
+ BC909784125571CF00083756 /* simple.html in Copy Resources */,
C01A23F21266156700C9ED55 /* spacebar-scrolling.html in Copy Resources */,
- BC2D006412AA04CE00E732A3 /* file-with-anchor.html in Copy Resources */,
- 37DC6791140D7D7600ABCCDB /* DOMRangeOfString.html in Copy Resources */,
- 1ADBEFE3130C6AA100D61D19 /* simple-accelerated-compositing.html in Copy Resources */,
+ E194E1BD177E53C7009C4D4E /* StopLoadingFromDidReceiveResponse.html in Copy Resources */,
C540F784152E5A9A00A40C8C /* verboseMarkup.html in Copy Resources */,
+ A5E2027515B21F6E00C13E14 /* WindowlessWebViewWithMedia.html in Copy Resources */,
);
name = "Copy Resources";
runOnlyForDeploymentPostprocessing = 0;
@@ -256,21 +307,27 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 00BC16851680FE810065F1E5 /* PublicSuffix.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PublicSuffix.mm; sourceTree = "<group>"; };
00CD9F6215BE312C002DA2CE /* BackForwardList.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BackForwardList.mm; sourceTree = "<group>"; };
0BCD833414857CE400EA2003 /* HashMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HashMap.cpp; path = WTF/HashMap.cpp; sourceTree = "<group>"; };
0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TemporaryChange.cpp; path = WTF/TemporaryChange.cpp; sourceTree = "<group>"; };
0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreStatisticsWithNoWebProcess.cpp; sourceTree = "<group>"; };
0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RedBlackTree.cpp; path = WTF/RedBlackTree.cpp; sourceTree = "<group>"; };
0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MetaAllocator.cpp; path = WTF/MetaAllocator.cpp; sourceTree = "<group>"; };
+ 14464012167A8305000BD218 /* LayoutUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutUnit.cpp; sourceTree = "<group>"; };
14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SaturatedArithmeticOperations.cpp; path = WTF/SaturatedArithmeticOperations.cpp; sourceTree = "<group>"; };
1A02C84B125D4A5E00E3F4BD /* find.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = find.html; sourceTree = "<group>"; };
1A02C84E125D4A8400E3F4BD /* Find.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Find.cpp; sourceTree = "<group>"; };
1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvaluateJavaScript.cpp; sourceTree = "<group>"; };
+ 1A7BFC0A171A0BDB00BC5F64 /* WillSendSubmitEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WillSendSubmitEvent.mm; sourceTree = "<group>"; };
1AA9E55714980A9900001A8A /* Functional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Functional.cpp; path = WTF/Functional.cpp; sourceTree = "<group>"; };
1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ForceRepaint.cpp; sourceTree = "<group>"; };
1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "simple-accelerated-compositing.html"; sourceTree = "<group>"; };
+ 1AE72F47173EB214006362F0 /* TerminateTwice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TerminateTwice.cpp; sourceTree = "<group>"; };
1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundleControllerMac.mm; sourceTree = "<group>"; };
+ 1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetPIDAfterAbortedProcessLaunch.cpp; sourceTree = "<group>"; };
261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SetAndUpdateCacheModel.mm; sourceTree = "<group>"; };
+ 26300B1716755CD90066886D /* ListHashSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ListHashSet.cpp; path = WTF/ListHashSet.cpp; sourceTree = "<group>"; };
265AF54F15D1E48A00B0CB4A /* WTFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WTFString.cpp; path = WTF/WTFString.cpp; sourceTree = "<group>"; };
266FAFD215E5775200F61D5B /* IntegerToStringConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IntegerToStringConversion.cpp; path = WTF/IntegerToStringConversion.cpp; sourceTree = "<group>"; };
26A2C72E15E2E73C005B1A14 /* CString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CString.cpp; path = WTF/CString.cpp; sourceTree = "<group>"; };
@@ -279,10 +336,23 @@
26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = CancelLoadFromResourceLoadDelegate.html; sourceTree = "<group>"; };
26F1B44215CA434F00D1E4BF /* AtomicString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AtomicString.cpp; path = WTF/AtomicString.cpp; sourceTree = "<group>"; };
26F1B44315CA434F00D1E4BF /* StringImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringImpl.cpp; path = WTF/StringImpl.cpp; sourceTree = "<group>"; };
+ 290A9BB51735DE8A00D71BBC /* CloseNewWindowInNavigationPolicyDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CloseNewWindowInNavigationPolicyDelegate.mm; sourceTree = "<group>"; };
+ 290A9BB81735F42300D71BBC /* OpenNewWindow.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = OpenNewWindow.html; sourceTree = "<group>"; };
+ 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "custom-protocol-sync-xhr.html"; sourceTree = "<group>"; };
+ 290F4276172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CustomProtocolsSyncXHRTest.mm; sourceTree = "<group>"; };
+ 290F4279172A23A500939FF0 /* TestProtocol.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestProtocol.mm; sourceTree = "<group>"; };
+ 290F427A172A23A500939FF0 /* TestProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestProtocol.h; sourceTree = "<group>"; };
2943BE84161DFEB800999E3D /* UserContentTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = UserContentTest.mm; path = WebKit2ObjC/UserContentTest.mm; sourceTree = "<group>"; };
+ 297234B2173AD04800983601 /* CustomProtocolsInvalidScheme.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CustomProtocolsInvalidScheme.mm; path = WebKit2ObjC/CustomProtocolsInvalidScheme.mm; sourceTree = "<group>"; };
+ 297234B5173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CustomProtocolsInvalidScheme_Bundle.cpp; path = WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp; sourceTree = "<group>"; };
29AB8A9F164C735800D49BEC /* CustomProtocolsTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CustomProtocolsTest.mm; path = WebKit2ObjC/CustomProtocolsTest.mm; sourceTree = "<group>"; };
29AB8AA2164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TestBrowsingContextLoadDelegate.mm; sourceTree = "<group>"; };
29AB8AA3164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestBrowsingContextLoadDelegate.h; sourceTree = "<group>"; };
+ 2D640B5417875DFF00BFAF99 /* ScrollPinningBehaviors.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollPinningBehaviors.cpp; sourceTree = "<group>"; };
+ 2DD7D3A9178205D00026E1E3 /* ResizeReversePaginatedWebView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResizeReversePaginatedWebView.cpp; sourceTree = "<group>"; };
+ 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "lots-of-text-vertical-lr.html"; sourceTree = "<group>"; };
+ 2E7765CC16C4D80A00BA2BB1 /* mainIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = mainIOS.mm; sourceTree = "<group>"; };
+ 2E7765CE16C4D81100BA2BB1 /* mainMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = mainMac.mm; sourceTree = "<group>"; };
333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreventEmptyUserAgent.cpp; sourceTree = "<group>"; };
33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseMoveAfterCrash.cpp; sourceTree = "<group>"; };
33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseMoveAfterCrash_Bundle.cpp; sourceTree = "<group>"; };
@@ -292,6 +362,7 @@
33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "mouse-move-listener.html"; sourceTree = "<group>"; };
37200B9113A16230007A4FAD /* VectorReverse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VectorReverse.cpp; path = WTF/VectorReverse.cpp; sourceTree = "<group>"; };
3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderedImageFromDOMRange.mm; sourceTree = "<group>"; };
+ 3751AF7A169518F800764319 /* DOMNodeFromJSObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMNodeFromJSObject.mm; sourceTree = "<group>"; };
3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorInDashboardRegions.mm; sourceTree = "<group>"; };
378E64711632646D00B6C676 /* InjectedBundleFrameHitTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest.cpp; sourceTree = "<group>"; };
378E64751632655D00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleFrameHitTest_Bundle.cpp; sourceTree = "<group>"; };
@@ -302,11 +373,15 @@
37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SubresourceErrorCrash.mm; sourceTree = "<group>"; };
37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMRangeOfString.mm; sourceTree = "<group>"; };
37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DOMRangeOfString.html; sourceTree = "<group>"; };
+ 37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMHTMLTableCellCellAbove.mm; sourceTree = "<group>"; };
+ 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = DOMHTMLTableCellElementCellAbove.html; sourceTree = "<group>"; };
+ 37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewDidRemoveFrameFromHierarchy.mm; sourceTree = "<group>"; };
440A1D3814A0103A008A66F2 /* KURL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = KURL.cpp; sourceTree = "<group>"; };
44A622C114A0E2B60048515B /* WTFStringUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WTFStringUtilities.h; sourceTree = "<group>"; };
+ 4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSWrapperForNodeInWebFrame.mm; sourceTree = "<group>"; };
+ 4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ElementAtPointInWebFrame.mm; sourceTree = "<group>"; };
4BFDFFA61314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResultNodeHandle_Bundle.cpp; sourceTree = "<group>"; };
4BFDFFA8131477770061F24B /* HitTestResultNodeHandle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HitTestResultNodeHandle.cpp; sourceTree = "<group>"; };
- 4F4D2C0D1626FE2700320FE1 /* MemoryInstrumentationTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemoryInstrumentationTest.cpp; path = WTF/MemoryInstrumentationTest.cpp; sourceTree = "<group>"; };
51393E1D1523944A005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtensionBasic_Bundle.cpp; sourceTree = "<group>"; };
51393E1E1523944A005F39C5 /* DOMWindowExtensionBasic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtensionBasic.cpp; sourceTree = "<group>"; };
5142B2701517C88B00C32B19 /* ContextMenuCanCopyURL.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContextMenuCanCopyURL.mm; sourceTree = "<group>"; };
@@ -327,11 +402,18 @@
76E182D91547550100F1FADD /* WillSendSubmitEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillSendSubmitEvent.cpp; sourceTree = "<group>"; };
76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillSendSubmitEvent_Bundle.cpp; sourceTree = "<group>"; };
76E182DE15475A8300F1FADD /* auto-submitting-form.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "auto-submitting-form.html"; sourceTree = "<group>"; };
+ 7C8DDAA91735DE1D00EA5AC0 /* CloseThenTerminate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CloseThenTerminate.cpp; sourceTree = "<group>"; };
+ 7CFBCADD1743234F00B2BFCF /* WillLoad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad.cpp; sourceTree = "<group>"; };
+ 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WillLoad_Bundle.cpp; sourceTree = "<group>"; };
81B50192140F232300D9EB58 /* StringBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringBuilder.cpp; path = WTF/StringBuilder.cpp; sourceTree = "<group>"; };
+ 8A2C750D16CED9550024F352 /* ResizeWindowAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResizeWindowAfterCrash.cpp; sourceTree = "<group>"; };
+ 8A3AF93A16C9ED2700D248C1 /* ReloadPageAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReloadPageAfterCrash.cpp; sourceTree = "<group>"; };
+ 8AA28C1916D2FA7B002FF4DB /* LoadPageOnCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoadPageOnCrash.cpp; sourceTree = "<group>"; };
8DD76FA10486AA7600D96B5E /* TestWebKitAPI */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = TestWebKitAPI; sourceTree = BUILT_PRODUCTS_DIR; };
930AD401150698B30067970F /* lots-of-text.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "lots-of-text.html"; sourceTree = "<group>"; };
9361002814DC957B0061379D /* lots-of-iframes.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "lots-of-iframes.html"; sourceTree = "<group>"; };
939BA91614103412001A01BD /* DeviceScaleFactorOnBack.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorOnBack.mm; sourceTree = "<group>"; };
+ 93ABA80816DDAB91002DB2FA /* StringHasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringHasher.cpp; path = WTF/StringHasher.cpp; sourceTree = "<group>"; };
93AF4ECA1506F035007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewFirstVisuallyNonEmptyLayoutForImages.cpp; sourceTree = "<group>"; };
93AF4ECD1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp; sourceTree = "<group>"; };
93AF4ECF1506F123007FD57E /* lots-of-images.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "lots-of-images.html"; sourceTree = "<group>"; };
@@ -352,6 +434,8 @@
A5E2027215B2181900C13E14 /* WindowlessWebViewWithMedia.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WindowlessWebViewWithMedia.mm; sourceTree = "<group>"; };
A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CheckedArithmeticOperations.cpp; path = WTF/CheckedArithmeticOperations.cpp; sourceTree = "<group>"; };
B4039F9C15E6D8B3007255D6 /* MathExtras.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MathExtras.cpp; path = WTF/MathExtras.cpp; sourceTree = "<group>"; };
+ B55AD1D1179F336600AC1494 /* PreventImageLoadWithAutoResizing.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = PreventImageLoadWithAutoResizing.mm; path = WebKit2ObjC/PreventImageLoadWithAutoResizing.mm; sourceTree = "<group>"; };
+ B55AD1D3179F3ABF00AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PreventImageLoadWithAutoResizing_Bundle.cpp; path = WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp; sourceTree = "<group>"; };
B55F119F1516834F00915916 /* AttributedString.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AttributedString.mm; sourceTree = "<group>"; };
B55F11B01517A2C400915916 /* attributedStringCustomFont.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = attributedStringCustomFont.html; sourceTree = "<group>"; };
B55F11B9151916E600915916 /* Ahem.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Ahem.ttf; sourceTree = "<group>"; };
@@ -359,7 +443,6 @@
BC029B1B1486B25900817DA9 /* RetainPtr.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RetainPtr.mm; path = WTF/ns/RetainPtr.mm; sourceTree = "<group>"; };
BC131883117114A800B69727 /* PlatformUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformUtilities.h; sourceTree = "<group>"; };
BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformUtilitiesMac.mm; sourceTree = "<group>"; };
- BC131A9A1171316900B69727 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
BC131A9E1171317C00B69727 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
BC131AA8117131FC00B69727 /* TestsController.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = TestsController.cpp; sourceTree = "<group>"; };
BC22D31314DC689800FFB1DD /* UserMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserMessage.cpp; sourceTree = "<group>"; };
@@ -434,18 +517,34 @@
C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ResponsivenessTimerDoesntFireEarly_Bundle.cpp; sourceTree = "<group>"; };
C0C5D3BC14598B6F00A802A6 /* GetBackingScaleFactor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GetBackingScaleFactor.mm; sourceTree = "<group>"; };
C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GetBackingScaleFactor_Bundle.mm; sourceTree = "<group>"; };
+ C2CF975816CEC69E0054E99D /* JSContextBackForwardCache1.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = JSContextBackForwardCache1.html; sourceTree = "<group>"; };
+ C2CF975916CEC69E0054E99D /* JSContextBackForwardCache2.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = JSContextBackForwardCache2.html; sourceTree = "<group>"; };
+ C2EB2DD116CAC7AC009B52EE /* WebViewDidCreateJavaScriptContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebViewDidCreateJavaScriptContext.mm; sourceTree = "<group>"; };
C507E8A614C6545B005D6B3B /* InspectorBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InspectorBar.mm; sourceTree = "<group>"; };
+ C5101C4E176B8BB900EE9B15 /* findRanges.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = findRanges.html; sourceTree = "<group>"; };
+ C51AFB98169F49FF009CCF66 /* FindMatches.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FindMatches.mm; sourceTree = "<group>"; };
C540F775152E4DA000A40C8C /* SimplifyMarkup.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimplifyMarkup.mm; sourceTree = "<group>"; };
C540F783152E5A7800A40C8C /* verboseMarkup.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = verboseMarkup.html; sourceTree = "<group>"; };
+ C54237ED16B8955800E638FC /* PasteboardNotifications_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PasteboardNotifications_Bundle.cpp; sourceTree = "<group>"; };
+ C54237EE16B8955800E638FC /* PasteboardNotifications.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardNotifications.mm; sourceTree = "<group>"; };
+ C5E1AFFD16B22179006CC1F2 /* execCopy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = execCopy.html; sourceTree = "<group>"; };
+ CD5393C71757BA9700C07123 /* MD5.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MD5.cpp; path = WTF/MD5.cpp; sourceTree = "<group>"; };
+ CD5393C91757BAC400C07123 /* SHA1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SHA1.cpp; path = WTF/SHA1.cpp; sourceTree = "<group>"; };
CD5497B315857F0C00B5BC30 /* MediaTime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaTime.cpp; path = WTF/MediaTime.cpp; sourceTree = "<group>"; };
E1220D9F155B25480013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MemoryCacheDisableWithinResourceLoadDelegate.mm; sourceTree = "<group>"; };
E1220DC9155B287D0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = MemoryCacheDisableWithinResourceLoadDelegate.html; sourceTree = "<group>"; };
+ E194E1BA177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StopLoadingFromDidReceiveResponse.mm; sourceTree = "<group>"; };
+ E194E1BC177E534A009C4D4E /* StopLoadingFromDidReceiveResponse.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = StopLoadingFromDidReceiveResponse.html; sourceTree = "<group>"; };
E490296714E2E3A4002BEDD1 /* TypingStyleCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = TypingStyleCrash.mm; sourceTree = "<group>"; };
+ E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Deque.cpp; path = WTF/Deque.cpp; sourceTree = "<group>"; };
F3FC3EE213678B7300126A65 /* libgtest.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libgtest.a; sourceTree = BUILT_PRODUCTS_DIR; };
F660AA0C15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetInjectedBundleInitializationUserDataCallback.cpp; sourceTree = "<group>"; };
F660AA0F15A5F624003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GetInjectedBundleInitializationUserDataCallback_Bundle.cpp; sourceTree = "<group>"; };
F660AA1215A619C8003A1243 /* InjectedBundleInitializationUserDataCallbackWins.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleInitializationUserDataCallbackWins.cpp; sourceTree = "<group>"; };
F660AA1415A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp; sourceTree = "<group>"; };
+ F6B7BE92174691EF008A3445 /* DidAssociateFormControls_Bundle.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DidAssociateFormControls_Bundle.cpp; sourceTree = "<group>"; };
+ F6B7BE93174691EF008A3445 /* DidAssociateFormControls.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DidAssociateFormControls.cpp; sourceTree = "<group>"; };
+ F6B7BE9617469B7E008A3445 /* associate-form-controls.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "associate-form-controls.html"; sourceTree = "<group>"; };
F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CookieManager.cpp; sourceTree = "<group>"; };
F6F49C6615545C8D0007F39D /* DOMWindowExtensionNoCache_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtensionNoCache_Bundle.cpp; sourceTree = "<group>"; };
F6F49C6715545C8D0007F39D /* DOMWindowExtensionNoCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtensionNoCache.cpp; sourceTree = "<group>"; };
@@ -459,12 +558,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- BCB9E9F111235BDE00A137E0 /* Cocoa.framework in Frameworks */,
- C081224913FC1B0300DC39AE /* WebKit.framework in Frameworks */,
- BCA61DB511700EFD00460D1E /* WebKit2.framework in Frameworks */,
- BC90964E1255620C00083756 /* JavaScriptCore.framework in Frameworks */,
- C02B7854126613AE0026BF0F /* Carbon.framework in Frameworks */,
- F3FC3EE313678B7300126A65 /* libgtest.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -473,8 +566,8 @@
buildActionMask = 2147483647;
files = (
BC575A90126E74D3006F0F12 /* Cocoa.framework in Frameworks */,
- BC575A91126E74D3006F0F12 /* WebKit2.framework in Frameworks */,
BC575A92126E74D3006F0F12 /* JavaScriptCore.framework in Frameworks */,
+ BC575A91126E74D3006F0F12 /* WebKit2.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -496,11 +589,12 @@
08FB7795FE84155DC02AAC07 /* Source */ = {
isa = PBXGroup;
children = (
- BCA61C3A11700B9400460D1E /* mac */,
BC575944126E733C006F0F12 /* InjectedBundle */,
+ 2E9660DC16C07D7B00371B42 /* ios */,
+ BCA61C3A11700B9400460D1E /* mac */,
+ BC131A9E1171317C00B69727 /* config.h */,
C0ADBE7A12FCA4D000D2C129 /* JavaScriptTest.cpp */,
C0ADBE7B12FCA4D000D2C129 /* JavaScriptTest.h */,
- BC131A9E1171317C00B69727 /* config.h */,
BC575BBF126F5752006F0F12 /* PlatformUtilities.cpp */,
BC131883117114A800B69727 /* PlatformUtilities.h */,
BC90951B125533D700083756 /* PlatformWebView.h */,
@@ -515,12 +609,12 @@
08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
- F3FC3EE213678B7300126A65 /* libgtest.a */,
+ C02B7853126613AE0026BF0F /* Carbon.framework */,
BCB9E9F011235BDE00A137E0 /* Cocoa.framework */,
BC90964D1255620C00083756 /* JavaScriptCore.framework */,
+ F3FC3EE213678B7300126A65 /* libgtest.a */,
C081224813FC1B0300DC39AE /* WebKit.framework */,
BCA61DB411700EFD00460D1E /* WebKit2.framework */,
- C02B7853126613AE0026BF0F /* Carbon.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
@@ -534,10 +628,19 @@
name = Products;
sourceTree = "<group>";
};
+ 2E9660DC16C07D7B00371B42 /* ios */ = {
+ isa = PBXGroup;
+ children = (
+ 2E7765CC16C4D80A00BA2BB1 /* mainIOS.mm */,
+ );
+ path = ios;
+ sourceTree = "<group>";
+ };
440A1D3614A01000008A66F2 /* WebCore */ = {
isa = PBXGroup;
children = (
440A1D3814A0103A008A66F2 /* KURL.cpp */,
+ 14464012167A8305000BD218 /* LayoutUnit.cpp */,
);
path = WebCore;
sourceTree = "<group>";
@@ -553,7 +656,12 @@
BC3C4C6F14575B1D0025FB62 /* WebKit2 Objective-C */ = {
isa = PBXGroup;
children = (
+ B55AD1D3179F3ABF00AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp */,
+ B55AD1D1179F336600AC1494 /* PreventImageLoadWithAutoResizing.mm */,
+ 297234B2173AD04800983601 /* CustomProtocolsInvalidScheme.mm */,
+ 297234B5173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp */,
29AB8A9F164C735800D49BEC /* CustomProtocolsTest.mm */,
+ 290F4276172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm */,
2943BE84161DFEB800999E3D /* UserContentTest.mm */,
BC3C4C7D14587AA60025FB62 /* WKBrowsingContextGroupTest.mm */,
BC3C4C7014575B6A0025FB62 /* WKBrowsingContextLoadDelegateTest.mm */,
@@ -565,10 +673,10 @@
isa = PBXGroup;
children = (
BC575981126E74AF006F0F12 /* InjectedBundle-Info.plist */,
+ BC575AA0126E7657006F0F12 /* InjectedBundleController.cpp */,
+ BC575A9F126E7657006F0F12 /* InjectedBundleController.h */,
BC575946126E7351006F0F12 /* InjectedBundleMain.cpp */,
BC575A9E126E75FB006F0F12 /* InjectedBundleTest.h */,
- BC575A9F126E7657006F0F12 /* InjectedBundleController.h */,
- BC575AA0126E7657006F0F12 /* InjectedBundleController.cpp */,
);
name = InjectedBundle;
sourceTree = "<group>";
@@ -590,19 +698,23 @@
C0C5D3BB14598B6F00A802A6 /* mac */,
BC90977B125571AE00083756 /* Resources */,
BC246D8C132F115A00B56D7C /* AboutBlankLoad.cpp */,
+ 7C8DDAA91735DE1D00EA5AC0 /* CloseThenTerminate.cpp */,
BC246D98132F1FE100B56D7C /* CanHandleRequest.cpp */,
BC246D97132F1FE100B56D7C /* CanHandleRequest_Bundle.cpp */,
F6F3F29013342FEB00A6BF19 /* CookieManager.cpp */,
+ F6B7BE93174691EF008A3445 /* DidAssociateFormControls.cpp */,
+ F6B7BE92174691EF008A3445 /* DidAssociateFormControls_Bundle.cpp */,
+ BCB6803F126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp */,
+ BCB68041126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp */,
51393E1E1523944A005F39C5 /* DOMWindowExtensionBasic.cpp */,
51393E1D1523944A005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp */,
F6F49C6715545C8D0007F39D /* DOMWindowExtensionNoCache.cpp */,
F6F49C6615545C8D0007F39D /* DOMWindowExtensionNoCache_Bundle.cpp */,
- BCB6803F126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp */,
- BCB68041126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp */,
C045F9441385C2E900C0F3CD /* DownloadDecideDestinationCrash.cpp */,
1A5FEFDC1270E2A3000E2921 /* EvaluateJavaScript.cpp */,
BCC8B95A12611F4700DE46A4 /* FailedLoad.cpp */,
1A02C84E125D4A8400E3F4BD /* Find.cpp */,
+ C51AFB98169F49FF009CCF66 /* FindMatches.mm */,
1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */,
BCBD370F125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp */,
BCBD3760125ABCFE00D2C29F /* FrameMIMETypePNG.cpp */,
@@ -619,6 +731,7 @@
52CB47401448FB9300873995 /* LoadAlternateHTMLStringWithNonDirectoryURL.cpp */,
33DC8910141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp */,
33DC89131419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp */,
+ 8AA28C1916D2FA7B002FF4DB /* LoadPageOnCrash.cpp */,
33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */,
33BE5AF8137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp */,
93F1DB3014DA20760024C362 /* NewFirstVisuallyNonEmptyLayout.cpp */,
@@ -634,18 +747,28 @@
A51B650816ADF9B1007AA5D9 /* PageVisibilityState.cpp */,
52E5CE4514D21E9D003B2BD8 /* ParentFrame.cpp */,
52E5CE4814D21EAB003B2BD8 /* ParentFrame_Bundle.cpp */,
+ C54237EE16B8955800E638FC /* PasteboardNotifications.mm */,
+ C54237ED16B8955800E638FC /* PasteboardNotifications_Bundle.cpp */,
333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */,
F6FDDDD214241AD4004F1729 /* PrivateBrowsingPushStateNoHistoryCallback.cpp */,
+ 8A3AF93A16C9ED2700D248C1 /* ReloadPageAfterCrash.cpp */,
+ 2DD7D3A9178205D00026E1E3 /* ResizeReversePaginatedWebView.cpp */,
+ 8A2C750D16CED9550024F352 /* ResizeWindowAfterCrash.cpp */,
C0BD669C131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp */,
C0BD669E131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp */,
C0ADBE8212FCA6AA00D2C129 /* RestoreSessionStateContainingFormData.cpp */,
+ 2D640B5417875DFF00BFAF99 /* ScrollPinningBehaviors.cpp */,
51FCF7981534AC6D00104491 /* ShouldGoToBackForwardListItem.cpp */,
51FCF7971534AC6D00104491 /* ShouldGoToBackForwardListItem_Bundle.cpp */,
C02B77F1126612140026BF0F /* SpacebarScrolling.cpp */,
+ 1AE72F47173EB214006362F0 /* TerminateTwice.cpp */,
BC22D31314DC689800FFB1DD /* UserMessage.cpp */,
BC22D31714DC68B800FFB1DD /* UserMessage_Bundle.cpp */,
520BCF4B141EB09E00937EA8 /* WebArchive.cpp */,
520BCF4A141EB09E00937EA8 /* WebArchive_Bundle.cpp */,
+ 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */,
+ 7CFBCADD1743234F00B2BFCF /* WillLoad.cpp */,
+ 7CFBCAE31743238E00B2BFCF /* WillLoad_Bundle.cpp */,
76E182D91547550100F1FADD /* WillSendSubmitEvent.cpp */,
76E182DC1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp */,
BC901E221492ADCE0074A667 /* WKConnection.cpp */,
@@ -654,7 +777,6 @@
BC7B619A1299FE9E00D174A4 /* WKPreferences.cpp */,
BC90995D12567BC100083756 /* WKString.cpp */,
BC9099931256ACF100083756 /* WKStringJSString.cpp */,
- 0F17BBD415AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp */,
);
path = WebKit2;
sourceTree = "<group>";
@@ -662,22 +784,26 @@
BC9096461255618900083756 /* WTF */ = {
isa = PBXGroup;
children = (
- BC029B1A1486B23800817DA9 /* ns */,
C0991C4F143C7D68007998F2 /* cf */,
+ BC029B1A1486B23800817DA9 /* ns */,
26F1B44215CA434F00D1E4BF /* AtomicString.cpp */,
- 26A2C72E15E2E73C005B1A14 /* CString.cpp */,
- CD5497B315857F0C00B5BC30 /* MediaTime.cpp */,
- 4F4D2C0D1626FE2700320FE1 /* MemoryInstrumentationTest.cpp */,
- 0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */,
- 0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */,
A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */,
+ 26A2C72E15E2E73C005B1A14 /* CString.cpp */,
+ E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */,
1AA9E55714980A9900001A8A /* Functional.cpp */,
0BCD833414857CE400EA2003 /* HashMap.cpp */,
26B2DFF815BDE599004F691D /* HashSet.cpp */,
+ 266FAFD215E5775200F61D5B /* IntegerToStringConversion.cpp */,
+ 26300B1716755CD90066886D /* ListHashSet.cpp */,
+ CD5393C71757BA9700C07123 /* MD5.cpp */,
B4039F9C15E6D8B3007255D6 /* MathExtras.cpp */,
+ CD5497B315857F0C00B5BC30 /* MediaTime.cpp */,
+ 0FC6C4CE141034AD005B7F0C /* MetaAllocator.cpp */,
+ 0FC6C4CB141027E0005B7F0C /* RedBlackTree.cpp */,
+ CD5393C91757BAC400C07123 /* SHA1.cpp */,
14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */,
- 266FAFD215E5775200F61D5B /* IntegerToStringConversion.cpp */,
81B50192140F232300D9EB58 /* StringBuilder.cpp */,
+ 93ABA80816DDAB91002DB2FA /* StringHasher.cpp */,
26F1B44315CA434F00D1E4BF /* StringImpl.cpp */,
C01363C713C3997300EF3964 /* StringOperators.cpp */,
0BCD85691485C98B00EA2003 /* TemporaryChange.cpp */,
@@ -693,14 +819,19 @@
isa = PBXGroup;
children = (
C045F9461385C2F800C0F3CD /* 18-characters.html */,
+ F6B7BE9617469B7E008A3445 /* associate-form-controls.html */,
76E182DE15475A8300F1FADD /* auto-submitting-form.html */,
+ 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */,
+ C5E1AFFD16B22179006CC1F2 /* execCopy.html */,
BC2D004A12A9FEB300E732A3 /* file-with-anchor.html */,
1A02C84B125D4A5E00E3F4BD /* find.html */,
+ C5101C4E176B8BB900EE9B15 /* findRanges.html */,
BCBD372E125ABBE600D2C29F /* icon.png */,
378E647816326FDF00B6C676 /* link-with-title.html */,
9361002814DC957B0061379D /* lots-of-iframes.html */,
93AF4ECF1506F123007FD57E /* lots-of-images.html */,
930AD401150698B30067970F /* lots-of-text.html */,
+ 2DD7D3AE178227AC0026E1E3 /* lots-of-text-vertical-lr.html */,
33E79E05137B5FCE00E32D99 /* mouse-move-listener.html */,
F6FDDDD514241C48004F1729 /* push-state.html */,
1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */,
@@ -720,13 +851,15 @@
C08587FE13FEC3A6001EF4E5 /* InstanceMethodSwizzler.h */,
C08587FF13FEC3A6001EF4E5 /* InstanceMethodSwizzler.mm */,
C081224013FC172400DC39AE /* JavaScriptTestMac.mm */,
- BC131A9A1171316900B69727 /* main.mm */,
+ 2E7765CE16C4D81100BA2BB1 /* mainMac.mm */,
BC131884117114B600B69727 /* PlatformUtilitiesMac.mm */,
BC90955C125548AA00083756 /* PlatformWebViewMac.mm */,
C081224313FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.h */,
C081224413FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m */,
29AB8AA3164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.h */,
29AB8AA2164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm */,
+ 290F427A172A23A500939FF0 /* TestProtocol.h */,
+ 290F4279172A23A500939FF0 /* TestProtocol.mm */,
C08587BE13FE956C001EF4E5 /* WebKitAgnosticTest.h */,
C08587BD13FE956C001EF4E5 /* WebKitAgnosticTest.mm */,
);
@@ -737,8 +870,8 @@
isa = PBXGroup;
children = (
FE217ECB1640A54A0052988B /* JavaScriptCore */,
- C08587F913FEC39B001EF4E5 /* TestWebKitAPI */,
C07E6CAD13FD67650038B22B /* mac */,
+ C08587F913FEC39B001EF4E5 /* TestWebKitAPI */,
440A1D3614A01000008A66F2 /* WebCore */,
BC9096411255616000083756 /* WebKit2 */,
BC3C4C6F14575B1D0025FB62 /* WebKit2 Objective-C */,
@@ -753,18 +886,25 @@
C07E6CB013FD737C0038B22B /* Resources */,
379028B514FABD92007E6B43 /* AcceptsFirstMouse.mm */,
B55F119F1516834F00915916 /* AttributedString.mm */,
+ 00CD9F6215BE312C002DA2CE /* BackForwardList.mm */,
26DF5A5D15A29BAA003689C2 /* CancelLoadFromResourceLoadDelegate.mm */,
+ 290A9BB51735DE8A00D71BBC /* CloseNewWindowInNavigationPolicyDelegate.mm */,
5142B2701517C88B00C32B19 /* ContextMenuCanCopyURL.mm */,
- 37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */,
- C07E6CAE13FD67650038B22B /* DynamicDeviceScaleFactor.mm */,
3776BC62150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm */,
939BA91614103412001A01BD /* DeviceScaleFactorOnBack.mm */,
+ 37E1064A1697676400B78BD0 /* DOMHTMLTableCellCellAbove.mm */,
+ 3751AF7A169518F800764319 /* DOMNodeFromJSObject.mm */,
+ 37DC678B140D7C5000ABCCDB /* DOMRangeOfString.mm */,
+ C07E6CAE13FD67650038B22B /* DynamicDeviceScaleFactor.mm */,
+ 4BB4160316815F9100824238 /* ElementAtPointInWebFrame.mm */,
9B4F8FA3159D52B1002D9F94 /* HTMLCollectionNamedItem.mm */,
9B26FC6B159D061000CC3765 /* HTMLFormCollectionNamedItem.mm */,
C507E8A614C6545B005D6B3B /* InspectorBar.mm */,
+ 4BB4160116815B2600824238 /* JSWrapperForNodeInWebFrame.mm */,
E1220D9F155B25480013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.mm */,
517E7DFB15110EA600D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.mm */,
A57A34EF16AF677200C2501F /* PageVisibilityStateWithWindowChanges.mm */,
+ 00BC16851680FE810065F1E5 /* PublicSuffix.mm */,
3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */,
261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */,
52B8CF9515868CF000281053 /* SetDocumentURI.mm */,
@@ -773,8 +913,11 @@
37A6895D148A9B50005100FA /* SubresourceErrorCrash.mm */,
E490296714E2E3A4002BEDD1 /* TypingStyleCrash.mm */,
51FBBB4C1513D4E900822738 /* WebViewCanPasteURL.mm */,
+ C2EB2DD116CAC7AC009B52EE /* WebViewDidCreateJavaScriptContext.mm */,
+ 37E38C33169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm */,
+ 1A7BFC0A171A0BDB00BC5F64 /* WillSendSubmitEvent.mm */,
A5E2027215B2181900C13E14 /* WindowlessWebViewWithMedia.mm */,
- 00CD9F6215BE312C002DA2CE /* BackForwardList.mm */,
+ E194E1BA177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm */,
);
path = mac;
sourceTree = "<group>";
@@ -782,19 +925,24 @@
C07E6CB013FD737C0038B22B /* Resources */ = {
isa = PBXGroup;
children = (
- 52B8CF9415868CF000281053 /* SetDocumentURI.html */,
+ C2CF975816CEC69E0054E99D /* JSContextBackForwardCache1.html */,
+ C2CF975916CEC69E0054E99D /* JSContextBackForwardCache2.html */,
+ 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */,
B55F11B9151916E600915916 /* Ahem.ttf */,
B55F11B01517A2C400915916 /* attributedStringCustomFont.html */,
- 379028B814FABE49007E6B43 /* acceptsFirstMouse.html */,
26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */,
5142B2721517C89100C32B19 /* ContextMenuCanCopyURL.html */,
+ C07E6CB113FD738A0038B22B /* devicePixelRatio.html */,
+ 37E1064B169767F700B78BD0 /* DOMHTMLTableCellElementCellAbove.html */,
37DC678F140D7D3A00ABCCDB /* DOMRangeOfString.html */,
9B4F8FA6159D52CA002D9F94 /* HTMLCollectionNamedItem.html */,
9B26FCB4159D15E700CC3765 /* HTMLFormCollectionNamedItem.html */,
E1220DC9155B287D0013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.html */,
517E7E031511187500D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.html */,
- C07E6CB113FD738A0038B22B /* devicePixelRatio.html */,
+ 290A9BB81735F42300D71BBC /* OpenNewWindow.html */,
A57A34F116AF69E200C2501F /* PageVisibilityStateWithWindowChanges.html */,
+ 52B8CF9415868CF000281053 /* SetDocumentURI.html */,
+ E194E1BC177E534A009C4D4E /* StopLoadingFromDidReceiveResponse.html */,
C540F783152E5A7800A40C8C /* verboseMarkup.html */,
A5E2027015B2180600C13E14 /* WindowlessWebViewWithMedia.html */,
);
@@ -820,8 +968,8 @@
C0991C4F143C7D68007998F2 /* cf */ = {
isa = PBXGroup;
children = (
- C0991C50143C7D68007998F2 /* RetainPtrHashing.cpp */,
BC029B161486AD6400817DA9 /* RetainPtr.cpp */,
+ C0991C50143C7D68007998F2 /* RetainPtrHashing.cpp */,
);
name = cf;
path = WTF/cf;
@@ -830,9 +978,10 @@
C0C5D3BB14598B6F00A802A6 /* mac */ = {
isa = PBXGroup;
children = (
+ BCAA485714A044D40088FAC4 /* EditorCommands.mm */,
C0C5D3BC14598B6F00A802A6 /* GetBackingScaleFactor.mm */,
C0C5D3BD14598B6F00A802A6 /* GetBackingScaleFactor_Bundle.mm */,
- BCAA485714A044D40088FAC4 /* EditorCommands.mm */,
+ 1AEF994817A09F5300998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp */,
);
path = mac;
sourceTree = "<group>";
@@ -890,6 +1039,8 @@
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ };
buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "TestWebKitAPI" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
@@ -927,40 +1078,51 @@
buildActionMask = 2147483647;
files = (
BC246D8E132F115A00B56D7C /* AboutBlankLoad.cpp in Sources */,
+ 297234B4173AD04800983601 /* CustomProtocolsInvalidScheme.mm in Sources */,
379028B614FABD92007E6B43 /* AcceptsFirstMouse.mm in Sources */,
26F1B44415CA434F00D1E4BF /* AtomicString.cpp in Sources */,
B55F11A01516834F00915916 /* AttributedString.mm in Sources */,
00CD9F6315BE312C002DA2CE /* BackForwardList.mm in Sources */,
+ 1AE72F48173EB214006362F0 /* TerminateTwice.cpp in Sources */,
26DF5A5E15A29BAA003689C2 /* CancelLoadFromResourceLoadDelegate.mm in Sources */,
BC246D9A132F1FE100B56D7C /* CanHandleRequest.cpp in Sources */,
A7A966DB140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp in Sources */,
5142B2711517C88B00C32B19 /* ContextMenuCanCopyURL.mm in Sources */,
F6F3F29113342FEB00A6BF19 /* CookieManager.cpp in Sources */,
26A2C72F15E2E73C005B1A14 /* CString.cpp in Sources */,
+ 29AB8AA1164C735800D49BEC /* CustomProtocolsTest.mm in Sources */,
3776BC63150946BC0043A66D /* DeviceScaleFactorInDashboardRegions.mm in Sources */,
939BA91714103412001A01BD /* DeviceScaleFactorOnBack.mm in Sources */,
BCB68040126FBFE100642A61 /* DocumentStartUserScriptAlertCrash.cpp in Sources */,
+ 37E1064D16976C8500B78BD0 /* DOMHTMLTableCellCellAbove.mm in Sources */,
+ 3751AF7C169518F800764319 /* DOMNodeFromJSObject.mm in Sources */,
37DC678D140D7C5000ABCCDB /* DOMRangeOfString.mm in Sources */,
51393E201523944A005F39C5 /* DOMWindowExtensionBasic.cpp in Sources */,
F6F49C6915545C8E0007F39D /* DOMWindowExtensionNoCache.cpp in Sources */,
C045F9451385C2EA00C0F3CD /* DownloadDecideDestinationCrash.cpp in Sources */,
C07E6CAF13FD67650038B22B /* DynamicDeviceScaleFactor.mm in Sources */,
BCAA485814A044D40088FAC4 /* EditorCommands.mm in Sources */,
+ 4BB4160416815F9100824238 /* ElementAtPointInWebFrame.mm in Sources */,
1A5FEFDD1270E2A3000E2921 /* EvaluateJavaScript.cpp in Sources */,
BCC8B95B12611F4700DE46A4 /* FailedLoad.cpp in Sources */,
1A02C84F125D4A8400E3F4BD /* Find.cpp in Sources */,
+ C51AFB99169F49FF009CCF66 /* FindMatches.mm in Sources */,
1ADBEFAE130C689C00D61D19 /* ForceRepaint.cpp in Sources */,
BCBD3710125AA2EB00D2C29F /* FrameMIMETypeHTML.cpp in Sources */,
BCBD3761125ABCFE00D2C29F /* FrameMIMETypePNG.cpp in Sources */,
+ 290F427B172A23A500939FF0 /* TestProtocol.mm in Sources */,
1AA9E55914980A9900001A8A /* Functional.cpp in Sources */,
C0C5D3BE14598B6F00A802A6 /* GetBackingScaleFactor.mm in Sources */,
F660AA0D15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp in Sources */,
0BCD833514857CE400EA2003 /* HashMap.cpp in Sources */,
+ 2DD7D3AA178205D00026E1E3 /* ResizeReversePaginatedWebView.cpp in Sources */,
26B2DFF915BDE599004F691D /* HashSet.cpp in Sources */,
4BFDFFA9131477770061F24B /* HitTestResultNodeHandle.cpp in Sources */,
9B4F8FA4159D52B1002D9F94 /* HTMLCollectionNamedItem.mm in Sources */,
9B26FC6C159D061000CC3765 /* HTMLFormCollectionNamedItem.mm in Sources */,
+ C2EB2DD316CAC7AC009B52EE /* WebViewDidCreateJavaScriptContext.mm in Sources */,
BC575AAD126E83B9006F0F12 /* InjectedBundleBasic.cpp in Sources */,
+ 378E64731632646D00B6C676 /* InjectedBundleFrameHitTest.cpp in Sources */,
F660AA1315A619C9003A1243 /* InjectedBundleInitializationUserDataCallbackWins.cpp in Sources */,
C507E8A714C6545B005D6B3B /* InspectorBar.mm in Sources */,
C08587FC13FEC39B001EF4E5 /* InstanceMethodSwizzler.mm in Sources */,
@@ -968,10 +1130,15 @@
266FAFD315E5775200F61D5B /* IntegerToStringConversion.cpp in Sources */,
C0ADBE7C12FCA4D000D2C129 /* JavaScriptTest.cpp in Sources */,
C081224213FC172400DC39AE /* JavaScriptTestMac.mm in Sources */,
+ 4BB4160216815B2600824238 /* JSWrapperForNodeInWebFrame.mm in Sources */,
440A1D3914A0103A008A66F2 /* KURL.cpp in Sources */,
+ 14464013167A8305000BD218 /* LayoutUnit.cpp in Sources */,
+ 2D640B5517875DFF00BFAF99 /* ScrollPinningBehaviors.cpp in Sources */,
+ 26300B1816755CD90066886D /* ListHashSet.cpp in Sources */,
52CB47411448FB9300873995 /* LoadAlternateHTMLStringWithNonDirectoryURL.cpp in Sources */,
33DC8911141953A300747EF7 /* LoadCanceledNoServerRedirectCallback.cpp in Sources */,
- BC131A9B1171316900B69727 /* main.mm in Sources */,
+ 8AA28C1A16D2FA7B002FF4DB /* LoadPageOnCrash.cpp in Sources */,
+ CD5393C81757BA9700C07123 /* MD5.cpp in Sources */,
B4039F9D15E6D8B3007255D6 /* MathExtras.cpp in Sources */,
CD5497B415857F0C00B5BC30 /* MediaTime.cpp in Sources */,
E1220DA0155B25480013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.mm in Sources */,
@@ -980,49 +1147,70 @@
33BE5AF5137B5A6C00705813 /* MouseMoveAfterCrash.cpp in Sources */,
93F1DB3114DA20760024C362 /* NewFirstVisuallyNonEmptyLayout.cpp in Sources */,
93F1DB5514DB1B730024C362 /* NewFirstVisuallyNonEmptyLayoutFails.cpp in Sources */,
+ 9318778915EEC57700A9CCE3 /* NewFirstVisuallyNonEmptyLayoutForImages.cpp in Sources */,
+ 7CFBCADF1743234F00B2BFCF /* WillLoad.cpp in Sources */,
93F7E86C14DC8E4D00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames.cpp in Sources */,
BC90977A125571AB00083756 /* PageLoadBasic.cpp in Sources */,
BC2D004912A9FDFA00E732A3 /* PageLoadDidChangeLocationWithinPageForFrame.cpp in Sources */,
A51B650916ADF9B1007AA5D9 /* PageVisibilityState.cpp in Sources */,
A57A34F016AF677200C2501F /* PageVisibilityStateWithWindowChanges.mm in Sources */,
52E5CE4614D21E9D003B2BD8 /* ParentFrame.cpp in Sources */,
+ C54237F016B8955800E638FC /* PasteboardNotifications.mm in Sources */,
BC575BC0126F5752006F0F12 /* PlatformUtilities.cpp in Sources */,
BC131885117114B600B69727 /* PlatformUtilitiesMac.mm in Sources */,
BC90955D125548AA00083756 /* PlatformWebViewMac.mm in Sources */,
333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */,
+ B55AD1D2179F336C00AC1494 /* PreventImageLoadWithAutoResizing.mm in Sources */,
F6FDDDD314241AD4004F1729 /* PrivateBrowsingPushStateNoHistoryCallback.cpp in Sources */,
+ 00BC16871680FE810065F1E5 /* PublicSuffix.mm in Sources */,
0FC6C4CC141027E0005B7F0C /* RedBlackTree.cpp in Sources */,
+ 8A3AF93B16C9ED2700D248C1 /* ReloadPageAfterCrash.cpp in Sources */,
+ 8A2C750E16CED9550024F352 /* ResizeWindowAfterCrash.cpp in Sources */,
3722C8691461E03E00C45D00 /* RenderedImageFromDOMRange.mm in Sources */,
C0BD669D131D3CF700E18F2A /* ResponsivenessTimerDoesntFireEarly.cpp in Sources */,
C0ADBE8312FCA6AA00D2C129 /* RestoreSessionStateContainingFormData.cpp in Sources */,
+ 1AEF994917A09F5400998EF0 /* GetPIDAfterAbortedProcessLaunch.cpp in Sources */,
BC029B181486AD6400817DA9 /* RetainPtr.cpp in Sources */,
- C0991C51143C7D68007998F2 /* RetainPtrHashing.cpp in Sources */,
BC029B1C1486B25900817DA9 /* RetainPtr.mm in Sources */,
+ C0991C51143C7D68007998F2 /* RetainPtrHashing.cpp in Sources */,
+ CD5393CA1757BAC400C07123 /* SHA1.cpp in Sources */,
14F3B11315E45EAB00210069 /* SaturatedArithmeticOperations.cpp in Sources */,
261516D615B0E60500A2C201 /* SetAndUpdateCacheModel.mm in Sources */,
52B8CF9615868CF000281053 /* SetDocumentURI.mm in Sources */,
+ 7C8DDAAB1735DEEE00EA5AC0 /* CloseThenTerminate.cpp in Sources */,
51FCF79A1534AC6D00104491 /* ShouldGoToBackForwardListItem.cpp in Sources */,
C540F776152E4DA000A40C8C /* SimplifyMarkup.mm in Sources */,
C02B77F2126612140026BF0F /* SpacebarScrolling.cpp in Sources */,
+ E194E1BB177E5145009C4D4E /* StopLoadingFromDidReceiveResponse.mm in Sources */,
81B50193140F232300D9EB58 /* StringBuilder.cpp in Sources */,
3799AD3A14120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm in Sources */,
+ 93ABA80916DDAB91002DB2FA /* StringHasher.cpp in Sources */,
26F1B44515CA434F00D1E4BF /* StringImpl.cpp in Sources */,
C01363C813C3997300EF3964 /* StringOperators.cpp in Sources */,
37A6895F148A9B50005100FA /* SubresourceErrorCrash.mm in Sources */,
C081224513FC19EC00DC39AE /* SyntheticBackingScaleFactorWindow.m in Sources */,
0BCD856A1485C98B00EA2003 /* TemporaryChange.cpp in Sources */,
+ E4A757D4178AF1B100B5D7A4 /* Deque.cpp in Sources */,
+ 29AB8AA4164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm in Sources */,
BC131AA9117131FC00B69727 /* TestsController.cpp in Sources */,
E490296814E2E3A4002BEDD1 /* TypingStyleCrash.mm in Sources */,
+ 2943BE86161DFEB800999E3D /* UserContentTest.mm in Sources */,
+ 1A7BFC0C171A0BDB00BC5F64 /* WillSendSubmitEvent.mm in Sources */,
BC22D31514DC689800FFB1DD /* UserMessage.cpp in Sources */,
- BC90964C125561BF00083756 /* VectorBasic.cpp in Sources */,
BC55F5F914AD78EE00484BE1 /* Vector.cpp in Sources */,
+ BC90964C125561BF00083756 /* VectorBasic.cpp in Sources */,
37200B9213A16230007A4FAD /* VectorReverse.cpp in Sources */,
+ 290A9BB71735DE8A00D71BBC /* CloseNewWindowInNavigationPolicyDelegate.mm in Sources */,
+ FE217ECD1640A54A0052988B /* VMInspector.cpp in Sources */,
520BCF4D141EB09E00937EA8 /* WebArchive.cpp in Sources */,
0F17BBD615AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp in Sources */,
+ 290F4278172A232C00939FF0 /* CustomProtocolsSyncXHRTest.mm in Sources */,
C08587BF13FE956C001EF4E5 /* WebKitAgnosticTest.mm in Sources */,
51FBBB4D1513D4E900822738 /* WebViewCanPasteURL.mm in Sources */,
+ 37E38C34169B7D010084C28C /* WebViewDidRemoveFrameFromHierarchy.mm in Sources */,
76E182DA1547550100F1FADD /* WillSendSubmitEvent.cpp in Sources */,
A5E2027315B2181900C13E14 /* WindowlessWebViewWithMedia.mm in Sources */,
+ F6B7BE9417469209008A3445 /* DidAssociateFormControls.cpp in Sources */,
BC3C4C7F14587AA60025FB62 /* WKBrowsingContextGroupTest.mm in Sources */,
BC3C4C7214575B6A0025FB62 /* WKBrowsingContextLoadDelegateTest.mm in Sources */,
BC901E241492ADCE0074A667 /* WKConnection.cpp in Sources */,
@@ -1031,13 +1219,8 @@
BC90995E12567BC100083756 /* WKString.cpp in Sources */,
BC9099941256ACF100083756 /* WKStringJSString.cpp in Sources */,
265AF55015D1E48A00B0CB4A /* WTFString.cpp in Sources */,
- 9318778915EEC57700A9CCE3 /* NewFirstVisuallyNonEmptyLayoutForImages.cpp in Sources */,
- 2943BE86161DFEB800999E3D /* UserContentTest.mm in Sources */,
- 4F4D2C0E1626FE2700320FE1 /* MemoryInstrumentationTest.cpp in Sources */,
- 378E64731632646D00B6C676 /* InjectedBundleFrameHitTest.cpp in Sources */,
- FE217ECD1640A54A0052988B /* VMInspector.cpp in Sources */,
- 29AB8AA1164C735800D49BEC /* CustomProtocolsTest.mm in Sources */,
- 29AB8AA4164C7A9300D49BEC /* TestBrowsingContextLoadDelegate.mm in Sources */,
+ 2E7765CD16C4D80A00BA2BB1 /* mainIOS.mm in Sources */,
+ 2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -1045,34 +1228,39 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- BC575A97126E74F1006F0F12 /* InjectedBundleMain.cpp in Sources */,
- BC575AA2126E7660006F0F12 /* InjectedBundleController.cpp in Sources */,
- BC575AB0126E83C8006F0F12 /* InjectedBundleBasic_Bundle.cpp in Sources */,
- BC575BD9126F58E2006F0F12 /* PlatformUtilities.cpp in Sources */,
- BC575BE0126F590D006F0F12 /* PlatformUtilitiesMac.mm in Sources */,
+ BC246D9C132F1FF000B56D7C /* CanHandleRequest_Bundle.cpp in Sources */,
BCB68042126FBFF100642A61 /* DocumentStartUserScriptAlertCrash_Bundle.cpp in Sources */,
+ 51393E221523952D005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp in Sources */,
+ F6F49C6B15545CA70007F39D /* DOMWindowExtensionNoCache_Bundle.cpp in Sources */,
+ C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */,
+ B55AD1D5179F3B3000AC1494 /* PreventImageLoadWithAutoResizing_Bundle.cpp in Sources */,
+ F660AA1115A5F631003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp in Sources */,
4BFDFFA71314776C0061F24B /* HitTestResultNodeHandle_Bundle.cpp in Sources */,
- C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */,
- BC246D9C132F1FF000B56D7C /* CanHandleRequest_Bundle.cpp in Sources */,
- 33BE5AF9137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp in Sources */,
+ BC575AB0126E83C8006F0F12 /* InjectedBundleBasic_Bundle.cpp in Sources */,
+ BC575AA2126E7660006F0F12 /* InjectedBundleController.cpp in Sources */,
1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */,
+ 378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */,
+ 297234B7173AFAC700983601 /* CustomProtocolsInvalidScheme_Bundle.cpp in Sources */,
+ F660AA1515A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp in Sources */,
+ BC575A97126E74F1006F0F12 /* InjectedBundleMain.cpp in Sources */,
33DC89141419579F00747EF7 /* LoadCanceledNoServerRedirectCallback_Bundle.cpp in Sources */,
- 520BCF4C141EB09E00937EA8 /* WebArchive_Bundle.cpp in Sources */,
- C0C5D3C61459912900A802A6 /* GetBackingScaleFactor_Bundle.mm in Sources */,
- BC901E331492AF390074A667 /* WKConnection_Bundle.cpp in Sources */,
- 52E5CE4914D21EAB003B2BD8 /* ParentFrame_Bundle.cpp in Sources */,
+ 33BE5AF9137B5AAE00705813 /* MouseMoveAfterCrash_Bundle.cpp in Sources */,
93F1DB3414DA20870024C362 /* NewFirstVisuallyNonEmptyLayout_Bundle.cpp in Sources */,
93F1DB5714DB1B840024C362 /* NewFirstVisuallyNonEmptyLayoutFails_Bundle.cpp in Sources */,
- 93F7E86F14DC8E5C00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp in Sources */,
- BC22D31914DC68B900FFB1DD /* UserMessage_Bundle.cpp in Sources */,
93AF4ECE1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp in Sources */,
+ 93F7E86F14DC8E5C00C84A99 /* NewFirstVisuallyNonEmptyLayoutFrames_Bundle.cpp in Sources */,
+ 52E5CE4914D21EAB003B2BD8 /* ParentFrame_Bundle.cpp in Sources */,
+ C54237F116B8957D00E638FC /* PasteboardNotifications_Bundle.cpp in Sources */,
+ 7CFBCAE51743238F00B2BFCF /* WillLoad_Bundle.cpp in Sources */,
+ BC575BD9126F58E2006F0F12 /* PlatformUtilities.cpp in Sources */,
+ BC575BE0126F590D006F0F12 /* PlatformUtilitiesMac.mm in Sources */,
+ F6B7BE9517469212008A3445 /* DidAssociateFormControls_Bundle.cpp in Sources */,
+ C0BD669F131D3CFF00E18F2A /* ResponsivenessTimerDoesntFireEarly_Bundle.cpp in Sources */,
51FCF7A11534B2A000104491 /* ShouldGoToBackForwardListItem_Bundle.cpp in Sources */,
- 51393E221523952D005F39C5 /* DOMWindowExtensionBasic_Bundle.cpp in Sources */,
+ BC22D31914DC68B900FFB1DD /* UserMessage_Bundle.cpp in Sources */,
+ 520BCF4C141EB09E00937EA8 /* WebArchive_Bundle.cpp in Sources */,
76E182DD1547569100F1FADD /* WillSendSubmitEvent_Bundle.cpp in Sources */,
- F6F49C6B15545CA70007F39D /* DOMWindowExtensionNoCache_Bundle.cpp in Sources */,
- F660AA1115A5F631003A1243 /* GetInjectedBundleInitializationUserDataCallback_Bundle.cpp in Sources */,
- F660AA1515A61ABF003A1243 /* InjectedBundleInitializationUserDataCallbackWins_Bundle.cpp in Sources */,
- 378E64771632655E00B6C676 /* InjectedBundleFrameHitTest_Bundle.cpp in Sources */,
+ BC901E331492AF390074A667 /* WKConnection_Bundle.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/TestWebKitAPI/Tests.pri b/Tools/TestWebKitAPI/Tests.pri
new file mode 100644
index 000000000..15e81c094
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests.pri
@@ -0,0 +1,3 @@
+TEMPLATE = subdirs
+
+SUBDIRS += Tests/WTF Tests/JavaScriptCore Tests/WebKit2
diff --git a/Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm b/Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm
new file mode 100644
index 000000000..461cd75bd
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/CustomProtocolsSyncXHRTest.mm
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "JavaScriptTest.h"
+#import "Test.h"
+
+#import "PlatformUtilities.h"
+#import "TestBrowsingContextLoadDelegate.h"
+#import "TestProtocol.h"
+#import <WebKit2/WKBrowsingContextGroupPrivate.h>
+#import <WebKit2/WKPreferencesPrivate.h>
+#import <WebKit2/WKRetainPtr.h>
+#import <WebKit2/WKString.h>
+#import <WebKit2/WKViewPrivate.h>
+#import <wtf/RetainPtr.h>
+
+static bool testFinished = false;
+
+namespace TestWebKitAPI {
+
+TEST(WebKit2CustomProtocolsTest, SyncXHR)
+{
+ [NSURLProtocol registerClass:[TestProtocol class]];
+ [WKBrowsingContextController registerSchemeForCustomProtocol:[TestProtocol scheme]];
+
+ RetainPtr<WKProcessGroup> processGroup = adoptNS([[WKProcessGroup alloc] init]);
+ RetainPtr<WKBrowsingContextGroup> browsingContextGroup = adoptNS([[WKBrowsingContextGroup alloc] initWithIdentifier:@"TestIdentifier"]);
+
+ // Allow file URLs to load non-file resources
+ WKRetainPtr<WKPreferencesRef> preferences(AdoptWK, WKPreferencesCreate());
+ WKPreferencesSetUniversalAccessFromFileURLsAllowed(preferences.get(), true);
+ WKPageGroupSetPreferences(browsingContextGroup.get()._pageGroupRef, preferences.get());
+
+ RetainPtr<WKView> wkView = adoptNS([[WKView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) processGroup:processGroup.get() browsingContextGroup:browsingContextGroup.get()]);
+ RetainPtr<TestBrowsingContextLoadDelegate> delegate = adoptNS([[TestBrowsingContextLoadDelegate alloc] initWithBlockToRunOnLoad:^(WKBrowsingContextController *sender) {
+ EXPECT_JS_EQ(wkView.get().pageRef, "window._testResult", "PASS");
+ testFinished = true;
+ }]);
+ wkView.get().browsingContextController.loadDelegate = delegate.get();
+
+ WKPageLoadURL(wkView.get().pageRef, Util::createURLForResource("custom-protocol-sync-xhr", "html"));
+
+ TestWebKitAPI::Util::run(&testFinished);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/JavaScriptCore/JavaScriptCore.pro b/Tools/TestWebKitAPI/Tests/JavaScriptCore/JavaScriptCore.pro
new file mode 100644
index 000000000..9d44fad0e
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/JavaScriptCore/JavaScriptCore.pro
@@ -0,0 +1,8 @@
+TEMPLATE = app
+TARGET = tst_jsc
+
+SOURCES += *.cpp
+
+include(../../TestWebKitAPI.pri)
+
+DEFINES += APITEST_SOURCE_DIR=\\\"$$PWD\\\"
diff --git a/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/InstanceMethodSwizzler.mm b/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/InstanceMethodSwizzler.mm
index f869272ea..94bb7ef97 100644
--- a/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/InstanceMethodSwizzler.mm
+++ b/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac/InstanceMethodSwizzler.mm
@@ -53,7 +53,7 @@ static void setValue3(id self, SEL _cmd, int* value)
TEST(TestWebKitAPI, InstanceMethodSwizzler)
{
- RetainPtr<SimpleObject> object(AdoptNS, [[SimpleObject alloc] init]);
+ RetainPtr<SimpleObject> object = adoptNS([[SimpleObject alloc] init]);
int value = 0;
diff --git a/Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp b/Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp
index bddf22c23..9df71ce44 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/AtomicString.cpp
@@ -35,14 +35,12 @@ TEST(WTF, AtomicStringCreationFromLiteral)
ASSERT_EQ(strlen("Template Literal"), stringWithTemplate.length());
ASSERT_TRUE(stringWithTemplate == "Template Literal");
ASSERT_TRUE(stringWithTemplate.string().is8Bit());
- ASSERT_TRUE(stringWithTemplate.impl()->hasTerminatingNullCharacter());
const char* programmaticStringData = "Explicit Size Literal";
AtomicString programmaticString(programmaticStringData, strlen(programmaticStringData), AtomicString::ConstructFromLiteral);
ASSERT_EQ(strlen(programmaticStringData), programmaticString.length());
ASSERT_TRUE(programmaticStringData == programmaticStringData);
ASSERT_TRUE(programmaticString.string().is8Bit());
- ASSERT_TRUE(programmaticString.impl()->hasTerminatingNullCharacter());
ASSERT_EQ(programmaticStringData, reinterpret_cast<const char*>(programmaticString.string().characters8()));
}
diff --git a/Tools/TestWebKitAPI/Tests/WTF/CString.cpp b/Tools/TestWebKitAPI/Tests/WTF/CString.cpp
index 1f47cb292..735d7dd8b 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/CString.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/CString.cpp
@@ -107,3 +107,90 @@ TEST(WTF, CStringCopyOnWrite)
ASSERT_STREQ(string.data(), "WebKit");
ASSERT_STREQ(copy.data(), initialString);
}
+
+TEST(WTF, CStringComparison)
+{
+ // Comparison with another CString.
+ CString a;
+ CString b;
+ ASSERT_TRUE(a == b);
+ ASSERT_FALSE(a != b);
+ a = "a";
+ b = CString();
+ ASSERT_FALSE(a == b);
+ ASSERT_TRUE(a != b);
+ a = "a";
+ b = "b";
+ ASSERT_FALSE(a == b);
+ ASSERT_TRUE(a != b);
+ a = "a";
+ b = "a";
+ ASSERT_TRUE(a == b);
+ ASSERT_FALSE(a != b);
+ a = "a";
+ b = "aa";
+ ASSERT_FALSE(a == b);
+ ASSERT_TRUE(a != b);
+ a = "";
+ b = "";
+ ASSERT_TRUE(a == b);
+ ASSERT_FALSE(a != b);
+ a = "";
+ b = CString();
+ ASSERT_FALSE(a == b);
+ ASSERT_TRUE(a != b);
+ a = "a";
+ b = "";
+ ASSERT_FALSE(a == b);
+ ASSERT_TRUE(a != b);
+
+ // Comparison with a const char*.
+ CString c;
+ const char* d = 0;
+ ASSERT_TRUE(c == d);
+ ASSERT_FALSE(c != d);
+ c = "c";
+ d = 0;
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = CString();
+ d = "d";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = "c";
+ d = "d";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = "c";
+ d = "c";
+ ASSERT_TRUE(c == d);
+ ASSERT_FALSE(c != d);
+ c = "c";
+ d = "cc";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = "cc";
+ d = "c";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = "";
+ d = "";
+ ASSERT_TRUE(c == d);
+ ASSERT_FALSE(c != d);
+ c = "";
+ d = 0;
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = CString();
+ d = "";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = "a";
+ d = "";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+ c = "";
+ d = "b";
+ ASSERT_FALSE(c == d);
+ ASSERT_TRUE(c != d);
+}
diff --git a/Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp b/Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp
index 768c7d3af..77b8ff458 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/CheckedArithmeticOperations.cpp
@@ -70,6 +70,41 @@ namespace TestWebKitAPI {
EXPECT_EQ(true, (value += coerceLiteral(1)).hasOverflowed()); \
EXPECT_EQ(true, value.hasOverflowed()); \
value = 10; \
+ type _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (value * Checked<type, RecordOverflow>(0)).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (Checked<type, RecordOverflow>(0) * value).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidOverflow == (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidOverflow == (Checked<type, RecordOverflow>(std::numeric_limits<type>::max()) * value).safeGet(_value)); \
+ value = 0; \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (Checked<type, RecordOverflow>(std::numeric_limits<type>::max()) * value).safeGet(_value)); \
+ value = 1; \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (Checked<type, RecordOverflow>(std::numeric_limits<type>::max()) * value).safeGet(_value)); \
+ _value = 0; \
+ value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (Checked<type, RecordOverflow>(std::numeric_limits<type>::max()) * (type)0).safeGet(_value)); \
+ _value = 0; \
+ value = 1; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidNotOverflow == (Checked<type, RecordOverflow>(std::numeric_limits<type>::max()) * (type)1).safeGet(_value)); \
+ _value = 0; \
+ value = 2; \
+ EXPECT_EQ(true, CheckedState::DidOverflow == (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).safeGet(_value)); \
+ _value = 0; \
+ EXPECT_EQ(true, CheckedState::DidOverflow == (Checked<type, RecordOverflow>(std::numeric_limits<type>::max()) * (type)2).safeGet(_value)); \
+ value = 10; \
+ EXPECT_EQ(true, (value * Checked<type, RecordOverflow>(std::numeric_limits<type>::max())).hasOverflowed()); \
MixedSignednessTest(EXPECT_EQ(coerceLiteral(0), (value + -10).unsafeGet())); \
MixedSignednessTest(EXPECT_EQ(0U, (value - 10U).unsafeGet())); \
MixedSignednessTest(EXPECT_EQ(coerceLiteral(0), (-10 + value).unsafeGet())); \
diff --git a/Tools/TestWebKitAPI/Tests/WTF/Deque.cpp b/Tools/TestWebKitAPI/Tests/WTF/Deque.cpp
new file mode 100644
index 000000000..26a815aba
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WTF/Deque.cpp
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2011 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include <wtf/Deque.h>
+
+namespace TestWebKitAPI {
+
+TEST(WTF, DequeIterator)
+{
+ Deque<int> deque;
+ deque.append(11);
+ deque.prepend(10);
+ deque.append(12);
+ deque.append(13);
+
+ Deque<int>::iterator it = deque.begin();
+ Deque<int>::iterator end = deque.end();
+ EXPECT_TRUE(end != it);
+
+ EXPECT_EQ(10, *it);
+ ++it;
+ EXPECT_EQ(11, *it);
+ ++it;
+ EXPECT_EQ(12, *it);
+ ++it;
+ EXPECT_EQ(13, *it);
+ ++it;
+
+ EXPECT_TRUE(end == it);
+}
+
+TEST(WTF, DequeReverseIterator)
+{
+ Deque<int> deque;
+ deque.append(11);
+ deque.prepend(10);
+ deque.append(12);
+ deque.append(13);
+
+ Deque<int>::reverse_iterator it = deque.rbegin();
+ Deque<int>::reverse_iterator end = deque.rend();
+ EXPECT_TRUE(end != it);
+
+ EXPECT_EQ(13, *it);
+ ++it;
+ EXPECT_EQ(12, *it);
+ ++it;
+ EXPECT_EQ(11, *it);
+ ++it;
+ EXPECT_EQ(10, *it);
+ ++it;
+
+ EXPECT_TRUE(end == it);
+}
+
+TEST(WTF, DequeRemove)
+{
+ Deque<int> deque;
+ deque.append(11);
+ deque.prepend(10);
+ deque.append(12);
+ deque.append(13);
+
+ EXPECT_EQ(10, deque.first());
+ EXPECT_EQ(13, deque.last());
+
+ deque.removeLast();
+ EXPECT_EQ(10, deque.first());
+ EXPECT_EQ(12, deque.last());
+
+ deque.removeFirst();
+ EXPECT_EQ(11, deque.first());
+ EXPECT_EQ(12, deque.last());
+
+ deque.removeFirst();
+ EXPECT_EQ(12, deque.first());
+ EXPECT_EQ(12, deque.last());
+
+ deque.removeLast();
+ EXPECT_TRUE(deque.isEmpty());
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp b/Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp
new file mode 100644
index 000000000..7579c4299
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WTF/ListHashSet.cpp
@@ -0,0 +1,173 @@
+/*
+ * Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+
+#include <wtf/ListHashSet.h>
+
+namespace TestWebKitAPI {
+
+TEST(WTF, ListHashSetRemoveFirst)
+{
+ ListHashSet<int> list;
+ list.add(1);
+ list.add(2);
+ list.add(3);
+
+ ASSERT_EQ(1, list.first());
+
+ list.removeFirst();
+ ASSERT_EQ(2, list.first());
+
+ list.removeFirst();
+ ASSERT_EQ(3, list.first());
+
+ list.removeFirst();
+ ASSERT_TRUE(list.isEmpty());
+}
+
+TEST(WTF, ListHashSetAppendOrMoveToLastNewItems)
+{
+ ListHashSet<int> list;
+ ListHashSet<int>::AddResult result = list.appendOrMoveToLast(1);
+ ASSERT_TRUE(result.isNewEntry);
+ result = list.add(2);
+ ASSERT_TRUE(result.isNewEntry);
+ result = list.appendOrMoveToLast(3);
+ ASSERT_TRUE(result.isNewEntry);
+
+ ASSERT_EQ(list.size(), 3);
+
+ // The list should be in order 1, 2, 3.
+ ListHashSet<int>::iterator iterator = list.begin();
+ ASSERT_EQ(1, *iterator);
+ ++iterator;
+ ASSERT_EQ(2, *iterator);
+ ++iterator;
+ ASSERT_EQ(3, *iterator);
+ ++iterator;
+}
+
+TEST(WTF, ListHashSetAppendOrMoveToLastWithDuplicates)
+{
+ ListHashSet<int> list;
+
+ // Add a single element twice.
+ ListHashSet<int>::AddResult result = list.add(1);
+ ASSERT_TRUE(result.isNewEntry);
+ result = list.appendOrMoveToLast(1);
+ ASSERT_FALSE(result.isNewEntry);
+ ASSERT_EQ(1, list.size());
+
+ list.add(2);
+ list.add(3);
+ ASSERT_EQ(3, list.size());
+
+ // Appending 2 move it to the end.
+ ASSERT_EQ(3, list.last());
+ result = list.appendOrMoveToLast(2);
+ ASSERT_FALSE(result.isNewEntry);
+ ASSERT_EQ(2, list.last());
+
+ // Inverse the list by moving each element to end end.
+ result = list.appendOrMoveToLast(3);
+ ASSERT_FALSE(result.isNewEntry);
+ result = list.appendOrMoveToLast(2);
+ ASSERT_FALSE(result.isNewEntry);
+ result = list.appendOrMoveToLast(1);
+ ASSERT_FALSE(result.isNewEntry);
+ ASSERT_EQ(3, list.size());
+
+ ListHashSet<int>::iterator iterator = list.begin();
+ ASSERT_EQ(3, *iterator);
+ ++iterator;
+ ASSERT_EQ(2, *iterator);
+ ++iterator;
+ ASSERT_EQ(1, *iterator);
+ ++iterator;
+}
+
+TEST(WTF, ListHashSetPrependOrMoveToLastNewItems)
+{
+ ListHashSet<int> list;
+ ListHashSet<int>::AddResult result = list.prependOrMoveToFirst(1);
+ ASSERT_TRUE(result.isNewEntry);
+ result = list.add(2);
+ ASSERT_TRUE(result.isNewEntry);
+ result = list.prependOrMoveToFirst(3);
+ ASSERT_TRUE(result.isNewEntry);
+
+ ASSERT_EQ(list.size(), 3);
+
+ // The list should be in order 3, 1, 2.
+ ListHashSet<int>::iterator iterator = list.begin();
+ ASSERT_EQ(3, *iterator);
+ ++iterator;
+ ASSERT_EQ(1, *iterator);
+ ++iterator;
+ ASSERT_EQ(2, *iterator);
+ ++iterator;
+}
+
+TEST(WTF, ListHashSetPrependOrMoveToLastWithDuplicates)
+{
+ ListHashSet<int> list;
+
+ // Add a single element twice.
+ ListHashSet<int>::AddResult result = list.add(1);
+ ASSERT_TRUE(result.isNewEntry);
+ result = list.prependOrMoveToFirst(1);
+ ASSERT_FALSE(result.isNewEntry);
+ ASSERT_EQ(1, list.size());
+
+ list.add(2);
+ list.add(3);
+ ASSERT_EQ(3, list.size());
+
+ // Prepending 2 move it to the beginning.
+ ASSERT_EQ(1, list.first());
+ result = list.prependOrMoveToFirst(2);
+ ASSERT_FALSE(result.isNewEntry);
+ ASSERT_EQ(2, list.first());
+
+ // Inverse the list by moving each element to the first position.
+ result = list.prependOrMoveToFirst(1);
+ ASSERT_FALSE(result.isNewEntry);
+ result = list.prependOrMoveToFirst(2);
+ ASSERT_FALSE(result.isNewEntry);
+ result = list.prependOrMoveToFirst(3);
+ ASSERT_FALSE(result.isNewEntry);
+ ASSERT_EQ(3, list.size());
+
+ ListHashSet<int>::iterator iterator = list.begin();
+ ASSERT_EQ(3, *iterator);
+ ++iterator;
+ ASSERT_EQ(2, *iterator);
+ ++iterator;
+ ASSERT_EQ(1, *iterator);
+ ++iterator;
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WTF/MD5.cpp b/Tools/TestWebKitAPI/Tests/WTF/MD5.cpp
new file mode 100644
index 000000000..7f592aee4
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WTF/MD5.cpp
@@ -0,0 +1,47 @@
+/*
+ * This code implements the MD5 message-digest algorithm.
+ * The algorithm is due to Ron Rivest. This code was
+ * written by Colin Plumb in 1993, no copyright is claimed.
+ * This code is in the public domain; do with it what you wish.
+ *
+ * Equivalent code is available from RSA Data Security, Inc.
+ * This code has been tested against that, and is equivalent,
+ * except that you don't need to include two pages of legalese
+ * with every copy.
+ */
+
+#include "config.h"
+#include <wtf/MD5.h>
+#include <wtf/StringExtras.h>
+#include <wtf/text/CString.h>
+
+namespace TestWebKitAPI {
+
+static void expectMD5(CString input, CString expected)
+{
+ MD5 md5;
+ md5.addBytes(reinterpret_cast<const uint8_t*>(input.data()), input.length());
+ Vector<uint8_t, 16> digest;
+ md5.checksum(digest);
+ char* buf = 0;
+ CString actual = CString::newUninitialized(32, buf);
+ for (size_t i = 0; i < 16; i++, buf += 2)
+ snprintf(buf, 3, "%02x", digest.at(i));
+
+ ASSERT_EQ(expected.length(), actual.length());
+ ASSERT_STREQ(expected.data(), actual.data());
+}
+
+TEST(WTF_MD5, Computation)
+{
+ // MD5 Test suite from http://www.ietf.org/rfc/rfc1321.txt.
+ expectMD5("", "d41d8cd98f00b204e9800998ecf8427e");
+ expectMD5("a", "0cc175b9c0f1b6a831c399e269772661");
+ expectMD5("abc", "900150983cd24fb0d6963f7d28e17f72");
+ expectMD5("message digest", "f96b697d7cb7938d525a2f31aaf161d0");
+ expectMD5("abcdefghijklmnopqrstuvwxyz", "c3fcd3d76192e4007dfb496cca67e13b");
+ expectMD5("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "d174ab98d277d9f5a5611c2c9f419d9f");
+ expectMD5("12345678901234567890123456789012345678901234567890123456789012345678901234567890", "57edf4a22be3c955ac49da2e2107b67a");
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp b/Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp
index 06e442ce7..7cbb29766 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/MathExtras.cpp
@@ -50,4 +50,128 @@ TEST(WTF, Lrint)
}
}
+TEST(WTF, clampToIntLong)
+{
+ if (sizeof(long) == sizeof(int))
+ return;
+
+ long maxInt = std::numeric_limits<int>::max();
+ long minInt = std::numeric_limits<int>::min();
+ long overflowInt = maxInt + 1;
+ long underflowInt = minInt - 1;
+
+ EXPECT_GT(overflowInt, maxInt);
+ EXPECT_LT(underflowInt, minInt);
+
+ EXPECT_EQ(clampTo<int>(maxInt), maxInt);
+ EXPECT_EQ(clampTo<int>(minInt), minInt);
+
+ EXPECT_EQ(clampTo<int>(overflowInt), maxInt);
+ EXPECT_EQ(clampTo<int>(underflowInt), minInt);
+}
+
+TEST(WTF, clampToIntLongLong)
+{
+ long long maxInt = std::numeric_limits<int>::max();
+ long long minInt = std::numeric_limits<int>::min();
+ long long overflowInt = maxInt + 1;
+ long long underflowInt = minInt - 1;
+
+ EXPECT_GT(overflowInt, maxInt);
+ EXPECT_LT(underflowInt, minInt);
+
+ EXPECT_EQ(clampTo<int>(maxInt), maxInt);
+ EXPECT_EQ(clampTo<int>(minInt), minInt);
+
+ EXPECT_EQ(clampTo<int>(overflowInt), maxInt);
+ EXPECT_EQ(clampTo<int>(underflowInt), minInt);
+}
+
+TEST(WTF, clampToIntegerFloat)
+{
+ // This test is inaccurate as floats will round the min / max integer
+ // due to the narrow mantissa. However it will properly checks within
+ // (close to the extreme) and outside the integer range.
+ float maxInt = std::numeric_limits<int>::max();
+ float minInt = std::numeric_limits<int>::min();
+ float overflowInt = maxInt * 1.1;
+ float underflowInt = minInt * 1.1;
+
+ EXPECT_GT(overflowInt, maxInt);
+ EXPECT_LT(underflowInt, minInt);
+
+ // If maxInt == 2^31 - 1 (ie on I32 architecture), the closest float used to represent it is 2^31.
+ EXPECT_NEAR(clampToInteger(maxInt), maxInt, 1);
+ EXPECT_EQ(clampToInteger(minInt), minInt);
+
+ EXPECT_NEAR(clampToInteger(overflowInt), maxInt, 1);
+ EXPECT_EQ(clampToInteger(underflowInt), minInt);
+}
+
+TEST(WTF, clampToIntegerDouble)
+{
+ double maxInt = std::numeric_limits<int>::max();
+ double minInt = std::numeric_limits<int>::min();
+ double overflowInt = maxInt + 1;
+ double underflowInt = minInt - 1;
+
+ EXPECT_GT(overflowInt, maxInt);
+ EXPECT_LT(underflowInt, minInt);
+
+ EXPECT_EQ(clampToInteger(maxInt), maxInt);
+ EXPECT_EQ(clampToInteger(minInt), minInt);
+
+ EXPECT_EQ(clampToInteger(overflowInt), maxInt);
+ EXPECT_EQ(clampToInteger(underflowInt), minInt);
+}
+
+TEST(WTF, clampToFloat)
+{
+ double maxFloat = std::numeric_limits<float>::max();
+ double minFloat = -maxFloat;
+ double overflowFloat = maxFloat * 1.1;
+ double underflowFloat = minFloat * 1.1;
+
+ EXPECT_GT(overflowFloat, maxFloat);
+ EXPECT_LT(underflowFloat, minFloat);
+
+ EXPECT_EQ(clampToFloat(maxFloat), maxFloat);
+ EXPECT_EQ(clampToFloat(minFloat), minFloat);
+
+ EXPECT_EQ(clampToFloat(overflowFloat), maxFloat);
+ EXPECT_EQ(clampToFloat(underflowFloat), minFloat);
+
+ EXPECT_EQ(clampToFloat(std::numeric_limits<float>::infinity()), maxFloat);
+ EXPECT_EQ(clampToFloat(-std::numeric_limits<float>::infinity()), minFloat);
+}
+
+TEST(WTF, clampToUnsignedLong)
+{
+ if (sizeof(unsigned long) == sizeof(unsigned))
+ return;
+
+ unsigned long maxUnsigned = std::numeric_limits<unsigned>::max();
+ unsigned long overflowUnsigned = maxUnsigned + 1;
+
+ EXPECT_GT(overflowUnsigned, maxUnsigned);
+
+ EXPECT_EQ(clampTo<unsigned>(maxUnsigned), maxUnsigned);
+
+ EXPECT_EQ(clampTo<unsigned>(overflowUnsigned), maxUnsigned);
+ EXPECT_EQ(clampTo<unsigned>(-1), 0u);
+}
+
+TEST(WTF, clampToUnsignedLongLong)
+{
+ unsigned long long maxUnsigned = std::numeric_limits<unsigned>::max();
+ unsigned long long overflowUnsigned = maxUnsigned + 1;
+
+ EXPECT_GT(overflowUnsigned, maxUnsigned);
+
+ EXPECT_EQ(clampTo<unsigned>(maxUnsigned), maxUnsigned);
+
+ EXPECT_EQ(clampTo<unsigned>(overflowUnsigned), maxUnsigned);
+ EXPECT_EQ(clampTo<unsigned>(-1), 0u);
+}
+
} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp b/Tools/TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp
deleted file mode 100644
index dad08dda4..000000000
--- a/Tools/TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp
+++ /dev/null
@@ -1,850 +0,0 @@
-/*
- * Copyright (C) 2012 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.
- */
-
-#include "config.h"
-
-#include <gtest/gtest.h>
-
-#include <wtf/ArrayBuffer.h>
-#include <wtf/HashCountedSet.h>
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
-#include <wtf/ListHashSet.h>
-#include <wtf/MemoryInstrumentation.h>
-#include <wtf/MemoryInstrumentationArrayBufferView.h>
-#include <wtf/MemoryInstrumentationHashCountedSet.h>
-#include <wtf/MemoryInstrumentationHashMap.h>
-#include <wtf/MemoryInstrumentationHashSet.h>
-#include <wtf/MemoryInstrumentationListHashSet.h>
-#include <wtf/MemoryInstrumentationString.h>
-#include <wtf/MemoryInstrumentationVector.h>
-#include <wtf/MemoryObjectInfo.h>
-#include <wtf/RefCounted.h>
-#include <wtf/Vector.h>
-#include <wtf/text/AtomicString.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/StringBuffer.h>
-#include <wtf/text/StringHash.h>
-#include <wtf/text/StringImpl.h>
-#include <wtf/text/WTFString.h>
-
-namespace {
-enum TestEnum { ONE = 1, TWO, THREE, MY_ENUM_MAX };
-}
-
-namespace WTF {
-
-template<> struct DefaultHash<TestEnum> {
- typedef IntHash<unsigned> Hash;
-};
-
-template<> struct HashTraits<TestEnum> : GenericHashTraits<TestEnum> {
- static const bool emptyValueIsZero = true;
- static const bool needsDestruction = false;
- static void constructDeletedValue(TestEnum& slot) { slot = static_cast<TestEnum>(MY_ENUM_MAX + 1); }
- static bool isDeletedValue(TestEnum value) { return value == (MY_ENUM_MAX + 1); }
-};
-
-}
-
-namespace {
-
-using WTF::MemoryObjectInfo;
-using WTF::MemoryClassInfo;
-using WTF::MemoryObjectType;
-
-MemoryObjectType TestType = "TestType";
-
-class MemoryInstrumentationTestClient : public WTF::MemoryInstrumentationClient {
-public:
- virtual void countObjectSize(const void*, MemoryObjectType objectType, size_t size)
- {
- TypeToSizeMap::AddResult result = m_totalSizes.add(objectType, size);
- if (!result.isNewEntry)
- result.iterator->value += size;
- }
- virtual bool visited(const void* object) { return !m_visitedObjects.add(object).isNewEntry; }
- virtual bool checkCountedObject(const void*) { return true; }
-
- size_t visitedObjects() const { return m_visitedObjects.size(); }
- size_t totalSize(const MemoryObjectType objectType) const
- {
- TypeToSizeMap::const_iterator i = m_totalSizes.find(objectType);
- return i == m_totalSizes.end() ? 0 : i->value;
- }
-
- size_t reportedSizeForAllTypes() const
- {
- size_t size = 0;
- for (TypeToSizeMap::const_iterator i = m_totalSizes.begin(); i != m_totalSizes.end(); ++i)
- size += i->value;
- return size;
- }
-
-private:
- typedef HashMap<MemoryObjectType, size_t> TypeToSizeMap;
- TypeToSizeMap m_totalSizes;
- WTF::HashSet<const void*> m_visitedObjects;
-};
-
-class InstrumentationTestImpl : public WTF::MemoryInstrumentation {
-public:
- explicit InstrumentationTestImpl(MemoryInstrumentationTestClient* client)
- : MemoryInstrumentation(client)
- , m_client(client) { }
-
- virtual void processDeferredInstrumentedPointers();
- virtual void deferInstrumentedPointer(PassOwnPtr<InstrumentedPointerBase>);
-
- size_t visitedObjects() const { return m_client->visitedObjects(); }
- size_t reportedSizeForAllTypes() const { return m_client->reportedSizeForAllTypes(); }
- size_t totalSize(const MemoryObjectType objectType) const { return m_client->totalSize(objectType); }
-
-private:
- MemoryInstrumentationTestClient* m_client;
- Vector<OwnPtr<InstrumentedPointerBase> > m_deferredInstrumentedPointers;
-};
-
-class InstrumentationTestHelper : public InstrumentationTestImpl {
-public:
- InstrumentationTestHelper() : InstrumentationTestImpl(&m_client) { }
-
-private:
- MemoryInstrumentationTestClient m_client;
-};
-
-void InstrumentationTestImpl::processDeferredInstrumentedPointers()
-{
- while (!m_deferredInstrumentedPointers.isEmpty()) {
- OwnPtr<InstrumentedPointerBase> pointer = m_deferredInstrumentedPointers.last().release();
- m_deferredInstrumentedPointers.removeLast();
- pointer->process(this);
- }
-}
-
-void InstrumentationTestImpl::deferInstrumentedPointer(PassOwnPtr<InstrumentedPointerBase> pointer)
-{
- m_deferredInstrumentedPointers.append(pointer);
-}
-
-class NotInstrumented {
-public:
- NotInstrumented(const char* = 0) { }
- char m_data[42];
-};
-
-class Instrumented {
-public:
- Instrumented() : m_notInstrumented(new NotInstrumented) { }
- virtual ~Instrumented() { delete m_notInstrumented; }
-
- virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_notInstrumented);
- }
- NotInstrumented* m_notInstrumented;
-};
-
-TEST(MemoryInstrumentationTest, sizeOf)
-{
- InstrumentationTestHelper helper;
- Instrumented instrumented;
- helper.addRootObject(instrumented);
- EXPECT_EQ(sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, nullCheck)
-{
- InstrumentationTestHelper helper;
- Instrumented* instrumented = 0;
- helper.addRootObject(instrumented);
- EXPECT_EQ(0u, helper.reportedSizeForAllTypes());
- EXPECT_EQ(0u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, ptrVsRef)
-{
- {
- InstrumentationTestHelper helper;
- Instrumented instrumented;
- helper.addRootObject(&instrumented);
- EXPECT_EQ(sizeof(Instrumented) + sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
- }
- {
- InstrumentationTestHelper helper;
- Instrumented instrumented;
- helper.addRootObject(instrumented);
- EXPECT_EQ(sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
- }
-}
-
-TEST(MemoryInstrumentationTest, ownPtr)
-{
- InstrumentationTestHelper helper;
- OwnPtr<Instrumented> instrumented(adoptPtr(new Instrumented));
- helper.addRootObject(instrumented);
- EXPECT_EQ(sizeof(Instrumented) + sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-class InstrumentedRefPtr : public RefCounted<InstrumentedRefPtr> {
-public:
- InstrumentedRefPtr() : m_notInstrumented(new NotInstrumented) { }
- virtual ~InstrumentedRefPtr() { delete m_notInstrumented; }
- static PassRefPtr<InstrumentedRefPtr> create() { return adoptRef(new InstrumentedRefPtr()); }
-
- virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_notInstrumented);
- }
- NotInstrumented* m_notInstrumented;
-};
-
-TEST(MemoryInstrumentationTest, refPtr)
-{
- InstrumentationTestHelper helper;
- RefPtr<InstrumentedRefPtr> instrumentedRefPtr(adoptRef(new InstrumentedRefPtr));
- helper.addRootObject(instrumentedRefPtr);
- EXPECT_EQ(sizeof(InstrumentedRefPtr) + sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-class InstrumentedWithOwnPtr : public Instrumented {
-public:
- InstrumentedWithOwnPtr() : m_notInstrumentedOwnPtr(adoptPtr(new NotInstrumented)) { }
-
- virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- Instrumented::reportMemoryUsage(memoryObjectInfo);
- info.addMember(m_notInstrumentedOwnPtr);
- }
- OwnPtr<NotInstrumented> m_notInstrumentedOwnPtr;
-};
-
-TEST(MemoryInstrumentationTest, ownPtrNotInstrumented)
-{
- InstrumentationTestHelper helper;
- InstrumentedWithOwnPtr instrumentedWithOwnPtr;
- helper.addRootObject(instrumentedWithOwnPtr);
- EXPECT_EQ(2u * sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-class InstrumentedUndefined {
-public:
- InstrumentedUndefined() : m_data(0) { }
-
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this);
- }
- int m_data;
-};
-
-class InstrumentedDOM {
-public:
- InstrumentedDOM() : m_instrumentedUndefined(adoptPtr(new InstrumentedUndefined)) { }
-
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_instrumentedUndefined);
- }
- OwnPtr<InstrumentedUndefined> m_instrumentedUndefined;
-};
-
-TEST(MemoryInstrumentationTest, ownerTypePropagation)
-{
- InstrumentationTestHelper helper;
- OwnPtr<InstrumentedDOM> instrumentedDOM(adoptPtr(new InstrumentedDOM));
- helper.addRootObject(instrumentedDOM);
- EXPECT_EQ(sizeof(InstrumentedDOM) + sizeof(InstrumentedUndefined), helper.reportedSizeForAllTypes());
- EXPECT_EQ(sizeof(InstrumentedDOM) + sizeof(InstrumentedUndefined), helper.totalSize(TestType));
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-class NonVirtualInstrumented {
-public:
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_instrumented);
- }
-
- Instrumented m_instrumented;
-};
-
-TEST(MemoryInstrumentationTest, visitFirstMemberInNonVirtualClass)
-{
- InstrumentationTestHelper helper;
- NonVirtualInstrumented nonVirtualInstrumented;
- helper.addRootObject(&nonVirtualInstrumented);
- EXPECT_EQ(sizeof(NonVirtualInstrumented) + sizeof(NotInstrumented), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-template<typename T>
-class InstrumentedOwner {
-public:
- template<typename V>
- InstrumentedOwner(const V& value) : m_value(value) { }
- InstrumentedOwner() { }
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_value);
- }
-
- T m_value;
-};
-
-TEST(MemoryInstrumentationTest, visitStrings)
-{
- { // 8-bit string.
- InstrumentationTestHelper helper;
- InstrumentedOwner<String> stringInstrumentedOwner("String");
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) + stringInstrumentedOwner.m_value.length(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
- }
-
- { // 8-bit string with 16bit shadow.
- InstrumentationTestHelper helper;
- InstrumentedOwner<String> stringInstrumentedOwner("String");
- stringInstrumentedOwner.m_value.characters();
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) + stringInstrumentedOwner.m_value.length() * (sizeof(LChar) + sizeof(UChar)), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
- }
-
- { // 16 bit string.
- InstrumentationTestHelper helper;
- String string("String");
- InstrumentedOwner<String> stringInstrumentedOwner(String(string.characters(), string.length()));
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) + stringInstrumentedOwner.m_value.length() * sizeof(UChar), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
- }
-
- { // ASCIILiteral
- InstrumentationTestHelper helper;
- ASCIILiteral literal("String");
- InstrumentedOwner<String> stringInstrumentedOwner(literal);
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
- }
-
- { // Zero terminated internal buffer.
- InstrumentationTestHelper helper;
- InstrumentedOwner<String> stringInstrumentedOwner("string");
- stringInstrumentedOwner.m_value.charactersWithNullTermination();
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) + (stringInstrumentedOwner.m_value.length() + 1) * (sizeof(LChar) + sizeof(UChar)), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
- }
-
- { // Substring
- InstrumentationTestHelper helper;
- String baseString("String");
- baseString.characters(); // Force 16 shadow creation.
- InstrumentedOwner<String> stringInstrumentedOwner(baseString.substringSharingImpl(1, 4));
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) * 2 + baseString.length() * (sizeof(LChar) + sizeof(UChar)), helper.reportedSizeForAllTypes());
- EXPECT_EQ(3u, helper.visitedObjects());
- }
-
- { // Owned buffer.
- InstrumentationTestHelper helper;
- StringBuffer<LChar> buffer(6);
- InstrumentedOwner<String> stringInstrumentedOwner(String::adopt(buffer));
- helper.addRootObject(stringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) + stringInstrumentedOwner.m_value.length(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
- }
-
- {
- InstrumentationTestHelper helper;
- InstrumentedOwner<AtomicString> atomicStringInstrumentedOwner("AtomicString");
- atomicStringInstrumentedOwner.m_value.string().characters(); // Force 16bit shadow creation.
- helper.addRootObject(atomicStringInstrumentedOwner);
- EXPECT_EQ(sizeof(StringImpl) + atomicStringInstrumentedOwner.m_value.length() * (sizeof(LChar) + sizeof(UChar)), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
- }
-
- {
- InstrumentationTestHelper helper;
- InstrumentedOwner<CString> cStringInstrumentedOwner("CString");
- helper.addRootObject(cStringInstrumentedOwner);
- EXPECT_EQ(sizeof(WTF::CStringBuffer) + cStringInstrumentedOwner.m_value.length(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
- }
-}
-
-class TwoPointersToRefPtr {
-public:
- TwoPointersToRefPtr(const RefPtr<StringImpl>& value) : m_ptr1(&value), m_ptr2(&value) { }
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_ptr1);
- info.addMember(m_ptr2);
- }
-
- const RefPtr<StringImpl>* m_ptr1;
- const RefPtr<StringImpl>* m_ptr2;
-};
-
-TEST(MemoryInstrumentationTest, refPtrPtr)
-{
- InstrumentationTestHelper helper;
- RefPtr<StringImpl> refPtr;
- TwoPointersToRefPtr root(refPtr);
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(RefPtr<StringImpl>), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-class TwoPointersToOwnPtr {
-public:
- TwoPointersToOwnPtr(const OwnPtr<NotInstrumented>& value) : m_ptr1(&value), m_ptr2(&value) { }
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_ptr1);
- info.addMember(m_ptr2);
- }
-
- const OwnPtr<NotInstrumented>* m_ptr1;
- const OwnPtr<NotInstrumented>* m_ptr2;
-};
-
-TEST(MemoryInstrumentationTest, ownPtrPtr)
-{
- InstrumentationTestHelper helper;
- OwnPtr<NotInstrumented> ownPtr;
- TwoPointersToOwnPtr root(ownPtr);
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(OwnPtr<NotInstrumented>), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-template<typename T>
-class InstrumentedTemplate {
-public:
- template<typename V>
- InstrumentedTemplate(const V& value) : m_value(value) { }
-
- template<typename MemoryObjectInfo>
- void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- typename MemoryObjectInfo::ClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_value);
- }
-
- T m_value;
-};
-
-TEST(MemoryInstrumentationTest, detectReportMemoryUsageMethod)
-{
- {
- InstrumentationTestHelper helper;
-
- OwnPtr<InstrumentedTemplate<String> > value(adoptPtr(new InstrumentedTemplate<String>("")));
- InstrumentedOwner<InstrumentedTemplate<String>* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(InstrumentedTemplate<String>) + sizeof(StringImpl), helper.reportedSizeForAllTypes());
- // FIXME: it is failing on Chromium Canary bots but works fine locally.
- // EXPECT_EQ(2, helper.visitedObjects());
- }
- {
- InstrumentationTestHelper helper;
-
- OwnPtr<InstrumentedTemplate<NotInstrumented> > value(adoptPtr(new InstrumentedTemplate<NotInstrumented>("")));
- InstrumentedOwner<InstrumentedTemplate<NotInstrumented>* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(InstrumentedTemplate<NotInstrumented>), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
- }
-}
-
-TEST(MemoryInstrumentationTest, vectorZeroInlineCapacity)
-{
- InstrumentationTestHelper helper;
- InstrumentedOwner<Vector<int> > vectorOwner(16);
- helper.addRootObject(vectorOwner);
- EXPECT_EQ(16 * sizeof(int), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, vectorFieldWithInlineCapacity)
-{
- InstrumentationTestHelper helper;
- InstrumentedOwner<Vector<int, 4> > vectorOwner;
- helper.addRootObject(vectorOwner);
- EXPECT_EQ(static_cast<size_t>(0), helper.reportedSizeForAllTypes());
- EXPECT_EQ(0u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, vectorFieldWithInlineCapacityResized)
-{
- InstrumentationTestHelper helper;
- InstrumentedOwner<Vector<int, 4> > vectorOwner;
- vectorOwner.m_value.reserveCapacity(8);
- helper.addRootObject(vectorOwner);
- EXPECT_EQ(8u * sizeof(int), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, heapAllocatedVectorWithInlineCapacity)
-{
- InstrumentationTestHelper helper;
- InstrumentedOwner<OwnPtr<Vector<int, 4> > > vectorOwner;
- vectorOwner.m_value = adoptPtr(new Vector<int, 4>());
- helper.addRootObject(vectorOwner);
- EXPECT_EQ(sizeof(Vector<int, 4>), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, heapAllocatedVectorWithInlineCapacityResized)
-{
- InstrumentationTestHelper helper;
- InstrumentedOwner<OwnPtr<Vector<int, 4> > > vectorOwner;
- vectorOwner.m_value = adoptPtr(new Vector<int, 4>());
- vectorOwner.m_value->reserveCapacity(8);
- helper.addRootObject(vectorOwner);
- EXPECT_EQ(8u * sizeof(int) + sizeof(Vector<int, 4>), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, vectorWithInstrumentedType)
-{
- InstrumentationTestHelper helper;
-
- typedef Vector<String> StringVector;
- OwnPtr<StringVector> value = adoptPtr(new StringVector());
- size_t count = 10;
- for (size_t i = 0; i < count; ++i)
- value->append("string");
- InstrumentedOwner<StringVector* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(StringVector) + sizeof(String) * value->capacity() + (sizeof(StringImpl) + 6) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(count + 2, (size_t)helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashSetWithInstrumentedType)
-{
- InstrumentationTestHelper helper;
-
- typedef HashSet<String> ValueType;
- OwnPtr<ValueType> value = adoptPtr(new ValueType());
- size_t count = 10;
- for (size_t i = 0; i < count; ++i)
- value->add(String::number(i));
- InstrumentedOwner<ValueType* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(ValueType) + sizeof(String) * value->capacity() + (sizeof(StringImpl) + 1) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(count + 1, (size_t)helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashMapWithNotInstrumentedKeysAndValues)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<int, int> IntToIntMap;
- OwnPtr<IntToIntMap> value = adoptPtr(new IntToIntMap());
- size_t count = 10;
- for (size_t i = 1; i <= count; ++i)
- value->set(i, i);
- InstrumentedOwner<IntToIntMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(IntToIntMap) + sizeof(IntToIntMap::ValueType) * value->capacity(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(1u, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashMapWithInstrumentedKeys)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<String, int> StringToIntMap;
- OwnPtr<StringToIntMap> value = adoptPtr(new StringToIntMap());
- size_t count = 10;
- for (size_t i = 10; i < 10 + count; ++i)
- value->set(String::number(i), i);
- InstrumentedOwner<StringToIntMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(StringToIntMap) + sizeof(StringToIntMap::ValueType) * value->capacity() + (sizeof(StringImpl) + 2) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashMapWithInstrumentedValues)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<int, String> IntToStringMap;
- OwnPtr<IntToStringMap> value = adoptPtr(new IntToStringMap());
- size_t count = 10;
- for (size_t i = 10; i < 10 + count; ++i)
- value->set(i, String::number(i));
- InstrumentedOwner<IntToStringMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(IntToStringMap) + sizeof(IntToStringMap::ValueType) * value->capacity() + (sizeof(StringImpl) + 2) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashMapWithInstrumentedKeysAndValues)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<String, String> StringToStringMap;
- OwnPtr<StringToStringMap> value = adoptPtr(new StringToStringMap());
- size_t count = 10;
- for (size_t i = 10; i < 10 + count; ++i)
- value->set(String::number(count + i), String::number(i));
- InstrumentedOwner<StringToStringMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(StringToStringMap) + sizeof(StringToStringMap::ValueType) * value->capacity() + 2 * (sizeof(StringImpl) + 2) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u * count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashMapWithInstrumentedPointerKeysAndPointerValues)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<Instrumented*, Instrumented*> InstrumentedToInstrumentedMap;
- OwnPtr<InstrumentedToInstrumentedMap> value(adoptPtr(new InstrumentedToInstrumentedMap()));
- Vector<OwnPtr<Instrumented> > valuesVector;
- size_t count = 10;
- for (size_t i = 0; i < count; ++i) {
- valuesVector.append(adoptPtr(new Instrumented()));
- valuesVector.append(adoptPtr(new Instrumented()));
- value->set(valuesVector[2 * i].get(), valuesVector[2 * i + 1].get());
- }
- InstrumentedOwner<InstrumentedToInstrumentedMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(InstrumentedToInstrumentedMap) + sizeof(InstrumentedToInstrumentedMap::ValueType) * value->capacity() + 2 * (sizeof(Instrumented) + sizeof(NotInstrumented)) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u * 2u * count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, listHashSetWithInstrumentedType)
-{
- InstrumentationTestHelper helper;
-
- typedef ListHashSet<String, 8> TestSet;
- OwnPtr<TestSet> value = adoptPtr(new TestSet());
- size_t count = 10;
- for (size_t i = 0; i < count; ++i)
- value->add(String::number(i));
- InstrumentedOwner<TestSet* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(TestSet) + sizeof(String) * value->capacity() + (sizeof(StringImpl) + 1 * sizeof(LChar)) * count +
- sizeof(WTF::ListHashSetNodeAllocator<String, 8>) + sizeof(WTF::ListHashSetNode<String, 8>) * (count - 8),
- helper.reportedSizeForAllTypes());
- EXPECT_EQ(1 + count, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, listHashSetWithInstrumentedTypeAfterValuesRemoval)
-{
- InstrumentationTestHelper helper;
-
- typedef ListHashSet<String, 8> TestSet;
- OwnPtr<TestSet> value = adoptPtr(new TestSet());
- size_t count = 20;
- for (size_t i = 0; i < count; ++i)
- value->add(String::number(i));
- // Remove 10 values, 8 of which were allocated in the internal buffer.
- for (size_t i = 0; i < 10; ++i)
- value->remove(String::number(i));
- InstrumentedOwner<TestSet* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(TestSet) + sizeof(String) * value->capacity() + (sizeof(StringImpl) + 2 * sizeof(LChar)) * (count - 10) +
- sizeof(WTF::ListHashSetNodeAllocator<String, 8>) + sizeof(WTF::ListHashSetNode<String, 8>) * (count - 10),
- helper.reportedSizeForAllTypes());
- EXPECT_EQ(1 + (count - 10), helper.visitedObjects());
-}
-
-class InstrumentedConvertibleToInt {
-public:
- InstrumentedConvertibleToInt() : m_notInstrumented(0) { }
- virtual ~InstrumentedConvertibleToInt() { }
-
- virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- info.addMember(m_notInstrumented);
- }
-
- operator int() const { return 2012; }
-
- NotInstrumented* m_notInstrumented;
-};
-
-// This test checks if reportMemoryUsage method will be called on a class
-// that can be implicitly cast to int. Currently objects of such classes are
-// treated as integers when they are stored in a HashMap by value and
-// reportMemoryUsage will not be called on them. We may fix that later.
-TEST(MemoryInstrumentationTest, hashMapWithValuesConvertibleToInt)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<InstrumentedConvertibleToInt*, InstrumentedConvertibleToInt> TestMap;
- OwnPtr<TestMap> value(adoptPtr(new TestMap()));
- Vector<OwnPtr<InstrumentedConvertibleToInt> > keysVector;
- Vector<OwnPtr<NotInstrumented> > valuesVector;
- size_t count = 10;
- for (size_t i = 0; i < count; ++i) {
- keysVector.append(adoptPtr(new InstrumentedConvertibleToInt()));
- valuesVector.append(adoptPtr(new NotInstrumented()));
- value->set(keysVector[i].get(), InstrumentedConvertibleToInt()).iterator->value.m_notInstrumented = valuesVector[i].get();
- }
- InstrumentedOwner<TestMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(TestMap) + sizeof(TestMap::ValueType) * value->capacity() +
- sizeof(InstrumentedConvertibleToInt) * count /* + sizeof(NotInstrumented) * count */, helper.reportedSizeForAllTypes());
- EXPECT_EQ(count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashMapWithEnumKeysAndInstrumentedValues)
-{
- InstrumentationTestHelper helper;
-
- typedef HashMap<TestEnum, String> EnumToStringMap;
- OwnPtr<EnumToStringMap> value(adoptPtr(new EnumToStringMap()));
- size_t count = MY_ENUM_MAX;
- for (size_t i = ONE; i <= count; ++i)
- value->set(static_cast<TestEnum>(i), String::number(i));
- InstrumentedOwner<EnumToStringMap* > root(value.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(EnumToStringMap) + sizeof(EnumToStringMap::ValueType) * value->capacity() + (sizeof(StringImpl) + 1) * value->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, hashCountedSetWithInstrumentedValues)
-{
- InstrumentationTestHelper helper;
-
- typedef HashCountedSet<Instrumented*> TestSet;
- OwnPtr<TestSet> set(adoptPtr(new TestSet()));
- Vector<OwnPtr<Instrumented> > keysVector;
- size_t count = 10;
- for (size_t i = 0; i < count; ++i) {
- keysVector.append(adoptPtr(new Instrumented()));
- for (size_t j = 0; j <= i; j++)
- set->add(keysVector.last().get());
- }
- InstrumentedOwner<TestSet* > root(set.get());
- helper.addRootObject(root);
- EXPECT_EQ(sizeof(TestSet) + sizeof(HashMap<Instrumented*, unsigned>::ValueType) * set->capacity() + (sizeof(Instrumented) + sizeof(NotInstrumented)) * set->size(), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u * count + 1, helper.visitedObjects());
-}
-
-TEST(MemoryInstrumentationTest, arrayBuffer)
-{
- InstrumentationTestHelper helper;
-
- typedef InstrumentedTemplate<RefPtr<ArrayBuffer> > ValueType;
- ValueType value(ArrayBuffer::create(1000, sizeof(int)));
- helper.addRootObject(value);
- EXPECT_EQ(sizeof(int) * 1000 + sizeof(ArrayBuffer), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-class AncestorWithVirtualMethod {
-public:
- virtual char* data() { return m_data; }
-
-private:
- char m_data[10];
-};
-
-class ClassWithTwoAncestors : public AncestorWithVirtualMethod, public Instrumented {
-public:
- virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
- {
- MemoryClassInfo info(memoryObjectInfo, this, TestType);
- }
-};
-
-TEST(MemoryInstrumentationTest, instrumentedWithMultipleAncestors)
-{
- InstrumentationTestHelper helper;
- OwnPtr<ClassWithTwoAncestors> instance = adoptPtr(new ClassWithTwoAncestors());
- ClassWithTwoAncestors* descendantPointer = instance.get();
- InstrumentedOwner<ClassWithTwoAncestors*> descendantPointerOwner(descendantPointer);
- Instrumented* ancestorPointer = descendantPointer;
- InstrumentedOwner<Instrumented*> ancestorPointerOwner(ancestorPointer);
- EXPECT_NE(static_cast<void*>(ancestorPointer), static_cast<void*>(descendantPointer));
-
- helper.addRootObject(descendantPointerOwner);
- helper.addRootObject(ancestorPointerOwner);
- EXPECT_EQ(sizeof(ClassWithTwoAncestors), helper.reportedSizeForAllTypes());
- EXPECT_EQ(2u, helper.visitedObjects());
-}
-
-class CheckCountedObjectsClient : public MemoryInstrumentationTestClient {
-public:
- CheckCountedObjectsClient(const void* expectedPointer) : m_expectedPointer(expectedPointer), m_expectedPointerFound(false) { }
- virtual bool checkCountedObject(const void* pointer)
- {
- EXPECT_EQ(pointer, m_expectedPointer);
- m_expectedPointerFound = true;
- return true;
- }
- bool expectedPointerFound() { return m_expectedPointerFound; }
-
-private:
- const void* m_expectedPointer;
- bool m_expectedPointerFound;
-};
-
-TEST(MemoryInstrumentationTest, checkCountedObjectWithMultipleAncestors)
-{
- OwnPtr<ClassWithTwoAncestors> instance = adoptPtr(new ClassWithTwoAncestors());
- ClassWithTwoAncestors* descendantPointer = instance.get();
- InstrumentedOwner<ClassWithTwoAncestors*> descendantPointerOwner(descendantPointer);
- Instrumented* ancestorPointer = descendantPointer;
- InstrumentedOwner<Instrumented*> ancestorPointerOwner(ancestorPointer);
- EXPECT_NE(static_cast<void*>(ancestorPointer), static_cast<void*>(descendantPointer));
-
- CheckCountedObjectsClient client(instance.get());
- InstrumentationTestImpl instrumentation(&client);
- instrumentation.addRootObject(descendantPointerOwner);
- instrumentation.addRootObject(ancestorPointerOwner);
- EXPECT_TRUE(client.expectedPointerFound());
-}
-
-} // namespace
-
diff --git a/Tools/DumpRenderTree/chromium/TestShellStub.cpp b/Tools/TestWebKitAPI/Tests/WTF/SHA1.cpp
index 6c34f84b3..dcf9d27b3 100644
--- a/Tools/DumpRenderTree/chromium/TestShellStub.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/SHA1.cpp
@@ -28,18 +28,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
#include "config.h"
+#include <wtf/SHA1.h>
+#include <wtf/text/CString.h>
-#include "TestShell.h"
+namespace TestWebKitAPI {
-bool checkLayoutTestSystemDependencies()
+static void expectSHA1(CString input, int repeat, CString expected)
{
- return true;
+ SHA1 sha1;
+ for (int i = 0; i < repeat; ++i)
+ sha1.addBytes(input);
+ CString actual = sha1.computeHexDigest();
+
+ ASSERT_EQ(expected.length(), actual.length());
+ ASSERT_STREQ(expected.data(), actual.data());
}
-void openStartupDialog()
+TEST(WTF_SHA1, Computation)
{
- // FIXME: Not implemented.
+ // Examples taken from sample code in RFC 3174.
+ expectSHA1("abc", 1, "A9993E364706816ABA3E25717850C26C9CD0D89D");
+ expectSHA1("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 1, "84983E441C3BD26EBAAE4AA1F95129E5E54670F1");
+ expectSHA1("a", 1000000, "34AA973CD4C4DAA4F61EEB2BDBAD27316534016F");
+ expectSHA1("0123456701234567012345670123456701234567012345670123456701234567", 10, "DEA356A2CDDD90C7A7ECEDC5EBB563934F460452");
}
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp b/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
index 8ee5c6e04..d1b5b43bd 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -33,11 +34,11 @@
namespace TestWebKitAPI {
-void expectBuilderContent(const char* expected, const StringBuilder& builder)
+static void expectBuilderContent(const String& expected, const StringBuilder& builder)
{
// Not using builder.toString() or builder.toStringPreserveCapacity() because they all
// change internal state of builder.
- EXPECT_EQ(String(expected), String(builder.characters(), builder.length()));
+ EXPECT_EQ(expected, String(builder.characters(), builder.length()));
}
void expectEmpty(const StringBuilder& builder)
@@ -85,6 +86,16 @@ TEST(StringBuilderTest, Append)
builder2.toStringPreserveCapacity(); // Test after reifyString with buffer preserved.
builder2.append("abcd");
ASSERT_EQ(characters, builder2.characters());
+
+ // Test appending UChar32 characters to StringBuilder.
+ StringBuilder builderForUChar32Append;
+ UChar32 frakturAChar = 0x1D504;
+ builderForUChar32Append.append(frakturAChar); // The fraktur A is not in the BMP, so it's two UTF-16 code units long.
+ ASSERT_EQ(2U, builderForUChar32Append.length());
+ builderForUChar32Append.append(static_cast<UChar32>('A'));
+ ASSERT_EQ(3U, builderForUChar32Append.length());
+ const UChar resultArray[] = { U16_LEAD(frakturAChar), U16_TRAIL(frakturAChar), 'A' };
+ expectBuilderContent(String(resultArray, WTF_ARRAY_LENGTH(resultArray)), builderForUChar32Append);
}
TEST(StringBuilderTest, ToString)
@@ -274,4 +285,51 @@ TEST(StringBuilderTest, ToAtomicString)
ASSERT_EQ(atomicString2.impl(), string.impl());
}
+TEST(StringBuilderTest, ToAtomicStringOnEmpty)
+{
+ { // Default constructed.
+ StringBuilder builder;
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+ { // With capacity.
+ StringBuilder builder;
+ builder.reserveCapacity(64);
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+ { // AtomicString constructed from a null string.
+ StringBuilder builder;
+ builder.append(String());
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+ { // AtomicString constructed from an empty string.
+ StringBuilder builder;
+ builder.append(emptyString());
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+ { // AtomicString constructed from an empty StringBuilder.
+ StringBuilder builder;
+ StringBuilder emptyBuilder;
+ builder.append(emptyBuilder);
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+ { // AtomicString constructed from an empty char* string.
+ StringBuilder builder;
+ builder.append("", 0);
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+ { // Cleared StringBuilder.
+ StringBuilder builder;
+ builder.appendLiteral("WebKit");
+ builder.clear();
+ AtomicString atomicString = builder.toAtomicString();
+ ASSERT_EQ(emptyAtom, atomicString);
+ }
+}
+
} // namespace
diff --git a/Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp b/Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp
new file mode 100644
index 000000000..a4d223c99
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WTF/StringHasher.cpp
@@ -0,0 +1,444 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+
+#include <wtf/StringHasher.h>
+
+namespace TestWebKitAPI {
+
+static const LChar nullLChars[2] = { 0, 0 };
+static const UChar nullUChars[2] = { 0, 0 };
+
+static const unsigned emptyStringHash = 0x4EC889EU;
+static const unsigned singleNullCharacterHash = 0x3D3ABF44U;
+
+static const LChar testALChars[6] = { 0x41, 0x95, 0xFF, 0x50, 0x01, 0 };
+static const UChar testAUChars[6] = { 0x41, 0x95, 0xFF, 0x50, 0x01, 0 };
+static const UChar testBUChars[6] = { 0x41, 0x95, 0xFFFF, 0x1080, 0x01, 0 };
+
+static const unsigned testAHash1 = 0xEA32B004;
+static const unsigned testAHash2 = 0x93F0F71E;
+static const unsigned testAHash3 = 0xCB609EB1;
+static const unsigned testAHash4 = 0x7984A706;
+static const unsigned testAHash5 = 0x0427561F;
+
+static const unsigned testBHash1 = 0xEA32B004;
+static const unsigned testBHash2 = 0x93F0F71E;
+static const unsigned testBHash3 = 0x59EB1B2C;
+static const unsigned testBHash4 = 0xA7BCCC0A;
+static const unsigned testBHash5 = 0x79201649;
+
+TEST(WTF, StringHasher)
+{
+ StringHasher hasher;
+
+ // The initial state of the hasher.
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+}
+
+TEST(WTF, StringHasher_addCharacter)
+{
+ StringHasher hasher;
+
+ // Hashing a single character.
+ hasher = StringHasher();
+ hasher.addCharacter(0);
+ ASSERT_EQ(singleNullCharacterHash, hasher.hash());
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, checking the intermediate state after each is added.
+ hasher = StringHasher();
+ hasher.addCharacter(testAUChars[0]);
+ ASSERT_EQ(testAHash1, hasher.hash());
+ ASSERT_EQ(testAHash1 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testAUChars[1]);
+ ASSERT_EQ(testAHash2, hasher.hash());
+ ASSERT_EQ(testAHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testAUChars[2]);
+ ASSERT_EQ(testAHash3, hasher.hash());
+ ASSERT_EQ(testAHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testAUChars[3]);
+ ASSERT_EQ(testAHash4, hasher.hash());
+ ASSERT_EQ(testAHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testAUChars[4]);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing a second set of five characters, including non-Latin-1 characters.
+ hasher = StringHasher();
+ hasher.addCharacter(testBUChars[0]);
+ ASSERT_EQ(testBHash1, hasher.hash());
+ ASSERT_EQ(testBHash1 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testBUChars[1]);
+ ASSERT_EQ(testBHash2, hasher.hash());
+ ASSERT_EQ(testBHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testBUChars[2]);
+ ASSERT_EQ(testBHash3, hasher.hash());
+ ASSERT_EQ(testBHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testBUChars[3]);
+ ASSERT_EQ(testBHash4, hasher.hash());
+ ASSERT_EQ(testBHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testBUChars[4]);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+}
+
+TEST(WTF, StringHasher_addCharacters)
+{
+ StringHasher hasher;
+
+ // Hashing zero characters.
+ hasher = StringHasher();
+ hasher.addCharacters(static_cast<LChar*>(0), 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(nullLChars, 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(nullLChars);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(static_cast<UChar*>(0), 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(nullUChars, 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(nullUChars);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing one character.
+ hasher = StringHasher();
+ hasher.addCharacters(nullLChars, 1);
+ ASSERT_EQ(singleNullCharacterHash, hasher.hash());
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(nullUChars, 1);
+ ASSERT_EQ(singleNullCharacterHash, hasher.hash());
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, all at once.
+ hasher = StringHasher();
+ hasher.addCharacters(testALChars, 5);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testALChars);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testAUChars, 5);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testAUChars);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testBUChars, 5);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testBUChars);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, in groups of two, then the last one.
+ hasher = StringHasher();
+ hasher.addCharacters(testALChars, 2);
+ ASSERT_EQ(testAHash2, hasher.hash());
+ ASSERT_EQ(testAHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testALChars + 2, 2);
+ ASSERT_EQ(testAHash4, hasher.hash());
+ ASSERT_EQ(testAHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testALChars + 4, 1);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testALChars, 2);
+ hasher.addCharacters(testALChars + 2, 2);
+ hasher.addCharacters(testALChars + 4);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testAUChars, 2);
+ ASSERT_EQ(testAHash2, hasher.hash());
+ ASSERT_EQ(testAHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testAUChars + 2, 2);
+ ASSERT_EQ(testAHash4, hasher.hash());
+ ASSERT_EQ(testAHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testAUChars + 4, 1);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testAUChars, 2);
+ hasher.addCharacters(testAUChars + 2, 2);
+ hasher.addCharacters(testAUChars + 4);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testBUChars, 2);
+ ASSERT_EQ(testBHash2, hasher.hash());
+ ASSERT_EQ(testBHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testBUChars + 2, 2);
+ ASSERT_EQ(testBHash4, hasher.hash());
+ ASSERT_EQ(testBHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testBUChars + 4, 1);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testBUChars, 2);
+ hasher.addCharacters(testBUChars + 2, 2);
+ hasher.addCharacters(testBUChars + 4);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, the first three, then the last two.
+ hasher = StringHasher();
+ hasher.addCharacters(testALChars, 3);
+ ASSERT_EQ(testAHash3, hasher.hash());
+ ASSERT_EQ(testAHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testALChars + 3, 2);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testALChars, 3);
+ ASSERT_EQ(testAHash3, hasher.hash());
+ ASSERT_EQ(testAHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testALChars + 3);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testAUChars, 3);
+ ASSERT_EQ(testAHash3, hasher.hash());
+ ASSERT_EQ(testAHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testAUChars + 3, 2);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testAUChars, 3);
+ ASSERT_EQ(testAHash3, hasher.hash());
+ ASSERT_EQ(testAHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testAUChars + 3, 2);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testBUChars, 3);
+ ASSERT_EQ(testBHash3, hasher.hash());
+ ASSERT_EQ(testBHash3 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacters(testBUChars + 3, 2);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharacters(testBUChars, 3);
+ hasher.addCharacters(testBUChars + 3);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+}
+
+TEST(WTF, StringHasher_addCharactersAssumingAligned)
+{
+ StringHasher hasher;
+
+ // Hashing zero characters.
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(static_cast<LChar*>(0), 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(nullLChars, 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(static_cast<UChar*>(0), 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(nullUChars, 0);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(nullUChars);
+ ASSERT_EQ(emptyStringHash, hasher.hash());
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing one character.
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(nullLChars, 1);
+ ASSERT_EQ(singleNullCharacterHash, hasher.hash());
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(nullUChars, 1);
+ ASSERT_EQ(singleNullCharacterHash, hasher.hash());
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, all at once.
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testALChars, 5);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testALChars);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testAUChars, 5);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testAUChars);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testBUChars, 5);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testBUChars);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, in groups of two, then the last one.
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testALChars, 2);
+ ASSERT_EQ(testAHash2, hasher.hash());
+ ASSERT_EQ(testAHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testALChars + 2, 2);
+ ASSERT_EQ(testAHash4, hasher.hash());
+ ASSERT_EQ(testAHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testALChars + 4, 1);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testALChars, 2);
+ hasher.addCharactersAssumingAligned(testALChars + 2, 2);
+ hasher.addCharactersAssumingAligned(testALChars + 4);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testAUChars, 2);
+ ASSERT_EQ(testAHash2, hasher.hash());
+ ASSERT_EQ(testAHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testAUChars + 2, 2);
+ ASSERT_EQ(testAHash4, hasher.hash());
+ ASSERT_EQ(testAHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testAUChars + 4, 1);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testAUChars, 2);
+ hasher.addCharactersAssumingAligned(testAUChars + 2, 2);
+ hasher.addCharactersAssumingAligned(testAUChars + 4);
+ ASSERT_EQ(testAHash5, hasher.hash());
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testBUChars, 2);
+ ASSERT_EQ(testBHash2, hasher.hash());
+ ASSERT_EQ(testBHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testBUChars + 2, 2);
+ ASSERT_EQ(testBHash4, hasher.hash());
+ ASSERT_EQ(testBHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testBUChars + 4, 1);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher = StringHasher();
+ hasher.addCharactersAssumingAligned(testBUChars, 2);
+ hasher.addCharactersAssumingAligned(testBUChars + 2, 2);
+ hasher.addCharactersAssumingAligned(testBUChars + 4);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+
+ // Hashing five characters, first two characters one at a time,
+ // then two more, then the last one.
+ hasher = StringHasher();
+ hasher.addCharacter(testBUChars[0]);
+ ASSERT_EQ(testBHash1, hasher.hash());
+ ASSERT_EQ(testBHash1 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharacter(testBUChars[1]);
+ ASSERT_EQ(testBHash2, hasher.hash());
+ ASSERT_EQ(testBHash2 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testBUChars[2], testBUChars[3]);
+ ASSERT_EQ(testBHash4, hasher.hash());
+ ASSERT_EQ(testBHash4 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+ hasher.addCharactersAssumingAligned(testBUChars + 4);
+ ASSERT_EQ(testBHash5, hasher.hash());
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, hasher.hashWithTop8BitsMasked());
+}
+
+TEST(WTF, StringHasher_computeHash)
+{
+ ASSERT_EQ(emptyStringHash, StringHasher::computeHash(static_cast<LChar*>(0), 0));
+ ASSERT_EQ(emptyStringHash, StringHasher::computeHash(nullLChars, 0));
+ ASSERT_EQ(emptyStringHash, StringHasher::computeHash(static_cast<UChar*>(0), 0));
+ ASSERT_EQ(emptyStringHash, StringHasher::computeHash(nullUChars, 0));
+
+ ASSERT_EQ(singleNullCharacterHash, StringHasher::computeHash(nullLChars, 1));
+ ASSERT_EQ(singleNullCharacterHash, StringHasher::computeHash(nullUChars, 1));
+
+ ASSERT_EQ(testAHash5, StringHasher::computeHash(testALChars, 5));
+ ASSERT_EQ(testAHash5, StringHasher::computeHash(testAUChars, 5));
+ ASSERT_EQ(testBHash5, StringHasher::computeHash(testBUChars, 5));
+}
+
+TEST(WTF, StringHasher_computeHashAndMaskTop8Bits)
+{
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(static_cast<LChar*>(0), 0));
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(nullLChars, 0));
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(static_cast<UChar*>(0), 0));
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(nullUChars, 0));
+
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(nullLChars, 1));
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(nullUChars, 1));
+
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(testALChars, 5));
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(testAUChars, 5));
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, StringHasher::computeHashAndMaskTop8Bits(testBUChars, 5));
+}
+
+TEST(WTF, StringHasher_hashMemory)
+{
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::hashMemory(0, 0));
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::hashMemory(nullUChars, 0));
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::hashMemory<0>(0));
+ ASSERT_EQ(emptyStringHash & 0xFFFFFF, StringHasher::hashMemory<0>(nullUChars));
+
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, StringHasher::hashMemory(nullUChars, 2));
+ ASSERT_EQ(singleNullCharacterHash & 0xFFFFFF, StringHasher::hashMemory<2>(nullUChars));
+
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, StringHasher::hashMemory(testAUChars, 10));
+ ASSERT_EQ(testAHash5 & 0xFFFFFF, StringHasher::hashMemory<10>(testAUChars));
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, StringHasher::hashMemory(testBUChars, 10));
+ ASSERT_EQ(testBHash5 & 0xFFFFFF, StringHasher::hashMemory<10>(testBUChars));
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp b/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp
index 35d64844c..10ab9e2cb 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp
@@ -37,7 +37,6 @@ TEST(WTF, StringImplCreationFromLiteral)
ASSERT_EQ(strlen("Template Literal"), stringWithTemplate->length());
ASSERT_TRUE(equal(stringWithTemplate.get(), "Template Literal"));
ASSERT_TRUE(stringWithTemplate->is8Bit());
- ASSERT_TRUE(stringWithTemplate->hasTerminatingNullCharacter());
// Constructor taking the size explicitely.
const char* programmaticStringData = "Explicit Size Literal";
@@ -46,7 +45,6 @@ TEST(WTF, StringImplCreationFromLiteral)
ASSERT_TRUE(equal(programmaticString.get(), programmaticStringData));
ASSERT_EQ(programmaticStringData, reinterpret_cast<const char*>(programmaticString->characters8()));
ASSERT_TRUE(programmaticString->is8Bit());
- ASSERT_TRUE(programmaticString->hasTerminatingNullCharacter());
// Constructor without explicit size.
const char* stringWithoutLengthLiteral = "No Size Literal";
@@ -55,7 +53,6 @@ TEST(WTF, StringImplCreationFromLiteral)
ASSERT_TRUE(equal(programmaticStringNoLength.get(), stringWithoutLengthLiteral));
ASSERT_EQ(stringWithoutLengthLiteral, reinterpret_cast<const char*>(programmaticStringNoLength->characters8()));
ASSERT_TRUE(programmaticStringNoLength->is8Bit());
- ASSERT_TRUE(programmaticStringNoLength->hasTerminatingNullCharacter());
}
TEST(WTF, StringImplFromLiteralLoop16BitConversion)
diff --git a/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp b/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp
index 819013fdb..149b85b21 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/StringOperators.cpp
@@ -45,6 +45,7 @@ TEST(WTF, StringOperators)
{
String string("String");
AtomicString atomicString("AtomicString");
+ ASCIILiteral literal("ASCIILiteral");
EXPECT_EQ(0, wtfStringCopyCount);
@@ -58,6 +59,11 @@ TEST(WTF, StringOperators)
EXPECT_N_WTF_STRING_COPIES(1, "C string" + atomicString);
EXPECT_N_WTF_STRING_COPIES(1, atomicString + "C string");
+ EXPECT_N_WTF_STRING_COPIES(1, literal + string);
+ EXPECT_N_WTF_STRING_COPIES(1, string + literal);
+ EXPECT_N_WTF_STRING_COPIES(1, literal + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(1, atomicString + literal);
+
EXPECT_N_WTF_STRING_COPIES(2, "C string" + string + "C string" + string);
EXPECT_N_WTF_STRING_COPIES(2, "C string" + (string + "C string" + string));
EXPECT_N_WTF_STRING_COPIES(2, ("C string" + string) + ("C string" + string));
@@ -65,6 +71,41 @@ TEST(WTF, StringOperators)
EXPECT_N_WTF_STRING_COPIES(2, string + ("C string" + string + "C string"));
EXPECT_N_WTF_STRING_COPIES(2, (string + "C string") + (string + "C string"));
+ EXPECT_N_WTF_STRING_COPIES(2, literal + string + literal + string);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (string + literal + string));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + string) + (literal + string));
+ EXPECT_N_WTF_STRING_COPIES(2, string + literal + string + literal);
+ EXPECT_N_WTF_STRING_COPIES(2, string + (literal + string + literal));
+ EXPECT_N_WTF_STRING_COPIES(2, (string + literal) + (string + literal));
+
+ EXPECT_N_WTF_STRING_COPIES(2, literal + string + "C string" + string);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (string + "C string" + string));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + string) + ("C string" + string));
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + string + literal + string);
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + (string + literal + string));
+ EXPECT_N_WTF_STRING_COPIES(2, ("C string" + string) + (literal + string));
+
+ EXPECT_N_WTF_STRING_COPIES(2, literal + atomicString + "C string" + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (atomicString + "C string" + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + atomicString) + ("C string" + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + atomicString + literal + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + (atomicString + literal + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, ("C string" + atomicString) + (literal + atomicString));
+
+ EXPECT_N_WTF_STRING_COPIES(2, literal + atomicString + "C string" + string);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (atomicString + "C string" + string));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + atomicString) + ("C string" + string));
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + atomicString + literal + string);
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + (atomicString + literal + string));
+ EXPECT_N_WTF_STRING_COPIES(2, ("C string" + atomicString) + (literal + string));
+
+ EXPECT_N_WTF_STRING_COPIES(2, literal + string + "C string" + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (string + "C string" + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + string) + ("C string" + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + string + literal + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(2, "C string" + (string + literal + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, ("C string" + string) + (literal + atomicString));
+
EXPECT_N_WTF_STRING_COPIES(2, "C string" + atomicString + "C string" + atomicString);
EXPECT_N_WTF_STRING_COPIES(2, "C string" + (atomicString + "C string" + atomicString));
EXPECT_N_WTF_STRING_COPIES(2, ("C string" + atomicString) + ("C string" + atomicString));
@@ -72,6 +113,13 @@ TEST(WTF, StringOperators)
EXPECT_N_WTF_STRING_COPIES(2, atomicString + ("C string" + atomicString + "C string"));
EXPECT_N_WTF_STRING_COPIES(2, (atomicString + "C string") + (atomicString + "C string"));
+ EXPECT_N_WTF_STRING_COPIES(2, literal + atomicString + literal + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (atomicString + literal + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + atomicString) + (literal + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, atomicString + literal + atomicString + literal);
+ EXPECT_N_WTF_STRING_COPIES(2, atomicString + (literal + atomicString + literal));
+ EXPECT_N_WTF_STRING_COPIES(2, (atomicString + literal) + (atomicString + literal));
+
EXPECT_N_WTF_STRING_COPIES(2, "C string" + string + "C string" + atomicString);
EXPECT_N_WTF_STRING_COPIES(2, "C string" + (string + "C string" + atomicString));
EXPECT_N_WTF_STRING_COPIES(2, ("C string" + string) + ("C string" + atomicString));
@@ -79,6 +127,13 @@ TEST(WTF, StringOperators)
EXPECT_N_WTF_STRING_COPIES(2, string + ("C string" + atomicString + "C string"));
EXPECT_N_WTF_STRING_COPIES(2, (string + "C string") + (atomicString + "C string"));
+ EXPECT_N_WTF_STRING_COPIES(2, literal + string + literal + atomicString);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (string + literal + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + string) + (literal + atomicString));
+ EXPECT_N_WTF_STRING_COPIES(2, string + literal + atomicString + literal);
+ EXPECT_N_WTF_STRING_COPIES(2, string + (literal + atomicString + literal));
+ EXPECT_N_WTF_STRING_COPIES(2, (string + literal) + (atomicString + literal));
+
EXPECT_N_WTF_STRING_COPIES(2, "C string" + atomicString + "C string" + string);
EXPECT_N_WTF_STRING_COPIES(2, "C string" + (atomicString + "C string" + string));
EXPECT_N_WTF_STRING_COPIES(2, ("C string" + atomicString) + ("C string" + string));
@@ -86,6 +141,13 @@ TEST(WTF, StringOperators)
EXPECT_N_WTF_STRING_COPIES(2, atomicString + ("C string" + string + "C string"));
EXPECT_N_WTF_STRING_COPIES(2, (atomicString + "C string") + (string + "C string"));
+ EXPECT_N_WTF_STRING_COPIES(2, literal + atomicString + literal + string);
+ EXPECT_N_WTF_STRING_COPIES(2, literal + (atomicString + literal + string));
+ EXPECT_N_WTF_STRING_COPIES(2, (literal + atomicString) + (literal + string));
+ EXPECT_N_WTF_STRING_COPIES(2, atomicString + literal + string + literal);
+ EXPECT_N_WTF_STRING_COPIES(2, atomicString + (literal + string + literal));
+ EXPECT_N_WTF_STRING_COPIES(2, (atomicString + literal) + (string + literal));
+
#if COMPILER(MSVC)
EXPECT_N_WTF_STRING_COPIES(1, L"wide string" + string);
EXPECT_N_WTF_STRING_COPIES(1, string + L"wide string");
diff --git a/Tools/TestWebKitAPI/Tests/WTF/WTF.pro b/Tools/TestWebKitAPI/Tests/WTF/WTF.pro
new file mode 100644
index 000000000..8b3658ffd
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WTF/WTF.pro
@@ -0,0 +1,32 @@
+TEMPLATE = app
+TARGET = tst_wtf
+
+SOURCES += \
+ AtomicString.cpp \
+ CheckedArithmeticOperations.cpp \
+ CString.cpp \
+ Functional.cpp \
+ HashMap.cpp \
+ HashSet.cpp \
+ IntegerToStringConversion.cpp \
+ ListHashSet.cpp \
+ MD5.cpp \
+ MathExtras.cpp \
+ MediaTime.cpp \
+ RedBlackTree.cpp \
+ SHA1.cpp \
+ SaturatedArithmeticOperations.cpp \
+ StringBuilder.cpp \
+ StringHasher.cpp \
+ StringImpl.cpp \
+ StringOperators.cpp \
+ TemporaryChange.cpp \
+ Vector.cpp \
+ VectorBasic.cpp \
+ VectorReverse.cpp \
+ WTFString.cpp
+
+include(../../TestWebKitAPI.pri)
+
+DEFINES += APITEST_SOURCE_DIR=\\\"$$PWD\\\"
+
diff --git a/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp b/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp
index 4a92cd4e8..3da40ff83 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/WTFString.cpp
@@ -38,14 +38,12 @@ TEST(WTF, StringCreationFromLiteral)
ASSERT_EQ(strlen("Explicit construction syntax"), stringFromLiteral.length());
ASSERT_TRUE(stringFromLiteral == "Explicit construction syntax");
ASSERT_TRUE(stringFromLiteral.is8Bit());
- ASSERT_TRUE(stringFromLiteral.impl()->hasTerminatingNullCharacter());
ASSERT_TRUE(String("Explicit construction syntax") == stringFromLiteral);
String stringWithTemplate("Template Literal", String::ConstructFromLiteral);
ASSERT_EQ(strlen("Template Literal"), stringWithTemplate.length());
ASSERT_TRUE(stringWithTemplate == "Template Literal");
ASSERT_TRUE(stringWithTemplate.is8Bit());
- ASSERT_TRUE(stringWithTemplate.impl()->hasTerminatingNullCharacter());
ASSERT_TRUE(String("Template Literal") == stringWithTemplate);
}
diff --git a/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtrHashing.cpp b/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtrHashing.cpp
index 0cd28c9bb..6dd7b6a56 100644
--- a/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtrHashing.cpp
+++ b/Tools/TestWebKitAPI/Tests/WTF/cf/RetainPtrHashing.cpp
@@ -38,13 +38,13 @@ TEST(RetainPtrHashing, HashSet)
{
HashSet<RetainPtr<CFStringRef> > set;
- RetainPtr<CFStringRef> foo(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> foo = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
EXPECT_FALSE(set.contains(foo));
set.add(foo);
EXPECT_TRUE(set.contains(foo));
- RetainPtr<CFStringRef> foo2(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> foo2 = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
EXPECT_FALSE(set.contains(foo2));
set.add(foo2);
EXPECT_TRUE(set.contains(foo2));
@@ -57,13 +57,13 @@ TEST(RetainPtrHashing, HashMapKey)
{
HashMap<RetainPtr<CFStringRef>, int> map;
- RetainPtr<CFStringRef> foo(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> foo = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
EXPECT_FALSE(map.contains(foo));
map.add(foo, 1);
EXPECT_EQ(1, map.get(foo));
- RetainPtr<CFStringRef> foo2(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> foo2 = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
EXPECT_FALSE(map.contains(foo2));
map.add(foo2, 2);
EXPECT_EQ(2, map.get(foo2));
@@ -76,13 +76,13 @@ TEST(RetainPtrHashing, HashMapValue)
{
HashMap<int, RetainPtr<CFStringRef> > map;
- RetainPtr<CFStringRef> foo(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> foo = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
EXPECT_FALSE(map.contains(1));
map.add(1, foo);
EXPECT_EQ(foo, map.get(1));
- RetainPtr<CFStringRef> foo2(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> foo2 = adoptCF(CFStringCreateWithCString(kCFAllocatorDefault, "foo", kCFStringEncodingUTF8));
EXPECT_FALSE(map.contains(2));
map.add(2, foo2);
EXPECT_EQ(foo2, map.get(2));
diff --git a/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp b/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp
index 66f580805..6eade5586 100644
--- a/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebCore/KURL.cpp
@@ -32,7 +32,7 @@ using namespace WebCore;
namespace TestWebKitAPI {
-class WebCore: public testing::Test {
+class KURLTest : public testing::Test {
public:
virtual void SetUp()
{
@@ -40,21 +40,19 @@ public:
}
};
-TEST_F(WebCore, KURLConstructorDefault)
+TEST_F(KURLTest, KURLConstructorDefault)
{
KURL kurl;
- EXPECT_FALSE(kurl.hasPath());
EXPECT_TRUE(kurl.isEmpty());
EXPECT_TRUE(kurl.isNull());
EXPECT_FALSE(kurl.isValid());
}
-TEST_F(WebCore, KURLConstructorConstChar)
+TEST_F(KURLTest, KURLConstructorConstChar)
{
KURL kurl(ParsedURLString, "http://username:password@www.example.com:8080/index.html?var=val#fragment");
- EXPECT_TRUE(kurl.hasPath());
EXPECT_FALSE(kurl.isEmpty());
EXPECT_FALSE(kurl.isNull());
EXPECT_TRUE(kurl.isValid());
@@ -72,4 +70,13 @@ TEST_F(WebCore, KURLConstructorConstChar)
EXPECT_EQ(String("fragment"), kurl.fragmentIdentifier());
}
+TEST_F(KURLTest, KURLDataURIStringSharing)
+{
+ KURL baseURL(ParsedURLString, "http://www.webkit.org/");
+ String threeApples = "data:text/plain;charset=utf-8;base64,76O/76O/76O/";
+
+ KURL url(baseURL, threeApples);
+ EXPECT_EQ(threeApples.impl(), url.string().impl());
+}
+
} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp b/Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
new file mode 100644
index 000000000..ceafb039c
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebCore/LayoutUnit.cpp
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2012, 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.
+ */
+
+#define ENABLE_SUBPIXEL_LAYOUT 1
+#define ENABLE_SATURATED_LAYOUT_ARITHMETIC 1
+#include "config.h"
+
+#include <WebCore/LayoutUnit.h>
+
+using namespace WebCore;
+
+namespace TestWebKitAPI {
+
+TEST(WebCoreLayoutUnit, LayoutUnitInt)
+{
+ ASSERT_EQ(LayoutUnit(INT_MIN).toInt(), intMinForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(INT_MIN / 2).toInt(), intMinForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(intMinForLayoutUnit - 1).toInt(), intMinForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(intMinForLayoutUnit).toInt(), intMinForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(intMinForLayoutUnit + 1).toInt(), intMinForLayoutUnit + 1);
+ ASSERT_EQ(LayoutUnit(intMinForLayoutUnit / 2).toInt(), intMinForLayoutUnit / 2);
+ ASSERT_EQ(LayoutUnit(-10000).toInt(), -10000);
+ ASSERT_EQ(LayoutUnit(-1000).toInt(), -1000);
+ ASSERT_EQ(LayoutUnit(-100).toInt(), -100);
+ ASSERT_EQ(LayoutUnit(-10).toInt(), -10);
+ ASSERT_EQ(LayoutUnit(-1).toInt(), -1);
+ ASSERT_EQ(LayoutUnit(0).toInt(), 0);
+ ASSERT_EQ(LayoutUnit(1).toInt(), 1);
+ ASSERT_EQ(LayoutUnit(100).toInt(), 100);
+ ASSERT_EQ(LayoutUnit(1000).toInt(), 1000);
+ ASSERT_EQ(LayoutUnit(10000).toInt(), 10000);
+ ASSERT_EQ(LayoutUnit(intMaxForLayoutUnit / 2).toInt(), intMaxForLayoutUnit / 2);
+ ASSERT_EQ(LayoutUnit(intMaxForLayoutUnit - 1).toInt(), intMaxForLayoutUnit - 1);
+ ASSERT_EQ(LayoutUnit(intMaxForLayoutUnit).toInt(), intMaxForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(intMaxForLayoutUnit + 1).toInt(), intMaxForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(INT_MAX / 2).toInt(), intMaxForLayoutUnit);
+ ASSERT_EQ(LayoutUnit(INT_MAX).toInt(), intMaxForLayoutUnit);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitFloat)
+{
+ const float tolerance = 1.0f / kFixedPointDenominator;
+ ASSERT_FLOAT_EQ(LayoutUnit(1.0f).toFloat(), 1.0f);
+ ASSERT_FLOAT_EQ(LayoutUnit(1.25f).toFloat(), 1.25f);
+ ASSERT_NEAR(LayoutUnit(1.1f).toFloat(), 1.1f, tolerance);
+ ASSERT_NEAR(LayoutUnit(1.33f).toFloat(), 1.33f, tolerance);
+ ASSERT_NEAR(LayoutUnit(1.3333f).toFloat(), 1.3333f, tolerance);
+ ASSERT_NEAR(LayoutUnit(1.53434f).toFloat(), 1.53434f, tolerance);
+ ASSERT_NEAR(LayoutUnit(345634).toFloat(), 345634.0f, tolerance);
+ ASSERT_NEAR(LayoutUnit(345634.12335f).toFloat(), 345634.12335f, tolerance);
+ ASSERT_NEAR(LayoutUnit(-345634.12335f).toFloat(), -345634.12335f, tolerance);
+ ASSERT_NEAR(LayoutUnit(-345634).toFloat(), -345634.0f, tolerance);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitRounding)
+{
+ ASSERT_EQ(LayoutUnit(-1.9f).round(), -2);
+ ASSERT_EQ(LayoutUnit(-1.6f).round(), -2);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-1.51f).round(), -2);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-1.5f).round(), -1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-1.49f).round(), -1);
+ ASSERT_EQ(LayoutUnit(-1.0f).round(), -1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-0.99f).round(), -1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-0.51f).round(), -1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-0.50f).round(), 0);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(-0.49f).round(), 0);
+ ASSERT_EQ(LayoutUnit(-0.1f).round(), 0);
+ ASSERT_EQ(LayoutUnit(0.0f).round(), 0);
+ ASSERT_EQ(LayoutUnit(0.1f).round(), 0);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(0.49f).round(), 0);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(0.50f).round(), 1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(0.51f).round(), 1);
+ ASSERT_EQ(LayoutUnit(0.99f).round(), 1);
+ ASSERT_EQ(LayoutUnit(1.0f).round(), 1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(1.49f).round(), 1);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(1.5f).round(), 2);
+ ASSERT_EQ(LayoutUnit::fromFloatRound(1.51f).round(), 2);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitSnapSizeToPixel)
+{
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1), LayoutUnit(0)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1), LayoutUnit(0.5)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(0)), 2);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(0.49)), 2);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(0.5)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(0.75)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(0.99)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(1)), 2);
+
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(0.5), LayoutUnit(1.5)), 0);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(0.99), LayoutUnit(1.5)), 0);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.0), LayoutUnit(1.5)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.49), LayoutUnit(1.5)), 1);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(1.5), LayoutUnit(1.5)), 1);
+
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(100.5), LayoutUnit(100)), 101);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(intMaxForLayoutUnit), LayoutUnit(0.3)), intMaxForLayoutUnit);
+ ASSERT_EQ(snapSizeToPixel(LayoutUnit(intMinForLayoutUnit), LayoutUnit(-0.3)), intMinForLayoutUnit);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitMultiplication)
+{
+ ASSERT_EQ((LayoutUnit(1) * LayoutUnit(1)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(1) * LayoutUnit(2)).toInt(), 2);
+ ASSERT_EQ((LayoutUnit(2) * LayoutUnit(1)).toInt(), 2);
+ ASSERT_EQ((LayoutUnit(2) * LayoutUnit(0.5)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(0.5) * LayoutUnit(2)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(100) * LayoutUnit(1)).toInt(), 100);
+
+ ASSERT_EQ((LayoutUnit(-1) * LayoutUnit(1)).toInt(), -1);
+ ASSERT_EQ((LayoutUnit(-1) * LayoutUnit(2)).toInt(), -2);
+ ASSERT_EQ((LayoutUnit(-2) * LayoutUnit(1)).toInt(), -2);
+ ASSERT_EQ((LayoutUnit(-2) * LayoutUnit(0.5)).toInt(), -1);
+ ASSERT_EQ((LayoutUnit(-0.5) * LayoutUnit(2)).toInt(), -1);
+ ASSERT_EQ((LayoutUnit(-100) * LayoutUnit(1)).toInt(), -100);
+
+ ASSERT_EQ((LayoutUnit(-1) * LayoutUnit(-1)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(-1) * LayoutUnit(-2)).toInt(), 2);
+ ASSERT_EQ((LayoutUnit(-2) * LayoutUnit(-1)).toInt(), 2);
+ ASSERT_EQ((LayoutUnit(-2) * LayoutUnit(-0.5)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(-0.5) * LayoutUnit(-2)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(-100) * LayoutUnit(-1)).toInt(), 100);
+
+ ASSERT_EQ((LayoutUnit(100) * LayoutUnit(3.33)).round(), 333);
+ ASSERT_EQ((LayoutUnit(-100) * LayoutUnit(3.33)).round(), -333);
+ ASSERT_EQ((LayoutUnit(-100) * LayoutUnit(-3.33)).round(), 333);
+
+ size_t aHundredSizeT = 100;
+ ASSERT_EQ((LayoutUnit(aHundredSizeT) * LayoutUnit(1)).toInt(), 100);
+ ASSERT_EQ((aHundredSizeT * LayoutUnit(4)).toInt(), 400);
+ ASSERT_EQ((LayoutUnit(4) * aHundredSizeT).toInt(), 400);
+
+ int quarterMax = intMaxForLayoutUnit / 4;
+ ASSERT_EQ((LayoutUnit(quarterMax) * LayoutUnit(2)).toInt(), quarterMax * 2);
+ ASSERT_EQ((LayoutUnit(quarterMax) * LayoutUnit(3)).toInt(), quarterMax * 3);
+ ASSERT_EQ((LayoutUnit(quarterMax) * LayoutUnit(4)).toInt(), quarterMax * 4);
+ ASSERT_EQ((LayoutUnit(quarterMax) * LayoutUnit(5)).toInt(), intMaxForLayoutUnit);
+
+ size_t overflowIntSizeT = intMaxForLayoutUnit * 4;
+ ASSERT_EQ((LayoutUnit(overflowIntSizeT) * LayoutUnit(2)).toInt(), intMaxForLayoutUnit);
+ ASSERT_EQ((overflowIntSizeT * LayoutUnit(4)).toInt(), intMaxForLayoutUnit);
+ ASSERT_EQ((LayoutUnit(4) * overflowIntSizeT).toInt(), intMaxForLayoutUnit);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitDivision)
+{
+ ASSERT_EQ((LayoutUnit(1) / LayoutUnit(1)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(1) / LayoutUnit(2)).toInt(), 0);
+ ASSERT_EQ((LayoutUnit(2) / LayoutUnit(1)).toInt(), 2);
+ ASSERT_EQ((LayoutUnit(2) / LayoutUnit(0.5)).toInt(), 4);
+ ASSERT_EQ((LayoutUnit(0.5) / LayoutUnit(2)).toInt(), 0);
+ ASSERT_EQ((LayoutUnit(100) / LayoutUnit(10)).toInt(), 10);
+ ASSERT_FLOAT_EQ((LayoutUnit(1) / LayoutUnit(2)).toFloat(), 0.5f);
+ ASSERT_FLOAT_EQ((LayoutUnit(0.5) / LayoutUnit(2)).toFloat(), 0.25f);
+
+ ASSERT_EQ((LayoutUnit(-1) / LayoutUnit(1)).toInt(), -1);
+ ASSERT_EQ((LayoutUnit(-1) / LayoutUnit(2)).toInt(), 0);
+ ASSERT_EQ((LayoutUnit(-2) / LayoutUnit(1)).toInt(), -2);
+ ASSERT_EQ((LayoutUnit(-2) / LayoutUnit(0.5)).toInt(), -4);
+ ASSERT_EQ((LayoutUnit(-0.5) / LayoutUnit(2)).toInt(), 0);
+ ASSERT_EQ((LayoutUnit(-100) / LayoutUnit(10)).toInt(), -10);
+ ASSERT_FLOAT_EQ((LayoutUnit(-1) / LayoutUnit(2)).toFloat(), -0.5f);
+ ASSERT_FLOAT_EQ((LayoutUnit(-0.5) / LayoutUnit(2)).toFloat(), -0.25f);
+
+ ASSERT_EQ((LayoutUnit(-1) / LayoutUnit(-1)).toInt(), 1);
+ ASSERT_EQ((LayoutUnit(-1) / LayoutUnit(-2)).toInt(), 0);
+ ASSERT_EQ((LayoutUnit(-2) / LayoutUnit(-1)).toInt(), 2);
+ ASSERT_EQ((LayoutUnit(-2) / LayoutUnit(-0.5)).toInt(), 4);
+ ASSERT_EQ((LayoutUnit(-0.5) / LayoutUnit(-2)).toInt(), 0);
+ ASSERT_EQ((LayoutUnit(-100) / LayoutUnit(-10)).toInt(), 10);
+ ASSERT_FLOAT_EQ((LayoutUnit(-1) / LayoutUnit(-2)).toFloat(), 0.5f);
+ ASSERT_FLOAT_EQ((LayoutUnit(-0.5) / LayoutUnit(-2)).toFloat(), 0.25f);
+
+ size_t aHundredSizeT = 100;
+ ASSERT_EQ((LayoutUnit(aHundredSizeT) / LayoutUnit(2)).toInt(), 50);
+ ASSERT_EQ((aHundredSizeT / LayoutUnit(4)).toInt(), 25);
+ ASSERT_EQ((LayoutUnit(400) / aHundredSizeT).toInt(), 4);
+
+ ASSERT_EQ((LayoutUnit(intMaxForLayoutUnit) / LayoutUnit(2)).toInt(), intMaxForLayoutUnit / 2);
+ ASSERT_EQ((LayoutUnit(intMaxForLayoutUnit) / LayoutUnit(0.5)).toInt(), intMaxForLayoutUnit);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitCeil)
+{
+ ASSERT_EQ(LayoutUnit(0).ceil(), 0);
+ ASSERT_EQ(LayoutUnit(0.1).ceil(), 1);
+ ASSERT_EQ(LayoutUnit(0.5).ceil(), 1);
+ ASSERT_EQ(LayoutUnit(0.9).ceil(), 1);
+ ASSERT_EQ(LayoutUnit(1.0).ceil(), 1);
+ ASSERT_EQ(LayoutUnit(1.1).ceil(), 2);
+
+ ASSERT_EQ(LayoutUnit(-0.1).ceil(), 0);
+ ASSERT_EQ(LayoutUnit(-0.5).ceil(), 0);
+ ASSERT_EQ(LayoutUnit(-0.9).ceil(), 0);
+ ASSERT_EQ(LayoutUnit(-1.0).ceil(), -1);
+
+ ASSERT_EQ(LayoutUnit(intMaxForLayoutUnit).ceil(), intMaxForLayoutUnit);
+ ASSERT_EQ((LayoutUnit(intMaxForLayoutUnit) - LayoutUnit(0.5)).ceil(), intMaxForLayoutUnit);
+ ASSERT_EQ((LayoutUnit(intMaxForLayoutUnit) - LayoutUnit(1)).ceil(), intMaxForLayoutUnit - 1);
+
+ ASSERT_EQ(LayoutUnit(intMinForLayoutUnit).ceil(), intMinForLayoutUnit);
+}
+
+TEST(WebCoreLayoutUnit, LayoutUnitFloor)
+{
+ ASSERT_EQ(LayoutUnit(0).floor(), 0);
+ ASSERT_EQ(LayoutUnit(0.1).floor(), 0);
+ ASSERT_EQ(LayoutUnit(0.5).floor(), 0);
+ ASSERT_EQ(LayoutUnit(0.9).floor(), 0);
+ ASSERT_EQ(LayoutUnit(1.0).floor(), 1);
+ ASSERT_EQ(LayoutUnit(1.1).floor(), 1);
+
+ ASSERT_EQ(LayoutUnit(-0.1).floor(), -1);
+ ASSERT_EQ(LayoutUnit(-0.5).floor(), -1);
+ ASSERT_EQ(LayoutUnit(-0.9).floor(), -1);
+ ASSERT_EQ(LayoutUnit(-1.0).floor(), -1);
+
+ ASSERT_EQ(LayoutUnit(intMaxForLayoutUnit).floor(), intMaxForLayoutUnit);
+
+ ASSERT_EQ(LayoutUnit(intMinForLayoutUnit).floor(), intMinForLayoutUnit);
+ ASSERT_EQ((LayoutUnit(intMinForLayoutUnit) + LayoutUnit(0.5)).floor(), intMinForLayoutUnit);
+ ASSERT_EQ((LayoutUnit(intMinForLayoutUnit) + LayoutUnit(1)).floor(), intMinForLayoutUnit + 1);
+}
+
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp b/Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp
index d0d1bf29e..61b87cdad 100644
--- a/Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp
@@ -50,10 +50,10 @@ public:
TEST(WebCore, BitmapImageEmptyFrameTest)
{
SIZE sz = {16, 16};
- BitmapImageTest bitmapImageTest;
+ RefPtr<BitmapImageTest> bitmapImageTest = adoptRef(new BitmapImageTest);
int bits[256];
HBITMAP hBitmap = CreateBitmap(16, 16, 1, 32, bits);
- bitmapImageTest.getHBITMAPOfSize(hBitmap, &sz);
+ bitmapImageTest->getHBITMAPOfSize(hBitmap, &sz);
}
} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/win/WindowMessageObserver.h b/Tools/TestWebKitAPI/Tests/WebKit2/CloseThenTerminate.cpp
index 338881664..09230bb57 100644
--- a/Tools/TestWebKitAPI/win/WindowMessageObserver.h
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/CloseThenTerminate.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,19 +23,39 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WindowMessageObserver_h
-#define WindowMessageObserver_h
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
namespace TestWebKitAPI {
+
+static bool loaded;
-class WindowMessageObserver {
-public:
- virtual void windowReceivedMessage(HWND, UINT message, WPARAM, LPARAM) = 0;
+static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ loaded = true;
+}
-protected:
- virtual ~WindowMessageObserver() { }
-};
+// Test for https://webkit.org/b/115607
+// This tests that we don't crash when calling WKPageClose and WKPageTerminate.
-} // namespace TestWebKitAPI
+TEST(WebKit2, CloseThenTerminate)
+{
+ WKRetainPtr<WKContextRef> context = adoptWK(WKContextCreate());
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0 , sizeof(loaderClient));
+ loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("simple", "html"));
+ WKPageLoadURL(webView.page(), url.get());
-#endif // WindowMessageObserver_h
+ Util::run(&loaded);
+
+ WKPageClose(webView.page());
+ WKPageTerminate(webView.page());
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp
new file mode 100644
index 000000000..de80f4437
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/CoordinatedGraphics/WKViewUserViewportToContents.cpp
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ * 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 THE COPYRIGHT HOLDERS ``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 HOLDERS 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.
+ */
+
+#include "config.h"
+
+#include "WebKit2/WKView.h"
+#include "WebKit2/WKRetainPtr.h"
+
+namespace TestWebKitAPI {
+
+TEST(WebKit2, WKViewUserViewportToContents)
+{
+ // This test creates a WKView and uses the WKViewUserViewportToContents
+ // function to convert viewport coordinates to contents (page) coordinates.
+ // It scrolls and scales around the contents and check if the coordinates
+ // conversion math is right.
+
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ WKRetainPtr<WKViewRef> webView(AdoptWK, WKViewCreate(context.get(), 0));
+
+ WKViewInitialize(webView.get());
+ WKPageSetUseFixedLayout(WKViewGetPage(webView.get()), false);
+
+ WKPoint out;
+
+ // At scale 1.0 the viewport and contents coordinates should match.
+
+ WKViewSetContentScaleFactor(webView.get(), 1.0);
+ WKViewSetContentPosition(webView.get(), WKPointMake(0, 0));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 0);
+ EXPECT_EQ(out.y, 0);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 10);
+ EXPECT_EQ(out.y, 10);
+
+ WKViewSetContentPosition(webView.get(), WKPointMake(20, 20));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 20);
+ EXPECT_EQ(out.y, 20);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 30);
+ EXPECT_EQ(out.y, 30);
+
+ // At scale 2.0 the viewport distance values will be half
+ // the ones seem in the contents.
+
+ WKViewSetContentScaleFactor(webView.get(), 2.0);
+ WKViewSetContentPosition(webView.get(), WKPointMake(0, 0));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 0);
+ EXPECT_EQ(out.y, 0);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 5);
+ EXPECT_EQ(out.y, 5);
+
+ WKViewSetContentPosition(webView.get(), WKPointMake(20, 20));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 20);
+ EXPECT_EQ(out.y, 20);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 25);
+ EXPECT_EQ(out.y, 25);
+
+ // At scale 0.5 the viewport distance values will be twice
+ // the ones seem in the contents.
+
+ WKViewSetContentScaleFactor(webView.get(), 0.5);
+ WKViewSetContentPosition(webView.get(), WKPointMake(0, 0));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 0);
+ EXPECT_EQ(out.y, 0);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 20);
+ EXPECT_EQ(out.y, 20);
+
+ WKViewSetContentPosition(webView.get(), WKPointMake(20, 20));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 20);
+ EXPECT_EQ(out.y, 20);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 40);
+ EXPECT_EQ(out.y, 40);
+
+ // Let's add translation to the viewport.
+
+ const int delta = 10;
+ WKViewSetUserViewportTranslation(webView.get(), delta, delta);
+
+ WKViewSetContentPosition(webView.get(), WKPointMake(0, 0));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 0 - delta / 0.5);
+ EXPECT_EQ(out.y, 0 - delta / 0.5);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 20 - delta / 0.5);
+ EXPECT_EQ(out.y, 20 - delta / 0.5);
+
+ WKViewSetContentPosition(webView.get(), WKPointMake(20, 20));
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(0, 0));
+ EXPECT_EQ(out.x, 20 - delta / 0.5);
+ EXPECT_EQ(out.y, 20 - delta / 0.5);
+
+ out = WKViewUserViewportToContents(webView.get(), WKPointMake(10, 10));
+ EXPECT_EQ(out.x, 40 - delta / 0.5);
+ EXPECT_EQ(out.y, 40 - delta / 0.5);
+}
+
+}
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp
index 8be4440c2..7ccddaea2 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionBasic.cpp
@@ -77,7 +77,7 @@ static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messag
finished = true;
}
-TEST(WebKit2, DOMWindowExtensionBasic)
+TEST(WebKit2, DISABLED_DOMWindowExtensionBasic)
{
WKRetainPtr<WKPageGroupRef> pageGroup(AdoptWK, WKPageGroupCreateWithIdentifier(WKStringCreateWithUTF8CString("DOMWindowExtensionBasicPageGroup")));
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp
index c19104eb8..ac04012ca 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache.cpp
@@ -78,7 +78,7 @@ static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messag
finished = true;
}
-TEST(WebKit2, DOMWindowExtensionNoCache)
+TEST(WebKit2, DISABLED_DOMWindowExtensionNoCache)
{
WKRetainPtr<WKPageGroupRef> pageGroup(AdoptWK, WKPageGroupCreateWithIdentifier(WKStringCreateWithUTF8CString("DOMWindowExtensionNoCachePageGroup")));
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp
index 411e115ea..f563b67c6 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/DOMWindowExtensionNoCache_Bundle.cpp
@@ -204,7 +204,7 @@ void DOMWindowExtensionNoCache::globalObjectIsAvailableForFrame(WKBundleFrameRef
{
WKBundleDOMWindowExtensionRef extension = WKBundleDOMWindowExtensionCreate(frame, world);
- int index;
+ int index = 0;
bool standard;
standard = world == WKBundleScriptWorldNormalWorld();
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls.cpp
new file mode 100644
index 000000000..4e6b4fe1d
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+
+namespace TestWebKitAPI {
+
+static bool didReceiveAllMessages = false;
+static bool receivedMessageForAddingForm = false;
+static const uint64_t expectedNumberOfElements = 1;
+
+static void nullJavaScriptCallback(WKSerializedScriptValueRef, WKErrorRef, void*)
+{
+}
+
+static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messageName, WKTypeRef messageBody, const void*)
+{
+ EXPECT_WK_STREQ("DidReceiveDidAssociateFormControls", messageName);
+ ASSERT_NOT_NULL(messageBody);
+ EXPECT_EQ(WKDictionaryGetTypeID(), WKGetTypeID(messageBody));
+
+ WKDictionaryRef dictionary = static_cast<WKDictionaryRef>(messageBody);
+ uint64_t numberOfElements = WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(dictionary, Util::toWK("NumberOfControls").get())));
+
+ EXPECT_EQ(expectedNumberOfElements, numberOfElements);
+
+ if (!receivedMessageForAddingForm) {
+ receivedMessageForAddingForm = true;
+
+ WKPageRef page = static_cast<WKPageRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("Page").get()));
+ WKPageRunJavaScriptInMainFrame(page, Util::toWK("addPasswordFieldToForm()").get(), 0, nullJavaScriptCallback);
+
+ return;
+ }
+
+ didReceiveAllMessages = true;
+}
+
+static void setInjectedBundleClient(WKContextRef context)
+{
+ WKContextInjectedBundleClient injectedBundleClient;
+ memset(&injectedBundleClient, 0, sizeof(injectedBundleClient));
+ injectedBundleClient.didReceiveMessageFromInjectedBundle = didReceiveMessageFromInjectedBundle;
+
+ WKContextSetInjectedBundleClient(context, &injectedBundleClient);
+}
+
+TEST(WebKit2, DidAssociateFormControls)
+{
+ WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("DidAssociateFormControlsTest"));
+ setInjectedBundleClient(context.get());
+
+ PlatformWebView webView(context.get());
+ WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("associate-form-controls", "html")).get());
+ Util::run(&didReceiveAllMessages);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp
new file mode 100644
index 000000000..b742650af
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/DidAssociateFormControls_Bundle.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "InjectedBundleTest.h"
+
+#include "PlatformUtilities.h"
+#include <WebKit2/WKBundle.h>
+#include <WebKit2/WKBundlePage.h>
+
+namespace TestWebKitAPI {
+
+class DidAssociateFormControlsTest : public InjectedBundleTest {
+public:
+ DidAssociateFormControlsTest(const std::string& identifier);
+
+ virtual void didCreatePage(WKBundleRef, WKBundlePageRef) OVERRIDE;
+};
+
+static InjectedBundleTest::Register<DidAssociateFormControlsTest> registrar("DidAssociateFormControlsTest");
+
+static bool shouldNotifyOnFormChanges(WKBundlePageRef, const void*)
+{
+ return true;
+}
+
+static void didAssociateFormControls(WKBundlePageRef page, WKArrayRef elementHandles, const void*)
+{
+ WKRetainPtr<WKMutableDictionaryRef> messageBody = adoptWK(WKMutableDictionaryCreate());
+
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("Page").get(), page);
+ WKRetainPtr<WKUInt64Ref> numberOfElements = adoptWK(WKUInt64Create(WKArrayGetSize(elementHandles)));
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("NumberOfControls").get(), numberOfElements.get());
+
+ WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("DidReceiveDidAssociateFormControls").get(), messageBody.get());
+}
+
+DidAssociateFormControlsTest::DidAssociateFormControlsTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+{
+}
+
+void DidAssociateFormControlsTest::didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
+{
+ WKBundlePageFormClient formClient;
+ memset(&formClient, 0, sizeof(formClient));
+
+ formClient.version = 2;
+ formClient.clientInfo = this;
+ formClient.shouldNotifyOnFormChanges = shouldNotifyOnFormChanges;
+ formClient.didAssociateFormControls = didAssociateFormControls;
+
+ WKBundlePageSetFormClient(page, &formClient);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/FindMatches.mm b/Tools/TestWebKitAPI/Tests/WebKit2/FindMatches.mm
new file mode 100644
index 000000000..4a5734f58
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/FindMatches.mm
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#import <WebKit/WebDocumentPrivate.h>
+#import <WebKit/DOMPrivate.h>
+#include <WebKit2/WKImage.h>
+#import <wtf/RetainPtr.h>
+
+@interface FindMatchesWK1FrameLoadDelegate : NSObject {
+}
+@end
+
+static bool didFinishLoadWK1;
+
+@implementation FindMatchesWK1FrameLoadDelegate
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ didFinishLoadWK1 = true;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+static bool didFinishLoad = false;
+static bool didCallFindStringMatches = false;
+static bool didCallGetImage = false;
+static WKFindOptions findOptions = kWKFindOptionsAtWordStarts;
+
+RetainPtr<WebView> webkit1View;
+
+static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ didFinishLoad = true;
+}
+
+static void didFindStringMatches(WKPageRef page, WKStringRef string, WKArrayRef matches, int firstIndex, const void* clientInfo)
+{
+ if (WKStringIsEqualToUTF8CString(string, "Hello")) {
+ size_t numMatches = WKArrayGetSize(matches);
+ EXPECT_EQ(3u, numMatches);
+
+ if (findOptions & kWKFindOptionsBackwards)
+ EXPECT_EQ(1, firstIndex);
+ else
+ EXPECT_EQ(2, firstIndex);
+
+ for (size_t i = 0; i < numMatches; ++i) {
+ WKTypeRef items = WKArrayGetItemAtIndex(matches, i);
+ WKTypeID type = WKGetTypeID(items);
+ EXPECT_EQ(type, WKArrayGetTypeID());
+ WKArrayRef rects = reinterpret_cast<WKArrayRef>(items);
+ size_t numRects = WKArrayGetSize(rects);
+ EXPECT_EQ(1u, numRects);
+ items = WKArrayGetItemAtIndex(rects, 0);
+ type = WKGetTypeID(items);
+ EXPECT_EQ(type, WKRectGetTypeID());
+ WKRect rect = WKRectGetValue(reinterpret_cast<WKRectRef>(items));
+ rect = rect;
+ }
+ } else if (WKStringIsEqualToUTF8CString(string, "crazy")) {
+ size_t numMatches = WKArrayGetSize(matches);
+ EXPECT_EQ(1u, numMatches);
+ EXPECT_EQ(kWKFindResultNoMatchAfterUserSelection, firstIndex);
+ }
+ didCallFindStringMatches = true;
+}
+
+static void didGetImageForMatchResult(WKPageRef page, WKImageRef image, uint32_t index, const void* clientInfo)
+{
+ WKSize size = WKImageGetSize(image);
+
+ DOMDocument *document = webkit1View.get().mainFrameDocument;
+ DOMRange *range = [document createRange];
+ DOMNode *target = [document getElementById:@"target"];
+ [range selectNode:target];
+ NSImage *expectedImage = [range renderedImageForcingBlackText:YES];
+ NSSize expectedSize = [expectedImage size];
+ EXPECT_EQ(size.width, expectedSize.width);
+ EXPECT_EQ(size.height, expectedSize.height);
+ didCallGetImage = true;
+}
+
+TEST(WebKit2, FindMatches)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+
+ loaderClient.version = 0;
+ loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKPageFindMatchesClient findMatchesClient;
+ memset(&findMatchesClient, 0, sizeof(findMatchesClient));
+
+ findMatchesClient.version = 0;
+ findMatchesClient.didFindStringMatches = didFindStringMatches;
+ findMatchesClient.didGetImageForMatchResult = didGetImageForMatchResult;
+
+ WKPageSetPageFindMatchesClient(webView.page(), &findMatchesClient);
+
+ // This HTML file contains 3 occurrences of the word Hello and has the second occurence of the word 'world' selected.
+ // It contains 1 occurrence of the word 'crazy' that is before the selected word.
+ WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("findRanges", "html"));
+ WKPageLoadURL(webView.page(), url.get());
+
+ Util::run(&didFinishLoad);
+
+ WKRetainPtr<WKStringRef> findString(AdoptWK, WKStringCreateWithUTF8CString("Hello"));
+
+ WKPageFindStringMatches(webView.page(), findString.get(), findOptions, 100);
+ Util::run(&didCallFindStringMatches);
+
+ didCallFindStringMatches = false;
+ findOptions |= kWKFindOptionsBackwards;
+ WKPageFindStringMatches(webView.page(), findString.get(), findOptions, 100);
+ Util::run(&didCallFindStringMatches);
+
+ webkit1View = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<FindMatchesWK1FrameLoadDelegate> frameLoadDelegate = adoptNS([FindMatchesWK1FrameLoadDelegate new]);
+
+ webkit1View.get().frameLoadDelegate = frameLoadDelegate.get();
+ [webkit1View.get().mainFrame loadHTMLString:@"Test search. Hello <span id=\"target\">Hello</span> Hello!" baseURL:[NSURL URLWithString:@"about:blank"]];
+
+ Util::run(&didFinishLoadWK1);
+
+ WKPageGetImageForFindMatch(webView.page(), 0);
+ Util::run(&didCallGetImage);
+
+ didCallFindStringMatches = false;
+ findOptions &= ~kWKFindOptionsBackwards;
+ WKRetainPtr<WKStringRef> findOtherString(AdoptWK, WKStringCreateWithUTF8CString("crazy"));
+ WKPageFindStringMatches(webView.page(), findOtherString.get(), findOptions, 100);
+ Util::run(&didCallFindStringMatches);
+
+ WKPageHideFindUI(webView.page());
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp
new file mode 100644
index 000000000..f3d1830d6
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/LoadPageOnCrash.cpp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2013 Adenilson Cavalcanti <cavalcantii@gmail.com>
+ *
+ * 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+static void didFinishLoad(WKPageRef, WKFrameRef, WKTypeRef, const void*);
+
+class WebKit2CrashLoader {
+public:
+ WebKit2CrashLoader()
+ : context(AdoptWK, WKContextCreate())
+ , webView(context.get())
+ , url(adoptWK(WKURLCreateWithUTF8CString("about:blank")))
+ , firstSuccessfulLoad(false)
+ , secondSuccessfulLoad(false)
+ {
+ memset(&loaderClient, 0, sizeof(loaderClient));
+ loaderClient.clientInfo = this;
+ loaderClient.didFinishLoadForFrame = didFinishLoad;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+ }
+
+ void loadUrl()
+ {
+ WKPageLoadURL(webView.page(), url.get());
+ }
+
+ void terminateWebProcess()
+ {
+ WKPageTerminate(webView.page());
+ }
+
+ WKRetainPtr<WKContextRef> context;
+ WKPageLoaderClient loaderClient;
+ PlatformWebView webView;
+ WKRetainPtr<WKURLRef> url;
+
+ bool firstSuccessfulLoad;
+ bool secondSuccessfulLoad;
+};
+
+// We are going to have 2 load events intertwined by a simulated crash
+// (i.e. Load -> Crash -> Load).
+void didFinishLoad(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ WebKit2CrashLoader* testHelper = const_cast<WebKit2CrashLoader*>(static_cast<const WebKit2CrashLoader*>(clientInfo));
+
+ // First load worked, let's crash WebProcess.
+ if (!testHelper->firstSuccessfulLoad) {
+ testHelper->firstSuccessfulLoad = true;
+ return;
+ }
+
+ // Second load worked, we are done.
+ EXPECT_TRUE(testHelper->firstSuccessfulLoad);
+ if (!testHelper->secondSuccessfulLoad) {
+ testHelper->secondSuccessfulLoad = true;
+ return;
+ }
+}
+
+// This test will load a blank page and next kill WebProcess, the expected
+// result is that a call to page load should spawn a new WebProcess.
+TEST(WebKit2, LoadPageAfterCrash)
+{
+ WebKit2CrashLoader helper;
+ helper.loadUrl();
+ Util::run(&helper.firstSuccessfulLoad);
+ helper.terminateWebProcess();
+ helper.loadUrl();
+ Util::run(&helper.secondSuccessfulLoad);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp
index 9b4705151..4bf5527f9 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/MouseMoveAfterCrash.cpp
@@ -37,11 +37,6 @@ static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
didFinishLoad = true;
}
-static void processDidCrash(WKPageRef page, const void*)
-{
- WKPageReload(page);
-}
-
static void setPageLoaderClient(WKPageRef page)
{
WKPageLoaderClient loaderClient;
@@ -49,7 +44,6 @@ static void setPageLoaderClient(WKPageRef page)
loaderClient.version = 0;
loaderClient.clientInfo = 0;
loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
- loaderClient.processDidCrash = processDidCrash;
WKPageSetPageLoaderClient(page, &loaderClient);
}
@@ -79,11 +73,11 @@ TEST(WebKit2, MouseMoveAfterCrash)
webView.simulateMouseMove(10, 10);
webView.simulateMouseMove(20, 20);
- // After moving the mouse (while the web process was hung on the Pause message), kill the web process. It is restarted in
- // processDidCrash by reloading the page.
+ // After moving the mouse (while the web process was hung on the Pause message), kill the web process. It is restarted by reloading the page.
WKPageTerminate(webView.page());
+ WKPageReload(webView.page());
- // Wait until we load the page a second time (via reloading the page in processDidCrash).
+ // Wait until we load the page a second time.
Util::run(&didFinishLoad);
EXPECT_JS_FALSE(webView.page(), "didMoveMouse()");
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm b/Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm
new file mode 100644
index 000000000..6635fae9e
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications.mm
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+
+#include <WebKit2/WKString.h>
+
+namespace TestWebKitAPI {
+
+static bool finished = false;
+
+static void didReceiveMessageFromInjectedBundle(WKContextRef context, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo)
+{
+ if (WKStringIsEqualToUTF8CString(messageName, "PasteboardNotificationTestDoneMessageName")
+ && WKStringIsEqualToUTF8CString(static_cast<WKStringRef>(messageBody), "didWriteToPasteboard")) {
+ NSData* data = [[NSPasteboard generalPasteboard] dataForType:@"AnotherArchivePasteboardType"];
+ EXPECT_NE(data, (NSData*)nil);
+ finished = true;
+ }
+}
+
+static void setInjectedBundleClient(WKContextRef context)
+{
+ WKContextInjectedBundleClient injectedBundleClient;
+ memset(&injectedBundleClient, 0, sizeof(injectedBundleClient));
+ injectedBundleClient.version = 0;
+ injectedBundleClient.clientInfo = 0;
+ injectedBundleClient.didReceiveMessageFromInjectedBundle = didReceiveMessageFromInjectedBundle;
+ WKContextSetInjectedBundleClient(context, &injectedBundleClient);
+}
+
+TEST(WebKit2, PasteboardNotifications)
+{
+ [[NSPasteboard generalPasteboard] clearContents];
+
+ WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("PasteboardNotificationsTest"));
+ setInjectedBundleClient(context.get());
+
+ PlatformWebView webView(context.get());
+
+ WKRetainPtr<WKPreferencesRef> preferences(AdoptWK, WKPreferencesCreate());
+ WKPreferencesSetJavaScriptCanAccessClipboard(preferences.get(), true);
+
+ WKPageGroupRef pageGroup = WKPageGetPageGroup(webView.page());
+ WKPageGroupSetPreferences(pageGroup, preferences.get());
+
+ WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("execCopy", "html")).get());
+ Util::run(&finished);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp
new file mode 100644
index 000000000..d33b77b55
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/PasteboardNotifications_Bundle.cpp
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "InjectedBundleTest.h"
+
+#include "PlatformUtilities.h"
+#include <WebKit2/WKArray.h>
+#include <WebKit2/WKBundlePage.h>
+#include <WebKit2/WKBundleBackForwardListItem.h>
+#include <WebKit2/WKWebArchive.h>
+
+namespace TestWebKitAPI {
+
+class PasteboardNotificationsTest : public InjectedBundleTest {
+public:
+ PasteboardNotificationsTest(const std::string& identifier);
+
+ virtual void didCreatePage(WKBundleRef, WKBundlePageRef);
+};
+
+static InjectedBundleTest::Register<PasteboardNotificationsTest> registrar("PasteboardNotificationsTest");
+
+static void willWriteToPasteboard(WKBundlePageRef page, WKBundleRangeHandleRef range, const void*)
+{
+ if (!range)
+ WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("PasteboardNotificationTestDoneMessageName").get(), Util::toWK("willWritetoPasteboardFail").get());
+}
+
+static void getPasteboardDataForRange(WKBundlePageRef, WKBundleRangeHandleRef range, WKArrayRef* pasteboardTypes, WKArrayRef* pasteboardData, const void*)
+{
+ WKTypeRef typeName = WKStringCreateWithUTF8CString("AnotherArchivePasteboardType");
+ *pasteboardTypes = WKArrayCreateAdoptingValues(&typeName, 1);
+ WKTypeRef typeData = WKWebArchiveCopyData(WKWebArchiveCreateFromRange(range));
+ *pasteboardData = WKArrayCreateAdoptingValues(&typeData, 1);
+}
+
+static void didWriteToPasteboard(WKBundlePageRef, const void*)
+{
+ WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("PasteboardNotificationTestDoneMessageName").get(), Util::toWK("didWriteToPasteboard").get());
+}
+
+PasteboardNotificationsTest::PasteboardNotificationsTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+{
+}
+
+void PasteboardNotificationsTest::didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
+{
+ WKBundlePageEditorClient pageEditorClient;
+
+ memset(&pageEditorClient, 0, sizeof(pageEditorClient));
+
+ pageEditorClient.version = 1;
+ pageEditorClient.clientInfo = this;
+ pageEditorClient.willWriteToPasteboard = willWriteToPasteboard;
+ pageEditorClient.getPasteboardDataForRange = getPasteboardDataForRange;
+ pageEditorClient.didWriteToPasteboard = didWriteToPasteboard;
+
+ WKBundlePageSetEditorClient(page, &pageEditorClient);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp
new file mode 100644
index 000000000..7960dcbf1
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/ReloadPageAfterCrash.cpp
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2013 Adenilson Cavalcanti <cavalcantii@gmail.com>
+ *
+ * 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+static bool loadBeforeCrash = false;
+static bool loadAfterCrash = false;
+
+static void didFinishLoad(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ // First load before WebProcess was terminated.
+ if (!loadBeforeCrash) {
+ loadBeforeCrash = true;
+ return;
+ }
+
+ // Next load after WebProcess was terminated (hopefully
+ // it will be correctly re-spawned).
+ EXPECT_EQ(static_cast<uint32_t>(kWKFrameLoadStateFinished), WKFrameGetFrameLoadState(frame));
+ EXPECT_FALSE(loadAfterCrash);
+
+ // Set it, otherwise the loop will not end.
+ loadAfterCrash = true;
+}
+
+static void didCrash(WKPageRef page, const void*)
+{
+ // Test if first load actually worked.
+ EXPECT_TRUE(loadBeforeCrash);
+
+ // Reload should re-spawn webprocess.
+ WKPageReload(page);
+}
+
+TEST(WebKit2, ReloadPageAfterCrash)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+ loaderClient.didFinishLoadForFrame = didFinishLoad;
+ loaderClient.processDidCrash = didCrash;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ // Load a blank page and next kills WebProcess.
+ WKPageLoadURL(webView.page(), url.get());
+ Util::run(&loadBeforeCrash);
+ WKPageTerminate(webView.page());
+
+ // Let's try load a page and see what happens.
+ WKPageLoadURL(webView.page(), url.get());
+ Util::run(&loadAfterCrash);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp
new file mode 100644
index 000000000..f032849ba
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/ResizeReversePaginatedWebView.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "JavaScriptTest.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include <JavaScriptCore/JSContextRef.h>
+#include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKPagePrivate.h>
+#include <WebKit2/WKSerializedScriptValue.h>
+
+namespace TestWebKitAPI {
+
+static bool testDone;
+
+static const unsigned pageLength = 100;
+static const unsigned pageGap = 100;
+static const unsigned expectedPageCount = 20;
+
+static void didLayout(WKPageRef page, WKLayoutMilestones milestones, WKTypeRef, const void* clientInfo)
+{
+ if (milestones & kWKDidFirstLayoutAfterSuppressedIncrementalRendering) {
+ PlatformWebView* webView = (PlatformWebView*)clientInfo;
+
+ unsigned pageCount = WKPageGetPageCount(page);
+ EXPECT_EQ(expectedPageCount, pageCount);
+
+ webView->resizeTo((pageLength * pageCount) + (pageGap * (pageCount - 1)), 500);
+ EXPECT_JS_EQ(page, "window.scrollX", "0");
+
+ testDone = true;
+ }
+}
+
+TEST(WebKit2, ResizeReversePaginatedWebView)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+ loaderClient.version = kWKPageLoaderClientCurrentVersion;
+ loaderClient.didLayout = didLayout;
+ loaderClient.clientInfo = &webView;
+
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKPageListenForLayoutMilestones(webView.page(), kWKDidFirstLayoutAfterSuppressedIncrementalRendering);
+
+ WKPageGroupRef pageGroup = WKPageGetPageGroup(webView.page());
+ WKPreferencesRef preferences = WKPageGroupGetPreferences(pageGroup);
+ WKPreferencesSetSuppressesIncrementalRendering(preferences, true);
+
+ WKPageSetPaginationMode(webView.page(), kWKPaginationModeRightToLeft);
+ WKPageSetPageLength(webView.page(), pageLength);
+ WKPageSetGapBetweenPages(webView.page(), pageGap);
+ WKPageSetPaginationBehavesLikeColumns(webView.page(), true);
+
+ WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("lots-of-text-vertical-lr", "html")).get());
+
+ Util::run(&testDone);
+ EXPECT_TRUE(testDone);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp
new file mode 100644
index 000000000..1af639de7
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/ResizeWindowAfterCrash.cpp
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2013 Adenilson Cavalcanti <cavalcantii@gmail.com>
+ *
+ * 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+struct TestStatesData {
+ TestStatesData(WKContextRef context)
+ : webView(context)
+ , firstLoad(false)
+ , resizeAfterCrash(false)
+ {
+ }
+
+ PlatformWebView webView;
+ bool firstLoad;
+ bool resizeAfterCrash;
+};
+
+static void didFinishLoad(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ TestStatesData* states = const_cast<TestStatesData*>(static_cast<const TestStatesData*>(clientInfo));
+ if (!states->firstLoad) {
+ // Loading a blank page worked, next we will kill WebProcess.
+ states->firstLoad = true;
+ return;
+ }
+
+ EXPECT_FALSE(states->resizeAfterCrash);
+ states->resizeAfterCrash = true;
+}
+
+static void didCrash(WKPageRef page, const void* clientInfo)
+{
+ TestStatesData* states = const_cast<TestStatesData*>(static_cast<const TestStatesData*>(clientInfo));
+ EXPECT_TRUE(states->firstLoad);
+ // Resize should work after WebProcess was terminated, unless
+ // the port's View is accessing nulled WebProcess related data,
+ // which would cause a crash.
+ states->webView.resizeTo(100, 200);
+ states->webView.resizeTo(300, 400);
+
+ WKPageReload(page);
+}
+
+TEST(WebKit2, ResizeWindowAfterCrash)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ TestStatesData states(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+ loaderClient.clientInfo = &states;
+ loaderClient.didFinishLoadForFrame = didFinishLoad;
+ loaderClient.processDidCrash = didCrash;
+ WKPageSetPageLoaderClient(states.webView.page(), &loaderClient);
+
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ // Load a blank page and next kills WebProcess.
+ WKPageLoadURL(states.webView.page(), url.get());
+ Util::run(&states.firstLoad);
+ WKPageTerminate(states.webView.page());
+
+ // Let's try load a page and see what happens.
+ WKPageLoadURL(states.webView.page(), url.get());
+ Util::run(&states.resizeAfterCrash);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp
new file mode 100644
index 000000000..695e912df
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/ScrollPinningBehaviors.cpp
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "JavaScriptTest.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include <JavaScriptCore/JSContextRef.h>
+#include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKPagePrivate.h>
+#include <WebKit2/WKSerializedScriptValue.h>
+
+namespace TestWebKitAPI {
+
+static bool testDone;
+
+static void didFinishDocumentLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void *clientInfo)
+{
+ WKPageSetScrollPinningBehavior(page, kWKScrollPinningBehaviorPinToBottom);
+
+ EXPECT_JS_EQ(page, "window.scrollY", "2434");
+
+ PlatformWebView* webView = (PlatformWebView*)clientInfo;
+ webView->resizeTo(800, 200);
+
+ EXPECT_JS_EQ(page, "window.scrollY", "2834");
+ EXPECT_JS_EQ(page, "window.scrollTo(0,0)", "undefined");
+ EXPECT_JS_EQ(page, "window.scrollY", "2834");
+
+ WKPageSetScrollPinningBehavior(page, kWKScrollPinningBehaviorPinToTop);
+
+ EXPECT_JS_EQ(page, "window.scrollY", "0");
+ EXPECT_JS_EQ(page, "window.scrollTo(0,200)", "undefined");
+ EXPECT_JS_EQ(page, "window.scrollY", "0");
+
+ WKPageSetScrollPinningBehavior(page, kWKScrollPinningBehaviorDoNotPin);
+
+ EXPECT_JS_EQ(page, "window.scrollY", "0");
+ EXPECT_JS_EQ(page, "window.scrollTo(0,200)", "undefined");
+ EXPECT_JS_EQ(page, "window.scrollY", "200");
+
+ testDone = true;
+}
+
+TEST(WebKit2, ScrollPinningBehaviors)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+ loaderClient.version = kWKPageLoaderClientCurrentVersion;
+ loaderClient.didFinishDocumentLoadForFrame = didFinishDocumentLoadForFrame;
+ loaderClient.clientInfo = &webView;
+
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("simple-tall", "html")).get());
+
+ Util::run(&testDone);
+ EXPECT_TRUE(testDone);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp
new file mode 100644
index 000000000..c666bf687
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/SeccompFilters.cpp
@@ -0,0 +1,441 @@
+/*
+ * Copyright (C) 2013 Intel Corporation. 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+
+#include <WebKit2/SeccompBroker.h>
+#include <WebKit2/SeccompFilters.h>
+#include <WebKit2/SyscallPolicy.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <pthread.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
+using namespace WebKit;
+
+namespace TestWebKitAPI {
+
+DEFINE_STATIC_LOCAL(String, rootDir, (ASCIILiteral("/")));
+DEFINE_STATIC_LOCAL(String, homeDir, (String(getenv("HOME"))));
+DEFINE_STATIC_LOCAL(String, usrDir, (ASCIILiteral("/usr")));
+DEFINE_STATIC_LOCAL(String, usrSbinDir, (ASCIILiteral("/usr/sbin")));
+DEFINE_STATIC_LOCAL(String, testDirRead, (ASCIILiteral("/tmp/WebKitSeccompFilters/testRead")));
+DEFINE_STATIC_LOCAL(String, testDirWrite, (ASCIILiteral("/tmp/WebKitSeccompFilters/testWrite")));
+DEFINE_STATIC_LOCAL(String, testDirReadAndWrite, (ASCIILiteral("/tmp/WebKitSeccompFilters/testReadAndWrite")));
+DEFINE_STATIC_LOCAL(String, testDirNotAllowed, (ASCIILiteral("/tmp/WebKitSeccompFilters/testNotAllowed")));
+DEFINE_STATIC_LOCAL(String, testFileNotAllowed, (testDirReadAndWrite + "/testFilePolicy"));
+DEFINE_STATIC_LOCAL(String, testFileReadAndWrite, (testDirNotAllowed + "/testFilePolicy"));
+
+static const mode_t defaultMode = S_IRUSR | S_IWUSR | S_IXUSR;
+
+class SeccompEnvironment : public testing::Environment {
+public:
+ virtual void SetUp()
+ {
+ ASSERT_TRUE(!homeDir.isEmpty());
+
+ mkdir("/tmp/WebKitSeccompFilters", defaultMode);
+ mkdir(testDirRead.utf8().data(), defaultMode);
+ mkdir(testDirWrite.utf8().data(), defaultMode);
+ mkdir(testDirReadAndWrite.utf8().data(), defaultMode);
+ mkdir(testDirNotAllowed.utf8().data(), defaultMode);
+
+ // Create a file for the Read only and NotAllowed directory before
+ // loading the filters.
+ String file = testDirRead + "/testFile";
+ int fd = open(file.utf8().data(), O_RDWR | O_CREAT, defaultMode);
+ ASSERT_NE(close(fd), -1);
+ file = testDirNotAllowed + "/testFile";
+ fd = open(file.utf8().data(), O_RDWR | O_CREAT, defaultMode);
+ ASSERT_NE(close(fd), -1);
+
+ // Create files for the file policy tests. File policies precedes the
+ // directory policy. In this case, we create a file with read and write
+ // policies inside a directory that is not allowed, and vice versa.
+ fd = open(testFileNotAllowed.utf8().data(), O_RDWR | O_CREAT, defaultMode);
+ ASSERT_NE(close(fd), -1);
+ fd = open(testFileReadAndWrite.utf8().data(), O_RDWR | O_CREAT, defaultMode);
+ ASSERT_NE(close(fd), -1);
+
+ SyscallPolicy policy;
+ policy.addDirectoryPermission(rootDir, SyscallPolicy::NotAllowed);
+ policy.addDirectoryPermission(usrDir, SyscallPolicy::Read);
+ policy.addDirectoryPermission(usrSbinDir, SyscallPolicy::NotAllowed);
+ policy.addDirectoryPermission(testDirRead, SyscallPolicy::Read);
+ policy.addDirectoryPermission(testDirWrite, SyscallPolicy::Write);
+ policy.addDirectoryPermission(testDirReadAndWrite, SyscallPolicy::ReadAndWrite);
+ policy.addDirectoryPermission(testDirNotAllowed, SyscallPolicy::NotAllowed);
+ policy.addFilePermission(testFileNotAllowed, SyscallPolicy::NotAllowed);
+ policy.addFilePermission(testFileReadAndWrite, SyscallPolicy::ReadAndWrite);
+
+ SeccompFilters seccompFilters(SeccompFilters::Allow);
+ seccompFilters.addRule("open", SeccompFilters::Trap);
+ seccompFilters.addRule("openat", SeccompFilters::Trap);
+ seccompFilters.addRule("creat", SeccompFilters::Trap);
+
+ SeccompBroker::launchProcess(&seccompFilters, policy);
+ seccompFilters.initialize();
+ }
+
+ virtual void TearDown()
+ {
+ // This will have to move to a separated process created before loading
+ // the filters when we put the rmdir/unlink policies in place.
+ unlink("/tmp/WebKitSeccompFilters/testNotAllowed/testFile");
+ unlink("/tmp/WebKitSeccompFilters/testNotAllowed/testFilePolicy");
+ unlink("/tmp/WebKitSeccompFilters/testReadAndWrite/testFile");
+ unlink("/tmp/WebKitSeccompFilters/testReadAndWrite/testFile2");
+ unlink("/tmp/WebKitSeccompFilters/testReadAndWrite/testFile3");
+ unlink("/tmp/WebKitSeccompFilters/testReadAndWrite/testFilePolicy");
+ unlink("/tmp/WebKitSeccompFilters/testWrite/testFile");
+ unlink("/tmp/WebKitSeccompFilters/testWrite/testFile2");
+ unlink("/tmp/WebKitSeccompFilters/testRead/testFile");
+ rmdir("/tmp/WebKitSeccompFilters/testNotAllowed");
+ rmdir("/tmp/WebKitSeccompFilters/testReadAndWrite");
+ rmdir("/tmp/WebKitSeccompFilters/testWrite");
+ rmdir("/tmp/WebKitSeccompFilters/testRead");
+ rmdir("/tmp/WebKitSeccompFilters");
+ }
+};
+
+::testing::Environment* const env = ::testing::AddGlobalTestEnvironment(new SeccompEnvironment);
+
+static void dummyHandler(int, siginfo_t*, void*)
+{
+}
+
+TEST(WebKit2, sigaction)
+{
+ // Setting a handler should be enough to break any subsequent test if
+ // not silently ignored by the sandbox.
+ struct sigaction action;
+ memset(&action, 0, sizeof(action));
+ action.sa_sigaction = &dummyHandler;
+ action.sa_flags = SA_SIGINFO;
+
+ ASSERT_NE(sigaction(SIGSYS, &action, 0), -1);
+}
+
+TEST(WebKit2, sigprocmask)
+{
+ // We test here the mechanism installed to prevent SIGSYS to be blocked. Any
+ // attemp to add SIGSYS to the set of blocked signals will be silently
+ // ignored (but other signals will be blocked just fine).
+ sigset_t set, oldSet;
+ sigemptyset(&set);
+ sigaddset(&set, SIGSYS);
+ sigaddset(&set, SIGUSR1);
+
+ ASSERT_NE(sigprocmask(SIG_BLOCK, &set, 0), -1);
+ ASSERT_NE(sigprocmask(SIG_BLOCK, 0, &oldSet), -1);
+ ASSERT_FALSE(sigismember(&oldSet, SIGSYS)) << "SIGSYS should not be blocked.";
+ ASSERT_TRUE(sigismember(&oldSet, SIGUSR1)) << "Other signals should be blocked normally.";
+
+ sigemptyset(&set);
+ sigaddset(&set, SIGSYS);
+ sigaddset(&set, SIGUSR2);
+
+ ASSERT_NE(sigprocmask(SIG_SETMASK, &set, &oldSet), -1);
+ ASSERT_NE(sigprocmask(SIG_SETMASK, 0, &set), -1);
+ ASSERT_FALSE(sigismember(&set, SIGSYS)) << "SIGSYS should not be blocked.";
+ ASSERT_TRUE(sigismember(&set, SIGUSR2)) << "Other signals should be blocked normally.";
+ ASSERT_FALSE(sigismember(&oldSet, SIGUSR2));
+
+ ASSERT_NE(sigprocmask(SIG_SETMASK, &oldSet, 0), -1) << "Should restore the old signal set just fine.";
+ ASSERT_NE(sigprocmask(SIG_SETMASK, 0, &set), -1);
+ ASSERT_FALSE(sigismember(&set, SIGUSR2)) << "The restored set doesn't have SIGUSR2.";
+}
+
+TEST(WebKit2, open)
+{
+ // Read only directory.
+ String file = testDirRead + "/testFile";
+ int fd = open(file.utf8().data(), O_RDWR);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_RDONLY | O_CREAT, defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ file = testDirRead + "/ThisFileDoesNotExist";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == ENOENT) << "Should return ENOENT when trying " \
+ "to open a file that does not exit and the permissions are OK.";
+
+ fd = open(file.utf8().data(), O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES) << "Should return EACCES when trying " \
+ "to open a file that does not exit and the permissions are not OK.";
+
+ // Write only directory.
+ file = testDirWrite + "/testFile";
+ fd = open(file.utf8().data(), O_WRONLY | O_CREAT, defaultMode);
+ ASSERT_NE(fd, -1);
+ close(fd);
+
+ fd = open(file.utf8().data(), O_RDWR);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_WRONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ // Read an write directory.
+ file = testDirReadAndWrite + "/testFile";
+ fd = open(file.utf8().data(), O_WRONLY | O_CREAT, defaultMode);
+ ASSERT_NE(fd, -1);
+ close(fd);
+
+ fd = open(file.utf8().data(), O_RDWR);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = open(file.utf8().data(), O_WRONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ // NotAllowed directory.
+ file = testDirNotAllowed + "/testFile";
+ fd = open(file.utf8().data(), O_WRONLY | O_CREAT, defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_RDWR);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(file.utf8().data(), O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+
+ // The /usr directory here has read permissions, so it's subdirectories
+ // should resolve to the /usr permissions unless explicitly specified.
+ file = usrDir + "/bin/basename";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_NE(fd, -1) << "Subdirectories should with no policy should " \
+ "inherit the parent's policies.";
+ close(fd);
+
+ file = usrSbinDir + "/adduser";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES) << "This directory should have " \
+ "its own policy instead of the parent's.";
+
+ // Access to the rest of the files system is blocked and should
+ // never return anything else other than EACCES regardless if the
+ // file exists or not. The reason is because it will fallback to the
+ // policy of the Root directory, marked as NotAllowed.
+ file = homeDir + "/testFile";
+ fd = open(file.utf8().data(), O_RDWR | O_CREAT, defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open("/etc/passwd", O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ file = testDirReadAndWrite + "/../../../etc/passwd";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ file = testDirReadAndWrite + "/../../.." + testDirReadAndWrite + "/../../../etc/passwd";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ // Here we test file policies. The have precedence over directory policies.
+ // The file bellow lives inside a directory with ReadAndWrite policy.
+ fd = open(testFileNotAllowed.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(testFileNotAllowed.utf8().data(), O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open(testFileNotAllowed.utf8().data(), O_RDWR);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ file = testDirReadAndWrite + "/../../.." + testDirReadAndWrite + "/testFilePolicy";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ // The next file is located inside a directory marked as NotAllowed, but
+ // it has its own file policy that precedes the directory policy.
+ fd = open(testFileReadAndWrite.utf8().data(), O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = open(testFileReadAndWrite.utf8().data(), O_WRONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = open(testFileReadAndWrite.utf8().data(), O_RDWR);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ file = testDirReadAndWrite + "/../../.." + testDirNotAllowed + "/testFilePolicy";
+ fd = open(file.utf8().data(), O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+}
+
+TEST(WebKit2, creat)
+{
+ // Read only directory.
+ String file = testDirRead + "/testFile2";
+ int fd = creat(file.utf8().data(), defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ // Write only directory.
+ file = testDirWrite + "/testFile2";
+ fd = creat(file.utf8().data(), defaultMode);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ // Read an write directory.
+ file = testDirReadAndWrite + "/testFile2";
+ fd = creat(file.utf8().data(), defaultMode);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ // NotAllowed directory.
+ file = testDirNotAllowed + "/testFile2";
+ fd = creat(file.utf8().data(), defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+}
+
+TEST(WebKit2, openat)
+{
+ int dirFd = open(testDirReadAndWrite.utf8().data(), O_RDONLY);
+ ASSERT_NE(dirFd, -1);
+
+ int fd = openat(dirFd, "testFile3", O_RDWR | O_CREAT, defaultMode);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = openat(dirFd, "testFile3", O_RDWR);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = openat(dirFd, "testFile3", O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = openat(dirFd, "testFile3", O_WRONLY);
+ EXPECT_NE(fd, -1);
+
+ fd = openat(fd, "testFile3", O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == ENOTDIR) << "Should return ENOTDIR when the fd is a file.";
+ close(fd);
+
+ String file = "../../.." + testDirReadAndWrite + "/testFile3";
+ fd = openat(dirFd, file.utf8().data(), O_WRONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ file = "../../.." + testDirRead + "/testFile3";
+ fd = openat(dirFd, file.utf8().data(), O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ file = testDirReadAndWrite + "/testFile3";
+ fd = openat(-1, file.utf8().data(), O_WRONLY);
+ EXPECT_NE(fd, -1) << "Directory fd should be ignored when the path is absolute.";
+ close(fd);
+
+ fd = openat(-1, "testFile3", O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EBADF) << "Should return EBADF when the fd is invalid.";
+ close(dirFd);
+
+ dirFd = open(testDirNotAllowed.utf8().data(), O_RDONLY);
+ EXPECT_TRUE(dirFd == -1 && errno == EACCES);
+
+ dirFd = open(testDirRead.utf8().data(), O_RDONLY);
+ ASSERT_NE(dirFd, -1);
+
+ fd = openat(dirFd, "testFile2", O_RDONLY | O_CREAT, defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = openat(dirFd, "testFile", O_WRONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+ close(dirFd);
+}
+
+static void* stressTest(void*)
+{
+ for (int i = 0; i < 500; ++i) {
+ int fd = open("/tmp/WebKitSeccompFilters/testRead/testFile", O_RDWR);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = open("/tmp/WebKitSeccompFilters/testRead/testFile", O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+
+ fd = open("/tmp/WebKitSeccompFilters/testNotAllowed/testFile", O_RDONLY);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ fd = creat("/tmp/WebKitSeccompFilters/testNotAllowed/SholdNotBeAllowed", defaultMode);
+ EXPECT_TRUE(fd == -1 && errno == EACCES);
+
+ int dirFd = open("/tmp/WebKitSeccompFilters/testRead", O_RDONLY);
+ EXPECT_NE(dirFd, -1);
+
+ fd = openat(dirFd, "testFile", O_RDONLY);
+ EXPECT_NE(fd, -1);
+ close(fd);
+ close(dirFd);
+ }
+
+ return 0;
+}
+
+TEST(WebKit2, threading)
+{
+ // Tests if concurrent syscall execution works fine. It can be
+ // also used for performance testing and leak detection. The test
+ // is disabled on Debug mode because it can be way too verbose.
+ pthread_t threads[5];
+
+ for (int i = 0; i < sizeof(threads) / sizeof(pthread_t); ++i)
+ pthread_create(&threads[i], 0, stressTest, 0);
+
+ for (int i = 0; i < sizeof(threads) / sizeof(pthread_t); ++i)
+ pthread_join(threads[i], 0);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp
index c13a5eb49..c6f3b1bac 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/ShouldGoToBackForwardListItem.cpp
@@ -38,7 +38,7 @@ static bool receivedProperBackForwardCallbacks = false;
static void didFinishLoadForFrame(WKPageRef, WKFrameRef frame, WKTypeRef, const void*)
{
// Only mark finished when the main frame loads
- if (WKFrameGetParentFrame(frame))
+ if (!WKFrameIsMainFrame(frame))
return;
finished = true;
diff --git a/Tools/MiniBrowser/win/BrowserWindow.h b/Tools/TestWebKitAPI/Tests/WebKit2/TerminateTwice.cpp
index 1cf73503f..780ce522f 100644
--- a/Tools/MiniBrowser/win/BrowserWindow.h
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/TerminateTwice.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,48 +23,43 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef BrowserWindow_h
-#define BrowserWindow_h
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
-#include "BrowserView.h"
-#include <string>
+namespace TestWebKitAPI {
-class BrowserWindow {
-public:
- static BrowserWindow* create()
- {
- return new BrowserWindow;
- }
+static bool loaded;
- void createWindow(int x, int y, int width, int height);
- void showWindow();
+static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ loaded = true;
+}
- void goToURL(const std::wstring& url);
+TEST(WebKit2, TerminateTwice)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ PlatformWebView webView(context.get());
- bool handleMessage(const MSG*);
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
- const BrowserView& view() const { return m_browserView; }
- HWND window() const { return m_window; }
+ loaderClient.version = 0;
+ loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
-private:
- BrowserWindow();
+ WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("simple", "html"));
+ WKPageLoadURL(webView.page(), url.get());
- static LRESULT CALLBACK BrowserWindowWndProc(HWND, UINT, WPARAM, LPARAM);
+ Util::run(&loaded);
+ WKPageTerminate(webView.page());
- // Message handlers.
- LRESULT wndProc(HWND, UINT, WPARAM, LPARAM);
- void onCreate(LPCREATESTRUCT);
- void onDestroy();
- void onNCDestroy();
+ // Reloading will start relaunching the process.
+ WKPageReload(webView.page());
- void onSize(int width, int height);
- LRESULT onCommand(int commandID, bool& handled);
+ // And now we terminate the page before the process launch is complete.
+ WKPageTerminate(webView.page());
+}
- HWND m_window;
+} // namespace TestWebKitAPI
- HWND m_rebarWindow;
- HWND m_comboBoxWindow;
- BrowserView m_browserView;
-};
-
-#endif // BrowserWindow_h
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/WebArchive.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/WebArchive.cpp
index 7dea31554..0e6b985fb 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/WebArchive.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/WebArchive.cpp
@@ -48,8 +48,8 @@ static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messag
// Do basic sanity checks on the returned webarchive. We have more thorough checks in LayoutTests.
size_t size = WKDataGetSize(receivedData);
const unsigned char* bytes = WKDataGetBytes(receivedData);
- RetainPtr<CFDataRef> data(AdoptCF, CFDataCreate(0, bytes, size));
- RetainPtr<CFPropertyListRef> propertyList(AdoptCF, CFPropertyListCreateWithData(0, data.get(), kCFPropertyListImmutable, 0, 0));
+ RetainPtr<CFDataRef> data = adoptCF(CFDataCreate(0, bytes, size));
+ RetainPtr<CFPropertyListRef> propertyList = adoptCF(CFPropertyListCreateWithData(0, data.get(), kCFPropertyListImmutable, 0, 0));
EXPECT_TRUE(propertyList);
// It should be a dictionary.
@@ -78,7 +78,7 @@ static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messag
EXPECT_TRUE(resourceData);
EXPECT_EQ(CFDataGetTypeID(), CFGetTypeID(resourceData));
- RetainPtr<CFStringRef> stringData(AdoptCF, CFStringCreateFromExternalRepresentation(0, (CFDataRef)resourceData, kCFStringEncodingUTF8));
+ RetainPtr<CFStringRef> stringData = adoptCF(CFStringCreateFromExternalRepresentation(0, (CFDataRef)resourceData, kCFStringEncodingUTF8));
EXPECT_TRUE(stringData);
// It should contain the string "Simple HTML file." in it.
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/WebKit2.pro b/Tools/TestWebKitAPI/Tests/WebKit2/WebKit2.pro
new file mode 100644
index 000000000..4a93643fc
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/WebKit2.pro
@@ -0,0 +1,63 @@
+TEMPLATE = app
+TARGET = tst_webkit2
+
+SOURCES += \
+ AboutBlankLoad.cpp \
+ DocumentStartUserScriptAlertCrash.cpp \
+ DOMWindowExtensionBasic.cpp \
+ DOMWindowExtensionNoCache.cpp \
+ DocumentStartUserScriptAlertCrash.cpp \
+ EvaluateJavaScript.cpp \
+ FailedLoad.cpp \
+ Find.cpp \
+ FrameMIMETypeHTML.cpp \
+ FrameMIMETypePNG.cpp \
+ GetInjectedBundleInitializationUserDataCallback.cpp \
+ HitTestResultNodeHandle.cpp \
+ InjectedBundleBasic.cpp \
+ InjectedBundleFrameHitTest.cpp \
+ InjectedBundleInitializationUserDataCallbackWins.cpp \
+ LoadAlternateHTMLStringWithNonDirectoryURL.cpp \
+ LoadCanceledNoServerRedirectCallback.cpp \
+ LoadPageOnCrash.cpp \
+ MouseMoveAfterCrash.cpp \
+ PageLoadBasic.cpp \
+ PageLoadDidChangeLocationWithinPageForFrame.cpp \
+ PageVisibilityState.cpp \
+ ParentFrame.cpp \
+ PreventEmptyUserAgent.cpp \
+ PrivateBrowsingPushStateNoHistoryCallback.cpp \
+ ReloadPageAfterCrash.cpp \
+ ResizeWindowAfterCrash.cpp \
+ ResponsivenessTimerDoesntFireEarly.cpp \
+ TerminateTwice.cpp \
+ UserMessage.cpp \
+ WillSendSubmitEvent.cpp \
+ WKConnection.cpp \
+ WKString.cpp \
+ WKStringJSString.cpp \
+ WKURL.cpp
+
+FAILING_SOURCES = \
+ CanHandleRequest.cpp \
+
+FAILING_SOURCES += ShouldGoToBackForwardListItem.cpp # Only stalls in flickable mode.
+FAILING_SOURCES += SpacebarScrolling.cpp # Only fails in flickable mode.
+
+SOURCES += $$FAILING_SOURCES
+
+# Tests skipped because they crash, stall or do not compile.
+SKIPPED_SOURCES = \
+ CookieManager.cpp \
+ DownloadDecideDestinationCrash.cpp \
+ ForceRepaint.cpp \
+ NewFirstVisuallyNonEmptyLayout.cpp \
+ NewFirstVisuallyNonEmptyLayoutFails.cpp \
+ NewFirstVisuallyNonEmptyLayoutForImages.cpp \
+ NewFirstVisuallyNonEmptyLayoutFrames.cpp \
+ RestoreSessionStateContainingFormData.cpp \
+ WebCoreStatisticsWithNoWebProcess.cpp
+
+include(../../TestWebKitAPI.pri)
+
+DEFINES += APITEST_SOURCE_DIR=\\\"$$PWD\\\"
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad.cpp
new file mode 100644
index 000000000..beeb8007f
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad.cpp
@@ -0,0 +1,240 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "Test.h"
+
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace TestWebKitAPI {
+
+class WebKit2WillLoadTest : public ::testing::Test {
+public:
+ WebKit2WillLoadTest()
+ : didReceiveMessage(false)
+ {
+ }
+
+ WKRetainPtr<WKContextRef> context;
+ OwnPtr<PlatformWebView> webView;
+
+ WKRetainPtr<WKStringRef> messageName;
+ WKRetainPtr<WKTypeRef> messageBody;
+ bool didReceiveMessage;
+
+ static void didReceiveMessageFromInjectedBundle(WKContextRef, WKStringRef messageName, WKTypeRef messageBody, const void* clientInfo)
+ {
+ ((WebKit2WillLoadTest*)clientInfo)->messageName = messageName;
+ ((WebKit2WillLoadTest*)clientInfo)->messageBody = messageBody;
+ ((WebKit2WillLoadTest*)clientInfo)->didReceiveMessage = true;
+ }
+
+ static void setInjectedBundleClient(WKContextRef context, const void* clientInfo)
+ {
+ WKContextInjectedBundleClient injectedBundleClient;
+ memset(&injectedBundleClient, 0, sizeof(injectedBundleClient));
+ injectedBundleClient.version = kWKContextInjectedBundleClientCurrentVersion;
+ injectedBundleClient.clientInfo = clientInfo;
+ injectedBundleClient.didReceiveMessageFromInjectedBundle = didReceiveMessageFromInjectedBundle;
+
+ WKContextSetInjectedBundleClient(context, &injectedBundleClient);
+ }
+
+ virtual void SetUp()
+ {
+ context = adoptWK(Util::createContextForInjectedBundleTest("WillLoadTest"));
+ setInjectedBundleClient(context.get(), this);
+
+ webView = adoptPtr(new PlatformWebView(context.get()));
+
+ didReceiveMessage = false;
+ }
+
+ void testWillLoadURLRequestReturnValues(WKURLRef expectedURL, WKStringRef expectedUserDataString)
+ {
+ didReceiveMessage = false;
+ Util::run(&didReceiveMessage);
+
+ EXPECT_WK_STREQ("WillLoadURLRequestReturn", messageName.get());
+
+ EXPECT_EQ(WKDictionaryGetTypeID(), WKGetTypeID(messageBody.get()));
+ WKDictionaryRef dictionary = static_cast<WKDictionaryRef>(messageBody.get());
+
+ if (expectedUserDataString) {
+ WKStringRef userDataReturnValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("UserDataReturn").get()));
+ EXPECT_WK_STREQ(expectedUserDataString, userDataReturnValue);
+ } else
+ EXPECT_NULL(WKDictionaryGetItemForKey(dictionary, Util::toWK("UserDataReturn").get()));
+
+ WKURLRequestRef urlRequestReturnValue = static_cast<WKURLRequestRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("URLRequestReturn").get()));
+ WKRetainPtr<WKURLRef> urlReturnValue = adoptWK(WKURLRequestCopyURL(urlRequestReturnValue));
+ EXPECT_TRUE(WKURLIsEqual(expectedURL, urlReturnValue.get()));
+ }
+
+ void testWillLoadDataRequestReturnValues(WKURLRef expectedURL, WKStringRef expectedMIMEType, WKStringRef expectedEncodingName, WKURLRef expectedUnreachableURL, WKStringRef expectedUserDataString)
+ {
+ didReceiveMessage = false;
+ Util::run(&didReceiveMessage);
+
+ EXPECT_WK_STREQ("WillLoadDataRequestReturn", messageName.get());
+
+ EXPECT_EQ(WKDictionaryGetTypeID(), WKGetTypeID(messageBody.get()));
+ WKDictionaryRef dictionary = static_cast<WKDictionaryRef>(messageBody.get());
+
+ if (expectedUserDataString) {
+ WKStringRef userDataReturnValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("UserDataReturn").get()));
+ EXPECT_WK_STREQ(expectedUserDataString, userDataReturnValue);
+ } else
+ EXPECT_NULL(WKDictionaryGetItemForKey(dictionary, Util::toWK("UserDataReturn").get()));
+
+ WKURLRequestRef urlRequestReturnValue = static_cast<WKURLRequestRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("URLRequestReturn").get()));
+ WKRetainPtr<WKURLRef> urlReturnValue = adoptWK(WKURLRequestCopyURL(urlRequestReturnValue));
+ EXPECT_TRUE(WKURLIsEqual(expectedURL, urlReturnValue.get()));
+
+ WKStringRef MIMEType = static_cast<WKStringRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("MIMETypeReturn").get()));
+ EXPECT_WK_STREQ(expectedMIMEType, MIMEType);
+
+ WKStringRef encodingName = static_cast<WKStringRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("EncodingNameReturn").get()));
+ EXPECT_WK_STREQ(expectedEncodingName, encodingName);
+
+ if (expectedUnreachableURL) {
+ WKURLRef unreachableURL = static_cast<WKURLRef>(WKDictionaryGetItemForKey(dictionary, Util::toWK("UnreachableURLReturn").get()));
+ EXPECT_TRUE(WKURLIsEqual(expectedUnreachableURL, unreachableURL));
+ } else
+ EXPECT_NULL(WKDictionaryGetItemForKey(dictionary, Util::toWK("UnreachableURLReturn").get()));
+ }
+};
+
+// URL Request tests
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadURLWithUserData)
+{
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKStringRef> userData = Util::toWK("WKPageLoadURLWithUserData UserData");
+ WKPageLoadURLWithUserData(webView->page(), url.get(), userData.get());
+
+ testWillLoadURLRequestReturnValues(url.get(), userData.get());
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadURL)
+{
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKPageLoadURL(webView->page(), url.get());
+
+ testWillLoadURLRequestReturnValues(url.get(), 0);
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadURLRequestWithUserData)
+{
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKURLRequestRef> urlRequest = adoptWK(WKURLRequestCreateWithWKURL(url.get()));
+ WKRetainPtr<WKStringRef> userData = Util::toWK("WKPageLoadURLRequestWithUserData UserData");
+ WKPageLoadURLRequestWithUserData(webView->page(), urlRequest.get(), userData.get());
+
+ testWillLoadURLRequestReturnValues(url.get(), userData.get());
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadURLRequest)
+{
+ WKRetainPtr<WKURLRef> url = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKURLRequestRef> urlRequest = adoptWK(WKURLRequestCreateWithWKURL(url.get()));
+ WKPageLoadURLRequest(webView->page(), urlRequest.get());
+
+ testWillLoadURLRequestReturnValues(url.get(), 0);
+}
+
+// Data Request tests
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadHTMLStringWithUserData)
+{
+ WKRetainPtr<WKURLRef> baseURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKStringRef> userData = Util::toWK("WKPageLoadHTMLStringWithUserData UserData");
+ WKRetainPtr<WKStringRef> htmlString = Util::toWK("<body>Hello, World</body>");
+
+ WKPageLoadHTMLStringWithUserData(webView->page(), htmlString.get(), baseURL.get(), userData.get());
+
+ testWillLoadDataRequestReturnValues(baseURL.get(), Util::toWK("text/html").get(), Util::toWK("utf-16").get(), 0, userData.get());
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadHTMLString)
+{
+ WKRetainPtr<WKURLRef> baseURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKStringRef> htmlString = Util::toWK("<body>Hello, World</body>");
+
+ WKPageLoadHTMLString(webView->page(), htmlString.get(), baseURL.get());
+
+ testWillLoadDataRequestReturnValues(baseURL.get(), Util::toWK("text/html").get(), Util::toWK("utf-16").get(), 0, 0);
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadAlternateHTMLStringWithUserData)
+{
+ WKRetainPtr<WKStringRef> htmlString = Util::toWK("<body>Hello, World</body>");
+
+ WKRetainPtr<WKURLRef> baseURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKURLRef> unreachableURL = adoptWK(WKURLCreateWithUTF8CString("about:other"));
+ WKRetainPtr<WKStringRef> userData = Util::toWK("WKPageLoadAlternateHTMLStringWithUserData UserData");
+
+ WKPageLoadAlternateHTMLStringWithUserData(webView->page(), htmlString.get(), baseURL.get(), unreachableURL.get(), userData.get());
+
+ testWillLoadDataRequestReturnValues(baseURL.get(), Util::toWK("text/html").get(), Util::toWK("utf-16").get(), unreachableURL.get(), userData.get());
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadAlternateHTMLString)
+{
+ WKRetainPtr<WKStringRef> htmlString = Util::toWK("<body>Hello, World</body>");
+
+ WKRetainPtr<WKURLRef> baseURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ WKRetainPtr<WKURLRef> unreachableURL = adoptWK(WKURLCreateWithUTF8CString("about:other"));
+
+ WKPageLoadAlternateHTMLString(webView->page(), htmlString.get(), baseURL.get(), unreachableURL.get());
+
+ testWillLoadDataRequestReturnValues(baseURL.get(), Util::toWK("text/html").get(), Util::toWK("utf-16").get(), unreachableURL.get(), 0);
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadPlainTextStringWithUserData)
+{
+ WKRetainPtr<WKStringRef> plaintTextString = Util::toWK("Hello, World");
+ WKRetainPtr<WKStringRef> userData = Util::toWK("WKPageLoadPlainTextStringWithUserData UserData");
+
+ WKPageLoadPlainTextStringWithUserData(webView->page(), plaintTextString.get(), userData.get());
+
+ WKRetainPtr<WKURLRef> blankURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ testWillLoadDataRequestReturnValues(blankURL.get(), Util::toWK("text/plain").get(), Util::toWK("utf-16").get(), 0, userData.get());
+}
+
+TEST_F(WebKit2WillLoadTest, WKPageLoadPlainTextString)
+{
+ WKRetainPtr<WKStringRef> plaintTextString = Util::toWK("Hello, World");
+
+ WKPageLoadPlainTextString(webView->page(), plaintTextString.get());
+
+ WKRetainPtr<WKURLRef> blankURL = adoptWK(WKURLCreateWithUTF8CString("about:blank"));
+ testWillLoadDataRequestReturnValues(blankURL.get(), Util::toWK("text/plain").get(), Util::toWK("utf-16").get(), 0, 0);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp
new file mode 100644
index 000000000..039349bd5
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/WillLoad_Bundle.cpp
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "InjectedBundleTest.h"
+
+#include "PlatformUtilities.h"
+#include <WebKit2/WKBundlePage.h>
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+class WillLoadTest : public InjectedBundleTest {
+public:
+ WillLoadTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+ {
+ }
+
+private:
+ static void willLoadURLRequest(WKBundlePageRef page, WKURLRequestRef request, WKTypeRef userData, const void *clientInfo)
+ {
+ WKRetainPtr<WKMutableDictionaryRef> messageBody = adoptWK(WKMutableDictionaryCreate());
+
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("URLRequestReturn").get(), request);
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("UserDataReturn").get(), userData);
+
+ WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("WillLoadURLRequestReturn").get(), messageBody.get());
+ }
+
+ static void willLoadDataRequest(WKBundlePageRef page, WKURLRequestRef request, WKDataRef data, WKStringRef MIMEType, WKStringRef encodingName, WKURLRef unreachableURL, WKTypeRef userData, const void *clientInfo)
+ {
+ WKRetainPtr<WKMutableDictionaryRef> messageBody = adoptWK(WKMutableDictionaryCreate());
+
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("URLRequestReturn").get(), request);
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("DataReturn").get(), data);
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("MIMETypeReturn").get(), MIMEType);
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("EncodingNameReturn").get(), encodingName);
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("UnreachableURLReturn").get(), unreachableURL);
+ WKDictionaryAddItem(messageBody.get(), Util::toWK("UserDataReturn").get(), userData);
+
+ WKBundlePostMessage(InjectedBundleController::shared().bundle(), Util::toWK("WillLoadDataRequestReturn").get(), messageBody.get());
+
+ }
+
+ virtual void didCreatePage(WKBundleRef, WKBundlePageRef bundlePage) OVERRIDE
+ {
+ WKBundlePageLoaderClient pageLoaderClient;
+ memset(&pageLoaderClient, 0, sizeof(pageLoaderClient));
+
+ pageLoaderClient.version = 6;
+ pageLoaderClient.clientInfo = this;
+ pageLoaderClient.willLoadURLRequest = willLoadURLRequest;
+ pageLoaderClient.willLoadDataRequest = willLoadDataRequest;
+
+ WKBundlePageSetPageLoaderClient(bundlePage, &pageLoaderClient);
+ }
+};
+
+static InjectedBundleTest::Register<WillLoadTest> registrar("WillLoadTest");
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/associate-form-controls.html b/Tools/TestWebKitAPI/Tests/WebKit2/associate-form-controls.html
new file mode 100644
index 000000000..906246a54
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/associate-form-controls.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+ <script>
+ function addForm()
+ {
+ var form = document.createElement("form");
+ form.id = "login_form";
+
+ var usernameField = document.createElement("input");
+ usernameField.id = "username";
+ usernameField.type = "text";
+ form.appendChild(usernameField);
+
+ document.body.appendChild(form);
+ }
+
+ function addPasswordFieldToForm()
+ {
+ var passwordField = document.createElement("input");
+ passwordField.id = "password";
+ passwordField.type = "password";
+
+ var form = document.getElementById("login_form");
+ form.appendChild(passwordField);
+ }
+ </script>
+</head>
+<body onload="addForm()">
+<button onclick="addPasswordFieldToForm()">Manual Testing: Add the password field</button>
+</body>
+</html>
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/custom-protocol-sync-xhr.html b/Tools/TestWebKitAPI/Tests/WebKit2/custom-protocol-sync-xhr.html
new file mode 100644
index 000000000..8a98f33e9
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/custom-protocol-sync-xhr.html
@@ -0,0 +1,6 @@
+<script>
+ var request = new XMLHttpRequest();
+ request.open('GET', 'test://test', false);
+ request.send(null);
+ window._testResult = request.responseText;
+</script> \ No newline at end of file
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp
new file mode 100644
index 000000000..552b38c4d
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 2013 Intel Corporation. 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 THE COPYRIGHT HOLDERS ``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 HOLDERS 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.
+ */
+
+#include "config.h"
+#include "ewk_view_private.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include "Test.h"
+#include "WKView.h"
+#include <WebKit2/WKRetainPtr.h>
+
+namespace TestWebKitAPI {
+
+struct TestStatesData {
+ TestStatesData(WKViewRef view, WKURLRef url)
+ : view(view)
+ , url(url)
+ , didFinishLoad(false)
+ , didCrash(false)
+ , didRelaunch(false)
+ {
+ }
+
+ WKViewRef view;
+ WKURLRef url;
+ bool didFinishLoad;
+ bool didCrash;
+ bool didRelaunch;
+};
+
+static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void* clientInfo)
+{
+ TestStatesData* states = const_cast<TestStatesData*>(static_cast<const TestStatesData*>(clientInfo));
+ states->didFinishLoad = true;
+}
+
+static void setPageLoaderClient(WKPageRef page, const void* clientInfo)
+{
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+
+ loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+ loaderClient.clientInfo = clientInfo;
+
+ WKPageSetPageLoaderClient(page, &loaderClient);
+}
+
+void webProcessCrashed(WKViewRef view, WKURLRef url, const void* clientInfo)
+{
+ TestStatesData* states = const_cast<TestStatesData*>(static_cast<const TestStatesData*>(clientInfo));
+
+ EXPECT_EQ(states->view, view);
+ EXPECT_TRUE(WKURLIsEqual(url, states->url));
+
+ states->didCrash = true;
+}
+
+void webProcessDidRelaunch(WKViewRef view, const void* clientInfo)
+{
+ TestStatesData* states = const_cast<TestStatesData*>(static_cast<const TestStatesData*>(clientInfo));
+
+ EXPECT_EQ(states->view, view);
+
+ states->didRelaunch = true;
+}
+
+static void setViewClient(WKViewRef view, const void* clientInfo)
+{
+ WKViewClient viewClient;
+ memset(&viewClient, 0, sizeof(WKViewClient));
+
+ viewClient.version = kWKViewClientCurrentVersion;
+ viewClient.clientInfo = clientInfo;
+ viewClient.webProcessCrashed = webProcessCrashed;
+ viewClient.webProcessDidRelaunch = webProcessDidRelaunch;
+
+ WKViewSetViewClient(view, &viewClient);
+}
+
+TEST(WebKit2, WKViewClientWebProcessCallbacks)
+{
+ WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("WKViewClientWebProcessCallbacksTest"));
+ WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("simple", "html"));
+
+ PlatformWebView view(context.get());
+ WKViewRef wkView = EWKViewGetWKView(view.platformView());
+
+ TestStatesData states = TestStatesData(wkView, url.get());
+
+ setPageLoaderClient(view.page(), &states);
+ setViewClient(wkView, &states);
+
+ WKPageLoadURL(view.page(), url.get());
+ Util::run(&states.didFinishLoad);
+
+ WKContextPostMessageToInjectedBundle(context.get(), Util::toWK("Crash").get(), 0);
+ Util::run(&states.didCrash);
+
+ WKPageReload(view.page());
+ Util::run(&states.didRelaunch);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/wx/browser/browser.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp
index 1383246f4..83a95c069 100644
--- a/Tools/wx/browser/browser.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp
@@ -1,7 +1,5 @@
/*
- * Copyright (C) 2007 Kevin Ollivier <kevino@theolliviers.com>
- *
- * All rights reserved.
+ * Copyright (C) 2013 Nokia Corporation and/or its subsidiary(-ies).
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -12,10 +10,10 @@
* 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 COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``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 COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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
@@ -24,49 +22,35 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-
-// webkit includes
-#include "WebBrowserShell.h"
-#include "WebSettings.h"
-#include "WebView.h"
-#include "wx/wxprec.h"
-#ifndef WX_PRECOMP
- #include "wx/wx.h"
-#endif
+#include "config.h"
+#include "InjectedBundleTest.h"
+#include <WebKit2/WKRetainPtr.h>
-using namespace WebKit;
+namespace TestWebKitAPI {
-class MyApp : public wxApp
-{
+class WKViewClientWebProcessCallbacksTest : public InjectedBundleTest {
public:
+ WKViewClientWebProcessCallbacksTest(const std::string& identifier);
- virtual bool OnInit();
+private:
+ virtual void didReceiveMessage(WKBundleRef, WKStringRef messageName, WKTypeRef messageBody);
};
+static InjectedBundleTest::Register<WKViewClientWebProcessCallbacksTest> registrar("WKViewClientWebProcessCallbacksTest");
-IMPLEMENT_APP(MyApp)
-
-bool MyApp::OnInit()
+WKViewClientWebProcessCallbacksTest::WKViewClientWebProcessCallbacksTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
{
- wxInitAllImageHandlers();
-
- // create the main application window
- // see WebKit/wx/WebFrame.cpp for how to write a shell around wxWebView.
- WebBrowserShell* frame = new WebBrowserShell(_T("wxWebKit Test App"), "http://www.webkit.org");
-
-#ifndef NDEBUG
- frame->ShowDebugMenu(true);
-#endif
+}
- WebSettings settings = frame->webview->GetWebSettings();
-#if __WXMSW__ || __WXMAC__
- settings.SetPluginsEnabled(true);
-#endif
- frame->webview->SetDatabasesEnabled(true);
- settings.SetEditableLinkBehavior(wxEditableLinkOnlyLiveWithShiftKey);
- frame->CentreOnScreen();
- frame->Show(true);
+void WKViewClientWebProcessCallbacksTest::didReceiveMessage(WKBundleRef, WKStringRef messageName, WKTypeRef)
+{
+ if (!WKStringIsEqualToUTF8CString(messageName, "Crash"))
+ return;
- return true;
+ // Simulating a crash
+ abort();
}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/execCopy.html b/Tools/TestWebKitAPI/Tests/WebKit2/execCopy.html
new file mode 100644
index 000000000..cf4608ebd
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/execCopy.html
@@ -0,0 +1,15 @@
+<html>
+<head>
+<script type="text/javascript">
+ function doCopy() {
+ document.execCommand("selectAll", true);
+ document.execCommand("copy");
+ }
+</script>
+</head>
+<body onLoad="doCopy()">
+ <div>Hello world.</div>
+ <div><b>Hello</b><i> world</i></div>
+ <div style="border: solid red 1px">Hello world</div>
+</body>
+</html>
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/findRanges.html b/Tools/TestWebKitAPI/Tests/WebKit2/findRanges.html
new file mode 100644
index 000000000..e10bbeb47
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/findRanges.html
@@ -0,0 +1,11 @@
+<html>
+<body>Test search. Hello world, Hello crazy world, Hello!</body>
+<script>
+ var s = window.getSelection();
+ var r = document.createRange();
+
+ r.setStart(document.body.firstChild, 38);
+ r.setEnd(document.body.firstChild, 43);
+ s.addRange(r);
+</script>
+</html>
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/lots-of-text-vertical-lr.html b/Tools/TestWebKitAPI/Tests/WebKit2/lots-of-text-vertical-lr.html
new file mode 100644
index 000000000..9598a3efa
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/lots-of-text-vertical-lr.html
@@ -0,0 +1,3 @@
+<body style="-webkit-writing-mode: vertical-lr;">
+You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too! You say it's your Birthday. It's my Birthday too!
+</body>
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm b/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm
index 4afd72fa2..ea770519a 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetBackingScaleFactor.mm
@@ -55,7 +55,7 @@ static void setInjectedBundleClient(WKContextRef context)
static RetainPtr<SyntheticBackingScaleFactorWindow> createWindow()
{
- RetainPtr<SyntheticBackingScaleFactorWindow> window(AdoptNS, [[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ RetainPtr<SyntheticBackingScaleFactorWindow> window = adoptNS([[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:NSMakeRect(0, 0, 800, 600) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
[window.get() setReleasedWhenClosed:NO];
return window;
}
@@ -64,7 +64,7 @@ TEST(WebKit2, GetBackingScaleFactor)
{
WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("GetBackingScaleFactorTest"));
setInjectedBundleClient(context.get());
- RetainPtr<WKView> view(AdoptNS, [[WKView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) contextRef:context.get() pageGroupRef:0]);
+ RetainPtr<WKView> view = adoptNS([[WKView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) contextRef:context.get() pageGroupRef:0]);
RetainPtr<SyntheticBackingScaleFactorWindow> window1 = createWindow();
[window1.get() setBackingScaleFactor:1];
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp
new file mode 100644
index 000000000..5b37b0845
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/mac/GetPIDAfterAbortedProcessLaunch.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+
+#include <WebKit2/WKPagePrivateMac.h>
+#include <WebKit2/WKContextPrivate.h>
+
+namespace TestWebKitAPI {
+
+static bool loaded;
+
+static void didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
+{
+ loaded = true;
+}
+
+TEST(WebKit2, GetPIDAfterAbortedProcessLaunch)
+{
+ WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());
+ WKContextSetUsesNetworkProcess(context.get(), true);
+
+ PlatformWebView webView(context.get());
+
+ WKPageLoaderClient loaderClient;
+ memset(&loaderClient, 0, sizeof(loaderClient));
+
+ loaderClient.version = 0;
+ loaderClient.didFinishLoadForFrame = didFinishLoadForFrame;
+ WKPageSetPageLoaderClient(webView.page(), &loaderClient);
+
+ WKRetainPtr<WKURLRef> url(AdoptWK, Util::createURLForResource("simple", "html"));
+ WKPageLoadURL(webView.page(), url.get());
+
+ Util::run(&loaded);
+ WKPageTerminate(webView.page());
+
+ // Reloading will start relaunching the process.
+ WKPageReload(webView.page());
+
+ WKPageClose(webView.page());
+
+ // And now we try to get the PID page when the page has been closed before the process launch was complete.
+ EXPECT_EQ(0, WKPageGetProcessIdentifier(webView.page()));
+}
+
+} // namespace TestWebKitAPI
+
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp b/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp
index 8bd0c5678..44a5b30d0 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp
+++ b/Tools/TestWebKitAPI/Tests/WebKit2/win/DoNotCopyANullCFURLResponse.cpp
@@ -34,7 +34,7 @@ TEST(WebKit2, DoNotCopyANullCFURLResponse)
{
// Neither of these calls should cause a crash.
WKRetainPtr<WKURLResponseRef> nullWKResponse(AdoptWK, WKURLResponseCreateWithCFURLResponse(0));
- RetainPtr<CFURLResponseRef> nullCFResponse(AdoptCF, WKURLResponseCopyCFURLResponse(kCFAllocatorDefault, nullWKResponse.get()));
+ RetainPtr<CFURLResponseRef> nullCFResponse = adoptCF(WKURLResponseCopyCFURLResponse(kCFAllocatorDefault, nullWKResponse.get()));
}
} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm
new file mode 100644
index 000000000..bf932cd43
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme.mm
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+
+#import "PlatformUtilities.h"
+#import "PlatformWebView.h"
+#import "TestBrowsingContextLoadDelegate.h"
+#import <WebKit2/WebKit2.h>
+#import <wtf/RetainPtr.h>
+
+static bool testFinished = false;
+
+namespace TestWebKitAPI {
+
+TEST(WebKit2CustomProtocolsTest, RegisterNilScheme)
+{
+ [WKBrowsingContextController registerSchemeForCustomProtocol:nil];
+ [WKBrowsingContextController unregisterSchemeForCustomProtocol:nil];
+}
+
+TEST(WebKit2CustomProtocolsTest, LoadInvalidScheme)
+{
+ [WKBrowsingContextController registerSchemeForCustomProtocol:@"custom"];
+ WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("CustomProtocolInvalidSchemeTest"));
+ PlatformWebView webView(context.get());
+
+ webView.platformView().browsingContextController.loadDelegate = [[TestBrowsingContextLoadDelegate alloc] initWithBlockToRunOnLoad:^(WKBrowsingContextController *sender) {
+ testFinished = true;
+ }];
+ [webView.platformView().browsingContextController loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"ht'tp://www.webkit.org"]]];
+
+ Util::run(&testFinished);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/MiniBrowser/win/MiniBrowser.h b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp
index c7b51778c..ee72f87e7 100644
--- a/Tools/MiniBrowser/win/MiniBrowser.h
+++ b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsInvalidScheme_Bundle.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,33 +23,37 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MiniBrowser_h
-#define MiniBrowser_h
+#include "config.h"
-#include <set>
+#include "InjectedBundleTest.h"
+#include <WebKit2/WKBundlePage.h>
-class BrowserWindow;
+namespace TestWebKitAPI {
-class MiniBrowser {
-public:
- static MiniBrowser& shared();
-
- void initialize(HINSTANCE);
-
- void createNewWindow();
-
- void registerWindow(BrowserWindow*);
- void unregisterWindow(BrowserWindow*);
+static WKBundlePagePolicyAction decidePolicyForNavigationAction(WKBundlePageRef, WKBundleFrameRef, WKBundleNavigationActionRef, WKURLRequestRef request, WKTypeRef*, const void*)
+{
+ if (WKBundlePageCanHandleRequest(request))
+ return WKBundlePagePolicyActionUse;
+ return WKBundlePagePolicyActionPassThrough;
+}
- bool handleMessage(const MSG*);
-
- HINSTANCE instance() const { return m_instance; }
+class CustomProtocolInvalidSchemeTest : public InjectedBundleTest {
+public:
+ CustomProtocolInvalidSchemeTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+ {
+ }
private:
- MiniBrowser();
-
- HINSTANCE m_instance;
- std::set<BrowserWindow*> m_browserWindows;
+ virtual void didCreatePage(WKBundleRef, WKBundlePageRef bundlePage) OVERRIDE
+ {
+ WKBundlePagePolicyClient policyClient;
+ memset(&policyClient, 0, sizeof(policyClient));
+ policyClient.decidePolicyForNavigationAction = decidePolicyForNavigationAction;
+ WKBundlePageSetPolicyClient(bundlePage, &policyClient);
+ }
};
-#endif // MiniBrowser_h
+static InjectedBundleTest::Register<CustomProtocolInvalidSchemeTest> registrar("CustomProtocolInvalidSchemeTest");
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm
index 0454f3f38..7eb2d364e 100644
--- a/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm
+++ b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/CustomProtocolsTest.mm
@@ -28,57 +28,17 @@
#import "PlatformUtilities.h"
#import "TestBrowsingContextLoadDelegate.h"
-#import <Foundation/Foundation.h>
+#import "TestProtocol.h"
#import <WebKit2/WebKit2.h>
-static NSString *testScheme = @"test";
-static NSString *testHost = @"test";
static bool testFinished = false;
-@interface TestProtocol : NSURLProtocol {
-}
-@end
-
-@implementation TestProtocol
-
-+ (BOOL)canInitWithRequest:(NSURLRequest *)request
-{
- return [[[request URL] scheme] caseInsensitiveCompare:testScheme] == NSOrderedSame;
-}
-
-+ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
-{
- return request;
-}
-
-+ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b
-{
- return NO;
-}
-
-- (void)startLoading
-{
- EXPECT_TRUE([[[[self request] URL] scheme] isEqualToString:testScheme]);
- EXPECT_TRUE([[[[self request] URL] host] isEqualToString:testHost]);
-
- NSData *data = [@"<body>PASS</body>" dataUsingEncoding:NSASCIIStringEncoding];
- NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[[self request] URL] MIMEType:@"text/html" expectedContentLength:[data length] textEncodingName:nil];
- [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
- [[self client] URLProtocol:self didLoadData:data];
- [[self client] URLProtocolDidFinishLoading:self];
- [response release];
-}
-
-- (void)stopLoading
-{
-}
-
-@end
+namespace TestWebKitAPI {
-TEST(WebKit2CustomProtocolsTest, CustomProtocolUsed)
+TEST(WebKit2CustomProtocolsTest, MainResource)
{
[NSURLProtocol registerClass:[TestProtocol class]];
- [WKBrowsingContextController registerSchemeForCustomProtocol:testScheme];
+ [WKBrowsingContextController registerSchemeForCustomProtocol:[TestProtocol scheme]];
WKProcessGroup *processGroup = [[WKProcessGroup alloc] init];
WKBrowsingContextGroup *browsingContextGroup = [[WKBrowsingContextGroup alloc] initWithIdentifier:@"TestIdentifier"];
@@ -86,7 +46,9 @@ TEST(WebKit2CustomProtocolsTest, CustomProtocolUsed)
wkView.browsingContextController.loadDelegate = [[TestBrowsingContextLoadDelegate alloc] initWithBlockToRunOnLoad:^(WKBrowsingContextController *sender) {
testFinished = true;
}];
- [wkView.browsingContextController loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@://%@", testScheme, testHost]]]];
+ [wkView.browsingContextController loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@://test", [TestProtocol scheme]]]]];
+
+ Util::run(&testFinished);
+}
- TestWebKitAPI::Util::run(&testFinished);
-} \ No newline at end of file
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm
new file mode 100644
index 000000000..0e86aaa27
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing.mm
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "Test.h"
+
+#import "PlatformUtilities.h"
+#import "PlatformWebView.h"
+#import "TestBrowsingContextLoadDelegate.h"
+#import "TestProtocol.h"
+#import <WebKit2/WebKit2.h>
+#import <WebKit2/WKViewPrivate.h>
+
+static bool testFinished = false;
+
+namespace TestWebKitAPI {
+
+TEST(WebKit2, PreventImageLoadWithAutoResizingTest)
+{
+ [NSURLProtocol registerClass:[TestProtocol class]];
+ [WKBrowsingContextController registerSchemeForCustomProtocol:[TestProtocol scheme]];
+
+ WKRetainPtr<WKContextRef> context = adoptWK(Util::createContextForInjectedBundleTest("DenyWillSendRequestTest"));
+ PlatformWebView webView(context.get());
+
+ webView.platformView().minimumSizeForAutoLayout = NSMakeSize(400, 300);
+ webView.platformView().browsingContextController.loadDelegate = [[TestBrowsingContextLoadDelegate alloc] initWithBlockToRunOnLoad:^(WKBrowsingContextController *sender) {
+ testFinished = true;
+ }];
+ [webView.platformView().browsingContextController loadHTMLString:@"<html><body style='background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeF59z4EJADEIQ1F36k7u5E7ZKXeUQPACJ3wK7UNokVxVk9kHnQH7bY9hbDyDhNXgjpRLqFlo4M2GgfyJHhjq8V4agfrgPQX3JtJQGbofmCHgA/nAKks+JAjFAAAAAElFTkSuQmCC);'></body></html>" baseURL:[NSURL URLWithString:@"about:blank"]];
+
+ Util::run(&testFinished);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp
new file mode 100644
index 000000000..9f73d7541
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/WebKit2ObjC/PreventImageLoadWithAutoResizing_Bundle.cpp
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "InjectedBundleTest.h"
+#include "PlatformUtilities.h"
+#include "Test.h"
+
+#include <WebKit2/WKBundlePage.h>
+
+#include <wtf/Assertions.h>
+
+namespace TestWebKitAPI {
+
+class DenyWillSendRequestTest : public InjectedBundleTest {
+public:
+ DenyWillSendRequestTest(const std::string& identifier)
+ : InjectedBundleTest(identifier)
+ {
+ }
+
+ static WKURLRequestRef willSendRequestForFrame(WKBundlePageRef, WKBundleFrameRef frame, uint64_t resourceIdentifier, WKURLRequestRef request, WKURLResponseRef redirectResponse, const void *clientInfo)
+ {
+ return 0;
+ }
+
+ virtual void didCreatePage(WKBundleRef bundle, WKBundlePageRef page)
+ {
+ WKBundlePageResourceLoadClient resourceLoadClient;
+ memset(&resourceLoadClient, 0, sizeof(resourceLoadClient));
+
+ resourceLoadClient.version = 0;
+ resourceLoadClient.willSendRequestForFrame = willSendRequestForFrame;
+
+ WKBundlePageSetResourceLoadClient(page, &resourceLoadClient);
+
+ }
+};
+
+static InjectedBundleTest::Register<DenyWillSendRequestTest> registrar("DenyWillSendRequestTest");
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp b/Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
index de408831f..bfcc17dcc 100644
--- a/Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
+++ b/Tools/TestWebKitAPI/Tests/gtk/InputMethodFilter.cpp
@@ -80,21 +80,23 @@ public:
}
protected:
- virtual bool sendSimpleKeyEvent(GdkEventKey* event, WTF::String eventString)
+ virtual bool sendSimpleKeyEvent(GdkEventKey* event, WTF::String eventString, EventFakedForComposition faked)
{
const char* eventType = event->type == GDK_KEY_RELEASE ? "release" : "press";
+ const char* fakedString = faked == EventFaked ? " (faked)" : "";
if (!eventString.isNull())
- m_events.append(String::format("sendSimpleKeyEvent type=%s keycode=%x text='%s'", eventType, event->keyval, eventString.utf8().data()));
+ m_events.append(String::format("sendSimpleKeyEvent type=%s keycode=%x text='%s'%s", eventType, event->keyval, eventString.utf8().data(), fakedString));
else
- m_events.append(String::format("sendSimpleKeyEvent type=%s keycode=%x", eventType, event->keyval));
+ m_events.append(String::format("sendSimpleKeyEvent type=%s keycode=%x%s", eventType, event->keyval, fakedString));
return true;
}
- virtual bool sendKeyEventWithCompositionResults(GdkEventKey* event, ResultsToSend resultsToSend)
+ virtual bool sendKeyEventWithCompositionResults(GdkEventKey* event, ResultsToSend resultsToSend, EventFakedForComposition faked)
{
const char* eventType = event->type == GDK_KEY_RELEASE ? "release" : "press";
- m_events.append(String::format("sendKeyEventWithCompositionResults type=%s keycode=%u", eventType, event->keyval));
+ const char* fakedString = faked == EventFaked ? " (faked)" : "";
+ m_events.append(String::format("sendKeyEventWithCompositionResults type=%s keycode=%u%s", eventType, event->keyval, fakedString));
if (resultsToSend & Composition && !m_confirmedComposition.isNull())
confirmCompositionText(m_confirmedComposition);
@@ -241,12 +243,12 @@ TEST(GTK, GtkInputMethodFilterContextEventsWithoutKeyEvents)
const Vector<String>& events = inputMethodFilter.events();
ASSERT_EQ(6, events.size());
- ASSERT_EQ(String("sendKeyEventWithCompositionResults type=press keycode=16777215"), events[0]);
+ ASSERT_EQ(String("sendKeyEventWithCompositionResults type=press keycode=16777215 (faked)"), events[0]);
ASSERT_EQ(String("setPreedit text='preedit of doom, bringer of cheese' cursorOffset=3"), events[1]);
- ASSERT_EQ(String("sendSimpleKeyEvent type=release keycode=ffffff"), events[2]);
- ASSERT_EQ(String("sendKeyEventWithCompositionResults type=press keycode=16777215"), events[3]);
+ ASSERT_EQ(String("sendSimpleKeyEvent type=release keycode=ffffff (faked)"), events[2]);
+ ASSERT_EQ(String("sendKeyEventWithCompositionResults type=press keycode=16777215 (faked)"), events[3]);
ASSERT_EQ(String("confirmComposition 'commit text'"), events[4]);
- ASSERT_EQ(String("sendSimpleKeyEvent type=release keycode=ffffff"), events[5]);
+ ASSERT_EQ(String("sendSimpleKeyEvent type=release keycode=ffffff (faked)"), events[5]);
}
static bool gSawContextReset = false;
@@ -258,11 +260,10 @@ static void temporaryResetOverride(GtkIMContext*)
static void verifyCanceledComposition(const Vector<String>& events)
{
- ASSERT_EQ(4, events.size());
+ ASSERT_EQ(3, events.size());
ASSERT_EQ(String("sendKeyEventWithCompositionResults type=press keycode=39"), events[0]);
ASSERT_EQ(String("setPreedit text='' cursorOffset=0"), events[1]);
ASSERT_EQ(String("sendSimpleKeyEvent type=release keycode=27"), events[2]);
- ASSERT_EQ(String("confirmCurrentcomposition"), events[3]);
ASSERT(gSawContextReset);
}
diff --git a/Tools/TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm b/Tools/TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm
index bc2f786f8..dec788804 100644
--- a/Tools/TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm
@@ -47,7 +47,7 @@ public:
template <typename View>
void AcceptsFirstMouse::runTest(View view)
{
- RetainPtr<NSWindow> window(AdoptNS, [[NSWindow alloc] initWithContentRect:view.frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:view.frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
[[window.get() contentView] addSubview:view];
CGFloat viewHeight = view.bounds.size.height;
diff --git a/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm b/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm
index 18cce9c2d..6386cad5f 100644
--- a/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm
@@ -52,8 +52,8 @@ static void didFinishLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef, const void*)
TEST(WebKit1, AttributedStringTest)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<AttributedStringTest> testController(AdoptNS, [AttributedStringTest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<AttributedStringTest> testController = adoptNS([AttributedStringTest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"attributedStringCustomFont" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
diff --git a/Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm b/Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm
index 098453d18..82ddb3830 100644
--- a/Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/BackForwardList.mm
@@ -54,8 +54,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, ReloadBackForward)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<BackForwardListTest> testController(AdoptNS, [BackForwardListTest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<BackForwardListTest> testController = adoptNS([BackForwardListTest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://does-not-exist.example"]]];
Util::run(&didFinishLoad);
diff --git a/Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm b/Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm
index 3729eb53c..9a19f936c 100644
--- a/Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/CancelLoadFromResourceLoadDelegate.mm
@@ -64,11 +64,11 @@ TEST(WebKit1, CancelLoadFromResourceLoadDelegate)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<CancelLoadFromResourceLoadDelegate> resourceLoadDelegate(AdoptNS, [[CancelLoadFromResourceLoadDelegate alloc] init]);
+ RetainPtr<CancelLoadFromResourceLoadDelegate> resourceLoadDelegate = adoptNS([[CancelLoadFromResourceLoadDelegate alloc] init]);
webView.get().resourceLoadDelegate = resourceLoadDelegate.get();
- RetainPtr<CancelLoadFromResourceLoadDelegateFrameLoadDelegate> frameLoadDelegate(AdoptNS, [[CancelLoadFromResourceLoadDelegateFrameLoadDelegate alloc] init]);
+ RetainPtr<CancelLoadFromResourceLoadDelegateFrameLoadDelegate> frameLoadDelegate = adoptNS([[CancelLoadFromResourceLoadDelegateFrameLoadDelegate alloc] init]);
webView.get().frameLoadDelegate = frameLoadDelegate.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"CancelLoadFromResourceLoadDelegate" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
diff --git a/Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm b/Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm
new file mode 100644
index 000000000..367378609
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/CloseNewWindowInNavigationPolicyDelegate.mm
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import <wtf/RetainPtr.h>
+
+static bool testFinished = false;
+
+@interface TestDelegate : NSObject
+
++ (TestDelegate *)shared;
+
+@end
+
+@implementation TestDelegate
+
++ (TestDelegate *)shared
+{
+ static TestDelegate *sharedTestDelegate = [[TestDelegate alloc] init];
+ return sharedTestDelegate;
+}
+
+- (void)webView:(WebView *)webView decidePolicyForNavigationAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request frame:(WebFrame *)frame decisionListener:(id<WebPolicyDecisionListener>)listener
+{
+ if (!request) {
+ [listener use];
+ return;
+ }
+
+ [webView close];
+ [listener ignore];
+ testFinished = true;
+}
+
+- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request
+{
+ WebView *webView = [[WebView alloc] init];
+ webView.policyDelegate = [TestDelegate shared];
+ [[webView mainFrame] loadRequest:request];
+ return webView;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, CloseNewWindowInNavigationPolicyDelegate)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] init]);
+ webView.get().preferences.javaScriptCanOpenWindowsAutomatically = YES;
+ webView.get().UIDelegate = [TestDelegate shared];
+ [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"OpenNewWindow" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
+
+ Util::run(&testFinished);
+
+ [pool drain];
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm b/Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm
index 40ac377e1..f79535f64 100644
--- a/Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm
@@ -88,9 +88,9 @@ static void contextMenuCopyLink(WebView* webView, int itemIndex)
TEST(WebKit1, ContextMenuCanCopyURL)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0,0,800,600) frameName:nil groupName:nil]);
- RetainPtr<NSWindow> window(AdoptNS, [[NSWindow alloc] initWithContentRect:NSMakeRect(100, 100, 800, 600) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
- RetainPtr<ContextMenuCanCopyURLDelegate> delegate(AdoptNS, [[ContextMenuCanCopyURLDelegate alloc] init]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0,0,800,600) frameName:nil groupName:nil]);
+ RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:NSMakeRect(100, 100, 800, 600) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ RetainPtr<ContextMenuCanCopyURLDelegate> delegate = adoptNS([[ContextMenuCanCopyURLDelegate alloc] init]);
[window.get().contentView addSubview:webView.get()];
webView.get().frameLoadDelegate = delegate.get();
diff --git a/Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm b/Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm
new file mode 100644
index 000000000..2c8ca3986
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellCellAbove.mm
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+#include "PlatformWebView.h"
+#include <wtf/RetainPtr.h>
+
+#import <WebKit/DOMPrivate.h>
+#import <WebKit/WebViewPrivate.h>
+
+@interface HTMLTableCellElementCellAboveTest : NSObject
+@end
+
+static bool didFinishLoad;
+
+@implementation HTMLTableCellElementCellAboveTest
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ didFinishLoad = true;
+}
+@end
+
+namespace TestWebKitAPI {
+
+static void expectCellAboveCell(DOMDocument *document, NSString *cellID, NSString *cellAboveID)
+{
+ DOMHTMLTableCellElement *cell = (DOMHTMLTableCellElement *)[document getElementById:cellID];
+ DOMHTMLTableCellElement *cellAbove = [cell _cellAbove];
+
+ EXPECT_WK_STREQ(cellAboveID, [cellAbove getAttribute:@"id"]);
+}
+
+TEST(WebKit1, HTMLTableCellElementCellAbove)
+{
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<HTMLTableCellElementCellAboveTest> testController = adoptNS([HTMLTableCellElementCellAboveTest new]);
+
+ webView.get().frameLoadDelegate = testController.get();
+ [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle]
+ URLForResource:@"DOMHTMLTableCellElementCellAbove" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
+
+ Util::run(&didFinishLoad);
+ didFinishLoad = false;
+
+ DOMDocument *document = webView.get().mainFrameDocument;
+
+ expectCellAboveCell(document, @"cell-4-2", @"cell-3-2");
+ expectCellAboveCell(document, @"cell-3-1", @"cell-2-1");
+ expectCellAboveCell(document, @"cell-2-1", @"cell-1-1");
+ expectCellAboveCell(document, @"cell-1-2", @"cell-h-2");
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellElementCellAbove.html b/Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellElementCellAbove.html
new file mode 100644
index 000000000..79135fd27
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/DOMHTMLTableCellElementCellAbove.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<body>
+ <table>
+ <tbody>
+ <tr>
+ <td id="cell-1-1">1-1</td>
+ <td id="cell-1-2">1-2</td>
+ </tr>
+ <tr>
+ <td id="cell-2-1">2-1</td>
+ <td id="cell-2-2">2-2</td>
+ </tr>
+ </tbody>
+ <thead>
+ <tr>
+ <th id="cell-h-1">h-1</th>
+ <th id="cell-h-2">h-2</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td id="cell-3-1">3-1</td>
+ <td id="cell-3-2">3-2</td>
+ </tr>
+ <tr>
+ <td id="cell-4-1">4-1</td>
+ <td id="cell-4-2">4-2</td>
+ </tr>
+ </tbody>
+</body>
diff --git a/Tools/TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm b/Tools/TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm
new file mode 100644
index 000000000..7bd23ea98
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/DOMNodeFromJSObject.mm
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+
+#import <JavaScriptCore/JSRetainPtr.h>
+#import <WebKit/DOMPrivate.h>
+#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebScriptWorld.h>
+#import <objc/runtime.h>
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, DOMNodeFromJSObject)
+{
+ WebView *webView = [[WebView alloc] initWithFrame:NSZeroRect frameName:nil groupName:nil];
+
+ [webView stringByEvaluatingJavaScriptFromString:@"document.body.mainWorldProperty = true"];
+
+ WebScriptWorld *isolatedWorld = [WebScriptWorld world];
+ JSGlobalContextRef context = [[webView mainFrame] _globalContextForScriptWorld:isolatedWorld];
+
+ JSRetainPtr<JSStringRef> script(Adopt, JSStringCreateWithUTF8CString("document.body"));
+
+ JSValueRef value = JSEvaluateScript(context, script.get(), 0, 0, 0, 0);
+ JSObjectRef jsBody = JSValueToObject(context, value, 0);
+
+ id objcBody = [DOMNode _nodeFromJSWrapper:jsBody];
+
+ EXPECT_STREQ("DOMHTMLBodyElement", class_getName([objcBody class]));
+ EXPECT_EQ([[[webView mainFrame] DOMDocument] body], objcBody);
+
+ // Verify that the Objective-C wrapper is for the main world JS wrapper.
+ EXPECT_TRUE([[objcBody valueForKey:@"mainWorldProperty"] boolValue]);
+
+ [webView release];
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm b/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm
index 1e8080539..a4485178d 100644
--- a/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/DOMRangeOfString.mm
@@ -48,8 +48,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, DOMRangeOfString)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSZeroRect frameName:nil groupName:nil]);
- RetainPtr<DOMRangeOfStringFrameLoadDelegate> frameLoadDelegate(AdoptNS, [DOMRangeOfStringFrameLoadDelegate new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSZeroRect frameName:nil groupName:nil]);
+ RetainPtr<DOMRangeOfStringFrameLoadDelegate> frameLoadDelegate = adoptNS([DOMRangeOfStringFrameLoadDelegate new]);
webView.get().frameLoadDelegate = frameLoadDelegate.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"DOMRangeOfString" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
@@ -74,7 +74,7 @@ TEST(WebKit1, DOMRangeOfString)
resultRange = [webView.get() DOMRangeOfString:@"n" relativeTo:needleRange options:WebFindOptionsStartInSelection];
EXPECT_EQ(28, resultRange.startOffset);
- RetainPtr<WebView> otherWebView(AdoptNS, [[WebView alloc] initWithFrame:NSZeroRect frameName:nil groupName:nil]);
+ RetainPtr<WebView> otherWebView = adoptNS([[WebView alloc] initWithFrame:NSZeroRect frameName:nil groupName:nil]);
DOMRange *foreignRange = [[[otherWebView.get() mainFrame] DOMDocument] createRange];
resultRange = [webView.get() DOMRangeOfString:@"needle" relativeTo:foreignRange options:0];
EXPECT_EQ(nil, resultRange);
diff --git a/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm b/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm
index f20356429..68ecbf819 100644
--- a/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorInDashboardRegions.mm
@@ -53,12 +53,12 @@ namespace TestWebKitAPI {
TEST(WebKit1, DeviceScaleFactorInDashboardRegions)
{
NSRect viewFrame = NSMakeRect(0, 0, 800, 600);
- RetainPtr<SyntheticBackingScaleFactorWindow> window(AdoptNS, [[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:viewFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ RetainPtr<SyntheticBackingScaleFactorWindow> window = adoptNS([[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:viewFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
[window.get() setReleasedWhenClosed:NO];
[window.get() setBackingScaleFactor:2];
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:viewFrame frameName:nil groupName:nil]);
- RetainPtr<DeviceScaleFactorInDashboardRegionsUIDelegate> uiDelegate(AdoptNS, [DeviceScaleFactorInDashboardRegionsUIDelegate new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:viewFrame frameName:nil groupName:nil]);
+ RetainPtr<DeviceScaleFactorInDashboardRegionsUIDelegate> uiDelegate = adoptNS([DeviceScaleFactorInDashboardRegionsUIDelegate new]);
webView.get().UIDelegate = uiDelegate.get();
[window.get().contentView addSubview:webView.get()];
diff --git a/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm b/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm
index 154b8c32c..8c454282a 100644
--- a/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/DeviceScaleFactorOnBack.mm
@@ -50,7 +50,7 @@ public:
RetainPtr<SyntheticBackingScaleFactorWindow> DeviceScaleFactorOnBack::createWindow()
{
- RetainPtr<SyntheticBackingScaleFactorWindow> window(AdoptNS, [[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:viewFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ RetainPtr<SyntheticBackingScaleFactorWindow> window = adoptNS([[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:viewFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
[window.get() setReleasedWhenClosed:NO];
return window;
}
diff --git a/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm b/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm
index d0ebd5177..61a1efed7 100644
--- a/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/DynamicDeviceScaleFactor.mm
@@ -47,7 +47,7 @@ public:
RetainPtr<SyntheticBackingScaleFactorWindow> DynamicDeviceScaleFactor::createWindow()
{
- RetainPtr<SyntheticBackingScaleFactorWindow> window(AdoptNS, [[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:viewFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
+ RetainPtr<SyntheticBackingScaleFactorWindow> window = adoptNS([[SyntheticBackingScaleFactorWindow alloc] initWithContentRect:viewFrame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]);
[window.get() setReleasedWhenClosed:NO];
return window;
}
diff --git a/Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm b/Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm
new file mode 100644
index 000000000..10fc581f4
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/ElementAtPointInWebFrame.mm
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import <WebKit/WebFramePrivate.h>
+#import <wtf/RetainPtr.h>
+
+@interface ElementAtPointFrameLoadDelegate : NSObject
+@end
+
+static bool didFinishLoad;
+
+@implementation ElementAtPointFrameLoadDelegate
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ didFinishLoad = true;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, ElementAtPoint)
+{
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<ElementAtPointFrameLoadDelegate> frameLoadDelegate = adoptNS([[ElementAtPointFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ [mainFrame loadHTMLString:@"<style> div { position:absolute; width:60px; height:100px; } </style> <div name='first'></div> <div name='second' style='left:60px; top:100px;'></div>"
+ baseURL:[NSURL URLWithString:@"about:blank"]];
+
+ Util::run(&didFinishLoad);
+
+ NSDictionary *elementDictionary = [mainFrame elementAtPoint:NSMakePoint(30, 50)];
+ DOMElement *domElement = [elementDictionary objectForKey:WebElementDOMNodeKey];
+ EXPECT_WK_STREQ(@"first", [domElement getAttribute:@"name"]);
+
+ elementDictionary = [mainFrame elementAtPoint:NSMakePoint(90, 150)];
+ domElement = [elementDictionary objectForKey:WebElementDOMNodeKey];
+ EXPECT_WK_STREQ(@"second", [domElement getAttribute:@"name"]);
+
+ elementDictionary = [mainFrame elementAtPoint:NSMakePoint(30, 150)];
+ domElement = [elementDictionary objectForKey:WebElementDOMNodeKey];
+ EXPECT_WK_STREQ(@"BODY", [domElement tagName]);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm b/Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm
index 50aafeeba..62cb79751 100644
--- a/Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/HTMLCollectionNamedItem.mm
@@ -50,8 +50,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, HTMLCollectionNamedItemTest)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<HTMLCollectionNamedItemTest> testController(AdoptNS, [HTMLCollectionNamedItemTest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<HTMLCollectionNamedItemTest> testController = adoptNS([HTMLCollectionNamedItemTest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle]
diff --git a/Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm b/Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm
index cf2da2dfb..a716ab92f 100644
--- a/Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/HTMLFormCollectionNamedItem.mm
@@ -50,8 +50,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, HTMLFormCollectionNamedItemTest)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<HTMLFormCollectionNamedItemTest> testController(AdoptNS, [HTMLFormCollectionNamedItemTest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<HTMLFormCollectionNamedItemTest> testController = adoptNS([HTMLFormCollectionNamedItemTest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle]
diff --git a/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm b/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm
index 0a51e2fb4..5f2205be8 100644
--- a/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/InspectorBar.mm
@@ -52,8 +52,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, InspectorBarTest)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<InspectorBarController> inspectorBarController(AdoptNS, [InspectorBarController new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<InspectorBarController> inspectorBarController = adoptNS([InspectorBarController new]);
webView.get().frameLoadDelegate = inspectorBarController.get();
[webView.get().mainFrame loadHTMLString:@"<body contenteditable style=\"color: green\"><u>Lorem ipsum sit amet</u></body>" baseURL:[NSURL URLWithString:@"about:blank"]];
diff --git a/Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache1.html b/Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache1.html
new file mode 100644
index 000000000..f736a7890
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache1.html
@@ -0,0 +1,10 @@
+<body>
+ <div id="test-div"></div>
+ <script>
+ var testDiv = document.getElementById("test-div");
+ if (!testDiv.myCustomProperty)
+ insertMyCustomProperty(testDiv);
+ else
+ checkForMyCustomProperty(testDiv);
+ </script>
+</body>
diff --git a/Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache2.html b/Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache2.html
new file mode 100644
index 000000000..1d26d21b4
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/JSContextBackForwardCache2.html
@@ -0,0 +1,10 @@
+<body>
+ <div id="test-div"></div>
+ <script>
+ var testDiv = document.getElementById("test-div");
+ if (testDiv.myCustomProperty)
+ myConsole.log("ERROR: found myCustomProperty.");
+ else
+ didCompleteTestSuccessfully();
+ </script>
+</body>
diff --git a/Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm b/Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm
new file mode 100644
index 000000000..5c41aaab5
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/JSWrapperForNodeInWebFrame.mm
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import <WebKit/WebFramePrivate.h>
+#import <WebKit/WebScriptWorld.h>
+#import <JavaScriptCore/JSContextRef.h>
+#import <JavaScriptCore/JSRetainPtr.h>
+#import <JavaScriptCore/JSStringRef.h>
+#import <JavaScriptCore/JSValueRef.h>
+#import <wtf/RetainPtr.h>
+
+@interface JSWrapperForNodeFrameLoadDelegate : NSObject {
+}
+@end
+
+static bool didFinishLoad;
+
+@implementation JSWrapperForNodeFrameLoadDelegate
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ didFinishLoad = true;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, JSWrapperForNode)
+{
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<JSWrapperForNodeFrameLoadDelegate> frameLoadDelegate = adoptNS([[JSWrapperForNodeFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+ [mainFrame loadHTMLString:@"<div id=\"target\"</div>" baseURL:[NSURL URLWithString:@"about:blank"]];
+ Util::run(&didFinishLoad);
+ DOMDocument *document = webView.get().mainFrameDocument;
+ DOMNode *target = [document getElementById:@"target"]; // This script object is in standard world.
+
+ // In an isolated script world, add a new property to the target node.
+ NSString *isolatedScriptString = @"var target = document.getElementById(\"target\"); target.isolatedProperty = true;";
+ WebScriptWorld *isolatedWorld = [WebScriptWorld world];
+ JSGlobalContextRef isolatedCtx = [mainFrame _globalContextForScriptWorld:isolatedWorld];
+ [mainFrame _stringByEvaluatingJavaScriptFromString:isolatedScriptString withGlobalObject:JSContextGetGlobalObject(isolatedCtx) inScriptWorld:isolatedWorld];
+ JSValueRef isolatedNodeJSValue = [mainFrame jsWrapperForNode:target inScriptWorld:isolatedWorld];
+ ASSERT_TRUE(JSValueIsObject(isolatedCtx, isolatedNodeJSValue));
+ JSObjectRef isolatedNodeJSObject = JSValueToObject(isolatedCtx, isolatedNodeJSValue, 0);
+
+ // In the standard script world, add a different property to the target node
+ NSString *normalScriptString = @"var target = document.getElementById(\"target\"); target.normalProperty = true;";
+ WebScriptWorld *normalWorld = [WebScriptWorld standardWorld];
+ JSGlobalContextRef normalCtx = [mainFrame _globalContextForScriptWorld:normalWorld];
+ [mainFrame _stringByEvaluatingJavaScriptFromString:normalScriptString withGlobalObject:JSContextGetGlobalObject(normalCtx) inScriptWorld:normalWorld];
+ JSValueRef normalNodeJSValue = [mainFrame jsWrapperForNode:target inScriptWorld:normalWorld];
+ ASSERT_TRUE(JSValueIsObject(normalCtx, normalNodeJSValue));
+ JSObjectRef normalNodeJSObject = JSValueToObject(normalCtx, normalNodeJSValue, 0);
+
+ JSRetainPtr<JSStringRef> isolatedPropertyJSString = JSStringCreateWithUTF8CString("isolatedProperty");
+ // Test for successful retrieval of the first property in the isolated script world
+ EXPECT_TRUE(JSValueIsBoolean(isolatedCtx, JSObjectGetProperty(isolatedCtx, isolatedNodeJSObject, isolatedPropertyJSString.get(), 0)));
+ // Test for failed retrieval of the first property in the standard script world
+ EXPECT_TRUE(JSValueIsUndefined(normalCtx, JSObjectGetProperty(normalCtx, normalNodeJSObject, isolatedPropertyJSString.get(), 0)));
+
+ JSRetainPtr<JSStringRef> normalPropertyJSString = JSStringCreateWithUTF8CString("normalProperty");
+ // Test for successful retrieval of the second property in the standard script world
+ EXPECT_TRUE(JSValueIsBoolean(normalCtx, JSObjectGetProperty(normalCtx, normalNodeJSObject, normalPropertyJSString.get(), 0)));
+ // Test for failed retrieval of the second property in the isolated script world
+ EXPECT_TRUE(JSValueIsUndefined(isolatedCtx, JSObjectGetProperty(isolatedCtx, isolatedNodeJSObject, normalPropertyJSString.get(), 0)));
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm b/Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm
index aeb955508..e2ecdeac4 100644
--- a/Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/MemoryCacheDisableWithinResourceLoadDelegate.mm
@@ -74,9 +74,9 @@ TEST(WebKit1, MemoryCacheDisableWithinResourceLoadDelegate)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<MemoryCacheDisableTestResourceLoadDelegate> resourceLoadDelegate(AdoptNS, [[MemoryCacheDisableTestResourceLoadDelegate alloc] init]);
+ RetainPtr<MemoryCacheDisableTestResourceLoadDelegate> resourceLoadDelegate = adoptNS([[MemoryCacheDisableTestResourceLoadDelegate alloc] init]);
webView.get().resourceLoadDelegate = resourceLoadDelegate.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"MemoryCacheDisableWithinResourceLoadDelegate" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
diff --git a/Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm b/Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm
index b178abd63..212820e0a 100644
--- a/Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/MemoryCachePruneWithinResourceLoadDelegate.mm
@@ -75,17 +75,17 @@ static bool didFinishLoad;
namespace TestWebKitAPI {
-TEST(WebKit1, MemoryCachePruneWithinResourceLoadDelegate)
+TEST(WebKit1, DISABLED_MemoryCachePruneWithinResourceLoadDelegate)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- RetainPtr<WebView> webView1(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<WebView> webView2(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView1 = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView2 = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
NSWindow* window = [[NSWindow alloc] initWithContentRect:webView2.get().frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
[window.contentView addSubview:webView2.get()];
- RetainPtr<MemoryCachePruneTestResourceLoadDelegate> resourceLoadDelegate(AdoptNS, [[MemoryCachePruneTestResourceLoadDelegate alloc] init]);
+ RetainPtr<MemoryCachePruneTestResourceLoadDelegate> resourceLoadDelegate = adoptNS([[MemoryCachePruneTestResourceLoadDelegate alloc] init]);
resourceLoadDelegate.get()->_window = window;
webView1.get().resourceLoadDelegate = resourceLoadDelegate.get();
diff --git a/Tools/TestWebKitAPI/Tests/mac/OpenNewWindow.html b/Tools/TestWebKitAPI/Tests/mac/OpenNewWindow.html
new file mode 100644
index 000000000..975f6d98d
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/OpenNewWindow.html
@@ -0,0 +1,7 @@
+<a href="#" onclick="openWindow()"></a>
+<script>
+ function openWindow() {
+ window.open("window-to-ignore.html", "newWindow");
+ }
+ document.getElementsByTagName("a")[0].click();
+</script>
diff --git a/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm b/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm
index 9254ffb60..9a614ab7a 100644
--- a/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm
@@ -111,7 +111,7 @@ void PageVisibilityStateWithWindowChanges::runTest(View view)
EXPECT_JS_EQ(view, "document.visibilityState", "hidden");
// Add it to a non-visible window. PageVisibility should still be "hidden".
- RetainPtr<NSWindow> window(AdoptNS, [[NSWindow alloc] initWithContentRect:view.frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
+ RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:view.frame styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
[window.get().contentView addSubview:view];
EXPECT_NOT_NULL([view window]);
EXPECT_NOT_NULL([view superview]);
diff --git a/Tools/TestWebKitAPI/Tests/mac/PublicSuffix.mm b/Tools/TestWebKitAPI/Tests/mac/PublicSuffix.mm
new file mode 100644
index 000000000..cb72414f3
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/PublicSuffix.mm
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2012 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
+ */
+
+#include "config.h"
+
+#if USE(PUBLIC_SUFFIX_LIST)
+
+#include "WTFStringUtilities.h"
+#include <WebCore/PublicSuffix.h>
+#include <wtf/MainThread.h>
+
+using namespace WebCore;
+
+namespace TestWebKitAPI {
+
+class PublicSuffix: public testing::Test {
+public:
+ virtual void SetUp()
+ {
+ WTF::initializeMainThread();
+ [WebView initialize];
+ }
+};
+
+TEST_F(PublicSuffix, IsPublicSuffix)
+{
+ EXPECT_TRUE(isPublicSuffix("com"));
+ EXPECT_FALSE(isPublicSuffix("test.com"));
+ EXPECT_FALSE(isPublicSuffix("com.com"));
+ EXPECT_TRUE(isPublicSuffix("net"));
+ EXPECT_TRUE(isPublicSuffix("org"));
+ EXPECT_TRUE(isPublicSuffix("co.uk"));
+ EXPECT_FALSE(isPublicSuffix("bl.uk"));
+ EXPECT_FALSE(isPublicSuffix("test.co.uk"));
+ EXPECT_TRUE(isPublicSuffix("xn--zf0ao64a.tw"));
+}
+
+TEST_F(PublicSuffix, TopPrivatelyControlledDomain)
+{
+ EXPECT_EQ(String("test.com"), topPrivatelyControlledDomain("test.com"));
+ EXPECT_EQ(String("test.com"), topPrivatelyControlledDomain("com.test.com"));
+ EXPECT_EQ(String("test.com"), topPrivatelyControlledDomain("subdomain.test.com"));
+ EXPECT_EQ(String("com.com"), topPrivatelyControlledDomain("www.com.com"));
+ EXPECT_EQ(String("test.co.uk"), topPrivatelyControlledDomain("test.co.uk"));
+ EXPECT_EQ(String("test.co.uk"), topPrivatelyControlledDomain("subdomain.test.co.uk"));
+ EXPECT_EQ(String("bl.uk"), topPrivatelyControlledDomain("bl.uk"));
+ EXPECT_EQ(String("bl.uk"), topPrivatelyControlledDomain("subdomain.bl.uk"));
+ EXPECT_EQ(String("test.xn--zf0ao64a.tw"), topPrivatelyControlledDomain("test.xn--zf0ao64a.tw"));
+ EXPECT_EQ(String("test.xn--zf0ao64a.tw"), topPrivatelyControlledDomain("www.test.xn--zf0ao64a.tw"));
+ EXPECT_EQ(String("127.0.0.1"), topPrivatelyControlledDomain("127.0.0.1"));
+ EXPECT_EQ(String(), topPrivatelyControlledDomain("1"));
+ EXPECT_EQ(String(), topPrivatelyControlledDomain("com"));
+}
+
+}
+
+#endif
diff --git a/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm b/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
index 5ad43bd25..bc3a11db3 100644
--- a/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/RenderedImageFromDOMRange.mm
@@ -48,8 +48,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, RenderedImageFromDOMRange)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<RenderedImageFromDOMRangeFrameLoadDelegate> frameLoadDelegate(AdoptNS, [RenderedImageFromDOMRangeFrameLoadDelegate new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<RenderedImageFromDOMRangeFrameLoadDelegate> frameLoadDelegate = adoptNS([RenderedImageFromDOMRangeFrameLoadDelegate new]);
webView.get().frameLoadDelegate = frameLoadDelegate.get();
[webView.get().mainFrame loadHTMLString:@"<div style=\"width: 100px;\">Lorem <span id=\"target\">ipsum dolor</span> sit amet</div>" baseURL:[NSURL URLWithString:@"about:blank"]];
diff --git a/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm b/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm
index eed1f8180..003755235 100644
--- a/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm
@@ -39,7 +39,7 @@ TEST(WebKit1, SetAndUpdateCacheModelInitialModel)
{
EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
}
@@ -64,7 +64,7 @@ TEST(WebKit1, SetAndUpdateCacheModelPreferencesChangeMix)
EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
WebPreferences *standardPreferences = [WebPreferences standardPreferences];
- RetainPtr<WebPreferences> customPreferences(AdoptNS, [[WebPreferences alloc] initWithIdentifier:@"SetAndUpdateCacheModelPreferencesChangeMix"]);
+ RetainPtr<WebPreferences> customPreferences = adoptNS([[WebPreferences alloc] initWithIdentifier:@"SetAndUpdateCacheModelPreferencesChangeMix"]);
// 1) The customPreferences is not set on a view.
EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
@@ -79,7 +79,7 @@ TEST(WebKit1, SetAndUpdateCacheModelPreferencesChangeMix)
// 2) The cache model should follow the highest value of cache model between the two preferences.
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
[webView.get() setPreferences:customPreferences.get()];
EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
diff --git a/Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm b/Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm
index f077ed95b..44ecc3e9b 100644
--- a/Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/SetDocumentURI.mm
@@ -49,8 +49,8 @@ namespace TestWebKitAPI {
TEST(WebKit1, SetDocumentURITestFile)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<SetDocumentURITest> testController(AdoptNS, [SetDocumentURITest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
Util::run(&didFinishLoad);
@@ -66,8 +66,8 @@ TEST(WebKit1, SetDocumentURITestFile)
TEST(WebKit1, SetDocumentURITestURL)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<SetDocumentURITest> testController(AdoptNS, [SetDocumentURITest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
Util::run(&didFinishLoad);
@@ -86,8 +86,8 @@ TEST(WebKit1, SetDocumentURITestURL)
TEST(WebKit1, SetDocumentURITestString)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<SetDocumentURITest> testController(AdoptNS, [SetDocumentURITest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
Util::run(&didFinishLoad);
@@ -103,8 +103,8 @@ TEST(WebKit1, SetDocumentURITestString)
TEST(WebKit1, SetDocumentURITestNull)
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<SetDocumentURITest> testController(AdoptNS, [SetDocumentURITest new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<SetDocumentURITest> testController = adoptNS([SetDocumentURITest new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"SetDocumentURI" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
Util::run(&didFinishLoad);
diff --git a/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm b/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm
index 70ec47d57..9d443ad04 100644
--- a/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/SimplifyMarkup.mm
@@ -49,9 +49,9 @@ namespace TestWebKitAPI {
TEST(WebKit1, SimplifyMarkupTest)
{
- RetainPtr<WebView> webView1(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<WebView> webView2(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<SimplifyMarkupTest> testController(AdoptNS, [SimplifyMarkupTest new]);
+ RetainPtr<WebView> webView1 = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WebView> webView2 = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<SimplifyMarkupTest> testController = adoptNS([SimplifyMarkupTest new]);
webView1.get().frameLoadDelegate = testController.get();
[[webView1.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"verboseMarkup" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
diff --git a/Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.html b/Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.html
new file mode 100644
index 000000000..92af0012c
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.html
@@ -0,0 +1 @@
+<script src="data:text/javascript,document.write('SUCCESS')"></script>
diff --git a/Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm b/Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm
new file mode 100644
index 000000000..8eb269df0
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import <WebKit/WebCache.h>
+#import <wtf/RetainPtr.h>
+
+@interface StopLoadingFromDidReceiveResponse : NSObject {
+}
+@end
+
+static bool didFinishLoad;
+
+@implementation StopLoadingFromDidReceiveResponse
+
+- (void)webView:(WebView *)sender resource:(id)identifier didReceiveResponse:(NSURLResponse *)response fromDataSource:(WebDataSource *)dataSource
+{
+ static BOOL mainResourceReceived;
+ if (!mainResourceReceived) {
+ mainResourceReceived = YES;
+ return;
+ }
+
+ [sender stopLoading:identifier];
+
+ didFinishLoad = YES;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, StopLoadingFromDidReceiveResponse)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+
+ RetainPtr<StopLoadingFromDidReceiveResponse> resourceLoadDelegate = adoptNS([[StopLoadingFromDidReceiveResponse alloc] init]);
+ webView.get().resourceLoadDelegate = resourceLoadDelegate.get();
+
+ [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"StopLoadingFromDidReceiveResponse" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
+
+ Util::run(&didFinishLoad);
+
+ [pool drain];
+ // If we finished without crashing, the test passed.
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm b/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm
index 4e3e3ec75..260a5a53e 100644
--- a/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/StringByEvaluatingJavaScriptFromString.mm
@@ -32,7 +32,7 @@ namespace TestWebKitAPI {
TEST(WebKit1, StringByEvaluatingJavaScriptFromString)
{
// maps expected result <= JavaScript expression
- RetainPtr<NSDictionary> expressions(AdoptNS, [[NSDictionary alloc] initWithObjectsAndKeys:
+ RetainPtr<NSDictionary> expressions = adoptNS([[NSDictionary alloc] initWithObjectsAndKeys:
@"0", @"0",
@"0", @"'0'",
@"", @"",
@@ -53,7 +53,7 @@ TEST(WebKit1, StringByEvaluatingJavaScriptFromString)
nil
]);
- RetainPtr<WebView> webView (AdoptNS, [[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSZeroRect frameName:@"" groupName:@""]);
// Test a nil string
NSString *result = [webView.get() stringByEvaluatingJavaScriptFromString:nil];
diff --git a/Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm b/Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm
new file mode 100644
index 000000000..39504dda8
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/WebViewDidCreateJavaScriptContext.mm
@@ -0,0 +1,287 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import <JavaScriptCore/JSExport.h>
+#import <JavaScriptCore/JSContext.h>
+#import <WebKit/WebFrameLoadDelegatePrivate.h>
+#import <wtf/RetainPtr.h>
+
+#if JSC_OBJC_API_ENABLED
+
+@class MyConsole;
+
+static bool didFinishLoad = false;
+static bool didCompleteTestSuccessfully = false;
+static bool didCallWindowCallback = false;
+static bool didFindMyCustomProperty = false;
+static bool didInsertMyCustomProperty = true;
+
+@protocol MyConsole<JSExport>
+- (void)log:(NSString *)s;
+- (void)printHelloWorld;
+- (int)add:(int)a to:(int)b;
+@end
+
+@interface MyConsole : NSObject<MyConsole>
+@end
+
+@implementation MyConsole
+- (void)log:(NSString *)s
+{
+ NSLog(@"%@", s);
+}
+
+- (void)printHelloWorld
+{
+ NSLog(@"Hello, World!");
+}
+
+- (int)add:(int)a to:(int)b
+{
+ return a + b;
+}
+@end
+
+@interface DidCreateJavaScriptContextFrameLoadDelegate : NSObject
+@end
+
+@implementation DidCreateJavaScriptContextFrameLoadDelegate
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ didFinishLoad = true;
+}
+
+- (void)webView:(WebView *)webView didCreateJavaScriptContext:(JSContext *)context forFrame:(WebFrame *)frame
+{
+ MyConsole *myConsole = [[MyConsole alloc] init];
+ context[@"myConsole"] = myConsole;
+ context.exceptionHandler = nil;
+ [myConsole release];
+
+ context[@"windowCallback"] = ^(JSValue *thisObject){
+ didCallWindowCallback = true;
+ };
+
+ context[@"didCompleteTestSuccessfully"] = ^{
+ didCompleteTestSuccessfully = true;
+ };
+
+ context[@"callMeBack"] = ^(JSValue *functionValue) {
+ [functionValue callWithArguments:[NSArray array]];
+ };
+
+ context[@"checkForMyCustomProperty"] = ^(JSValue *element) {
+ if ([element hasProperty:@"myCustomProperty"] && [[element valueForProperty:@"myCustomProperty"] toInt32] == 42)
+ didFindMyCustomProperty = true;
+ else
+ NSLog(@"ERROR: Did not find myCustomProperty.");
+ };
+
+ context[@"insertMyCustomProperty"] = ^(JSValue *element) {
+ JSValue *fortyTwo = [JSValue valueWithInt32:42 inContext:[JSContext currentContext]];
+ [element setValue:fortyTwo forProperty:@"myCustomProperty"];
+ didInsertMyCustomProperty = true;
+ };
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, DidCreateJavaScriptContextSanity1)
+{
+ didFinishLoad = false;
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidCreateJavaScriptContextFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidCreateJavaScriptContextFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSString *bodyString =
+ @"<body> \
+ <script> \
+ myConsole.printHelloWorld(); \
+ myConsole.log(\"Loaded custom stuff.\"); \
+ myConsole.log(myConsole.addTo(40, 2)); \
+ didCompleteTestSuccessfully(); \
+ </script> \
+ </body>";
+ NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"];
+
+ [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL];
+ Util::run(&didCompleteTestSuccessfully);
+ }
+}
+
+TEST(WebKit1, DidCreateJavaScriptContextSanity2)
+{
+ didCallWindowCallback = false;
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidCreateJavaScriptContextFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidCreateJavaScriptContextFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSString *bodyString =
+ @"<body> \
+ <script> \
+ setTimeout(windowCallback, 100); \
+ </script> \
+ </body>";
+ NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"];
+
+ [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL];
+ Util::run(&didCallWindowCallback);
+ }
+}
+
+TEST(WebKit1, DidCreateJavaScriptContextCallJSFunctionFromObjCCallbackTest)
+{
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidCreateJavaScriptContextFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidCreateJavaScriptContextFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSString *bodyString =
+ @"<body> \
+ <script> \
+ callMeBack(function() { \
+ didCompleteTestSuccessfully(); \
+ }); \
+ </script> \
+ </body>";
+ NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"];
+
+ [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL];
+ Util::run(&didCompleteTestSuccessfully);
+ }
+}
+
+TEST(WebKit1, DidCreateJavaScriptContextAddCustomPropertiesFromJSTest)
+{
+ didFindMyCustomProperty = false;
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidCreateJavaScriptContextFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidCreateJavaScriptContextFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSString *bodyString =
+ @"<body> \
+ <div id=\"test-div\"></div> \
+ <script> \
+ var testDiv = document.getElementById(\"test-div\"); \
+ testDiv.myCustomProperty = 42; \
+ checkForMyCustomProperty(testDiv); \
+ </script> \
+ </body>";
+ NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"];
+
+ [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL];
+ Util::run(&didFindMyCustomProperty);
+ }
+}
+
+TEST(WebKit1, DidCreateJavaScriptContextAddCustomPropertiesFromObjCTest)
+{
+ didFindMyCustomProperty = false;
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidCreateJavaScriptContextFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidCreateJavaScriptContextFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSString *bodyString =
+ @"<body> \
+ <div id=\"test-div\"></div> \
+ <script> \
+ var testDiv = document.getElementById(\"test-div\"); \
+ insertMyCustomProperty(testDiv); \
+ if (testDiv.myCustomProperty === 42) { \
+ checkForMyCustomProperty(testDiv); \
+ } \
+ </script> \
+ </body>";
+ NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"];
+
+ [mainFrame loadHTMLString:bodyString baseURL:aboutBlankURL];
+ Util::run(&didFindMyCustomProperty);
+ }
+}
+
+TEST(WebKit1, DidCreateJavaScriptContextBackForwardCacheTest)
+{
+ didInsertMyCustomProperty = false;
+ didFindMyCustomProperty = false;
+ didCompleteTestSuccessfully = false;
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidCreateJavaScriptContextFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidCreateJavaScriptContextFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSURL *url1 = [[NSBundle mainBundle] URLForResource:@"JSContextBackForwardCache1"
+ withExtension:@"html"
+ subdirectory:@"TestWebKitAPI.resources"];
+ [mainFrame loadRequest:[NSURLRequest requestWithURL:url1]];
+ Util::run(&didInsertMyCustomProperty);
+
+ NSURL *url2 = [[NSBundle mainBundle] URLForResource:@"JSContextBackForwardCache2"
+ withExtension:@"html"
+ subdirectory:@"TestWebKitAPI.resources"];
+ [mainFrame loadRequest:[NSURLRequest requestWithURL:url2]];
+ Util::run(&didCompleteTestSuccessfully);
+
+ didCompleteTestSuccessfully = false;
+ [[mainFrame javaScriptContext] evaluateScript:
+ @"var testDiv = document.getElementById(\"test-div\"); \
+ if (!testDiv.myCustomProperty) { \
+ didCompleteTestSuccessfully(); \
+ }"];
+ EXPECT_TRUE(didCompleteTestSuccessfully);
+
+ if ([webView.get() goBack]) {
+ [[mainFrame javaScriptContext] evaluateScript:
+ @"var testDiv = document.getElementById(\"test-div\"); \
+ checkForMyCustomProperty(testDiv);"];
+ EXPECT_TRUE(didFindMyCustomProperty);
+ } else
+ EXPECT_TRUE(false);
+ }
+}
+
+} // namespace TestWebKitAPI
+
+#endif // ENABLE(JSC_OBJC_API)
diff --git a/Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm b/Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm
new file mode 100644
index 000000000..fbe8af52a
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/WebViewDidRemoveFrameFromHierarchy.mm
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import <WebKit/WebFrameLoadDelegatePrivate.h>
+#import <wtf/RetainPtr.h>
+
+@interface DidRemoveFrameFromHierarchyFrameLoadDelegate : NSObject
+@end
+
+static bool didFinishLoad;
+static bool didRemoveFrame;
+
+@implementation DidRemoveFrameFromHierarchyFrameLoadDelegate
+
+- (void)webView:(WebView *)sender didFinishLoadForFrame:(WebFrame *)frame
+{
+ didFinishLoad = true;
+}
+
+- (void)webView:(WebView *)sender didRemoveFrameFromHierarchy:(WebFrame *)frame
+{
+ didRemoveFrame = true;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, DidRemoveFrameFromHierarchy)
+{
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<DidRemoveFrameFromHierarchyFrameLoadDelegate> frameLoadDelegate = adoptNS([[DidRemoveFrameFromHierarchyFrameLoadDelegate alloc] init]);
+
+ webView.get().frameLoadDelegate = frameLoadDelegate.get();
+ WebFrame *mainFrame = webView.get().mainFrame;
+
+ NSString *bodyWithIFrameString = @"<body><iframe id='iframe'></iframe></body>";
+ NSURL *aboutBlankURL = [NSURL URLWithString:@"about:blank"];
+
+ [mainFrame loadHTMLString:bodyWithIFrameString baseURL:aboutBlankURL];
+ Util::run(&didFinishLoad);
+
+ EXPECT_FALSE(didRemoveFrame);
+ [webView.get() stringByEvaluatingJavaScriptFromString:@"document.body.removeChild(document.getElementById('iframe'))"];
+ EXPECT_TRUE(didRemoveFrame);
+
+ didFinishLoad = false;
+ didRemoveFrame = false;
+
+ [mainFrame loadHTMLString:bodyWithIFrameString baseURL:aboutBlankURL];
+ Util::run(&didFinishLoad);
+
+ // The delegate method is not called when the frame is removed due to navigation in an ancestor frame.
+ EXPECT_FALSE(didRemoveFrame);
+ [mainFrame loadHTMLString:@"<body></body>" baseURL:aboutBlankURL];
+ EXPECT_FALSE(didRemoveFrame);
+}
+
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm b/Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm
new file mode 100644
index 000000000..1654f9ca8
--- /dev/null
+++ b/Tools/TestWebKitAPI/Tests/mac/WillSendSubmitEvent.mm
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2013 Apple 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. AND ITS 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 APPLE INC. OR ITS 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 "config.h"
+#import "PlatformUtilities.h"
+#import "PlatformWebView.h"
+#import "Test.h"
+
+#import <WebKit/WebFormDelegate.h>
+#import <WebKit/WebViewPrivate.h>
+#import <wtf/RetainPtr.h>
+
+static bool didFinishLoad;
+
+@interface FormDelegate : WebFormDelegate
+@end
+
+@implementation FormDelegate
+
+- (void)willSendSubmitEventToForm:(DOMHTMLFormElement *)element inFrame:(WebFrame *)sourceFrame withValues:(NSDictionary *)values
+{
+ EXPECT_NOT_NULL(element);
+ EXPECT_NOT_NULL(sourceFrame);
+
+ EXPECT_WK_STREQ([values objectForKey:@"textField"], @"text field");
+ EXPECT_WK_STREQ([values objectForKey:@"passwordField"], @"password field");
+
+ // <input type="hidden"> fields are not sent.
+ EXPECT_NULL([values objectForKey:@"hiddenField"]);
+
+ didFinishLoad = true;
+}
+
+@end
+
+namespace TestWebKitAPI {
+
+TEST(WebKit1, WillSendSubmitEvent)
+{
+ @autoreleasepool {
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+
+ RetainPtr<FormDelegate> formDelegate = [[FormDelegate alloc] init];
+ [webView _setFormDelegate:formDelegate.get()];
+
+ [[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"auto-submitting-form" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
+
+ Util::run(&didFinishLoad);
+ }
+}
+
+}
diff --git a/Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm b/Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm
index bf593e6ef..9225783ab 100644
--- a/Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm
+++ b/Tools/TestWebKitAPI/Tests/mac/WindowlessWebViewWithMedia.mm
@@ -65,8 +65,8 @@ TEST(WebKit1, WindowlessWebViewWithMedia)
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
- RetainPtr<WindowlessWebViewWithMediaFrameLoadDelegate> testController(AdoptNS, [WindowlessWebViewWithMediaFrameLoadDelegate new]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
+ RetainPtr<WindowlessWebViewWithMediaFrameLoadDelegate> testController = adoptNS([WindowlessWebViewWithMediaFrameLoadDelegate new]);
webView.get().frameLoadDelegate = testController.get();
[[webView.get() mainFrame] loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"WindowlessWebViewWithMedia" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
diff --git a/Tools/TestWebKitAPI/config.h b/Tools/TestWebKitAPI/config.h
index dd240a585..0fb19e1c3 100644
--- a/Tools/TestWebKitAPI/config.h
+++ b/Tools/TestWebKitAPI/config.h
@@ -26,22 +26,26 @@
#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
#ifdef BUILDING_WITH_CMAKE
#include "cmakeconfig.h"
+#else
+#include "autotoolsconfig.h"
#endif
#endif
#include <wtf/Platform.h>
#include <wtf/ExportMacros.h>
-#if USE(JSC)
#include <runtime/JSExportMacros.h>
-#endif
#if defined(__APPLE__) && __APPLE__
#ifdef __OBJC__
+#if PLATFORM(IOS)
+#import <Foundation/Foundation.h>
+#else
#import <Cocoa/Cocoa.h>
#endif
+#endif
-#elif defined(WIN32) || defined(_WIN32)
+#elif PLATFORM(WIN)
#ifndef NOMINMAX
#define NOMINMAX
@@ -60,11 +64,11 @@
#undef WTF_USE_CURL
#endif
-#endif
+#endif // PLATFORM(WIN)
#include <stdint.h>
-#if !PLATFORM(CHROMIUM) || (PLATFORM(GTK) && defined(BUILDING_WEBKIT2__))
+#if !PLATFORM(IOS) && !PLATFORM(WIN) && !(PLATFORM(GTK) && !defined(BUILDING_WEBKIT2__))
#include <WebKit2/WebKit2_C.h>
#endif
diff --git a/Tools/TestWebKitAPI/efl/PlatformWebView.cpp b/Tools/TestWebKitAPI/efl/PlatformWebView.cpp
index 08407c6a3..5a3aa6b1e 100644
--- a/Tools/TestWebKitAPI/efl/PlatformWebView.cpp
+++ b/Tools/TestWebKitAPI/efl/PlatformWebView.cpp
@@ -25,10 +25,13 @@
*/
#include "config.h"
+#include "ewk_view_private.h"
#include "PlatformWebView.h"
#include "EWebKit2.h"
-#include "WebKit2/WKAPICast.h"
+#include <WebKit2/WKAPICast.h>
+#include <WebKit2/WKRetainPtr.h>
+#include <WebKit2/WKViewEfl.h>
#include <Ecore_Evas.h>
extern bool useX11Window;
@@ -39,13 +42,16 @@ namespace TestWebKitAPI {
static Ecore_Evas* initEcoreEvas()
{
- ASSERT(ecore_evas_init());
+ if (!ecore_evas_init())
+ return 0;
- const char* engine = 0;
+ Ecore_Evas* ecoreEvas;
#if defined(WTF_USE_ACCELERATED_COMPOSITING) && defined(HAVE_ECORE_X)
- engine = "opengl_x11";
+ ecoreEvas = ecore_evas_new("opengl_x11", 0, 0, 800, 600, 0);
+ // Graceful fallback to software rendering if evas_gl engine is not available.
+ if (!ecoreEvas)
#endif
- Ecore_Evas* ecoreEvas = ecore_evas_new(engine, 0, 0, 800, 600, 0);
+ ecoreEvas = ecore_evas_new(0, 0, 0, 800, 600, 0);
ASSERT(ecoreEvas);
@@ -63,9 +69,12 @@ static void onWebProcessCrashed(void*, Evas_Object*, void* eventInfo)
PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
{
m_window = initEcoreEvas();
- Evas* evas = ecore_evas_get(m_window);
- m_view = toImpl(WKViewCreate(evas, contextRef, pageGroupRef));
- ewk_view_theme_set(m_view, THEME_DIR"/default.edj");
+
+ m_view = EWKViewCreate(contextRef, pageGroupRef, ecore_evas_get(m_window), /* smart */ 0);
+
+ WKRetainPtr<WKStringRef> wkTheme = adoptWK(WKStringCreateWithUTF8CString(TEST_THEME_DIR "/default.edj"));
+ WKViewSetThemePath(EWKViewGetWKView(m_view), wkTheme.get());
+
evas_object_smart_callback_add(m_view, "webprocess,crashed", onWebProcessCrashed, 0);
resizeTo(600, 800);
}
@@ -73,6 +82,7 @@ PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGro
PlatformWebView::~PlatformWebView()
{
evas_object_del(m_view);
+
ecore_evas_free(m_window);
ecore_evas_shutdown();
}
@@ -84,12 +94,12 @@ void PlatformWebView::resizeTo(unsigned width, unsigned height)
WKPageRef PlatformWebView::page() const
{
- return WKViewGetPage(toAPI(m_view));
+ return WKViewGetPage(EWKViewGetWKView(m_view));
}
void PlatformWebView::simulateSpacebarKeyPress()
{
- Evas* evas = ecore_evas_get(m_window);
+ Evas* evas = evas_object_evas_get(m_view);
evas_object_focus_set(m_view, true);
evas_event_feed_key_down(evas, "space", "space", " ", 0, 0, 0);
evas_event_feed_key_up(evas, "space", "space", " ", 0, 1, 0);
@@ -97,14 +107,14 @@ void PlatformWebView::simulateSpacebarKeyPress()
void PlatformWebView::simulateMouseMove(unsigned x, unsigned y)
{
- Evas* evas = ecore_evas_get(m_window);
+ Evas* evas = evas_object_evas_get(m_view);
evas_object_show(m_view);
evas_event_feed_mouse_move(evas, x, y, 0, 0);
}
void PlatformWebView::simulateRightClick(unsigned x, unsigned y)
{
- Evas* evas = ecore_evas_get(m_window);
+ Evas* evas = evas_object_evas_get(m_view);
evas_object_show(m_view);
evas_event_feed_mouse_move(evas, x, y, 0, 0);
evas_event_feed_mouse_down(evas, 3, EVAS_BUTTON_NONE, 0, 0);
diff --git a/Tools/MiniBrowser/win/stdafx.cpp b/Tools/TestWebKitAPI/ios/mainIOS.mm
index c664e32be..3eec9b005 100644
--- a/Tools/MiniBrowser/win/stdafx.cpp
+++ b/Tools/TestWebKitAPI/ios/mainIOS.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,11 +23,16 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-// stdafx.cpp : source file that includes just the standard includes
-// MiniBrowser.pch will be the pre-compiled header
-// stdafx.obj will contain the pre-compiled type information
+#import "config.h"
+#import "TestsController.h"
-#include "stdafx.h"
+int main(int argc, char** argv)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-// TODO: reference any additional headers you need in STDAFX.H
-// and not in this file
+ bool passed = TestWebKitAPI::TestsController::shared().run(argc, argv);
+
+ [pool drain];
+
+ return passed ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm b/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm
index 965beb4ae..5d6712a57 100644
--- a/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm
+++ b/Tools/TestWebKitAPI/mac/InjectedBundleControllerMac.mm
@@ -40,7 +40,7 @@ void InjectedBundleController::platformInitialize()
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInteger:4], @"AppleAntiAliasingThreshold",
[NSNumber numberWithInteger:0], @"AppleFontSmoothing",
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
[NSNumber numberWithBool:NO], @"NSScrollAnimationEnabled",
#else
[NSNumber numberWithBool:NO], @"AppleScrollAnimationEnabled",
diff --git a/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm b/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
index afa28a76a..1e73adbb3 100644
--- a/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
+++ b/Tools/TestWebKitAPI/mac/PlatformUtilitiesMac.mm
@@ -67,7 +67,7 @@ WKURLRef URLForNonExistentResource()
WKRetainPtr<WKStringRef> MIMETypeForWKURLResponse(WKURLResponseRef wkResponse)
{
- RetainPtr<NSURLResponse> response(AdoptNS, WKURLResponseCopyNSURLResponse(wkResponse));
+ RetainPtr<NSURLResponse> response = adoptNS(WKURLResponseCopyNSURLResponse(wkResponse));
return adoptWK(WKStringCreateWithCFString((CFStringRef)[response.get() MIMEType]));
}
@@ -78,6 +78,9 @@ bool isKeyDown(WKNativeEventPtr event)
std::string toSTD(NSString *string)
{
+ if (!string)
+ return std::string();
+
size_t bufferSize = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
OwnArrayPtr<char> buffer = adoptArrayPtr(new char[bufferSize]);
NSUInteger stringLength;
diff --git a/Tools/MiniBrowser/win/stdafx.h b/Tools/TestWebKitAPI/mac/TestProtocol.h
index 2f531bb3f..cf6734b88 100644
--- a/Tools/MiniBrowser/win/stdafx.h
+++ b/Tools/TestWebKitAPI/mac/TestProtocol.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,11 +23,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#define STRICT
-#define WIN32_LEAN_AND_MEAN
-
-#include <tchar.h>
-#include <windows.h>
-
+#ifndef TestProtocol_h
+#define TestProtocol_h
+@interface TestProtocol : NSURLProtocol {
+}
++ (NSString *)scheme;
+@end
+#endif // TestProtocol_h
diff --git a/Tools/MiniBrowser/win/BrowserView.h b/Tools/TestWebKitAPI/mac/TestProtocol.mm
index e170a7df7..367ea0489 100644
--- a/Tools/MiniBrowser/win/BrowserView.h
+++ b/Tools/TestWebKitAPI/mac/TestProtocol.mm
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,27 +23,47 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef BrowserView_h
-#define BrowserView_h
+#import "config.h"
+#import "TestProtocol.h"
-#include <WebKit2/WebKit2_C.h>
-#include <string>
+static NSString *testScheme = @"test";
-class BrowserWindow;
+@implementation TestProtocol
-class BrowserView {
-public:
- BrowserView();
++ (BOOL)canInitWithRequest:(NSURLRequest *)request
+{
+ return [[[request URL] scheme] caseInsensitiveCompare:testScheme] == NSOrderedSame;
+}
- void goToURL(const std::wstring& url);
++ (NSURLRequest *)canonicalRequestForRequest:(NSURLRequest *)request
+{
+ return request;
+}
- void create(RECT, BrowserWindow* parentWindow);
- void setFrame(RECT);
++ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b
+{
+ return NO;
+}
- WKViewRef webView() const { return m_webView; }
++ (NSString *)scheme
+{
+ return testScheme;
+}
-private:
- WKViewRef m_webView;
-};
+- (void)startLoading
+{
+ EXPECT_TRUE([[[[self request] URL] scheme] isEqualToString:testScheme]);
+
+ NSData *data = [@"PASS" dataUsingEncoding:NSASCIIStringEncoding];
+ NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[[self request] URL] MIMEType:@"text/html" expectedContentLength:[data length] textEncodingName:nil];
+ [[self client] URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed];
+ [[self client] URLProtocol:self didLoadData:data];
+ [[self client] URLProtocolDidFinishLoading:self];
+ [response release];
+}
-#endif // BrowserView_h
+- (void)stopLoading
+{
+}
+
+@end
diff --git a/Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm b/Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm
index ce25a84da..03552b3a8 100644
--- a/Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm
+++ b/Tools/TestWebKitAPI/mac/WebKitAgnosticTest.mm
@@ -83,8 +83,8 @@ WebKitAgnosticTest::WebKitAgnosticTest()
void WebKitAgnosticTest::runWebKit1Test()
{
- RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:viewFrame]);
- RetainPtr<FrameLoadDelegate> delegate(AdoptNS, [[FrameLoadDelegate alloc] initWithDidFinishLoadBoolean:&didFinishLoad]);
+ RetainPtr<WebView> webView = adoptNS([[WebView alloc] initWithFrame:viewFrame]);
+ RetainPtr<FrameLoadDelegate> delegate = adoptNS([[FrameLoadDelegate alloc] initWithDidFinishLoadBoolean:&didFinishLoad]);
[webView.get() setFrameLoadDelegate:delegate.get()];
initializeView(webView.get());
@@ -98,7 +98,7 @@ void WebKitAgnosticTest::runWebKit2Test()
{
WKRetainPtr<WKContextRef> context = adoptWK(WKContextCreate());
WKRetainPtr<WKPageGroupRef> pageGroup = adoptWK(WKPageGroupCreateWithIdentifier(Util::toWK("WebKitAgnosticTest").get()));
- RetainPtr<WKView> view(AdoptNS, [[WKView alloc] initWithFrame:viewFrame contextRef:context.get() pageGroupRef:pageGroup.get()]);
+ RetainPtr<WKView> view = adoptNS([[WKView alloc] initWithFrame:viewFrame contextRef:context.get() pageGroupRef:pageGroup.get()]);
setPageLoaderClient([view.get() pageRef], &didFinishLoad);
initializeView(view.get());
diff --git a/Tools/TestWebKitAPI/mac/main.mm b/Tools/TestWebKitAPI/mac/mainMac.mm
index 498eb480e..498eb480e 100644
--- a/Tools/TestWebKitAPI/mac/main.mm
+++ b/Tools/TestWebKitAPI/mac/mainMac.mm
diff --git a/Tools/TestWebKitAPI/win/InjectedBundleControllerWin.cpp b/Tools/TestWebKitAPI/qt/InjectedBundleControllerQt.cpp
index 5c4f42d9b..5d55002cc 100644
--- a/Tools/TestWebKitAPI/win/InjectedBundleControllerWin.cpp
+++ b/Tools/TestWebKitAPI/qt/InjectedBundleControllerQt.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2012 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
diff --git a/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp b/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp
new file mode 100644
index 000000000..5a3c13a66
--- /dev/null
+++ b/Tools/TestWebKitAPI/qt/PlatformUtilitiesQt.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+ *
+ * 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.
+ *
+ */
+
+#include "config.h"
+#include "PlatformUtilities.h"
+
+#include <WebKit2/WKStringQt.h>
+#include <WebKit2/WKNativeEvent.h>
+#include <WebKit2/WKURLQt.h>
+
+#include <QCoreApplication>
+#include <QDir>
+#include <QUrl>
+#include <QThread>
+
+namespace TestWebKitAPI {
+namespace Util {
+
+void run(bool* done)
+{
+ while (!*done)
+ QCoreApplication::processEvents();
+}
+
+void sleep(double seconds)
+{
+ QThread::sleep(seconds);
+}
+
+WKStringRef createInjectedBundlePath()
+{
+ QString path = QFileInfo(QStringLiteral(ROOT_BUILD_DIR "/lib/libTestWebKitAPIInjectedBundle")).absoluteFilePath();
+
+ return WKStringCreateWithQString(path);
+}
+
+WKURLRef createURLForResource(const char* resource, const char* extension)
+{
+ QDir path(QStringLiteral(APITEST_SOURCE_DIR));
+ QString filename = QString::fromLocal8Bit(resource) + QStringLiteral(".") + QString::fromLocal8Bit(extension);
+
+ return WKURLCreateWithQUrl(QUrl::fromLocalFile(path.absoluteFilePath(filename)));
+}
+
+WKURLRef URLForNonExistentResource()
+{
+ return WKURLCreateWithUTF8CString("file:///does-not-exist.html");
+}
+
+bool isKeyDown(WKNativeEventPtr event)
+{
+ return event->type() == QEvent::KeyPress;
+}
+
+} // namespace Util
+} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp b/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp
new file mode 100644
index 000000000..8f571c544
--- /dev/null
+++ b/Tools/TestWebKitAPI/qt/PlatformWebViewQt.cpp
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 University of Szeged. All rights reserved.
+ * Copyright (C) 2013 Digia Plc. and/or its subsidiary(-ies).
+ *
+ * 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 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.
+ */
+
+#include "config.h"
+
+#include "PlatformWebView.h"
+#include "qquickwebpage_p.h"
+#include "qquickwebview_p.h"
+
+#include <WebKit2/WKRetainPtr.h>
+
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QQmlProperty>
+#include <QtQuick/QQuickView>
+#include <qpa/qwindowsysteminterface.h>
+
+namespace TestWebKitAPI {
+
+class WrapperWindow : public QQuickView {
+ Q_OBJECT
+public:
+ WrapperWindow(QQuickWebView* view)
+ : QQuickView(QUrl(QStringLiteral("data:text/plain,import QtQuick 2.0\nItem { objectName: 'root' }")))
+ , m_view(view)
+ {
+ if (status() == QQuickView::Ready)
+ handleStatusChanged(QQuickView::Ready);
+ else
+ connect(this, SIGNAL(statusChanged(QQuickView::Status)), SLOT(handleStatusChanged(QQuickView::Status)));
+ }
+
+private Q_SLOTS:
+ void handleStatusChanged(QQuickView::Status status)
+ {
+ if (status != QQuickView::Ready)
+ return;
+
+ setGeometry(0, 0, 800, 600);
+
+ setResizeMode(QQuickView::SizeRootObjectToView);
+ m_view->setParentItem(rootObject());
+ QQmlProperty::write(m_view, QStringLiteral("anchors.fill"), qVariantFromValue(rootObject()));
+
+ m_view->experimental()->setRenderToOffscreenBuffer(true);
+
+ QWindowSystemInterface::handleWindowActivated(this);
+ m_view->page()->setFocus(true);
+ }
+
+private:
+ QQuickWebView* m_view;
+};
+
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
+{
+ m_view = new QQuickWebView(contextRef, pageGroupRef);
+ m_view->setAllowAnyHTTPSCertificateForLocalHost(true);
+ m_view->componentComplete();
+
+ m_window = new WrapperWindow(m_view);
+}
+
+PlatformWebView::~PlatformWebView()
+{
+ delete m_window;
+}
+
+void PlatformWebView::resizeTo(unsigned width, unsigned height)
+{
+ // If we do not have a platform window we will never get the necessary
+ // resize event, so simulate it in that case to make sure the quickview is
+ // resized to what the api tests expects.
+ if (!m_window->handle()) {
+ QRect newGeometry(m_window->x(), m_window->y(), width, height);
+ QWindowSystemInterface::handleGeometryChange(m_window, newGeometry);
+ QWindowSystemInterface::flushWindowSystemEvents();
+ }
+
+ m_window->resize(width, height);
+}
+
+WKPageRef PlatformWebView::page() const
+{
+ return m_view->pageRef();
+}
+
+void PlatformWebView::focus()
+{
+ m_view->setFocus(true);
+}
+
+void PlatformWebView::simulateSpacebarKeyPress()
+{
+ QKeyEvent event(QEvent::KeyPress, Qt::Key_Space, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event);
+ QKeyEvent event2(QEvent::KeyRelease, Qt::Key_Space, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event2);
+}
+
+void PlatformWebView::simulateAltKeyPress()
+{
+ QKeyEvent event(QEvent::KeyPress, Qt::Key_Alt, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event);
+ QKeyEvent event2(QEvent::KeyRelease, Qt::Key_Alt, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event2);
+}
+
+void PlatformWebView::simulateMouseMove(unsigned x, unsigned y)
+{
+ QPointF mousePos(x, y);
+ QMouseEvent event(QEvent::MouseMove, mousePos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event);
+}
+
+void PlatformWebView::simulateRightClick(unsigned x, unsigned y)
+{
+ QPointF mousePos(x, y);
+ QMouseEvent event2(QEvent::MouseButtonPress, mousePos, Qt::RightButton, Qt::RightButton, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event2);
+ QMouseEvent event3(QEvent::MouseButtonRelease, mousePos, Qt::RightButton, Qt::NoButton, Qt::NoModifier);
+ QCoreApplication::sendEvent(m_window, &event3);
+}
+
+} // namespace TestWebKitAPI
+
+#include "PlatformWebViewQt.moc"
diff --git a/Tools/TestWebKitAPI/qt/main.cpp b/Tools/TestWebKitAPI/qt/main.cpp
new file mode 100644
index 000000000..efad5bbb3
--- /dev/null
+++ b/Tools/TestWebKitAPI/qt/main.cpp
@@ -0,0 +1,70 @@
+/*
+ * Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
+ *
+ * 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.
+ *
+ */
+
+#include "config.h"
+#include "TestsController.h"
+
+#include "qquickwebview_p.h"
+#include <QGuiApplication>
+
+void addQtWebProcessToPath()
+{
+ // Since tests won't find ./QtWebProcess, add it to PATH (at the end to prevent surprises).
+ // ROOT_BUILD_DIR should be defined by qmake.
+ qputenv("PATH", qgetenv("PATH") + QByteArray(":" ROOT_BUILD_DIR "/bin"));
+}
+
+void messageHandler(QtMsgType type, const QMessageLogContext&, const QString& message)
+{
+ if (type == QtCriticalMsg) {
+ fprintf(stderr, "%s\n", qPrintable(message));
+ return;
+ }
+
+ // Do nothing
+}
+
+int main(int argc, char** argv)
+{
+ bool suppressQtDebugOutput = true; // Suppress debug output from Qt if not started with --verbose.
+ bool useDesktopBehavior = true; // Use traditional desktop behavior if not started with --flickable.
+
+ for (int i = 1; i < argc; ++i) {
+ if (!qstrcmp(argv[i], "--verbose"))
+ suppressQtDebugOutput = false;
+ else if (!qstrcmp(argv[i], "--flickable"))
+ useDesktopBehavior = false;
+ }
+
+ QQuickWebViewExperimental::setFlickableViewportEnabled(!useDesktopBehavior);
+
+ // Has to be done before QApplication is constructed in case
+ // QApplication itself produces debug output.
+ if (suppressQtDebugOutput) {
+ qInstallMessageHandler(messageHandler);
+ if (qgetenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT").isEmpty())
+ qputenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT", "1");
+ }
+
+ QGuiApplication app(argc, argv);
+ addQtWebProcessToPath();
+
+ return TestWebKitAPI::TestsController::shared().run(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp b/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
deleted file mode 100644
index 1b9823d97..000000000
--- a/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2010 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
- */
-
-#include "config.h"
-#include "PlatformUtilities.h"
-
-#include <WebKit2/WKStringCF.h>
-#include <WebKit2/WKURLCF.h>
-#include <wtf/RetainPtr.h>
-
-#if USE(CFNETWORK)
-#include <WebKit2/WKURLResponseCF.h>
-#endif
-
-namespace TestWebKitAPI {
-namespace Util {
-
-#ifdef DEBUG_ALL
-const char* injectedBundleDLL = "TestWebKitAPIInjectedBundle_debug.dll";
-#else
-const char* injectedBundleDLL = "TestWebKitAPIInjectedBundle.dll";
-#endif
-
-void run(bool* done)
-{
- while (!*done) {
- MSG msg;
- BOOL result = ::GetMessageW(&msg, 0, 0, 0);
- if (!result || result == -1)
- break;
-
- if (shouldTranslateMessage(msg))
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- }
-}
-
-bool shouldTranslateMessage(const MSG& msg)
-{
- // Only these four messages are actually translated by ::TranslateMessage or ::TranslateAccelerator.
- // It's useless (though harmless) to call those functions for other messages, so we always allow other messages to be translated.
- if (msg.message != WM_KEYDOWN && msg.message != WM_SYSKEYDOWN && msg.message != WM_KEYUP && msg.message != WM_SYSKEYUP)
- return true;
-
- wchar_t className[256];
- if (!::GetClassNameW(msg.hwnd, className, ARRAYSIZE(className)))
- return true;
-
- // Don't call TranslateMessage() on key events destined for a WebKit2 view, WebKit will do this if it doesn't handle the message.
- // It would be nice to use some API here instead of hard-coding the window class name.
- return wcscmp(className, L"WebKit2WebViewWindowClass");
-}
-
-void sleep(double seconds)
-{
- ::Sleep(seconds * 1000);
-}
-
-RetainPtr<CFStringRef> cf(const char* utf8String)
-{
- return RetainPtr<CFStringRef>(AdoptCF, CFStringCreateWithCString(kCFAllocatorDefault, utf8String, kCFStringEncodingUTF8));
-}
-
-WKStringRef createInjectedBundlePath()
-{
- RetainPtr<CFURLRef> executableURL(AdoptCF, CFBundleCopyExecutableURL(CFBundleGetMainBundle()));
- RetainPtr<CFURLRef> executableContainerURL(AdoptCF, CFURLCreateCopyDeletingLastPathComponent(0, executableURL.get()));
- RetainPtr<CFStringRef> dllFilename(AdoptCF, CFStringCreateWithCStringNoCopy(0, injectedBundleDLL, kCFStringEncodingWindowsLatin1, kCFAllocatorNull));
- RetainPtr<CFURLRef> bundleURL(AdoptCF, CFURLCreateCopyAppendingPathComponent(0, executableContainerURL.get(), dllFilename.get(), false));
- RetainPtr<CFStringRef> bundlePath(AdoptCF, CFURLCopyFileSystemPath(bundleURL.get(), kCFURLWindowsPathStyle));
- return WKStringCreateWithCFString(bundlePath.get());
-}
-
-WKURLRef createURLForResource(const char* resource, const char* extension)
-{
- RetainPtr<CFURLRef> url(AdoptCF, CFBundleCopyResourceURL(CFBundleGetMainBundle(), cf(resource).get(), cf(extension).get(), 0));
- return WKURLCreateWithCFURL(url.get());
-}
-
-WKURLRef URLForNonExistentResource()
-{
- return WKURLCreateWithUTF8CString("file:///does-not-exist.html");
-}
-
-WKRetainPtr<WKStringRef> MIMETypeForWKURLResponse(WKURLResponseRef wkResponse)
-{
-#if USE(CFNETWORK)
- RetainPtr<CFURLResponseRef> response(AdoptCF, WKURLResponseCopyCFURLResponse(0, wkResponse));
- return adoptWK(WKStringCreateWithCFString(CFURLResponseGetMIMEType(response.get())));
-#else
- return 0;
-#endif
-}
-
-bool isKeyDown(WKNativeEventPtr event)
-{
- return event->message == WM_KEYDOWN;
-}
-
-} // namespace Util
-} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp b/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp
deleted file mode 100644
index 2015f2634..000000000
--- a/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (C) 2010 Apple 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. AND ITS 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 APPLE INC. OR ITS 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.
- */
-
-#include "config.h"
-#include "PlatformWebView.h"
-
-#include "WindowMessageObserver.h"
-
-namespace TestWebKitAPI {
-
-static const wchar_t* hostWindowClassName = L"org.WebKit.TestWebKitAPI.PlatformWebViewHostWindow";
-static const wchar_t* webViewPointerProperty = L"org.WebKit.TestWebKitAPI.PlatformWebView.InstancePointer";
-
-// These offsets come from rom <http://msdn.microsoft.com/en-us/library/ms646280(VS.85).aspx>.
-static const size_t repeatCountBitOffset = 0;
-static const size_t scanCodeBitOffset = 16;
-static const size_t contextCodeBitOffset = 29;
-static const size_t previousStateBitOffset = 30;
-static const size_t transitionStateBitOffset = 31;
-
-void PlatformWebView::registerWindowClass()
-{
- static bool initialized;
- if (initialized)
- return;
- initialized = true;
-
- WNDCLASSEXW wndClass = {0};
- wndClass.cbSize = sizeof(wndClass);
- wndClass.style = CS_HREDRAW | CS_VREDRAW;
- wndClass.lpfnWndProc = wndProc;
- wndClass.hCursor = LoadCursor(0, IDC_ARROW);
- wndClass.lpszClassName = hostWindowClassName;
-
- ::RegisterClassExW(&wndClass);
-}
-
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef)
- : m_parentWindowMessageObserver(0)
-{
- registerWindowClass();
-
- RECT viewRect = {0, 0, 800, 600};
- m_window = CreateWindowExW(0, hostWindowClassName, L"TestWebKitAPI", WS_OVERLAPPEDWINDOW, viewRect.left, viewRect.top, viewRect.right, viewRect.bottom, 0, 0, 0, this);
- m_view = WKViewCreate(viewRect, contextRef, pageGroupRef, m_window);
-}
-
-PlatformWebView::~PlatformWebView()
-{
- ::DestroyWindow(m_window);
- WKRelease(m_view);
-}
-
-WKPageRef PlatformWebView::page() const
-{
- return WKViewGetPage(m_view);
-}
-
-void PlatformWebView::resizeTo(unsigned width, unsigned height)
-{
- ::SetWindowPos(WKViewGetWindow(m_view), 0, 0, 0, width, height, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);
-}
-
-void PlatformWebView::simulateSpacebarKeyPress()
-{
- HWND window = WKViewGetWindow(m_view);
-
- // These values match what happens when you press the spacebar in Notepad, as observed by Spy++.
- ::SendMessageW(window, WM_KEYDOWN, VK_SPACE, (1 << repeatCountBitOffset) | (39 << scanCodeBitOffset));
- ::SendMessageW(window, WM_CHAR, ' ', (1 << repeatCountBitOffset) | (39 << scanCodeBitOffset));
- ::SendMessageW(window, WM_KEYUP, VK_SPACE, (1 << repeatCountBitOffset) | (39 << scanCodeBitOffset) | (1 << previousStateBitOffset) | (1 << transitionStateBitOffset));
-}
-
-void PlatformWebView::simulateAKeyDown()
-{
- HWND window = WKViewGetWindow(m_view);
-
- // These values match what happens when you press the 'A' key in Notepad, as observed by Spy++.
- ::SendMessageW(window, WM_KEYDOWN, 'A', (1 << repeatCountBitOffset) | (30 << scanCodeBitOffset));
-}
-
-void PlatformWebView::simulateAltKeyPress()
-{
- HWND window = WKViewGetWindow(m_view);
-
- // These values match what happens when you press the Alt key in Notepad, as observed by Spy++.
- ::SendMessageW(window, WM_SYSKEYDOWN, VK_MENU, (1 << repeatCountBitOffset) | (38 << scanCodeBitOffset) | (1 << contextCodeBitOffset));
- ::SendMessageW(window, WM_SYSKEYUP, VK_MENU, (1 << repeatCountBitOffset) | (38 << scanCodeBitOffset) | (1 << previousStateBitOffset) | (1 << transitionStateBitOffset));
-}
-
-void PlatformWebView::simulateRightClick(unsigned x, unsigned y)
-{
- HWND window = WKViewGetWindow(m_view);
-
- ::SendMessageW(window, WM_RBUTTONDOWN, 0, MAKELPARAM(x, y));
- ::SendMessageW(window, WM_RBUTTONUP, 0, MAKELPARAM(x, y));
-}
-
-void PlatformWebView::simulateMouseMove(unsigned x, unsigned y)
-{
- HWND window = WKViewGetWindow(m_view);
-
- ::SendMessageW(window, WM_MOUSEMOVE, 0, MAKELPARAM(x, y));
-}
-
-LRESULT PlatformWebView::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- PlatformWebView* webView;
- if (message == WM_CREATE) {
- CREATESTRUCT* createStruct = reinterpret_cast<CREATESTRUCT*>(lParam);
- webView = static_cast<PlatformWebView*>(createStruct->lpCreateParams);
- ::SetPropW(hWnd, webViewPointerProperty, webView);
- } else
- webView = reinterpret_cast<PlatformWebView*>(::GetPropW(hWnd, webViewPointerProperty));
-
- if (webView && webView->m_parentWindowMessageObserver)
- webView->m_parentWindowMessageObserver->windowReceivedMessage(hWnd, message, wParam, lParam);
-
- if (message == WM_NCDESTROY)
- ::RemovePropW(hWnd, webViewPointerProperty);
-
- return ::DefWindowProcW(hWnd, message, wParam, lParam);
-}
-
-} // namespace TestWebKitAPI
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPI.sln b/Tools/TestWebKitAPI/win/TestWebKitAPI.sln
deleted file mode 100644
index ae601ef49..000000000
--- a/Tools/TestWebKitAPI/win/TestWebKitAPI.sln
+++ /dev/null
@@ -1,66 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWebKitAPI", "TestWebKitAPI.vcproj", "{3E48AB23-D249-488F-A1C4-43CDF52FBD28}"
- ProjectSection(ProjectDependencies) = postProject
- {45C45411-7F0E-404D-919A-4EE9BB60BE86} = {45C45411-7F0E-404D-919A-4EE9BB60BE86}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWebKitAPIGenerated", "TestWebKitAPIGenerated.vcproj", "{45C45411-7F0E-404D-919A-4EE9BB60BE86}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWebKitAPIInjectedBundle", "TestWebKitAPIInjectedBundle.vcproj", "{B0101604-B483-4F8C-9C51-90B46A2B1CD3}"
- ProjectSection(ProjectDependencies) = postProject
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28} = {3E48AB23-D249-488F-A1C4-43CDF52FBD28}
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_All|Win32 = Debug_All|Win32
- Debug_Cairo_CFLite|Win32 = Debug_Cairo_CFLite|Win32
- Debug|Win32 = Debug|Win32
- Release_Cairo_CFLite|Win32 = Release_Cairo_CFLite|Win32
- Production|Win32 = Production|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug|Win32.ActiveCfg = Debug|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug|Win32.Build.0 = Debug|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Production|Win32.ActiveCfg = Production|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Production|Win32.Build.0 = Production|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release|Win32.ActiveCfg = Release|Win32
- {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release|Win32.Build.0 = Release|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug|Win32.ActiveCfg = Debug|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug|Win32.Build.0 = Debug|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Production|Win32.ActiveCfg = Production|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Production|Win32.Build.0 = Production|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release|Win32.ActiveCfg = Release|Win32
- {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release|Win32.Build.0 = Release|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Debug_Cairo_CFLite|Win32.ActiveCfg = Debug_Cairo_CFLite|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Debug_Cairo_CFLite|Win32.Build.0 = Debug_Cairo_CFLite|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Debug|Win32.ActiveCfg = Debug|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Debug|Win32.Build.0 = Debug|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Release_Cairo_CFLite|Win32.ActiveCfg = Release_Cairo_CFLite|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Release_Cairo_CFLite|Win32.Build.0 = Release_Cairo_CFLite|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Production|Win32.ActiveCfg = Production|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Production|Win32.Build.0 = Production|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Release|Win32.ActiveCfg = Release|Win32
- {B0101604-B483-4F8C-9C51-90B46A2B1CD3}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
deleted file mode 100644
index 96b2d256e..000000000
--- a/Tools/TestWebKitAPI/win/TestWebKitAPI.vcproj
+++ /dev/null
@@ -1,751 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestWebKitAPI"
- ProjectGUID="{3E48AB23-D249-488F-A1C4-43CDF52FBD28}"
- RootNamespace="TestWebKitAPI"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIRelease.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="win"
- >
- <File
- RelativePath=".\HostWindow.cpp"
- >
- </File>
- <File
- RelativePath=".\HostWindow.h"
- >
- </File>
- <File
- RelativePath=".\InjectedBundleControllerWin.cpp"
- >
- </File>
- <File
- RelativePath=".\main.cpp"
- >
- </File>
- <File
- RelativePath=".\PlatformUtilitiesWin.cpp"
- >
- </File>
- <File
- RelativePath=".\PlatformWebViewWin.cpp"
- >
- </File>
- <File
- RelativePath=".\WindowMessageObserver.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Tests"
- >
- <Filter
- Name="WebCore"
- >
- <Filter
- Name="win"
- >
- <File
- RelativePath="..\Tests\WebCore\win\BitmapImage.cpp"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="WebKit2"
- >
- <File
- RelativePath="..\Tests\WebKit2\18-characters.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\AboutBlankLoad.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\CanHandleRequest.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\CookieManager.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\DocumentStartUserScriptAlertCrash.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\DownloadDecideDestinationCrash.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\EvaluateJavaScript.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\FailedLoad.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\file-with-anchor.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\Find.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\find.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\ForceRepaint.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\FrameMIMETypeHTML.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\FrameMIMETypePNG.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\HitTestResultNodeHandle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\icon.png"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\InjectedBundleBasic.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\LoadAlternateHTMLStringWithNonDirectoryURL.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\LoadCanceledNoServerRedirectCallback.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\mouse-move-listener.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\MouseMoveAfterCrash.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\PageLoadBasic.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\PageLoadDidChangeLocationWithinPageForFrame.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\PreventEmptyUserAgent.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\PrivateBrowsingPushStateNoHistoryCallback.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\push-state.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\ResponsivenessTimerDoesntFireEarly.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\RestoreSessionStateContainingFormData.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\simple-accelerated-compositing.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\simple-form.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\simple-iframe.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\simple.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\spacebar-scrolling.html"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\SpacebarScrolling.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\UserMessage.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\WebArchive.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\WKPreferences.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\WKString.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\WKStringJSString.cpp"
- >
- </File>
- <Filter
- Name="win"
- >
- <File
- RelativePath="..\Tests\WebKit2\win\AltKeyGeneratesWMSysCommand.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\win\DoNotCopyANullCFURLResponse.cpp"
- >
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCCLCompilerTool"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\Tests\WebKit2\win\HideFindIndicator.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\win\ResizeViewWhileHidden.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\win\TranslateMessageGeneratesWMChar.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\win\WMCloseCallsUIClientClose.cpp"
- >
- </File>
- </Filter>
- </Filter>
- <Filter
- Name="WTF"
- >
- <Filter
- Name="cf"
- >
- <File
- RelativePath="..\Tests\WTF\cf\RetainPtrHashing.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\cf\RetainPtr.cpp"
- >
- </File>
- </Filter>
- <File
- RelativePath="..\Tests\WTF\CheckedArithmeticOperations.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\Functional.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\HashMap.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\MathExtras.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\MediaTime.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\SaturatedArithmeticOperations.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\StringOperators.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\TemporaryChange.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\Vector.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\VectorBasic.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WTF\VectorReverse.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="WebKit"
- >
- <Filter
- Name="win"
- >
- <File
- RelativePath="..\Tests\WebKit\win\WebViewDestruction.cpp"
- >
- </File>
- </Filter>
- </Filter>
- </Filter>
- <File
- RelativePath="..\config.h"
- >
- </File>
- <File
- RelativePath="..\JavaScriptTest.cpp"
- >
- </File>
- <File
- RelativePath="..\JavaScriptTest.h"
- >
- </File>
- <File
- RelativePath="..\PlatformUtilities.cpp"
- >
- </File>
- <File
- RelativePath="..\PlatformUtilities.h"
- >
- </File>
- <File
- RelativePath="..\PlatformWebView.h"
- >
- </File>
- <File
- RelativePath="..\Test.h"
- >
- </File>
- <File
- RelativePath="..\TestsController.cpp"
- >
- </File>
- <File
- RelativePath="..\TestsController.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
deleted file mode 100644
index aa9cdae05..000000000
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIGenerated.vcproj
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestWebKitAPIGenerated"
- ProjectGUID="{45C45411-7F0E-404D-919A-4EE9BB60BE86}"
- Keyword="MakeFileProj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="0"
- InheritedPropertySheets=".\TestWebKitAPIGeneratedCommon.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <File
- RelativePath=".\copy-resources.cmd"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops b/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops
deleted file mode 100644
index 8a5f40231..000000000
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIGeneratedCommon.vsprops
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestWebKitAPIGeneratedCommon"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\..\WebKitLibraries\win\tools\vsprops\common.vsprops"
- >
- <Tool
- Name="VCNMakeTool"
- BuildCommandLine="set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)&#x0D;&#x0A;copy-resources.cmd"
- ReBuildCommandLine="set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)&#x0D;&#x0A;copy-resources.cmd rebuild"
- CleanCommandLine="set CONFIGURATIONBUILDDIR=$(ConfigurationBuildDir)&#x0D;&#x0A;copy-resources.cmd clean"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj b/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
deleted file mode 100644
index 832c70b78..000000000
--- a/Tools/TestWebKitAPI/win/TestWebKitAPIInjectedBundle.vcproj
+++ /dev/null
@@ -1,471 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="TestWebKitAPIInjectedBundle"
- ProjectGUID="{B0101604-B483-4F8C-9C51-90B46A2B1CD3}"
- RootNamespace="TestWebKitAPIInjectedBundle"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIDebug.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIRelease.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIDebugAll.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIRelease.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIDebugCairoCFLite.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets="..\Configurations\TestWebKitAPIReleaseCairoCFLite.vsprops;..\Configurations\TestWebKitAPIInjectedBundleCommon.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="win"
- >
- <File
- RelativePath=".\InjectedBundleControllerWin.cpp"
- >
- </File>
- <File
- RelativePath=".\PlatformUtilitiesWin.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Tests"
- >
- <Filter
- Name="WebKit2"
- >
- <File
- RelativePath="..\Tests\WebKit2\CanHandleRequest_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\DocumentStartUserScriptAlertCrash_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\HitTestResultNodeHandle_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\InjectedBundleBasic_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\LoadCanceledNoServerRedirectCallback_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\MouseMoveAfterCrash_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\ResponsivenessTimerDoesntFireEarly_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\UserMessage_Bundle.cpp"
- >
- </File>
- <File
- RelativePath="..\Tests\WebKit2\WebArchive_Bundle.cpp"
- >
- </File>
- </Filter>
- </Filter>
- <File
- RelativePath="..\InjectedBundleController.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundleController.h"
- >
- </File>
- <File
- RelativePath="..\InjectedBundleMain.cpp"
- >
- </File>
- <File
- RelativePath="..\InjectedBundleTest.h"
- >
- </File>
- <File
- RelativePath="..\PlatformUtilities.cpp"
- >
- </File>
- <File
- RelativePath="..\PlatformUtilities.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/TestWebKitAPI/win/copy-resources.cmd b/Tools/TestWebKitAPI/win/copy-resources.cmd
deleted file mode 100755
index deaf74468..000000000
--- a/Tools/TestWebKitAPI/win/copy-resources.cmd
+++ /dev/null
@@ -1,31 +0,0 @@
-@echo off
-
-set ResourcesDirectory=%CONFIGURATIONBUILDDIR%\bin\TestWebKitAPI.resources
-
-if "%1" EQU "clean" goto :clean
-if "%1" EQU "rebuild" call :clean
-
-echo Copying resources...
-mkdir 2>NUL "%ResourcesDirectory%"
-for %%f in (
- ..\Tests\WebKit2\18-characters.html
- ..\Tests\WebKit2\file-with-anchor.html
- ..\Tests\WebKit2\find.html
- ..\Tests\WebKit2\icon.png
- ..\Tests\WebKit2\mouse-move-listener.html
- ..\Tests\WebKit2\push-state.html
- ..\Tests\WebKit2\simple.html
- ..\Tests\WebKit2\simple-accelerated-compositing.html
- ..\Tests\WebKit2\simple-form.html
- ..\Tests\WebKit2\simple-iframe.html
- ..\Tests\WebKit2\spacebar-scrolling.html
-) do (
- xcopy /y /d %%f "%ResourcesDirectory%"
-)
-
-goto :EOF
-
-:clean
-
-echo Deleting resources...
-del /s /q "%ResourcesDirectory%"
diff --git a/Tools/TestWebKitAPI/win/main.cpp b/Tools/TestWebKitAPI/win/main.cpp
index 6782c476e..265471bd0 100644
--- a/Tools/TestWebKitAPI/win/main.cpp
+++ b/Tools/TestWebKitAPI/win/main.cpp
@@ -25,6 +25,22 @@
#include "config.h"
#include "TestsController.h"
+#include <windows.h>
+
+#if defined _M_IX86
+#define PROCESSORARCHITECTURE "x86"
+#elif defined _M_IA64
+#define PROCESSORARCHITECTURE "ia64"
+#elif defined _M_X64
+#define PROCESSORARCHITECTURE "amd64"
+#else
+#define PROCESSORARCHITECTURE "*"
+#endif
+
+#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='1fc8b3b9a1e18e3b' language='*'\"")
+#endif
int main(int argc, char** argv)
{
diff --git a/Tools/Tools.pro b/Tools/Tools.pro
index 2868f8c9d..5e2a45d73 100644
--- a/Tools/Tools.pro
+++ b/Tools/Tools.pro
@@ -10,7 +10,6 @@ CONFIG += ordered
build?(webkit1) {
build?(testbrowser): SUBDIRS += QtTestBrowser/QtTestBrowser.pro
build?(drt): SUBDIRS += DumpRenderTree/qt/DumpRenderTree.pro
- build?(imagediff): SUBDIRS += DumpRenderTree/qt/ImageDiff.pro
}
build?(webkit2) {
@@ -21,8 +20,17 @@ build?(webkit2) {
have?(QTQUICK): SUBDIRS += MiniBrowser/qt/MiniBrowser.pro
SUBDIRS += MiniBrowser/qt/raw/MiniBrowserRaw.pro
}
+
+ !production_build {
+ # Only tested on Linux so far.
+ linux* {
+ SUBDIRS += TestWebKitAPI
+ }
+ }
}
+build?(imagediff): SUBDIRS += ImageDiff/ImageDiff.pro
+
build?(test_npapi): SUBDIRS += DumpRenderTree/qt/TestNetscapePlugin/TestNetscapePlugin.pro
OTHER_FILES = \
diff --git a/Tools/WebKitLauncher/Configurations/Base.xcconfig b/Tools/WebKitLauncher/Configurations/Base.xcconfig
index 149eb8205..5aceb3bd0 100644
--- a/Tools/WebKitLauncher/Configurations/Base.xcconfig
+++ b/Tools/WebKitLauncher/Configurations/Base.xcconfig
@@ -21,19 +21,17 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-ARCHS = $(ARCHS_STANDARD_32_64_BIT);
+ARCHS = i386 x86_64;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
GCC_DEBUGGING_SYMBOLS = full;
GCC_MODEL_TUNING = G5;
GCC_PREPROCESSOR_DEFINITIONS = ENABLE_SPARKLE=$(ENABLE_SPARKLE);
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
-GCC_VERSION = 4.0;
-GCC_VERSION[arch=x86_64] = 4.2;
-MACOSX_DEPLOYMENT_TARGET = 10.4;
-MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.5;
+GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+MACOSX_DEPLOYMENT_TARGET = 10.6;
PREBINDING = NO;
-SDKROOT = macosx10.5;
+SDKROOT = macosx;
WARNING_CFLAGS = -Wall;
ENABLE_SPARKLE = 0;
diff --git a/Tools/WebKitLauncher/Configurations/WebKitLauncher.xcconfig b/Tools/WebKitLauncher/Configurations/WebKitLauncher.xcconfig
index c4dde36fe..fd0124e98 100644
--- a/Tools/WebKitLauncher/Configurations/WebKitLauncher.xcconfig
+++ b/Tools/WebKitLauncher/Configurations/WebKitLauncher.xcconfig
@@ -24,4 +24,3 @@
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = WebKit;
WRAPPER_EXTENSION = app;
-MACOSX_DEPLOYMENT_TARGET[arch=ppc] = 10.2;
diff --git a/Tools/WebKitLauncher/Info.plist b/Tools/WebKitLauncher/Info.plist
index 83564a7f9..7141ec8e5 100644
--- a/Tools/WebKitLauncher/Info.plist
+++ b/Tools/WebKitLauncher/Info.plist
@@ -428,13 +428,9 @@
<array>
<string>x86_64</string>
<string>i386</string>
- <string>ppc</string>
</array>
- <key>LSMinimumSystemVersionByArchitecture</key>
- <dict>
- <key>x86_64</key>
- <string>10.6</string>
- </dict>
+ <key>LSMinimumSystemVersion</key>
+ <string>10.6</string>
<key>SUFeedURL</key>
<string>http://nightly.webkit.org/builds/trunk/mac/rss</string>
<key>SUShowReleaseNotes</key>
diff --git a/Tools/WebKitLauncher/Makefile b/Tools/WebKitLauncher/Makefile
new file mode 100644
index 000000000..e489fc4bf
--- /dev/null
+++ b/Tools/WebKitLauncher/Makefile
@@ -0,0 +1,3 @@
+SCRIPTS_PATH = ../Scripts
+
+include ../../Makefile.shared
diff --git a/Tools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj b/Tools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
index c130f459e..71fc11125 100644
--- a/Tools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
+++ b/Tools/WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj
@@ -33,6 +33,7 @@
5DA88F6E0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DA88F6C0FC8136000AB2F62 /* WebKitNightlyEnablerSparkle.m */; };
5DA88F7A0FC813EB00AB2F62 /* WebKitNightlyEnabler.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DA88F790FC813EB00AB2F62 /* WebKitNightlyEnabler.h */; };
5DB70525097B94CD009875EC /* webkit.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5DB70524097B94CD009875EC /* webkit.icns */; };
+ 5DE0853815AE0AA0000A27B4 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DE0853715AE0AA0000A27B4 /* Security.framework */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
@@ -78,6 +79,7 @@
5DA88F7F0FC8176100AB2F62 /* WebKitLauncher.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKitLauncher.xcconfig; sourceTree = "<group>"; };
5DA88F800FC8176100AB2F62 /* WebKitNightlyEnabler.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebKitNightlyEnabler.xcconfig; sourceTree = "<group>"; };
5DB70524097B94CD009875EC /* webkit.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = webkit.icns; sourceTree = "<group>"; };
+ 5DE0853715AE0AA0000A27B4 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
5DE79BEB0F1C63CC0067BE08 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Sparkle.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* WebKit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WebKit.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -96,6 +98,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 5DE0853815AE0AA0000A27B4 /* Security.framework in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -124,6 +127,7 @@
29B97314FDCFA39411CA2CEA /* WebKit */ = {
isa = PBXGroup;
children = (
+ 5DE0853715AE0AA0000A27B4 /* Security.framework */,
29B97315FDCFA39411CA2CEA /* Source */,
5DA88F7D0FC8174E00AB2F62 /* Configurations */,
29B97317FDCFA39411CA2CEA /* Resources */,
@@ -150,10 +154,10 @@
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
+ 5D41141B0A50A9DE00C84CF0 /* VERSION */,
8D1107310486CEB800E47090 /* Info.plist */,
5D18A1FE103FE255006CA7C7 /* nightly.webkit.org.public.pem */,
5D4DF981097F89FB0083D5E5 /* start.html */,
- 5D41141B0A50A9DE00C84CF0 /* VERSION */,
5DB70524097B94CD009875EC /* webkit.icns */,
);
name = Resources;
@@ -237,6 +241,9 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "WebKitLauncher" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
@@ -263,11 +270,11 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ 5D18A1FF103FE255006CA7C7 /* nightly.webkit.org.public.pem in Resources */,
5D4DF982097F89FB0083D5E5 /* start.html in Resources */,
5D41141C0A50A9DE00C84CF0 /* VERSION in Resources */,
5DB70525097B94CD009875EC /* webkit.icns in Resources */,
5D650F3A09DB8B410075E9A8 /* WebKitNightlyEnabler.dylib in Resources */,
- 5D18A1FF103FE255006CA7C7 /* nightly.webkit.org.public.pem in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/WebKitLauncher/WebKitLauncherURLProtocol.m b/Tools/WebKitLauncher/WebKitLauncherURLProtocol.m
index 9e5685774..f1a945fd1 100644
--- a/Tools/WebKitLauncher/WebKitLauncherURLProtocol.m
+++ b/Tools/WebKitLauncher/WebKitLauncherURLProtocol.m
@@ -31,6 +31,10 @@
#import <Sparkle/Sparkle.h>
#endif
+@interface NSObject (WKBrowsingContextControllerMethods)
++ (void)registerSchemeForCustomProtocol:(NSString *)scheme;
+@end
+
@interface WebKitLauncherURLProtocol (ImplementationDetails)
-(void)handleIsWebKitLauncherAvailableJS;
-(void)handleCheckForUpdates;
@@ -41,6 +45,7 @@
+(void)load
{
+ [NSClassFromString(@"WKBrowsingContextController") registerSchemeForCustomProtocol:@"x-webkit-launcher"];
[NSURLProtocol registerClass:self];
}
@@ -53,6 +58,9 @@
if (!mainDocumentURL)
return NO;
+ if ([[mainDocumentURL scheme] isEqualToString:@"file"])
+ return YES;
+
NSString *mainDocumentHost = [mainDocumentURL host];
if (![mainDocumentHost isEqualToString:@"webkit.org"] && ![mainDocumentHost hasSuffix:@".webkit.org"])
return NO;
@@ -73,6 +81,10 @@
[self handleIsWebKitLauncherAvailableJS];
return;
}
+ if ([resourceSpecifier isEqualToString:@"webkit-version-information.js"]) {
+ [self handleWebKitVersionInformation];
+ return;
+ }
#if ENABLE_SPARKLE
if ([resourceSpecifier isEqualToString:@"check-for-updates"]) {
[self handleCheckForUpdates];
@@ -98,6 +110,26 @@
[client URLProtocolDidFinishLoading:self];
}
+-(void)handleWebKitVersionInformation
+{
+ id client = [self client];
+ NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[[self request] URL] MIMEType:@"text/javascript" expectedContentLength:0 textEncodingName:@"utf-8"];
+ [client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageAllowed];
+ [response release];
+
+ NSBundle *bundle = webKitLauncherBundle();
+ int revision = [[[bundle infoDictionary] valueForKey:(NSString *)kCFBundleVersionKey] intValue];
+ NSString *branch = [NSString stringWithContentsOfURL:[bundle URLForResource:@"BRANCH" withExtension:nil] encoding:NSUTF8StringEncoding error:0];
+ branch = [branch stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
+ if (!branch)
+ branch = @"trunk";
+
+ NSString *script = [NSString stringWithFormat:@"var webKitRevision = %d; var webKitBranch = \"%@\";", revision, branch];
+ NSData *data = [script dataUsingEncoding:NSUTF8StringEncoding];
+ [client URLProtocol:self didLoadData:data];
+ [client URLProtocolDidFinishLoading:self];
+}
+
#if ENABLE_SPARKLE
-(void)handleCheckForUpdates
{
@@ -115,7 +147,7 @@
-(void)resourceNotFound
{
id client = [self client];
- NSDictionary *infoDictionary = [NSDictionary dictionaryWithObject:NSErrorFailingURLStringKey forKey:[[self request] URL]];
+ NSDictionary *infoDictionary = [NSDictionary dictionaryWithObject:NSURLErrorFailingURLStringErrorKey forKey:[[self request] URL]];
NSError *error = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorFileDoesNotExist userInfo:infoDictionary];
[client URLProtocol:self didFailWithError:error];
}
diff --git a/Tools/WebKitLauncher/WebKitNightlyEnablerSparkle.m b/Tools/WebKitLauncher/WebKitNightlyEnablerSparkle.m
index 8b13ab8ba..d60407255 100644
--- a/Tools/WebKitLauncher/WebKitNightlyEnablerSparkle.m
+++ b/Tools/WebKitLauncher/WebKitNightlyEnablerSparkle.m
@@ -102,19 +102,6 @@ static id updateAlertInitForAlertPanel(id self, SEL _cmd, id updateItem, id host
@end
-#if __LP64__
-
-#define setMethodImplementation method_setImplementation
-
-#else
-
-static void setMethodImplementation(Method m, IMP imp)
-{
- m->method_imp = imp;
-}
-
-#endif
-
static NSString *userAgentStringForSparkle()
{
NSBundle *safariBundle = [NSBundle mainBundle];
@@ -130,10 +117,10 @@ void initializeSparkle()
{
// Override some Sparkle behaviour
Method methodToPatch = class_getInstanceMethod(objc_getRequiredClass("SUUpdatePermissionPrompt"), @selector(promptDescription));
- setMethodImplementation(methodToPatch, (IMP)updatePermissionPromptDescription);
+ method_setImplementation(methodToPatch, (IMP)updatePermissionPromptDescription);
methodToPatch = class_getInstanceMethod(objc_getRequiredClass("SUUpdateAlert"), @selector(initWithAppcastItem:host:));
- setMethodImplementation(methodToPatch, (IMP)updateAlertInitForAlertPanel);
+ method_setImplementation(methodToPatch, (IMP)updateAlertInitForAlertPanel);
SUUpdater *updater = [SUUpdater updaterForBundle:webKitLauncherBundle()];
[updater setUserAgentString:userAgentStringForSparkle()];
diff --git a/Tools/WebKitLauncher/main.m b/Tools/WebKitLauncher/main.m
index 4fee68a27..45e4a0d74 100644
--- a/Tools/WebKitLauncher/main.m
+++ b/Tools/WebKitLauncher/main.m
@@ -157,13 +157,39 @@ static NSBundle *locateSafariBundle()
return safariBundle;
}
+static NSString *determineExecutablePath(NSBundle *bundle)
+{
+ NSString *safariExecutablePath = [bundle executablePath];
+
+ NSString *safariForWebKitDevelopmentExecutablePath = [bundle pathForAuxiliaryExecutable:@"SafariForWebKitDevelopment"];
+ if (![[NSFileManager defaultManager] fileExistsAtPath:safariForWebKitDevelopmentExecutablePath])
+ return safariExecutablePath;
+
+ SecStaticCodeRef staticCode;
+ if (SecStaticCodeCreateWithPath((CFURLRef)[bundle executableURL], kSecCSDefaultFlags, &staticCode) != noErr)
+ return [bundle executablePath];
+
+ NSDictionary *codeInformation;
+ if (SecCodeCopySigningInformation(staticCode, kSecCSRequirementInformation, (CFDictionaryRef*)&codeInformation) != noErr) {
+ CFRelease(staticCode);
+ return safariExecutablePath;
+ }
+ CFRelease(staticCode);
+ [codeInformation autorelease];
+
+ if ([codeInformation objectForKey:(id)kSecCodeInfoEntitlements])
+ return safariForWebKitDevelopmentExecutablePath;
+
+ return safariExecutablePath;
+}
+
static NSString *currentMacOSXVersion()
{
SInt32 version;
if (Gestalt(gestaltSystemVersion, &version) != noErr)
return @"10.4";
- return [NSString stringWithFormat:@"%x.%x", (version & 0xFF00) >> 8, (version & 0x00F0) >> 4];
+ return [NSString stringWithFormat:@"%lx.%lx", (long)(version & 0xFF00) >> 8, (long)(version & 0x00F0) >> 4l];
}
static NSString *fallbackMacOSXVersion(NSString *systemVersion)
@@ -209,13 +235,13 @@ int main(int argc, char *argv[])
}
if (!frameworkPathIsUsable)
- displayErrorAndQuit([NSString stringWithFormat:@"Mac OS X %@ is not supported", systemVersion],
- [NSString stringWithFormat:@"Nightly builds of WebKit are not supported on Mac OS X %@ at this time.", systemVersion]);
+ displayErrorAndQuit([NSString stringWithFormat:@"OS X %@ is not supported", systemVersion],
+ [NSString stringWithFormat:@"Nightly builds of WebKit are not supported on OS X %@ at this time.", systemVersion]);
NSString *pathToEnablerLib = [[NSBundle mainBundle] pathForResource:@"WebKitNightlyEnabler" ofType:@"dylib"];
NSBundle *safariBundle = locateSafariBundle();
- NSString *executablePath = [safariBundle executablePath];
+ NSString *executablePath = determineExecutablePath(safariBundle);
if (!checkSafariVersion(safariBundle)) {
NSString *safariVersion = [[safariBundle localizedInfoDictionary] objectForKey:@"CFBundleShortVersionString"];
diff --git a/Tools/WebKitLauncher/start.html b/Tools/WebKitLauncher/start.html
index 2c94e7976..bdb593e74 100644
--- a/Tools/WebKitLauncher/start.html
+++ b/Tools/WebKitLauncher/start.html
@@ -1,31 +1,15 @@
<html>
<head>
<title>Loading WebKit...</title>
- <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/" />
+ <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/">
<script type="text/javascript">
- function getWebKitRevision()
- {
- var request = new XMLHttpRequest();
- request.open("GET", "VERSION", false);
- request.send();
- var revision = parseInt(request.responseText);
- if (isNaN(revision))
- return "";
-
- return revision;
+ var script = document.createElement('script');
+ script.src = "x-webkit-launcher:webkit-version-information.js";
+ script.onload = function() {
+ if (webKitBranch && webKitRevision)
+ document.location = "http://nightly.webkit.org/start/" + webKitBranch + "/" + webKitRevision;
}
-
- function getWebKitBranch()
- {
- var request = new XMLHttpRequest();
- request.open("GET", "BRANCH", false);
- request.send();
- return (request.responseText || "trunk").replace(/\s/g, '')
- }
-
- var revision = getWebKitRevision();
- var branch = getWebKitBranch();
- document.location = "http://nightly.webkit.org/start/" + branch + "/" + revision;
+ document.documentElement.appendChild(script);
</script>
</head>
<body>
diff --git a/Tools/WebKitLauncherWin/Resource.h b/Tools/WebKitLauncherWin/Resource.h
deleted file mode 100644
index f0c38ab2b..000000000
--- a/Tools/WebKitLauncherWin/Resource.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by WebKitLauncherWin.rc
-//
-
-#define IDI_WEBKITLAUNCHERWIN 107
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-
-#define _APS_NO_MFC 130
-#define _APS_NEXT_RESOURCE_VALUE 129
-#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 110
-#endif
-#endif
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWin.cpp b/Tools/WebKitLauncherWin/WebKitLauncherWin.cpp
deleted file mode 100644
index 5ebd93c25..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWin.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (C) 2009 Apple 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.
- */
-
-#include "resource.h"
-#include <shlwapi.h>
-#include <string>
-#include <tchar.h>
-#include <vector>
-#include <windows.h>
-
-using namespace std;
-
-typedef basic_string<TCHAR> tstring;
-
-static tstring getStringValue(HKEY key, const tstring& valueName)
-{
- DWORD type = 0;
- DWORD bufferSize = 0;
- if (RegQueryValueEx(key, valueName.c_str(), 0, &type, 0, &bufferSize) != ERROR_SUCCESS || type != REG_SZ)
- return tstring();
-
- vector<TCHAR> buffer(bufferSize / sizeof(TCHAR));
- if (RegQueryValueEx(key, valueName.c_str(), 0, &type, reinterpret_cast<LPBYTE>(&buffer[0]), &bufferSize) != ERROR_SUCCESS)
- return tstring();
-
- return &buffer[0];
-}
-
-static tstring applePathFromRegistry(const tstring& key, const tstring& value)
-{
- HKEY applePathKey = 0;
- LONG error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, key.c_str(), 0, KEY_READ, &applePathKey);
- if (error != ERROR_SUCCESS)
- return tstring();
- tstring path = getStringValue(applePathKey, value);
- RegCloseKey(applePathKey);
- return path;
-}
-
-static tstring safariInstallDir()
-{
- return applePathFromRegistry(TEXT("SOFTWARE\\Apple Computer, Inc.\\Safari"), TEXT("InstallDir"));
-}
-
-static tstring safariBrowserExe()
-{
- return applePathFromRegistry(TEXT("SOFTWARE\\Apple Computer, Inc.\\Safari"), TEXT("BrowserExe"));
-}
-
-int APIENTRY _tWinMain(HINSTANCE instance, HINSTANCE, LPTSTR commandLine, int)
-{
- tstring path = safariInstallDir();
- tstring browserExe = safariBrowserExe();
- if (path.empty() || browserExe.empty()) {
- MessageBox(0, TEXT("Safari must be installed to run a WebKit nightly. You can download Safari from http://www.apple.com/safari/download"), TEXT("Safari not found"), MB_ICONSTOP);
- return 1;
- }
-
- // Set WEBKITNIGHTLY environment variable to point to the nightly bits
- TCHAR exePath[MAX_PATH];
- if (!GetModuleFileName(0, exePath, ARRAYSIZE(exePath)))
- return 1;
- if (!PathRemoveFileSpec(exePath))
- return 1;
- SetEnvironmentVariable(TEXT("WEBKITNIGHTLY"), exePath);
-
- tstring finalCommandLine = TEXT('"') + browserExe + TEXT("\" ") + commandLine;
-
- // Launch Safari as a child process
- STARTUPINFO startupInfo = {0};
- startupInfo.cb = sizeof(startupInfo);
- PROCESS_INFORMATION processInfo = {0};
- if (!CreateProcess(browserExe.c_str(), const_cast<LPTSTR>(finalCommandLine.c_str()), 0, 0, FALSE, NORMAL_PRIORITY_CLASS | CREATE_UNICODE_ENVIRONMENT, 0, path.c_str(), &startupInfo, &processInfo))
- MessageBox(0, TEXT("Safari could not be launched. Please make sure you have the latest version of Safari installed and try again. You can download Safari from http://www.apple.com/safari/download"), TEXT("Safari launch failed"), MB_ICONSTOP);
-
- return 0;
-}
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWin.rc b/Tools/WebKitLauncherWin/WebKitLauncherWin.rc
deleted file mode 100644
index 65a2dfaaa..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWin.rc
+++ /dev/null
@@ -1,70 +0,0 @@
-//Microsoft Visual C++ generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE 9, 1
-#pragma code_page(1252)
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-
-IDI_WEBKITLAUNCHERWIN ICON "webkit.ico"
-
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj b/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj
deleted file mode 100644
index 0b451b6a4..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWin.vcproj
+++ /dev/null
@@ -1,426 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWin"
- ProjectGUID="{D09806DB-E58B-4646-8C9B-61101906C1E2}"
- RootNamespace="WebKitLauncherWin"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WebKitLauncherWinRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WebKitLauncherWinProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WebKitLauncherWinDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WebKitLauncherWinDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WebKitLauncherWinReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WebKitLauncherWinDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\WebKitLauncherWin.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\Resource.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\webkit.ico"
- >
- </File>
- <File
- RelativePath=".\WebKitLauncherWin.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinCommon.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinCommon.vsprops
deleted file mode 100644
index f010652f4..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinCommon.vsprops
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinCommon"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib"
- OutputFile="$(OutDir)\WebKit$(WebKitConfigSuffix).exe"
- ProgramDatabaseFile="$(TargetDir)$(ProjectName)$(WebKitConfigSuffix).pdb"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops
deleted file mode 100644
index 4f3deef1d..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WebKitLauncherWinCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops
deleted file mode 100644
index 26fadca30..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\WebKitLauncherWinCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops
deleted file mode 100644
index e675de296..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\WebKitLauncherWinCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops
deleted file mode 100644
index 5e884454e..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\WebKitLauncherWinCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops
deleted file mode 100644
index 1471e2f70..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WebKitLauncherWinCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops b/Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops
deleted file mode 100644
index 3056e1983..000000000
--- a/Tools/WebKitLauncherWin/WebKitLauncherWinReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WebKitLauncherWinReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\WebKitLauncherWinCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WebKitLauncherWin/webkit.ico b/Tools/WebKitLauncherWin/webkit.ico
deleted file mode 100644
index b86c9bb09..000000000
--- a/Tools/WebKitLauncherWin/webkit.ico
+++ /dev/null
Binary files differ
diff --git a/Tools/WebKitTestRunner/CMakeLists.txt b/Tools/WebKitTestRunner/CMakeLists.txt
index 84404e848..07b647b80 100644
--- a/Tools/WebKitTestRunner/CMakeLists.txt
+++ b/Tools/WebKitTestRunner/CMakeLists.txt
@@ -1,9 +1,9 @@
-SET(WEBKIT_TESTRUNNER_DIR "${TOOLS_DIR}/WebKitTestRunner")
-SET(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR "${TOOLS_DIR}/WebKitTestRunner/InjectedBundle")
+set(WEBKIT_TESTRUNNER_DIR "${TOOLS_DIR}/WebKitTestRunner")
+set(WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR "${TOOLS_DIR}/WebKitTestRunner/InjectedBundle")
-FILE(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/InjectedBundle)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/InjectedBundle)
-SET(WebKitTestRunner_SOURCES
+set(WebKitTestRunner_SOURCES
${WEBKIT_TESTRUNNER_DIR}/CyclicRedundancyCheck.cpp
${WEBKIT_TESTRUNNER_DIR}/GeolocationProviderMock.cpp
${WEBKIT_TESTRUNNER_DIR}/PixelDumpSupport.cpp
@@ -13,14 +13,14 @@ SET(WebKitTestRunner_SOURCES
${WEBKIT_TESTRUNNER_DIR}/WorkQueueManager.cpp
)
-SET(WebKitTestRunner_LIBRARIES
- ${JavaScriptCore_LIBRARY_NAME}
- ${WebCore_LIBRARY_NAME}
- ${WebCoreTestSupport_LIBRARY_NAME}
- ${WebKit2_LIBRARY_NAME}
+set(WebKitTestRunner_LIBRARIES
+ JavaScriptCore
+ WebCore
+ WebCoreTestSupport
+ WebKit2
)
-SET(WebKitTestRunner_INCLUDE_DIRECTORIES
+set(WebKitTestRunner_INCLUDE_DIRECTORIES
${WEBKIT_TESTRUNNER_DIR}
${WEBKIT_TESTRUNNER_DIR}/InjectedBundle
${WEBKIT_TESTRUNNER_DIR}/InjectedBundle/Bindings
@@ -36,9 +36,12 @@ SET(WebKitTestRunner_INCLUDE_DIRECTORIES
${WEBCORE_DIR}/testing/js
${WEBKIT2_DIR}/Shared
${WEBKIT2_DIR}/Shared/API/c
+ ${WEBKIT2_DIR}/Shared/Plugins
${WEBKIT2_DIR}/UIProcess
${WEBKIT2_DIR}/UIProcess/API/C/efl
${WEBKIT2_DIR}/UIProcess/API/C/soup
+ ${WEBKIT2_DIR}/WebProcess/InjectedBundle
+ ${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/c
${WTF_DIR}
${DERIVED_SOURCES_WEBCORE_DIR}
${DERIVED_SOURCES_WEBCORE_DIR}/include
@@ -49,7 +52,7 @@ SET(WebKitTestRunner_INCLUDE_DIRECTORIES
${LIBSOUP_INCLUDE_DIRS}
)
-SET(WebKitTestRunnerInjectedBundle_SOURCES
+set(WebKitTestRunnerInjectedBundle_SOURCES
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityController.cpp
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarker.cpp
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/AccessibilityTextMarkerRange.cpp
@@ -65,7 +68,7 @@ SET(WebKitTestRunnerInjectedBundle_SOURCES
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/JSWrapper.cpp
)
-SET(WebKitTestRunnerInjectedBundle_IDL_FILES
+set(WebKitTestRunnerInjectedBundle_IDL_FILES
"${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityController.idl"
"${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityTextMarker.idl"
"${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/AccessibilityTextMarkerRange.idl"
@@ -76,23 +79,33 @@ SET(WebKitTestRunnerInjectedBundle_IDL_FILES
"${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings/TextInputController.idl"
)
+set(WebKitTestRunnerInjectedBundle_LIBRARIES
+ ${WebKitTestRunner_LIBRARIES}
+ ${ATK_LIBRARIES}
+ ${ECORE_LIBRARIES}
+ ${ECORE_FILE_LIBRARIES}
+ ${FONTCONFIG_LIBRARIES}
+ ${GLIB_LIBRARIES}
+ ${GLIB_GOBJECT_LIBRARIES}
+)
+
GENERATE_BINDINGS(WebKitTestRunnerInjectedBundle_SOURCES
"${WebKitTestRunnerInjectedBundle_IDL_FILES}"
"${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
"--include=${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/Bindings"
"${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}"
${DERIVED_SOURCES_DIR}/InjectedBundle JS TestRunner
- )
+ ${WEBCORE_DIR}/bindings/scripts/IDLAttributes.txt)
INCLUDE_IF_EXISTS(${WEBKIT_TESTRUNNER_DIR}/Platform${PORT}.cmake)
-INCLUDE_DIRECTORIES(${WebKitTestRunner_INCLUDE_DIRECTORIES})
+include_directories(${WebKitTestRunner_INCLUDE_DIRECTORIES})
-ADD_LIBRARY(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
-TARGET_LINK_LIBRARIES(TestRunnerInjectedBundle ${WebKitTestRunner_LIBRARIES})
+add_library(TestRunnerInjectedBundle SHARED ${WebKitTestRunnerInjectedBundle_SOURCES})
+target_link_libraries(TestRunnerInjectedBundle ${WebKitTestRunnerInjectedBundle_LIBRARIES})
-ADD_EXECUTABLE(WebKitTestRunner ${WebKitTestRunner_SOURCES})
-TARGET_LINK_LIBRARIES(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
+add_executable(WebKitTestRunner ${WebKitTestRunner_SOURCES})
+target_link_libraries(WebKitTestRunner ${WebKitTestRunner_LIBRARIES})
-ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingHeadersForWebKitTestRunner_NAME})
-ADD_DEPENDENCIES(${WebKit2_LIBRARY_NAME} ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
+add_dependencies(WebKit2 ${ForwardingHeadersForWebKitTestRunner_NAME})
+add_dependencies(WebKit2 ${ForwardingNetworkHeadersForWebKitTestRunner_NAME})
diff --git a/Tools/WebKitTestRunner/EventSenderProxy.h b/Tools/WebKitTestRunner/EventSenderProxy.h
index 92fe2d077..bb814a8fc 100644
--- a/Tools/WebKitTestRunner/EventSenderProxy.h
+++ b/Tools/WebKitTestRunner/EventSenderProxy.h
@@ -32,7 +32,7 @@
#include <QTouchEvent>
#elif PLATFORM(GTK)
#include <gdk/gdk.h>
-#include <wtf/Vector.h>
+#include <wtf/Deque.h>
#elif PLATFORM(EFL)
#include <WebKit2/EWebKit2.h>
#include <wtf/Deque.h>
@@ -114,7 +114,7 @@ private:
#if PLATFORM(MAC)
int eventNumber;
#elif PLATFORM(GTK)
- Vector<WTREventQueueItem> m_eventQueue;
+ Deque<WTREventQueueItem> m_eventQueue;
unsigned m_mouseButtonCurrentlyDown;
#elif PLATFORM(QT)
Qt::MouseButtons m_mouseButtons;
diff --git a/Tools/WebKitTestRunner/GNUmakefile.am b/Tools/WebKitTestRunner/GNUmakefile.am
index 37060034d..8e3888867 100644
--- a/Tools/WebKitTestRunner/GNUmakefile.am
+++ b/Tools/WebKitTestRunner/GNUmakefile.am
@@ -1,9 +1,9 @@
-BUILT_SOURCES += \
- generate-webkittestrunner-forwarding-headers
-generate-webkittestrunner-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_WebKitTestRunner_SOURCES)
- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include gtk
- $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include soup
+stamp-webkittestrunner-forwarding-headers: $(WebKit2)/Scripts/generate-forwarding-headers.pl $(Programs_WebKitTestRunner_SOURCES) $(Libraries_libTestRunnerInjectedBundle_la_SOURCES)
+ $(AM_V_GEN)$(PERL) $< $(srcdir)/Tools/WebKitTestRunner $(GENSOURCES_WEBKIT2)/include gtk \
+ && echo timestamp > $(@F)
+
+BUILT_SOURCES += $(top_builddir)/stamp-webkittestrunner-forwarding-headers
if ENABLE_WEBKIT2
noinst_PROGRAMS += \
@@ -105,6 +105,8 @@ Libraries_libTestRunnerInjectedBundle_la_SOURCES = \
Tools/WebKitTestRunner/InjectedBundle/GCController.h \
Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp \
Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleGtk.cpp \
+ Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp \
+ Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h \
Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp \
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp \
Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h \
diff --git a/Tools/WebKitTestRunner/GeolocationProviderMock.cpp b/Tools/WebKitTestRunner/GeolocationProviderMock.cpp
index 7fa0bdba9..7111d4872 100644
--- a/Tools/WebKitTestRunner/GeolocationProviderMock.cpp
+++ b/Tools/WebKitTestRunner/GeolocationProviderMock.cpp
@@ -58,6 +58,11 @@ GeolocationProviderMock::GeolocationProviderMock(WKContextRef context)
WKGeolocationManagerSetProvider(m_geolocationManager, &providerCallback);
}
+GeolocationProviderMock::~GeolocationProviderMock()
+{
+ WKGeolocationManagerSetProvider(m_geolocationManager, 0);
+}
+
void GeolocationProviderMock::setPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
{
m_position.adopt(WKGeolocationPositionCreate_b(currentTime(), latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed));
diff --git a/Tools/WebKitTestRunner/GeolocationProviderMock.h b/Tools/WebKitTestRunner/GeolocationProviderMock.h
index 1ebf67d1b..ff5537e46 100644
--- a/Tools/WebKitTestRunner/GeolocationProviderMock.h
+++ b/Tools/WebKitTestRunner/GeolocationProviderMock.h
@@ -33,6 +33,7 @@ namespace WTR {
class GeolocationProviderMock {
public:
GeolocationProviderMock(WKContextRef);
+ ~GeolocationProviderMock();
void setPosition(double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed);
void setPositionUnavailableError(WKStringRef errorMessage);
diff --git a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
index 0964064f1..212e99111 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityController.cpp
@@ -69,6 +69,7 @@ JSClassRef AccessibilityController::wrapperClass()
return JSAccessibilityController::accessibilityControllerClass();
}
+#if !PLATFORM(GTK) && !PLATFORM(EFL)
PassRefPtr<AccessibilityUIElement> AccessibilityController::rootElement()
{
// FIXME: Make this work on Windows.
@@ -94,6 +95,7 @@ PassRefPtr<AccessibilityUIElement> AccessibilityController::focusedElement()
return AccessibilityUIElement::create(static_cast<PlatformUIElement>(root));
#endif
}
+#endif
PassRefPtr<AccessibilityUIElement> AccessibilityController::elementAtPoint(int x, int y)
{
@@ -106,10 +108,13 @@ PassRefPtr<AccessibilityUIElement> AccessibilityController::elementAtPoint(int x
#if !PLATFORM(MAC)
bool AccessibilityController::addNotificationListener(JSValueRef) { return false; }
bool AccessibilityController::removeNotificationListener() { return false; }
+#endif
+
+#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(EFL)
PassRefPtr<AccessibilityUIElement> AccessibilityController::accessibleElementById(JSStringRef attribute) { return 0; }
#endif
-#if !PLATFORM(GTK) && !PLATFORM(EFL)
+#if !PLATFORM(GTK) && !PLATFORM(EFL) && !PLATFORM(MAC)
void AccessibilityController::logAccessibilityEvents() { }
void AccessibilityController::resetToConsistentState() { }
#endif
diff --git a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
index edec732a2..5f149e0d7 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
@@ -85,7 +85,9 @@ double AccessibilityUIElement::numberAttributeValue(JSStringRef) { return 0; }
bool AccessibilityUIElement::boolAttributeValue(JSStringRef) { return false; }
bool AccessibilityUIElement::isAttributeSupported(JSStringRef) { return false; }
bool AccessibilityUIElement::isAttributeSettable(JSStringRef) { return false; }
-bool AccessibilityUIElement::isActionSupported(JSStringRef) { return false; }
+bool AccessibilityUIElement::isPressActionSupported() { return false; }
+bool AccessibilityUIElement::isIncrementActionSupported() { return false; }
+bool AccessibilityUIElement::isDecrementActionSupported() { return false; }
JSRetainPtr<JSStringRef> AccessibilityUIElement::role() { return 0; }
JSRetainPtr<JSStringRef> AccessibilityUIElement::subrole() { return 0; }
JSRetainPtr<JSStringRef> AccessibilityUIElement::roleDescription() { return 0; }
@@ -157,7 +159,7 @@ void AccessibilityUIElement::setSelectedTextRange(unsigned, unsigned) { }
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringForRange(unsigned, unsigned) { return 0; }
JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForRange(unsigned, unsigned) { return 0; }
bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned, unsigned) { return false; }
-PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement*, bool, JSStringRef, JSStringRef) { return 0; }
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement*, bool, JSValueRef, JSStringRef, bool) { return 0; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::cellForColumnAndRow(unsigned, unsigned) { return 0; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::horizontalScrollbar() const { return 0; }
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::verticalScrollbar() const { return 0; }
@@ -177,6 +179,11 @@ bool AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute
int AccessibilityUIElement::indexForTextMarker(AccessibilityTextMarker*) { return -1; }
bool AccessibilityUIElement::isTextMarkerValid(AccessibilityTextMarker*) { return false; }
PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForIndex(int) { return 0; }
+void AccessibilityUIElement::scrollToMakeVisible() { }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::supportedActions() const { return 0; }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPostscriptsDescription() const { return 0; }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPrescriptsDescription() const { return 0; }
+JSRetainPtr<JSStringRef> AccessibilityUIElement::pathDescription() const { return 0; }
#endif
diff --git a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
index 2da56c3d8..67f7fa29b 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
@@ -49,9 +49,10 @@ typedef struct objc_object* PlatformUIElement;
#include <oleacc.h>
typedef COMPtr<IAccessible> PlatformUIElement;
-#elif PLATFORM(GTK) || PLATFORM(EFL)
+#elif PLATFORM(GTK) || (PLATFORM(EFL) && HAVE(ACCESSIBILITY))
#include <atk/atk.h>
-typedef AtkObject* PlatformUIElement;
+#include <wtf/gobject/GRefPtr.h>
+typedef GRefPtr<AtkObject> PlatformUIElement;
#else
typedef void* PlatformUIElement;
#endif
@@ -112,7 +113,9 @@ public:
bool boolAttributeValue(JSStringRef attribute);
bool isAttributeSupported(JSStringRef attribute);
bool isAttributeSettable(JSStringRef attribute);
- bool isActionSupported(JSStringRef action);
+ bool isPressActionSupported();
+ bool isIncrementActionSupported();
+ bool isDecrementActionSupported();
JSRetainPtr<JSStringRef> role();
JSRetainPtr<JSStringRef> subrole();
JSRetainPtr<JSStringRef> roleDescription();
@@ -200,7 +203,7 @@ public:
JSRetainPtr<JSStringRef> stringForRange(unsigned location, unsigned length);
JSRetainPtr<JSStringRef> attributedStringForRange(unsigned location, unsigned length);
bool attributedStringRangeIsMisspelled(unsigned location, unsigned length);
- PassRefPtr<AccessibilityUIElement> uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText);
+ PassRefPtr<AccessibilityUIElement> uiElementForSearchPredicate(JSContextRef, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly);
// Table-specific
PassRefPtr<AccessibilityUIElement> cellForColumnAndRow(unsigned column, unsigned row);
@@ -209,6 +212,8 @@ public:
PassRefPtr<AccessibilityUIElement> horizontalScrollbar() const;
PassRefPtr<AccessibilityUIElement> verticalScrollbar() const;
+ void scrollToMakeVisible();
+
// Text markers.
PassRefPtr<AccessibilityTextMarkerRange> textMarkerRangeForElement(AccessibilityUIElement*);
PassRefPtr<AccessibilityTextMarkerRange> textMarkerRangeForMarkers(AccessibilityTextMarker* startMarker, AccessibilityTextMarker* endMarker);
@@ -225,6 +230,13 @@ public:
bool isTextMarkerValid(AccessibilityTextMarker*);
PassRefPtr<AccessibilityTextMarker> textMarkerForIndex(int);
+ // Returns an ordered list of supported actions for an element.
+ JSRetainPtr<JSStringRef> supportedActions() const;
+ JSRetainPtr<JSStringRef> mathPostscriptsDescription() const;
+ JSRetainPtr<JSStringRef> mathPrescriptsDescription() const;
+
+ JSRetainPtr<JSStringRef> pathDescription() const;
+
// Notifications
// Function callback should take one argument, the name of the notification.
bool addNotificationListener(JSValueRef functionCallback);
@@ -245,7 +257,7 @@ private:
void getDocumentLinks(Vector<RefPtr<AccessibilityUIElement> >&);
#endif
-#if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL)
+#if PLATFORM(MAC) || PLATFORM(GTK) || (PLATFORM(EFL) && HAVE(ACCESSIBILITY))
void getChildren(Vector<RefPtr<AccessibilityUIElement> >&);
void getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >&, unsigned location, unsigned length);
#endif
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl
index 005ec8194..5661c0c8c 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl
@@ -26,10 +26,10 @@
interface AccessibilityController {
readonly attribute AccessibilityUIElement rootElement;
readonly attribute AccessibilityUIElement focusedElement;
- AccessibilityUIElement elementAtPoint(in int x, in int y);
- AccessibilityUIElement accessibleElementById(in DOMString id);
+ AccessibilityUIElement elementAtPoint(int x, int y);
+ AccessibilityUIElement accessibleElementById(DOMString id);
- boolean addNotificationListener(in object functionCallback);
+ boolean addNotificationListener(object functionCallback);
boolean removeNotificationListener();
void logFocusEvents();
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl
index 192fffc73..149c95f34 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarker.idl
@@ -24,6 +24,6 @@
*/
interface AccessibilityTextMarker {
- boolean isEqual(in AccessibilityTextMarker otherMarker);
+ boolean isEqual(AccessibilityTextMarker otherMarker);
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl
index a63a67216..962c584e6 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityTextMarkerRange.idl
@@ -24,6 +24,6 @@
*/
interface AccessibilityTextMarkerRange {
- boolean isEqual(in AccessibilityTextMarkerRange otherMarkerRange);
+ boolean isEqual(AccessibilityTextMarkerRange otherMarkerRange);
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
index 96d8c6269..48f76f246 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
@@ -24,19 +24,19 @@
*/
interface AccessibilityUIElement {
- boolean isEqual(in AccessibilityUIElement otherElement);
+ boolean isEqual(AccessibilityUIElement otherElement);
// Document information
readonly attribute DOMString documentEncoding;
readonly attribute DOMString documentURI;
// Element access.
- AccessibilityUIElement elementAtPoint(in int x, in int y);
- AccessibilityUIElement childAtIndex(in unsigned long index);
- unsigned long indexOfChild(in AccessibilityUIElement child);
- AccessibilityUIElement linkedUIElementAtIndex(in unsigned long index);
- AccessibilityUIElement selectedChildAtIndex(in unsigned long index);
- void setSelectedChild(in AccessibilityUIElement element);
+ AccessibilityUIElement elementAtPoint(int x, int y);
+ AccessibilityUIElement childAtIndex(unsigned long index);
+ unsigned long indexOfChild(AccessibilityUIElement child);
+ AccessibilityUIElement linkedUIElementAtIndex(unsigned long index);
+ AccessibilityUIElement selectedChildAtIndex(unsigned long index);
+ void setSelectedChild(AccessibilityUIElement element);
AccessibilityUIElement titleUIElement();
AccessibilityUIElement parentElement();
@@ -54,13 +54,15 @@ interface AccessibilityUIElement {
readonly attribute int insertionPointLineNumber;
readonly attribute DOMString selectedTextRange;
- DOMString stringAttributeValue(in DOMString attr);
- double numberAttributeValue(in DOMString attr);
- AccessibilityUIElement uiElementAttributeValue(in DOMString attr);
- boolean boolAttributeValue(in DOMString attr);
- boolean isAttributeSupported(in DOMString attr);
- boolean isAttributeSettable(in DOMString attr);
- boolean isActionSupported(in DOMString attr);
+ DOMString stringAttributeValue(DOMString attr);
+ double numberAttributeValue(DOMString attr);
+ AccessibilityUIElement uiElementAttributeValue(DOMString attr);
+ boolean boolAttributeValue(DOMString attr);
+ boolean isAttributeSupported(DOMString attr);
+ boolean isAttributeSettable(DOMString attr);
+ boolean isPressActionSupported();
+ boolean isIncrementActionSupported();
+ boolean isDecrementActionSupported();
readonly attribute DOMString stringValue;
readonly attribute int intValue;
@@ -116,54 +118,63 @@ interface AccessibilityUIElement {
DOMString attributesOfRows();
DOMString attributesOfVisibleCells();
DOMString attributesOfHeader();
- AccessibilityUIElement cellForColumnAndRow(in unsigned long column, in unsigned long row);
- AccessibilityUIElement selectedRowAtIndex(in unsigned long index);
+ AccessibilityUIElement cellForColumnAndRow(unsigned long column, unsigned long row);
+ AccessibilityUIElement selectedRowAtIndex(unsigned long index);
AccessibilityUIElement disclosedByRow();
- AccessibilityUIElement disclosedRowAtIndex(in unsigned long index);
- AccessibilityUIElement rowAtIndex(in unsigned long index);
+ AccessibilityUIElement disclosedRowAtIndex(unsigned long index);
+ AccessibilityUIElement rowAtIndex(unsigned long index);
int indexInTable();
DOMString rowIndexRange();
DOMString columnIndexRange();
int rowCount();
int columnCount();
- AccessibilityUIElement ariaOwnsElementAtIndex(in unsigned long index);
- AccessibilityUIElement ariaFlowToElementAtIndex(in unsigned long index);
+ AccessibilityUIElement ariaOwnsElementAtIndex(unsigned long index);
+ AccessibilityUIElement ariaFlowToElementAtIndex(unsigned long index);
// Paramaterized attributes.
DOMString parameterizedAttributeNames();
- int lineForIndex(in int index);
- DOMString rangeForLine(in int index);
- DOMString rangeForPosition(in int x, in int y);
- DOMString boundsForRange(in unsigned long location, in unsigned long length);
- DOMString stringForRange(in unsigned long location, in unsigned long length);
- DOMString attributedStringForRange(in unsigned long location, in unsigned long length);
- boolean attributedStringRangeIsMisspelled(in unsigned long location, in unsigned long length);
- AccessibilityUIElement uiElementForSearchPredicate(in AccessibilityUIElement startElement, in boolean isDirectionNext, in DOMString searchKey, in DOMString searchText);
- void setSelectedTextRange(in unsigned long location, in unsigned long length);
+ int lineForIndex(int index);
+ DOMString rangeForLine(int index);
+ DOMString rangeForPosition(int x, int y);
+ DOMString boundsForRange(unsigned long location, unsigned long length);
+ DOMString stringForRange(unsigned long location, unsigned long length);
+ DOMString attributedStringForRange(unsigned long location, unsigned long length);
+ boolean attributedStringRangeIsMisspelled(unsigned long location, unsigned long length);
+ [PassContext] AccessibilityUIElement uiElementForSearchPredicate(AccessibilityUIElement startElement, boolean isDirectionNext, object searchKey, DOMString searchText, boolean visibleOnly);
+ void setSelectedTextRange(unsigned long location, unsigned long length);
// Scroll area attributes.
readonly attribute AccessibilityUIElement horizontalScrollbar;
readonly attribute AccessibilityUIElement verticalScrollbar;
+ void scrollToMakeVisible();
+
// Text markers.
- AccessibilityTextMarkerRange textMarkerRangeForElement(in AccessibilityUIElement element);
- AccessibilityTextMarkerRange textMarkerRangeForMarkers(in AccessibilityTextMarker startMarker, in AccessibilityTextMarker endMarker);
- AccessibilityTextMarker startTextMarkerForTextMarkerRange(in AccessibilityTextMarkerRange range);
- AccessibilityTextMarker endTextMarkerForTextMarkerRange(in AccessibilityTextMarkerRange range);
- AccessibilityTextMarker textMarkerForPoint(in int x, in int y);
- AccessibilityTextMarker previousTextMarker(in AccessibilityTextMarker marker);
- AccessibilityTextMarker nextTextMarker(in AccessibilityTextMarker marker);
- AccessibilityUIElement accessibilityElementForTextMarker(in AccessibilityTextMarker marker);
- DOMString stringForTextMarkerRange(in AccessibilityTextMarkerRange range);
- int textMarkerRangeLength(in AccessibilityTextMarkerRange range);
- boolean attributedStringForTextMarkerRangeContainsAttribute(in DOMString attr, in AccessibilityTextMarkerRange range);
- int indexForTextMarker(in AccessibilityTextMarker marker);
- boolean isTextMarkerValid(in AccessibilityTextMarker marker);
- AccessibilityTextMarker textMarkerForIndex(in int textIndex);
+ AccessibilityTextMarkerRange textMarkerRangeForElement(AccessibilityUIElement element);
+ AccessibilityTextMarkerRange textMarkerRangeForMarkers(AccessibilityTextMarker startMarker, AccessibilityTextMarker endMarker);
+ AccessibilityTextMarker startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange range);
+ AccessibilityTextMarker endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange range);
+ AccessibilityTextMarker textMarkerForPoint(int x, int y);
+ AccessibilityTextMarker previousTextMarker(AccessibilityTextMarker marker);
+ AccessibilityTextMarker nextTextMarker(AccessibilityTextMarker marker);
+ AccessibilityUIElement accessibilityElementForTextMarker(AccessibilityTextMarker marker);
+ DOMString stringForTextMarkerRange(AccessibilityTextMarkerRange range);
+ int textMarkerRangeLength(AccessibilityTextMarkerRange range);
+ boolean attributedStringForTextMarkerRangeContainsAttribute(DOMString attr, AccessibilityTextMarkerRange range);
+ int indexForTextMarker(AccessibilityTextMarker marker);
+ boolean isTextMarkerValid(AccessibilityTextMarker marker);
+ AccessibilityTextMarker textMarkerForIndex(int textIndex);
+
+ // Returns an ordered list of supported actions for an element.
+ readonly attribute DOMString supportedActions;
+ readonly attribute DOMString mathPostscriptsDescription;
+ readonly attribute DOMString mathPrescriptsDescription;
+ readonly attribute DOMString pathDescription;
+
// Notification support.
- boolean addNotificationListener(in object callbackFunction);
+ boolean addNotificationListener(object callbackFunction);
boolean removeNotificationListener();
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm b/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
index 7383946b3..3de84d081 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm
@@ -186,7 +186,7 @@ EOF
push(@contents, "\n // Attributes\n\n");
foreach my $attribute (@attributes) {
push(@contents, " static JSValueRef @{[$self->_getterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef*);\n");
- push(@contents, " static bool @{[$self->_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n") unless $attribute->type =~ /^readonly/;
+ push(@contents, " static bool @{[$self->_setterName($attribute)]}(JSContextRef, JSObjectRef, JSStringRef, JSValueRef, JSValueRef*);\n") unless $attribute->isReadOnly;
}
}
@@ -330,7 +330,7 @@ JSValueRef ${className}::${getterName}(JSContextRef context, JSObjectRef object,
}
EOF
- unless ($attribute->type =~ /^readonly/) {
+ unless ($attribute->isReadOnly) {
push(@contents, <<EOF);
bool ${className}::@{[$self->_setterName($attribute)]}(JSContextRef context, JSObjectRef object, JSStringRef, JSValueRef value, JSValueRef* exception)
@@ -416,7 +416,7 @@ sub _parentClassRefGetterExpression
sub _parentInterface
{
my ($interface) = @_;
- return $interface->parents->[0];
+ return $interface->parent;
}
sub _platformType
@@ -555,11 +555,10 @@ sub _staticValuesGetterImplementation
return if $_->signature->extendedAttributes->{"NoImplementation"};
my $attributeName = $_->signature->name;
- my $attributeIsReadonly = $_->type =~ /^readonly/;
my $getterName = $self->_getterName($_);
- my $setterName = $attributeIsReadonly ? "0" : $self->_setterName($_);
+ my $setterName = $_->isReadOnly ? "0" : $self->_setterName($_);
my @attributes = qw(kJSPropertyAttributeDontDelete);
- push(@attributes, "kJSPropertyAttributeReadOnly") if $attributeIsReadonly;
+ push(@attributes, "kJSPropertyAttributeReadOnly") if $_->isReadOnly;
push(@attributes, "kJSPropertyAttributeDontEnum") if $_->signature->extendedAttributes->{"DontEnum"};
return "{ \"$attributeName\", $getterName, $setterName, " . join(" | ", @attributes) . " }";
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl
index 1d62c9b23..b3aa02401 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/EventSendingController.idl
@@ -24,38 +24,39 @@
*/
interface EventSendingController {
- void mouseDown(in long buttonNumber, in object modifierArray);
- void mouseUp(in long buttonNumber, in object modifierArray);
- void mouseMoveTo(in long x, in long y);
- void mouseScrollBy(in long x, in long y);
- void continuousMouseScrollBy(in long x, in long y, in [Optional] boolean paged);
+ void mouseDown(long buttonNumber, object modifierArray);
+ void mouseUp(long buttonNumber, object modifierArray);
+ void mouseMoveTo(long x, long y);
+ void mouseScrollBy(long x, long y);
+ void continuousMouseScrollBy(long x, long y, optional boolean paged);
object contextClick();
void scheduleAsynchronousClick();
- void leapForward(in long milliseconds);
+ void leapForward(long milliseconds);
- void keyDown(in DOMString key, in object modifierArray, in long location);
+ void keyDown(DOMString key, object modifierArray, long location);
+ void scheduleAsynchronousKeyDown(DOMString key);
// Zoom functions.
void textZoomIn();
void textZoomOut();
void zoomPageIn();
void zoomPageOut();
- void scalePageBy(in double scale, in double x, in double y);
+ void scalePageBy(double scale, double x, double y);
#if defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
// Touch events.
- void addTouchPoint(in long x, in long y);
- void updateTouchPoint(in long index, in long x, in long y);
- void setTouchModifier(in DOMString modifier, in boolean enable);
- void setTouchPointRadius(in long radiusX, in long radiusY);
+ void addTouchPoint(long x, long y);
+ void updateTouchPoint(long index, long x, long y);
+ void setTouchModifier(DOMString modifier, boolean enable);
+ void setTouchPointRadius(long radiusX, long radiusY);
void touchStart();
void touchMove();
void touchEnd();
void touchCancel();
void clearTouchPoints();
- void releaseTouchPoint(in long index);
- void cancelTouchPoint(in long index);
+ void releaseTouchPoint(long index);
+ void cancelTouchPoint(long index);
#endif
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/GCController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/GCController.idl
index 6c13b71ac..fb933834d 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/GCController.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/GCController.idl
@@ -25,7 +25,7 @@
interface GCController {
void collect();
- void collectOnAlternateThread(in boolean waitUntilDone);
+ void collectOnAlternateThread(boolean waitUntilDone);
unsigned long long getJSObjectCount();
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
index 354d2b580..d14ab2a97 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
@@ -25,7 +25,7 @@
interface TestRunner {
// The basics.
- void dumpAsText(in boolean dumpPixels);
+ void dumpAsText(boolean dumpPixels);
void dumpChildFramesAsText();
void waitForPolicyDelegate();
void waitUntilDone();
@@ -47,44 +47,42 @@ interface TestRunner {
void dumpWillCacheResponse();
void dumpApplicationCacheDelegateCallbacks();
void dumpDatabaseCallbacks();
+ void dumpDOMAsWebArchive();
// Special options.
void keepWebHistory();
- void setAcceptsEditing(in boolean value);
- void setCanOpenWindows(in boolean value);
- void setCloseRemainingWindowsWhenComplete(in boolean value);
- void setXSSAuditorEnabled(in boolean value);
- void setAllowUniversalAccessFromFileURLs(in boolean value);
- void setAllowFileAccessFromFileURLs(in boolean value);
- void setFrameFlatteningEnabled(in boolean value);
- void setPluginsEnabled(in boolean value);
- void setJavaScriptCanAccessClipboard(in boolean value);
- void setPrivateBrowsingEnabled(in boolean value);
- void setPopupBlockingEnabled(in boolean value);
- void setAuthorAndUserStylesEnabled(in boolean value);
- void setCustomPolicyDelegate(in boolean enabled, in boolean permissive);
- void addOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
- void removeOriginAccessWhitelistEntry(in DOMString sourceOrigin, in DOMString destinationProtocol, in DOMString destinationHost, in boolean allowDestinationSubdomains);
- void setUserStyleSheetEnabled(in boolean value);
- void setUserStyleSheetLocation(in DOMString location);
- void setMinimumTimerInterval(in double interval); // Interval specified in seconds.
- void setSpatialNavigationEnabled(in boolean value);
- void setTabKeyCyclesThroughElements(in boolean enabled);
+ void setAcceptsEditing(boolean value);
+ void setCanOpenWindows(boolean value);
+ void setCloseRemainingWindowsWhenComplete(boolean value);
+ void setXSSAuditorEnabled(boolean value);
+ void setAllowUniversalAccessFromFileURLs(boolean value);
+ void setAllowFileAccessFromFileURLs(boolean value);
+ void setPluginsEnabled(boolean value);
+ void setJavaScriptCanAccessClipboard(boolean value);
+ void setPrivateBrowsingEnabled(boolean value);
+ void setPopupBlockingEnabled(boolean value);
+ void setAuthorAndUserStylesEnabled(boolean value);
+ void setCustomPolicyDelegate(boolean enabled, boolean permissive);
+ void addOriginAccessWhitelistEntry(DOMString sourceOrigin, DOMString destinationProtocol, DOMString destinationHost, boolean allowDestinationSubdomains);
+ void removeOriginAccessWhitelistEntry(DOMString sourceOrigin, DOMString destinationProtocol, DOMString destinationHost, boolean allowDestinationSubdomains);
+ void setUserStyleSheetEnabled(boolean value);
+ void setUserStyleSheetLocation(DOMString location);
+ void setSpatialNavigationEnabled(boolean value);
+ void setTabKeyCyclesThroughElements(boolean enabled);
void setSerializeHTTPLoads();
void dispatchPendingLoadRequests();
- void setCacheModel(in int model);
+ void setCacheModel(int model);
+ void setAsynchronousSpellCheckingEnabled(boolean value);
+ void setPrinting();
// Special DOM functions.
void clearBackForwardList();
- object computedStyleIncludingVisitedInfo(in object element);
- void execCommand(in DOMString name, in DOMString argument);
- boolean isCommandEnabled(in DOMString name);
- DOMString markerTextForListItem(in object element);
+ void execCommand(DOMString name, DOMString argument);
+ boolean isCommandEnabled(DOMString name);
unsigned long windowCount();
// Special DOM variables.
attribute boolean globalFlag;
- readonly attribute unsigned long workerThreadCount;
// Repaint testing.
void testRepaint();
@@ -92,104 +90,108 @@ interface TestRunner {
void display();
// Printing
- boolean isPageBoxVisible(in int pageIndex);
+ boolean isPageBoxVisible(int pageIndex);
- [PassContext] void setValueForUser(in object element, in DOMString value);
-
- // Animation testing.
- int numberOfActiveAnimations();
- boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
- boolean pauseTransitionAtTimeOnElementWithId(in DOMString propertyName, in double time, in DOMString elementId);
- void suspendAnimations();
+ [PassContext] void setValueForUser(object element, DOMString value);
// UserContent testing.
- void addUserScript(in DOMString source, in boolean runAtStart, in boolean allFrames);
- void addUserStyleSheet(in DOMString source, in boolean allFrames);
+ void addUserScript(DOMString source, boolean runAtStart, boolean allFrames);
+ void addUserStyleSheet(DOMString source, boolean allFrames);
// Local storage API
void clearAllDatabases();
- void setDatabaseQuota(in unsigned long long quota);
- DOMString pathToLocalResource(in DOMString url);
+ void setDatabaseQuota(unsigned long long quota);
+ DOMString pathToLocalResource(DOMString url);
// Application Cache API
void clearAllApplicationCaches();
- void setAppCacheMaximumSize(in unsigned long long size);
- long long applicationCacheDiskUsageForOrigin(in DOMString origin);
- void clearApplicationCacheForOrigin(in DOMString name);
- void setApplicationCacheOriginQuota(in unsigned long long bytes);
+ void setAppCacheMaximumSize(unsigned long long size);
+ long long applicationCacheDiskUsageForOrigin(DOMString origin);
+ void clearApplicationCacheForOrigin(DOMString name);
+ void setApplicationCacheOriginQuota(unsigned long long bytes);
void disallowIncreaseForApplicationCacheQuota();
object originsWithApplicationCache();
// Text search testing.
- boolean findString(in DOMString target, in object optionsArray);
+ boolean findString(DOMString target, object optionsArray);
// Evaluating script in a special context.
- [PassContext] void evaluateScriptInIsolatedWorld(in unsigned long worldID, in DOMString script);
+ [PassContext] void evaluateScriptInIsolatedWorld(unsigned long worldID, DOMString script);
// For Web Inspector tests
void showWebInspector();
void closeWebInspector();
- void evaluateInWebInspector(in long callID, in DOMString script);
+ void evaluateInWebInspector(long callID, DOMString script);
- void setPOSIXLocale(in DOMString locale);
+ void setPOSIXLocale(DOMString locale);
- void setTextDirection(in DOMString direction);
+ void setTextDirection(DOMString direction);
- void setWillSendRequestReturnsNull(in boolean flag);
- void setWillSendRequestReturnsNullOnRedirect(in boolean flag);
+ void setWillSendRequestReturnsNull(boolean flag);
+ void setWillSendRequestReturnsNullOnRedirect(boolean flag);
- void setShouldStayOnPageAfterHandlingBeforeUnload(in boolean flag);
+ void setShouldStayOnPageAfterHandlingBeforeUnload(boolean flag);
- void setDefersLoading(in boolean flag);
+ void setDefersLoading(boolean flag);
void setStopProvisionalFrameLoads();
- // Web intents testing.
- void sendWebIntentResponse(in DOMString reply);
- void deliverWebIntent(in DOMString action, in DOMString type, in DOMString data);
-
// Focus testing.
- void addChromeInputField(in object callback);
- void removeChromeInputField(in object callback);
- void focusWebView(in object callback);
+ void addChromeInputField(object callback);
+ void removeChromeInputField(object callback);
+ void focusWebView(object callback);
- void setBackingScaleFactor(in double backingScaleFactor, in object callback);
+ void setBackingScaleFactor(double backingScaleFactor, object callback);
- void setWindowIsKey(in boolean isKey);
+ void setWindowIsKey(boolean isKey);
// Cookies testing
- void setAlwaysAcceptCookies(in boolean accept);
+ void setAlwaysAcceptCookies(boolean accept);
- void overridePreference(in DOMString preference, in DOMString value);
+ void overridePreference(DOMString preference, DOMString value);
// Page Visibility API
- void setPageVisibility(in DOMString state);
+ void setPageVisibility(DOMString state);
void resetPageVisibility();
readonly attribute DOMString platformName;
// Control full screen behavior.
- void setHasCustomFullScreenBehavior(in boolean value);
+ void setHasCustomFullScreenBehavior(boolean value);
// Web notifications support
- void grantWebNotificationPermission(in DOMString origin);
- void denyWebNotificationPermission(in DOMString origin);
+ void grantWebNotificationPermission(DOMString origin);
+ void denyWebNotificationPermission(DOMString origin);
void removeAllWebNotificationPermissions();
- void simulateWebNotificationClick(in object notification);
+ void simulateWebNotificationClick(object notification);
// Geolocation
- void setGeolocationPermission(in boolean value);
- void setMockGeolocationPosition(in double latitude, in double longitude, in double accuracy, in [Optional=DefaultIsUndefined] object altitude, in [Optional] object altitudeAccuracy, in [Optional] object heading, in [Optional] object speed);
- void setMockGeolocationPositionUnavailableError(in DOMString errorMessage);
+ void setGeolocationPermission(boolean value);
+ void setMockGeolocationPosition(double latitude, double longitude, double accuracy, [Default=Undefined] optional object altitude, optional object altitudeAccuracy, optional object heading, optional object speed);
+ void setMockGeolocationPositionUnavailableError(DOMString errorMessage);
+
+ // Audio testing.
+ [PassContext] void setAudioResult(object data);
boolean callShouldCloseOnWebView();
// Work queue.
- void queueBackNavigation(in unsigned long howFarBackward);
- void queueForwardNavigation(in unsigned long howFarForward);
- void queueLoad(in DOMString url, in DOMString target);
- void queueLoadHTMLString(in DOMString content, in [Optional] DOMString baseURL, in [Optional] DOMString unreachableURL);
+ void queueBackNavigation(unsigned long howFarBackward);
+ void queueForwardNavigation(unsigned long howFarForward);
+ void queueLoad(DOMString url, DOMString target);
+ void queueLoadHTMLString(DOMString content, optional DOMString baseURL, optional DOMString unreachableURL);
void queueReload();
- void queueLoadingScript(in DOMString script);
- void queueNonLoadingScript(in DOMString script);
+ void queueLoadingScript(DOMString script);
+ void queueNonLoadingScript(DOMString script);
+
+ // Authentication
+ void setHandlesAuthenticationChallenges(boolean value);
+ void setAuthenticationUsername(DOMString username);
+ void setAuthenticationPassword(DOMString password);
+
+ // Secure text input mode (Mac only)
+ readonly attribute boolean secureEventInputIsEnabled;
+
+ // Override plugin load policy.
+ void setBlockAllPlugins(boolean shouldBlock);
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl
index 039988af0..d95a6985d 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl
+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl
@@ -24,9 +24,9 @@
*/
interface TextInputController {
- void setMarkedText(in DOMString string, in long from, in long length);
+ void setMarkedText(DOMString string, long from, long length);
boolean hasMarkedText();
void unmarkText();
- void insertText(in DOMString string);
+ void insertText(DOMString string);
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp b/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
index 4ee7821b8..7005dd271 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp
@@ -247,14 +247,8 @@ void EventSendingController::scheduleAsynchronousClick()
WKBundlePostMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), mouseUpMessageBody.get());
}
-void EventSendingController::keyDown(JSStringRef key, JSValueRef modifierArray, int location)
+static WKRetainPtr<WKMutableDictionaryRef> createKeyDownMessageBody(JSStringRef key, WKEventModifiers modifiers, int location)
{
- WKBundlePageRef page = InjectedBundle::shared().page()->page();
- WKBundleFrameRef frame = WKBundlePageGetMainFrame(page);
- JSContextRef context = WKBundleFrameGetJavaScriptContext(frame);
- WKEventModifiers modifiers = parseModifierArray(context, modifierArray);
-
- WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
WKRetainPtr<WKStringRef> subMessageKey(AdoptWK, WKStringCreateWithUTF8CString("SubMessage"));
@@ -272,7 +266,28 @@ void EventSendingController::keyDown(JSStringRef key, JSValueRef modifierArray,
WKRetainPtr<WKUInt64Ref> locationRef(AdoptWK, WKUInt64Create(location));
WKDictionaryAddItem(EventSenderMessageBody.get(), locationKey.get(), locationRef.get());
- WKBundlePostSynchronousMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), EventSenderMessageBody.get(), 0);
+ return EventSenderMessageBody;
+}
+
+void EventSendingController::keyDown(JSStringRef key, JSValueRef modifierArray, int location)
+{
+ WKBundlePageRef page = InjectedBundle::shared().page()->page();
+ WKBundleFrameRef frame = WKBundlePageGetMainFrame(page);
+ JSContextRef context = WKBundleFrameGetJavaScriptContext(frame);
+ WKEventModifiers modifiers = parseModifierArray(context, modifierArray);
+
+ WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
+ WKRetainPtr<WKMutableDictionaryRef> keyDownMessageBody = createKeyDownMessageBody(key, modifiers, location);
+
+ WKBundlePostSynchronousMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), keyDownMessageBody.get(), 0);
+}
+
+void EventSendingController::scheduleAsynchronousKeyDown(JSStringRef key)
+{
+ WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
+ WKRetainPtr<WKMutableDictionaryRef> keyDownMessageBody = createKeyDownMessageBody(key, 0 /* modifiers */, 0 /* location */);
+
+ WKBundlePostMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), keyDownMessageBody.get());
}
void EventSendingController::mouseScrollBy(int x, int y)
diff --git a/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h b/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h
index 69c54f926..bdacfd359 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/EventSendingController.h
@@ -57,6 +57,7 @@ public:
void scheduleAsynchronousClick();
void keyDown(JSStringRef key, JSValueRef modifierArray, int location);
+ void scheduleAsynchronousKeyDown(JSStringRef key);
// Zoom functions.
void textZoomIn();
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
index 96b3d657b..9094a661a 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp
@@ -55,6 +55,7 @@ InjectedBundle::InjectedBundle()
, m_dumpPixels(false)
, m_useWaitToDumpWatchdogTimer(true)
, m_useWorkQueue(false)
+ , m_timeout(0)
{
}
@@ -86,7 +87,6 @@ void InjectedBundle::didReceiveMessageToPage(WKBundleRef bundle, WKBundlePageRef
void InjectedBundle::initialize(WKBundleRef bundle, WKTypeRef initializationUserData)
{
m_bundle = bundle;
- m_stringBuilder = WTF::adoptPtr(new WTF::StringBuilder());
WKBundleClient client = {
kWKBundleClientCurrentVersion,
@@ -154,6 +154,9 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag
WKRetainPtr<WKStringRef> useWaitToDumpWatchdogTimerKey(AdoptWK, WKStringCreateWithUTF8CString("UseWaitToDumpWatchdogTimer"));
m_useWaitToDumpWatchdogTimer = WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(messageBodyDictionary, useWaitToDumpWatchdogTimerKey.get())));
+ WKRetainPtr<WKStringRef> timeoutKey(AdoptWK, WKStringCreateWithUTF8CString("Timeout"));
+ m_timeout = (int)WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, timeoutKey.get())));
+
WKRetainPtr<WKStringRef> ackMessageName(AdoptWK, WKStringCreateWithUTF8CString("Ack"));
WKRetainPtr<WKStringRef> ackMessageBody(AdoptWK, WKStringCreateWithUTF8CString("BeginTest"));
WKBundlePostMessage(m_bundle, ackMessageName.get(), ackMessageBody.get());
@@ -177,6 +180,8 @@ void InjectedBundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messag
resetLocalSettings();
m_testRunner->removeAllWebNotificationPermissions();
+ page()->resetAfterTest();
+
return;
}
if (WKStringIsEqualToUTF8CString(messageName, "CallAddChromeInputFieldCallback")) {
@@ -218,9 +223,7 @@ bool InjectedBundle::booleanForKey(WKDictionaryRef dictionary, const char* key)
WKRetainPtr<WKStringRef> wkKey(AdoptWK, WKStringCreateWithUTF8CString(key));
WKTypeRef value = WKDictionaryGetItemForKey(dictionary, wkKey.get());
if (WKGetTypeID(value) != WKBooleanGetTypeID()) {
- stringBuilder()->appendLiteral("Boolean value for key \"");
- stringBuilder()->append(key);
- stringBuilder()->appendLiteral("\" not found in dictionary\n");
+ outputText(makeString("Boolean value for key", key, " not found in dictionary\n"));
return false;
}
return WKBooleanGetValue(static_cast<WKBooleanRef>(value));
@@ -232,7 +235,6 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
m_pixelResult.clear();
m_repaintRects.clear();
- m_stringBuilder->clear();
m_testRunner = TestRunner::create();
m_gcController = GCController::create();
@@ -248,7 +250,6 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
WKBundleSetAuthorAndUserStylesEnabled(m_bundle, m_pageGroup, true);
WKBundleSetFrameFlatteningEnabled(m_bundle, m_pageGroup, false);
WKBundleSetMinimumLogicalFontSize(m_bundle, m_pageGroup, 9);
- WKBundleSetMinimumTimerInterval(m_bundle, m_pageGroup, 0.010); // 10 milliseconds (DOMTimer::s_minDefaultTimerInterval)
WKBundleSetSpatialNavigationEnabled(m_bundle, m_pageGroup, false);
WKBundleSetAllowFileAccessFromFileURLs(m_bundle, m_pageGroup, true);
WKBundleSetPluginsEnabled(m_bundle, m_pageGroup, true);
@@ -256,6 +257,7 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
WKBundleSetAlwaysAcceptCookies(m_bundle, false);
WKBundleSetSerialLoadingEnabled(m_bundle, false);
WKBundleSetShadowDOMEnabled(m_bundle, true);
+ WKBundleSetSeamlessIFramesEnabled(m_bundle, true);
WKBundleSetCacheModel(m_bundle, 1 /*CacheModelDocumentBrowser*/);
WKBundleRemoveAllUserContent(m_bundle, m_pageGroup);
@@ -267,6 +269,8 @@ void InjectedBundle::beginTesting(WKDictionaryRef settings)
m_testRunner->setAcceptsEditing(true);
m_testRunner->setTabKeyCyclesThroughElements(true);
+ m_testRunner->setCustomTimeout(m_timeout);
+
page()->prepare();
WKBundleClearAllDatabases(m_bundle);
@@ -292,22 +296,19 @@ void InjectedBundle::done()
WKRetainPtr<WKStringRef> doneMessageName(AdoptWK, WKStringCreateWithUTF8CString("Done"));
WKRetainPtr<WKMutableDictionaryRef> doneMessageBody(AdoptWK, WKMutableDictionaryCreate());
- WKRetainPtr<WKStringRef> textOutputKey(AdoptWK, WKStringCreateWithUTF8CString("TextOutput"));
- WKRetainPtr<WKStringRef> textOutput(AdoptWK, WKStringCreateWithUTF8CString(m_stringBuilder->toString().utf8().data()));
- WKDictionaryAddItem(doneMessageBody.get(), textOutputKey.get(), textOutput.get());
-
WKRetainPtr<WKStringRef> pixelResultKey = adoptWK(WKStringCreateWithUTF8CString("PixelResult"));
WKDictionaryAddItem(doneMessageBody.get(), pixelResultKey.get(), m_pixelResult.get());
WKRetainPtr<WKStringRef> repaintRectsKey = adoptWK(WKStringCreateWithUTF8CString("RepaintRects"));
WKDictionaryAddItem(doneMessageBody.get(), repaintRectsKey.get(), m_repaintRects.get());
+ WKRetainPtr<WKStringRef> audioResultKey = adoptWK(WKStringCreateWithUTF8CString("AudioResult"));
+ WKDictionaryAddItem(doneMessageBody.get(), audioResultKey.get(), m_audioResult.get());
+
WKBundlePostMessage(m_bundle, doneMessageName.get(), doneMessageBody.get());
closeOtherPages();
- page()->resetAfterTest();
-
m_state = Idle;
}
@@ -322,13 +323,24 @@ void InjectedBundle::closeOtherPages()
WKBundlePageClose(pagesToClose[i]);
}
-void InjectedBundle::dumpBackForwardListsForAllPages()
+void InjectedBundle::dumpBackForwardListsForAllPages(StringBuilder& stringBuilder)
{
size_t size = m_pages.size();
for (size_t i = 0; i < size; ++i)
- m_pages[i]->dumpBackForwardList();
+ m_pages[i]->dumpBackForwardList(stringBuilder);
+}
+
+void InjectedBundle::outputText(const String& output)
+{
+ if (m_state != Testing)
+ return;
+ if (output.isEmpty())
+ return;
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("TextOutput"));
+ WKRetainPtr<WKStringRef> messageBody(AdoptWK, WKStringCreateWithUTF8CString(output.utf8().data()));
+ WKBundlePostMessage(m_bundle, messageName.get(), messageBody.get());
}
-
+
void InjectedBundle::postNewBeforeUnloadReturnValue(bool value)
{
WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("BeforeUnloadReturnValue"));
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
index 527641e40..170c8ac70 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h
@@ -33,16 +33,12 @@
#include "TextInputController.h"
#include <WebKit2/WKBase.h>
#include <WebKit2/WKRetainPtr.h>
+#include <sstream>
+#include <wtf/Forward.h>
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
-#include <sstream>
-
-namespace WTF {
-class StringBuilder;
-}
-
namespace WTR {
class InjectedBundlePage;
@@ -67,10 +63,10 @@ public:
size_t pageCount() const { return m_pages.size(); }
void closeOtherPages();
- void dumpBackForwardListsForAllPages();
+ void dumpBackForwardListsForAllPages(StringBuilder&);
void done();
- WTF::StringBuilder* stringBuilder() { return m_stringBuilder.get(); }
+ void setAudioResult(WKDataRef audioData) { m_audioResult = audioData; }
void setPixelResult(WKImageRef image) { m_pixelResult = image; }
void setRepaintRects(WKArrayRef rects) { m_repaintRects = rects; }
@@ -82,6 +78,7 @@ public:
bool shouldDumpPixels() const { return m_dumpPixels; }
bool useWaitToDumpWatchdogTimer() const { return m_useWaitToDumpWatchdogTimer; }
+ void outputText(const String&);
void postNewBeforeUnloadReturnValue(bool);
void postAddChromeInputField();
void postRemoveChromeInputField();
@@ -147,8 +144,6 @@ private:
WKBundleFrameRef m_topLoadingFrame;
- OwnPtr<WTF::StringBuilder> m_stringBuilder;
-
enum State {
Idle,
Testing,
@@ -159,7 +154,9 @@ private:
bool m_dumpPixels;
bool m_useWaitToDumpWatchdogTimer;
bool m_useWorkQueue;
+ int m_timeout;
+ WKRetainPtr<WKDataRef> m_audioResult;
WKRetainPtr<WKImageRef> m_pixelResult;
WKRetainPtr<WKArrayRef> m_repaintRects;
};
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 0081975e0..e3002d447 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -48,16 +48,12 @@
#include <wtf/text/CString.h>
#include <wtf/text/StringBuilder.h>
-#if PLATFORM(QT)
-#include "DumpRenderTreeSupportQt.h"
+#if USE(CF) && !PLATFORM(QT)
+#include "WebArchiveDumpSupport.h"
#endif
-#if ENABLE(WEB_INTENTS)
-#include <WebKit2/WKBundleIntent.h>
-#include <WebKit2/WKBundleIntentRequest.h>
-#endif
-#if ENABLE(WEB_INTENTS_TAG)
-#include <WebKit2/WKIntentServiceInfo.h>
+#if PLATFORM(QT)
+#include "DumpRenderTreeSupportQt.h"
#endif
using namespace std;
@@ -104,7 +100,7 @@ static WTF::String dumpPath(JSGlobalContextRef context, JSObjectRef nodeValue)
JSValueRef parentNode = propertyValue(context, nodeValue, "parentNode");
- WTF::StringBuilder stringBuilder;
+ StringBuilder stringBuilder;
stringBuilder.append(toWTFString(nodeName));
if (parentNode && JSValueIsObject(context, parentNode)) {
@@ -153,7 +149,7 @@ static WTF::String rangeToStr(WKBundlePageRef page, WKBundleScriptWorldRef world
int startOffset = propertyValueInt(context, rangeObject, "startOffset");
int endOffset = propertyValueInt(context, rangeObject, "endOffset");
- WTF::StringBuilder stringBuilder;
+ StringBuilder stringBuilder;
stringBuilder.appendLiteral("range from ");
stringBuilder.appendNumber(startOffset);
stringBuilder.appendLiteral(" of ");
@@ -189,14 +185,14 @@ static WTF::String styleDecToStr(WKBundleCSSStyleDeclarationRef style)
// DumpRenderTree calls -[DOMCSSStyleDeclaration description], which just dumps class name and object address.
// No existing tests actually hit this code path at the time of this writing, because WebCore doesn't call
// the editing client if the styling operation source is CommandFromDOM or CommandFromDOMWithUserInterface.
- WTF::StringBuilder stringBuilder;
+ StringBuilder stringBuilder;
stringBuilder.appendLiteral("<DOMCSSStyleDeclaration ADDRESS>");
return stringBuilder.toString();
}
static WTF::String securityOriginToStr(WKSecurityOriginRef origin)
{
- WTF::StringBuilder stringBuilder;
+ StringBuilder stringBuilder;
stringBuilder.append('{');
stringBuilder.append(toWTFString(adoptWK(WKSecurityOriginCopyProtocol(origin))));
stringBuilder.appendLiteral(", ");
@@ -211,7 +207,7 @@ static WTF::String securityOriginToStr(WKSecurityOriginRef origin)
static WTF::String frameToStr(WKBundleFrameRef frame)
{
WKRetainPtr<WKStringRef> name(AdoptWK, WKBundleFrameCopyName(frame));
- WTF::StringBuilder stringBuilder;
+ StringBuilder stringBuilder;
if (WKBundleFrameIsMainFrame(frame)) {
if (!WKStringIsEmpty(name.get())) {
stringBuilder.appendLiteral("main frame \"");
@@ -249,7 +245,7 @@ static inline WTF::String pathSuitableForTestResult(WKURLRef fileUrl)
return toWTFString(adoptWK(WKURLCopyString(fileUrl)));
String pathString = toWTFString(adoptWK(WKURLCopyPath(fileUrl)));
- WTF::StringBuilder stringBuilder;
+ StringBuilder stringBuilder;
// Remove the leading path from file urls.
const size_t indexBaseName = pathString.reverseFind(divider);
@@ -284,12 +280,12 @@ static inline WTF::String urlSuitableForTestResult(WKURLRef fileUrl)
static HashMap<uint64_t, String> assignedUrlsCache;
-static inline void dumpResourceURL(uint64_t identifier)
+static inline void dumpResourceURL(uint64_t identifier, StringBuilder& stringBuilder)
{
if (assignedUrlsCache.contains(identifier))
- InjectedBundle::shared().stringBuilder()->append(assignedUrlsCache.get(identifier));
+ stringBuilder.append(assignedUrlsCache.get(identifier));
else
- InjectedBundle::shared().stringBuilder()->appendLiteral("<unknown>");
+ stringBuilder.appendLiteral("<unknown>");
}
InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
@@ -327,9 +323,12 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
0, // willDestroyGlobalObjectForDOMWindowExtension
didFinishProgress, // didFinishProgress
0, // shouldForceUniversalAccessFromLocalURL
- didReceiveIntentForFrame, // didReceiveIntentForFrame
- registerIntentServiceForFrame, // registerIntentServiceForFrame
+ 0, // didReceiveIntentForFrame
+ 0, // registerIntentServiceForFrame
0, // didLayout
+ 0, // featuresUsedInPage
+ 0, // willLoadURLRequest
+ 0, // willLoadDataRequest
};
WKBundlePageSetPageLoaderClient(m_page, &loaderClient);
@@ -376,6 +375,10 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
0, /*toolbarsAreVisible*/
didReachApplicationCacheOriginQuota,
didExceedDatabaseQuota,
+ 0, /*plugInStartLabelTitle*/
+ 0, /*plugInStartLabelSubtitle*/
+ 0, /*plugInExtraStyleSheet*/
+ 0, /*plugInExtraScript*/
};
WKBundlePageSetUIClient(m_page, &uiClient);
@@ -392,7 +395,10 @@ InjectedBundlePage::InjectedBundlePage(WKBundlePageRef page)
didBeginEditing,
didEndEditing,
didChange,
- didChangeSelection
+ didChangeSelection,
+ 0, /* willWriteToPasteboard */
+ 0, /* getPasteboardDataForRange */
+ 0 /* didWriteToPasteboard */
};
WKBundlePageSetEditorClient(m_page, &editorClient);
@@ -452,66 +458,76 @@ void InjectedBundlePage::resetAfterTest()
// Loader Client Callbacks
// String output must be identical to -[WebFrame _drt_descriptionSuitableForTestResult].
-static void dumpFrameDescriptionSuitableForTestResult(WKBundleFrameRef frame)
+static void dumpFrameDescriptionSuitableForTestResult(WKBundleFrameRef frame, StringBuilder& stringBuilder)
{
WKRetainPtr<WKStringRef> name(AdoptWK, WKBundleFrameCopyName(frame));
if (WKBundleFrameIsMainFrame(frame)) {
if (WKStringIsEmpty(name.get())) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("main frame");
+ stringBuilder.appendLiteral("main frame");
return;
}
- InjectedBundle::shared().stringBuilder()->appendLiteral("main frame \"");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(name));
- InjectedBundle::shared().stringBuilder()->append('"');
+ stringBuilder.appendLiteral("main frame \"");
+ stringBuilder.append(toWTFString(name));
+ stringBuilder.append('"');
return;
}
if (WKStringIsEmpty(name.get())) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("frame (anonymous)");
+ stringBuilder.appendLiteral("frame (anonymous)");
return;
}
- InjectedBundle::shared().stringBuilder()->appendLiteral("frame \"");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(name));
- InjectedBundle::shared().stringBuilder()->append('"');
+ stringBuilder.appendLiteral("frame \"");
+ stringBuilder.append(toWTFString(name));
+ stringBuilder.append('"');
}
-static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request)
+static void dumpLoadEvent(WKBundleFrameRef frame, const char* eventName)
+{
+ StringBuilder stringBuilder;
+ dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder);
+ stringBuilder.appendLiteral(" - ");
+ stringBuilder.append(eventName);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
+}
+
+static inline void dumpRequestDescriptionSuitableForTestResult(WKURLRequestRef request, StringBuilder& stringBuilder)
{
WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
WKRetainPtr<WKURLRef> firstParty = adoptWK(WKURLRequestCopyFirstPartyForCookies(request));
WKRetainPtr<WKStringRef> httpMethod = adoptWK(WKURLRequestCopyHTTPMethod(request));
- InjectedBundle::shared().stringBuilder()->appendLiteral("<NSURLRequest URL ");
- InjectedBundle::shared().stringBuilder()->append(pathSuitableForTestResult(url.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(", main document URL ");
- InjectedBundle::shared().stringBuilder()->append(urlSuitableForTestResult(firstParty.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(", http method ");
+ stringBuilder.appendLiteral("<NSURLRequest URL ");
+ stringBuilder.append(pathSuitableForTestResult(url.get()));
+ stringBuilder.appendLiteral(", main document URL ");
+ stringBuilder.append(urlSuitableForTestResult(firstParty.get()));
+ stringBuilder.appendLiteral(", http method ");
if (WKStringIsEmpty(httpMethod.get()))
- InjectedBundle::shared().stringBuilder()->appendLiteral("(none)");
+ stringBuilder.appendLiteral("(none)");
else
- InjectedBundle::shared().stringBuilder()->append(toWTFString(httpMethod));
+ stringBuilder.append(toWTFString(httpMethod));
- InjectedBundle::shared().stringBuilder()->append('>');
+ stringBuilder.append('>');
}
-static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response)
+static inline void dumpResponseDescriptionSuitableForTestResult(WKURLResponseRef response, StringBuilder& stringBuilder)
{
WKRetainPtr<WKURLRef> url = adoptWK(WKURLResponseCopyURL(response));
if (!url) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("(null)");
+ stringBuilder.appendLiteral("(null)");
return;
}
- InjectedBundle::shared().stringBuilder()->appendLiteral("<NSURLResponse ");
- InjectedBundle::shared().stringBuilder()->append(pathSuitableForTestResult(url.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(", http status code ");
- InjectedBundle::shared().stringBuilder()->appendNumber(WKURLResponseHTTPStatusCode(response));
- InjectedBundle::shared().stringBuilder()->append('>');
+ stringBuilder.appendLiteral("<NSURLResponse ");
+ stringBuilder.append(pathSuitableForTestResult(url.get()));
+ stringBuilder.appendLiteral(", http status code ");
+ stringBuilder.appendNumber(WKURLResponseHTTPStatusCode(response));
+ stringBuilder.append('>');
}
-static inline void dumpErrorDescriptionSuitableForTestResult(WKErrorRef error)
+static inline void dumpErrorDescriptionSuitableForTestResult(WKErrorRef error, StringBuilder& stringBuilder)
{
WKRetainPtr<WKStringRef> errorDomain = adoptWK(WKErrorCopyDomain(error));
int errorCode = WKErrorGetErrorCode(error);
@@ -525,20 +541,20 @@ static inline void dumpErrorDescriptionSuitableForTestResult(WKErrorRef error)
if (WKStringIsEqualToUTF8CString(errorDomain.get(), "WebKitPolicyError"))
errorDomain = adoptWK(WKStringCreateWithUTF8CString("WebKitErrorDomain"));
- InjectedBundle::shared().stringBuilder()->appendLiteral("<NSError domain ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(errorDomain));
- InjectedBundle::shared().stringBuilder()->appendLiteral(", code ");
- InjectedBundle::shared().stringBuilder()->appendNumber(errorCode);
+ stringBuilder.appendLiteral("<NSError domain ");
+ stringBuilder.append(toWTFString(errorDomain));
+ stringBuilder.appendLiteral(", code ");
+ stringBuilder.appendNumber(errorCode);
WKRetainPtr<WKURLRef> url = adoptWK(WKErrorCopyFailingURL(error));
if (url.get()) {
WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyString(url.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(", failing URL \"");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
- InjectedBundle::shared().stringBuilder()->append('"');
+ stringBuilder.appendLiteral(", failing URL \"");
+ stringBuilder.append(toWTFString(urlString));
+ stringBuilder.append('"');
}
- InjectedBundle::shared().stringBuilder()->append('>');
+ stringBuilder.append('>');
}
void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void *clientInfo)
@@ -571,83 +587,6 @@ void InjectedBundlePage::didFinishProgress(WKBundlePageRef, const void *clientIn
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishProgress();
}
-void InjectedBundlePage::didReceiveIntentForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleIntentRequestRef intentRequest, WKTypeRef* userData, const void* clientInfo)
-{
-#if ENABLE(WEB_INTENTS)
- static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->m_currentIntentRequest = intentRequest;
- WKRetainPtr<WKBundleIntentRef> intent(AdoptWK, WKBundleIntentRequestCopyIntent(intentRequest));
-
- InjectedBundle::shared().stringBuilder()->appendLiteral("Received Web Intent: action=");
- WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKBundleIntentCopyAction(intent.get()));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkAction.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" type=");
- WKRetainPtr<WKStringRef> wkType(AdoptWK, WKBundleIntentCopyType(intent.get()));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkType.get()));
- InjectedBundle::shared().stringBuilder()->append('\n');
-
- const size_t numMessagePorts = WKBundleIntentMessagePortCount(intent.get());
- if (numMessagePorts) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("Have ");
- InjectedBundle::shared().stringBuilder()->appendNumber(numMessagePorts);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" ports\n");
- }
-
- WKRetainPtr<WKURLRef> wkServiceUrl(AdoptWK, WKBundleIntentCopyService(intent.get()));
- if (wkServiceUrl) {
- WKRetainPtr<WKStringRef> wkService(AdoptWK, WKURLCopyString(wkServiceUrl.get()));
- if (wkService && !WKStringIsEmpty(wkService.get())) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("Explicit intent service: ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkService.get()));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
- }
-
- WKRetainPtr<WKDictionaryRef> wkExtras(AdoptWK, WKBundleIntentCopyExtras(intent.get()));
- WKRetainPtr<WKArrayRef> wkExtraKeys(AdoptWK, WKDictionaryCopyKeys(wkExtras.get()));
- const size_t numExtraKeys = WKArrayGetSize(wkExtraKeys.get());
- for (size_t i = 0; i < numExtraKeys; ++i) {
- WKStringRef wkKey = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkExtraKeys.get(), i));
- WKStringRef wkValue = static_cast<WKStringRef>(WKDictionaryGetItemForKey(wkExtras.get(), wkKey));
- InjectedBundle::shared().stringBuilder()->appendLiteral("Extras[");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkKey));
- InjectedBundle::shared().stringBuilder()->appendLiteral("] = ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkValue));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
-
- WKRetainPtr<WKArrayRef> wkSuggestions(AdoptWK, WKBundleIntentCopySuggestions(intent.get()));
- const size_t numSuggestions = WKArrayGetSize(wkSuggestions.get());
- for (size_t i = 0; i < numSuggestions; ++i) {
- WKStringRef wkSuggestion = static_cast<WKStringRef>(WKArrayGetItemAtIndex(wkSuggestions.get(), i));
- InjectedBundle::shared().stringBuilder()->appendLiteral("Have suggestion ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkSuggestion));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
-#endif
-}
-
-void InjectedBundlePage::registerIntentServiceForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKIntentServiceInfoRef serviceInfo, WKTypeRef* userData, const void* clientInfo)
-{
-#if ENABLE(WEB_INTENTS_TAG)
- InjectedBundle::shared().stringBuilder()->appendLiteral("Registered Web Intent Service: action=");
- WKRetainPtr<WKStringRef> wkAction(AdoptWK, WKIntentServiceInfoCopyAction(serviceInfo));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkAction.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" type=");
- WKRetainPtr<WKStringRef> wkType(AdoptWK, WKIntentServiceInfoCopyType(serviceInfo));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkType.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" title=");
- WKRetainPtr<WKStringRef> wkTitle(AdoptWK, WKIntentServiceInfoCopyTitle(serviceInfo));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkTitle.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" url=");
- WKRetainPtr<WKURLRef> wkUrl(AdoptWK, WKIntentServiceInfoCopyHref(serviceInfo));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(adoptWK(WKURLCopyString(wkUrl.get()))));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" disposition=");
- WKRetainPtr<WKStringRef> wkDisposition(AdoptWK, WKIntentServiceInfoCopyDisposition(serviceInfo));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(wkDisposition.get()));
- InjectedBundle::shared().stringBuilder()->append('\n');
-#endif
-}
-
void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef*, const void* clientInfo)
{
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didFinishDocumentLoadForFrame(frame);
@@ -745,19 +684,14 @@ void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame)
platformDidStartProvisionalLoadForFrame(frame);
- if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didStartProvisionalLoadForFrame\n");
- }
+ if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+ dumpLoadEvent(frame, "didStartProvisionalLoadForFrame");
if (!InjectedBundle::shared().topLoadingFrame())
InjectedBundle::shared().setTopLoadingFrame(frame);
- if (InjectedBundle::shared().testRunner()->shouldStopProvisionalFrameLoads()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - stopping load in didStartProvisionalLoadForFrame callback\n");
- WKBundleFrameStopLoading(frame);
- }
+ if (InjectedBundle::shared().testRunner()->shouldStopProvisionalFrameLoads())
+ dumpLoadEvent(frame, "stopping load in didStartProvisionalLoadForFrame callback");
}
void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame)
@@ -768,8 +702,7 @@ void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBu
if (!InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
return;
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didReceiveServerRedirectForProvisionalLoadForFrame\n");
+ dumpLoadEvent(frame, "didReceiveServerRedirectForProvisionalLoadForFrame");
}
void InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef frame, WKErrorRef)
@@ -777,10 +710,8 @@ void InjectedBundlePage::didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRe
if (!InjectedBundle::shared().isTestRunning())
return;
- if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFailProvisionalLoadWithError\n");
- }
+ if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+ dumpLoadEvent(frame, "didFailProvisionalLoadWithError");
frameDidChangeLocation(frame);
}
@@ -793,8 +724,7 @@ void InjectedBundlePage::didCommitLoadForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
return;
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didCommitLoadForFrame\n");
+ dumpLoadEvent(frame, "didCommitLoadForFrame");
}
void InjectedBundlePage::didFinishProgress()
@@ -805,46 +735,47 @@ void InjectedBundlePage::didFinishProgress()
if (!InjectedBundle::shared().testRunner()->shouldDumpProgressFinishedCallback())
return;
- InjectedBundle::shared().stringBuilder()->appendLiteral("postProgressFinishedNotification\n");
+ InjectedBundle::shared().outputText("postProgressFinishedNotification\n");
}
enum FrameNamePolicy { ShouldNotIncludeFrameName, ShouldIncludeFrameName };
-static void dumpFrameScrollPosition(WKBundleFrameRef frame, FrameNamePolicy shouldIncludeFrameName = ShouldNotIncludeFrameName)
+static void dumpFrameScrollPosition(WKBundleFrameRef frame, StringBuilder& stringBuilder, FrameNamePolicy shouldIncludeFrameName = ShouldNotIncludeFrameName)
{
double x = numericWindowPropertyValue(frame, "pageXOffset");
double y = numericWindowPropertyValue(frame, "pageYOffset");
- if (fabs(x) > 0.00000001 || fabs(y) > 0.00000001) {
- if (shouldIncludeFrameName) {
- WKRetainPtr<WKStringRef> name(AdoptWK, WKBundleFrameCopyName(frame));
- InjectedBundle::shared().stringBuilder()->appendLiteral("frame '");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(name));
- InjectedBundle::shared().stringBuilder()->appendLiteral("' ");
- }
- InjectedBundle::shared().stringBuilder()->appendLiteral("scrolled to ");
- InjectedBundle::shared().stringBuilder()->append(WTF::String::number(x));
- InjectedBundle::shared().stringBuilder()->append(',');
- InjectedBundle::shared().stringBuilder()->append(WTF::String::number(y));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ if (fabs(x) <= 0.00000001 && fabs(y) <= 0.00000001)
+ return;
+
+ if (shouldIncludeFrameName) {
+ WKRetainPtr<WKStringRef> name(AdoptWK, WKBundleFrameCopyName(frame));
+ stringBuilder.appendLiteral("frame '");
+ stringBuilder.append(toWTFString(name));
+ stringBuilder.appendLiteral("' ");
}
+ stringBuilder.appendLiteral("scrolled to ");
+ stringBuilder.append(WTF::String::number(x));
+ stringBuilder.append(',');
+ stringBuilder.append(WTF::String::number(y));
+ stringBuilder.append('\n');
}
-static void dumpDescendantFrameScrollPositions(WKBundleFrameRef frame)
+static void dumpDescendantFrameScrollPositions(WKBundleFrameRef frame, StringBuilder& stringBuilder)
{
WKRetainPtr<WKArrayRef> childFrames(AdoptWK, WKBundleFrameCopyChildFrames(frame));
size_t size = WKArrayGetSize(childFrames.get());
for (size_t i = 0; i < size; ++i) {
WKBundleFrameRef subframe = static_cast<WKBundleFrameRef>(WKArrayGetItemAtIndex(childFrames.get(), i));
- dumpFrameScrollPosition(subframe, ShouldIncludeFrameName);
- dumpDescendantFrameScrollPositions(subframe);
+ dumpFrameScrollPosition(subframe, stringBuilder, ShouldIncludeFrameName);
+ dumpDescendantFrameScrollPositions(subframe, stringBuilder);
}
}
-void InjectedBundlePage::dumpAllFrameScrollPositions()
+void InjectedBundlePage::dumpAllFrameScrollPositions(StringBuilder& stringBuilder)
{
WKBundleFrameRef frame = WKBundlePageGetMainFrame(m_page);
- dumpFrameScrollPosition(frame);
- dumpDescendantFrameScrollPositions(frame);
+ dumpFrameScrollPosition(frame, stringBuilder);
+ dumpDescendantFrameScrollPositions(frame, stringBuilder);
}
static JSRetainPtr<JSStringRef> toJS(const char* string)
@@ -871,7 +802,7 @@ static bool hasDocumentElement(WKBundleFrameRef frame)
return JSValueToBoolean(context, documentElementValue);
}
-static void dumpFrameText(WKBundleFrameRef frame)
+static void dumpFrameText(WKBundleFrameRef frame, StringBuilder& stringBuilder)
{
// If the frame doesn't have a document element, its inner text will be an empty string, so
// we'll end up just appending a single newline below. But DumpRenderTree doesn't append
@@ -880,30 +811,50 @@ static void dumpFrameText(WKBundleFrameRef frame)
return;
WKRetainPtr<WKStringRef> text(AdoptWK, WKBundleFrameCopyInnerText(frame));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(text));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ stringBuilder.append(toWTFString(text));
+ stringBuilder.append('\n');
}
-static void dumpDescendantFramesText(WKBundleFrameRef frame)
+static void dumpDescendantFramesText(WKBundleFrameRef frame, StringBuilder& stringBuilder)
{
WKRetainPtr<WKArrayRef> childFrames(AdoptWK, WKBundleFrameCopyChildFrames(frame));
size_t size = WKArrayGetSize(childFrames.get());
for (size_t i = 0; i < size; ++i) {
WKBundleFrameRef subframe = static_cast<WKBundleFrameRef>(WKArrayGetItemAtIndex(childFrames.get(), i));
WKRetainPtr<WKStringRef> subframeName(AdoptWK, WKBundleFrameCopyName(subframe));
- InjectedBundle::shared().stringBuilder()->appendLiteral("\n--------\nFrame: '");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(subframeName));
- InjectedBundle::shared().stringBuilder()->appendLiteral("'\n--------\n");
- dumpFrameText(subframe);
- dumpDescendantFramesText(subframe);
+
+ // DumpRenderTree ignores empty frames, so do the same thing here.
+ if (!hasDocumentElement(subframe))
+ continue;
+
+ stringBuilder.appendLiteral("\n--------\nFrame: '");
+ stringBuilder.append(toWTFString(subframeName));
+ stringBuilder.appendLiteral("'\n--------\n");
+
+ dumpFrameText(subframe, stringBuilder);
+ dumpDescendantFramesText(subframe, stringBuilder);
}
}
-void InjectedBundlePage::dumpAllFramesText()
+void InjectedBundlePage::dumpAllFramesText(StringBuilder& stringBuilder)
{
WKBundleFrameRef frame = WKBundlePageGetMainFrame(m_page);
- dumpFrameText(frame);
- dumpDescendantFramesText(frame);
+ dumpFrameText(frame, stringBuilder);
+ dumpDescendantFramesText(frame, stringBuilder);
+}
+
+
+void InjectedBundlePage::dumpDOMAsWebArchive(WKBundleFrameRef frame, StringBuilder& stringBuilder)
+{
+#if USE(CF) && !PLATFORM(QT)
+ WKRetainPtr<WKDataRef> wkData = adoptWK(WKBundleFrameCopyWebArchive(frame));
+ RetainPtr<CFDataRef> cfData = adoptCF(CFDataCreate(0, WKDataGetBytes(wkData.get()), WKDataGetSize(wkData.get())));
+ RetainPtr<CFStringRef> cfString = adoptCF(createXMLStringFromWebArchiveData(cfData.get()));
+ stringBuilder.append(cfString.get());
+#else
+ UNUSED_PARAM(frame);
+ UNUSED_PARAM(stringBuilder);
+#endif
}
void InjectedBundlePage::dump()
@@ -921,27 +872,36 @@ void InjectedBundlePage::dump()
if (url.find("dumpAsText/") != WTF::notFound)
InjectedBundle::shared().testRunner()->dumpAsText(false);
+ StringBuilder stringBuilder;
+
switch (InjectedBundle::shared().testRunner()->whatToDump()) {
case TestRunner::RenderTree: {
- WKRetainPtr<WKStringRef> text(AdoptWK, WKBundlePageCopyRenderTreeExternalRepresentation(m_page));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(text));
+ if (InjectedBundle::shared().testRunner()->isPrinting())
+ stringBuilder.append(toWTFString(adoptWK(WKBundlePageCopyRenderTreeExternalRepresentationForPrinting(m_page)).get()));
+ else
+ stringBuilder.append(toWTFString(adoptWK(WKBundlePageCopyRenderTreeExternalRepresentation(m_page)).get()));
break;
}
case TestRunner::MainFrameText:
- dumpFrameText(WKBundlePageGetMainFrame(m_page));
+ dumpFrameText(WKBundlePageGetMainFrame(m_page), stringBuilder);
break;
case TestRunner::AllFramesText:
- dumpAllFramesText();
+ dumpAllFramesText(stringBuilder);
+ break;
+ case TestRunner::Audio:
+ break;
+ case TestRunner::DOMAsWebArchive:
+ dumpDOMAsWebArchive(frame, stringBuilder);
break;
}
if (InjectedBundle::shared().testRunner()->shouldDumpAllFrameScrollPositions())
- dumpAllFrameScrollPositions();
+ dumpAllFrameScrollPositions(stringBuilder);
else if (InjectedBundle::shared().testRunner()->shouldDumpMainFrameScrollPosition())
- dumpFrameScrollPosition(WKBundlePageGetMainFrame(m_page));
+ dumpFrameScrollPosition(WKBundlePageGetMainFrame(m_page), stringBuilder);
if (InjectedBundle::shared().testRunner()->shouldDumpBackForwardListsForAllWindows())
- InjectedBundle::shared().dumpBackForwardListsForAllPages();
+ InjectedBundle::shared().dumpBackForwardListsForAllPages(stringBuilder);
if (InjectedBundle::shared().shouldDumpPixels() && InjectedBundle::shared().testRunner()->shouldDumpPixels()) {
WKSnapshotOptions options = kWKSnapshotOptionsShareable | kWKSnapshotOptionsInViewCoordinates;
@@ -953,6 +913,7 @@ void InjectedBundlePage::dump()
InjectedBundle::shared().setRepaintRects(adoptWK(WKBundlePageCopyTrackedRepaintRects(m_page)).get());
}
+ InjectedBundle::shared().outputText(stringBuilder.toString());
InjectedBundle::shared().done();
}
@@ -961,10 +922,8 @@ void InjectedBundlePage::didFinishLoadForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().isTestRunning())
return;
- if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFinishLoadForFrame\n");
- }
+ if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+ dumpLoadEvent(frame, "didFinishLoadForFrame");
frameDidChangeLocation(frame, /*shouldDump*/ true);
}
@@ -974,10 +933,8 @@ void InjectedBundlePage::didFailLoadWithErrorForFrame(WKBundleFrameRef frame, WK
if (!InjectedBundle::shared().isTestRunning())
return;
- if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFailLoadWithError\n");
- }
+ if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+ dumpLoadEvent(frame, "didFailLoadWithError");
frameDidChangeLocation(frame);
}
@@ -987,19 +944,21 @@ void InjectedBundlePage::didReceiveTitleForFrame(WKStringRef title, WKBundleFram
if (!InjectedBundle::shared().isTestRunning())
return;
+ StringBuilder stringBuilder;
if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didReceiveTitle: ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(title));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder);
+ stringBuilder.appendLiteral(" - didReceiveTitle: ");
+ stringBuilder.append(toWTFString(title));
+ stringBuilder.append('\n');
}
- if (!InjectedBundle::shared().testRunner()->shouldDumpTitleChanges())
- return;
+ if (InjectedBundle::shared().testRunner()->shouldDumpTitleChanges()) {
+ stringBuilder.appendLiteral("TITLE CHANGED: '");
+ stringBuilder.append(toWTFString(title));
+ stringBuilder.appendLiteral("'\n");
+ }
- InjectedBundle::shared().stringBuilder()->appendLiteral("TITLE CHANGED: '");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(title));
- InjectedBundle::shared().stringBuilder()->appendLiteral("'\n");
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, WKBundleScriptWorldRef world)
@@ -1037,8 +996,7 @@ void InjectedBundlePage::didCancelClientRedirectForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
return;
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didCancelClientRedirectForFrame\n");
+ dumpLoadEvent(frame, "didCancelClientRedirectForFrame");
}
void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef frame, WKURLRef url, double delay, double date)
@@ -1049,10 +1007,12 @@ void InjectedBundlePage::willPerformClientRedirectForFrame(WKBundleFrameRef fram
if (!InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
return;
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - willPerformClientRedirectToURL: ");
- InjectedBundle::shared().stringBuilder()->append(pathSuitableForTestResult(url));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" \n");
+ StringBuilder stringBuilder;
+ dumpFrameDescriptionSuitableForTestResult(frame, stringBuilder);
+ stringBuilder.appendLiteral(" - willPerformClientRedirectToURL: ");
+ stringBuilder.append(pathSuitableForTestResult(url));
+ stringBuilder.appendLiteral(" \n");
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didSameDocumentNavigationForFrame(WKBundleFrameRef frame, WKSameDocumentNavigationType type)
@@ -1064,17 +1024,17 @@ void InjectedBundlePage::didFinishDocumentLoadForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().isTestRunning())
return;
- if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFinishDocumentLoadForFrame\n");
- }
+ if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+ dumpLoadEvent(frame, "didFinishDocumentLoadForFrame");
unsigned pendingFrameUnloadEvents = WKBundleFrameGetPendingUnloadCount(frame);
if (pendingFrameUnloadEvents) {
- InjectedBundle::shared().stringBuilder()->append(frameToStr(frame));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - has ");
- InjectedBundle::shared().stringBuilder()->appendNumber(pendingFrameUnloadEvents);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" onunload handler(s)\n");
+ StringBuilder stringBuilder;
+ stringBuilder.append(frameToStr(frame));
+ stringBuilder.appendLiteral(" - has ");
+ stringBuilder.appendNumber(pendingFrameUnloadEvents);
+ stringBuilder.appendLiteral(" onunload handler(s)\n");
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
}
@@ -1083,28 +1043,26 @@ void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundleFrameRef frame)
if (!InjectedBundle::shared().isTestRunning())
return;
- if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks()) {
- dumpFrameDescriptionSuitableForTestResult(frame);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didHandleOnloadEventsForFrame\n");
- }
+ if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
+ dumpLoadEvent(frame, "didHandleOnloadEventsForFrame");
}
void InjectedBundlePage::didDisplayInsecureContentForFrame(WKBundleFrameRef frame)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("didDisplayInsecureContent\n");
+ InjectedBundle::shared().outputText("didDisplayInsecureContent\n");
}
void InjectedBundlePage::didRunInsecureContentForFrame(WKBundleFrameRef frame)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("didRunInsecureContent\n");
+ InjectedBundle::shared().outputText("didRunInsecureContent\n");
}
void InjectedBundlePage::didDetectXSSForFrame(WKBundleFrameRef frame)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFrameLoadCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("didDetectXSS\n");
+ InjectedBundle::shared().outputText("didDetectXSS\n");
}
void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKURLRequestRef request, bool)
@@ -1112,9 +1070,6 @@ void InjectedBundlePage::didInitiateLoadForResource(WKBundlePageRef, WKBundleFra
if (!InjectedBundle::shared().isTestRunning())
return;
- if (!InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks())
- return;
-
WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
assignedUrlsCache.add(identifier, pathSuitableForTestResult(url.get()));
}
@@ -1135,12 +1090,14 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKB
{
if (InjectedBundle::shared().isTestRunning()
&& InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks()) {
- dumpResourceURL(identifier);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - willSendRequest ");
- dumpRequestDescriptionSuitableForTestResult(request);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" redirectResponse ");
- dumpResponseDescriptionSuitableForTestResult(response);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ dumpResourceURL(identifier, stringBuilder);
+ stringBuilder.appendLiteral(" - willSendRequest ");
+ dumpRequestDescriptionSuitableForTestResult(request, stringBuilder);
+ stringBuilder.appendLiteral(" redirectResponse ");
+ dumpResponseDescriptionSuitableForTestResult(response, stringBuilder);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
if (InjectedBundle::shared().isTestRunning() && InjectedBundle::shared().testRunner()->willSendRequestReturnsNull())
@@ -1148,7 +1105,7 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKB
WKRetainPtr<WKURLRef> redirectURL = adoptWK(WKURLResponseCopyURL(response));
if (InjectedBundle::shared().isTestRunning() && InjectedBundle::shared().testRunner()->willSendRequestReturnsNullOnRedirect() && redirectURL) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("Returning null for this redirect\n");
+ InjectedBundle::shared().outputText("Returning null for this redirect\n");
return 0;
}
@@ -1172,9 +1129,11 @@ WKURLRequestRef InjectedBundlePage::willSendRequestForFrame(WKBundlePageRef, WKB
mainFrameIsExternal = isHTTPOrHTTPSScheme(mainFrameScheme.get()) && !isLocalHost(mainFrameHost.get());
}
if (!mainFrameIsExternal) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("Blocked access to external URL ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("Blocked access to external URL ");
+ stringBuilder.append(toWTFString(urlString));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
return 0;
}
}
@@ -1189,10 +1148,12 @@ void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundle
return;
if (InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks()) {
- dumpResourceURL(identifier);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didReceiveResponse ");
- dumpResponseDescriptionSuitableForTestResult(response);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ dumpResourceURL(identifier, stringBuilder);
+ stringBuilder.appendLiteral(" - didReceiveResponse ");
+ dumpResponseDescriptionSuitableForTestResult(response, stringBuilder);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
@@ -1203,10 +1164,12 @@ void InjectedBundlePage::didReceiveResponseForResource(WKBundlePageRef, WKBundle
WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyLastPathComponent(url.get()));
WKRetainPtr<WKStringRef> mimeTypeString = adoptWK(WKURLResponseCopyMIMEType(response));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" has MIME type ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(mimeTypeString));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.append(toWTFString(urlString));
+ stringBuilder.appendLiteral(" has MIME type ");
+ stringBuilder.append(toWTFString(mimeTypeString));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didReceiveContentLengthForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t, uint64_t)
@@ -1221,8 +1184,10 @@ void InjectedBundlePage::didFinishLoadForResource(WKBundlePageRef, WKBundleFrame
if (!InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks())
return;
- dumpResourceURL(identifier);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFinishLoading\n");
+ StringBuilder stringBuilder;
+ dumpResourceURL(identifier, stringBuilder);
+ stringBuilder.appendLiteral(" - didFinishLoading\n");
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKErrorRef error)
@@ -1233,11 +1198,13 @@ void InjectedBundlePage::didFailLoadForResource(WKBundlePageRef, WKBundleFrameRe
if (!InjectedBundle::shared().testRunner()->shouldDumpResourceLoadCallbacks())
return;
- dumpResourceURL(identifier);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - didFailLoadingWithError: ");
+ StringBuilder stringBuilder;
+ dumpResourceURL(identifier, stringBuilder);
+ stringBuilder.appendLiteral(" - didFailLoadingWithError: ");
- dumpErrorDescriptionSuitableForTestResult(error);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ dumpErrorDescriptionSuitableForTestResult(error, stringBuilder);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
bool InjectedBundlePage::shouldCacheResponse(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier)
@@ -1248,8 +1215,10 @@ bool InjectedBundlePage::shouldCacheResponse(WKBundlePageRef, WKBundleFrameRef,
if (!InjectedBundle::shared().testRunner()->shouldDumpWillCacheResponse())
return true;
- InjectedBundle::shared().stringBuilder()->appendNumber(identifier);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" - willCacheResponse: called\n");
+ StringBuilder stringBuilder;
+ stringBuilder.appendNumber(identifier);
+ stringBuilder.appendLiteral(" - willCacheResponse: called\n");
+ InjectedBundle::shared().outputText(stringBuilder.toString());
// The default behavior is the cache the response.
return true;
@@ -1289,24 +1258,26 @@ WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNavigationAction(WKB
WKRetainPtr<WKURLRef> url = adoptWK(WKURLRequestCopyURL(request));
WKRetainPtr<WKStringRef> urlScheme = adoptWK(WKURLCopyScheme(url.get()));
- InjectedBundle::shared().stringBuilder()->appendLiteral("Policy delegate: attempt to load ");
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("Policy delegate: attempt to load ");
if (isLocalFileScheme(urlScheme.get())) {
WKRetainPtr<WKStringRef> filename = adoptWK(WKURLCopyLastPathComponent(url.get()));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(filename));
+ stringBuilder.append(toWTFString(filename));
} else {
WKRetainPtr<WKStringRef> urlString = adoptWK(WKURLCopyString(url.get()));
- InjectedBundle::shared().stringBuilder()->append(toWTFString(urlString));
+ stringBuilder.append(toWTFString(urlString));
}
- InjectedBundle::shared().stringBuilder()->appendLiteral(" with navigation type \'");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(NavigationTypeToString(WKBundleNavigationActionGetNavigationType(navigationAction))));
- InjectedBundle::shared().stringBuilder()->appendLiteral("\'");
+ stringBuilder.appendLiteral(" with navigation type \'");
+ stringBuilder.append(toWTFString(NavigationTypeToString(WKBundleNavigationActionGetNavigationType(navigationAction))));
+ stringBuilder.appendLiteral("\'");
WKBundleHitTestResultRef hitTestResultRef = WKBundleNavigationActionCopyHitTestResult(navigationAction);
if (hitTestResultRef) {
- InjectedBundle::shared().stringBuilder()->appendLiteral(" originating from ");
- InjectedBundle::shared().stringBuilder()->append(dumpPath(m_page, m_world.get(), WKBundleHitTestResultCopyNodeHandle(hitTestResultRef)));
+ stringBuilder.appendLiteral(" originating from ");
+ stringBuilder.append(dumpPath(m_page, m_world.get(), WKBundleHitTestResultCopyNodeHandle(hitTestResultRef)));
}
- InjectedBundle::shared().stringBuilder()->append('\n');
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
InjectedBundle::shared().testRunner()->notifyDone();
if (InjectedBundle::shared().testRunner()->isPolicyDelegatePermissive())
@@ -1322,10 +1293,12 @@ WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForNewWindowAction(WKBu
WKBundlePagePolicyAction InjectedBundlePage::decidePolicyForResponse(WKBundlePageRef page, WKBundleFrameRef, WKURLResponseRef response, WKURLRequestRef, WKTypeRef*)
{
if (WKURLResponseIsAttachment(response)) {
+ StringBuilder stringBuilder;
WKRetainPtr<WKStringRef> filename = adoptWK(WKURLResponseCopySuggestedFilename(response));
- InjectedBundle::shared().stringBuilder()->appendLiteral("Policy delegate: resource is an attachment, suggested file name \'");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(filename));
- InjectedBundle::shared().stringBuilder()->appendLiteral("\'\n");
+ stringBuilder.appendLiteral("Policy delegate: resource is an attachment, suggested file name \'");
+ stringBuilder.append(toWTFString(filename));
+ stringBuilder.appendLiteral("\'\n");
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
WKRetainPtr<WKStringRef> mimeType = adoptWK(WKURLResponseCopyMIMEType(response));
@@ -1399,20 +1372,25 @@ void InjectedBundlePage::willAddMessageToConsole(WKStringRef message, uint32_t l
return;
WTF::String messageString = toWTFString(message);
+ size_t nullCharPos = messageString.find(UChar(0));
+ if (nullCharPos != WTF::notFound)
+ messageString.truncate(nullCharPos);
+
size_t fileProtocolStart = messageString.find("file://");
if (fileProtocolStart != WTF::notFound)
// FIXME: The code below does not handle additional text after url nor multiple urls. This matches DumpRenderTree implementation.
messageString = messageString.substring(0, fileProtocolStart) + lastFileURLPathComponent(messageString.substring(fileProtocolStart));
- InjectedBundle::shared().stringBuilder()->appendLiteral("CONSOLE MESSAGE: ");
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("CONSOLE MESSAGE: ");
if (lineNumber) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("line ");
- InjectedBundle::shared().stringBuilder()->appendNumber(lineNumber);
- InjectedBundle::shared().stringBuilder()->appendLiteral(": ");
+ stringBuilder.appendLiteral("line ");
+ stringBuilder.appendNumber(lineNumber);
+ stringBuilder.appendLiteral(": ");
}
- InjectedBundle::shared().stringBuilder()->append(messageString);
- InjectedBundle::shared().stringBuilder()->append('\n');
-
+ stringBuilder.append(messageString);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText)
@@ -1423,9 +1401,11 @@ void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText)
if (!InjectedBundle::shared().testRunner()->shouldDumpStatusCallbacks())
return;
- InjectedBundle::shared().stringBuilder()->appendLiteral("UI DELEGATE STATUS CALLBACK: setStatusText:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(statusbarText));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("UI DELEGATE STATUS CALLBACK: setStatusText:");
+ stringBuilder.append(toWTFString(statusbarText));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef)
@@ -1433,9 +1413,11 @@ void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFra
if (!InjectedBundle::shared().isTestRunning())
return;
- InjectedBundle::shared().stringBuilder()->appendLiteral("ALERT: ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(message));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("ALERT: ");
+ stringBuilder.append(toWTFString(message));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef)
@@ -1443,18 +1425,22 @@ void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleF
if (!InjectedBundle::shared().isTestRunning())
return;
- InjectedBundle::shared().stringBuilder()->appendLiteral("CONFIRM: ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(message));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("CONFIRM: ");
+ stringBuilder.append(toWTFString(message));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef)
{
- InjectedBundle::shared().stringBuilder()->appendLiteral("PROMPT: ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(message));
- InjectedBundle::shared().stringBuilder()->appendLiteral(", default text: ");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(defaultValue));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("PROMPT: ");
+ stringBuilder.append(toWTFString(message));
+ stringBuilder.appendLiteral(", default text: ");
+ stringBuilder.append(toWTFString(defaultValue));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKSecurityOriginRef origin, int64_t totalBytesNeeded)
@@ -1466,11 +1452,13 @@ void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKSecurityOriginRef
// above or below a threshold.
int64_t truncatedSpaceNeeded = (totalBytesNeeded / 10000) * 10000;
- InjectedBundle::shared().stringBuilder()->appendLiteral("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:");
- InjectedBundle::shared().stringBuilder()->append(securityOriginToStr(origin));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" totalSpaceNeeded:~");
- InjectedBundle::shared().stringBuilder()->appendNumber(truncatedSpaceNeeded);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("UI DELEGATE APPLICATION CACHE CALLBACK: exceededApplicationCacheOriginQuotaForSecurityOrigin:");
+ stringBuilder.append(securityOriginToStr(origin));
+ stringBuilder.appendLiteral(" totalSpaceNeeded:~");
+ stringBuilder.appendNumber(truncatedSpaceNeeded);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
if (InjectedBundle::shared().testRunner()->shouldDisallowIncreaseForApplicationCacheQuota())
@@ -1483,11 +1471,13 @@ void InjectedBundlePage::didReachApplicationCacheOriginQuota(WKSecurityOriginRef
uint64_t InjectedBundlePage::didExceedDatabaseQuota(WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes)
{
if (InjectedBundle::shared().testRunner()->shouldDumpDatabaseCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:");
- InjectedBundle::shared().stringBuilder()->append(securityOriginToStr(origin));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" database:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(databaseName));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("UI DELEGATE DATABASE CALLBACK: exceededDatabaseQuotaForSecurityOrigin:");
+ stringBuilder.append(securityOriginToStr(origin));
+ stringBuilder.appendLiteral(" database:");
+ stringBuilder.append(toWTFString(databaseName));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
static const uint64_t defaultQuota = 5 * 1024 * 1024;
@@ -1557,9 +1547,11 @@ bool InjectedBundlePage::shouldBeginEditing(WKBundleRangeHandleRef range)
return true;
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldBeginEditingInDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), range));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldBeginEditingInDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), range));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1570,9 +1562,11 @@ bool InjectedBundlePage::shouldEndEditing(WKBundleRangeHandleRef range)
return true;
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldEndEditingInDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), range));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldEndEditingInDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), range));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1589,13 +1583,15 @@ bool InjectedBundlePage::shouldInsertNode(WKBundleNodeHandleRef node, WKBundleRa
};
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldInsertNode:");
- InjectedBundle::shared().stringBuilder()->append(dumpPath(m_page, m_world.get(), node));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" replacingDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), rangeToReplace));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" givenAction:");
- InjectedBundle::shared().stringBuilder()->append(insertactionstring[action]);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldInsertNode:");
+ stringBuilder.append(dumpPath(m_page, m_world.get(), node));
+ stringBuilder.appendLiteral(" replacingDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), rangeToReplace));
+ stringBuilder.appendLiteral(" givenAction:");
+ stringBuilder.append(insertactionstring[action]);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1612,13 +1608,15 @@ bool InjectedBundlePage::shouldInsertText(WKStringRef text, WKBundleRangeHandleR
};
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldInsertText:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(text));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" replacingDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), rangeToReplace));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" givenAction:");
- InjectedBundle::shared().stringBuilder()->append(insertactionstring[action]);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldInsertText:");
+ stringBuilder.append(toWTFString(text));
+ stringBuilder.appendLiteral(" replacingDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), rangeToReplace));
+ stringBuilder.appendLiteral(" givenAction:");
+ stringBuilder.append(insertactionstring[action]);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1629,9 +1627,11 @@ bool InjectedBundlePage::shouldDeleteRange(WKBundleRangeHandleRef range)
return true;
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldDeleteDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), range));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldDeleteDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), range));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1651,15 +1651,17 @@ bool InjectedBundlePage::shouldChangeSelectedRange(WKBundleRangeHandleRef fromRa
};
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldChangeSelectedDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), fromRange));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" toDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), toRange));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" affinity:");
- InjectedBundle::shared().stringBuilder()->append(affinitystring[affinity]);
- InjectedBundle::shared().stringBuilder()->appendLiteral(" stillSelecting:");
- InjectedBundle::shared().stringBuilder()->append(boolstring[stillSelecting]);
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldChangeSelectedDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), fromRange));
+ stringBuilder.appendLiteral(" toDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), toRange));
+ stringBuilder.appendLiteral(" affinity:");
+ stringBuilder.append(affinitystring[affinity]);
+ stringBuilder.appendLiteral(" stillSelecting:");
+ stringBuilder.append(boolstring[stillSelecting]);
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1670,11 +1672,13 @@ bool InjectedBundlePage::shouldApplyStyle(WKBundleCSSStyleDeclarationRef style,
return true;
if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: shouldApplyStyle:");
- InjectedBundle::shared().stringBuilder()->append(styleDecToStr(style));
- InjectedBundle::shared().stringBuilder()->appendLiteral(" toElementsInDOMRange:");
- InjectedBundle::shared().stringBuilder()->append(rangeToStr(m_page, m_world.get(), range));
- InjectedBundle::shared().stringBuilder()->append('\n');
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: shouldApplyStyle:");
+ stringBuilder.append(styleDecToStr(style));
+ stringBuilder.appendLiteral(" toElementsInDOMRange:");
+ stringBuilder.append(rangeToStr(m_page, m_world.get(), range));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
return InjectedBundle::shared().testRunner()->shouldAllowEditing();
}
@@ -1683,62 +1687,70 @@ void InjectedBundlePage::didBeginEditing(WKStringRef notificationName)
{
if (!InjectedBundle::shared().isTestRunning())
return;
+ if (!InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks())
+ return;
- if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: webViewDidBeginEditing:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(notificationName));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: webViewDidBeginEditing:");
+ stringBuilder.append(toWTFString(notificationName));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didEndEditing(WKStringRef notificationName)
{
if (!InjectedBundle::shared().isTestRunning())
return;
+ if (!InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks())
+ return;
- if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: webViewDidEndEditing:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(notificationName));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: webViewDidEndEditing:");
+ stringBuilder.append(toWTFString(notificationName));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didChange(WKStringRef notificationName)
{
if (!InjectedBundle::shared().isTestRunning())
return;
+ if (!InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks())
+ return;
- if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: webViewDidChange:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(notificationName));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: webViewDidChange:");
+ stringBuilder.append(toWTFString(notificationName));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
void InjectedBundlePage::didChangeSelection(WKStringRef notificationName)
{
if (!InjectedBundle::shared().isTestRunning())
return;
+ if (!InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks())
+ return;
- if (InjectedBundle::shared().testRunner()->shouldDumpEditingCallbacks()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("EDITING DELEGATE: webViewDidChangeSelection:");
- InjectedBundle::shared().stringBuilder()->append(toWTFString(notificationName));
- InjectedBundle::shared().stringBuilder()->append('\n');
- }
+ StringBuilder stringBuilder;
+ stringBuilder.appendLiteral("EDITING DELEGATE: webViewDidChangeSelection:");
+ stringBuilder.append(toWTFString(notificationName));
+ stringBuilder.append('\n');
+ InjectedBundle::shared().outputText(stringBuilder.toString());
}
#if ENABLE(FULLSCREEN_API)
bool InjectedBundlePage::supportsFullScreen(WKBundlePageRef pageRef, WKFullScreenKeyboardRequestType requestType)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFullScreenCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("supportsFullScreen() == true\n");
+ InjectedBundle::shared().outputText("supportsFullScreen() == true\n");
return true;
}
void InjectedBundlePage::enterFullScreenForElement(WKBundlePageRef pageRef, WKBundleNodeHandleRef elementRef)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFullScreenCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("enterFullScreenForElement()\n");
+ InjectedBundle::shared().outputText("enterFullScreenForElement()\n");
if (!InjectedBundle::shared().testRunner()->hasCustomFullScreenBehavior()) {
WKBundlePageWillEnterFullScreen(pageRef);
@@ -1749,7 +1761,7 @@ void InjectedBundlePage::enterFullScreenForElement(WKBundlePageRef pageRef, WKBu
void InjectedBundlePage::exitFullScreenForElement(WKBundlePageRef pageRef, WKBundleNodeHandleRef elementRef)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFullScreenCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("exitFullScreenForElement()\n");
+ InjectedBundle::shared().outputText("exitFullScreenForElement()\n");
if (!InjectedBundle::shared().testRunner()->hasCustomFullScreenBehavior()) {
WKBundlePageWillExitFullScreen(pageRef);
@@ -1760,19 +1772,19 @@ void InjectedBundlePage::exitFullScreenForElement(WKBundlePageRef pageRef, WKBun
void InjectedBundlePage::beganEnterFullScreen(WKBundlePageRef, WKRect, WKRect)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFullScreenCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("beganEnterFullScreen()\n");
+ InjectedBundle::shared().outputText("beganEnterFullScreen()\n");
}
void InjectedBundlePage::beganExitFullScreen(WKBundlePageRef, WKRect, WKRect)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFullScreenCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("beganExitFullScreen()\n");
+ InjectedBundle::shared().outputText("beganExitFullScreen()\n");
}
void InjectedBundlePage::closeFullScreen(WKBundlePageRef pageRef)
{
if (InjectedBundle::shared().testRunner()->shouldDumpFullScreenCallbacks())
- InjectedBundle::shared().stringBuilder()->appendLiteral("closeFullScreen()\n");
+ InjectedBundle::shared().outputText("closeFullScreen()\n");
if (!InjectedBundle::shared().testRunner()->hasCustomFullScreenBehavior()) {
WKBundlePageWillExitFullScreen(pageRef);
@@ -1786,15 +1798,15 @@ static bool compareByTargetName(WKBundleBackForwardListItemRef item1, WKBundleBa
return toSTD(adoptWK(WKBundleBackForwardListItemCopyTarget(item1))) < toSTD(adoptWK(WKBundleBackForwardListItemCopyTarget(item2)));
}
-static void dumpBackForwardListItem(WKBundleBackForwardListItemRef item, unsigned indent, bool isCurrentItem)
+static void dumpBackForwardListItem(WKBundleBackForwardListItemRef item, unsigned indent, bool isCurrentItem, StringBuilder& stringBuilder)
{
unsigned column = 0;
if (isCurrentItem) {
- InjectedBundle::shared().stringBuilder()->appendLiteral("curr->");
+ stringBuilder.appendLiteral("curr->");
column = 6;
}
for (unsigned i = column; i < indent; i++)
- InjectedBundle::shared().stringBuilder()->append(' ');
+ stringBuilder.append(' ');
WTF::String url = toWTFString(adoptWK(WKURLCopyString(adoptWK(WKBundleBackForwardListItemCopyURL(item)).get())));
if (hasPrefix(url, "file:")) {
@@ -1804,23 +1816,23 @@ static void dumpBackForwardListItem(WKBundleBackForwardListItemRef item, unsigne
start = 0;
else
start += directoryName.length();
- InjectedBundle::shared().stringBuilder()->appendLiteral("(file test):");
- InjectedBundle::shared().stringBuilder()->append(url.substring(start));
+ stringBuilder.appendLiteral("(file test):");
+ stringBuilder.append(url.substring(start));
} else
- InjectedBundle::shared().stringBuilder()->append(url);
+ stringBuilder.append(url);
WTF::String target = toWTFString(adoptWK(WKBundleBackForwardListItemCopyTarget(item)));
if (target.length()) {
- InjectedBundle::shared().stringBuilder()->appendLiteral(" (in frame \"");
- InjectedBundle::shared().stringBuilder()->append(target);
- InjectedBundle::shared().stringBuilder()->appendLiteral("\")");
+ stringBuilder.appendLiteral(" (in frame \"");
+ stringBuilder.append(target);
+ stringBuilder.appendLiteral("\")");
}
// FIXME: Need WKBackForwardListItemIsTargetItem.
if (WKBundleBackForwardListItemIsTargetItem(item))
- InjectedBundle::shared().stringBuilder()->appendLiteral(" **nav target**");
+ stringBuilder.appendLiteral(" **nav target**");
- InjectedBundle::shared().stringBuilder()->append('\n');
+ stringBuilder.append('\n');
if (WKRetainPtr<WKArrayRef> kids = adoptWK(WKBundleBackForwardListItemCopyChildren(item))) {
// Sort to eliminate arbitrary result ordering which defeats reproducible testing.
@@ -1830,13 +1842,13 @@ static void dumpBackForwardListItem(WKBundleBackForwardListItemRef item, unsigne
sortedKids[i] = static_cast<WKBundleBackForwardListItemRef>(WKArrayGetItemAtIndex(kids.get(), i));
stable_sort(sortedKids.begin(), sortedKids.end(), compareByTargetName);
for (size_t i = 0; i < size; ++i)
- dumpBackForwardListItem(sortedKids[i], indent + 4, false);
+ dumpBackForwardListItem(sortedKids[i], indent + 4, false, stringBuilder);
}
}
-void InjectedBundlePage::dumpBackForwardList()
+void InjectedBundlePage::dumpBackForwardList(StringBuilder& stringBuilder)
{
- InjectedBundle::shared().stringBuilder()->appendLiteral("\n============== Back Forward List ==============\n");
+ stringBuilder.appendLiteral("\n============== Back Forward List ==============\n");
WKBundleBackForwardListRef list = WKBundlePageGetBackForwardList(m_page);
@@ -1865,9 +1877,9 @@ void InjectedBundlePage::dumpBackForwardList()
}
for (int i = itemsToPrint.size() - 1; i >= 0; i--)
- dumpBackForwardListItem(itemsToPrint[i].get(), 8, i == currentItemIndex);
+ dumpBackForwardListItem(itemsToPrint[i].get(), 8, i == currentItemIndex, stringBuilder);
- InjectedBundle::shared().stringBuilder()->appendLiteral("===============================================\n");
+ stringBuilder.appendLiteral("===============================================\n");
}
#if !PLATFORM(MAC)
diff --git a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index 7708a6f26..d09a204dd 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -29,6 +29,7 @@
#include <WebKit2/WKBundlePage.h>
#include <WebKit2/WKBundleScriptWorld.h>
#include <WebKit2/WKRetainPtr.h>
+#include <wtf/text/WTFString.h>
namespace WTR {
@@ -39,10 +40,6 @@ public:
WKBundlePageRef page() const { return m_page; }
-#if ENABLE(WEB_INTENTS)
- WKBundleIntentRequestRef currentIntentRequest() const { return m_currentIntentRequest.get(); }
-#endif
-
void dump();
void stopLoading();
@@ -50,7 +47,7 @@ public:
void prepare();
void resetAfterTest();
- void dumpBackForwardList();
+ void dumpBackForwardList(WTF::StringBuilder&);
private:
// Loader Client
@@ -78,8 +75,6 @@ private:
static void didFinishLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, const void*);
static void didFailLoadForResource(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, WKErrorRef, const void*);
static bool shouldCacheResponse(WKBundlePageRef, WKBundleFrameRef, uint64_t identifier, const void*);
- static void didReceiveIntentForFrame(WKBundlePageRef, WKBundleFrameRef, WKBundleIntentRequestRef, WKTypeRef*, const void*);
- static void registerIntentServiceForFrame(WKBundlePageRef, WKBundleFrameRef, WKIntentServiceInfoRef, WKTypeRef*, const void*);
void didStartProvisionalLoadForFrame(WKBundleFrameRef);
void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);
@@ -169,8 +164,9 @@ private:
void didChange(WKStringRef notificationName);
void didChangeSelection(WKStringRef notificationName);
- void dumpAllFramesText();
- void dumpAllFrameScrollPositions();
+ void dumpAllFramesText(WTF::StringBuilder&);
+ void dumpAllFrameScrollPositions(WTF::StringBuilder&);
+ void dumpDOMAsWebArchive(WKBundleFrameRef, WTF::StringBuilder&);
void platformDidStartProvisionalLoadForFrame(WKBundleFrameRef);
@@ -179,10 +175,6 @@ private:
WKBundlePageRef m_page;
WKRetainPtr<WKBundleScriptWorldRef> m_world;
WKRetainPtr<WKBundleBackForwardListItemRef> m_previousTestBackForwardListItem;
-
-#if ENABLE(WEB_INTENTS)
- WKRetainPtr<WKBundleIntentRequestRef> m_currentIntentRequest;
-#endif
};
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
index 2c7b25046..be013f2d3 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,6 +42,7 @@
#include <WebKit2/WKBundlePagePrivate.h>
#include <WebKit2/WKBundlePrivate.h>
#include <WebKit2/WKBundleScriptWorld.h>
+#include <WebKit2/WKData.h>
#include <WebKit2/WKRetainPtr.h>
#include <WebKit2/WKSerializedScriptValue.h>
#include <WebKit2/WebKit2_C.h>
@@ -52,11 +53,6 @@
#include <wtf/text/CString.h>
#include <wtf/text/StringBuilder.h>
-#if ENABLE(WEB_INTENTS)
-#include <WebKit2/WKBundleIntent.h>
-#include <WebKit2/WKBundleIntentRequest.h>
-#endif
-
namespace WTR {
const double TestRunner::waitToDumpWatchdogTimerInterval = 30;
@@ -89,6 +85,7 @@ TestRunner::TestRunner()
, m_waitToDump(false)
, m_testRepaint(false)
, m_testRepaintSweepHorizontally(false)
+ , m_isPrinting(false)
, m_willSendRequestReturnsNull(false)
, m_willSendRequestReturnsNullOnRedirect(false)
, m_shouldStopProvisionalFrameLoads(false)
@@ -150,9 +147,7 @@ void TestRunner::waitUntilDone()
void TestRunner::waitToDumpWatchdogTimerFired()
{
invalidateWaitToDumpWatchdogTimer();
- const char* message = "FAIL: Timed out waiting for notifyDone to be called\n";
- InjectedBundle::shared().stringBuilder()->append(message);
- InjectedBundle::shared().stringBuilder()->append("\n");
+ InjectedBundle::shared().outputText("FAIL: Timed out waiting for notifyDone to be called\n\n");
InjectedBundle::shared().done();
}
@@ -167,34 +162,9 @@ void TestRunner::notifyDone()
m_waitToDump = false;
}
-unsigned TestRunner::numberOfActiveAnimations() const
-{
- // FIXME: Is it OK this works only for the main frame?
- // FIXME: If this is needed only for the main frame, then why is the function on WKBundleFrame instead of WKBundlePage?
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- return WKBundleFrameGetNumberOfActiveAnimations(mainFrame);
-}
-
-bool TestRunner::pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId)
+void TestRunner::setCustomTimeout(int timeout)
{
- // FIXME: Is it OK this works only for the main frame?
- // FIXME: If this is needed only for the main frame, then why is the function on WKBundleFrame instead of WKBundlePage?
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- return WKBundleFramePauseAnimationOnElementWithId(mainFrame, toWK(animationName).get(), toWK(elementId).get(), time);
-}
-
-bool TestRunner::pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId)
-{
- // FIXME: Is it OK this works only for the main frame?
- // FIXME: If this is needed only for the main frame, then why is the function on WKBundleFrame instead of WKBundlePage?
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- return WKBundleFramePauseTransitionOnElementWithId(mainFrame, toWK(propertyName).get(), toWK(elementId).get(), time);
-}
-
-void TestRunner::suspendAnimations()
-{
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- WKBundleFrameSuspendAnimations(mainFrame);
+ m_timeout = timeout;
}
void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
@@ -221,31 +191,6 @@ void TestRunner::keepWebHistory()
WKBundleSetShouldTrackVisitedLinks(InjectedBundle::shared().bundle(), true);
}
-JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSValueRef element)
-{
- // FIXME: Is it OK this works only for the main frame?
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
- if (!JSValueIsObject(context, element))
- return JSValueMakeUndefined(context);
- JSValueRef value = WKBundleFrameGetComputedStyleIncludingVisitedInfo(mainFrame, const_cast<JSObjectRef>(element));
- if (!value)
- return JSValueMakeUndefined(context);
- return value;
-}
-
-JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSValueRef element)
-{
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
- if (!element || !JSValueIsObject(context, element))
- return 0;
- WKRetainPtr<WKStringRef> text(AdoptWK, WKBundleFrameCopyMarkerText(mainFrame, const_cast<JSObjectRef>(element)));
- if (WKStringIsEmpty(text.get()))
- return 0;
- return toJS(text);
-}
-
void TestRunner::execCommand(JSStringRef name, JSStringRef argument)
{
WKBundlePageExecuteEditingCommand(InjectedBundle::shared().page()->page(), toWK(name).get(), toWK(argument).get());
@@ -381,11 +326,6 @@ void TestRunner::setAllowFileAccessFromFileURLs(bool enabled)
WKBundleSetAllowFileAccessFromFileURLs(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
}
-void TestRunner::setFrameFlatteningEnabled(bool enabled)
-{
- WKBundleSetFrameFlatteningEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
-}
-
void TestRunner::setPluginsEnabled(bool enabled)
{
WKBundleSetPluginsEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
@@ -436,6 +376,14 @@ void TestRunner::setValueForUser(JSContextRef context, JSValueRef element, JSStr
WKBundleNodeHandleSetHTMLInputElementValueForUser(nodeHandle.get(), toWK(value).get());
}
+void TestRunner::setAudioResult(JSContextRef context, JSValueRef data)
+{
+ WKRetainPtr<WKDataRef> audioData(AdoptWK, WKBundleCreateWKDataFromUInt8Array(InjectedBundle::shared().bundle(), context, data));
+ InjectedBundle::shared().setAudioResult(audioData.get());
+ m_whatToDump = Audio;
+ m_dumpPixels = false;
+}
+
unsigned TestRunner::windowCount()
{
return InjectedBundle::shared().pageCount();
@@ -593,11 +541,6 @@ static void callTestRunnerCallback(unsigned index)
JSValueUnprotect(context, callback);
}
-unsigned TestRunner::workerThreadCount()
-{
- return WKBundleGetWorkerThreadCount(InjectedBundle::shared().bundle());
-}
-
void TestRunner::addChromeInputField(JSValueRef callback)
{
cacheTestRunnerCallback(AddChromeInputFieldCallbackID, callback);
@@ -658,52 +601,6 @@ void TestRunner::overridePreference(JSStringRef preference, JSStringRef value)
WKBundleOverrideBoolPreferenceForTestRunner(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), toWK(preference).get(), toBool(value));
}
-void TestRunner::sendWebIntentResponse(JSStringRef reply)
-{
-#if ENABLE(WEB_INTENTS)
- WKRetainPtr<WKBundleIntentRequestRef> currentRequest = InjectedBundle::shared().page()->currentIntentRequest();
- if (!currentRequest)
- return;
-
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
-
- if (reply) {
- WKRetainPtr<WKSerializedScriptValueRef> serializedData(AdoptWK, WKSerializedScriptValueCreate(context, JSValueMakeString(context, reply), 0));
- WKBundleIntentRequestPostResult(currentRequest.get(), serializedData.get());
- } else {
- JSRetainPtr<JSStringRef> errorReply(JSStringCreateWithUTF8CString("ERROR"));
- WKRetainPtr<WKSerializedScriptValueRef> serializedData(AdoptWK, WKSerializedScriptValueCreate(context, JSValueMakeString(context, errorReply.get()), 0));
- WKBundleIntentRequestPostFailure(currentRequest.get(), serializedData.get());
- }
-#endif
-}
-
-void TestRunner::deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data)
-{
-#if ENABLE(WEB_INTENTS)
- WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
- JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
-
- WKRetainPtr<WKStringRef> actionWK = toWK(action);
- WKRetainPtr<WKStringRef> typeWK = toWK(type);
- WKRetainPtr<WKSerializedScriptValueRef> dataWK(AdoptWK, WKSerializedScriptValueCreate(context, JSValueMakeString(context, data), 0));
-
- WKRetainPtr<WKMutableDictionaryRef> intentInitDict(AdoptWK, WKMutableDictionaryCreate());
- WKRetainPtr<WKStringRef> actionKey(AdoptWK, WKStringCreateWithUTF8CString("action"));
- WKDictionaryAddItem(intentInitDict.get(), actionKey.get(), actionWK.get());
-
- WKRetainPtr<WKStringRef> typeKey(AdoptWK, WKStringCreateWithUTF8CString("type"));
- WKDictionaryAddItem(intentInitDict.get(), typeKey.get(), typeWK.get());
-
- WKRetainPtr<WKStringRef> dataKey(AdoptWK, WKStringCreateWithUTF8CString("data"));
- WKDictionaryAddItem(intentInitDict.get(), dataKey.get(), dataWK.get());
-
- WKRetainPtr<WKBundleIntentRef> wkIntent(AdoptWK, WKBundleIntentCreate(intentInitDict.get()));
- WKBundlePageDeliverIntentToFrame(InjectedBundle::shared().page()->page(), mainFrame, wkIntent.get());
-#endif
-}
-
void TestRunner::setAlwaysAcceptCookies(bool accept)
{
WKBundleSetAlwaysAcceptCookies(InjectedBundle::shared().bundle(), accept);
@@ -731,11 +628,6 @@ void TestRunner::setUserStyleSheetLocation(JSStringRef location)
setUserStyleSheetEnabled(true);
}
-void TestRunner::setMinimumTimerInterval(double seconds)
-{
- WKBundleSetMinimumTimerInterval(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), seconds);
-}
-
void TestRunner::setSpatialNavigationEnabled(bool enabled)
{
WKBundleSetSpatialNavigationEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
@@ -761,6 +653,11 @@ void TestRunner::setCacheModel(int model)
WKBundleSetCacheModel(InjectedBundle::shared().bundle(), model);
}
+void TestRunner::setAsynchronousSpellCheckingEnabled(bool enabled)
+{
+ WKBundleSetAsynchronousSpellCheckingEnabled(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), enabled);
+}
+
void TestRunner::grantWebNotificationPermission(JSStringRef origin)
{
WKRetainPtr<WKStringRef> originWK = toWK(origin);
@@ -885,4 +782,41 @@ void TestRunner::queueNonLoadingScript(JSStringRef script)
InjectedBundle::shared().queueNonLoadingScript(scriptWK.get());
}
+void TestRunner::setHandlesAuthenticationChallenges(bool handlesAuthenticationChallenges)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetHandlesAuthenticationChallenge"));
+ WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(handlesAuthenticationChallenges));
+ WKBundlePostMessage(InjectedBundle::shared().bundle(), messageName.get(), messageBody.get());
+}
+
+void TestRunner::setAuthenticationUsername(JSStringRef username)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetAuthenticationUsername"));
+ WKRetainPtr<WKStringRef> messageBody(AdoptWK, WKStringCreateWithJSString(username));
+ WKBundlePostMessage(InjectedBundle::shared().bundle(), messageName.get(), messageBody.get());
+}
+
+void TestRunner::setAuthenticationPassword(JSStringRef password)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetAuthenticationPassword"));
+ WKRetainPtr<WKStringRef> messageBody(AdoptWK, WKStringCreateWithJSString(password));
+ WKBundlePostMessage(InjectedBundle::shared().bundle(), messageName.get(), messageBody.get());
+}
+
+bool TestRunner::secureEventInputIsEnabled() const
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SecureEventInputIsEnabled"));
+ WKTypeRef returnData = 0;
+
+ WKBundlePostSynchronousMessage(InjectedBundle::shared().bundle(), messageName.get(), 0, &returnData);
+ return WKBooleanGetValue(static_cast<WKBooleanRef>(returnData));
+}
+
+void TestRunner::setBlockAllPlugins(bool shouldBlock)
+{
+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetBlockAllPlugins"));
+ WKRetainPtr<WKBooleanRef> messageBody(AdoptWK, WKBooleanCreate(shouldBlock));
+ WKBundlePostMessage(InjectedBundle::shared().bundle(), messageName.get(), messageBody.get());
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
index 3a974a989..0c91645f4 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
@@ -45,7 +45,11 @@ typedef QTimer PlatformTimerRef;
#elif PLATFORM(GTK)
typedef unsigned int PlatformTimerRef;
#elif PLATFORM(EFL)
+#if USE(EO)
+typedef struct _Eo Ecore_Timer;
+#else
typedef struct _Ecore_Timer Ecore_Timer;
+#endif
typedef Ecore_Timer* PlatformTimerRef;
#endif
@@ -84,6 +88,7 @@ public:
void dumpWillCacheResponse() { m_dumpWillCacheResponse = true; }
void dumpApplicationCacheDelegateCallbacks() { m_dumpApplicationCacheDelegateCallbacks = true; }
void dumpDatabaseCallbacks() { m_dumpDatabaseCallbacks = true; }
+ void dumpDOMAsWebArchive() { m_whatToDump = DOMAsWebArchive; }
void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
void setShouldDumpProgressFinishedCallback(bool value) { m_dumpProgressFinishedCallback = value; }
@@ -96,7 +101,6 @@ public:
void setXSSAuditorEnabled(bool);
void setAllowUniversalAccessFromFileURLs(bool);
void setAllowFileAccessFromFileURLs(bool);
- void setFrameFlatteningEnabled(bool);
void setPluginsEnabled(bool);
void setJavaScriptCanAccessClipboard(bool);
void setPrivateBrowsingEnabled(bool);
@@ -107,31 +111,23 @@ public:
void removeOriginAccessWhitelistEntry(JSStringRef sourceOrigin, JSStringRef destinationProtocol, JSStringRef destinationHost, bool allowDestinationSubdomains);
void setUserStyleSheetEnabled(bool);
void setUserStyleSheetLocation(JSStringRef);
- void setMinimumTimerInterval(double seconds); // Interval specified in seconds.
void setSpatialNavigationEnabled(bool);
void setTabKeyCyclesThroughElements(bool);
void setSerializeHTTPLoads();
void dispatchPendingLoadRequests();
void setCacheModel(int);
+ void setAsynchronousSpellCheckingEnabled(bool);
// Special DOM functions.
- JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);
void clearBackForwardList();
void execCommand(JSStringRef name, JSStringRef argument);
bool isCommandEnabled(JSStringRef name);
- JSRetainPtr<JSStringRef> markerTextForListItem(JSValueRef element);
unsigned windowCount();
// Repaint testing.
void testRepaint() { m_testRepaint = true; }
void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
void display();
-
- // Animation testing.
- unsigned numberOfActiveAnimations() const;
- bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
- bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
- void suspendAnimations();
// UserContent testing.
void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);
@@ -157,10 +153,22 @@ public:
// Printing
bool isPageBoxVisible(int pageIndex);
+ bool isPrinting() { return m_isPrinting; }
+ void setPrinting() { m_isPrinting = true; }
+
+ // Authentication
+ void setHandlesAuthenticationChallenges(bool);
+ void setAuthenticationUsername(JSStringRef);
+ void setAuthenticationPassword(JSStringRef);
void setValueForUser(JSContextRef, JSValueRef element, JSStringRef value);
- enum WhatToDump { RenderTree, MainFrameText, AllFramesText };
+ // Audio testing.
+ void setAudioResult(JSContextRef, JSValueRef data);
+
+ void setBlockAllPlugins(bool shouldBlock);
+
+ enum WhatToDump { RenderTree, MainFrameText, AllFramesText, Audio, DOMAsWebArchive };
WhatToDump whatToDump() const { return m_whatToDump; }
bool shouldDumpAllFrameScrollPositions() const { return m_shouldDumpAllFrameScrollPositions; }
@@ -217,8 +225,6 @@ public:
bool globalFlag() const { return m_globalFlag; }
void setGlobalFlag(bool value) { m_globalFlag = value; }
- unsigned workerThreadCount();
-
void addChromeInputField(JSValueRef);
void removeChromeInputField(JSValueRef);
void focusWebView(JSValueRef);
@@ -233,10 +239,6 @@ public:
void overridePreference(JSStringRef preference, JSStringRef value);
- // Web intents testing.
- void sendWebIntentResponse(JSStringRef reply);
- void deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data);
-
// Cookies testing
void setAlwaysAcceptCookies(bool);
@@ -262,6 +264,8 @@ public:
bool callShouldCloseOnWebView();
+ void setCustomTimeout(int duration);
+
// Work queue.
void queueBackNavigation(unsigned howFarBackward);
void queueForwardNavigation(unsigned howFarForward);
@@ -271,6 +275,8 @@ public:
void queueLoadingScript(JSStringRef script);
void queueNonLoadingScript(JSStringRef script);
+ bool secureEventInputIsEnabled() const;
+
private:
static const double waitToDumpWatchdogTimerInterval;
@@ -303,6 +309,7 @@ private:
bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
bool m_testRepaint;
bool m_testRepaintSweepHorizontally;
+ bool m_isPrinting;
bool m_willSendRequestReturnsNull;
bool m_willSendRequestReturnsNullOnRedirect;
@@ -314,6 +321,8 @@ private:
bool m_globalFlag;
bool m_customFullScreenBehavior;
+ int m_timeout;
+
bool m_userStyleSheetEnabled;
WKRetainPtr<WKStringRef> m_userStyleSheetLocation;
diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp
index 53e76dd68..3b58c0da0 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityControllerAtk.cpp
@@ -29,6 +29,9 @@
#include "AccessibilityController.h"
#include "InjectedBundle.h"
+#include "InjectedBundlePage.h"
+
+#include <WebKit2/WKBundlePagePrivate.h>
#include <atk/atk.h>
#include <cstdio>
#include <wtf/gobject/GOwnPtr.h>
@@ -55,7 +58,7 @@ static void printAccessibilityEvent(AtkObject* accessible, const gchar* signalNa
GOwnPtr<gchar> signalNameAndValue(signalValue ? g_strdup_printf("%s = %s", signalName, signalValue) : g_strdup(signalName));
GOwnPtr<gchar> accessibilityEventString(g_strdup_printf("Accessibility object emitted \"%s\" / Name: \"%s\" / Role: %d\n", signalNameAndValue.get(), objectName, objectRole));
- InjectedBundle::shared().stringBuilder()->append(accessibilityEventString.get());
+ InjectedBundle::shared().outputText(String::fromUTF8(accessibilityEventString.get()));
}
static gboolean axObjectEventListener(GSignalInvocationHint *signalHint, guint numParamValues, const GValue *paramValues, gpointer data)
@@ -147,4 +150,67 @@ void AccessibilityController::resetToConsistentState()
}
}
+static AtkObject* childElementById(AtkObject* parent, const char* id)
+{
+ if (!ATK_IS_OBJECT(parent))
+ return 0;
+
+ bool parentFound = false;
+ AtkAttributeSet* attributeSet = atk_object_get_attributes(parent);
+ for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
+ AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
+ if (!strcmp(attribute->name, "html-id")) {
+ if (!strcmp(attribute->value, id))
+ parentFound = true;
+ break;
+ }
+ }
+ atk_attribute_set_free(attributeSet);
+
+ if (parentFound)
+ return parent;
+
+ int childCount = atk_object_get_n_accessible_children(parent);
+ for (int i = 0; i < childCount; i++) {
+ AtkObject* result = childElementById(atk_object_ref_accessible_child(parent, i), id);
+ if (ATK_IS_OBJECT(result))
+ return result;
+ }
+
+ return 0;
+}
+
+PassRefPtr<AccessibilityUIElement> AccessibilityController::accessibleElementById(JSStringRef id)
+{
+ AtkObject* root = ATK_OBJECT(WKAccessibilityRootObject(InjectedBundle::shared().page()->page()));
+ if (!root)
+ return 0;
+
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(id);
+ GOwnPtr<gchar> idBuffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(id, idBuffer.get(), bufferSize);
+
+ AtkObject* result = childElementById(root, idBuffer.get());
+ if (ATK_IS_OBJECT(result))
+ return AccessibilityUIElement::create(result);
+
+ return 0;
+}
+
+PassRefPtr<AccessibilityUIElement> AccessibilityController::rootElement()
+{
+ WKBundlePageRef page = InjectedBundle::shared().page()->page();
+ void* root = WKAccessibilityRootObject(page);
+
+ return AccessibilityUIElement::create(static_cast<AtkObject*>(root));
+}
+
+PassRefPtr<AccessibilityUIElement> AccessibilityController::focusedElement()
+{
+ WKBundlePageRef page = InjectedBundle::shared().page()->page();
+ void* root = WKAccessibilityFocusedObject(page);
+
+ return AccessibilityUIElement::create(static_cast<AtkObject*>(root));
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
index 0083e3544..a72f48612 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
@@ -27,8 +27,11 @@
#include "config.h"
#include "AccessibilityUIElement.h"
+#if HAVE(ACCESSIBILITY)
+
#include "InjectedBundle.h"
#include "InjectedBundlePage.h"
+#include "NotImplemented.h"
#include <JavaScriptCore/JSStringRef.h>
#include <atk/atk.h>
#include <wtf/Assertions.h>
@@ -40,26 +43,57 @@
namespace WTR {
-static gchar* attributeSetToString(AtkAttributeSet* attributeSet)
+static String coreAttributeToAtkAttribute(JSStringRef attribute)
+{
+ size_t bufferSize = JSStringGetMaximumUTF8CStringSize(attribute);
+ GOwnPtr<gchar> buffer(static_cast<gchar*>(g_malloc(bufferSize)));
+ JSStringGetUTF8CString(attribute, buffer.get(), bufferSize);
+
+ String attributeString = String::fromUTF8(buffer.get());
+ return attributeString == "AXPlaceholderValue" ? "placeholder-text" : String();
+}
+
+static String getAttributeSetValueForId(AtkObject* accessible, const char* id)
+{
+ const char* attributeValue = 0;
+ AtkAttributeSet* attributeSet = atk_object_get_attributes(accessible);
+ for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
+ AtkAttribute* atkAttribute = static_cast<AtkAttribute*>(attributes->data);
+ if (!strcmp(atkAttribute->name, id)) {
+ attributeValue = atkAttribute->value;
+ break;
+ }
+ }
+
+ String atkAttributeValue = String::fromUTF8(attributeValue);
+ atk_attribute_set_free(attributeSet);
+
+ return atkAttributeValue;
+}
+
+static char* getAtkAttributeSetAsString(AtkObject* accessible)
{
GString* str = g_string_new(0);
- for (GSList* attributes = attributeSet; attributes; attributes = attributes->next) {
+
+ AtkAttributeSet* attributeSet = atk_object_get_attributes(accessible);
+ for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
GOwnPtr<gchar> attributeData(g_strconcat(attribute->name, ":", attribute->value, NULL));
g_string_append(str, attributeData.get());
if (attributes->next)
g_string_append(str, ", ");
}
+ atk_attribute_set_free(attributeSet);
return g_string_free(str, FALSE);
}
static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
{
- if (!ATK_IS_OBJECT(element))
+ if (!ATK_IS_OBJECT(element.get()))
return false;
- GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
+ GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element.get())));
return atk_state_set_contains_state(stateSet.get(), stateType);
}
@@ -67,15 +101,15 @@ static JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange)
{
GOwnPtr<gchar> rangeString(g_strdup("{0, 0}"));
- if (!element || !ATK_IS_OBJECT(element))
+ if (!element || !ATK_IS_OBJECT(element.get()))
return JSStringCreateWithUTF8CString(rangeString.get());
- AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element));
+ AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element.get()));
if (!axTable || !ATK_IS_TABLE(axTable))
return JSStringCreateWithUTF8CString(rangeString.get());
// Look for the cell in the table.
- gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element));
+ gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element.get()));
if (indexInParent == -1)
return JSStringCreateWithUTF8CString(rangeString.get());
@@ -103,20 +137,20 @@ static JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange)
static void alterCurrentValue(PlatformUIElement element, int factor)
{
- if (!element || !ATK_IS_VALUE(element))
+ if (!element || !ATK_IS_VALUE(element.get()))
return;
GValue currentValue = G_VALUE_INIT;
- atk_value_get_current_value(ATK_VALUE(element), &currentValue);
+ atk_value_get_current_value(ATK_VALUE(element.get()), &currentValue);
GValue increment = G_VALUE_INIT;
- atk_value_get_minimum_increment(ATK_VALUE(element), &increment);
+ atk_value_get_minimum_increment(ATK_VALUE(element.get()), &increment);
GValue newValue = G_VALUE_INIT;
g_value_init(&newValue, G_TYPE_DOUBLE);
g_value_set_float(&newValue, g_value_get_float(&currentValue) + factor * g_value_get_float(&increment));
- atk_value_set_current_value(ATK_VALUE(element), &newValue);
+ atk_value_set_current_value(ATK_VALUE(element.get()), &newValue);
g_value_unset(&newValue);
g_value_unset(&increment);
@@ -139,6 +173,114 @@ static gchar* replaceCharactersForResults(gchar* str)
return g_strdup(uString.utf8().data());
}
+static const gchar* roleToString(AtkRole role)
+{
+ switch (role) {
+ case ATK_ROLE_ALERT:
+ return "AXRole: AXAlert";
+ case ATK_ROLE_CANVAS:
+ return "AXRole: AXCanvas";
+ case ATK_ROLE_CHECK_BOX:
+ return "AXRole: AXCheckBox";
+ case ATK_ROLE_COLUMN_HEADER:
+ return "AXRole: AXColumnHeader";
+ case ATK_ROLE_COMBO_BOX:
+ return "AXRole: AXComboBox";
+ case ATK_ROLE_DOCUMENT_FRAME:
+ return "AXRole: AXWebArea";
+ case ATK_ROLE_ENTRY:
+ return "AXRole: AXTextField";
+ case ATK_ROLE_FOOTER:
+ return "AXRole: AXFooter";
+ case ATK_ROLE_FORM:
+ return "AXRole: AXForm";
+ case ATK_ROLE_GROUPING:
+ return "AXRole: AXGroup";
+ case ATK_ROLE_HEADING:
+ return "AXRole: AXHeading";
+ case ATK_ROLE_IMAGE:
+ return "AXRole: AXImage";
+ case ATK_ROLE_IMAGE_MAP:
+ return "AXRole: AXImageMap";
+ case ATK_ROLE_LABEL:
+ return "AXRole: AXLabel";
+ case ATK_ROLE_LINK:
+ return "AXRole: AXLink";
+ case ATK_ROLE_LIST:
+ return "AXRole: AXList";
+ case ATK_ROLE_LIST_BOX:
+ return "AXRole: AXListBox";
+ case ATK_ROLE_LIST_ITEM:
+ return "AXRole: AXListItem";
+ case ATK_ROLE_MENU:
+ return "AXRole: AXMenu";
+ case ATK_ROLE_MENU_BAR:
+ return "AXRole: AXMenuBar";
+ case ATK_ROLE_MENU_ITEM:
+ return "AXRole: AXMenuItem";
+ case ATK_ROLE_PAGE_TAB:
+ return "AXRole: AXTab";
+ case ATK_ROLE_PAGE_TAB_LIST:
+ return "AXRole: AXTabGroup";
+ case ATK_ROLE_PANEL:
+ return "AXRole: AXGroup";
+ case ATK_ROLE_PARAGRAPH:
+ return "AXRole: AXParagraph";
+ case ATK_ROLE_PASSWORD_TEXT:
+ return "AXRole: AXPasswordField";
+ case ATK_ROLE_PUSH_BUTTON:
+ return "AXRole: AXButton";
+ case ATK_ROLE_RADIO_BUTTON:
+ return "AXRole: AXRadioButton";
+ case ATK_ROLE_ROW_HEADER:
+ return "AXRole: AXRowHeader";
+ case ATK_ROLE_RULER:
+ return "AXRole: AXRuler";
+ case ATK_ROLE_SCROLL_BAR:
+ return "AXRole: AXScrollBar";
+ case ATK_ROLE_SCROLL_PANE:
+ return "AXRole: AXScrollArea";
+ case ATK_ROLE_SECTION:
+ return "AXRole: AXDiv";
+ case ATK_ROLE_SEPARATOR:
+ return "AXRole: AXHorizontalRule";
+ case ATK_ROLE_SLIDER:
+ return "AXRole: AXSlider";
+ case ATK_ROLE_SPIN_BUTTON:
+ return "AXRole: AXSpinButton";
+ case ATK_ROLE_TABLE:
+ return "AXRole: AXTable";
+ case ATK_ROLE_TABLE_CELL:
+ return "AXRole: AXCell";
+ case ATK_ROLE_TABLE_COLUMN_HEADER:
+ return "AXRole: AXColumnHeader";
+ case ATK_ROLE_TABLE_ROW:
+ return "AXRole: AXRow";
+ case ATK_ROLE_TABLE_ROW_HEADER:
+ return "AXRole: AXRowHeader";
+ case ATK_ROLE_TOGGLE_BUTTON:
+ return "AXRole: AXToggleButton";
+ case ATK_ROLE_TOOL_BAR:
+ return "AXRole: AXToolbar";
+ case ATK_ROLE_TOOL_TIP:
+ return "AXRole: AXUserInterfaceTooltip";
+ case ATK_ROLE_TREE:
+ return "AXRole: AXTree";
+ case ATK_ROLE_TREE_TABLE:
+ return "AXRole: AXTreeGrid";
+ case ATK_ROLE_TREE_ITEM:
+ return "AXRole: AXTreeItem";
+ case ATK_ROLE_WINDOW:
+ return "AXRole: AXWindow";
+ case ATK_ROLE_UNKNOWN:
+ return "AXRole: AXUnknown";
+ default:
+ // We want to distinguish ATK_ROLE_UNKNOWN from a known AtkRole which
+ // our DRT isn't properly handling.
+ return "AXRole: FIXME not identified";
+ }
+}
+
AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
: m_element(element)
{
@@ -161,24 +303,24 @@ bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
void AccessibilityUIElement::getChildren(Vector<RefPtr<AccessibilityUIElement> >& children)
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return;
int count = childrenCount();
for (int i = 0; i < count; i++) {
- AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
- children.append(AccessibilityUIElement::create(child));
+ GRefPtr<AtkObject> child = adoptGRef(atk_object_ref_accessible_child(ATK_OBJECT(m_element.get()), i));
+ children.append(AccessibilityUIElement::create(child.get()));
}
}
void AccessibilityUIElement::getChildrenWithRange(Vector<RefPtr<AccessibilityUIElement> >& children, unsigned location, unsigned length)
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return;
unsigned end = location + length;
for (unsigned i = location; i < end; i++) {
- AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
- children.append(AccessibilityUIElement::create(child));
+ GRefPtr<AtkObject> child = adoptGRef(atk_object_ref_accessible_child(ATK_OBJECT(m_element.get()), i));
+ children.append(AccessibilityUIElement::create(child.get()));
}
}
@@ -187,18 +329,21 @@ int AccessibilityUIElement::childrenCount()
if (!m_element)
return 0;
- return atk_object_get_n_accessible_children(ATK_OBJECT(m_element));
+ return atk_object_get_n_accessible_children(ATK_OBJECT(m_element.get()));
}
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::elementAtPoint(int x, int y)
{
- // FIXME: implement
- return 0;
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
+ return 0;
+
+ GRefPtr<AtkObject> objectAtPoint = adoptGRef(atk_component_ref_accessible_at_point(ATK_COMPONENT(m_element.get()), x, y, ATK_XY_WINDOW));
+ return objectAtPoint ? AccessibilityUIElement::create(objectAtPoint.get()) : 0;
}
unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0;
Vector<RefPtr<AccessibilityUIElement> > children;
@@ -273,16 +418,34 @@ PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::selectedRowAtIndex(un
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::titleUIElement()
{
- // FIXME: implement
- return 0;
+ if (!m_element)
+ return 0;
+
+ AtkRelationSet* set = atk_object_ref_relation_set(ATK_OBJECT(m_element.get()));
+ if (!set)
+ return 0;
+
+ AtkObject* target = 0;
+ int count = atk_relation_set_get_n_relations(set);
+ for (int i = 0; i < count; i++) {
+ AtkRelation* relation = atk_relation_set_get_relation(set, i);
+ if (atk_relation_get_relation_type(relation) == ATK_RELATION_LABELLED_BY) {
+ GPtrArray* targetList = atk_relation_get_target(relation);
+ if (targetList->len)
+ target = static_cast<AtkObject*>(g_ptr_array_index(targetList, 0));
+ }
+ }
+
+ g_object_unref(set);
+ return target ? AccessibilityUIElement::create(target) : 0;
}
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::parentElement()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0;
- AtkObject* parent = atk_object_get_parent(ATK_OBJECT(m_element));
+ AtkObject* parent = atk_object_get_parent(ATK_OBJECT(m_element.get()));
return parent ? AccessibilityUIElement::create(parent) : 0;
}
@@ -312,17 +475,24 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributesOfChildren()
JSRetainPtr<JSStringRef> AccessibilityUIElement::allAttributes()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- GOwnPtr<gchar> attributeData(attributeSetToString(atk_object_get_attributes(ATK_OBJECT(m_element))));
+ GOwnPtr<char> attributeData(getAtkAttributeSetAsString(ATK_OBJECT(m_element.get())));
return JSStringCreateWithUTF8CString(attributeData.get());
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
+ if (!m_element)
+ return JSStringCreateWithCharacters(0, 0);
+
+ String atkAttributeName = coreAttributeToAtkAttribute(attribute);
+ if (atkAttributeName.isNull())
+ return JSStringCreateWithCharacters(0, 0);
+
+ String attributeValue = getAttributeSetValueForId(ATK_OBJECT(m_element.get()), atkAttributeName.utf8().data());
+ return JSStringCreateWithUTF8CString(attributeValue.utf8().data());
}
double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
@@ -363,16 +533,14 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::parameterizedAttributeNames()
JSRetainPtr<JSStringRef> AccessibilityUIElement::role()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element.get()));
if (!role)
return JSStringCreateWithCharacters(0, 0);
- const gchar* roleName = atk_role_get_name(role);
- GOwnPtr<gchar> axRole(g_strdup_printf("AXRole: %s", roleName));
-
+ GOwnPtr<gchar> axRole(g_strdup(roleToString(role)));
return JSStringCreateWithUTF8CString(axRole.get());
}
@@ -390,24 +558,21 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::roleDescription()
JSRetainPtr<JSStringRef> AccessibilityUIElement::title()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
- return JSStringCreateWithCharacters(0, 0);
-
- const gchar* name = atk_object_get_name(ATK_OBJECT(m_element));
- if (!name)
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- GOwnPtr<gchar> axTitle(g_strdup_printf("AXTitle: %s", name));
+ const gchar* name = atk_object_get_name(ATK_OBJECT(m_element.get()));
+ GOwnPtr<gchar> axTitle(g_strdup_printf("AXTitle: %s", name ? name : ""));
return JSStringCreateWithUTF8CString(axTitle.get());
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::description()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- const gchar* description = atk_object_get_description(ATK_OBJECT(m_element));
+ const gchar* description = atk_object_get_description(ATK_OBJECT(m_element.get()));
if (!description)
return JSStringCreateWithCharacters(0, 0);
@@ -418,16 +583,27 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::description()
JSRetainPtr<JSStringRef> AccessibilityUIElement::orientation() const
{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
+ return JSStringCreateWithCharacters(0, 0);
+
+ const gchar* axOrientation = 0;
+ if (checkElementState(m_element.get(), ATK_STATE_HORIZONTAL))
+ axOrientation = "AXOrientation: AXHorizontalOrientation";
+ else if (checkElementState(m_element.get(), ATK_STATE_VERTICAL))
+ axOrientation = "AXOrientation: AXVerticalOrientation";
+
+ if (!axOrientation)
+ return JSStringCreateWithCharacters(0, 0);
+
+ return JSStringCreateWithUTF8CString(axOrientation);
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::stringValue()
{
- if (!m_element || !ATK_IS_TEXT(m_element))
+ if (!m_element || !ATK_IS_TEXT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- GOwnPtr<gchar> text(atk_text_get_text(ATK_TEXT(m_element), 0, -1));
+ GOwnPtr<gchar> text(atk_text_get_text(ATK_TEXT(m_element.get()), 0, -1));
GOwnPtr<gchar> textWithReplacedCharacters(replaceCharactersForResults(text.get()));
GOwnPtr<gchar> axValue(g_strdup_printf("AXValue: %s", textWithReplacedCharacters.get()));
@@ -436,8 +612,15 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::stringValue()
JSRetainPtr<JSStringRef> AccessibilityUIElement::language()
{
- // FIXME: implement
- return JSStringCreateWithCharacters(0, 0);
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
+ return JSStringCreateWithCharacters(0, 0);
+
+ const gchar* locale = atk_object_get_object_locale(ATK_OBJECT(m_element.get()));
+ if (!locale)
+ return JSStringCreateWithCharacters(0, 0);
+
+ GOwnPtr<char> axValue(g_strdup_printf("AXLanguage: %s", locale));
+ return JSStringCreateWithUTF8CString(axValue.get());
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
@@ -450,41 +633,41 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::helpText() const
double AccessibilityUIElement::x()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
int x, y;
- atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
+ atk_component_get_position(ATK_COMPONENT(m_element.get()), &x, &y, ATK_XY_SCREEN);
return x;
}
double AccessibilityUIElement::y()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
int x, y;
- atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
+ atk_component_get_position(ATK_COMPONENT(m_element.get()), &x, &y, ATK_XY_SCREEN);
return y;
}
double AccessibilityUIElement::width()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
int width, height;
- atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
+ atk_component_get_size(ATK_COMPONENT(m_element.get()), &width, &height);
return width;
}
double AccessibilityUIElement::height()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
int width, height;
- atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
+ atk_component_get_size(ATK_COMPONENT(m_element.get()), &width, &height);
return height;
}
@@ -502,11 +685,11 @@ double AccessibilityUIElement::clickPointY()
double AccessibilityUIElement::intValue() const
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
GValue value = G_VALUE_INIT;
- atk_value_get_current_value(ATK_VALUE(m_element), &value);
+ atk_value_get_current_value(ATK_VALUE(m_element.get()), &value);
if (!G_VALUE_HOLDS_FLOAT(&value))
return 0.0f;
@@ -515,11 +698,11 @@ double AccessibilityUIElement::intValue() const
double AccessibilityUIElement::minValue()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
GValue value = G_VALUE_INIT;
- atk_value_get_minimum_value(ATK_VALUE(m_element), &value);
+ atk_value_get_minimum_value(ATK_VALUE(m_element.get()), &value);
if (!G_VALUE_HOLDS_FLOAT(&value))
return 0.0f;
@@ -528,11 +711,11 @@ double AccessibilityUIElement::minValue()
double AccessibilityUIElement::maxValue()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return 0.0f;
GValue value = G_VALUE_INIT;
- atk_value_get_maximum_value(ATK_VALUE(m_element), &value);
+ atk_value_get_maximum_value(ATK_VALUE(m_element.get()), &value);
if (!G_VALUE_HOLDS_FLOAT(&value))
return 0.0f;
@@ -551,41 +734,52 @@ int AccessibilityUIElement::insertionPointLineNumber()
return -1;
}
-bool AccessibilityUIElement::isActionSupported(JSStringRef action)
+bool AccessibilityUIElement::isPressActionSupported()
{
// FIXME: implement
return false;
}
-bool AccessibilityUIElement::isEnabled()
+bool AccessibilityUIElement::isIncrementActionSupported()
{
- return checkElementState(m_element, ATK_STATE_ENABLED);
+ // FIXME: implement
+ return false;
}
-bool AccessibilityUIElement::isRequired() const
+bool AccessibilityUIElement::isDecrementActionSupported()
{
// FIXME: implement
return false;
}
+bool AccessibilityUIElement::isEnabled()
+{
+ return checkElementState(m_element.get(), ATK_STATE_ENABLED);
+}
+
+bool AccessibilityUIElement::isRequired() const
+{
+ return checkElementState(m_element.get(), ATK_STATE_REQUIRED);
+}
+
bool AccessibilityUIElement::isFocused() const
{
- return checkElementState(m_element, ATK_STATE_FOCUSED);
+ return checkElementState(m_element.get(), ATK_STATE_FOCUSED);
}
bool AccessibilityUIElement::isSelected() const
{
- return checkElementState(m_element, ATK_STATE_SELECTED);
+ return checkElementState(m_element.get(), ATK_STATE_SELECTED);
}
bool AccessibilityUIElement::isExpanded() const
{
- return checkElementState(m_element, ATK_STATE_EXPANDED);
+ return checkElementState(m_element.get(), ATK_STATE_EXPANDED);
}
bool AccessibilityUIElement::isChecked() const
{
- return checkElementState(m_element, ATK_STATE_CHECKED);
+ return checkElementState(m_element.get(), ATK_STATE_CHECKED);
}
int AccessibilityUIElement::hierarchicalLevel() const
@@ -655,7 +849,7 @@ bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location
return false;
}
-PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText)
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly)
{
// FIXME: implement
return 0;
@@ -699,18 +893,18 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributesOfHeader()
int AccessibilityUIElement::rowCount()
{
- if (!m_element || !ATK_IS_TABLE(m_element))
+ if (!m_element || !ATK_IS_TABLE(m_element.get()))
return 0;
- return atk_table_get_n_rows(ATK_TABLE(m_element));
+ return atk_table_get_n_rows(ATK_TABLE(m_element.get()));
}
int AccessibilityUIElement::columnCount()
{
- if (!m_element || !ATK_IS_TABLE(m_element))
+ if (!m_element || !ATK_IS_TABLE(m_element.get()))
return 0;
- return atk_table_get_n_columns(ATK_TABLE(m_element));
+ return atk_table_get_n_columns(ATK_TABLE(m_element.get()));
}
int AccessibilityUIElement::indexInTable()
@@ -722,22 +916,24 @@ int AccessibilityUIElement::indexInTable()
JSRetainPtr<JSStringRef> AccessibilityUIElement::rowIndexRange()
{
// Range in table for rows.
- return indexRangeInTable(m_element, true);
+ return indexRangeInTable(m_element.get(), true);
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::columnIndexRange()
{
// Range in table for columns.
- return indexRangeInTable(m_element, false);
+ return indexRangeInTable(m_element.get(), false);
}
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::cellForColumnAndRow(unsigned col, unsigned row)
{
- if (!m_element || !ATK_IS_TABLE(m_element))
+ if (!m_element || !ATK_IS_TABLE(m_element.get()))
return 0;
- AtkObject* foundCell = atk_table_ref_at(ATK_TABLE(m_element), row, col);
- return foundCell ? AccessibilityUIElement::create(foundCell) : 0;
+ // Adopt the AtkObject representing the cell because
+ // at_table_ref_at() transfers full ownership.
+ GRefPtr<AtkObject> foundCell = adoptGRef(atk_table_ref_at(ATK_TABLE(m_element.get()), row, col));
+ return foundCell ? AccessibilityUIElement::create(foundCell.get()) : 0;
}
PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::horizontalScrollbar() const
@@ -765,12 +961,12 @@ void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned le
void AccessibilityUIElement::increment()
{
- alterCurrentValue(m_element, 1);
+ alterCurrentValue(m_element.get(), 1);
}
void AccessibilityUIElement::decrement()
{
- alterCurrentValue(m_element, -1);
+ alterCurrentValue(m_element.get(), -1);
}
void AccessibilityUIElement::showMenu()
@@ -780,14 +976,14 @@ void AccessibilityUIElement::showMenu()
void AccessibilityUIElement::press()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return;
- if (!ATK_IS_ACTION(m_element))
+ if (!ATK_IS_ACTION(m_element.get()))
return;
// Only one action per object is supported so far.
- atk_action_do_action(ATK_ACTION(m_element), 0);
+ atk_action_do_action(ATK_ACTION(m_element.get()), 0);
}
void AccessibilityUIElement::setSelectedChild(AccessibilityUIElement* element) const
@@ -803,26 +999,26 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::accessibilityValue() const
JSRetainPtr<JSStringRef> AccessibilityUIElement::documentEncoding()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element.get()));
if (role != ATK_ROLE_DOCUMENT_FRAME)
return JSStringCreateWithCharacters(0, 0);
- return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "Encoding"));
+ return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element.get()), "Encoding"));
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::documentURI()
{
- if (!m_element || !ATK_IS_OBJECT(m_element))
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
return JSStringCreateWithCharacters(0, 0);
- AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
+ AtkRole role = atk_object_get_role(ATK_OBJECT(m_element.get()));
if (role != ATK_ROLE_DOCUMENT_FRAME)
return JSStringCreateWithCharacters(0, 0);
- return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
+ return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element.get()), "URI"));
}
JSRetainPtr<JSStringRef> AccessibilityUIElement::url()
@@ -845,22 +1041,22 @@ bool AccessibilityUIElement::removeNotificationListener()
bool AccessibilityUIElement::isFocusable() const
{
- return checkElementState(m_element, ATK_STATE_FOCUSABLE);
+ return checkElementState(m_element.get(), ATK_STATE_FOCUSABLE);
}
bool AccessibilityUIElement::isSelectable() const
{
- return checkElementState(m_element, ATK_STATE_SELECTABLE);
+ return checkElementState(m_element.get(), ATK_STATE_SELECTABLE);
}
bool AccessibilityUIElement::isMultiSelectable() const
{
- return checkElementState(m_element, ATK_STATE_MULTISELECTABLE);
+ return checkElementState(m_element.get(), ATK_STATE_MULTISELECTABLE);
}
bool AccessibilityUIElement::isVisible() const
{
- return checkElementState(m_element, ATK_STATE_VISIBLE);
+ return checkElementState(m_element.get(), ATK_STATE_VISIBLE);
}
bool AccessibilityUIElement::isOffScreen() const
@@ -883,8 +1079,10 @@ bool AccessibilityUIElement::isIgnored() const
bool AccessibilityUIElement::hasPopup() const
{
- // FIXME: implement
- return false;
+ if (!m_element || !ATK_IS_OBJECT(m_element.get()))
+ return false;
+
+ return equalIgnoringCase(getAttributeSetValueForId(ATK_OBJECT(m_element.get()), "aria-haspopup"), "true");
}
void AccessibilityUIElement::takeFocus()
@@ -992,5 +1190,35 @@ PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForIndex(i
return 0;
}
+void AccessibilityUIElement::scrollToMakeVisible()
+{
+ // FIXME: implement
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::supportedActions() const
+{
+ // FIXME: implement
+ return 0;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::pathDescription() const
+{
+ notImplemented();
+ return 0;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPostscriptsDescription() const
+{
+ notImplemented();
+ return 0;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPrescriptsDescription() const
+{
+ notImplemented();
+ return 0;
+}
} // namespace WTR
+
+#endif
diff --git a/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp
index c843591fa..6e5103522 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/ActivateFontsGtk.cpp
@@ -31,6 +31,7 @@
#include "config.h"
#include "ActivateFonts.h"
+#include "InjectedBundleUtilities.h"
#include <fontconfig/fontconfig.h>
#include <gtk/gtk.h>
#include <wtf/gobject/GlibUtilities.h>
@@ -49,30 +50,17 @@ void initializeGtkSettings()
"gtk-xft-hinting", 0,
"gtk-font-name", "Liberation Sans 12",
"gtk-theme-name", "Raleigh",
+ "gtk-icon-theme-name", "gnome",
"gtk-xft-rgba", "none", NULL);
}
-static CString getTopLevelPath()
-{
- if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL"))
- return topLevelDirectory;
-
- // If the environment variable wasn't provided then assume we were built into
- // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build
- // directory is non-standard, but we can't do much more about this.
- GOwnPtr<char> parentPath(g_path_get_dirname(getCurrentExecutablePath().data()));
- GOwnPtr<char> layoutTestsPath(g_build_filename(parentPath.get(), "..", "..", "..", NULL));
- GOwnPtr<char> absoluteTopLevelPath(realpath(layoutTestsPath.get(), 0));
- return absoluteTopLevelPath.get();
-}
-
CString getOutputDir()
{
- const char* webkitOutputDir = g_getenv("WEBKITOUTPUTDIR");
+ const char* webkitOutputDir = g_getenv("WEBKIT_OUTPUTDIR");
if (webkitOutputDir)
return webkitOutputDir;
- CString topLevelPath = getTopLevelPath();
+ CString topLevelPath = WTR::topLevelPath();
GOwnPtr<char> outputDir(g_build_filename(topLevelPath.data(), "WebKitBuild", NULL));
return outputDir.get();
}
@@ -116,8 +104,7 @@ void inititializeFontConfigSetting()
if (fontsPath.isNull())
g_error("Could not locate test fonts at %s. Is WEBKIT_TOP_LEVEL set?", fontsPath.data());
- GOwnPtr<GError> error;
- GOwnPtr<GDir> fontsDirectory(g_dir_open(fontsPath.data(), 0, &error.outPtr()));
+ GOwnPtr<GDir> fontsDirectory(g_dir_open(fontsPath.data(), 0, 0));
while (const char* directoryEntry = g_dir_read_name(fontsDirectory.get())) {
if (!g_str_has_suffix(directoryEntry, ".ttf") && !g_str_has_suffix(directoryEntry, ".otf"))
continue;
diff --git a/Tools/DumpRenderTree/wx/WorkQueueItemWx.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp
index e6ecb752b..1f539ba1b 100644
--- a/Tools/DumpRenderTree/wx/WorkQueueItemWx.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
+ * Copyright (C) 2013 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,31 +27,26 @@
*/
#include "config.h"
-#include "WorkQueueItem.h"
+#include "InjectedBundleUtilities.h"
-#include "DumpRenderTree.h"
+#include <gtk/gtk.h>
+#include <wtf/gobject/GOwnPtr.h>
+#include <wtf/gobject/GlibUtilities.h>
-bool LoadItem::invoke() const
-{
- return false;
-}
+namespace WTR {
-bool LoadHTMLStringItem::invoke() const
+CString topLevelPath()
{
- return false;
-}
+ if (const char* topLevelDirectory = g_getenv("WEBKIT_TOP_LEVEL"))
+ return topLevelDirectory;
-bool ReloadItem::invoke() const
-{
- return false;
+ // If the environment variable wasn't provided then assume we were built into
+ // WebKitBuild/Debug or WebKitBuild/Release. Obviously this will fail if the build
+ // directory is non-standard, but we can't do much more about this.
+ GOwnPtr<char> parentPath(g_path_get_dirname(getCurrentExecutablePath().data()));
+ GOwnPtr<char> layoutTestsPath(g_build_filename(parentPath.get(), "..", "..", "..", NULL));
+ GOwnPtr<char> absoluteTopLevelPath(realpath(layoutTestsPath.get(), 0));
+ return absoluteTopLevelPath.get();
}
-bool ScriptItem::invoke() const
-{
- return false;
-}
-
-bool BackForwardItem::invoke() const
-{
- return false;
-}
+} // namespace WTR
diff --git a/Tools/DumpRenderTree/wx/DumpRenderTreeWx.h b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h
index 99092b845..50f89dead 100644
--- a/Tools/DumpRenderTree/wx/DumpRenderTreeWx.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/InjectedBundleUtilities.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
+ * Copyright (C) 2013 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,9 +26,15 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef DumpRenderTreeWx_h
-#define DumpRenderTreeWx_h
+#ifndef InjectedBundleUtilities_h
+#define InjectedBundleUtilities_h
-extern void notifyDoneFired();
+#include <wtf/text/CString.h>
-#endif // DumpRenderTreeWx_h
+namespace WTR {
+
+CString topLevelPath();
+
+} // namespace WTR
+
+#endif // InjectedBundleUtilities_h
diff --git a/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp
index 301038294..b50a332c7 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp
@@ -28,7 +28,9 @@
#include "TestRunner.h"
#include "InjectedBundle.h"
+#include "InjectedBundleUtilities.h"
#include <glib.h>
+#include <wtf/gobject/GOwnPtr.h>
namespace WTR {
@@ -62,7 +64,17 @@ void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded()
JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
{
- return url;
+ size_t urlSize = JSStringGetMaximumUTF8CStringSize(url);
+ GOwnPtr<gchar> urlString(static_cast<gchar*>(g_malloc(urlSize)));
+ JSStringGetUTF8CString(url, urlString.get(), urlSize);
+
+ if (!g_str_has_prefix(urlString.get(), "file:///tmp/LayoutTests/"))
+ return JSStringRetain(url);
+
+ const gchar* layoutTestsSuffix = urlString.get() + strlen("file:///tmp/");
+ GOwnPtr<gchar> testPath(g_build_filename(WTR::topLevelPath().data(), layoutTestsSuffix, NULL));
+ GOwnPtr<gchar> testURI(g_filename_to_uri(testPath.get(), 0, 0));
+ return JSStringCreateWithUTF8CString(testURI.get());
}
JSRetainPtr<JSStringRef> TestRunner::platformName()
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm
index 9e54908b9..fefddc731 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm
@@ -49,8 +49,6 @@ bool AccessibilityController::addNotificationListener(JSValueRef functionCallbac
if (!functionCallback)
return false;
- // Mac programmers should not be adding more than one global notification listener.
- // Other platforms may be different.
if (m_globalNotificationHandler)
return false;
m_globalNotificationHandler = [[AccessibilityNotificationHandler alloc] init];
@@ -62,13 +60,24 @@ bool AccessibilityController::addNotificationListener(JSValueRef functionCallbac
bool AccessibilityController::removeNotificationListener()
{
- // Mac programmers should not be trying to remove a listener that's already removed.
ASSERT(m_globalNotificationHandler);
+
+ [m_globalNotificationHandler.get() stopObserving];
m_globalNotificationHandler.clear();
return true;
}
+void AccessibilityController::logAccessibilityEvents()
+{
+}
+
+void AccessibilityController::resetToConsistentState()
+{
+ if (m_globalNotificationHandler)
+ removeNotificationListener();
+}
+
static id findAccessibleObjectById(id obj, NSString *idAttribute)
{
BEGIN_AX_OBJC_EXCEPTIONS
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h
index 6725d19d7..2c1608875 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.h
@@ -42,6 +42,7 @@
- (void)setPlatformElement:(id)platformElement;
- (void)setCallback:(JSValueRef)callback;
- (void)startObserving;
+- (void)stopObserving;
@end
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm
index 1d85bcab5..a3a0233f9 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm
@@ -75,7 +75,7 @@
- (void)dealloc
{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
+ [self stopObserving];
WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(WTR::InjectedBundle::shared().page()->page());
JSContextRef context = WKBundleFrameGetJavaScriptContext(mainFrame);
@@ -112,6 +112,11 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_notificationReceived:) name:@"AXDRTNotification" object:nil];
}
+- (void)stopObserving
+{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
- (void)_notificationReceived:(NSNotification *)notification
{
NSString *notificationName = [[notification userInfo] objectForKey:@"notificationName"];
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
index 24eef0837..ffc82fc74 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm
@@ -35,6 +35,7 @@
#import <JavaScriptCore/JSRetainPtr.h>
#import <JavaScriptCore/JSStringRef.h>
#import <JavaScriptCore/JSStringRefCF.h>
+#import <JavaScriptCore/JSObjectRef.h>
#import <WebKit2/WKBundleFrame.h>
#import <wtf/RetainPtr.h>
#import <wtf/Vector.h>
@@ -52,6 +53,10 @@
#define NSAccessibilityDropEffectsAttribute @"AXDropEffects"
#endif
+#ifndef NSAccessibilityPathAttribute
+#define NSAccessibilityPathAttribute @"AXPath"
+#endif
+
typedef void (*AXPostedNotificationCallback)(id element, NSString* notification, void* context);
@interface NSObject (WebKitAccessibilityAdditions)
@@ -87,6 +92,8 @@ AccessibilityUIElement::~AccessibilityUIElement()
bool AccessibilityUIElement::isEqual(AccessibilityUIElement* otherElement)
{
+ if (!otherElement)
+ return false;
return platformUIElement() == otherElement->platformUIElement();
}
@@ -166,7 +173,7 @@ static JSStringRef concatenateAttributeAndValue(NSString* attribute, NSString* v
Vector<UniChar> valueBuffer([value length]);
[value getCharacters:valueBuffer.data()];
- buffer.append(valueBuffer);
+ buffer.appendVector(valueBuffer);
return JSStringCreateWithCharacters(buffer.data(), buffer.size());
}
@@ -679,11 +686,31 @@ int AccessibilityUIElement::insertionPointLineNumber()
return -1;
}
-bool AccessibilityUIElement::isActionSupported(JSStringRef action)
+bool AccessibilityUIElement::isPressActionSupported()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray* actions = [m_element accessibilityActionNames];
+ return [actions containsObject:NSAccessibilityPressAction];
+ END_AX_OBJC_EXCEPTIONS
+
+ return false;
+}
+
+bool AccessibilityUIElement::isIncrementActionSupported()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray* actions = [m_element accessibilityActionNames];
+ return [actions containsObject:NSAccessibilityIncrementAction];
+ END_AX_OBJC_EXCEPTIONS
+
+ return false;
+}
+
+bool AccessibilityUIElement::isDecrementActionSupported()
{
BEGIN_AX_OBJC_EXCEPTIONS
NSArray* actions = [m_element accessibilityActionNames];
- return [actions containsObject:[NSString stringWithJSStringRef:action]];
+ return [actions containsObject:NSAccessibilityDecrementAction];
END_AX_OBJC_EXCEPTIONS
return false;
@@ -888,23 +915,66 @@ bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location
return false;
NSDictionary* attrs = [string attributesAtIndex:0 effectiveRange:nil];
- if([[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue])
- return true;
+ BOOL misspelled = [[attrs objectForKey:NSAccessibilityMisspelledTextAttribute] boolValue];
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+ if (misspelled)
+ misspelled = [[attrs objectForKey:NSAccessibilityMarkedMisspelledTextAttribute] boolValue];
+#endif
+ return misspelled;
END_AX_OBJC_EXCEPTIONS
return false;
}
-PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText)
+PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::uiElementForSearchPredicate(JSContextRef context, AccessibilityUIElement* startElement, bool isDirectionNext, JSValueRef searchKey, JSStringRef searchText, bool visibleOnly)
{
BEGIN_AX_OBJC_EXCEPTIONS
NSMutableDictionary* parameter = [NSMutableDictionary dictionary];
[parameter setObject:(isDirectionNext) ? @"AXDirectionNext" : @"AXDirectionPrevious" forKey:@"AXDirection"];
+ if (visibleOnly)
+ [parameter setObject:[NSNumber numberWithBool:YES] forKey:@"AXVisibleOnly"];
[parameter setObject:[NSNumber numberWithInt:1] forKey:@"AXResultsLimit"];
if (startElement && startElement->platformUIElement())
[parameter setObject:(id)startElement->platformUIElement() forKey:@"AXStartElement"];
- if (searchKey)
- [parameter setObject:[NSString stringWithJSStringRef:searchKey] forKey:@"AXSearchKey"];
+ if (searchKey) {
+ if (JSValueIsString(context, searchKey)) {
+ NSString *searchKeyParameter = nil;
+ JSStringRef singleSearchKey = JSValueToStringCopy(context, searchKey, 0);
+ if (singleSearchKey) {
+ searchKeyParameter = [NSString stringWithJSStringRef:singleSearchKey];
+ JSStringRelease(singleSearchKey);
+ if (searchKeyParameter)
+ [parameter setObject:searchKeyParameter forKey:@"AXSearchKey"];
+ }
+ }
+ else if (JSValueIsObject(context, searchKey)) {
+ NSMutableArray *searchKeyParameter = nil;
+ JSObjectRef array = const_cast<JSObjectRef>(searchKey);
+ unsigned arrayLength = 0;
+ JSRetainPtr<JSStringRef> arrayLengthString(Adopt, JSStringCreateWithUTF8CString("length"));
+ JSValueRef arrayLengthValue = JSObjectGetProperty(context, array, arrayLengthString.get(), 0);
+ if (arrayLengthValue && JSValueIsNumber(context, arrayLengthValue))
+ arrayLength = static_cast<unsigned>(JSValueToNumber(context, arrayLengthValue, 0));
+
+ for (unsigned i = 0; i < arrayLength; ++i) {
+ JSValueRef exception = 0;
+ JSValueRef value = JSObjectGetPropertyAtIndex(context, array, i, &exception);
+ if (exception)
+ break;
+ JSStringRef singleSearchKey = JSValueToStringCopy(context, value, &exception);
+ if (exception)
+ break;
+ if (singleSearchKey) {
+ if (!searchKeyParameter)
+ searchKeyParameter = [NSMutableArray array];
+ [searchKeyParameter addObject:[NSString stringWithJSStringRef:singleSearchKey]];
+ JSStringRelease(singleSearchKey);
+ }
+ }
+ if (searchKeyParameter)
+ [parameter setObject:searchKeyParameter forKey:@"AXSearchKey"];
+ }
+ }
if (searchText && JSStringGetLength(searchText))
[parameter setObject:[NSString stringWithJSStringRef:searchText] forKey:@"AXSearchText"];
@@ -1076,6 +1146,13 @@ PassRefPtr<AccessibilityUIElement> AccessibilityUIElement::verticalScrollbar() c
return 0;
}
+void AccessibilityUIElement::scrollToMakeVisible()
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ [m_element accessibilityPerformAction:@"AXScrollToVisible"];
+ END_AX_OBJC_EXCEPTIONS
+}
+
JSRetainPtr<JSStringRef> AccessibilityUIElement::selectedTextRange()
{
NSRange range = NSMakeRange(NSNotFound, 0);
@@ -1416,6 +1493,80 @@ PassRefPtr<AccessibilityTextMarker> AccessibilityUIElement::textMarkerForIndex(i
return 0;
}
+static NSString *_convertMathMultiscriptPairsToString(NSArray *pairs)
+{
+ __block NSMutableString *result = [NSMutableString string];
+ [pairs enumerateObjectsUsingBlock:^(id pair, NSUInteger index, BOOL *stop) {
+ for (NSString *key in pair)
+ [result appendFormat:@"\t%lu. %@ = %@\n", (unsigned long)index, key, [[pair objectForKey:key] accessibilityAttributeValue:NSAccessibilitySubroleAttribute]];
+ }];
+
+ return result;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPostscriptsDescription() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *pairs = [m_element accessibilityAttributeValue:@"AXMathPostscripts"];
+ return [_convertMathMultiscriptPairsToString(pairs) createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::mathPrescriptsDescription() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *pairs = [m_element accessibilityAttributeValue:@"AXMathPrescripts"];
+ return [_convertMathMultiscriptPairsToString(pairs) createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::pathDescription() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSMutableString *result = [NSMutableString stringWithString:@"\nStart Path\n"];
+ NSBezierPath *bezierPath = [m_element accessibilityAttributeValue:NSAccessibilityPathAttribute];
+
+ NSUInteger elementCount = [bezierPath elementCount];
+ NSPoint points[3];
+ for (NSUInteger i = 0; i < elementCount; i++) {
+ switch ([bezierPath elementAtIndex:i associatedPoints:points]) {
+ case NSMoveToBezierPathElement:
+ [result appendString:@"\tMove to point\n"];
+ break;
+
+ case NSLineToBezierPathElement:
+ [result appendString:@"\tLine to\n"];
+ break;
+
+ case NSCurveToBezierPathElement:
+ [result appendString:@"\tCurve to\n"];
+ break;
+
+ case NSClosePathBezierPathElement:
+ [result appendString:@"\tClose\n"];
+ break;
+ }
+ }
+
+ return [result createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
+
+JSRetainPtr<JSStringRef> AccessibilityUIElement::supportedActions() const
+{
+ BEGIN_AX_OBJC_EXCEPTIONS
+ NSArray *names = [m_element accessibilityActionNames];
+ return [[names componentsJoinedByString:@","] createJSStringRef];
+ END_AX_OBJC_EXCEPTIONS
+
+ return 0;
+}
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
index c2768db34..fe1ef1ef1 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm
@@ -42,7 +42,7 @@ namespace WTR {
static NSSet *allowedFontFamilySet()
{
- static NSSet *fontFamiliySet = [[NSSet setWithObjects:
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
@"Ahem",
@"Al Bayan",
@"American Typewriter",
@@ -137,6 +137,8 @@ static NSSet *allowedFontFamilySet()
@"Sathu",
@"Silom",
@"Skia",
+ @"Songti SC",
+ @"Songti TC",
@"STFangsong",
@"STHeiti",
@"STIXGeneral",
@@ -159,7 +161,16 @@ static NSSet *allowedFontFamilySet()
@"Zapfino",
nil] retain];
- return fontFamiliySet;
+ return fontFamilySet;
+}
+
+static NSSet *systemHiddenFontFamilySet()
+{
+ static NSSet *fontFamilySet = [[NSSet setWithObjects:
+ @".LucidaGrandeUI",
+ nil] retain];
+
+ return fontFamilySet;
}
static IMP appKitAvailableFontFamiliesIMP;
@@ -195,7 +206,11 @@ static NSArray *wtr_NSFontManager_availableFonts(id self, SEL _cmd)
[availableFontList addObject:[fontInfo objectAtIndex:0]];
}
}
-
+
+ for (NSString *hiddenFontFamily in systemHiddenFontFamilySet()) {
+ [availableFontList addObject:hiddenFontFamily];
+ }
+
availableFonts = availableFontList;
return availableFonts;
}
@@ -223,8 +238,6 @@ static void swizzleNSFontManagerMethods()
void activateFonts()
{
- // Work around <rdar://problem/6698023> by activating fonts from disk
-
static const char* fontFileNames[] = {
"AHEM____.TTF",
"WebKitWeightWatcher100.ttf",
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm
index 996acbb09..282cce635 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm
@@ -31,6 +31,9 @@
+(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
@end
+@interface NSSound (Details)
++ (void)_setAlertType:(NSUInteger)alertType;
+@end
namespace WTR {
@@ -39,7 +42,7 @@ void InjectedBundle::platformInitialize(WKTypeRef)
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInteger:4], @"AppleAntiAliasingThreshold",
[NSNumber numberWithInteger:0], @"AppleFontSmoothing",
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 && !PLATFORM(CHROMIUM)
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
[NSNumber numberWithBool:NO], @"NSScrollAnimationEnabled",
#else
[NSNumber numberWithBool:NO], @"AppleScrollAnimationEnabled",
@@ -47,12 +50,17 @@ void InjectedBundle::platformInitialize(WKTypeRef)
[NSNumber numberWithBool:NO], @"NSOverlayScrollersEnabled",
@"Always", @"AppleShowScrollBars",
[NSArray arrayWithObject:@"en"], @"AppleLanguages",
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+ [NSDictionary dictionaryWithObjectsAndKeys:@"notational", @"notationl", nil], @"NSTestCorrectionDictionary",
+#endif
nil];
[[NSUserDefaults standardUserDefaults] setVolatileDomain:dict forName:NSArgumentDomain];
[NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"localhost"];
[NSURLRequest setAllowsAnyHTTPSCertificate:YES forHost:@"127.0.0.1"];
+
+ [NSSound _setAlertType:0];
}
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm
index b0cb4e031..418d5139e 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm
@@ -41,12 +41,12 @@ using namespace WTF;
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
static String testPathFromURL(WKURLRef url)
{
- RetainPtr<CFURLRef> cfURL(AdoptCF, WKURLCopyCFURL(kCFAllocatorDefault, url));
+ RetainPtr<CFURLRef> cfURL = adoptCF(WKURLCopyCFURL(kCFAllocatorDefault, url));
if (!cfURL)
return String();
- RetainPtr<CFStringRef> schemeCFString(AdoptCF, CFURLCopyScheme(cfURL.get()));
- RetainPtr<CFStringRef> pathCFString(AdoptCF, CFURLCopyPath(cfURL.get()));
+ RetainPtr<CFStringRef> schemeCFString = adoptCF(CFURLCopyScheme(cfURL.get()));
+ RetainPtr<CFStringRef> pathCFString = adoptCF(CFURLCopyPath(cfURL.get()));
String schemeString(schemeCFString.get());
String pathString(pathCFString.get());
@@ -63,7 +63,7 @@ static String testPathFromURL(WKURLRef url)
if (!equalIgnoringCase(schemeString, "http") && !equalIgnoringCase(schemeString, "https"))
return String();
- RetainPtr<CFStringRef> hostCFString(AdoptCF, CFURLCopyHostName(cfURL.get()));
+ RetainPtr<CFStringRef> hostCFString = adoptCF(CFURLCopyHostName(cfURL.get()));
String hostString(hostCFString.get());
if (hostString == "127.0.0.1" && (CFURLGetPortNumber(cfURL.get()) == 8000 || CFURLGetPortNumber(cfURL.get()) == 8443))
return pathString;
diff --git a/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm b/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm
index dca27e6a0..c9bf3caf9 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm
+++ b/Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm
@@ -52,7 +52,7 @@ void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded()
if (m_waitToDumpWatchdogTimer)
return;
- m_waitToDumpWatchdogTimer.adoptCF(CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + waitToDumpWatchdogTimerInterval, 0, 0, 0, WTR::waitUntilDoneWatchdogTimerFired, NULL));
+ m_waitToDumpWatchdogTimer = adoptCF(CFRunLoopTimerCreate(kCFAllocatorDefault, CFAbsoluteTimeGetCurrent() + waitToDumpWatchdogTimerInterval, 0, 0, 0, WTR::waitUntilDoneWatchdogTimerFired, NULL));
CFRunLoopAddTimer(CFRunLoopGetCurrent(), m_waitToDumpWatchdogTimer.get(), kCFRunLoopCommonModes);
}
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp
index d14dd87b5..2b77189fc 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/InjectedBundleQt.cpp
@@ -32,7 +32,6 @@
#include <QStyleFactory>
#include <stdio.h>
#include <stdlib.h>
-#include <wtf/AlwaysInline.h>
#include <wtf/Assertions.h>
namespace WTR {
diff --git a/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp b/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp
index 1671ac73b..95ed46d00 100644
--- a/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp
+++ b/Tools/WebKitTestRunner/InjectedBundle/qt/TestRunnerQt.cpp
@@ -74,13 +74,18 @@ void TestRunner::invalidateWaitToDumpWatchdogTimer()
void TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded()
{
+ int timerInterval;
if (qgetenv("QT_WEBKIT2_DEBUG") == "1")
return;
if (m_waitToDumpWatchdogTimer.isActive())
return;
+ if (m_timeout > 0)
+ timerInterval = m_timeout;
+ else
+ timerInterval = waitToDumpWatchdogTimerInterval * 1000;
- m_waitToDumpWatchdogTimer.start(waitToDumpWatchdogTimerInterval * 1000);
+ m_waitToDumpWatchdogTimer.start(timerInterval);
}
JSRetainPtr<JSStringRef> TestRunner::pathToLocalResource(JSStringRef url)
diff --git a/Tools/WebKitTestRunner/PlatformEfl.cmake b/Tools/WebKitTestRunner/PlatformEfl.cmake
index 39c68a975..50aefca07 100644
--- a/Tools/WebKitTestRunner/PlatformEfl.cmake
+++ b/Tools/WebKitTestRunner/PlatformEfl.cmake
@@ -1,14 +1,14 @@
-ADD_CUSTOM_TARGET(forwarding-headersEflForWebKitTestRunner
+add_custom_target(forwarding-headersEflForWebKitTestRunner
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include efl
)
-SET(ForwardingHeadersForWebKitTestRunner_NAME forwarding-headersEflForWebKitTestRunner)
+set(ForwardingHeadersForWebKitTestRunner_NAME forwarding-headersEflForWebKitTestRunner)
-ADD_CUSTOM_TARGET(forwarding-headersSoupForWebKitTestRunner
+add_custom_target(forwarding-headersSoupForWebKitTestRunner
COMMAND ${PERL_EXECUTABLE} ${WEBKIT2_DIR}/Scripts/generate-forwarding-headers.pl ${WEBKIT_TESTRUNNER_DIR} ${DERIVED_SOURCES_WEBKIT2_DIR}/include soup
)
-SET(ForwardingNetworkHeadersForWebKitTestRunner_NAME forwarding-headersSoupForWebKitTestRunner)
+set(ForwardingNetworkHeadersForWebKitTestRunner_NAME forwarding-headersSoupForWebKitTestRunner)
-LIST(APPEND WebKitTestRunner_SOURCES
+list(APPEND WebKitTestRunner_SOURCES
${WEBKIT_TESTRUNNER_DIR}/cairo/TestInvocationCairo.cpp
${WEBKIT_TESTRUNNER_DIR}/efl/EventSenderProxyEfl.cpp
@@ -17,47 +17,46 @@ LIST(APPEND WebKitTestRunner_SOURCES
${WEBKIT_TESTRUNNER_DIR}/efl/main.cpp
)
-LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
${TOOLS_DIR}/DumpRenderTree/efl/
${WEBKIT2_DIR}/UIProcess/API/efl
"${WTF_DIR}/wtf/gobject"
- ${ATK_INCLUDE_DIRS}
${CAIRO_INCLUDE_DIRS}
- ${ECORE_INCLUDE_DIRS}
${ECORE_EVAS_INCLUDE_DIRS}
+ ${ECORE_FILE_INCLUDE_DIRS}
+ ${ECORE_INCLUDE_DIRS}
${EINA_INCLUDE_DIRS}
+ ${EO_INCLUDE_DIRS}
${EVAS_INCLUDE_DIRS}
${GLIB_INCLUDE_DIRS}
)
-LIST(APPEND WebKitTestRunner_LIBRARIES
- ${ATK_LIBRARIES}
+list(APPEND WebKitTestRunner_LIBRARIES
${CAIRO_LIBRARIES}
${ECORE_LIBRARIES}
${ECORE_EVAS_LIBRARIES}
${EINA_LIBRARIES}
+ ${EO_LIBRARIES}
${EVAS_LIBRARIES}
${GLIB_LIBRARIES}
${OPENGL_LIBRARIES}
- ${WTF_LIBRARY_NAME}
+ WTF
)
-IF (ENABLE_ECORE_X)
- LIST(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+if (ENABLE_ECORE_X)
+ list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
${ECORE_X_INCLUDE_DIRS}
)
- LIST(APPEND WebKitTestRunner_LIBRARIES
+ list(APPEND WebKitTestRunner_LIBRARIES
${ECORE_X_LIBRARIES}
${X11_Xext_LIB}
)
-ENDIF ()
+endif ()
-LIST(APPEND WebKitTestRunnerInjectedBundle_SOURCES
+list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
${TOOLS_DIR}/DumpRenderTree/efl/FontManagement.cpp
- ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityControllerAtk.cpp
- ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityUIElementAtk.cpp
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/efl/ActivateFontsEfl.cpp
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/efl/InjectedBundleEfl.cpp
${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/efl/TestRunnerEfl.cpp
@@ -65,6 +64,18 @@ LIST(APPEND WebKitTestRunnerInjectedBundle_SOURCES
# FIXME: DOWNLOADED_FONTS_DIR should not hardcode the directory
# structure. See <https://bugs.webkit.org/show_bug.cgi?id=81475>.
-ADD_DEFINITIONS(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
- -DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3"
- -DTHEME_DIR="${THEME_BINARY_DIR}")
+add_definitions(-DFONTS_CONF_DIR="${TOOLS_DIR}/DumpRenderTree/gtk/fonts"
+ -DDOWNLOADED_FONTS_DIR="${CMAKE_SOURCE_DIR}/WebKitBuild/Dependencies/Source/webkitgtk-test-fonts-0.0.3")
+
+if (ENABLE_ACCESSIBILITY)
+ list(APPEND WebKitTestRunnerInjectedBundle_SOURCES
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityControllerAtk.cpp
+ ${WEBKIT_TESTRUNNER_INJECTEDBUNDLE_DIR}/atk/AccessibilityUIElementAtk.cpp
+ )
+ list(APPEND WebKitTestRunner_INCLUDE_DIRECTORIES
+ ${ATK_INCLUDE_DIRS}
+ )
+ list(APPEND WebKitTestRunner_LIBRARIES
+ ${ATK_LIBRARIES}
+ )
+endif ()
diff --git a/Tools/WebKitTestRunner/PlatformWebView.h b/Tools/WebKitTestRunner/PlatformWebView.h
index bbdc6b757..98d882710 100644
--- a/Tools/WebKitTestRunner/PlatformWebView.h
+++ b/Tools/WebKitTestRunner/PlatformWebView.h
@@ -54,8 +54,12 @@ typedef struct _GtkWidget GtkWidget;
typedef WKViewRef PlatformWKView;
typedef GtkWidget* PlatformWindow;
#elif PLATFORM(EFL)
-typedef struct _Evas_Object Evas_Object;
typedef struct _Ecore_Evas Ecore_Evas;
+#if USE(EO)
+typedef struct _Eo Evas_Object;
+#else
+typedef struct _Evas_Object Evas_Object;
+#endif
typedef Evas_Object* PlatformWKView;
typedef Ecore_Evas* PlatformWindow;
#endif
@@ -64,7 +68,7 @@ namespace WTR {
class PlatformWebView {
public:
- PlatformWebView(WKContextRef, WKPageGroupRef, WKDictionaryRef options = 0);
+ PlatformWebView(WKContextRef, WKPageGroupRef, WKPageRef relatedPage, WKDictionaryRef options = 0);
~PlatformWebView();
WKPageRef page();
@@ -82,6 +86,8 @@ public:
WKRect windowFrame();
void setWindowFrame(WKRect);
+
+ void didInitializeClients();
void addChromeInputField();
void removeChromeInputField();
@@ -96,11 +102,13 @@ public:
#endif
WKRetainPtr<WKImageRef> windowSnapshotImage();
+ WKDictionaryRef options() const { return m_options.get(); }
private:
PlatformWKView m_view;
PlatformWindow m_window;
bool m_windowIsKey;
+ WKRetainPtr<WKDictionaryRef> m_options;
#if PLATFORM(EFL) || PLATFORM(QT)
bool m_usingFixedLayout;
#endif
diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp
index 006892f4f..63e033033 100644
--- a/Tools/WebKitTestRunner/TestController.cpp
+++ b/Tools/WebKitTestRunner/TestController.cpp
@@ -29,7 +29,11 @@
#include "PlatformWebView.h"
#include "StringFunctions.h"
#include "TestInvocation.h"
+#include <WebKit2/WKAuthenticationChallenge.h>
+#include <WebKit2/WKAuthenticationDecisionListener.h>
#include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKCredential.h>
+#include <WebKit2/WKIconDatabase.h>
#include <WebKit2/WKNotification.h>
#include <WebKit2/WKNotificationManager.h>
#include <WebKit2/WKNotificationPermissionRequest.h>
@@ -44,6 +48,7 @@
#include <stdlib.h>
#include <string>
#include <wtf/PassOwnPtr.h>
+#include <wtf/text/CString.h>
#if PLATFORM(MAC)
#include <WebKit2/WKPagePrivateMac.h>
@@ -59,6 +64,12 @@
namespace WTR {
+const unsigned TestController::viewWidth = 800;
+const unsigned TestController::viewHeight = 600;
+
+const unsigned TestController::w3cSVGViewWidth = 480;
+const unsigned TestController::w3cSVGViewHeight = 360;
+
// defaultLongTimeout + defaultShortTimeout should be less than 80,
// the default timeout value of the test harness so we can detect an
// unresponsive web process.
@@ -93,6 +104,7 @@ TestController::TestController(int argc, const char* argv[])
, m_noTimeout(defaultNoTimeout)
, m_useWaitToDumpWatchdogTimer(true)
, m_forceNoTimeout(false)
+ , m_timeout(0)
, m_didPrintWebProcessCrashedMessage(false)
, m_shouldExitWhenWebProcessCrashes(true)
, m_beforeUnloadReturnValue(true)
@@ -100,6 +112,8 @@ TestController::TestController(int argc, const char* argv[])
, m_isGeolocationPermissionAllowed(false)
, m_policyDelegateEnabled(false)
, m_policyDelegatePermissive(false)
+ , m_handlesAuthenticationChallenges(false)
+ , m_shouldBlockAllPlugins(false)
{
initialize(argc, argv);
controller = this;
@@ -109,6 +123,8 @@ TestController::TestController(int argc, const char* argv[])
TestController::~TestController()
{
+ WKIconDatabaseClose(WKContextGetIconDatabase(m_context.get()));
+
platformDestroy();
}
@@ -170,9 +186,16 @@ static void decidePolicyForGeolocationPermissionRequest(WKPageRef, WKFrameRef, W
TestController::shared().handleGeolocationPermissionRequest(permissionRequest);
}
-WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void*)
+int TestController::getCustomTimeout()
{
- PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage));
+ return m_timeout;
+}
+
+WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKURLRequestRef, WKDictionaryRef, WKEventModifiers, WKEventMouseButton, const void* clientInfo)
+{
+ PlatformWebView* parentView = static_cast<PlatformWebView*>(const_cast<void*>(clientInfo));
+
+ PlatformWebView* view = new PlatformWebView(WKPageGetContext(oldPage), WKPageGetPageGroup(oldPage), oldPage, parentView->options());
WKPageRef newPage = view->page();
view->resizeTo(800, 600);
@@ -222,12 +245,15 @@ WKPageRef TestController::createOtherPage(WKPageRef oldPage, WKURLRequestRef, WK
createOtherPage,
0, // mouseDidMoveOverElement
0, // decidePolicyForNotificationPermissionRequest
- 0, // unavailablePluginButtonClicked
+ 0, // unavailablePluginButtonClicked_deprecatedForUseWithV1
0, // showColorPicker
0, // hideColorPicker
+ 0, // unavailablePluginButtonClicked
};
WKPageSetPageUIClient(newPage, &otherPageUIClient);
+ view->didInitializeClients();
+
WKRetain(newPage);
return newPage;
}
@@ -325,12 +351,13 @@ void TestController::initialize(int argc, const char* argv[])
m_context.adopt(WKContextCreateWithInjectedBundlePath(injectedBundlePath()));
m_geolocationProvider = adoptPtr(new GeolocationProviderMock(m_context.get()));
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080
+ WKContextSetUsesNetworkProcess(m_context.get(), true);
+ WKContextSetProcessModel(m_context.get(), kWKProcessModelMultipleSecondaryProcesses);
+#endif
+
if (const char* dumpRenderTreeTemp = libraryPathForTesting()) {
- WKRetainPtr<WKStringRef> dumpRenderTreeTempWK(AdoptWK, WKStringCreateWithUTF8CString(dumpRenderTreeTemp));
- WKContextSetDatabaseDirectory(m_context.get(), dumpRenderTreeTempWK.get());
- WKContextSetLocalStorageDirectory(m_context.get(), dumpRenderTreeTempWK.get());
- WKContextSetDiskCacheDirectory(m_context.get(), dumpRenderTreeTempWK.get());
- WKContextSetCookieStorageDirectory(m_context.get(), dumpRenderTreeTempWK.get());
+ String temporaryFolder = String::fromUTF8(dumpRenderTreeTemp);
// WebCore::pathByAppendingComponent is not used here because of the namespace,
// which leads us to this ugly #ifdef and file path concatenation.
@@ -339,8 +366,13 @@ void TestController::initialize(int argc, const char* argv[])
#else
const char separator = '/';
#endif
- String iconDatabaseFileTemp = String::fromUTF8(dumpRenderTreeTemp) + separator + String(ASCIILiteral("WebpageIcons.db"));
- WKContextSetIconDatabasePath(m_context.get(), toWK(iconDatabaseFileTemp).get());
+
+ WKContextSetApplicationCacheDirectory(m_context.get(), toWK(temporaryFolder + separator + "ApplicationCache").get());
+ WKContextSetDatabaseDirectory(m_context.get(), toWK(temporaryFolder + separator + "Databases").get());
+ WKContextSetLocalStorageDirectory(m_context.get(), toWK(temporaryFolder + separator + "LocalStorage").get());
+ WKContextSetDiskCacheDirectory(m_context.get(), toWK(temporaryFolder + separator + "Cache").get());
+ WKContextSetCookieStorageDirectory(m_context.get(), toWK(temporaryFolder + separator + "Cookies").get());
+ WKContextSetIconDatabasePath(m_context.get(), toWK(temporaryFolder + separator + "IconDatabase" + separator + "WebpageIcons.db").get());
}
platformInitializeContext();
@@ -366,7 +398,7 @@ void TestController::initialize(int argc, const char* argv[])
void TestController::createWebViewWithOptions(WKDictionaryRef options)
{
- m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get(), options));
+ m_mainWebView = adoptPtr(new PlatformWebView(m_context.get(), m_pageGroup.get(), 0, options));
WKPageUIClient pageUIClient = {
kWKPageUIClientCurrentVersion,
m_mainWebView.get(),
@@ -412,9 +444,10 @@ void TestController::createWebViewWithOptions(WKDictionaryRef options)
createOtherPage,
0, // mouseDidMoveOverElement
decidePolicyForNotificationPermissionRequest, // decidePolicyForNotificationPermissionRequest
- 0, // unavailablePluginButtonClicked
+ 0, // unavailablePluginButtonClicked_deprecatedForUseWithV1
0, // showColorPicker
0, // hideColorPicker
+ unavailablePluginButtonClicked,
};
WKPageSetPageUIClient(m_mainWebView->page(), &pageUIClient);
@@ -436,7 +469,7 @@ void TestController::createWebViewWithOptions(WKDictionaryRef options)
0, // didFailToInitializePlugin
0, // didDisplayInsecureContentForFrame
0, // canAuthenticateAgainstProtectionSpaceInFrame
- 0, // didReceiveAuthenticationChallengeInFrame
+ didReceiveAuthenticationChallengeInFrame, // didReceiveAuthenticationChallengeInFrame
0, // didStartProgress
0, // didChangeProgress
0, // didFinishProgress
@@ -450,10 +483,13 @@ void TestController::createWebViewWithOptions(WKDictionaryRef options)
0, // didNewFirstVisuallyNonEmptyLayout
0, // willGoToBackForwardListItem
0, // interactionOccurredWhileProcessUnresponsive
- 0, // pluginDidFail
+ 0, // pluginDidFail_deprecatedForUseWithV1
0, // didReceiveIntentForFrame
0, // registerIntentServiceForFrame
0, // didLayout
+ 0, // pluginLoadPolicy_deprecatedForUseWithV2
+ 0, // pluginDidFail
+ pluginLoadPolicy, // pluginLoadPolicy
};
WKPageSetPageLoaderClient(m_mainWebView->page(), &pageLoaderClient);
@@ -466,6 +502,8 @@ void TestController::createWebViewWithOptions(WKDictionaryRef options)
0, // unableToImplementPolicy
};
WKPageSetPagePolicyClient(m_mainWebView->page(), &pagePolicyClient);
+
+ m_mainWebView->didInitializeClients();
}
void TestController::ensureViewSupportsOptions(WKDictionaryRef options)
@@ -553,6 +591,7 @@ bool TestController::resetStateToConsistentValues()
#endif
WKPreferencesSetScreenFontSubstitutionEnabled(preferences, true);
WKPreferencesSetInspectorUsesWebKitUserInterface(preferences, true);
+ WKPreferencesSetAsynchronousSpellCheckingEnabled(preferences, false);
#if !PLATFORM(MAC)
WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true);
#endif
@@ -564,6 +603,13 @@ bool TestController::resetStateToConsistentValues()
// Re-set to the default backing scale factor by setting the custom scale factor to 0.
WKPageSetCustomBackingScaleFactor(m_mainWebView->page(), 0);
+#if PLATFORM(EFL)
+ // EFL use a real window while other ports such as Qt don't.
+ // In EFL, we need to resize the window to the original size after calls to window.resizeTo.
+ WKRect rect = m_mainWebView->windowFrame();
+ m_mainWebView->setWindowFrame(WKRectMake(rect.origin.x, rect.origin.y, TestController::viewWidth, TestController::viewHeight));
+#endif
+
// Reset notification permissions
m_webNotificationProvider.reset();
@@ -577,6 +623,12 @@ bool TestController::resetStateToConsistentValues()
m_workQueueManager.clearWorkQueue();
+ m_handlesAuthenticationChallenges = false;
+ m_authenticationUsername = String();
+ m_authenticationPassword = String();
+
+ m_shouldBlockAllPlugins = false;
+
// Reset main page back to about:blank
m_doneResetting = false;
@@ -586,11 +638,12 @@ bool TestController::resetStateToConsistentValues()
}
struct TestCommand {
- TestCommand() : shouldDumpPixels(false) { }
+ TestCommand() : shouldDumpPixels(false), timeout(0) { }
std::string pathOrURL;
bool shouldDumpPixels;
std::string expectedPixelHash;
+ int timeout;
};
class CommandTokenizer {
@@ -652,18 +705,20 @@ TestCommand parseInputLine(const std::string& inputLine)
if (!tokenizer.hasNext())
die(inputLine);
- result.pathOrURL = tokenizer.next();
- if (!tokenizer.hasNext())
- return result;
-
std::string arg = tokenizer.next();
- if (arg != std::string("-p") && arg != std::string("--pixel-test"))
- die(inputLine);
- result.shouldDumpPixels = true;
-
- if (tokenizer.hasNext())
- result.expectedPixelHash = tokenizer.next();
-
+ result.pathOrURL = arg;
+ while (tokenizer.hasNext()) {
+ arg = tokenizer.next();
+ if (arg == std::string("--timeout")) {
+ std::string timeoutToken = tokenizer.next();
+ result.timeout = atoi(timeoutToken.c_str());
+ } else if (arg == std::string("-p") || arg == std::string("--pixel-test")) {
+ result.shouldDumpPixels = true;
+ if (tokenizer.hasNext())
+ result.expectedPixelHash = tokenizer.next();
+ } else
+ die(inputLine);
+ }
return result;
}
@@ -676,6 +731,8 @@ bool TestController::runTest(const char* inputLine)
m_currentInvocation = adoptPtr(new TestInvocation(command.pathOrURL));
if (command.shouldDumpPixels || m_shouldDumpPixelsForAllTests)
m_currentInvocation->setIsPixelTest(command.expectedPixelHash);
+ if (command.timeout > 0)
+ m_currentInvocation->setCustomTimeout(command.timeout);
m_currentInvocation->invoke();
m_currentInvocation.clear();
@@ -702,7 +759,7 @@ void TestController::runTestingServerLoop()
void TestController::run()
{
if (!resetStateToConsistentValues()) {
- m_currentInvocation->dumpWebProcessUnresponsiveness();
+ TestInvocation::dumpWebProcessUnresponsiveness("<unknown> - TestController::run - Failed to reset state to consistent values\n");
return;
}
@@ -727,6 +784,9 @@ void TestController::runUntil(bool& done, TimeoutDuration timeoutDuration)
case LongTimeout:
timeout = m_longTimeout;
break;
+ case CustomTimeout:
+ timeout = m_timeout;
+ break;
case NoTimeout:
default:
timeout = m_noTimeout;
@@ -749,6 +809,26 @@ void TestController::didReceiveSynchronousMessageFromInjectedBundle(WKContextRef
*returnData = static_cast<TestController*>(const_cast<void*>(clientInfo))->didReceiveSynchronousMessageFromInjectedBundle(messageName, messageBody).leakRef();
}
+void TestController::didReceiveKeyDownMessageFromInjectedBundle(WKDictionaryRef messageBodyDictionary, bool synchronous)
+{
+ WKRetainPtr<WKStringRef> keyKey = adoptWK(WKStringCreateWithUTF8CString("Key"));
+ WKStringRef key = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, keyKey.get()));
+
+ WKRetainPtr<WKStringRef> modifiersKey = adoptWK(WKStringCreateWithUTF8CString("Modifiers"));
+ WKEventModifiers modifiers = static_cast<WKEventModifiers>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, modifiersKey.get()))));
+
+ WKRetainPtr<WKStringRef> locationKey = adoptWK(WKStringCreateWithUTF8CString("Location"));
+ unsigned location = static_cast<unsigned>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, locationKey.get()))));
+
+ if (synchronous)
+ WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
+
+ m_eventSenderProxy->keyDown(key, modifiers, location);
+
+ if (synchronous)
+ WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
+}
+
void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody)
{
#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
@@ -775,6 +855,13 @@ void TestController::didReceiveMessageFromInjectedBundle(WKStringRef messageName
return;
}
+
+ if (WKStringIsEqualToUTF8CString(subMessageName, "KeyDown")) {
+ didReceiveKeyDownMessageFromInjectedBundle(messageBodyDictionary, false);
+
+ return;
+ }
+
ASSERT_NOT_REACHED();
}
#endif
@@ -796,19 +883,8 @@ WKRetainPtr<WKTypeRef> TestController::didReceiveSynchronousMessageFromInjectedB
WKStringRef subMessageName = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, subMessageKey.get()));
if (WKStringIsEqualToUTF8CString(subMessageName, "KeyDown")) {
- WKRetainPtr<WKStringRef> keyKey = adoptWK(WKStringCreateWithUTF8CString("Key"));
- WKStringRef key = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, keyKey.get()));
+ didReceiveKeyDownMessageFromInjectedBundle(messageBodyDictionary, true);
- WKRetainPtr<WKStringRef> modifiersKey = adoptWK(WKStringCreateWithUTF8CString("Modifiers"));
- WKEventModifiers modifiers = static_cast<WKEventModifiers>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, modifiersKey.get()))));
-
- WKRetainPtr<WKStringRef> locationKey = adoptWK(WKStringCreateWithUTF8CString("Location"));
- unsigned location = static_cast<unsigned>(WKUInt64GetValue(static_cast<WKUInt64Ref>(WKDictionaryGetItemForKey(messageBodyDictionary, locationKey.get()))));
-
- // Forward to WebProcess
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), true);
- m_eventSenderProxy->keyDown(key, modifiers, location);
- WKPageSetShouldSendEventsSynchronously(mainWebView()->page(), false);
return 0;
}
@@ -995,11 +1071,28 @@ void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame, WKT
static_cast<TestController*>(const_cast<void*>(clientInfo))->didFinishLoadForFrame(page, frame);
}
+void TestController::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge, const void *clientInfo)
+{
+ static_cast<TestController*>(const_cast<void*>(clientInfo))->didReceiveAuthenticationChallengeInFrame(page, frame, authenticationChallenge);
+}
+
void TestController::processDidCrash(WKPageRef page, const void* clientInfo)
{
static_cast<TestController*>(const_cast<void*>(clientInfo))->processDidCrash();
}
+WKPluginLoadPolicy TestController::pluginLoadPolicy(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription, const void* clientInfo)
+{
+ return static_cast<TestController*>(const_cast<void*>(clientInfo))->pluginLoadPolicy(page, currentPluginLoadPolicy, pluginInformation, unavailabilityDescription);
+}
+
+WKPluginLoadPolicy TestController::pluginLoadPolicy(WKPageRef, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription)
+{
+ if (m_shouldBlockAllPlugins)
+ return kWKPluginLoadPolicyBlocked;
+ return currentPluginLoadPolicy;
+}
+
void TestController::didCommitLoadForFrame(WKPageRef page, WKFrameRef frame)
{
if (!WKFrameIsMainFrame(frame))
@@ -1024,6 +1117,26 @@ void TestController::didFinishLoadForFrame(WKPageRef page, WKFrameRef frame)
shared().notifyDone();
}
+void TestController::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge)
+{
+ String message;
+ if (!m_handlesAuthenticationChallenges)
+ message = "<unknown> - didReceiveAuthenticationChallenge - Simulating cancelled authentication sheet\n";
+ else
+ message = String::format("<unknown> - didReceiveAuthenticationChallenge - Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data());
+ m_currentInvocation->outputText(message);
+
+ WKAuthenticationDecisionListenerRef decisionListener = WKAuthenticationChallengeGetDecisionListener(authenticationChallenge);
+ if (!m_handlesAuthenticationChallenges) {
+ WKAuthenticationDecisionListenerUseCredential(decisionListener, 0);
+ return;
+ }
+ WKRetainPtr<WKStringRef> username(AdoptWK, WKStringCreateWithUTF8CString(m_authenticationUsername.utf8().data()));
+ WKRetainPtr<WKStringRef> password(AdoptWK, WKStringCreateWithUTF8CString(m_authenticationPassword.utf8().data()));
+ WKRetainPtr<WKCredentialRef> credential(AdoptWK, WKCredentialCreate(username.get(), password.get(), kWKCredentialPersistenceForSession));
+ WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get());
+}
+
void TestController::processDidCrash()
{
// This function can be called multiple times when crash logs are being saved on Windows, so
@@ -1107,6 +1220,11 @@ void TestController::decidePolicyForNotificationPermissionRequest(WKPageRef, WKS
WKNotificationPermissionRequestAllow(request);
}
+void TestController::unavailablePluginButtonClicked(WKPageRef, WKPluginUnavailabilityReason, WKDictionaryRef, const void*)
+{
+ printf("MISSING PLUGIN BUTTON PRESSED\n");
+}
+
void TestController::decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKFramePolicyListenerRef listener, WKTypeRef, const void* clientInfo)
{
static_cast<TestController*>(const_cast<void*>(clientInfo))->decidePolicyForNavigationAction(listener);
diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h
index b0ad979e0..f6debdd15 100644
--- a/Tools/WebKitTestRunner/TestController.h
+++ b/Tools/WebKitTestRunner/TestController.h
@@ -46,6 +46,12 @@ class TestController {
public:
static TestController& shared();
+ static const unsigned viewWidth;
+ static const unsigned viewHeight;
+
+ static const unsigned w3cSVGViewWidth;
+ static const unsigned w3cSVGViewHeight;
+
TestController(int argc, const char* argv[]);
~TestController();
@@ -60,10 +66,12 @@ public:
void ensureViewSupportsOptions(WKDictionaryRef options);
// Runs the run loop until `done` is true or the timeout elapses.
- enum TimeoutDuration { ShortTimeout, LongTimeout, NoTimeout };
+ enum TimeoutDuration { ShortTimeout, LongTimeout, NoTimeout, CustomTimeout };
bool useWaitToDumpWatchdogTimer() { return m_useWaitToDumpWatchdogTimer; }
void runUntil(bool& done, TimeoutDuration);
void notifyDone();
+
+ int getCustomTimeout();
bool beforeUnloadReturnValue() const { return m_beforeUnloadReturnValue; }
void setBeforeUnloadReturnValue(bool value) { m_beforeUnloadReturnValue = value; }
@@ -86,6 +94,12 @@ public:
WorkQueueManager& workQueueManager() { return m_workQueueManager; }
+ void setHandlesAuthenticationChallenges(bool value) { m_handlesAuthenticationChallenges = value; }
+ void setAuthenticationUsername(String username) { m_authenticationUsername = username; }
+ void setAuthenticationPassword(String password) { m_authenticationPassword = password; }
+
+ void setBlockAllPlugins(bool shouldBlock) { m_shouldBlockAllPlugins = shouldBlock; }
+
private:
void initialize(int argc, const char* argv[]);
void createWebViewWithOptions(WKDictionaryRef);
@@ -110,6 +124,8 @@ private:
void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
WKRetainPtr<WKTypeRef> didReceiveSynchronousMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
+ void didReceiveKeyDownMessageFromInjectedBundle(WKDictionaryRef messageBodyDictionary, bool synchronous);
+
// WKPageLoaderClient
static void didCommitLoadForFrame(WKPageRef, WKFrameRef, WKTypeRef userData, const void*);
void didCommitLoadForFrame(WKPageRef, WKFrameRef);
@@ -120,9 +136,18 @@ private:
static void processDidCrash(WKPageRef, const void* clientInfo);
void processDidCrash();
+ static WKPluginLoadPolicy pluginLoadPolicy(WKPageRef, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription, const void* clientInfo);
+ WKPluginLoadPolicy pluginLoadPolicy(WKPageRef, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInformation, WKStringRef* unavailabilityDescription);
+
+
static void decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef, WKNotificationPermissionRequestRef, const void*);
void decidePolicyForNotificationPermissionRequest(WKPageRef, WKSecurityOriginRef, WKNotificationPermissionRequestRef);
+ static void unavailablePluginButtonClicked(WKPageRef, WKPluginUnavailabilityReason, WKDictionaryRef, const void*);
+
+ static void didReceiveAuthenticationChallengeInFrame(WKPageRef, WKFrameRef, WKAuthenticationChallengeRef, const void *clientInfo);
+ void didReceiveAuthenticationChallengeInFrame(WKPageRef, WKFrameRef, WKAuthenticationChallengeRef);
+
// WKPagePolicyClient
static void decidePolicyForNavigationAction(WKPageRef, WKFrameRef, WKFrameNavigationType, WKEventModifiers, WKEventMouseButton, WKURLRequestRef, WKFramePolicyListenerRef, WKTypeRef, const void*);
void decidePolicyForNavigationAction(WKFramePolicyListenerRef);
@@ -169,6 +194,8 @@ private:
bool m_useWaitToDumpWatchdogTimer;
bool m_forceNoTimeout;
+ int m_timeout;
+
bool m_didPrintWebProcessCrashedMessage;
bool m_shouldExitWhenWebProcessCrashes;
@@ -182,6 +209,12 @@ private:
bool m_policyDelegateEnabled;
bool m_policyDelegatePermissive;
+ bool m_handlesAuthenticationChallenges;
+ String m_authenticationUsername;
+ String m_authenticationPassword;
+
+ bool m_shouldBlockAllPlugins;
+
#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
OwnPtr<EventSenderProxy> m_eventSenderProxy;
#endif
diff --git a/Tools/WebKitTestRunner/TestInvocation.cpp b/Tools/WebKitTestRunner/TestInvocation.cpp
index 6839ccbf1..69236bf97 100644
--- a/Tools/WebKitTestRunner/TestInvocation.cpp
+++ b/Tools/WebKitTestRunner/TestInvocation.cpp
@@ -32,15 +32,18 @@
#include "TestController.h"
#include <climits>
#include <cstdio>
-#include <WebKit2/WKDictionary.h>
#include <WebKit2/WKContextPrivate.h>
+#include <WebKit2/WKData.h>
+#include <WebKit2/WKDictionary.h>
#include <WebKit2/WKInspector.h>
#include <WebKit2/WKRetainPtr.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/PassOwnArrayPtr.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/text/CString.h>
#if PLATFORM(MAC)
+#include <Carbon/Carbon.h>
#include <WebKit2/WKPagePrivateMac.h>
#endif
@@ -101,6 +104,7 @@ TestInvocation::TestInvocation(const std::string& pathOrURL)
: m_url(AdoptWK, createWKURL(pathOrURL.c_str()))
, m_pathOrURL(pathOrURL)
, m_dumpPixels(false)
+ , m_timeout(0)
, m_gotInitialResponse(false)
, m_gotFinalMessage(false)
, m_gotRepaint(false)
@@ -119,20 +123,21 @@ void TestInvocation::setIsPixelTest(const std::string& expectedPixelHash)
m_expectedPixelHash = expectedPixelHash;
}
-static const unsigned w3cSVGWidth = 480;
-static const unsigned w3cSVGHeight = 360;
-static const unsigned normalWidth = 800;
-static const unsigned normalHeight = 600;
+void TestInvocation::setCustomTimeout(int timeout)
+{
+ m_timeout = timeout;
+}
static void sizeWebViewForCurrentTest(const char* pathOrURL)
{
bool isSVGW3CTest = strstr(pathOrURL, "svg/W3C-SVG-1.1") || strstr(pathOrURL, "svg\\W3C-SVG-1.1");
if (isSVGW3CTest)
- TestController::shared().mainWebView()->resizeTo(w3cSVGWidth, w3cSVGHeight);
+ TestController::shared().mainWebView()->resizeTo(TestController::w3cSVGViewWidth, TestController::w3cSVGViewHeight);
else
- TestController::shared().mainWebView()->resizeTo(normalWidth, normalHeight);
+ TestController::shared().mainWebView()->resizeTo(TestController::viewWidth, TestController::viewHeight);
}
+
static bool shouldLogFrameLoadDelegates(const char* pathOrURL)
{
return strstr(pathOrURL, "loading/");
@@ -166,33 +171,41 @@ static void updateTiledDrawingForCurrentTest(const char* pathOrURL)
#endif
}
-#if ENABLE(CSS_DEVICE_ADAPTATION)
static bool shouldUseFixedLayout(const char* pathOrURL)
{
- return strstr(pathOrURL, "device-adapt/") || strstr(pathOrURL, "device-adapt\\");
-}
+#if ENABLE(CSS_DEVICE_ADAPTATION)
+ if (strstr(pathOrURL, "device-adapt/") || strstr(pathOrURL, "device-adapt\\"))
+ return true;
#endif
+#if USE(TILED_BACKING_STORE) && PLATFORM(EFL)
+ if (strstr(pathOrURL, "sticky/") || strstr(pathOrURL, "sticky\\"))
+ return true;
+#endif
+ return false;
+
+ UNUSED_PARAM(pathOrURL);
+}
+
static void updateLayoutType(const char* pathOrURL)
{
-#if ENABLE(CSS_DEVICE_ADAPTATION)
WKRetainPtr<WKMutableDictionaryRef> viewOptions = adoptWK(WKMutableDictionaryCreate());
WKRetainPtr<WKStringRef> useFixedLayoutKey = adoptWK(WKStringCreateWithUTF8CString("UseFixedLayout"));
WKRetainPtr<WKBooleanRef> useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(pathOrURL)));
WKDictionaryAddItem(viewOptions.get(), useFixedLayoutKey.get(), useFixedLayoutValue.get());
TestController::shared().ensureViewSupportsOptions(viewOptions.get());
-#else
- UNUSED_PARAM(pathOrURL);
-#endif
}
void TestInvocation::invoke()
{
+ TestController::TimeoutDuration timeoutToUse = TestController::LongTimeout;
sizeWebViewForCurrentTest(m_pathOrURL.c_str());
updateLayoutType(m_pathOrURL.c_str());
updateTiledDrawingForCurrentTest(m_pathOrURL.c_str());
+ m_textOutput.clear();
+
WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("BeginTest"));
WKRetainPtr<WKMutableDictionaryRef> beginTestMessageBody = adoptWK(WKMutableDictionaryCreate());
@@ -208,6 +221,10 @@ void TestInvocation::invoke()
WKRetainPtr<WKBooleanRef> useWaitToDumpWatchdogTimerValue = adoptWK(WKBooleanCreate(TestController::shared().useWaitToDumpWatchdogTimer()));
WKDictionaryAddItem(beginTestMessageBody.get(), useWaitToDumpWatchdogTimerKey.get(), useWaitToDumpWatchdogTimerValue.get());
+ WKRetainPtr<WKStringRef> timeoutKey = adoptWK(WKStringCreateWithUTF8CString("Timeout"));
+ WKRetainPtr<WKUInt64Ref> timeoutValue = adoptWK(WKUInt64Create(m_timeout));
+ WKDictionaryAddItem(beginTestMessageBody.get(), timeoutKey.get(), timeoutValue.get());
+
WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), beginTestMessageBody.get());
TestController::shared().runUntil(m_gotInitialResponse, TestController::ShortTimeout);
@@ -226,7 +243,13 @@ void TestInvocation::invoke()
WKPageLoadURL(TestController::shared().mainWebView()->page(), m_url.get());
- TestController::shared().runUntil(m_gotFinalMessage, TestController::shared().useWaitToDumpWatchdogTimer() ? TestController::LongTimeout : TestController::NoTimeout);
+ if (TestController::shared().useWaitToDumpWatchdogTimer()) {
+ if (m_timeout > 0)
+ timeoutToUse = TestController::CustomTimeout;
+ } else
+ timeoutToUse = TestController::NoTimeout;
+ TestController::shared().runUntil(m_gotFinalMessage, timeoutToUse);
+
if (!m_gotFinalMessage) {
m_errorMessage = "Timed out waiting for final message from web process\n";
m_webProcessIsUnresponsive = true;
@@ -253,6 +276,11 @@ end:
void TestInvocation::dumpWebProcessUnresponsiveness()
{
+ dumpWebProcessUnresponsiveness(m_errorMessage.c_str());
+}
+
+void TestInvocation::dumpWebProcessUnresponsiveness(const char* errorMessage)
+{
const char* errorMessageToStderr = 0;
#if PLATFORM(MAC)
char buffer[64];
@@ -263,7 +291,7 @@ void TestInvocation::dumpWebProcessUnresponsiveness()
errorMessageToStderr = "#PROCESS UNRESPONSIVE - WebProcess";
#endif
- dump(m_errorMessage.c_str(), errorMessageToStderr, true);
+ dump(errorMessage, errorMessageToStderr, true);
}
void TestInvocation::dump(const char* textToStdout, const char* textToStderr, bool seenError)
@@ -284,13 +312,42 @@ void TestInvocation::dump(const char* textToStdout, const char* textToStderr, bo
void TestInvocation::dumpResults()
{
- dump(toWTFString(m_textOutput.get()).utf8().data());
+ if (m_textOutput.length() || !m_audioResult)
+ dump(m_textOutput.toString().utf8().data());
+ else
+ dumpAudio(m_audioResult.get());
if (m_dumpPixels && m_pixelResult)
dumpPixelsAndCompareWithExpected(m_pixelResult.get(), m_repaintRects.get());
fputs("#EOF\n", stdout);
fflush(stdout);
+ fflush(stderr);
+}
+
+void TestInvocation::dumpAudio(WKDataRef audioData)
+{
+ size_t length = WKDataGetSize(audioData);
+ if (!length)
+ return;
+
+ const unsigned char* data = WKDataGetBytes(audioData);
+
+ printf("Content-Type: audio/wav\n");
+ printf("Content-Length: %lu\n", static_cast<unsigned long>(length));
+
+ const size_t bytesToWriteInOneChunk = 1 << 15;
+ size_t dataRemainingToWrite = length;
+ while (dataRemainingToWrite) {
+ size_t bytesToWriteInThisChunk = std::min(dataRemainingToWrite, bytesToWriteInOneChunk);
+ size_t bytesWritten = fwrite(data, 1, bytesToWriteInThisChunk, stdout);
+ if (bytesWritten != bytesToWriteInThisChunk)
+ break;
+ dataRemainingToWrite -= bytesWritten;
+ data += bytesWritten;
+ }
+ printf("#EOF\n");
+ fprintf(stderr, "#EOF\n");
}
bool TestInvocation::compareActualHashToExpectedAndDumpResults(const char actualHash[33])
@@ -336,9 +393,6 @@ void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef messageName
ASSERT(WKGetTypeID(messageBody) == WKDictionaryGetTypeID());
WKDictionaryRef messageBodyDictionary = static_cast<WKDictionaryRef>(messageBody);
- WKRetainPtr<WKStringRef> textOutputKey(AdoptWK, WKStringCreateWithUTF8CString("TextOutput"));
- m_textOutput = static_cast<WKStringRef>(WKDictionaryGetItemForKey(messageBodyDictionary, textOutputKey.get()));
-
WKRetainPtr<WKStringRef> pixelResultKey = adoptWK(WKStringCreateWithUTF8CString("PixelResult"));
m_pixelResult = static_cast<WKImageRef>(WKDictionaryGetItemForKey(messageBodyDictionary, pixelResultKey.get()));
ASSERT(!m_pixelResult || m_dumpPixels);
@@ -346,11 +400,21 @@ void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef messageName
WKRetainPtr<WKStringRef> repaintRectsKey = adoptWK(WKStringCreateWithUTF8CString("RepaintRects"));
m_repaintRects = static_cast<WKArrayRef>(WKDictionaryGetItemForKey(messageBodyDictionary, repaintRectsKey.get()));
+ WKRetainPtr<WKStringRef> audioResultKey = adoptWK(WKStringCreateWithUTF8CString("AudioResult"));
+ m_audioResult = static_cast<WKDataRef>(WKDictionaryGetItemForKey(messageBodyDictionary, audioResultKey.get()));
+
m_gotFinalMessage = true;
TestController::shared().notifyDone();
return;
}
-
+
+ if (WKStringIsEqualToUTF8CString(messageName, "TextOutput")) {
+ ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID());
+ WKStringRef textOutput = static_cast<WKStringRef>(messageBody);
+ m_textOutput.append(toWTFString(textOutput));
+ return;
+ }
+
if (WKStringIsEqualToUTF8CString(messageName, "BeforeUnloadReturnValue")) {
ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
WKBooleanRef beforeUnloadReturnValue = static_cast<WKBooleanRef>(messageBody);
@@ -566,6 +630,34 @@ void TestInvocation::didReceiveMessageFromInjectedBundle(WKStringRef messageName
return;
}
+ if (WKStringIsEqualToUTF8CString(messageName, "SetHandlesAuthenticationChallenge")) {
+ ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
+ WKBooleanRef value = static_cast<WKBooleanRef>(messageBody);
+ TestController::shared().setHandlesAuthenticationChallenges(WKBooleanGetValue(value));
+ return;
+ }
+
+ if (WKStringIsEqualToUTF8CString(messageName, "SetAuthenticationUsername")) {
+ ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID());
+ WKStringRef username = static_cast<WKStringRef>(messageBody);
+ TestController::shared().setAuthenticationUsername(toWTFString(username));
+ return;
+ }
+
+ if (WKStringIsEqualToUTF8CString(messageName, "SetAuthenticationPassword")) {
+ ASSERT(WKGetTypeID(messageBody) == WKStringGetTypeID());
+ WKStringRef password = static_cast<WKStringRef>(messageBody);
+ TestController::shared().setAuthenticationPassword(toWTFString(password));
+ return;
+ }
+
+ if (WKStringIsEqualToUTF8CString(messageName, "SetBlockAllPlugins")) {
+ ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
+ WKBooleanRef shouldBlock = static_cast<WKBooleanRef>(messageBody);
+ TestController::shared().setBlockAllPlugins(WKBooleanGetValue(shouldBlock));
+ return;
+ }
+
ASSERT_NOT_REACHED();
}
@@ -584,8 +676,21 @@ WKRetainPtr<WKTypeRef> TestInvocation::didReceiveSynchronousMessageFromInjectedB
return result;
}
+ if (WKStringIsEqualToUTF8CString(messageName, "SecureEventInputIsEnabled")) {
+#if PLATFORM(MAC)
+ WKRetainPtr<WKBooleanRef> result(AdoptWK, WKBooleanCreate(IsSecureEventInputEnabled()));
+#else
+ WKRetainPtr<WKBooleanRef> result(AdoptWK, WKBooleanCreate(false));
+#endif
+ return result;
+ }
ASSERT_NOT_REACHED();
return 0;
}
+void TestInvocation::outputText(const WTF::String& text)
+{
+ m_textOutput.append(text);
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/TestInvocation.h b/Tools/WebKitTestRunner/TestInvocation.h
index e49d9fd0d..1b415efc1 100644
--- a/Tools/WebKitTestRunner/TestInvocation.h
+++ b/Tools/WebKitTestRunner/TestInvocation.h
@@ -29,6 +29,8 @@
#include <string>
#include <WebKit2/WKRetainPtr.h>
#include <wtf/Noncopyable.h>
+#include <wtf/OwnPtr.h>
+#include <wtf/text/StringBuilder.h>
namespace WTR {
@@ -40,15 +42,20 @@ public:
void setIsPixelTest(const std::string& expectedPixelHash);
+ void setCustomTimeout(int duration);
+
void invoke();
void didReceiveMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
WKRetainPtr<WKTypeRef> didReceiveSynchronousMessageFromInjectedBundle(WKStringRef messageName, WKTypeRef messageBody);
void dumpWebProcessUnresponsiveness();
+ static void dumpWebProcessUnresponsiveness(const char* errorMessage);
+ void outputText(const WTF::String&);
private:
void dumpResults();
static void dump(const char* textToStdout, const char* textToStderr = 0, bool seenError = false);
void dumpPixelsAndCompareWithExpected(WKImageRef, WKArrayRef repaintRects);
+ void dumpAudio(WKDataRef);
bool compareActualHashToExpectedAndDumpResults(const char[33]);
#if PLATFORM(QT) || PLATFORM(EFL)
@@ -61,13 +68,16 @@ private:
bool m_dumpPixels;
std::string m_expectedPixelHash;
+ int m_timeout;
+
// Invocation state
bool m_gotInitialResponse;
bool m_gotFinalMessage;
bool m_gotRepaint;
bool m_error;
- WKRetainPtr<WKStringRef> m_textOutput;
+ StringBuilder m_textOutput;
+ WKRetainPtr<WKDataRef> m_audioResult;
WKRetainPtr<WKImageRef> m_pixelResult;
WKRetainPtr<WKArrayRef> m_repaintRects;
std::string m_errorMessage;
diff --git a/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj b/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
index 530347b39..ac608936d 100644
--- a/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
+++ b/Tools/WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj
@@ -44,6 +44,8 @@
5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5641E2CE14335E95008307E5 /* JSTextInputController.cpp */; };
5664A49A14326384008881BE /* TextInputController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5664A49814326384008881BE /* TextInputController.cpp */; };
5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5670B8271386FCA5002EB355 /* EventSenderProxy.mm */; };
+ 5C45C30F17398E290079714E /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */; };
+ 5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */; };
6510A78211EC643800410867 /* AHEM____.TTF in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77711EC643800410867 /* AHEM____.TTF */; };
6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */; };
6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */; };
@@ -83,6 +85,7 @@
BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCD7D2F711921278006DB7EE /* TestInvocation.cpp */; };
BCDA2B9A1191051F00C3BC47 /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */; };
C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0CE720A1247C93300BC0EC4 /* TestRunnerMac.mm */; };
+ E1BA671E1742DA6A00C20251 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E1BA671D1742DA5A00C20251 /* Carbon.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -149,6 +152,9 @@
5670B8271386FCA5002EB355 /* EventSenderProxy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventSenderProxy.mm; sourceTree = "<group>"; };
583913D014335E95008307E5 /* JSAccessibilityController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSAccessibilityController.cpp; path = DerivedSources/WebKitTestRunner/JSAccessibilityController.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
583913D114335E95008307E5 /* JSAccessibilityController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSAccessibilityController.h; path = DerivedSources/WebKitTestRunner/JSAccessibilityController.h; sourceTree = BUILT_PRODUCTS_DIR; };
+ 5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = SOURCE_ROOT; };
+ 5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = SOURCE_ROOT; };
+ 5C45C31217398E480079714E /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = SOURCE_ROOT; };
6510A77711EC643800410867 /* AHEM____.TTF */ = {isa = PBXFileReference; lastKnownFileType = file; name = "AHEM____.TTF"; path = "fonts/AHEM____.TTF"; sourceTree = "<group>"; };
6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; };
@@ -213,6 +219,7 @@
BCD7D2F711921278006DB7EE /* TestInvocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestInvocation.cpp; sourceTree = "<group>"; };
BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C0CE720A1247C93300BC0EC4 /* TestRunnerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = TestRunnerMac.mm; path = mac/TestRunnerMac.mm; sourceTree = "<group>"; };
+ E1BA671D1742DA5A00C20251 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -221,9 +228,10 @@
buildActionMask = 2147483647;
files = (
BC7934A511906584005EA8E2 /* Cocoa.framework in Frameworks */,
- BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */,
BCDA2B9A1191051F00C3BC47 /* JavaScriptCore.framework in Frameworks */,
0F5169CB1445222D00E0A9D7 /* WebKit.framework in Frameworks */,
+ E1BA671E1742DA6A00C20251 /* Carbon.framework in Frameworks */,
+ BC7934AC1190658C005EA8E2 /* WebKit2.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -232,10 +240,10 @@
buildActionMask = 2147483647;
files = (
BC25193E11D15D8B002EBC01 /* Cocoa.framework in Frameworks */,
- BC25193F11D15D8B002EBC01 /* WebKit2.framework in Frameworks */,
BC25194011D15D8B002EBC01 /* JavaScriptCore.framework in Frameworks */,
A664BC7613A5F3A9009A7B25 /* libWebCoreTestSupport.dylib in Frameworks */,
0F5169CC1445222D00E0A9D7 /* WebKit.framework in Frameworks */,
+ BC25193F11D15D8B002EBC01 /* WebKit2.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -270,15 +278,15 @@
5322FB4413FDA0EA0041ABCC /* PixelDumpSupport.cpp */,
5322FB4513FDA0EA0041ABCC /* PixelDumpSupport.h */,
BC7934DD119066EC005EA8E2 /* PlatformWebView.h */,
- BC79342F118F7F19005EA8E2 /* TestController.h */,
BC793430118F7F19005EA8E2 /* TestController.cpp */,
- BCD7D2F611921278006DB7EE /* TestInvocation.h */,
+ BC79342F118F7F19005EA8E2 /* TestController.h */,
BCD7D2F711921278006DB7EE /* TestInvocation.cpp */,
+ BCD7D2F611921278006DB7EE /* TestInvocation.h */,
BC251A1711D16774002EBC01 /* WebKitTestRunnerPrefix.h */,
- 3110BE0F15BA011400D216AC /* WebNotificationProvider.h */,
3164C8EF15D1ADA100EF1FE0 /* WebNotificationProvider.cpp */,
- 4429FC611627089600F66D8B /* WorkQueueManager.h */,
+ 3110BE0F15BA011400D216AC /* WebNotificationProvider.h */,
4429FC5E1627089600F66D8B /* WorkQueueManager.cpp */,
+ 4429FC611627089600F66D8B /* WorkQueueManager.h */,
);
name = TestRunner;
sourceTree = "<group>";
@@ -286,12 +294,13 @@
08FB779DFE84155DC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
+ E1BA671D1742DA5A00C20251 /* Carbon.framework */,
BC7934A411906584005EA8E2 /* Cocoa.framework */,
- BC7934AB1190658C005EA8E2 /* WebKit2.framework */,
- 0F5169CA1445222D00E0A9D7 /* WebKit.framework */,
BCDA2B991191051F00C3BC47 /* JavaScriptCore.framework */,
- 4181731B138AD39D0057AAA4 /* WebCoreTestSupport.h */,
41230E16138C78BF00BCCFCA /* libWebCoreTestSupport.dylib */,
+ 4181731B138AD39D0057AAA4 /* WebCoreTestSupport.h */,
+ 0F5169CA1445222D00E0A9D7 /* WebKit.framework */,
+ BC7934AB1190658C005EA8E2 /* WebKit2.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
@@ -308,28 +317,38 @@
29A8FCE0145F035D009045A6 /* Accessibility */ = {
isa = PBXGroup;
children = (
+ 29210EAB144CACB200835BB6 /* AccessibilityCommonMac.mm */,
+ 29210EA2144CAAA500835BB5 /* AccessibilityController.cpp */,
+ 29210EA3144CAAA500835BB5 /* AccessibilityController.h */,
8034C6611487636400AC32E9 /* AccessibilityControllerMac.mm */,
8097338814874A5A008156D9 /* AccessibilityNotificationHandler.h */,
8097338914874A5A008156D9 /* AccessibilityNotificationHandler.mm */,
- 29210EA2144CAAA500835BB5 /* AccessibilityController.cpp */,
- 29210EA3144CAAA500835BB5 /* AccessibilityController.h */,
- 29210EA9144CACB200835BB5 /* AccessibilityUIElement.cpp */,
- 29210EAA144CACB200835BB5 /* AccessibilityUIElement.h */,
- 29210EAB144CACB200835BB5 /* AccessibilityUIElementMac.mm */,
- 29210EAB144CACB200835BB6 /* AccessibilityCommonMac.mm */,
29210EB1144CACD400835BB5 /* AccessibilityTextMarker.cpp */,
29210EB2144CACD400835BB5 /* AccessibilityTextMarker.h */,
29210EB3144CACD400835BB5 /* AccessibilityTextMarkerMac.mm */,
29A8FCE1145F037B009045A6 /* AccessibilityTextMarkerRange.cpp */,
29A8FCDF145F0358009045A6 /* AccessibilityTextMarkerRange.h */,
29A8FCE4145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm */,
+ 29210EA9144CACB200835BB5 /* AccessibilityUIElement.cpp */,
+ 29210EAA144CACB200835BB5 /* AccessibilityUIElement.h */,
+ 29210EAB144CACB200835BB5 /* AccessibilityUIElementMac.mm */,
);
name = Accessibility;
sourceTree = "<group>";
};
+ 5C45C31017398E370079714E /* cf */ = {
+ isa = PBXGroup;
+ children = (
+ 5C45C31117398E480079714E /* WebArchiveDumpSupport.cpp */,
+ 5C45C31217398E480079714E /* WebArchiveDumpSupport.h */,
+ );
+ name = cf;
+ sourceTree = "<group>";
+ };
65EB859E11EC67CC0034D300 /* mac */ = {
isa = PBXGroup;
children = (
+ 5C45C30E17398E290079714E /* WebArchiveDumpSupportMac.mm */,
65EB859F11EC67CC0034D300 /* ActivateFonts.mm */,
BC8DAD771316D7B900EC96FC /* InjectedBundleMac.mm */,
0FAF67EE160D6C100077CB2B /* InjectedBundlePageMac.mm */,
@@ -357,9 +376,10 @@
BC25183511D1571D002EBC01 /* InjectedBundle */ = {
isa = PBXGroup;
children = (
- BC952D3A11F3BF1F003398B4 /* Derived Sources */,
+ 5C45C31017398E370079714E /* cf */,
BC952C0A11F3B939003398B4 /* Bindings */,
BC14E4E0120E02F900826C0C /* Controllers */,
+ BC952D3A11F3BF1F003398B4 /* Derived Sources */,
65EB859E11EC67CC0034D300 /* mac */,
65EB859D11EC67CC0034D300 /* ActivateFonts.h */,
BCC997A011D3C8F60017BCA2 /* InjectedBundle.cpp */,
@@ -374,8 +394,9 @@
BC25194411D15DBE002EBC01 /* Resources */ = {
isa = PBXGroup;
children = (
- BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */,
6510A77711EC643800410867 /* AHEM____.TTF */,
+ BC25186311D15D54002EBC01 /* InjectedBundle-Info.plist */,
+ 8CCDA822151A570B0003F937 /* SampleFont.sfont */,
6510A77911EC643800410867 /* WebKitWeightWatcher100.ttf */,
6510A77A11EC643800410867 /* WebKitWeightWatcher200.ttf */,
6510A77B11EC643800410867 /* WebKitWeightWatcher300.ttf */,
@@ -385,7 +406,6 @@
6510A77F11EC643800410867 /* WebKitWeightWatcher700.ttf */,
6510A78011EC643800410867 /* WebKitWeightWatcher800.ttf */,
6510A78111EC643800410867 /* WebKitWeightWatcher900.ttf */,
- 8CCDA822151A570B0003F937 /* SampleFont.sfont */,
);
name = Resources;
sourceTree = "<group>";
@@ -423,16 +443,16 @@
BC952C0A11F3B939003398B4 /* Bindings */ = {
isa = PBXGroup;
children = (
- BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */,
- BC952C0E11F3B97B003398B4 /* JSWrappable.h */,
- BC952C0C11F3B965003398B4 /* JSWrapper.cpp */,
- BC952C0B11F3B965003398B4 /* JSWrapper.h */,
29210EA8144CAB8800835BB5 /* AccessibilityController.idl */,
29A8FCC5145B93C6009045A6 /* AccessibilityTextMarker.idl */,
29A8FCD2145EF8F2009045A6 /* AccessibilityTextMarkerRange.idl */,
29210EDC144CD56E00835BB5 /* AccessibilityUIElement.idl */,
+ BC952ED311F3C318003398B4 /* CodeGeneratorTestRunner.pm */,
BC8FD8CB120E52B000F3E71A /* EventSendingController.idl */,
BC14E4E1120E032000826C0C /* GCController.idl */,
+ BC952C0E11F3B97B003398B4 /* JSWrappable.h */,
+ BC952C0C11F3B965003398B4 /* JSWrapper.cpp */,
+ BC952C0B11F3B965003398B4 /* JSWrapper.h */,
BC952ED211F3C29F003398B4 /* TestRunner.idl */,
5664A49614326377008881BE /* TextInputController.idl */,
);
@@ -515,6 +535,8 @@
/* Begin PBXProject section */
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ };
buildConfigurationList = 1DEB927808733DD40010E9CD /* Build configuration list for PBXProject "WebKitTestRunner" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
@@ -542,6 +564,7 @@
buildActionMask = 2147483647;
files = (
6510A78211EC643800410867 /* AHEM____.TTF in Resources */,
+ 8CCDA823151A570B0003F937 /* SampleFont.sfont in Resources */,
6510A78411EC643800410867 /* WebKitWeightWatcher100.ttf in Resources */,
6510A78511EC643800410867 /* WebKitWeightWatcher200.ttf in Resources */,
6510A78611EC643800410867 /* WebKitWeightWatcher300.ttf in Resources */,
@@ -551,7 +574,6 @@
6510A78A11EC643800410867 /* WebKitWeightWatcher700.ttf in Resources */,
6510A78B11EC643800410867 /* WebKitWeightWatcher800.ttf in Resources */,
6510A78C11EC643800410867 /* WebKitWeightWatcher900.ttf in Resources */,
- 8CCDA823151A570B0003F937 /* SampleFont.sfont in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -579,16 +601,16 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- BC793400118F7C84005EA8E2 /* main.mm in Sources */,
5322FB4313FDA0CD0041ABCC /* CyclicRedundancyCheck.cpp in Sources */,
+ 5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */,
26D758E7160BECDD00268472 /* GeolocationProviderMock.cpp in Sources */,
+ BC793400118F7C84005EA8E2 /* main.mm in Sources */,
5322FB4613FDA0EA0041ABCC /* PixelDumpSupport.cpp in Sources */,
BC7934E811906846005EA8E2 /* PlatformWebViewMac.mm in Sources */,
BC793431118F7F19005EA8E2 /* TestController.cpp in Sources */,
BC8C795C11D2785D004535A1 /* TestControllerMac.mm in Sources */,
BCD7D2F811921278006DB7EE /* TestInvocation.cpp in Sources */,
BC9192051333E4F8003011DC /* TestInvocationCG.cpp in Sources */,
- 5670B8281386FCA5002EB355 /* EventSenderProxy.mm in Sources */,
3164C8F015D1ADA100EF1FE0 /* WebNotificationProvider.cpp in Sources */,
4429FC5F1627089600F66D8B /* WorkQueueManager.cpp in Sources */,
);
@@ -598,36 +620,38 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- BC251A3E11D16831002EBC01 /* InjectedBundleMain.cpp in Sources */,
- BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */,
- BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */,
- BCC9981811D3F51E0017BCA2 /* TestRunner.cpp in Sources */,
- 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */,
- BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */,
- BC952F1F11F3C652003398B4 /* JSTestRunner.cpp in Sources */,
- BC14E4DB120E02D000826C0C /* GCController.cpp in Sources */,
- BC14E4EA120E03D800826C0C /* JSGCController.cpp in Sources */,
- BC8DAD7B1316D91000EC96FC /* InjectedBundleMac.mm in Sources */,
- BC8FD8CA120E527F00F3E71A /* EventSendingController.cpp in Sources */,
- BC8FD8D2120E545B00F3E71A /* JSEventSendingController.cpp in Sources */,
- C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */,
- 5664A49A14326384008881BE /* TextInputController.cpp in Sources */,
- 5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */,
- 29210EAE144CACB700835BB5 /* AccessibilityUIElement.cpp in Sources */,
+ 29210EDA144CC3EA00835BB6 /* AccessibilityCommonMac.mm in Sources */,
29210EB0144CACBD00835BB5 /* AccessibilityController.cpp in Sources */,
+ 8034C6621487636400AC32E9 /* AccessibilityControllerMac.mm in Sources */,
+ 8097338A14874A5A008156D9 /* AccessibilityNotificationHandler.mm in Sources */,
29210EB4144CACD500835BB5 /* AccessibilityTextMarker.cpp in Sources */,
29210EB5144CACD500835BB5 /* AccessibilityTextMarkerMac.mm in Sources */,
+ 29A8FCE2145F037B009045A6 /* AccessibilityTextMarkerRange.cpp in Sources */,
+ 29A8FCE5145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm in Sources */,
+ 29210EAE144CACB700835BB5 /* AccessibilityUIElement.cpp in Sources */,
29210EDA144CC3EA00835BB5 /* AccessibilityUIElementMac.mm in Sources */,
- 29210EDA144CC3EA00835BB6 /* AccessibilityCommonMac.mm in Sources */,
+ 65EB85A011EC67CC0034D300 /* ActivateFonts.mm in Sources */,
+ BC8FD8CA120E527F00F3E71A /* EventSendingController.cpp in Sources */,
+ BC14E4DB120E02D000826C0C /* GCController.cpp in Sources */,
+ BCC997A411D3C8F60017BCA2 /* InjectedBundle.cpp in Sources */,
+ BC8DAD7B1316D91000EC96FC /* InjectedBundleMac.mm in Sources */,
+ BC251A3E11D16831002EBC01 /* InjectedBundleMain.cpp in Sources */,
+ BCC997A511D3C8F60017BCA2 /* InjectedBundlePage.cpp in Sources */,
+ 0FAF67EF160D6C100077CB2B /* InjectedBundlePageMac.mm in Sources */,
29210EDB144CD47900835BB5 /* JSAccessibilityController.cpp in Sources */,
- 29210EE1144CDB2600835BB5 /* JSAccessibilityUIElement.cpp in Sources */,
29A8FCCB145EF02E009045A6 /* JSAccessibilityTextMarker.cpp in Sources */,
29A8FCDD145F0337009045A6 /* JSAccessibilityTextMarkerRange.cpp in Sources */,
- 29A8FCE2145F037B009045A6 /* AccessibilityTextMarkerRange.cpp in Sources */,
- 29A8FCE5145F0464009045A6 /* AccessibilityTextMarkerRangeMac.mm in Sources */,
- 8097338A14874A5A008156D9 /* AccessibilityNotificationHandler.mm in Sources */,
- 8034C6621487636400AC32E9 /* AccessibilityControllerMac.mm in Sources */,
- 0FAF67EF160D6C100077CB2B /* InjectedBundlePageMac.mm in Sources */,
+ 29210EE1144CDB2600835BB5 /* JSAccessibilityUIElement.cpp in Sources */,
+ BC8FD8D2120E545B00F3E71A /* JSEventSendingController.cpp in Sources */,
+ BC14E4EA120E03D800826C0C /* JSGCController.cpp in Sources */,
+ BC952F1F11F3C652003398B4 /* JSTestRunner.cpp in Sources */,
+ 5641E2D014335E95008307E5 /* JSTextInputController.cpp in Sources */,
+ BC952C0D11F3B965003398B4 /* JSWrapper.cpp in Sources */,
+ BCC9981811D3F51E0017BCA2 /* TestRunner.cpp in Sources */,
+ 5C45C30F17398E290079714E /* WebArchiveDumpSupportMac.mm in Sources */,
+ 5C45C31317398E480079714E /* WebArchiveDumpSupport.cpp in Sources */,
+ C0CE720B1247C93300BC0EC4 /* TestRunnerMac.mm in Sources */,
+ 5664A49A14326384008881BE /* TextInputController.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Tools/WebKitTestRunner/WebNotificationProvider.cpp b/Tools/WebKitTestRunner/WebNotificationProvider.cpp
index be32cb9a9..14c95308f 100644
--- a/Tools/WebKitTestRunner/WebNotificationProvider.cpp
+++ b/Tools/WebKitTestRunner/WebNotificationProvider.cpp
@@ -63,6 +63,11 @@ WebNotificationProvider::WebNotificationProvider()
{
}
+WebNotificationProvider::~WebNotificationProvider()
+{
+ WKNotificationManagerSetProvider(m_notificationManager.get(), 0);
+}
+
WKNotificationProvider WebNotificationProvider::provider()
{
WKNotificationProvider notificationProvider = {
diff --git a/Tools/WebKitTestRunner/WebNotificationProvider.h b/Tools/WebKitTestRunner/WebNotificationProvider.h
index 63c559cfc..b25082923 100644
--- a/Tools/WebKitTestRunner/WebNotificationProvider.h
+++ b/Tools/WebKitTestRunner/WebNotificationProvider.h
@@ -36,6 +36,7 @@ namespace WTR {
class WebNotificationProvider {
public:
WebNotificationProvider();
+ ~WebNotificationProvider();
WKNotificationProvider provider();
void showWebNotification(WKPageRef, WKNotificationRef);
diff --git a/Tools/WebKitTestRunner/WorkQueueManager.cpp b/Tools/WebKitTestRunner/WorkQueueManager.cpp
index 84792303f..e74fa3464 100644
--- a/Tools/WebKitTestRunner/WorkQueueManager.cpp
+++ b/Tools/WebKitTestRunner/WorkQueueManager.cpp
@@ -30,6 +30,7 @@
#include "TestController.h"
#include <WebKit2/WKPage.h>
#include <WebKit2/WKRetainPtr.h>
+#include <stdio.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/text/CString.h>
diff --git a/Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.cpp b/Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.cpp
new file mode 100644
index 000000000..742cb869f
--- /dev/null
+++ b/Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.cpp
@@ -0,0 +1,212 @@
+/*
+ * Copyright (C) 2007, 2008, 2009, 2010 Apple 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 AND ITS 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 APPLE OR ITS 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.
+ */
+
+#include "config.h"
+#include "WebArchiveDumpSupport.h"
+
+#include <CFNetwork/CFNetwork.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <wtf/RetainPtr.h>
+
+extern "C" {
+
+CFURLRef CFURLResponseGetURL(CFURLResponseRef);
+CFStringRef CFURLResponseGetMIMEType(CFURLResponseRef);
+CFStringRef CFURLResponseGetTextEncodingName(CFURLResponseRef);
+SInt64 CFURLResponseGetExpectedContentLength(CFURLResponseRef);
+CFHTTPMessageRef CFURLResponseGetHTTPResponse(CFURLResponseRef);
+
+CFTypeID CFURLResponseGetTypeID(void);
+
+}
+
+static void convertMIMEType(CFMutableStringRef mimeType)
+{
+ // Workaround for <rdar://problem/6234318> with Dashcode 2.0
+ if (CFStringCompare(mimeType, CFSTR("application/x-javascript"), kCFCompareAnchored | kCFCompareCaseInsensitive) == kCFCompareEqualTo)
+ CFStringReplaceAll(mimeType, CFSTR("text/javascript"));
+}
+
+static void convertWebResourceDataToString(CFMutableDictionaryRef resource)
+{
+ CFMutableStringRef mimeType = (CFMutableStringRef)CFDictionaryGetValue(resource, CFSTR("WebResourceMIMEType"));
+ CFStringLowercase(mimeType, CFLocaleGetSystem());
+ convertMIMEType(mimeType);
+
+ CFArrayRef supportedMIMETypes = supportedNonImageMIMETypes();
+ if (CFStringHasPrefix(mimeType, CFSTR("text/")) || CFArrayContainsValue(supportedMIMETypes, CFRangeMake(0, CFArrayGetCount(supportedMIMETypes)), mimeType)) {
+ CFStringRef textEncodingName = static_cast<CFStringRef>(CFDictionaryGetValue(resource, CFSTR("WebResourceTextEncodingName")));
+ CFStringEncoding stringEncoding;
+ if (textEncodingName && CFStringGetLength(textEncodingName))
+ stringEncoding = CFStringConvertIANACharSetNameToEncoding(textEncodingName);
+ else
+ stringEncoding = kCFStringEncodingUTF8;
+
+ CFDataRef data = static_cast<CFDataRef>(CFDictionaryGetValue(resource, CFSTR("WebResourceData")));
+ RetainPtr<CFStringRef> dataAsString = adoptCF(CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, data, stringEncoding));
+ if (dataAsString)
+ CFDictionarySetValue(resource, CFSTR("WebResourceData"), dataAsString.get());
+ }
+}
+
+static void normalizeHTTPResponseHeaderFields(CFMutableDictionaryRef fields)
+{
+ // Normalize headers
+ if (CFDictionaryContainsKey(fields, CFSTR("Date")))
+ CFDictionarySetValue(fields, CFSTR("Date"), CFSTR("Sun, 16 Nov 2008 17:00:00 GMT"));
+ if (CFDictionaryContainsKey(fields, CFSTR("Last-Modified")))
+ CFDictionarySetValue(fields, CFSTR("Last-Modified"), CFSTR("Sun, 16 Nov 2008 16:55:00 GMT"));
+ if (CFDictionaryContainsKey(fields, CFSTR("Etag")))
+ CFDictionarySetValue(fields, CFSTR("Etag"), CFSTR("\"301925-21-45c7d72d3e780\""));
+ if (CFDictionaryContainsKey(fields, CFSTR("Server")))
+ CFDictionarySetValue(fields, CFSTR("Server"), CFSTR("Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.7l PHP/5.2.6"));
+
+ // Remove headers
+ CFDictionaryRemoveValue(fields, CFSTR("Connection"));
+ CFDictionaryRemoveValue(fields, CFSTR("Keep-Alive"));
+}
+
+static void normalizeWebResourceURL(CFMutableStringRef webResourceURL)
+{
+ static CFIndex fileUrlLength = CFStringGetLength(CFSTR("file://"));
+ CFRange layoutTestsWebArchivePathRange = CFStringFind(webResourceURL, CFSTR("/LayoutTests/"), kCFCompareBackwards);
+ if (layoutTestsWebArchivePathRange.location == kCFNotFound)
+ return;
+ CFRange currentWorkingDirectoryRange = CFRangeMake(fileUrlLength, layoutTestsWebArchivePathRange.location - fileUrlLength);
+ CFStringReplace(webResourceURL, currentWorkingDirectoryRange, CFSTR(""));
+}
+
+static void convertWebResourceResponseToDictionary(CFMutableDictionaryRef propertyList)
+{
+ CFDataRef responseData = static_cast<CFDataRef>(CFDictionaryGetValue(propertyList, CFSTR("WebResourceResponse"))); // WebResourceResponseKey in WebResource.m
+ if (CFGetTypeID(responseData) != CFDataGetTypeID())
+ return;
+
+ RetainPtr<CFURLResponseRef> response = adoptCF(createCFURLResponseFromResponseData(responseData));
+ if (!response)
+ return;
+
+ RetainPtr<CFMutableDictionaryRef> responseDictionary = adoptCF(CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks));
+
+ RetainPtr<CFMutableStringRef> urlString = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLGetString(CFURLResponseGetURL(response.get()))));
+ normalizeWebResourceURL(urlString.get());
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("URL"), urlString.get());
+
+ RetainPtr<CFMutableStringRef> mimeTypeString = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, CFURLResponseGetMIMEType(response.get())));
+ convertMIMEType(mimeTypeString.get());
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("MIMEType"), mimeTypeString.get());
+
+ CFStringRef textEncodingName = CFURLResponseGetTextEncodingName(response.get());
+ if (textEncodingName)
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("textEncodingName"), textEncodingName);
+
+ SInt64 expectedContentLength = CFURLResponseGetExpectedContentLength(response.get());
+ RetainPtr<CFNumberRef> expectedContentLengthNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, &expectedContentLength));
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("expectedContentLength"), expectedContentLengthNumber.get());
+
+ if (CFHTTPMessageRef httpMessage = CFURLResponseGetHTTPResponse(response.get())) {
+ RetainPtr<CFDictionaryRef> allHeaders = adoptCF(CFHTTPMessageCopyAllHeaderFields(httpMessage));
+ RetainPtr<CFMutableDictionaryRef> allHeaderFields = adoptCF(CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, allHeaders.get()));
+ normalizeHTTPResponseHeaderFields(allHeaderFields.get());
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("allHeaderFields"), allHeaderFields.get());
+
+ CFIndex statusCode = CFHTTPMessageGetResponseStatusCode(httpMessage);
+ RetainPtr<CFNumberRef> statusCodeNumber = adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberCFIndexType, &statusCode));
+ CFDictionarySetValue(responseDictionary.get(), CFSTR("statusCode"), statusCodeNumber.get());
+ }
+
+ CFDictionarySetValue(propertyList, CFSTR("WebResourceResponse"), responseDictionary.get());
+}
+
+static CFComparisonResult compareResourceURLs(const void *val1, const void *val2, void *context)
+{
+ CFStringRef url1 = static_cast<CFStringRef>(CFDictionaryGetValue(static_cast<CFDictionaryRef>(val1), CFSTR("WebResourceURL")));
+ CFStringRef url2 = static_cast<CFStringRef>(CFDictionaryGetValue(static_cast<CFDictionaryRef>(val2), CFSTR("WebResourceURL")));
+
+ return CFStringCompare(url1, url2, kCFCompareAnchored);
+}
+
+CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData)
+{
+ CFErrorRef error = 0;
+ CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0;
+ RetainPtr<CFMutableDictionaryRef> propertyList = adoptCF((CFMutableDictionaryRef)CFPropertyListCreateWithData(kCFAllocatorDefault, webArchiveData, kCFPropertyListMutableContainersAndLeaves, &format, &error));
+
+ if (!propertyList) {
+ if (error)
+ return CFErrorCopyDescription(error);
+ return static_cast<CFStringRef>(CFRetain(CFSTR("An unknown error occurred converting data to property list.")));
+ }
+
+ RetainPtr<CFMutableArrayRef> resources = adoptCF(CFArrayCreateMutable(kCFAllocatorDefault, 0, &kCFTypeArrayCallBacks));
+ CFArrayAppendValue(resources.get(), propertyList.get());
+
+ while (CFArrayGetCount(resources.get())) {
+ RetainPtr<CFMutableDictionaryRef> resourcePropertyList = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(resources.get(), 0);
+ CFArrayRemoveValueAtIndex(resources.get(), 0);
+
+ CFMutableDictionaryRef mainResource = (CFMutableDictionaryRef)CFDictionaryGetValue(resourcePropertyList.get(), CFSTR("WebMainResource"));
+ normalizeWebResourceURL((CFMutableStringRef)CFDictionaryGetValue(mainResource, CFSTR("WebResourceURL")));
+ convertWebResourceDataToString(mainResource);
+
+ // Add subframeArchives to list for processing
+ CFMutableArrayRef subframeArchives = (CFMutableArrayRef)CFDictionaryGetValue(resourcePropertyList.get(), CFSTR("WebSubframeArchives")); // WebSubframeArchivesKey in WebArchive.m
+ if (subframeArchives)
+ CFArrayAppendArray(resources.get(), subframeArchives, CFRangeMake(0, CFArrayGetCount(subframeArchives)));
+
+ CFMutableArrayRef subresources = (CFMutableArrayRef)CFDictionaryGetValue(resourcePropertyList.get(), CFSTR("WebSubresources")); // WebSubresourcesKey in WebArchive.m
+ if (!subresources)
+ continue;
+
+ CFIndex subresourcesCount = CFArrayGetCount(subresources);
+ for (CFIndex i = 0; i < subresourcesCount; ++i) {
+ CFMutableDictionaryRef subresourcePropertyList = (CFMutableDictionaryRef)CFArrayGetValueAtIndex(subresources, i);
+ normalizeWebResourceURL((CFMutableStringRef)CFDictionaryGetValue(subresourcePropertyList, CFSTR("WebResourceURL")));
+ convertWebResourceResponseToDictionary(subresourcePropertyList);
+ convertWebResourceDataToString(subresourcePropertyList);
+ }
+
+ // Sort the subresources so they're always in a predictable order for the dump
+ CFArraySortValues(subresources, CFRangeMake(0, CFArrayGetCount(subresources)), compareResourceURLs, 0);
+ }
+
+ error = 0;
+
+ RetainPtr<CFDataRef> xmlData = adoptCF(CFPropertyListCreateData(kCFAllocatorDefault, propertyList.get(), kCFPropertyListXMLFormat_v1_0, 0, &error));
+
+ if (!xmlData) {
+ if (error)
+ return CFErrorCopyDescription(error);
+ return static_cast<CFStringRef>(CFRetain(CFSTR("An unknown error occurred converting property list to data.")));
+ }
+
+ RetainPtr<CFStringRef> xmlString = adoptCF(CFStringCreateFromExternalRepresentation(kCFAllocatorDefault, xmlData.get(), kCFStringEncodingUTF8));
+ RetainPtr<CFMutableStringRef> string = adoptCF(CFStringCreateMutableCopy(kCFAllocatorDefault, 0, xmlString.get()));
+
+ // Replace "Apple Computer" with "Apple" in the DTD declaration.
+ CFStringFindAndReplace(string.get(), CFSTR("-//Apple Computer//"), CFSTR("-//Apple//"), CFRangeMake(0, CFStringGetLength(string.get())), 0);
+
+ return string.leakRef();
+}
diff --git a/Tools/DumpRenderTree/wx/GCControllerWx.cpp b/Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.h
index bddf62ffb..00c58184e 100644
--- a/Tools/DumpRenderTree/wx/GCControllerWx.cpp
+++ b/Tools/WebKitTestRunner/cf/WebArchiveDumpSupport.h
@@ -1,18 +1,15 @@
/*
- * Copyright (C) 2008 Kevin Ollivier <kevino@theolliviers.com>
+ * Copyright (C) 2007, 2008, 2009, 2010 Apple 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.
+ * 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -26,18 +23,19 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "config.h"
-#include "GCController.h"
+#ifndef WebArchiveDumpSupport_h
+#define WebArchiveDumpSupport_h
-void GCController::collect() const
-{
-}
+#include <CoreFoundation/CoreFoundation.h>
-void GCController::collectOnAlternateThread(bool waitUntilDone) const
-{
-}
+typedef struct _CFURLResponse* CFURLResponseRef;
-size_t GCController::getJSObjectCount() const
-{
- return 0;
-}
+CFStringRef createXMLStringFromWebArchiveData(CFDataRef webArchiveData);
+
+// MARK: -
+// MARK: Platform-specific methods
+
+CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData);
+CFArrayRef supportedNonImageMIMETypes();
+
+#endif /* WebArchiveDumpSupport_h */
diff --git a/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
index 5b68dac5c..4e60aeb3f 100644
--- a/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
+++ b/Tools/WebKitTestRunner/cg/TestInvocationCG.cpp
@@ -52,14 +52,14 @@ enum FlipGraphicsContextOrNot {
static CGContextRef createCGContextFromImage(WKImageRef wkImage, FlipGraphicsContextOrNot flip = DontFlipGraphicsContext)
{
- RetainPtr<CGImageRef> image(AdoptCF, WKImageCreateCGImage(wkImage));
+ RetainPtr<CGImageRef> image = adoptCF(WKImageCreateCGImage(wkImage));
size_t pixelsWide = CGImageGetWidth(image.get());
size_t pixelsHigh = CGImageGetHeight(image.get());
size_t rowBytes = (4 * pixelsWide + 63) & ~63;
// Creating this bitmap in the device color space should prevent any color conversion when the image of the web view is drawn into it.
- RetainPtr<CGColorSpaceRef> colorSpace(AdoptCF, CGColorSpaceCreateDeviceRGB());
+ RetainPtr<CGColorSpaceRef> colorSpace = adoptCF(CGColorSpaceCreateDeviceRGB());
CGContextRef context = CGBitmapContextCreate(0, pixelsWide, pixelsHigh, 8, rowBytes, colorSpace.get(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
if (flip == FlipGraphicsContext) {
@@ -113,9 +113,9 @@ void computeMD5HashStringForContext(CGContextRef bitmapContext, char hashString[
static void dumpBitmap(CGContextRef bitmapContext, const char* checksum)
{
- RetainPtr<CGImageRef> image(AdoptCF, CGBitmapContextCreateImage(bitmapContext));
- RetainPtr<CFMutableDataRef> imageData(AdoptCF, CFDataCreateMutable(0, 0));
- RetainPtr<CGImageDestinationRef> imageDest(AdoptCF, CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
+ RetainPtr<CGImageRef> image = adoptCF(CGBitmapContextCreateImage(bitmapContext));
+ RetainPtr<CFMutableDataRef> imageData = adoptCF(CFDataCreateMutable(0, 0));
+ RetainPtr<CGImageDestinationRef> imageDest = adoptCF(CGImageDestinationCreateWithData(imageData.get(), kUTTypePNG, 1, 0));
CGImageDestinationAddImage(imageDest.get(), image.get(), 0);
CGImageDestinationFinalize(imageDest.get());
@@ -165,9 +165,9 @@ void TestInvocation::dumpPixelsAndCompareWithExpected(WKImageRef image, WKArrayR
RetainPtr<CGContextRef> context;
if (windowSnapshot)
- context.adoptCF(createCGContextFromImage(windowSnapshot.get(), FlipGraphicsContext));
+ context = adoptCF(createCGContextFromImage(windowSnapshot.get(), DontFlipGraphicsContext));
else
- context.adoptCF(createCGContextFromImage(image));
+ context = adoptCF(createCGContextFromImage(image));
// A non-null repaintRects array means we're doing a repaint test.
if (repaintRects)
diff --git a/Tools/WebKitTestRunner/config.h b/Tools/WebKitTestRunner/config.h
index c912693b2..d5cd2f97d 100644
--- a/Tools/WebKitTestRunner/config.h
+++ b/Tools/WebKitTestRunner/config.h
@@ -31,9 +31,7 @@
#include <wtf/Platform.h>
#include <wtf/ExportMacros.h>
-#if USE(JSC)
#include <runtime/JSExportMacros.h>
-#endif
#include <WebKit2/WebKit2_C.h>
diff --git a/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp b/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp
index f2829a96c..424974d7e 100644
--- a/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp
+++ b/Tools/WebKitTestRunner/efl/EventSenderProxyEfl.cpp
@@ -314,14 +314,16 @@ void EventSenderProxy::updateClickCountForButton(int button)
void EventSenderProxy::dispatchEvent(const WTREvent& event)
{
+ Evas* evas = evas_object_evas_get(m_testController->mainWebView()->platformView());
+
if (event.eventType == WTREventTypeMouseDown)
- dispatchMouseDownEvent(ecore_evas_get(m_testController->mainWebView()->platformWindow()), event.button, event.modifiers, m_clickCount);
+ dispatchMouseDownEvent(evas, event.button, event.modifiers, m_clickCount);
else if (event.eventType == WTREventTypeMouseUp)
- dispatchMouseUpEvent(ecore_evas_get(m_testController->mainWebView()->platformWindow()), event.button, event.modifiers);
+ dispatchMouseUpEvent(evas, event.button, event.modifiers);
else if (event.eventType == WTREventTypeMouseMove)
- dispatchMouseMoveEvent(ecore_evas_get(m_testController->mainWebView()->platformWindow()), static_cast<int>(m_position.x), static_cast<int>(m_position.y));
+ dispatchMouseMoveEvent(evas, static_cast<int>(m_position.x), static_cast<int>(m_position.y));
else if (event.eventType == WTREventTypeMouseScrollBy)
- dispatchMouseScrollByEvent(ecore_evas_get(m_testController->mainWebView()->platformWindow()), event.horizontal, event.vertical);
+ dispatchMouseScrollByEvent(evas, event.horizontal, event.vertical);
}
void EventSenderProxy::replaySavedEvents()
@@ -412,7 +414,7 @@ void EventSenderProxy::keyDown(WKStringRef keyRef, WKEventModifiers wkModifiers,
if ((strlen(keyName) == 1) && (keyName[0] >= 'A' && keyName[0] <= 'Z'))
wkModifiers |= kWKEventModifiersShiftKey;
- Evas* evas = ecore_evas_get(m_testController->mainWebView()->platformWindow());
+ Evas* evas = evas_object_evas_get(m_testController->mainWebView()->platformView());
int eventIndex = 0;
// Mimic the emacs ctrl-o binding by inserting a paragraph
@@ -490,12 +492,14 @@ void EventSenderProxy::updateTouchPoint(int index, int x, int y)
void EventSenderProxy::setTouchModifier(WKEventModifiers modifier, bool enable)
{
+ Evas_Object* ewkView = m_testController->mainWebView()->platformView();
+
for (unsigned index = 0; index < (sizeof(modifierNames) / sizeof(char*)); ++index) {
if (modifier & (1 << index)) {
if (enable)
- evas_key_modifier_on(evas_object_evas_get(m_testController->mainWebView()->platformView()), modifierNames[index]);
+ evas_key_modifier_on(evas_object_evas_get(ewkView), modifierNames[index]);
else
- evas_key_modifier_off(evas_object_evas_get(m_testController->mainWebView()->platformView()), modifierNames[index]);
+ evas_key_modifier_off(evas_object_evas_get(ewkView), modifierNames[index]);
}
}
}
diff --git a/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp b/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
index c7501a998..eac153c77 100644
--- a/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
+++ b/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "ewk_view_private.h"
#include "PlatformWebView.h"
#include "EWebKit2.h"
@@ -26,6 +27,7 @@
#include <Ecore_Evas.h>
#include <WebCore/RefPtrCairo.h>
#include <WebKit2/WKImageCairo.h>
+#include <WebKit2/WKViewEfl.h>
#include <cairo.h>
using namespace WebKit;
@@ -52,21 +54,22 @@ static Ecore_Evas* initEcoreEvas()
return ecoreEvas;
}
-PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKPageRef /* relatedPage */, WKDictionaryRef options)
+ : m_options(options)
{
WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout"));
m_usingFixedLayout = options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false;
m_window = initEcoreEvas();
- Evas* evas = ecore_evas_get(m_window);
- if (m_usingFixedLayout) {
- m_view = toImpl(WKViewCreateWithFixedLayout(evas, context, pageGroup));
- evas_object_resize(m_view, 800, 600);
- } else
- m_view = toImpl(WKViewCreate(evas, context, pageGroup));
+ m_view = EWKViewCreate(context, pageGroup, ecore_evas_get(m_window), /* smart */ 0);
- ewk_view_theme_set(m_view, THEME_DIR"/default.edj");
+ WKPageSetUseFixedLayout(WKViewGetPage(EWKViewGetWKView(m_view)), m_usingFixedLayout);
+
+ if (m_usingFixedLayout)
+ resizeTo(800, 600);
+
+ ewk_view_theme_set(m_view, TEST_THEME_DIR "/default.edj");
m_windowIsKey = false;
evas_object_show(m_view);
}
@@ -74,6 +77,7 @@ PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup,
PlatformWebView::~PlatformWebView()
{
evas_object_del(m_view);
+
ecore_evas_free(m_window);
}
@@ -84,7 +88,7 @@ void PlatformWebView::resizeTo(unsigned width, unsigned height)
WKPageRef PlatformWebView::page()
{
- return WKViewGetPage(toAPI(m_view));
+ return WKViewGetPage(EWKViewGetWKView(m_view));
}
void PlatformWebView::focus()
@@ -101,16 +105,14 @@ WKRect PlatformWebView::windowFrame()
{
int x, y, width, height;
- Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
- ecore_evas_request_geometry_get(ee, &x, &y, &width, &height);
+ ecore_evas_request_geometry_get(m_window, &x, &y, &width, &height);
return WKRectMake(x, y, width, height);
}
void PlatformWebView::setWindowFrame(WKRect frame)
{
- Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
- ecore_evas_move_resize(ee, frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
+ ecore_evas_move_resize(m_window, frame.origin.x, frame.origin.y, frame.size.width, frame.size.height);
}
void PlatformWebView::addChromeInputField()
@@ -127,15 +129,12 @@ void PlatformWebView::makeWebViewFirstResponder()
WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
{
- Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
- ASSERT(ee);
-
int width;
int height;
- ecore_evas_geometry_get(ee, 0, 0, &width, &height);
+ ecore_evas_geometry_get(m_window, 0, 0, &width, &height);
ASSERT(width > 0 && height > 0);
- return adoptWK(WKViewGetSnapshot(toAPI(m_view)));
+ return adoptWK(WKViewCreateSnapshot(EWKViewGetWKView(m_view)));
}
bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const
@@ -145,5 +144,9 @@ bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const
return m_usingFixedLayout == (options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false);
}
+void PlatformWebView::didInitializeClients()
+{
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp b/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp
index 6f514ff2e..c69b3c99d 100644
--- a/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp
+++ b/Tools/WebKitTestRunner/efl/TestControllerEfl.cpp
@@ -65,10 +65,9 @@ void TestController::platformRunUntil(bool& condition, double timeout)
{
if (timeout == m_noTimeout) {
// Never timeout if we are debugging or not meant to timeout.
- while (!condition) {
+ while (!condition)
ecore_main_loop_iterate();
- sleep(1);
- }
+
return;
}
timer = ecore_timer_loop_add(timeout, timerFired, 0);
diff --git a/Tools/WebKitTestRunner/efl/main.cpp b/Tools/WebKitTestRunner/efl/main.cpp
index b02ff357d..6b50669bc 100644
--- a/Tools/WebKitTestRunner/efl/main.cpp
+++ b/Tools/WebKitTestRunner/efl/main.cpp
@@ -45,8 +45,12 @@ int main(int argc, char** argv)
if (!ewk_init())
return 1;
- // Prefer the not installed web and plugin processes.
- WTR::TestController controller(argc, const_cast<const char**>(argv));
+ {
+ // Test controller has own ptr containing WebView and WebView must be deleted
+ // before its evas object is deleted. Call of ewk_shutdown() leads to evas objects deletion.
+
+ WTR::TestController controller(argc, const_cast<const char**>(argv));
+ }
ewk_shutdown();
diff --git a/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp b/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
index cdbaec5b2..8d08e402a 100644
--- a/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
+++ b/Tools/WebKitTestRunner/gtk/EventSenderProxyGtk.cpp
@@ -155,12 +155,11 @@ static void dispatchEvent(GdkEvent* event)
void EventSenderProxy::replaySavedEvents()
{
while (!m_eventQueue.isEmpty()) {
- WTREventQueueItem item = m_eventQueue.first();
+ WTREventQueueItem item = m_eventQueue.takeFirst();
if (item.delay)
g_usleep(item.delay * 1000);
dispatchEvent(item.event);
- m_eventQueue.remove(0);
}
}
@@ -378,6 +377,10 @@ void EventSenderProxy::mouseMoveTo(double x, double y)
void EventSenderProxy::mouseScrollBy(int horizontal, int vertical)
{
+ // Copy behaviour of Qt and EFL - just return in case of (0,0) mouse scroll
+ if (!horizontal && !vertical)
+ return;
+
GdkEvent* event = gdk_event_new(GDK_SCROLL);
event->scroll.x = m_position.x;
event->scroll.y = m_position.y;
@@ -387,7 +390,6 @@ void EventSenderProxy::mouseScrollBy(int horizontal, int vertical)
gdk_event_set_device(event, gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gdk_window_get_display(event->scroll.window))));
// For more than one tick in a scroll, we need smooth scroll event
-#if GTK_CHECK_VERSION(3, 3, 18)
if ((horizontal && vertical) || horizontal > 1 || horizontal < -1 || vertical > 1 || vertical < -1) {
event->scroll.direction = GDK_SCROLL_SMOOTH;
event->scroll.delta_x = -horizontal;
@@ -396,7 +398,6 @@ void EventSenderProxy::mouseScrollBy(int horizontal, int vertical)
sendOrQueueEvent(event);
return;
}
-#endif
if (horizontal < 0)
event->scroll.direction = GDK_SCROLL_RIGHT;
@@ -417,7 +418,6 @@ void EventSenderProxy::continuousMouseScrollBy(int horizontal, int vertical, boo
// Gtk+ does not support paged scroll events.
g_return_if_fail(!paged);
-#if GTK_CHECK_VERSION(3, 3, 18)
GdkEvent* event = gdk_event_new(GDK_SCROLL);
event->scroll.x = m_position.x;
event->scroll.y = m_position.y;
@@ -431,7 +431,6 @@ void EventSenderProxy::continuousMouseScrollBy(int horizontal, int vertical, boo
event->scroll.delta_y = -vertical / pixelsPerScrollTick;
sendOrQueueEvent(event);
-#endif
}
void EventSenderProxy::leapForward(int milliseconds)
diff --git a/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp b/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp
index bbef04ead..fd6f8466b 100644
--- a/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp
+++ b/Tools/WebKitTestRunner/gtk/PlatformWebViewGtk.cpp
@@ -33,10 +33,11 @@
namespace WTR {
-PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef /*options*/)
+PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKPageRef /* relatedPage */, WKDictionaryRef options)
: m_view(WKViewCreate(context, pageGroup))
, m_window(gtk_window_new(GTK_WINDOW_POPUP))
, m_windowIsKey(true)
+ , m_options(options)
{
gtk_container_add(GTK_CONTAINER(m_window), GTK_WIDGET(m_view));
@@ -56,7 +57,7 @@ PlatformWebView::~PlatformWebView()
void PlatformWebView::resizeTo(unsigned width, unsigned height)
{
- GtkAllocation size = { 0, 0, width, height };
+ GtkAllocation size = { 0, 0, static_cast<int>(width), static_cast<int>(height) };
gtk_widget_size_allocate(m_window, &size);
gtk_window_resize(GTK_WINDOW(m_window), width, height);
@@ -120,5 +121,9 @@ WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
return 0;
}
+void PlatformWebView::didInitializeClients()
+{
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
index ece5b523e..f3d848ead 100644
--- a/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
+++ b/Tools/WebKitTestRunner/mac/EventSenderProxy.mm
@@ -31,6 +31,7 @@
#import "StringFunctions.h"
#import "TestController.h"
#import <wtf/RetainPtr.h>
+#import <Carbon/Carbon.h>
#import <WebKit2/WKString.h>
namespace WTR {
@@ -49,6 +50,13 @@ enum MouseButton {
NoMouseButton = -1
};
+struct KeyMappingEntry {
+ int macKeyCode;
+ int macNumpadKeyCode;
+ unichar character;
+ NSString* characterName;
+};
+
static NSEventType eventTypeForMouseButtonAndAction(int button, MouseAction action)
{
switch (button) {
@@ -98,6 +106,11 @@ static int buildModifierFlags(WKEventModifiers modifiers)
return flags;
}
+static NSTimeInterval absoluteTimeForEventTime(double currentEventTime)
+{
+ return GetCurrentEventTime() + currentEventTime;
+}
+
EventSenderProxy::EventSenderProxy(TestController* testController)
: m_testController(testController)
, m_time(0)
@@ -137,7 +150,7 @@ void EventSenderProxy::mouseDown(unsigned buttonNumber, WKEventModifiers modifie
NSEvent *event = [NSEvent mouseEventWithType:eventType
location:NSMakePoint(m_position.x, m_position.y)
modifierFlags:buildModifierFlags(modifiers)
- timestamp:currentEventTime()
+ timestamp:absoluteTimeForEventTime(currentEventTime())
windowNumber:[m_testController->mainWebView()->platformWindow() windowNumber]
context:[NSGraphicsContext currentContext]
eventNumber:++eventNumber
@@ -158,7 +171,7 @@ void EventSenderProxy::mouseUp(unsigned buttonNumber, WKEventModifiers modifiers
NSEvent *event = [NSEvent mouseEventWithType:eventType
location:NSMakePoint(m_position.x, m_position.y)
modifierFlags:buildModifierFlags(modifiers)
- timestamp:currentEventTime()
+ timestamp:absoluteTimeForEventTime(currentEventTime())
windowNumber:[m_testController->mainWebView()->platformWindow() windowNumber]
context:[NSGraphicsContext currentContext]
eventNumber:++eventNumber
@@ -171,7 +184,7 @@ void EventSenderProxy::mouseUp(unsigned buttonNumber, WKEventModifiers modifiers
[targetView mouseUp:event];
if (buttonNumber == LeftMouseButton)
m_leftMouseButtonDown = false;
- m_clickTime = [event timestamp];
+ m_clickTime = currentEventTime();
m_clickPosition = m_position;
}
@@ -184,7 +197,7 @@ void EventSenderProxy::mouseMoveTo(double x, double y)
NSEvent *event = [NSEvent mouseEventWithType:(m_leftMouseButtonDown ? NSLeftMouseDragged : NSMouseMoved)
location:position
modifierFlags:0
- timestamp:currentEventTime()
+ timestamp:absoluteTimeForEventTime(currentEventTime())
windowNumber:[[view window] windowNumber]
context:[NSGraphicsContext currentContext]
eventNumber:++eventNumber
@@ -324,14 +337,6 @@ void EventSenderProxy::keyDown(WKStringRef key, WKEventModifiers modifiers, unsi
keyCode = 0x4C;
else if ([character isEqualToString:@"\x8"])
keyCode = 0x33;
- else if ([character isEqualToString:@"7"])
- keyCode = 0x1A;
- else if ([character isEqualToString:@"5"])
- keyCode = 0x17;
- else if ([character isEqualToString:@"9"])
- keyCode = 0x19;
- else if ([character isEqualToString:@"0"])
- keyCode = 0x1D;
else if ([character isEqualToString:@"a"])
keyCode = 0x00;
else if ([character isEqualToString:@"b"])
@@ -341,6 +346,38 @@ void EventSenderProxy::keyDown(WKStringRef key, WKEventModifiers modifiers, unsi
else if ([character isEqualToString:@"e"])
keyCode = 0x0E;
+ KeyMappingEntry table[] = {
+ {0x2F, 0x41, '.', nil},
+ {0, 0x43, '*', nil},
+ {0, 0x45, '+', nil},
+ {0, 0x47, NSClearLineFunctionKey, @"clear"},
+ {0x2C, 0x4B, '/', nil},
+ {0, 0x4C, 3, @"enter" },
+ {0x1B, 0x4E, '-', nil},
+ {0x18, 0x51, '=', nil},
+ {0x1D, 0x52, '0', nil},
+ {0x12, 0x53, '1', nil},
+ {0x13, 0x54, '2', nil},
+ {0x14, 0x55, '3', nil},
+ {0x15, 0x56, '4', nil},
+ {0x17, 0x57, '5', nil},
+ {0x16, 0x58, '6', nil},
+ {0x1A, 0x59, '7', nil},
+ {0x1C, 0x5B, '8', nil},
+ {0x19, 0x5C, '9', nil},
+ };
+ for (unsigned i = 0; i < WTF_ARRAY_LENGTH(table); ++i) {
+ NSString* currentCharacterString = [NSString stringWithCharacters:&table[i].character length:1];
+ if ([character isEqualToString:currentCharacterString] || [character isEqualToString:table[i].characterName]) {
+ if (keyLocation == 0x03 /*DOM_KEY_LOCATION_NUMPAD*/)
+ keyCode = table[i].macNumpadKeyCode;
+ else
+ keyCode = table[i].macKeyCode;
+ eventCharacter = currentCharacterString;
+ break;
+ }
+ }
+
NSString *charactersIgnoringModifiers = eventCharacter;
int modifierFlags = 0;
@@ -360,7 +397,7 @@ void EventSenderProxy::keyDown(WKStringRef key, WKEventModifiers modifiers, unsi
NSEvent *event = [NSEvent keyEventWithType:NSKeyDown
location:NSMakePoint(5, 5)
modifierFlags:modifierFlags
- timestamp:currentEventTime()
+ timestamp:absoluteTimeForEventTime(currentEventTime())
windowNumber:[m_testController->mainWebView()->platformWindow() windowNumber]
context:[NSGraphicsContext currentContext]
characters:eventCharacter
@@ -373,7 +410,7 @@ void EventSenderProxy::keyDown(WKStringRef key, WKEventModifiers modifiers, unsi
event = [NSEvent keyEventWithType:NSKeyUp
location:NSMakePoint(5, 5)
modifierFlags:modifierFlags
- timestamp:currentEventTime()
+ timestamp:absoluteTimeForEventTime(currentEventTime())
windowNumber:[m_testController->mainWebView()->platformWindow() windowNumber]
context:[NSGraphicsContext currentContext]
characters:eventCharacter
@@ -386,7 +423,7 @@ void EventSenderProxy::keyDown(WKStringRef key, WKEventModifiers modifiers, unsi
void EventSenderProxy::mouseScrollBy(int x, int y)
{
- RetainPtr<CGEventRef> cgScrollEvent(AdoptCF, CGEventCreateScrollWheelEvent(0, kCGScrollEventUnitLine, 2, y, x));
+ RetainPtr<CGEventRef> cgScrollEvent = adoptCF(CGEventCreateScrollWheelEvent(0, kCGScrollEventUnitLine, 2, y, x));
// CGEvent locations are in global display coordinates.
CGPoint lastGlobalMousePosition = CGPointMake(m_position.x, [[NSScreen mainScreen] frame].size.height - m_position.y);
diff --git a/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm b/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
index 4c7b15f58..60b887201 100644
--- a/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
+++ b/Tools/WebKitTestRunner/mac/PlatformWebViewMac.mm
@@ -42,7 +42,7 @@
BOOL _useTiledDrawing;
}
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup useTiledDrawing:(BOOL)useTiledDrawing;
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing;
@property (nonatomic, assign) BOOL useTiledDrawing;
@end
@@ -51,10 +51,10 @@
@synthesize useTiledDrawing = _useTiledDrawing;
-- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup useTiledDrawing:(BOOL)useTiledDrawing
+- (id)initWithFrame:(NSRect)frame contextRef:(WKContextRef)context pageGroupRef:(WKPageGroupRef)pageGroup relatedToPage:(WKPageRef)relatedPage useTiledDrawing:(BOOL)useTiledDrawing
{
_useTiledDrawing = useTiledDrawing;
- return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup];
+ return [super initWithFrame:frame contextRef:context pageGroupRef:pageGroup relatedToPage:relatedPage];
}
- (BOOL)_shouldUseTiledDrawingArea
@@ -101,30 +101,50 @@
return NSMakeRect(_fakeOrigin.x, _fakeOrigin.y, currentFrame.size.width, currentFrame.size.height);
}
+- (CGFloat)backingScaleFactor
+{
+ return 1;
+}
+
+@end
+
+@interface NSWindow (Details)
+
+- (void)_setWindowResolution:(CGFloat)resolution displayIfChanged:(BOOL)displayIfChanged;
+
@end
namespace WTR {
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef relatedPage, WKDictionaryRef options)
: m_windowIsKey(true)
+ , m_options(options)
{
WKRetainPtr<WKStringRef> useTiledDrawingKey(AdoptWK, WKStringCreateWithUTF8CString("TiledDrawing"));
- bool useTiledDrawing = options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useTiledDrawingKey.get()))) : false;
+ WKTypeRef useTiledDrawingValue = options ? WKDictionaryGetItemForKey(options, useTiledDrawingKey.get()) : NULL;
+ bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
- NSRect rect = NSMakeRect(0, 0, 800, 600);
- m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef useTiledDrawing:useTiledDrawing];
+ NSRect rect = NSMakeRect(0, 0, TestController::viewWidth, TestController::viewHeight);
+ m_view = [[TestRunnerWKView alloc] initWithFrame:rect contextRef:contextRef pageGroupRef:pageGroupRef relatedToPage:relatedPage useTiledDrawing:useTiledDrawing];
+ [m_view setWindowOcclusionDetectionEnabled:NO];
NSRect windowRect = NSOffsetRect(rect, -10000, [(NSScreen *)[[NSScreen screens] objectAtIndex:0] frame].size.height - rect.size.height + 10000);
m_window = [[WebKitTestRunnerWindow alloc] initWithContentRect:windowRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
m_window.platformWebView = this;
[m_window setColorSpace:[[NSScreen mainScreen] colorSpace]];
+ [m_window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
[[m_window contentView] addSubview:m_view];
[m_window orderBack:nil];
[m_window setReleasedWhenClosed:NO];
+ [m_window _setWindowResolution:1 displayIfChanged:YES];
}
void PlatformWebView::resizeTo(unsigned width, unsigned height)
{
+ NSRect windowFrame = [m_window frame];
+ windowFrame.size.width = width;
+ windowFrame.size.height = height;
+ [m_window setFrame:windowFrame display:YES];
[m_view setFrame:NSMakeRect(0, 0, width, height)];
}
@@ -164,6 +184,14 @@ void PlatformWebView::setWindowFrame(WKRect frame)
[m_window setFrame:NSMakeRect(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height) display:YES];
}
+void PlatformWebView::didInitializeClients()
+{
+ // Set a temporary 1x1 window frame to force a WindowAndViewFramesChanged notification. <rdar://problem/13380145>
+ WKRect wkFrame = windowFrame();
+ [m_window setFrame:NSMakeRect(0, 0, 1, 1) display:YES];
+ setWindowFrame(wkFrame);
+}
+
void PlatformWebView::addChromeInputField()
{
NSTextField* textField = [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 100, 20)];
@@ -192,7 +220,7 @@ void PlatformWebView::makeWebViewFirstResponder()
WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
{
[m_view display];
- RetainPtr<CGImageRef> windowSnapshotImage(AdoptCF, CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque));
+ RetainPtr<CGImageRef> windowSnapshotImage = adoptCF(CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, [m_window windowNumber], kCGWindowImageBoundsIgnoreFraming | kCGWindowImageShouldBeOpaque));
// windowSnapshotImage will be in GenericRGB, as we've set the main display's color space to GenericRGB.
return adoptWK(WKImageCreateFromCGImage(windowSnapshotImage.get(), 0));
@@ -201,7 +229,8 @@ WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const
{
WKRetainPtr<WKStringRef> useTiledDrawingKey(AdoptWK, WKStringCreateWithUTF8CString("TiledDrawing"));
- bool useTiledDrawing = WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useTiledDrawingKey.get())));
+ WKTypeRef useTiledDrawingValue = WKDictionaryGetItemForKey(options, useTiledDrawingKey.get());
+ bool useTiledDrawing = useTiledDrawingValue && WKBooleanGetValue(static_cast<WKBooleanRef>(useTiledDrawingValue));
return useTiledDrawing == [(TestRunnerWKView *)m_view useTiledDrawing];
}
diff --git a/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm b/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm
new file mode 100644
index 000000000..e06e79750
--- /dev/null
+++ b/Tools/WebKitTestRunner/mac/WebArchiveDumpSupportMac.mm
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2010 Apple 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 AND ITS 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 APPLE OR ITS 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 "config.h"
+#import "WebArchiveDumpSupport.h"
+
+#import <CFNetwork/CFHTTPMessage.h>
+#import <Foundation/Foundation.h>
+#import <WebKit/WebHTMLRepresentation.h>
+#import <wtf/RetainPtr.h>
+
+extern "C" {
+
+enum CFURLCacheStoragePolicy {
+ kCFURLCacheStorageAllowed = 0,
+ kCFURLCacheStorageAllowedInMemoryOnly = 1,
+ kCFURLCacheStorageNotAllowed = 2
+};
+typedef enum CFURLCacheStoragePolicy CFURLCacheStoragePolicy;
+
+extern const CFStringRef kCFHTTPVersion1_1;
+
+CFURLResponseRef CFURLResponseCreate(CFAllocatorRef alloc, CFURLRef URL, CFStringRef mimeType, SInt64 expectedContentLength, CFStringRef textEncodingName, CFURLCacheStoragePolicy recommendedPolicy);
+CFURLResponseRef CFURLResponseCreateWithHTTPResponse(CFAllocatorRef alloc, CFURLRef URL, CFHTTPMessageRef httpResponse, CFURLCacheStoragePolicy recommendedPolicy);
+void CFURLResponseSetExpectedContentLength(CFURLResponseRef response, SInt64 length);
+void CFURLResponseSetMIMEType(CFURLResponseRef response, CFStringRef mimeType);
+
+}
+
+CFURLResponseRef createCFURLResponseFromResponseData(CFDataRef responseData)
+{
+ // Decode NSURLResponse
+ RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)responseData]);
+ NSURLResponse *response = [unarchiver.get() decodeObjectForKey:@"WebResourceResponse"]; // WebResourceResponseKey in WebResource.m
+ [unarchiver.get() finishDecoding];
+
+ if (![response isKindOfClass:[NSHTTPURLResponse class]])
+ return CFURLResponseCreate(kCFAllocatorDefault, (CFURLRef)[response URL], (CFStringRef)[response MIMEType], [response expectedContentLength], (CFStringRef)[response textEncodingName], kCFURLCacheStorageAllowed);
+
+ NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
+
+ // NSURLResponse is not toll-free bridged to CFURLResponse.
+ RetainPtr<CFHTTPMessageRef> httpMessage = adoptCF(CFHTTPMessageCreateResponse(kCFAllocatorDefault, [httpResponse statusCode], 0, kCFHTTPVersion1_1));
+
+ NSDictionary *headerFields = [httpResponse allHeaderFields];
+ for (NSString *headerField in [headerFields keyEnumerator])
+ CFHTTPMessageSetHeaderFieldValue(httpMessage.get(), (CFStringRef)headerField, (CFStringRef)[headerFields objectForKey:headerField]);
+
+ return CFURLResponseCreateWithHTTPResponse(kCFAllocatorDefault, (CFURLRef)[response URL], httpMessage.get(), kCFURLCacheStorageAllowed);
+}
+
+CFArrayRef supportedNonImageMIMETypes()
+{
+ return (CFArrayRef)[WebHTMLRepresentation supportedNonImageMIMETypes];
+}
diff --git a/Tools/WebKitTestRunner/mac/main.mm b/Tools/WebKitTestRunner/mac/main.mm
index b5c34f769..8637cfb38 100644
--- a/Tools/WebKitTestRunner/mac/main.mm
+++ b/Tools/WebKitTestRunner/mac/main.mm
@@ -32,6 +32,10 @@ int main(int argc, const char* argv[])
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
[[NSUserDefaults standardUserDefaults] setVolatileDomain:[NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:@"WebKitKerningAndLigaturesEnabledByDefault"] forName:NSArgumentDomain];
+
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebAutomaticQuoteSubstitutionEnabled"];
+ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebAutomaticDashSubstitutionEnabled"];
+
{
WTR::TestController controller(argc, argv);
}
diff --git a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
index 0c32c73b3..f1c7b3c92 100644
--- a/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
+++ b/Tools/WebKitTestRunner/qt/PlatformWebViewQt.cpp
@@ -47,7 +47,10 @@ public:
: QQuickView(QUrl("data:text/plain,import QtQuick 2.0\nItem { objectName: 'root' }"))
, m_view(view)
{
- connect(this, SIGNAL(statusChanged(QQuickView::Status)), SLOT(handleStatusChanged(QQuickView::Status)));
+ if (status() == QQuickView::Ready)
+ handleStatusChanged(QQuickView::Ready);
+ else
+ connect(this, SIGNAL(statusChanged(QQuickView::Status)), SLOT(handleStatusChanged(QQuickView::Status)));
}
private Q_SLOTS:
@@ -65,6 +68,11 @@ private Q_SLOTS:
if (PlatformWebView::windowShapshotEnabled()) {
setSurfaceType(OpenGLSurface);
create();
+#if QT_VERSION < QT_VERSION_CHECK(5, 1, 0)
+ QQuickWindowPrivate::get(this)->setRenderWithoutShowing(true);
+#else
+ m_view->experimental()->setRenderToOffscreenBuffer(true);
+#endif
} else
m_view->experimental()->setRenderToOffscreenBuffer(true);
@@ -76,8 +84,9 @@ private:
QQuickWebView* m_view;
};
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef options)
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef /* relatedPage */, WKDictionaryRef options)
: m_windowIsKey(true)
+ , m_options(options)
, m_modalEventLoop(0)
{
WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout"));
@@ -119,6 +128,7 @@ WKPageRef PlatformWebView::page()
void PlatformWebView::focus()
{
+ QWindowSystemInterface::handleWindowActivated(m_window);
m_view->setFocus(true);
}
@@ -183,6 +193,10 @@ bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const
return m_usingFixedLayout == (options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false);
}
+void PlatformWebView::didInitializeClients()
+{
+}
+
} // namespace WTR
#include "PlatformWebViewQt.moc"
diff --git a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
index 99d5d0e2b..aac846f8d 100644
--- a/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
+++ b/Tools/WebKitTestRunner/qt/TestInvocationQt.cpp
@@ -35,7 +35,6 @@
#include <WebKit2/WKImageQt.h>
#include <stdio.h>
#include <wtf/Assertions.h>
-#include <wtf/UnusedParam.h>
namespace WTR {
diff --git a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
index 91a03d2a3..cab77a3b2 100644
--- a/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
+++ b/Tools/WebKitTestRunner/win/PlatformWebViewWin.cpp
@@ -48,7 +48,7 @@ static void registerWindowClass()
RegisterClassExW(&wndClass);
}
-PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKDictionaryRef /*options*/)
+PlatformWebView::PlatformWebView(WKContextRef contextRef, WKPageGroupRef pageGroupRef, WKPageRef /* relatedPage */, WKDictionaryRef /*options*/)
: m_windowIsKey(true)
{
registerWindowClass();
@@ -118,4 +118,8 @@ WKRetainPtr<WKImageRef> PlatformWebView::windowSnapshotImage()
return 0;
}
+void PlatformWebView::didInitializeClients()
+{
+}
+
} // namespace WTR
diff --git a/Tools/WebKitTestRunner/win/TestControllerWin.cpp b/Tools/WebKitTestRunner/win/TestControllerWin.cpp
index 8f2eaaf48..6e80f5695 100644
--- a/Tools/WebKitTestRunner/win/TestControllerWin.cpp
+++ b/Tools/WebKitTestRunner/win/TestControllerWin.cpp
@@ -135,11 +135,11 @@ void TestController::initializeInjectedBundlePath()
void TestController::initializeTestPluginDirectory()
{
- RetainPtr<CFURLRef> bundleURL(AdoptCF, CFBundleCopyExecutableURL(CFBundleGetMainBundle()));
- RetainPtr<CFURLRef> bundleDirectoryURL(AdoptCF, CFURLCreateCopyDeletingLastPathComponent(0, bundleURL.get()));
- RetainPtr<CFStringRef> testPluginDirectoryNameString(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(testPluginDirectoryName), wcslen(testPluginDirectoryName)));
- RetainPtr<CFURLRef> testPluginDirectoryURL(AdoptCF, CFURLCreateCopyAppendingPathComponent(0, bundleDirectoryURL.get(), testPluginDirectoryNameString.get(), true));
- RetainPtr<CFStringRef> testPluginDirectoryPath(AdoptCF, CFURLCopyFileSystemPath(testPluginDirectoryURL.get(), kCFURLWindowsPathStyle));
+ RetainPtr<CFURLRef> bundleURL = adoptCF(CFBundleCopyExecutableURL(CFBundleGetMainBundle()));
+ RetainPtr<CFURLRef> bundleDirectoryURL = adoptCF(CFURLCreateCopyDeletingLastPathComponent(0, bundleURL.get()));
+ RetainPtr<CFStringRef> testPluginDirectoryNameString = adoptCF(CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(testPluginDirectoryName), wcslen(testPluginDirectoryName)));
+ RetainPtr<CFURLRef> testPluginDirectoryURL = adoptCF(CFURLCreateCopyAppendingPathComponent(0, bundleDirectoryURL.get(), testPluginDirectoryNameString.get(), true));
+ RetainPtr<CFStringRef> testPluginDirectoryPath = adoptCF(CFURLCopyFileSystemPath(testPluginDirectoryURL.get(), kCFURLWindowsPathStyle));
m_testPluginDirectory.adopt(WKStringCreateWithCFString(testPluginDirectoryPath.get()));
}
diff --git a/Tools/WinCELauncher/CMakeLists.txt b/Tools/WinCELauncher/CMakeLists.txt
index 6cb260f9b..914bb2bdc 100644
--- a/Tools/WinCELauncher/CMakeLists.txt
+++ b/Tools/WinCELauncher/CMakeLists.txt
@@ -1,4 +1,4 @@
-SET(WinCELauncher_INCLUDE_DIRECTORIES
+set(WinCELauncher_INCLUDE_DIRECTORIES
"${WEBKIT_DIR}/wince"
"${WEBCORE_DIR}"
"${WEBCORE_DIR}/platform"
@@ -11,17 +11,17 @@ SET(WinCELauncher_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
)
-SET(WinCELauncher_SOURCES
+set(WinCELauncher_SOURCES
${TOOLS_DIR}/WinCELauncher/main.cpp
)
-SET(WinCELauncher_LIBRARIES
- ${WebKit_LIBRARY_NAME}
+set(WinCELauncher_LIBRARIES
+ WebKit
)
-INCLUDE_DIRECTORIES(${WinCELauncher_INCLUDE_DIRECTORIES})
-ADD_EXECUTABLE(WinCELauncher ${WinCELauncher_SOURCES})
-ADD_DEPENDENCIES(WinCELauncher ${WebKit_LIBRARY_NAME})
-TARGET_LINK_LIBRARIES(WinCELauncher ${WinCELauncher_LIBRARIES})
-SET_TARGET_PROPERTIES(WinCELauncher PROPERTIES FOLDER "Tools")
-SET_TARGET_PROPERTIES(WinCELauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
+include_directories(${WinCELauncher_INCLUDE_DIRECTORIES})
+add_executable(WinCELauncher WIN32 ${WinCELauncher_SOURCES})
+add_dependencies(WinCELauncher WebKit)
+target_link_libraries(WinCELauncher ${WinCELauncher_LIBRARIES})
+set_target_properties(WinCELauncher PROPERTIES FOLDER "Tools")
+set_target_properties(WinCELauncher PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
diff --git a/Tools/WinLauncher/AccessibilityDelegate.cpp b/Tools/WinLauncher/AccessibilityDelegate.cpp
new file mode 100644
index 000000000..46ce70f43
--- /dev/null
+++ b/Tools/WinLauncher/AccessibilityDelegate.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2013 Apple 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.
+ */
+
+#include "stdafx.h"
+#include "AccessibilityDelegate.h"
+
+#include <WebKit/WebKitCOMAPI.h>
+#include <commctrl.h>
+#include <commdlg.h>
+#include <objbase.h>
+#include <shlwapi.h>
+#include <stdio.h>
+#include <wininet.h>
+
+HRESULT AccessibilityDelegate::QueryInterface(REFIID riid, void** ppvObject)
+{
+ *ppvObject = 0;
+ if (IsEqualIID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IAccessibilityDelegate*>(this);
+ else if (IsEqualIID(riid, IID_IAccessibilityDelegate))
+ *ppvObject = static_cast<IAccessibilityDelegate*>(this);
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+
+ULONG AccessibilityDelegate::AddRef(void)
+{
+ return ++m_refCount;
+}
+
+ULONG AccessibilityDelegate::Release(void)
+{
+ ULONG newRef = --m_refCount;
+ if (!newRef)
+ delete this;
+
+ return newRef;
+}
+
+HRESULT AccessibilityDelegate::fireFrameLoadStartedEvents()
+{
+ return S_OK;
+}
+
+HRESULT AccessibilityDelegate::fireFrameLoadFinishedEvents()
+{
+ return S_OK;
+}
diff --git a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h b/Tools/WinLauncher/AccessibilityDelegate.h
index 2398be3ae..2dc77f213 100644
--- a/Tools/DumpRenderTree/chromium/WebThemeEngineDRTMac.h
+++ b/Tools/WinLauncher/AccessibilityDelegate.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Google Inc. All Rights Reserved.
+ * Copyright (C) 2013 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -20,40 +20,25 @@
* 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.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// This implements the WebThemeEngine API in such a way that we match the Mac
-// port rendering more than usual Chromium path, thus allowing us to share
-// more pixel baselines.
+#ifndef AccessibilityDelegate_h
+#define AccessibilityDelegate_h
-#ifndef WebThemeEngineDRTMac_h
-#define WebThemeEngineDRTMac_h
+#include <WebKit/WebKit.h>
-#include "third_party/WebKit/Source/WebKit/chromium/public/platform/mac/WebThemeEngine.h"
-
-class WebThemeEngineDRTMac : public WebKit::WebThemeEngine {
+class AccessibilityDelegate : public IAccessibilityDelegate {
public:
- virtual void paintScrollbarThumb(
- WebKit::WebCanvas*,
- WebKit::WebThemeEngine::State,
- WebKit::WebThemeEngine::Size,
- const WebKit::WebRect&,
- const WebKit::WebThemeEngine::ScrollbarInfo&);
+ AccessibilityDelegate() : m_refCount(1) { }
+ virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
+ virtual ULONG STDMETHODCALLTYPE AddRef(void);
+ virtual ULONG STDMETHODCALLTYPE Release(void);
+ virtual HRESULT STDMETHODCALLTYPE fireFrameLoadStartedEvents();
+ virtual HRESULT STDMETHODCALLTYPE fireFrameLoadFinishedEvents();
private:
- virtual void paintHIThemeScrollbarThumb(
- WebKit::WebCanvas*,
- WebKit::WebThemeEngine::State,
- WebKit::WebThemeEngine::Size,
- const WebKit::WebRect&,
- const WebKit::WebThemeEngine::ScrollbarInfo&);
- virtual void paintNSScrollerScrollbarThumb(
- WebKit::WebCanvas*,
- WebKit::WebThemeEngine::State,
- WebKit::WebThemeEngine::Size,
- const WebKit::WebRect&,
- const WebKit::WebThemeEngine::ScrollbarInfo&);
+ int m_refCount;
};
-#endif // WebThemeEngineDRTMac_h
+#endif
diff --git a/Tools/WinLauncher/WinLauncher.cpp b/Tools/WinLauncher/WinLauncher.cpp
index 405d1b209..22deca615 100644
--- a/Tools/WinLauncher/WinLauncher.cpp
+++ b/Tools/WinLauncher/WinLauncher.cpp
@@ -28,10 +28,17 @@
#include "stdafx.h"
#include "WinLauncher.h"
+#include "AccessibilityDelegate.h"
#include "DOMDefaultImpl.h"
#include "PrintWebUIDelegate.h"
#include <WebKit/WebKitCOMAPI.h>
+#include <wtf/Platform.h>
+#if USE(CF)
+#include <CoreFoundation/CFRunLoop.h>
+#endif
+
+#include <assert.h>
#include <commctrl.h>
#include <commdlg.h>
#include <objbase.h>
@@ -54,6 +61,7 @@ IWebViewPrivate* gWebViewPrivate = 0;
HWND gViewWindow = 0;
WinLauncherWebHost* gWebHost = 0;
PrintWebUIDelegate* gPrintDelegate = 0;
+AccessibilityDelegate* gAccessibilityDelegate = 0;
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
@@ -257,6 +265,10 @@ BOOL WINAPI DllMain(HINSTANCE dllInstance, DWORD reason, LPVOID)
return TRUE;
}
+#if USE(CF)
+extern "C" void _CFRunLoopSetWindowsMessageQueueMask(CFRunLoopRef, uint32_t, CFStringRef);
+#endif
+
extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HINSTANCE, LPTSTR, int nCmdShow)
{
#ifdef _CRTDBG_MAP_ALLOC
@@ -274,6 +286,7 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
InitCtrlEx.dwICC = 0x00004000; //ICC_STANDARD_CLASSES;
InitCommonControlsEx(&InitCtrlEx);
+ BSTR requestedURL = 0;
int argc = 0;
WCHAR** argv = CommandLineToArgvW(GetCommandLineW(), &argc);
for (int i = 1; i < argc; ++i) {
@@ -281,6 +294,8 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
s_usesLayeredWebView = true;
else if (!wcsicmp(argv[i], L"--desktop"))
s_fullDesktop = true;
+ else if (!requestedURL)
+ requestedURL = ::SysAllocString(argv[i]);
}
// Initialize global strings
@@ -340,6 +355,7 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
goto exit;
standardPreferences->setAcceleratedCompositingEnabled(TRUE);
+ standardPreferences->setAVFoundationEnabled(TRUE);
HRESULT hr = WebKitCreateInstance(CLSID_WebView, 0, IID_IWebView, reinterpret_cast<void**>(&gWebView));
if (FAILED(hr))
@@ -361,6 +377,12 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
if (FAILED (hr))
goto exit;
+ gAccessibilityDelegate = new AccessibilityDelegate;
+ gAccessibilityDelegate->AddRef();
+ hr = gWebView->setAccessibilityDelegate(gAccessibilityDelegate);
+ if (FAILED (hr))
+ goto exit;
+
hr = gWebView->setHostWindow(reinterpret_cast<OLE_HANDLE>(hMainWnd));
if (FAILED(hr))
goto exit;
@@ -369,14 +391,16 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
if (FAILED(hr))
goto exit;
- IWebFrame* frame;
- hr = gWebView->mainFrame(&frame);
- if (FAILED(hr))
- goto exit;
+ if (!requestedURL) {
+ IWebFrame* frame;
+ hr = gWebView->mainFrame(&frame);
+ if (FAILED(hr))
+ goto exit;
- static BSTR defaultHTML = SysAllocString(TEXT("<p style=\"background-color: #00FF00\">Testing</p><img id=\"webkit logo\" src=\"http://webkit.org/images/icon-gold.png\" alt=\"Face\"><div style=\"border: solid blue; background: white;\" contenteditable=\"true\">div with blue border</div><ul><li>foo<li>bar<li>baz</ul>"));
- frame->loadHTMLString(defaultHTML, 0);
- frame->Release();
+ static BSTR defaultHTML = SysAllocString(TEXT("<p style=\"background-color: #00FF00\">Testing</p><img id=\"webkit logo\" src=\"http://webkit.org/images/icon-gold.png\" alt=\"Face\"><div style=\"border: solid blue; background: white;\" contenteditable=\"true\">div with blue border</div><ul><li>foo<li>bar<li>baz</ul>"));
+ frame->loadHTMLString(defaultHTML, 0);
+ frame->Release();
+ }
hr = gWebViewPrivate->setTransparent(usesLayeredWebView());
if (FAILED(hr))
@@ -400,13 +424,24 @@ extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(HINSTANCE, HIN
hAccelTable = LoadAccelerators(hInst, MAKEINTRESOURCE(IDC_WINLAUNCHER));
+ if (requestedURL) {
+ loadURL(requestedURL);
+ ::SysFreeString(requestedURL);
+ requestedURL = 0;
+ }
+
// Main message loop:
+#if USE(CF)
+ _CFRunLoopSetWindowsMessageQueueMask(CFRunLoopGetMain(), QS_ALLINPUT | QS_ALLPOSTMESSAGE, kCFRunLoopDefaultMode);
+ CFRunLoopRun();
+#else
while (GetMessage(&msg, NULL, 0, 0)) {
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
+#endif
exit:
gPrintDelegate->Release();
diff --git a/Tools/WinLauncher/WinLauncher.vcproj b/Tools/WinLauncher/WinLauncher.vcproj
deleted file mode 100644
index 3556ac2d3..000000000
--- a/Tools/WinLauncher/WinLauncher.vcproj
+++ /dev/null
@@ -1,502 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncher"
- ProjectGUID="{114FCA11-216B-4C8C-957E-30A75AE80443}"
- RootNamespace="WinLauncher"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\WinLauncherDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\WinLauncherRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\WinLauncherDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\WinLauncherDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\WinLauncherProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="2"
- InheritedPropertySheets=".\WinLauncherReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\PrintWebUIDelegate.cpp"
- >
- </File>
- <File
- RelativePath=".\stdafx.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_Cairo_CFLite|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Debug_All|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Production|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release_Cairo_CFLite|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\WinLauncher.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\DOMDefaultImpl.h"
- >
- </File>
- <File
- RelativePath=".\PrintWebUIDelegate.h"
- >
- </File>
- <File
- RelativePath=".\Resource.h"
- >
- </File>
- <File
- RelativePath=".\stdafx.h"
- >
- </File>
- <File
- RelativePath=".\WinLauncher.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\small.ico"
- >
- </File>
- <File
- RelativePath=".\WinLauncher.ico"
- >
- </File>
- <File
- RelativePath=".\WinLauncher.rc"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.exe.manifest b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.exe.manifest
new file mode 100644
index 000000000..ca71e47f6
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.exe.manifest
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+ <assemblyIdentity
+ version="1.0.0.0"
+ processorArchitecture="X86"
+ name="apple.WebKit.WinLauncher.exe"
+ type="win32"
+ />
+ <description>WinLauncher Test Utility</description>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.Windows.Common-Controls"
+ version="6.0.0.0"
+ processorArchitecture="X86"
+ publicKeyToken="6595b64144ccf1df"
+ language="*"
+ />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity
+ type="win32"
+ name="Microsoft.VC80.CRT"
+ version="8.0.50727.6195"
+ processorArchitecture="x86"
+ publicKeyToken="1fc8b3b9a1e18e3b"
+ />
+ </dependentAssembly>
+ </dependency>
+
+ <!-- Set application to run with user privilege but no virtualization. -->
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges>
+ <requestedExecutionLevel
+ level="asInvoker"
+ uiAccess="false"
+ />
+ </requestedPrivileges>
+ </security>
+ </trustInfo>
+</assembly>
diff --git a/Tools/WinLauncher/WinLauncher.ico b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.ico
index d551aa3aa..d551aa3aa 100644
--- a/Tools/WinLauncher/WinLauncher.ico
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.ico
Binary files differ
diff --git a/Tools/WinLauncher/WinLauncherLauncher.rc b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.rc
index 4079a2b24..51360d512 100644
--- a/Tools/WinLauncher/WinLauncherLauncher.rc
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.rc
@@ -1,76 +1,76 @@
-// Microsoft Visual C++ generated resource script.
-//
-#include "WinLauncherLauncherResource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_WINLAUNCHER ICON "WinLauncher.ico"
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "WinLauncherLauncherResource.\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+// Microsoft Visual C++ generated resource script.
+//
+#include "WinLauncherResource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_WINLAUNCHER ICON "WinLauncher.ico"
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "WinLauncherResource.\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj
new file mode 100644
index 000000000..4d4f250e9
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{767B10FB-76C1-44D0-8005-85ED7F9AA5E4}</ProjectGuid>
+ <RootNamespace>WinLauncherLauncher</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="WinLauncherResource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\win\DLLLauncher\DLLLauncherMain.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WinLauncher.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="WinLauncher.ico" />
+ <None Include="WinLauncherPostBuild.cmd" />
+ <None Include="WinLauncherPreBuild.cmd" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters
new file mode 100644
index 000000000..dc24a83ac
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="WinLauncherResource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\win\DLLLauncher\DLLLauncherMain.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WinLauncher.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="WinLauncher.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="WinLauncherPostBuild.cmd" />
+ <None Include="WinLauncherPreBuild.cmd" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCF.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCF.props
new file mode 100644
index 000000000..081981bb7
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCF.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>CoreFoundation$(DebugSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props
new file mode 100644
index 000000000..cd3b5dd84
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCFLite.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>CFLite.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props
new file mode 100644
index 000000000..6ac3876e7
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherCommon.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemDefinitionGroup>
+ <Link>
+ <AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>$(OutDir)WinLauncher$(DebugSuffix).exe</OutputFile>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ </Link>
+ <ClCompile />
+ <ClCompile />
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props
new file mode 100644
index 000000000..9ab27449a
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherDebug.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="WinLauncherCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.rc b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc
index 172ed4aec..8a101ea2a 100644
--- a/Tools/WinLauncher/WinLauncher.rc
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.rc
@@ -1,6 +1,6 @@
// Microsoft Visual C++ generated resource script.
//
-#include "resource.h"
+#include "WinLauncherLibResource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@@ -89,7 +89,7 @@ END
1 TEXTINCLUDE
BEGIN
- "resource.h\0"
+ "WinLauncherLibResource.h\0"
END
2 TEXTINCLUDE
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj
new file mode 100644
index 000000000..3b7c891be
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj
@@ -0,0 +1,217 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{114FCA11-216B-4C8C-957E-30A75AE80443}</ProjectGuid>
+ <RootNamespace>WinLauncher</RootNamespace>
+ <Keyword>Win32Proj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibRelease.props" />
+ <Import Project="WinLauncherCF.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibRelease.props" />
+ <Import Project="WinLauncherCF.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibRelease.props" />
+ <Import Project="WinLauncherCFLite.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibRelease.props" />
+ <Import Project="WinLauncherCFLite.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibProduction.props" />
+ <Import Project="WinLauncherCF.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibProduction.props" />
+ <Import Project="WinLauncherCF.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibDebug.props" />
+ <Import Project="WinLauncherCF.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibDebug.props" />
+ <Import Project="WinLauncherCF.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibDebug.props" />
+ <Import Project="WinLauncherCFLite.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibDebug.props" />
+ <Import Project="WinLauncherCFLite.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibDebug.props" />
+ <Import Project="WinLauncherCF.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="WinLauncherLibDebug.props" />
+ <Import Project="WinLauncherCF.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="small.ico" />
+ <None Include="WinLauncher.ico" />
+ <None Include="WinLauncherLibPostBuild.cmd" />
+ <None Include="WinLauncherLibPreBuild.cmd" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\AccessibilityDelegate.cpp" />
+ <ClCompile Include="..\PrintWebUIDelegate.cpp" />
+ <ClCompile Include="..\stdafx.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Production|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">Create</PrecompiledHeader>
+ </ClCompile>
+ <ClCompile Include="..\WinLauncher.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\AccessibilityDelegate.h" />
+ <ClInclude Include="..\DOMDefaultImpl.h" />
+ <ClInclude Include="..\PrintWebUIDelegate.h" />
+ <ClInclude Include="..\stdafx.h" />
+ <ClInclude Include="..\WinLauncher.h" />
+ <ClInclude Include="WinLauncherLibResource.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WinLauncherLib.rc" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters
new file mode 100644
index 000000000..d2aaf4788
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLib.vcxproj.filters
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="small.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="WinLauncher.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="WinLauncherLibPostBuild.cmd" />
+ <None Include="WinLauncherLibPreBuild.cmd" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\PrintWebUIDelegate.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\WinLauncher.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\AccessibilityDelegate.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\DOMDefaultImpl.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\PrintWebUIDelegate.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\WinLauncher.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="WinLauncherLibResource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="..\AccessibilityDelegate.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="WinLauncherLib.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props
new file mode 100644
index 000000000..7bacfc67a
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibCommon.props
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <TargetName>WinLauncher</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <AdditionalIncludeDirectories>$(ProjectDir)\..;$(ConfigurationBuildDir)\include\WebKit;$(ConfigurationBuildDir)\Include\private;$(ConfigurationBuildDir)\Include;$(ConfigurationBuildDir)\Include\WebCore;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders;$(ConfigurationBuildDir)\Include\JavaScriptCore;$(ConfigurationBuildDir)\obj\WebKit\DerivedSources;$(WebKit_Libraries)\Include;$(WebKit_Libraries)\Include\private;$(WebKit_Libraries)\Include\WebCore;$(WebKit_Libraries)\Include\WebCore\ForwardingHeaders;$(WebKit_Libraries)\Include\JavaScriptCore;$(IntDir)Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>StdAfx.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <Link>
+ <AdditionalDependencies>comdlg32.lib;gdi32.lib;comctl32.lib;shlwapi.lib;user32.lib;ole32.lib;oleaut32.lib;WebKitGUID$(DebugSuffix).lib;WebKit$(DebugSuffix).lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ </ItemDefinitionGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props
new file mode 100644
index 000000000..e11bc1c16
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibDebug.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="WinLauncherLibCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd
new file mode 100644
index 000000000..26707cac6
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPostBuild.cmd
@@ -0,0 +1 @@
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WinLauncher/WinLauncherPreBuild.cmd b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd
index a77077674..a77077674 100644
--- a/Tools/WinLauncher/WinLauncherPreBuild.cmd
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibPreBuild.cmd
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props
new file mode 100644
index 000000000..9b26e6a27
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibProduction.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="WinLauncherLibCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props
new file mode 100644
index 000000000..f4f0019d2
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibRelease.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="WinLauncherLibCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h
new file mode 100644
index 000000000..c98fac7ea
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherLibResource.h
@@ -0,0 +1,28 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WinLauncher.rc
+//
+#define IDC_MYICON 2
+#define IDD_WINLAUNCHER_DIALOG 102
+#define IDS_APP_TITLE 103
+#define IDD_ABOUTBOX 103
+#define IDM_ABOUT 104
+#define IDM_EXIT 105
+#define IDM_PRINT 106
+#define IDI_WINLAUNCHER 107
+#define IDI_SMALL 108
+#define IDC_WINLAUNCHER 109
+#define IDR_MAINFRAME 128
+#define IDC_STATIC -1
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 129
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 110
+#endif
+#endif
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd
new file mode 100644
index 000000000..26707cac6
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPostBuild.cmd
@@ -0,0 +1 @@
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" del "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd
new file mode 100644
index 000000000..a77077674
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherPreBuild.cmd
@@ -0,0 +1,6 @@
+%SystemDrive%\cygwin\bin\which.exe bash
+if errorlevel 1 set PATH=%SystemDrive%\cygwin\bin;%PATH%
+cmd /c
+if exist "%CONFIGURATIONBUILDDIR%\buildfailed" grep XX%PROJECTNAME%XX "%CONFIGURATIONBUILDDIR%\buildfailed"
+if errorlevel 1 exit 1
+echo XX%PROJECTNAME%XX > "%CONFIGURATIONBUILDDIR%\buildfailed"
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props
new file mode 100644
index 000000000..0dbbf1345
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherProduction.props
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="WinLauncherCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props
new file mode 100644
index 000000000..45251b824
--- /dev/null
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherRelease.props
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="WinLauncherCommon.props" />
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/WinLauncher/WinLauncherLauncherResource.h b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherResource.h
index 961fb17f6..c73f20f2d 100644
--- a/Tools/WinLauncher/WinLauncherLauncherResource.h
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/WinLauncherResource.h
@@ -1,20 +1,20 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by WinLauncherLauncher.rc
-//
-#define IDD_WINLAUNCHER_DIALOG 102
-#define IDI_WINLAUNCHER 107
-#define IDR_MAINFRAME 128
-#define IDC_STATIC -1
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NO_MFC 1
-#define _APS_NEXT_RESOURCE_VALUE 129
-#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 1000
-#define _APS_NEXT_SYMED_VALUE 110
-#endif
-#endif
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by WinLauncherLauncher.rc
+//
+#define IDD_WINLAUNCHER_DIALOG 102
+#define IDI_WINLAUNCHER 107
+#define IDR_MAINFRAME 128
+#define IDC_STATIC -1
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 129
+#define _APS_NEXT_COMMAND_VALUE 32771
+#define _APS_NEXT_CONTROL_VALUE 1000
+#define _APS_NEXT_SYMED_VALUE 110
+#endif
+#endif
diff --git a/Tools/WinLauncher/small.ico b/Tools/WinLauncher/WinLauncher.vcxproj/small.ico
index d551aa3aa..d551aa3aa 100644
--- a/Tools/WinLauncher/small.ico
+++ b/Tools/WinLauncher/WinLauncher.vcxproj/small.ico
Binary files differ
diff --git a/Tools/WinLauncher/WinLauncherCommon.vsprops b/Tools/WinLauncher/WinLauncherCommon.vsprops
deleted file mode 100644
index b200718e2..000000000
--- a/Tools/WinLauncher/WinLauncherCommon.vsprops
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherCommon"
- >
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(ConfigurationBuildDir)\include\WebKit&quot;;&quot;$(ConfigurationBuildDir)\Include&quot;;&quot;$(WebKitLibrariesDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore&quot;;&quot;$(ConfigurationBuildDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(WebKitLibrariesDir)\Include\WebCore\ForwardingHeaders&quot;;&quot;$(ConfigurationBuildDir)\Include\JavaScriptCore&quot;;&quot;$(WebKitLibrariesDir)\Include\JavaScriptCore&quot;;&quot;$(ProjectDir)\..&quot;;&quot;$(ProjectDir)&quot;;&quot;$(IntDir)\Include&quot;;&quot;$(ConfigurationBuildDir)\obj\WebKit\DerivedSources&quot;"
- UsePrecompiledHeader="2"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="comdlg32.lib gdi32.lib comctl32.lib shlwapi.lib user32.lib ole32.lib oleaut32.lib WebKitGUID$(WebKitConfigSuffix).lib WebKit$(WebKitDLLConfigSuffix).lib"
- OutputFile="$(OutDir)\$(ProjectName)$(WebKitConfigSuffix).dll"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherDebug.vsprops b/Tools/WinLauncher/WinLauncherDebug.vsprops
deleted file mode 100644
index c7c3bdc0e..000000000
--- a/Tools/WinLauncher/WinLauncherDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WinLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherDebugAll.vsprops b/Tools/WinLauncher/WinLauncherDebugAll.vsprops
deleted file mode 100644
index 23370e3c8..000000000
--- a/Tools/WinLauncher/WinLauncherDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\WinLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops b/Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops
deleted file mode 100644
index fc88801c5..000000000
--- a/Tools/WinLauncher/WinLauncherDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\WinLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncher.vcproj b/Tools/WinLauncher/WinLauncherLauncher.vcproj
deleted file mode 100644
index 5ab073171..000000000
--- a/Tools/WinLauncher/WinLauncherLauncher.vcproj
+++ /dev/null
@@ -1,420 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncher"
- ProjectGUID="{767B10FB-76C1-44D0-8005-85ED7F9AA5E4}"
- RootNamespace="WinLauncherLauncher"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WinLauncherLauncherDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WinLauncherLauncherRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WinLauncherLauncherDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WinLauncherLauncherDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WinLauncherLauncherProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\WinLauncherLauncherReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\win\DLLLauncher\DLLLauncherMain.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- <File
- RelativePath=".\WinLauncher.ico"
- >
- </File>
- <File
- RelativePath=".\WinLauncherLauncher.rc"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\WinLauncherLauncherResource.h"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/WinLauncher/WinLauncherLauncherCommon.vsprops b/Tools/WinLauncher/WinLauncherLauncherCommon.vsprops
deleted file mode 100644
index bbaf0fbc8..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherCommon.vsprops
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncherCommon"
- >
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="shlwapi.lib"
- OutputFile="$(OutDir)\WinLauncher$(WebKitConfigSuffix).exe"
- ProgramDatabaseFile="$(TargetDir)$(TargetName)Launcher.pdb"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncherDebug.vsprops b/Tools/WinLauncher/WinLauncherLauncherDebug.vsprops
deleted file mode 100644
index 046d7f280..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncherDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WinLauncherLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncherDebugAll.vsprops b/Tools/WinLauncher/WinLauncherLauncherDebugAll.vsprops
deleted file mode 100644
index e5a36d319..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncherDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\WinLauncherLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncherDebugCairoCFLite.vsprops b/Tools/WinLauncher/WinLauncherLauncherDebugCairoCFLite.vsprops
deleted file mode 100644
index 43636d809..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\WinLauncherLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncherProduction.vsprops b/Tools/WinLauncher/WinLauncherLauncherProduction.vsprops
deleted file mode 100644
index 639f9d509..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncherProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\WinLauncherLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncherRelease.vsprops b/Tools/WinLauncher/WinLauncherLauncherRelease.vsprops
deleted file mode 100644
index 652191791..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncherRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WinLauncherLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherLauncherReleaseCairoCFLite.vsprops b/Tools/WinLauncher/WinLauncherLauncherReleaseCairoCFLite.vsprops
deleted file mode 100644
index 63297c790..000000000
--- a/Tools/WinLauncher/WinLauncherLauncherReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherLauncherReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WinLauncherLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherProduction.vsprops b/Tools/WinLauncher/WinLauncherProduction.vsprops
deleted file mode 100644
index aff64e817..000000000
--- a/Tools/WinLauncher/WinLauncherProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\WinLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherRelease.vsprops b/Tools/WinLauncher/WinLauncherRelease.vsprops
deleted file mode 100644
index c70f85c86..000000000
--- a/Tools/WinLauncher/WinLauncherRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\WinLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops b/Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops
deleted file mode 100644
index c973eb4dd..000000000
--- a/Tools/WinLauncher/WinLauncherReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="WinLauncherReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\WinLauncherCommon.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/WinLauncher/stdafx.h b/Tools/WinLauncher/stdafx.h
index 86f76ccf2..b38e221db 100644
--- a/Tools/WinLauncher/stdafx.h
+++ b/Tools/WinLauncher/stdafx.h
@@ -32,12 +32,12 @@
// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
-#ifndef WINVER // Allow use of features specific to Windows XP or later.
-#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#ifndef WINVER // Allow use of features specific to Windows XP SP2 or later.
+#define WINVER 0x0502 // Change this to the appropriate value to target other versions of Windows.
#endif
-#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
-#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP SP2 or later.
+#define _WIN32_WINNT 0x0502 // Change this to the appropriate value to target other versions of Windows.
#endif
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
diff --git a/Tools/clang/ReportMemoryUsagePlugin/CMakeLists.txt b/Tools/clang/ReportMemoryUsagePlugin/CMakeLists.txt
index 53225f790..1cc4783d0 100644
--- a/Tools/clang/ReportMemoryUsagePlugin/CMakeLists.txt
+++ b/Tools/clang/ReportMemoryUsagePlugin/CMakeLists.txt
@@ -1,6 +1,6 @@
set(MODULE TRUE)
-set( LLVM_LINK_COMPONENTS support mc)
+set(LLVM_LINK_COMPONENTS support mc)
add_clang_library(ReportMemoryUsage ReportMemoryUsage.cpp)
diff --git a/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp b/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp
index f5d45f545..f30994765 100644
--- a/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp
+++ b/Tools/clang/ReportMemoryUsagePlugin/ReportMemoryUsage.cpp
@@ -39,31 +39,16 @@ using namespace clang;
namespace {
-typedef std::vector<std::string> Strings;
+using namespace std;
+typedef vector<string> Strings;
Strings instrumentationMethods;
-const std::string instrimentingMethodName("reportMemoryUsage");
+const char instrumentingMethodName[] = "reportMemoryUsage";
class AddMemberCallVisitor : public RecursiveASTVisitor<AddMemberCallVisitor> {
public:
- bool VisitCallExpr(CallExpr* callExpr)
- {
- CXXMemberCallExpr* methodCallExpr = dyn_cast<CXXMemberCallExpr>(callExpr);
- bool instrumented = false;
- if (methodCallExpr) {
- std::string methodName = methodCallExpr->getMethodDecl()->getNameAsString();
- Strings::iterator i = find(instrumentationMethods.begin(), instrumentationMethods.end(), methodName);
- instrumented = i != instrumentationMethods.end();
- }
- if (instrumented || !methodCallExpr) {
- for (CallExpr::arg_iterator i = callExpr->arg_begin(); i != callExpr->arg_end(); ++i) {
- if (MemberExpr* memberExpr = dyn_cast<MemberExpr>(*i))
- m_instrumentedMembers.push_back(memberExpr->getMemberNameInfo().getAsString());
- }
- }
- return true;
- }
+ bool VisitCallExpr(CallExpr*);
const Strings& instrumentedMembers() const { return m_instrumentedMembers; }
private:
@@ -76,75 +61,13 @@ public:
: m_instance(instance)
, m_context(context) { }
- bool VisitCXXMethodDecl(clang::CXXMethodDecl* decl)
- {
- if (decl->doesThisDeclarationHaveABody() && decl->getNameAsString() == instrimentingMethodName) {
- FullSourceLoc fullLocation = m_context->getFullLoc(decl->getLocStart());
- if (fullLocation.isValid()) {
- AddMemberCallVisitor visitor;
- visitor.TraverseStmt(decl->getBody());
- CheckMembersCoverage(decl->getParent(), visitor.instrumentedMembers(), decl->getLocStart());
- }
- }
- return true;
- }
+ bool VisitCXXMethodDecl(clang::CXXMethodDecl*);
private:
- void emitWarning(SourceLocation loc, const char* rawError)
- {
- FullSourceLoc full(loc, m_instance.getSourceManager());
- std::string err("[webkit-style] ");
- err += rawError;
- DiagnosticsEngine& diagnostic = m_instance.getDiagnostics();
- DiagnosticsEngine::Level level = diagnostic.getWarningsAsErrors() ? DiagnosticsEngine::Error : DiagnosticsEngine::Warning;
- unsigned id = diagnostic.getCustomDiagID(level, err);
- DiagnosticBuilder builder = diagnostic.Report(full, id);
- }
-
- CXXMethodDecl* findInstrumentationMethod(CXXRecordDecl* record)
- {
- for (CXXRecordDecl::method_iterator m = record->method_begin(); m != record->method_end(); ++m) {
- if (m->getNameInfo().getAsString() == instrimentingMethodName)
- return *m;
- }
- return 0;
- }
-
- bool needsToBeInstrumented(const Type* type)
- {
- if (type->isBuiltinType())
- return false;
- if (type->isEnumeralType())
- return false;
- if (type->isClassType()) {
- const RecordType* recordType = dyn_cast<RecordType>(type);
- if (recordType) {
- CXXRecordDecl* decl = dyn_cast<CXXRecordDecl>(recordType->getDecl());
- if (decl->getNameAsString() == "String")
- return true;
- if (!decl || !findInstrumentationMethod(decl))
- return false;
- }
- }
- if (type->isArrayType()) {
- const ArrayType* arrayType = dyn_cast<const ArrayType>(type);
- return needsToBeInstrumented(arrayType->getElementType().getTypePtr());
- }
- return true;
- }
-
- void CheckMembersCoverage(const CXXRecordDecl* instrumentedClass, const Strings& instrumentedMembers, SourceLocation location)
- {
- for (CXXRecordDecl::field_iterator i = instrumentedClass->field_begin(); i != instrumentedClass->field_end(); ++i) {
- std::string fieldName = i->getNameAsString();
- if (find(instrumentedMembers.begin(), instrumentedMembers.end(), fieldName) == instrumentedMembers.end()) {
- if (!needsToBeInstrumented(i->getType().getTypePtr()))
- continue;
- emitWarning(i->getSourceRange().getBegin(), "class member needs to be instrumented in reportMemoryUsage function");
- emitWarning(location, "located here");
- }
- }
- }
+ void emitWarning(SourceLocation, const char* rawError);
+ CXXMethodDecl* findInstrumentationMethod(CXXRecordDecl*);
+ bool needsToBeInstrumented(const Type*);
+ void checkMembersCoverage(const CXXRecordDecl* instrumentedClass, const Strings& instrumentedMembers, SourceLocation);
CompilerInstance& m_instance;
ASTContext* m_context;
@@ -156,18 +79,9 @@ public:
: m_visitor(instance, context)
{
instrumentationMethods.push_back("addMember");
- instrumentationMethods.push_back("addInstrumentedMember");
- instrumentationMethods.push_back("addVector");
- instrumentationMethods.push_back("addVectorPtr");
- instrumentationMethods.push_back("addInstrumentedVector");
- instrumentationMethods.push_back("addInstrumentedVectorPtr");
- instrumentationMethods.push_back("addHashSet");
- instrumentationMethods.push_back("addInstrumentedHashSet");
- instrumentationMethods.push_back("addHashMap");
- instrumentationMethods.push_back("addInstrumentedHashMap");
- instrumentationMethods.push_back("addListHashSet");
instrumentationMethods.push_back("addRawBuffer");
- instrumentationMethods.push_back("addString");
+ instrumentationMethods.push_back("addWeakPointer");
+ instrumentationMethods.push_back("ignoreMember");
}
virtual void HandleTranslationUnit(clang::ASTContext& context)
@@ -186,7 +100,7 @@ protected:
return new ReportMemoryUsageConsumer(CI, &CI.getASTContext());
}
- bool ParseArgs(const CompilerInstance& CI, const std::vector<std::string>& args)
+ bool ParseArgs(const CompilerInstance& CI, const vector<string>& args)
{
if (args.size() && args[0] == "help")
llvm::errs() << m_helpText;
@@ -200,22 +114,118 @@ const char* ReportMemoryUsageAction::m_helpText =
"This plugin is checking native memory instrumentation code.\n"
"The class is instrumented if it has reportMemoryUsage member function.\n"
"Sample:\n"
- "class InstrumentedClass {\n"
+ "class InstrumentedClass : public BaseInstrumentedClass {\n"
"public:\n"
" void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const\n"
" {\n"
- " MemoryClassInfo<InstrumentedClass> info(memoryObjectInfo, this, MemoryInstrumentation::DOM);\n"
- " info.addMember(m_notInstrumentedPtr);\n"
- " info.addInstrumentedMember(m_instrumentedObject);\n"
+ " MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);\n"
+ " BaseInstrumentedClass::reportMemoryUsage(memoryObjectInfo);\n"
+ " info.addMember(m_notInstrumentedObject);\n"
+ " info.addMember(m_instrumentedObject);\n"
+ " info.addRawBuffer(m_pointer, m_length);\n"
+ " info.ignoreMember(m_pointerToInternalField);\n"
" }\n"
"\n"
"private:\n"
" NotInstrumentedClass* m_notInstrumentedPtr;\n"
" InstrumentedClass m_instrumentedObject;\n"
+ " long m_length;\n"
+ " double* m_pointer;\n"
+ " Data* m_pointerToInternalField;\n"
"}\n";
+bool AddMemberCallVisitor::VisitCallExpr(CallExpr* callExpr)
+{
+ CXXMemberCallExpr* methodCallExpr = dyn_cast<CXXMemberCallExpr>(callExpr);
+ bool instrumented = false;
+ if (methodCallExpr) {
+ string methodName = methodCallExpr->getMethodDecl()->getNameAsString();
+ Strings::iterator i = find(instrumentationMethods.begin(), instrumentationMethods.end(), methodName);
+ instrumented = i != instrumentationMethods.end();
+ }
+ if (instrumented || !methodCallExpr) {
+ for (CallExpr::arg_iterator i = callExpr->arg_begin(); i != callExpr->arg_end(); ++i) {
+ Expr* expr = *i;
+ while (ImplicitCastExpr::classof(expr))
+ expr = static_cast<ImplicitCastExpr*>(expr)->getSubExpr();
+ if (MemberExpr* memberExpr = dyn_cast<MemberExpr>(expr))
+ m_instrumentedMembers.push_back(memberExpr->getMemberNameInfo().getAsString());
+ }
+ }
+ return true;
+}
+
+bool ReportMemoryUsageVisitor::VisitCXXMethodDecl(clang::CXXMethodDecl* decl)
+{
+ if (decl->doesThisDeclarationHaveABody() && decl->getNameAsString() == instrumentingMethodName) {
+ FullSourceLoc fullLocation = m_context->getFullLoc(decl->getLocStart());
+ if (fullLocation.isValid()) {
+ AddMemberCallVisitor visitor;
+ visitor.TraverseStmt(decl->getBody());
+ checkMembersCoverage(decl->getParent(), visitor.instrumentedMembers(), decl->getLocStart());
+ }
+ }
+ return true;
+}
+
+void ReportMemoryUsageVisitor::emitWarning(SourceLocation loc, const char* rawError)
+{
+ FullSourceLoc full(loc, m_instance.getSourceManager());
+ string err("[webkit-style] ");
+ err += rawError;
+ DiagnosticsEngine& diagnostic = m_instance.getDiagnostics();
+ DiagnosticsEngine::Level level = diagnostic.getWarningsAsErrors() ? DiagnosticsEngine::Error : DiagnosticsEngine::Warning;
+ unsigned id = diagnostic.getCustomDiagID(level, err);
+ DiagnosticBuilder builder = diagnostic.Report(full, id);
}
+CXXMethodDecl* ReportMemoryUsageVisitor::findInstrumentationMethod(CXXRecordDecl* record)
+{
+ for (CXXRecordDecl::method_iterator m = record->method_begin(); m != record->method_end(); ++m) {
+ if (m->getNameInfo().getAsString() == instrumentingMethodName)
+ return *m;
+ }
+ return 0;
+}
+
+bool ReportMemoryUsageVisitor::needsToBeInstrumented(const Type* type)
+{
+ if (type->isBuiltinType())
+ return false;
+ if (type->isEnumeralType())
+ return false;
+ if (type->isClassType()) {
+ const RecordType* recordType = dyn_cast<RecordType>(type);
+ if (recordType) {
+ CXXRecordDecl* decl = dyn_cast<CXXRecordDecl>(recordType->getDecl());
+ if (decl->getNameAsString() == "String")
+ return true;
+ if (!decl || !findInstrumentationMethod(decl))
+ return false;
+ }
+ }
+ if (type->isArrayType()) {
+ const ArrayType* arrayType = dyn_cast<const ArrayType>(type);
+ return needsToBeInstrumented(arrayType->getElementType().getTypePtr());
+ }
+ return true;
+}
+
+void ReportMemoryUsageVisitor::checkMembersCoverage(const CXXRecordDecl* instrumentedClass, const Strings& instrumentedMembers, SourceLocation location)
+{
+ for (CXXRecordDecl::field_iterator i = instrumentedClass->field_begin(); i != instrumentedClass->field_end(); ++i) {
+ string fieldName = i->getNameAsString();
+ if (find(instrumentedMembers.begin(), instrumentedMembers.end(), fieldName) == instrumentedMembers.end()) {
+ if (!needsToBeInstrumented(i->getType().getTypePtr()))
+ continue;
+ emitWarning(i->getSourceRange().getBegin(), "class member needs to be instrumented in reportMemoryUsage function");
+ emitWarning(location, "located here");
+ }
+ }
+}
+
+} // namespace
+
static FrontendPluginRegistry::Add<ReportMemoryUsageAction>
X("report-memory-usage", "Checks reportMemoryUsage function consistency");
diff --git a/Tools/efl/install-dependencies b/Tools/efl/install-dependencies
new file mode 100755
index 000000000..6270b851f
--- /dev/null
+++ b/Tools/efl/install-dependencies
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+# This script needs to be run with root rights.
+if [ $UID -ne 0 ]; then
+ sudo $0
+ exit 0
+fi
+
+function printNotSupportedMessageAndExit() {
+ echo
+ echo "Currently this script only works for distributions supporting apt-get."
+ echo "Please add support for your distribution."
+ echo
+ exit 1
+}
+
+function checkInstaller {
+ # apt-get - Debian based distributions
+ apt-get --version &> /dev/null
+ if [ $? -eq 0 ]; then
+ installDependenciesWithApt
+ exit 0
+ fi
+
+ printNotSupportedMessageAndExit
+}
+
+function installDependenciesWithApt {
+ # These are dependencies necessary for building WebKitEFL.
+ apt-get install \
+ bison \
+ cmake \
+ flex \
+ g++ \
+ gperf \
+ gtk-doc-tools \
+ subversion \
+ ruby \
+ libicu-dev \
+ libxslt1-dev \
+ libsqlite3-dev \
+ libjpeg-dev \
+ libpng-dev \
+ libxt-dev \
+ libgl1-mesa-dev \
+ libgnutls-dev \
+ libdbus-1-dev \
+ libudev-dev \
+ liblua5.1-0-dev \
+ ragel \
+ libfreetype6-dev \
+ libffi-dev \
+ libtiff4-dev \
+ libenchant-dev \
+ libxcomposite-dev \
+ libatk1.0-dev \
+ libtheora-dev \
+ libvorbis-dev \
+ libfaad-dev \
+ libpulse-dev \
+ libxrender-dev \
+ libp11-kit-dev \
+ libgpg-error-dev \
+ libgcrypt11-dev
+
+ # These are dependencies necessary for running tests.
+ apt-get install \
+ apache2 \
+ libapache2-mod-php5 \
+ libruby \
+ xvfb
+}
+
+checkInstaller
+
diff --git a/Tools/efl/jhbuild.modules b/Tools/efl/jhbuild.modules
index 07a248e97..53e2d2a41 100644
--- a/Tools/efl/jhbuild.modules
+++ b/Tools/efl/jhbuild.modules
@@ -19,6 +19,13 @@
<dep package="efreet"/>
<dep package="elementary"/>
<dep package="libxml2"/>
+ <dep package="gstreamer"/>
+ <dep package="gst-plugins-base"/>
+ <dep package="gst-plugins-good"/>
+ <dep package="gst-plugins-bad"/>
+ <dep package="gst-libav"/>
+ <dep package="libseccomp"/>
+ <dep package="atk"/>
</dependencies>
</metamodule>
@@ -26,10 +33,6 @@
href="https://github.com"/>
<repository type="tarball" name="sourceware.org"
href="ftp://sourceware.org"/>
- <repository type="tarball" name="gnupg.org"
- href="ftp://ftp.gnupg.org"/>
- <repository type="tarball" name="p11-glue.freedesktop.org"
- href="http://p11-glue.freedesktop.org"/>
<repository type="tarball" name="ftp.gnome.org"
href="http://ftp.gnome.org"/>
<repository type="git" name="git.gnome.org"
@@ -44,6 +47,10 @@
href="ftp://xmlsoft.org"/>
<repository type="tarball" name="download.enlightenment.org"
href="http://download.enlightenment.org"/>
+ <repository type="tarball" name="gstreamer"
+ href="http://gstreamer.freedesktop.org/src/"/>
+ <repository type="git" name="git.code.sf.net"
+ href="git://git.code.sf.net/p/"/>
<autotools id="cairo" autogen-sh="configure">
<dependencies>
@@ -83,44 +90,20 @@
</autotools>
<tarball id="freetype6">
- <source href="download.savannah.gnu.org/releases/freetype/freetype-2.4.2.tar.bz2" version="2.4.2"
- hash="sha256:9a987aef8c50d9bcfdfdc9f012f8bd0de6095cc1a5524e62c1a037deb8dacbfe"
- md5sum="647ee8ed266f9a4117c8d0a4855b3d3e"/>
+ <source href="download.savannah.gnu.org/releases/freetype/freetype-2.4.11.tar.bz2" version="2.4.11"
+ hash="sha256:ef9d0bcb64647d9e5125dc7534d7ca371c98310fec87677c410f397f71ffbe3f"
+ md5sum="b93435488942486c8d0ca22e8f768034" />
</tarball>
- <autotools id="p11-kit">
- <branch module="/releases/p11-kit-0.12.tar.gz" version="0.12"
- repo="p11-glue.freedesktop.org"
- hash="sha256:4db792def545a3c8ae12e7e4ef166d7620cb445c00a5a984ab7c4a3b35f0be00"
- md5sum="029aa2a3a103e7eb81b4aa731b93539e"/>
- </autotools>
-
- <autotools id="libgpg-error" autogen-sh="configure">
- <branch module="/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2" version="1.10"
- repo="gnupg.org"
- hash="sha256:520629b4568b5c29b1991c8ffc267c8bdee5f223c7333c42a651b56f9b1c5431"
- md5sum="736a03daa9dc5873047d4eb4a9c22a16"/>
- </autotools>
-
- <autotools id="libgcrypt" autogen-sh="./autogen.sh; configure">
- <dependencies>
- <dep package="libgpg-error"/>
- </dependencies>
- <branch module="/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2" version="1.5.0"
- repo="gnupg.org"
- hash="sha256:4b62fc516004940a0571025401a0581d49199f1a76dfb5ce6fd63f50db8173fa"
- md5sum="693f9c64d50c908bc4d6e01da3ff76d8"/>
- </autotools>
-
<autotools id="glib"
+ autogen-sh="configure"
autogenargs="--disable-dtrace">
<dependencies>
<dep package="libffi"/>
</dependencies>
- <branch module="/pub/GNOME/sources/glib/2.33/glib-2.33.2.tar.xz" version="2.33.2"
+ <branch module="/pub/GNOME/sources/glib/2.36/glib-2.36.0.tar.xz" version="2.36.0"
repo="ftp.gnome.org"
- hash="sha256:b7163e9f159775d13ecfb433d67c3f0883e0e518e85b2e970d4ad9773d7cd0b4"
- md5sum="06ef0099fed22afcf34ade39ddff9a5b"/>
+ hash="sha256:455a8abe8692c5174bcc7ffa15b96a7521a2f2f9fb47594405927c35cb9bb227"/>
</autotools>
<autotools id="glib-networking">
@@ -138,10 +121,10 @@
<dependencies>
<dep package="glib-networking"/>
</dependencies>
- <branch module="/pub/gnome/sources/libsoup/2.39/libsoup-2.39.4.1.tar.xz" version="2.39.4.1"
+ <branch module="/pub/gnome/sources/libsoup/2.42/libsoup-2.42.0.tar.xz" version="2.42.0"
repo="ftp.gnome.org"
- hash="sha256:0740c3f6e393d31f87f166f0c6d11de5ebaa013d382c59ed924a1384c575612e"
- md5sum="895ed1e0c949a2ce50aeaeb58661bfc3"/>
+ hash="sha256:9e0e7eb5d3f7401ccf521fbc289fc1fa0923b7c7833729e2ed7696f7b848893e">
+ </branch>
</autotools>
<autotools id="fontconfig" autogen-sh="configure">
@@ -153,51 +136,54 @@
</autotools>
<autotools id="harfbuzz" autogen-sh="configure">
- <branch module="software/harfbuzz/release/harfbuzz-0.9.6.tar.bz2" version="0.9.6"
- checkoutdir="harfbuzz-0.9.6"
+ <branch module="software/harfbuzz/release/harfbuzz-0.9.14.tar.bz2" version="0.9.14"
+ checkoutdir="harfbuzz-0.9.14"
repo="freedesktop.org"
- hash="sha256:394a849d6061993018754b0cc04110891ad215e3df3f6953b75dcc55a11f9d9b"
- md5sum="f3a100a0512c185b211a0deb4790c34c">
- <patch file="harfbuzz-icu-detection-fix.patch" strip="1" />
+ hash="sha256:d07c0ffdbbbfdfbb6c65e73fe9c76466e87dbf04b094cbd0abf5fd7d571a4004"
+ md5sum="7e1990b79060e98e2d31f677a0ac9eed">
</branch>
</autotools>
- <autotools id="eina">
- <branch module="releases/eina-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="eina-1.7.1"
+ <autotools id="eina" autogen-sh="configure">
+ <branch module="releases/eina-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:af0b316734ba72d92fa7716005efd380f28677c76f0e0b6a3c5a9b524575a6ce"
- md5sum="552c5e9042d9cb3dbdebbc0e211ef30b">
+ hash="sha256:fc08c8aa3a225e3a42793afbf109788ab003de7595a542607a6a65694d08a44d"
+ md5sum="ea505aa52729de68ed6c00e1e45c3c50">
</branch>
</autotools>
- <autotools id="embryo">
- <branch module="releases/embryo-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="embryo-1.7.1"
+ <autotools id="embryo" autogen-sh="configure">
+ <branch module="releases/embryo-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:043563b8c1a66de117cfaaf76a4d9736e111007ce5c0cdcf2b1d83dd8b4df575"
- md5sum="d66a0e91dfc37eeb4c362b2c46bd91ab">
+ hash="sha256:a946d6b4e6aa94b39537aa6746f4653d9235d8b9ca3a0dc0734df07482d28e80"
+ md5sum="a52682ebfd04a0e787028732ee8f11f9">
</branch>
<dependencies>
<dep package="eina"/>
</dependencies>
</autotools>
- <autotools id="evas">
- <branch module="releases/evas-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="evas-1.7.1"
+ <!-- TODO: Enabling Wayland support in Evas is currently requires additional
+ GL-related options that might break our use of GLX in WebKit. While we
+ do not investigate it in more depth, explicitly disable Wayland support
+ in Evas. -->
+ <autotools id="evas" autogen-sh="configure"
+ autogenargs="--disable-wayland-shm --disable-wayland-egl">
+ <branch module="releases/evas-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:57966a16fdb20e94deefe83ec0f990607413f7952f9755ed23ce81aea49b670c"
- md5sum="e33c1d270b16e45c2337424aa2faaaa0">
+ hash="sha256:70b350a970b2086787622845896f3e54de278fe698b8069796fd752e70427374"
+ md5sum="2c965b836128a839292161d4ca89380d">
</branch>
+ <dependencies>
+ <dep package="eet"/>
+ </dependencies>
</autotools>
- <autotools id="ecore">
- <branch module="releases/ecore-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="ecore-1.7.1"
+ <autotools id="ecore" autogen-sh="configure">
+ <branch module="releases/ecore-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:fb5f547a0a6556b5f0e274b65cfbe42f4eb8371f20d00005cd4f5a78a6b6a5d8"
- md5sum="94fd264e478323a1100b3cfff833d28d">
+ hash="sha256:4bbaba2153db0c356d13c45adfbcc90c7118abd112d0817581417e708d6a9222"
+ md5sum="9ea98367ec40f7121ea61948bb395553">
</branch>
<dependencies>
<dep package="eina"/>
@@ -205,25 +191,22 @@
</dependencies>
</autotools>
- <autotools id="eet">
- <branch module="releases/eet-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="eet-1.7.1"
+ <autotools id="eet" autogen-sh="configure">
+ <branch module="releases/eet-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:3e5679c06792f0a1c4b5b158468afbcec3b510c60345055d5964fdbe2abba3eb"
- md5sum="2974f892e2be5e2fa08296714e97c407">
+ hash="sha256:c79cc6e5d3304ae5761307c266835c4d8337cc0418ea43ace8c915b2d329427b"
+ md5sum="ec3fffbeff0be2699aeed1ed4377ee9d">
</branch>
<dependencies>
- <dep package="libgcrypt"/>
<dep package="eina"/>
</dependencies>
</autotools>
- <autotools id="edje">
- <branch module="releases/edje-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="edje-1.7.1"
+ <autotools id="edje" autogen-sh="configure">
+ <branch module="releases/edje-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:d924d7ade92055a5c83d3c43171982b7f006db9f5c923fb39e0523405ec4534c"
- md5sum="766747bc1b8a1755952e275b6058cf30">
+ hash="sha256:c7b329ac6548378c1c74e9cdf60a34c33f4fdc2d8224577d6a9ea4b90c915ec3"
+ md5sum="56d7ba080088627773bc6369e9a924fe">
</branch>
<dependencies>
<dep package="eet"/>
@@ -233,12 +216,11 @@
</dependencies>
</autotools>
- <autotools id="e_dbus">
- <branch module="releases/e_dbus-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="e_dbus-1.7.1"
+ <autotools id="e_dbus" autogen-sh="configure">
+ <branch module="releases/e_dbus-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:d3a3e0b81f6bb69d2fc3886c9885dad27ebf14b60c4a0bbd5a2a510b5a5ff2d1"
- md5sum="3fa25de2880c2ff9d78d070d4792f570">
+ hash="sha256:d88886c13b470f9aee84f1a95a68eca5501506417362ee8066a117feffcd9399"
+ md5sum="a197ae1c8e93debf20728e3e7693b868">
</branch>
<dependencies>
<dep package="ecore"/>
@@ -246,12 +228,11 @@
</dependencies>
</autotools>
- <autotools id="eeze">
- <branch module="releases/eeze-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="eeze-1.7.1"
+ <autotools id="eeze" autogen-sh="configure">
+ <branch module="releases/eeze-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:6a696e2fe1ad14983ca7555eed2c50dd39f9a084e04475f0d25fd31d32e3cd58"
- md5sum="0e9d008a9ae17de2aea82a34ee62691e">
+ hash="sha256:b9cf6843d703c63930d5ff33be3dc640c28f58ce2e7def812086bfce8876e408"
+ md5sum="0891f831e2d25bd48a5c26e8793b1714">
</branch>
<dependencies>
<dep package="ecore"/>
@@ -259,12 +240,11 @@
</dependencies>
</autotools>
- <autotools id="efreet">
- <branch module="releases/efreet-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="efreet-1.7.1"
+ <autotools id="efreet" autogen-sh="configure">
+ <branch module="releases/efreet-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:c844ed545f1c9438c73af4e4d037401a653babaab0a4e4b69377a2de49431eea"
- md5sum="0fc2b3bf93dc3a9f293c348339163ba3">
+ hash="sha256:8f5a043a76d8905f87600da5e0dddfcdf3b44f517724b376f8da32dc9ac487fb"
+ md5sum="d21e59631022d6fbdfa0e19b6b2ff93a">
</branch>
<dependencies>
<deb package="ecore"/>
@@ -274,12 +254,12 @@
</autotools>
<autotools id="elementary"
+ autogen-sh="configure"
autogenargs="--disable-emap --disable-ethumb --disable-eweather --disable-web">
- <branch module="releases/elementary-1.7.1.tar.bz2" version="1.7.1"
- checkoutdir="elementary-1.7.1"
+ <branch module="releases/elementary-1.7.5.tar.bz2" version="1.7.5"
repo="download.enlightenment.org"
- hash="sha256:54dd82ca156f024de91e375ae9f7ad9579cb0d8fb0bcbf9b16e5b4165d5ac483"
- md5sum="9f43658594d8e837773c8b6573b654dd">
+ hash="sha256:898a4a7f8135c65359d4271ccab593b8a0b10d85fb6fd2d0cabea76152278b21"
+ md5sum="7f2cbea027fba8b58c41aaacfe68c155">
</branch>
<dependencies>
<deb package="edje"/>
@@ -289,11 +269,78 @@
</dependencies>
</autotools>
- <autotools id="libxml2">
- <branch module="/libxml2/libxml2-2.8.0.tar.gz" version="2.8.0"
+ <autotools id="libxml2"
+ autogen-sh="configure"
+ autogenargs="--without-python">
+ <branch module="/libxml2/libxml2-2.9.1.tar.gz" version="2.9.1"
repo="xmlsoft.org"
- hash="sha256:f2e2d0e322685193d1affec83b21dc05d599e17a7306d7b90de95bb5b9ac622a"
- md5sum="c62106f02ee00b6437f0fb9d370c1093"/>
+ hash="sha256:fd3c64cb66f2c4ea27e934d275904d92cec494a8e8405613780cbc8a71680fdb"
+ md5sum="9c0cfef285d5c4a5c80d00904ddab380"/>
+ </autotools>
+
+ <autotools id="gstreamer" autogen-sh="configure">
+ <branch repo="gstreamer"
+ module="gstreamer/gstreamer-1.0.5.tar.xz" version="1.0.5"
+ hash="sha256:26c2827567f09a46d0a3bc1e7f8696b2ae72b047306539178079abae487c5b77"/>
+ </autotools>
+
+ <autotools id="gst-plugins-base"
+ autogen-sh="configure"
+ autogenargs="--disable-examples --enable-theora --enable-vorbis">
+ <dependencies>
+ <dep package="gstreamer"/>
+ </dependencies>
+ <branch repo="gstreamer"
+ module="gst-plugins-base/gst-plugins-base-1.0.5.tar.xz" version="1.0.5"
+ hash="sha256:37ce6e09b99ef3879111c861ee5090582b4fd4c764e81ab6eb2b2b4dd77d7173"/>
+ </autotools>
+
+ <autotools id="gst-plugins-good"
+ autogen-sh="configure"
+ autogenargs="--disable-examples --enable-pulse">
+ <dependencies>
+ <dep package="cairo"/>
+ <dep package="gst-plugins-base"/>
+ </dependencies>
+ <branch repo="gstreamer"
+ module="gst-plugins-good/gst-plugins-good-1.0.5.tar.xz" version="1.0.5"
+ hash="sha256:53bd0b848e7896f1b22548ca4e8be56cf425e5100e121c472dff8272d5140bc5"/>
+ </autotools>
+
+ <autotools id="gst-plugins-bad"
+ autogen-sh="configure"
+ autogenargs="--disable-examples --enable-faad">
+ <dependencies>
+ <dep package="gst-plugins-base"/>
+ </dependencies>
+ <branch repo="gstreamer"
+ module="gst-plugins-bad/gst-plugins-bad-1.0.5.tar.xz" version="1.0.5"
+ hash="sha256:2e8f5b9a2fd274142d0a916b6425b9466028978b85858dc835dc80de744b276a"/>
+ </autotools>
+
+ <autotools id="gst-libav"
+ autogen-sh="configure"
+ autogenargs="--with-libav-extra-configure='--disable-yasm'">
+ <dependencies>
+ <dep package="gst-plugins-base"/>
+ </dependencies>
+ <branch repo="gstreamer"
+ module="gst-libav/gst-libav-1.0.5.tar.xz" version="1.0.5"
+ hash="sha256:aef8be665096b3a4e64424fb39d7c5da57faaaf95e9fea6c1bb44295d4fb32d5"/>
</autotools>
+ <autotools id="libseccomp" autogen-sh="configure">
+ <branch module="libseccomp/libseccomp"
+ repo="git.code.sf.net"
+ tag="bbd7ca07a7c76d5cd884dbddec58385e1b7439d2"/>
+ </autotools>
+
+ <autotools id="atk"
+ autogen-sh="configure"
+ autogenargs="--disable-introspection">
+ <branch module="pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz" version="2.8.0"
+ repo="ftp.gnome.org"
+ hash="sha256:b22519176226f3e07cf6d932b77852e6b6be4780977770704b32d0f4e0686df4"/>
+ </autotools>
+
</moduleset>
diff --git a/Tools/efl/jhbuildrc b/Tools/efl/jhbuildrc
index cd3b9424d..77daae97c 100644
--- a/Tools/efl/jhbuildrc
+++ b/Tools/efl/jhbuildrc
@@ -38,17 +38,18 @@ modules = [ 'webkitefl-testing-dependencies', ]
if __extra_modules != ['']:
modules.extend(__extra_modules)
-if os.environ.has_key('WEBKITOUTPUTDIR'):
- checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKITOUTPUTDIR'], 'Dependencies', 'Source'))
- prefix = os.path.abspath(os.path.join(os.environ['WEBKITOUTPUTDIR'], 'Dependencies', 'Root'))
+if os.environ.has_key('WEBKIT_OUTPUTDIR'):
+ checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
+ prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
else:
checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
nonotify = True
notrayicon = True
-if 'MAKEFLAGS' not in os.environ:
- os.environ['MAKEFLAGS'] = '-j%d' % multiprocessing.cpu_count()
+
+if 'NUMBER_OF_PROCESSORS' in os.environ:
+ jobs = os.environ['NUMBER_OF_PROCESSORS']
# Use system libraries while building.
if use_lib64:
@@ -73,3 +74,7 @@ if use_lib64:
addpath('CMAKE_LIBRARY_PATH', os.path.join(prefix, _libdir))
partial_build = False
+
+# Avoid runtime conflicts with GStreamer system-wide plugins. We want
+# to use only the plugins we build in JHBuild.
+os.environ['GST_PLUGIN_SYSTEM_PATH'] = ''
diff --git a/Tools/efl/patches/harfbuzz-icu-detection-fix.patch b/Tools/efl/patches/harfbuzz-icu-detection-fix.patch
deleted file mode 100644
index 567e24d6c..000000000
--- a/Tools/efl/patches/harfbuzz-icu-detection-fix.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index b1948f1..9ae69dd 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -184,6 +184,31 @@ fi
- AM_CONDITIONAL(HAVE_ICU_LE, $have_icu_le)
-
- dnl ==========================================================================
-+dnl Fallback to icu-config if ICU pkg-config files could not be found
-+dnl ==========================================================================
-+
-+if test "$have_icu" != "true"; then
-+ AC_PATH_PROG(icu_config, icu-config, no)
-+ AC_MSG_CHECKING([for ICU by using icu-config fallback])
-+ if test "$icu_config" != "no"; then
-+ # We don't use --cflags as this gives us a lot of things that we don't
-+ # necessarily want, like debugging and optimization flags
-+ # See man (1) icu-config for more info.
-+ ICU_CFLAGS=`$icu_config --cppflags`
-+ ICU_LIBS=`$icu_config --ldflags-libsonly --ldflags-layout`
-+ AC_SUBST(ICU_CFLAGS)
-+ AC_SUBST(ICU_LIBS)
-+ AC_DEFINE(HAVE_ICU_LE, 1, [Have ICU Layout Engine library])
-+ AC_DEFINE(HAVE_ICU, 1, [Have ICU library])
-+ AM_CONDITIONAL(HAVE_ICU, true)
-+ AM_CONDITIONAL(HAVE_ICU_LE, true)
-+ AC_MSG_RESULT([yes])
-+ else
-+ AC_MSG_RESULT([no])
-+ fi
-+fi
-+
-+dnl ==========================================================================
-
- PKG_CHECK_MODULES(GRAPHITE2, graphite2, have_graphite=true, have_graphite=false)
- if $have_graphite; then
diff --git a/Tools/efl/run-with-jhbuild b/Tools/efl/run-with-jhbuild
deleted file mode 100755
index 666797ffa..000000000
--- a/Tools/efl/run-with-jhbuild
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2011 Igalia S.L.
-# Copyright (C) 2012 Intel Corporation
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-import common
-import os
-import sys
-
-
-jhbuild_wrapper = common.top_level_path('Tools', 'jhbuild', 'jhbuild-wrapper')
-os.execve(jhbuild_wrapper, [jhbuild_wrapper, '--efl', 'run'] + sys.argv[1:], os.environ)
diff --git a/Tools/gdb/webkit.py b/Tools/gdb/webkit.py
index f0d320741..1fce077fd 100644
--- a/Tools/gdb/webkit.py
+++ b/Tools/gdb/webkit.py
@@ -155,7 +155,7 @@ class WTFStringPrinter(StringPrinter):
class JSCIdentifierPrinter(StringPrinter):
"Print a JSC::Identifier"
def to_string(self):
- return WTFStringImplPrinter(self.val['m_string']).to_string()
+ return WTFStringPrinter(self.val['m_string']).to_string()
class JSCJSStringPrinter(StringPrinter):
@@ -261,12 +261,12 @@ class WTFVectorPrinter:
self.val = val
def children(self):
- start = self.val['m_buffer']['m_buffer']
+ start = self.val['m_buffer']
return self.Iterator(start, start + self.val['m_size'])
def to_string(self):
return ('%s of length %d, capacity %d'
- % ('WTF::Vector', self.val['m_size'], self.val['m_buffer']['m_capacity']))
+ % ('WTF::Vector', self.val['m_size'], self.val['m_capacity']))
def display_hint(self):
return 'array'
diff --git a/Tools/gtk/common.py b/Tools/gtk/common.py
index dd32e0815..1fbf69ce5 100644
--- a/Tools/gtk/common.py
+++ b/Tools/gtk/common.py
@@ -36,7 +36,7 @@ def top_level_path(*args):
return os.path.join(*((script_path('..', '..'),) + args))
-def get_build_path():
+def get_build_path(build_types=('Release', 'Debug')):
global build_dir
if build_dir:
return build_dir
@@ -57,7 +57,7 @@ def get_build_path():
if is_valid_build_directory(build_dir):
return build_dir
- for build_type in ('Release', 'Debug'):
+ for build_type in build_types:
build_dir = top_level_path('WebKitBuild', build_type)
if is_valid_build_directory(build_dir):
return build_dir
@@ -75,18 +75,22 @@ def get_build_path():
if is_valid_build_directory(build_dir):
return build_dir
- print 'Could not determine build directory.'
+ print('Could not determine build directory.')
sys.exit(1)
+def build_path_for_build_types(build_types, *args):
+ return os.path.join(*(get_build_path(build_types),) + args)
+
+
def build_path(*args):
- return os.path.join(*(get_build_path(),) + args)
+ return build_path_for_build_types(('Release', 'Debug'), *args)
def pkg_config_file_variable(package, variable):
process = subprocess.Popen(['pkg-config', '--variable=%s' % variable, package],
stdout=subprocess.PIPE)
- stdout = process.communicate()[0]
+ stdout = process.communicate()[0].decode("utf-8")
if process.returncode:
return None
return stdout.strip()
@@ -99,7 +103,7 @@ def prefix_of_pkg_config_file(package):
def gtk_version_of_pkg_config_file(pkg_config_path):
process = subprocess.Popen(['pkg-config', pkg_config_path, '--print-requires'],
stdout=subprocess.PIPE)
- stdout = process.communicate()[0]
+ stdout = process.communicate()[0].decode("utf-8")
if 'gtk+-3.0' in stdout:
return 3
@@ -110,7 +114,12 @@ def parse_output_lines(fd, parse_line_callback):
output = ''
read_set = [fd]
while read_set:
- rlist, wlist, xlist = select.select(read_set, [], [])
+ try:
+ rlist, wlist, xlist = select.select(read_set, [], [])
+ except select.error as e:
+ parse_line_callback("WARNING: error while waiting for fd %d to become readable\n" % fd)
+ parse_line_callback(" error code: %d, error message: %s\n" % (e[0], e[1]))
+ continue
if fd in rlist:
try:
diff --git a/Tools/gtk/generate-feature-defines-files b/Tools/gtk/generate-feature-defines-files
new file mode 100755
index 000000000..f5b2c7e61
--- /dev/null
+++ b/Tools/gtk/generate-feature-defines-files
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+
+import os
+import re
+import sys
+
+def read_feature_defines_override(feature_defines):
+ feature_defines_overriding_file = 'WebKitFeatureOverrides.txt'
+ if not os.path.exists(feature_defines_overriding_file):
+ return
+
+ print("The following feature defines were overriden:")
+ with open(feature_defines_overriding_file) as f:
+ match_iter = re.findall(r"((?:ENABLE_)\w+)=(0|1)", f.read())
+
+ for match in match_iter:
+ feature = match[0]
+ value = int(match[1])
+
+ if feature in feature_defines and value != feature_defines[feature]:
+ print("\t{0}: {1} => {2}".format(feature, feature_defines[feature], value))
+ feature_defines[feature] = value
+
+def write_file_if_contents_changed(filename, contents):
+ if os.path.exists(filename):
+ with open(filename, 'r') as f:
+ old_contents = f.read()
+ if old_contents == contents:
+ return
+ with open(filename, 'w') as f:
+ f.write(contents)
+
+def write_feature_defines_header(feature_defines):
+ contents = ''
+ for (feature, value) in feature_defines.items():
+ contents += '#define {0} {1}\n'.format(feature, value)
+ write_file_if_contents_changed("WebKitFeatures.h", contents)
+
+def write_flattened_feature_defines_file(feature_defines):
+ contents = ''
+ for (feature, value) in feature_defines.items():
+ contents += '{0}={1}\n'.format(feature, value)
+ write_file_if_contents_changed("WebKitFeatures.txt", contents)
+
+def generate_feature_defines_files(default_features):
+ build_dir = os.getcwd()
+ feature_defines = {}
+
+ for feature_define in default_features:
+ (feature, value) = feature_define.split("=")
+ feature_defines[feature] = int(value)
+
+ read_feature_defines_override(feature_defines)
+ write_feature_defines_header(feature_defines)
+ write_flattened_feature_defines_file(feature_defines)
+
+if __name__=='__main__':
+ generate_feature_defines_files(sys.argv[1:])
diff --git a/Tools/gtk/generate-gtkdoc b/Tools/gtk/generate-gtkdoc
index 3edd13f3e..7b981723f 100755
--- a/Tools/gtk/generate-gtkdoc
+++ b/Tools/gtk/generate-gtkdoc
@@ -77,6 +77,8 @@ def get_webkit2_options():
return common.build_path(*(('DerivedSources', 'WebKit2') + args))
def src_path(*args):
return common.top_level_path(*(('Source', 'WebKit2', 'UIProcess', 'API', 'gtk') + args))
+ def injected_bundle_src_path(*args):
+ return common.top_level_path(*(('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk') + args))
xref_deps = get_common_xref_deps().copy()
xref_deps.update({
@@ -88,7 +90,7 @@ def get_webkit2_options():
'module_name' : 'webkit2gtk',
'doc_dir' : src_path('docs'),
'output_dir' : common.build_path('Documentation', 'webkit2gtk'),
- 'source_dirs' : [src_path(), derived_sources_path('webkit2gtk', 'webkit2')],
+ 'source_dirs' : [src_path(), derived_sources_path('webkit2gtk', 'webkit2'), injected_bundle_src_path()],
'cflags' : ' -I' + derived_sources_path('webkit2gtk', 'include') + \
' -I' + derived_sources_path('webkit2gtk') + \
' -I' + derived_sources_path('include') + \
@@ -96,11 +98,13 @@ def get_webkit2_options():
' -I' + src_path(),
'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps),
'ignored_files': glob.glob(src_path('*Private.h')) + \
+ glob.glob(injected_bundle_src_path('*Private.h')) + \
glob.glob(src_path('*Client*')) + \
- glob.glob(src_path('WebKitWebViewBaseAccessible.*')) + \
- glob.glob(src_path('WebKit2GtkAuthenticationDialog.*')) + \
glob.glob(src_path('WebKitGeolocationProvider.*')) + \
glob.glob(src_path('WebKitTextChecker.*')) + \
+ glob.glob(src_path('WebKitAuthenticationDialog.*')) + \
+ glob.glob(src_path('WebKitWebViewBaseAccessible.*')) + \
+ glob.glob(src_path('WebViewBaseInputMethodFilter.*')) + \
glob.glob(derived_sources_path('webkit2gtk', 'webkit2', 'WebKitMarshal.*')) + \
glob.glob(derived_sources_path('webkit2gtk', 'webkit2', 'WebKitEnumTypes.*')) + \
glob.glob(src_path('tests/*.h'))
@@ -134,6 +138,7 @@ def get_webkit1_options(gtk_version):
' -I' + common.top_level_path('Source', 'JavaScriptCore', 'ForwardingHeaders'),
'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps),
'ignored_files': glob.glob(src_path('webkit', '*private.*')) + \
+ glob.glob(src_path('webkit', 'webkitauthenticationdialog.*')) + \
glob.glob(src_path('webkit', 'webkitspellcheckerenchant.*'))
})
return options
@@ -142,9 +147,9 @@ def print_missing_api(generator):
missing_api = generator.api_missing_documentation()
if not missing_api:
return
- print "\nThe following API are missing documentation:"
+ print("\nThe following API are missing documentation:")
for api in missing_api:
- print "\t%s" % api
+ print("\t%s" % api)
def generate_doc(generator):
generator.generate(html='--skip-html' not in sys.argv)
@@ -161,6 +166,17 @@ os.environ['PKG_CONFIG_PATH'] = common.build_path('Source', 'JavaScriptCore')
if pkg_config_path:
os.environ['PKG_CONFIG_PATH'] += ':' + pkg_config_path
+# Newer versions of glib have deprecated g_type_init, so we need to disable
+# that warning when running gtkdoc-scanobj by overriding the CFLAGS we use
+# to compile it.
+cflags = os.environ.get('CFLAGS', '')
+cflags += ' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'
+os.environ['CFLAGS'] = cflags
+
+# Clang can be noisy, throwing unnecessary warnings for unused arguments.
+if os.environ.get('CC') == "clang":
+ os.environ['CFLAGS'] += ' -Qunused-arguments'
+
saw_webkit1_warnings = saw_webkit2_warnings = False
pkg_config_path = common.build_path('Source', 'WebKit', 'gtk', 'webkitgtk-3.0.pc')
@@ -170,27 +186,27 @@ if os.path.exists(pkg_config_path):
options = get_webkit1_options(common.gtk_version_of_pkg_config_file(pkg_config_path))
generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, options)
if '--rebase' not in sys.argv:
- print "Generating WebKit1 documentation..."
+ print("Generating WebKit1 documentation...")
saw_webkit1_warnings = generate_doc(generator)
else:
- print "Rebasing WebKit1 documentation..."
+ print("Rebasing WebKit1 documentation...")
try:
generator.rebase_installed_docs()
- except Exception,e:
- print "Rebase did not happen, likely no documentation is present."
+ except Exception:
+ print("Rebase did not happen, likely no documentation is present.")
# WebKit2 might not be enabled, so check for the pkg-config file before building documentation.
pkg_config_path = common.build_path('Source', 'WebKit2', 'webkit2gtk-3.0.pc')
if os.path.exists(pkg_config_path):
generator = gtkdoc.PkgConfigGTKDoc(pkg_config_path, get_webkit2_options())
if '--rebase' not in sys.argv:
- print "\nGenerating WebKit2 documentation..."
+ print("\nGenerating WebKit2 documentation...")
saw_webkit2_warnings = generate_doc(generator)
else:
- print "\nRebasing WebKit2 documentation..."
+ print("\nRebasing WebKit2 documentation...")
try:
generator.rebase_installed_docs()
- except Exception,e:
- print "Rebase did not happen, likely no documentation is present."
+ except Exception:
+ print("Rebase did not happen, likely no documentation is present.")
sys.exit(saw_webkit1_warnings or saw_webkit2_warnings)
diff --git a/Tools/gtk/gtkdoc.py b/Tools/gtk/gtkdoc.py
index 7f7f0ad31..443dfc77b 100644
--- a/Tools/gtk/gtkdoc.py
+++ b/Tools/gtk/gtkdoc.py
@@ -107,7 +107,7 @@ class GTKDoc(object):
self.logger = logging.getLogger('gtkdoc')
- for key, value in args.iteritems():
+ for key, value in iter(args.items()):
setattr(self, key, value)
def raise_error_if_not_specified(key):
@@ -185,7 +185,7 @@ class GTKDoc(object):
process = subprocess.Popen(args, env=env, cwd=cwd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- stdout, stderr = process.communicate()
+ stdout, stderr = [b.decode("utf-8") for b in process.communicate()]
if print_output:
if stdout:
@@ -396,19 +396,21 @@ class PkgConfigGTKDoc(GTKDoc):
def __init__(self, pkg_config_path, args):
super(PkgConfigGTKDoc, self).__init__(args)
+ pkg_config = os.environ.get('PKG_CONFIG', 'pkg-config')
+
if not os.path.exists(pkg_config_path):
raise Exception('Could not find pkg-config file at: %s'
% pkg_config_path)
- self.cflags += " " + self._run_command(['pkg-config',
+ self.cflags += " " + self._run_command([pkg_config,
pkg_config_path,
'--cflags'], print_output=False)
- self.ldflags += " " + self._run_command(['pkg-config',
+ self.ldflags += " " + self._run_command([pkg_config,
pkg_config_path,
'--libs'], print_output=False)
- self.version = self._run_command(['pkg-config',
+ self.version = self._run_command([pkg_config,
pkg_config_path,
'--modversion'], print_output=False)
- self.prefix = self._run_command(['pkg-config',
+ self.prefix = self._run_command([pkg_config,
pkg_config_path,
'--variable=prefix'], print_output=False)
diff --git a/Tools/gtk/install-dependencies b/Tools/gtk/install-dependencies
new file mode 100755
index 000000000..f5729598d
--- /dev/null
+++ b/Tools/gtk/install-dependencies
@@ -0,0 +1,188 @@
+#!/bin/bash
+
+# This script needs to be run with root rights.
+if [ $UID -ne 0 ]; then
+ sudo $0
+ exit 0
+fi
+
+function printNotSupportedMessageAndExit() {
+ echo
+ echo "Currently this script only works for distributions supporting apt-get and yum."
+ echo "Please add support for your distribution: http://webkit.org/b/110693"
+ echo
+ exit 1
+}
+
+function checkInstaller {
+ # apt-get - Debian based distributions
+ apt-get --version &> /dev/null
+ if [ $? -eq 0 ]; then
+ installDependenciesWithApt
+ exit 0
+ fi
+
+ # yum - Fedora
+ yum --version &> /dev/null
+ if [ $? -eq 0 ]; then
+ installDependenciesWithYum
+ exit 0
+ fi
+
+ printNotSupportedMessageAndExit
+}
+
+function installDependenciesWithApt {
+ # These are dependencies necessary for building WebKitGTK+.
+ apt-get install \
+ autoconf \
+ automake \
+ autopoint \
+ autotools-dev \
+ bison \
+ flex \
+ gail-3.0 \
+ gawk \
+ gnome-common \
+ gperf \
+ gtk-doc-tools \
+ intltool \
+ libatk1.0-dev \
+ libenchant-dev \
+ libfaad-dev \
+ libgail-3-dev \
+ libgail-dev \
+ libgeoclue-dev \
+ libgirepository1.0-dev \
+ libgl1-mesa-dev \
+ libgl1-mesa-glx \
+ libgnutls-dev \
+ libgudev-1.0-dev \
+ libicu-dev \
+ libjpeg62-dev \
+ libmpg123-dev \
+ libopus-dev \
+ libpango1.0-dev \
+ libpng12-dev \
+ libpulse-dev \
+ librsvg2-dev \
+ libsecret-1-dev \
+ libsqlite3-dev \
+ libtheora-dev \
+ libtool \
+ libvorbis-dev \
+ libwebp-dev \
+ libxslt1-dev \
+ libxt-dev \
+ libxtst-dev \
+ ruby
+
+ # These are dependencies necessary for running tests.
+ apt-get install \
+ apache2 \
+ curl \
+ libapache2-mod-bw \
+ libapache2-mod-php5 \
+ libgpg-error-dev \
+ pulseaudio-utils \
+ python-gi \
+ ruby
+
+ # These are dependencies necessary for building the jhbuild.
+ apt-get install \
+ gobject-introspection \
+ icon-naming-utils \
+ libegl1-mesa-dev \
+ libgcrypt11-dev \
+ libgpg-error-dev \
+ libp11-kit-dev \
+ libtiff4-dev \
+ libcroco3-dev \
+ ragel \
+ xutils-dev \
+ xtrans-dev \
+ libxfont-dev \
+ libpciaccess-dev \
+ x11proto-bigreqs-dev \
+ x11proto-gl-dev \
+ x11proto-input-dev \
+ x11proto-video-dev \
+ x11proto-scrnsaver-dev \
+ x11proto-resource-dev \
+ x11proto-xcmisc-dev \
+ x11proto-xf86dri-dev \
+ libxkbfile-dev
+}
+
+function installDependenciesWithYum {
+ # These are dependencies necessary for building WebKitGTK+.
+ yum install \
+ autoconf \
+ automake \
+ bison \
+ atk-devel \
+ cairo-devel \
+ enchant-devel \
+ flex \
+ fontconfig-devel \
+ freetype-devel \
+ gcc-c++ \
+ geoclue-devel \
+ gettext-devel \
+ gobject-introspection-devel \
+ gperf \
+ gstreamer1-devel \
+ gstreamer1-plugins-base-devel \
+ gtk2-devel \
+ gtk3-devel \
+ gtk-doc \
+ harfbuzz-devel \
+ libsoup-devel \
+ libicu-devel \
+ libjpeg-turbo-devel \
+ libpng-devel \
+ libsecret-devel \
+ libwebp-devel \
+ libxslt-devel \
+ libXt-devel \
+ libXtst-devel \
+ libgudev1-devel \
+ mesa-libGL-devel \
+ pcre-devel \
+ ruby \
+ sqlite-devel \
+ perl-Switch \
+ perl-version \
+ python-devel
+
+ # These are dependencies necessary for running tests.
+ yum install \
+ httpd \
+ curl \
+ mod_bw \
+ libgpg-error-devel \
+ pulseaudio-utils \
+ pygobject3-base \
+ ruby
+
+ # These are dependencies necessary for building the jhbuild.
+ yum install \
+ gobject-introspection \
+ icon-naming-utils \
+ libgcrypt-devel \
+ libgpg-error-devel \
+ libp11-devel \
+ libtiff-devel \
+ libcroco-devel \
+ mesa-libEGL-devel \
+ ragel \
+ xorg-x11-util-macros \
+ xorg-x11-xtrans-devel \
+ xorg-x11-proto-devel \
+ libXfont-devel \
+ libxkbfile-devel \
+ libpciaccess-devel
+}
+
+checkInstaller
+
diff --git a/Tools/gtk/jhbuild-optional.modules b/Tools/gtk/jhbuild-optional.modules
new file mode 100644
index 000000000..cccf8ffff
--- /dev/null
+++ b/Tools/gtk/jhbuild-optional.modules
@@ -0,0 +1,19 @@
+<?xml version="1.0"?>
+<!DOCTYPE moduleset SYSTEM "moduleset.dtd">
+<?xml-stylesheet type="text/xsl" href="moduleset.xsl"?>
+<moduleset>
+
+ <!-- This file contains a set of modules that are hard to get on
+ certain distributions. Feel free to add more here, within reason,
+ as long as they are not built by default. -->
+
+ <repository type="tarball" name="ftp.gnome.org"
+ href="http://ftp.gnome.org"/>
+
+ <autotools id="libsecret" autogen-sh="configure">
+ <branch repo="ftp.gnome.org"
+ module="/pub/GNOME/sources/libsecret/0.11/libsecret-0.11.tar.xz" version="0.11"
+ hash="sha256:e5399dfb61376a7500d20cb22715152780aa3a2c8a64281ec6bc8f0ebeb8b689"/>
+ </autotools>
+
+</moduleset>
diff --git a/Tools/gtk/jhbuild.modules b/Tools/gtk/jhbuild.modules
index 0abf14507..71fc1a352 100644
--- a/Tools/gtk/jhbuild.modules
+++ b/Tools/gtk/jhbuild.modules
@@ -10,25 +10,36 @@
<dep package="fonts"/>
<dep package="fontconfig"/>
<dep package="freetype6"/>
+ <dep package="harfbuzz"/>
<dep package="libxml2"/>
<dep package="gdk-pixbuf"/>
<dep package="gtk+"/>
<dep package="glib"/>
<dep package="glib-networking"/>
<dep package="gnome-icon-theme"/>
+ <dep package="gnome-icon-theme-symbolic"/>
<dep package="gnome-themes-standard"/>
<dep package="libsoup"/>
+ <dep package="atk"/>
<dep package="at-spi2-core"/>
<dep package="at-spi2-atk"/>
+ <dep package="gstreamer"/>
+ <dep package="gst-plugins-base"/>
+ <dep package="gst-plugins-good"/>
+ <dep package="gst-plugins-bad"/>
+ <dep package="gst-libav"/>
+ <dep package="xserver"/>
</dependencies>
</metamodule>
+ <include href="jhbuild-optional.modules"/>
+
<repository type="tarball" name="ftp.gnu.org"
href="ftp://ftp.gnu.org/gnu/"/>
- <repository type="tarball" name="github.com"
- href="https://github.com"/>
- <repository type="tarball" name="sourceware.org"
- href="ftp://sourceware.org"/>
+ <repository type="git" name="github.com"
+ href="git://github.com"/>
+ <repository type="tarball" name="sourceware.org-mirror"
+ href="ftp://mirrors.kernel.org/sources.redhat.com/"/>
<repository type="tarball" name="ftp.gnome.org"
href="http://ftp.gnome.org"/>
<repository type="git" name="git.gnome.org"
@@ -37,8 +48,14 @@
href="http://cairographics.org"/>
<repository type="tarball" name="freedesktop.org"
href="http://www.freedesktop.org"/>
+ <repository type="tarball" name="xorg"
+ href="http://xorg.freedesktop.org"/>
<repository type="tarball" name="xmlsoft.org"
href="ftp://xmlsoft.org"/>
+ <repository type="git" name="gstreamer"
+ href="git://anongit.freedesktop.org/git/gstreamer/"/>
+ <repository type="tarball" name="savannah.gnu.org"
+ href="http://download.savannah.gnu.org/releases/"/>
<autotools id="make" autogen-sh="configure">
<branch repo="ftp.gnu.org"
@@ -49,10 +66,12 @@
</branch>
</autotools>
- <autotools id="cairo" autogen-sh="configure">
+ <autotools id="cairo" autogen-sh="configure"
+ autogenargs="--enable-gl=yes --enable-egl=yes --enable-glx=yes">
<dependencies>
<dep package="fontconfig"/>
<dep package="pixman"/>
+ <dep package="glib"/>
</dependencies>
<branch module="releases/cairo-1.12.8.tar.xz" version="1.12.8"
repo="cairographics.org"
@@ -72,22 +91,30 @@
<autotools id="fonts"
skip-autogen="true">
- <branch module="downloads/mrobinson/webkitgtk-test-fonts/webkitgtk-test-fonts-0.0.3.tar.gz" version="0.0.3"
- repo="github.com"
- hash="sha256:4a0a01f00855997cdcc7201f164b33a4e4144e8eadf40a5e542a1c448e035de5"
- md5sum="10e74de1a8ba961d9037994d427b1dd2">
+ <branch repo="github.com" module="mrobinson/webkitgtk-test-fonts.git" checkoutdir="webkitgtk-test-fonts" tag="0.0.4"/>
+ </autotools>
+
+ <autotools id="freetype6" autogen-sh="configure">
+ <branch module="freetype/freetype-2.4.11.tar.bz2" version="2.4.11"
+ repo="savannah.gnu.org"
+ hash="sha256:ef9d0bcb64647d9e5125dc7534d7ca371c98310fec87677c410f397f71ffbe3f"
+ md5sum="b93435488942486c8d0ca22e8f768034">
+ <patch file="freetype6-2.4.11-truetype-font-height-fix.patch" strip="1"/>
</branch>
</autotools>
- <tarball id="freetype6">
- <source href="download.savannah.gnu.org/releases/freetype/freetype-2.4.2.tar.bz2" version="2.4.2"
- hash="sha256:9a987aef8c50d9bcfdfdc9f012f8bd0de6095cc1a5524e62c1a037deb8dacbfe"
- md5sum="647ee8ed266f9a4117c8d0a4855b3d3e"/>
- </tarball>
+ <autotools id="harfbuzz" autogen-sh="configure">
+ <branch module="software/harfbuzz/release/harfbuzz-0.9.14.tar.bz2" version="0.9.14"
+ checkoutdir="harfbuzz-0.9.14"
+ repo="freedesktop.org"
+ hash="sha256:d07c0ffdbbbfdfbb6c65e73fe9c76466e87dbf04b094cbd0abf5fd7d571a4004"
+ md5sum="7e1990b79060e98e2d31f677a0ac9eed">
+ </branch>
+ </autotools>
<autotools id="libffi" autogen-sh="configure">
- <branch module="/pub/libffi/libffi-3.0.10.tar.gz" version="3.0.10"
- repo="sourceware.org"
+ <branch module="libffi/libffi-3.0.10.tar.gz" version="3.0.10"
+ repo="sourceware.org-mirror"
hash="sha256:f01eb9027e9eb56aeaeef636649877756d475d714ef8b47f627f65bc5f3b492f"
md5sum="79390673f5d07a8fb342bc09b5055b6f"/>
</autotools>
@@ -97,10 +124,10 @@
<dependencies>
<dep package="glib"/>
</dependencies>
- <branch module="/pub/GNOME/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.0.tar.xz" version="2.26.0"
+ <branch module="/pub/GNOME/sources/gdk-pixbuf/2.26/gdk-pixbuf-2.26.5.tar.xz" version="2.26.5"
repo="ftp.gnome.org"
- hash="sha256:a5028d3a33710cbb6c6264bc561b6e252b37f067dff7b5b52473621e064f254d"
- md5sum="1c186f9903a20e96587b9afb27944b40"/>
+ hash="sha256:77696fd163bca95a130a1883dbd78d0ae4d782de2fc85a9a38556d13681f5c84"
+ md5sum="339329e6d619ee3e1cb93979111b04c0"/>
</autotools>
<autotools id="librsvg" autogen-sh="configure"
@@ -114,42 +141,28 @@
md5sum="89d483f30a7c77245b7ee02faaea5a5a"/>
</autotools>
- <autotools id="pango"
- autogenargs="--disable-introspection">
- <dependencies>
- <dep package="glib"/>
- <dep package="freetype6"/>
- <dep package="cairo"/>
- </dependencies>
- <branch module="/pub/GNOME/sources/pango/1.30/pango-1.30.0.tar.xz" version="1.30.0"
- repo="ftp.gnome.org"
- hash="sha256:7c6d2ab024affaed0e942f9279b818235f9c6a36d9fc50688f48d387f4102dff"
- md5sum="2a70627ffd9f43c52c04cc0b05fe359f"/>
- </autotools>
-
<autotools id="gtk+" autogen-sh="configure"
autogenargs="--disable-introspection">
<dependencies>
<dep package="glib"/>
<dep package="cairo"/>
- <dep package="pango"/>
+ <dep package="at-spi2-atk"/>
<dep package="gdk-pixbuf"/>
</dependencies>
- <branch module="/pub/GNOME/sources/gtk+/3.4/gtk+-3.4.2.tar.xz" version="3.4.2"
+ <branch module="/pub/GNOME/sources/gtk+/3.6/gtk+-3.6.0.tar.xz" version="3.6.0"
repo="ftp.gnome.org"
- hash="sha256:b1ab72bc61434418160ff0c7edfd93c74758ed8a35e2ed3d07e3e218c2705480"
- md5sum="9e20443fbaa3ba3e9cbd2fc44d6be121"/>
+ hash="sha256:e13f45225a795ebe9e4047486fa57b3232e6a21539983775db6cd4ae9046b049"/>
</autotools>
<autotools id="glib"
+ autogen-sh="configure"
autogenargs="--disable-dtrace">
<dependencies>
<dep package="libffi"/>
</dependencies>
- <branch module="/pub/GNOME/sources/glib/2.33/glib-2.33.2.tar.xz" version="2.33.2"
+ <branch module="/pub/GNOME/sources/glib/2.36/glib-2.36.0.tar.xz" version="2.36.0"
repo="ftp.gnome.org"
- hash="sha256:b7163e9f159775d13ecfb433d67c3f0883e0e518e85b2e970d4ad9773d7cd0b4"
- md5sum="06ef0099fed22afcf34ade39ddff9a5b"/>
+ hash="sha256:455a8abe8692c5174bcc7ffa15b96a7521a2f2f9fb47594405927c35cb9bb227"/>
</autotools>
<autotools id="glib-networking">
@@ -167,9 +180,10 @@
<dependencies>
<dep package="glib-networking"/>
</dependencies>
- <branch module="libsoup" version="2.39.2"
- repo="git.gnome.org"
- tag="LIBSOUP_2_39_2"/>
+ <branch module="/pub/GNOME/sources/libsoup/2.42/libsoup-2.42.0.tar.xz" version="2.42.0"
+ repo="ftp.gnome.org"
+ hash="sha256:9e0e7eb5d3f7401ccf521fbc289fc1fa0923b7c7833729e2ed7696f7b848893e"
+ md5sum="a632a38d2983c2a88679672d00940128"/>
</autotools>
<autotools id="fontconfig" autogen-sh="configure">
@@ -191,24 +205,41 @@
</branch>
</autotools>
+ <autotools id="gnome-icon-theme-symbolic" autogen-sh="configure">
+ <dependencies>
+ <dep package="gtk+"/>
+ </dependencies>
+ <branch module="pub/GNOME/sources/gnome-icon-theme-symbolic/3.2/gnome-icon-theme-symbolic-3.2.1.tar.xz" version="3.2.1"
+ repo="ftp.gnome.org"
+ hash="sha256:a558af2f87f761f00421f49c1addd2149b70228158e09327fa861219ac1a63cb"
+ md5sum="94137d3c256f2cc80298a9bef15d68c4">
+ </branch>
+ </autotools>
+
<autotools id="gnome-themes-standard" autogen-sh="configure">
<dependencies>
<dep package="gtk+"/>
<dep package="librsvg"/>
</dependencies>
- <branch module="pub/GNOME/sources/gnome-themes-standard/3.4/gnome-themes-standard-3.4.2.tar.xz" version="3.4.2"
+ <branch module="pub/GNOME/sources/gnome-themes-standard/3.6/gnome-themes-standard-3.6.0.tar.xz" version="3.6.0"
repo="ftp.gnome.org"
- hash="sha256:aa29d23708e3357775fb7ea2de14b90551a2c732fce297f3372dae005374c3a8"
- md5sum="bbe736709a7cf00bd18f3b2b82e7a59e">
+ hash="sha256:d832fd38f7659f470df5ddc52131a59f989c75f3a70f8b3a514f89d90d4f43ec">
</branch>
</autotools>
+ <autotools id="atk"
+ autogen-sh="configure"
+ autogenargs="--disable-introspection">
+ <branch module="pub/GNOME/sources/atk/2.8/atk-2.8.0.tar.xz" version="2.8.0"
+ repo="ftp.gnome.org"
+ hash="sha256:b22519176226f3e07cf6d932b77852e6b6be4780977770704b32d0f4e0686df4"/>
+ </autotools>
+
<autotools id="at-spi2-core"
autogenargs="--disable-introspection">
- <branch module="pub/GNOME/sources/at-spi2-core/2.2/at-spi2-core-2.2.1.tar.xz" version="2.2.1"
+ <branch module="pub/GNOME/sources/at-spi2-core/2.8/at-spi2-core-2.8.0.tar.xz" version="2.8.0"
repo="ftp.gnome.org"
- hash="sha256:2a4129420decca3657e163a4dbb1a3cb28acafe32ea1292417fdd81084d48fac"
- md5sum="183916373d6906ff6b220bd44d15ff97">
+ hash="sha256:1861a30fc7f583d5a567a0ba547db67ce9bd294f0d1c9f7403c96a10a481c458">
</branch>
<dependencies>
<dep package="glib"/>
@@ -216,22 +247,70 @@
</autotools>
<autotools id="at-spi2-atk">
- <branch module="pub/GNOME/sources/at-spi2-atk/2.2/at-spi2-atk-2.2.1.tar.xz" version="2.2.1"
+ <branch module="pub/GNOME/sources/at-spi2-atk/2.8/at-spi2-atk-2.8.0.tar.xz" version="2.8.0"
repo="ftp.gnome.org"
- hash="sha256:6677def34b16c9a28d6ad96473ea56a3c0e13aa968e584df004cd44c8691ea1a"
- md5sum="19646097aca25a9c1b8ba7ab8d172916">
+ hash="sha256:4688acbc1474cda0aa49341f109ad0726603ce3e872cc6521c74931338c7ba20">
+ <patch file="at-spi2-atk-2.8.0-null-check-after-cleanup.patch" strip="1"/>
</branch>
<dependencies>
<dep package="glib"/>
+ <dep package="atk"/>
<dep package="at-spi2-core"/>
</dependencies>
</autotools>
<autotools id="libxml2">
- <branch module="/libxml2/libxml2-2.8.0.tar.gz" version="2.8.0"
+ <branch module="/libxml2/libxml2-2.9.0.tar.gz" version="2.9.0"
repo="xmlsoft.org"
- hash="sha256:f2e2d0e322685193d1affec83b21dc05d599e17a7306d7b90de95bb5b9ac622a"
- md5sum="c62106f02ee00b6437f0fb9d370c1093"/>
+ hash="sha256:ad25d91958b7212abdc12b9611cfb4dc4e5cddb6d1e9891532f48aacee422b82"
+ md5sum="5b9bebf4f5d2200ae2c4efe8fa6103f7">
+ <patch file="libxml2-2.9.0-dtd.patch" strip="1"/>
+ </branch>
+ </autotools>
+
+ <autotools id="gstreamer">
+ <branch repo="gstreamer" module="gstreamer" checkoutdir="gstreamer" tag="1.0.8"/>
+ </autotools>
+
+ <autotools id="gst-plugins-base" autogenargs="--disable-examples">
+ <dependencies>
+ <dep package="gstreamer"/>
+ </dependencies>
+ <branch repo="gstreamer" module="gst-plugins-base" checkoutdir="gst-plugins-base" tag="1.0.8"/>
+ </autotools>
+
+ <autotools id="gst-plugins-good" autogenargs="--disable-examples --disable-soup --disable-gst_v4l2 --without-libv4l2">
+ <dependencies>
+ <dep package="gst-plugins-base"/>
+ </dependencies>
+ <branch repo="gstreamer" module="gst-plugins-good" checkoutdir="gst-plugins-good" tag="1.0.8"/>
+ </autotools>
+
+ <autotools id="gst-plugins-bad" autogenargs="--disable-examples">
+ <dependencies>
+ <dep package="gst-plugins-base"/>
+ </dependencies>
+ <branch repo="gstreamer" module="gst-plugins-bad" checkoutdir="gst-plugins-bad" tag="1.0.8"/>
+ </autotools>
+
+ <autotools id="gst-libav" autogenargs="--with-libav-extra-configure='--disable-yasm'">
+ <dependencies>
+ <dep package="gst-plugins-base"/>
+ </dependencies>
+ <branch repo="gstreamer" module="gst-libav" checkoutdir="gst-libav" tag="1.0.8"/>
+ </autotools>
+
+ <autotools id="xserver" autogenargs="--disable-xinerama --enable-glx --enable-composite --disable-xorg --disable-dmx --disable-xnest --disable-xquartz --disable-xwin --disable-xephyr --disable-xfake --disable-xfbdev --disable-install-setuid --disable-unit-tests --enable-unix-transport --enable-tcp-transport --enable-local-transport --with-xkb-path=/usr/share/X11/xkb --with-xkb-output=/var/lib/xkb --with-xkb-bin-directory=/usr/bin">
+ <dependencies>
+ <dep package="pixman"/>
+ </dependencies>
+ <branch module="/releases/individual/xserver/xorg-server-1.12.4.tar.gz" version="1.12.4"
+ repo="xorg"
+ hash="sha256:d88225cd3c4a6ecd92d1360b34a0e5b6346e2a04c842c018cef36d8a370714ef"
+ md5sum="19c17bf7ac3e2ce34bc40108692c031f">
+ <patch file="xserver-remove-bogus-dependencies.patch" strip="1"/>
+ <patch file="xserver-fix-glx-init.patch" strip="1"/>
+ </branch>
</autotools>
</moduleset>
diff --git a/Tools/gtk/jhbuildrc b/Tools/gtk/jhbuildrc
index 6f33ed1ce..1d312927c 100644
--- a/Tools/gtk/jhbuildrc
+++ b/Tools/gtk/jhbuildrc
@@ -35,27 +35,30 @@ modules = [ 'webkitgtk-testing-dependencies', ]
if __extra_modules != ['']:
modules.extend(__extra_modules)
-if os.environ.has_key('WEBKITOUTPUTDIR'):
- checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKITOUTPUTDIR'], 'Dependencies', 'Source'))
- prefix = os.path.abspath(os.path.join(os.environ['WEBKITOUTPUTDIR'], 'Dependencies', 'Root'))
+if os.environ.has_key('WEBKIT_OUTPUTDIR'):
+ checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
+ prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
else:
checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
nonotify = True
notrayicon = True
-os.environ['MAKEFLAGS'] = '-j%d' % multiprocessing.cpu_count()
-# Use system libraries while building.
-if use_lib64:
- _libdir = 'lib64'
-else:
- _libdir = 'lib'
-addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', _libdir, 'pkgconfig'))
-addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig'))
-
-addpath('XDG_DATA_DIRS', '/usr/share')
-addpath('XDG_CONFIG_DIRS', '/etc/xdg')
+if 'NUMBER_OF_PROCESSORS' in os.environ:
+ jobs = os.environ['NUMBER_OF_PROCESSORS']
# GTK+ 3.0.12 misses the -lm flag when linking the tests.
module_makeargs['gtk+'] = 'LDFLAGS="-lm" ' + makeargs
+
+# Avoid runtime conflicts with GStreamer system-wide plugins. We want
+# to use only the plugins we build in JHBuild.
+os.environ['GST_PLUGIN_SYSTEM_PATH'] = ''
+
+# We often end up using the memory backend anyway, so explicitly choosing
+# it will prevent the warning message.
+os.environ['GSETTINGS_BACKEND'] = 'memory'
+
+# We always enable introspection so that we can sniff out problems with our
+# annotations sooner rather than later.
+autogenargs='--enable-introspection'
diff --git a/Tools/gtk/patches/at-spi2-atk-2.8.0-null-check-after-cleanup.patch b/Tools/gtk/patches/at-spi2-atk-2.8.0-null-check-after-cleanup.patch
new file mode 100644
index 000000000..cd13ee487
--- /dev/null
+++ b/Tools/gtk/patches/at-spi2-atk-2.8.0-null-check-after-cleanup.patch
@@ -0,0 +1,22 @@
+From 5de2b2bc9c83045a6870e13cd20bc3c2c0a1121f Mon Sep 17 00:00:00 2001
+From: Mike Gorse <mgorse@suse.com>
+Date: Wed, 10 Apr 2013 17:40:47 +0000
+Subject: Add NULL check to fix crash when receiving a dbus reply after cleanup
+
+---
+diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
+index 9683e18..b016da6 100644
+--- a/atk-adaptor/bridge.c
++++ b/atk-adaptor/bridge.c
+@@ -88,6 +88,9 @@ tally_event_reply ()
+ {
+ static int replies_received = 0;
+
++ if (!spi_global_app_data)
++ return;
++
+ replies_received++;
+ if (replies_received == 3)
+ {
+--
+cgit v0.9.1
diff --git a/Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch b/Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch
new file mode 100644
index 000000000..0ffe76b4e
--- /dev/null
+++ b/Tools/gtk/patches/freetype6-2.4.11-truetype-font-height-fix.patch
@@ -0,0 +1,39 @@
+From e0469372be3870a5ad60b2c4586e9c281357bd28 Mon Sep 17 00:00:00 2001
+From: Werner Lemberg <wl@gnu.org>
+Date: Tue, 22 Jan 2013 10:07:07 +0000
+Subject: [truetype] Fix font height.
+
+* src/truetype/ttobjs.c (tt_size_reset): The Windows rendering
+engine uses rounded values of the ascender and descender to compute
+the TrueType font height.
+---
+diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
+index c61b218..590b66c 100644
+--- a/src/truetype/ttobjs.c
++++ b/src/truetype/ttobjs.c
+@@ -4,7 +4,7 @@
+ /* */
+ /* Objects manager (body). */
+ /* */
+-/* Copyright 1996-2012 */
++/* Copyright 1996-2013 */
+ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
+ /* */
+ /* This file is part of the FreeType project, and may only be used, */
+@@ -1177,11 +1177,12 @@
+ FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );
+ metrics->descender =
+ FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );
+- metrics->height =
+- FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );
+ metrics->max_advance =
+ FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
+ metrics->x_scale ) );
++
++ /* the height is derived from rounded values */
++ metrics->height = metrics->ascender - metrics->descender;
+ }
+
+ /* compute new transformation */
+--
+cgit v0.9.0.2
diff --git a/Tools/gtk/patches/libxml2-2.9.0-dtd.patch b/Tools/gtk/patches/libxml2-2.9.0-dtd.patch
new file mode 100644
index 000000000..7ed953ba8
--- /dev/null
+++ b/Tools/gtk/patches/libxml2-2.9.0-dtd.patch
@@ -0,0 +1,27 @@
+From cf8f0424db45c43ecda812b7c238ece5e2398107 Mon Sep 17 00:00:00 2001
+From: Dan Winship <danw@gnome.org>
+Date: Fri, 21 Dec 2012 11:13:31 +0800
+Subject: [PATCH] Fix an error in the progressive DTD parsing code
+
+For https://bugzilla.gnome.org/show_bug.cgi?id=689958
+We were looking for the wrong character in the input stream
+---
+ parser.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/parser.c b/parser.c
+index c7802cf..e719c9f 100644
+--- a/parser.c
++++ b/parser.c
+@@ -12042,7 +12042,7 @@ xmlParseCheckTransition(xmlParserCtxtPtr ctxt, const char *chunk, int size) {
+ }
+ if ((ctxt->progressive == XML_PARSER_DTD) ||
+ (ctxt->instate == XML_PARSER_DTD)) {
+- if (memchr(chunk, ']', size) != NULL)
++ if (memchr(chunk, '>', size) != NULL)
+ return(1);
+ return(0);
+ }
+--
+1.8.0.1
+
diff --git a/Tools/gtk/patches/xserver-fix-glx-init.patch b/Tools/gtk/patches/xserver-fix-glx-init.patch
new file mode 100644
index 000000000..2dc965bbe
--- /dev/null
+++ b/Tools/gtk/patches/xserver-fix-glx-init.patch
@@ -0,0 +1,14 @@
+diff --git a/mi/miinitext.c b/mi/miinitext.c
+index 6ceae05..cda4e43 100644
+--- a/mi/miinitext.c
++++ b/mi/miinitext.c
+@@ -540,6 +540,9 @@ static ExtensionModule staticExtensions[] = {
+ #ifdef DAMAGE
+ {DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL},
+ #endif
++#ifdef GLXEXT
++ {GlxExtensionInit, "GLX", &noGlxExtension, NULL},
++#endif
+ {NULL, NULL, NULL, NULL, NULL}
+ };
+
diff --git a/Tools/gtk/patches/xserver-remove-bogus-dependencies.patch b/Tools/gtk/patches/xserver-remove-bogus-dependencies.patch
new file mode 100644
index 000000000..97b1a1314
--- /dev/null
+++ b/Tools/gtk/patches/xserver-remove-bogus-dependencies.patch
@@ -0,0 +1,43 @@
+From 879f42531ff04be578c39f9d44548aeb3ded67fd Mon Sep 17 00:00:00 2001
+From: Gustavo Noronha Silva <gustavo.noronha@collabora.com>
+Date: Wed, 8 May 2013 19:44:15 -0300
+Subject: [PATCH 2/2] Filter out -l parameters when setting dependencies
+
+Newer make (Fedora 19) gets confused when it finds a -l parameter in a
+dependency, and tries to make it as a target, causing the build to fail.
+
+Signed-off-by: Gustavo Noronha Silva <gustavo.noronha@collabora.com>
+---
+ hw/vfb/Makefile.am | 2 +-
+ test/Makefile.am | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
+index 9f4992c..06830ae 100644
+--- a/hw/vfb/Makefile.am
++++ b/hw/vfb/Makefile.am
+@@ -25,7 +25,7 @@ XVFB_LIBS = \
+ $(XSERVER_LIBS)
+
+ Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
+-Xvfb_DEPENDENCIES = $(XVFB_LIBS)
++Xvfb_DEPENDENCIES = $(filter-out -l%,$(XVFB_LIBS))
+ Xvfb_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
+
+ relink:
+diff --git a/test/Makefile.am b/test/Makefile.am
+index 34f53fc..3509306 100644
+--- a/test/Makefile.am
++++ b/test/Makefile.am
+@@ -117,7 +117,7 @@ libxservertest_la_LIBADD += \
+ endif
+ endif
+
+-libxservertest_la_DEPENDENCIES = $(libxservertest_la_LIBADD)
++libxservertest_la_DEPENDENCIES = $(filter-out -l%,$(libxservertest_la_LIBADD))
+ endif
+
+ EXTRA_DIST = ddxstubs.c
+--
+1.8.2.1
+
diff --git a/Tools/gtk/run-with-jhbuild b/Tools/gtk/run-with-jhbuild
deleted file mode 100755
index a9affffb9..000000000
--- a/Tools/gtk/run-with-jhbuild
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2011 Igalia S.L.
-# Copyright (C) 2012 Gustavo Noronha Silva <gns@gnome.org>
-# Copyright (C) 2012 Intel Corporation
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser 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
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-import common
-import os
-import subprocess
-import sys
-
-sys.path.append(common.top_level_path('Tools', 'jhbuild'))
-import jhbuildutils
-
-if (not os.path.exists(jhbuildutils.get_dependencies_path())):
- os.execve(sys.argv[1], sys.argv[1:], os.environ)
-else:
- wrapper = common.top_level_path('Tools', 'jhbuild', 'jhbuild-wrapper')
- os.execve(wrapper, [wrapper, '--gtk', 'run'] + sys.argv[1:], os.environ)
-
diff --git a/Tools/jhbuild/jhbuild-wrapper b/Tools/jhbuild/jhbuild-wrapper
index 40bbb0101..9d3a87b44 100755
--- a/Tools/jhbuild/jhbuild-wrapper
+++ b/Tools/jhbuild/jhbuild-wrapper
@@ -23,7 +23,7 @@ import shlex
import subprocess
import sys
-jhbuild_revision = '1eedc423f75c605224b430579e4c303292199507'
+jhbuild_revision = '496974221c3a8ac4fbbc3b0a577c71cac224130d'
dependencies_path = jhbuildutils.get_dependencies_path()
installation_prefix = os.path.abspath(os.path.join(dependencies_path, 'Root'))
diff --git a/Tools/jhbuild/jhbuildutils.py b/Tools/jhbuild/jhbuildutils.py
index c9972b85a..f68124d4d 100644
--- a/Tools/jhbuild/jhbuildutils.py
+++ b/Tools/jhbuild/jhbuildutils.py
@@ -14,8 +14,8 @@ def top_level_path(*args):
def get_dependencies_path():
- if 'WEBKITOUTPUTDIR' in os.environ:
- return os.path.abspath(os.path.join(os.environ['WEBKITOUTPUTDIR'], 'Dependencies'))
+ if 'WEBKIT_OUTPUTDIR' in os.environ:
+ return os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies'))
else:
return os.path.abspath(top_level_path('WebKitBuild', 'Dependencies'))
diff --git a/Tools/lldb/lldb_webkit.py b/Tools/lldb/lldb_webkit.py
index 37844f89b..7fb31585a 100644
--- a/Tools/lldb/lldb_webkit.py
+++ b/Tools/lldb/lldb_webkit.py
@@ -30,15 +30,16 @@
"""
import lldb
-
+import struct
def __lldb_init_module(debugger, dict):
debugger.HandleCommand('type summary add --expand -F lldb_webkit.WTFString_SummaryProvider WTF::String')
debugger.HandleCommand('type summary add --expand -F lldb_webkit.WTFStringImpl_SummaryProvider WTF::StringImpl')
debugger.HandleCommand('type summary add --expand -F lldb_webkit.WTFAtomicString_SummaryProvider WTF::AtomicString')
debugger.HandleCommand('type summary add --expand -F lldb_webkit.WTFVector_SummaryProvider -x "WTF::Vector<.+>$"')
+ debugger.HandleCommand('type summary add --expand -F lldb_webkit.WTFHashTable_SummaryProvider -x "WTF::HashTable<.+>$"')
debugger.HandleCommand('type synthetic add -x "WTF::Vector<.+>$" --python-class lldb_webkit.WTFVectorProvider')
-
+ debugger.HandleCommand('type synthetic add -x "WTF::HashTable<.+>$" --python-class lldb_webkit.WTFHashTableProvider')
def WTFString_SummaryProvider(valobj, dict):
provider = WTFStringProvider(valobj, dict)
@@ -58,6 +59,11 @@ def WTFVector_SummaryProvider(valobj, dict):
provider = WTFVectorProvider(valobj, dict)
return "{ size = %d, capacity = %d }" % (provider.size, provider.capacity)
+
+def WTFHashTable_SummaryProvider(valobj, dict):
+ provider = WTFHashTableProvider(valobj, dict)
+ return "{ tableSize = %d, keyCount = %d }" % (provider.tableSize(), provider.keyCount())
+
# FIXME: Provide support for the following types:
# def WTFVector_SummaryProvider(valobj, dict):
# def WTFCString_SummaryProvider(valobj, dict):
@@ -67,44 +73,55 @@ def WTFVector_SummaryProvider(valobj, dict):
# def JSCJSString_SummaryProvider(valobj, dict):
-def guess_string_length(valobj, error):
+def guess_string_length(valobj, charSize, error):
if not valobj.GetValue():
return 0
- for i in xrange(0, 2048):
- if valobj.GetPointeeData(i, 1).GetUnsignedInt16(error, 0) == 0:
- return i
+ maxLength = 256
- return 256
+ pointer = valobj.GetValueAsUnsigned()
+ contents = valobj.GetProcess().ReadMemory(pointer, maxLength * charSize, lldb.SBError())
+ format = 'B' if charSize == 1 else 'H'
+ for i in xrange(0, maxLength):
+ if not struct.unpack_from(format, contents, i * charSize)[0]:
+ return i
+
+ return maxLength
def ustring_to_string(valobj, error, length=None):
if length is None:
- length = guess_string_length(valobj, error)
+ length = guess_string_length(valobj, 2, error)
else:
length = int(length)
- out_string = u""
- for i in xrange(0, length):
- char_value = valobj.GetPointeeData(i, 1).GetUnsignedInt16(error, 0)
- out_string = out_string + unichr(char_value)
-
- return out_string.encode('utf-8')
+ pointer = valobj.GetValueAsUnsigned()
+ contents = valobj.GetProcess().ReadMemory(pointer, length * 2, lldb.SBError())
+ # lldb does not (currently) support returning unicode from python summary providers,
+ # so potentially convert this to ascii by escaping
+ string = contents.decode('utf16')
+ try:
+ return str(string)
+ except:
+ return string.encode('unicode_escape')
def lstring_to_string(valobj, error, length=None):
if length is None:
- length = guess_string_length(valobj, error)
+ length = guess_string_length(valobj, 1, error)
else:
length = int(length)
- out_string = u""
- for i in xrange(0, length):
- char_value = valobj.GetPointeeData(i, 1).GetUnsignedInt8(error, 0)
- out_string = out_string + unichr(char_value)
-
- return out_string.encode('utf-8')
+ pointer = valobj.GetValueAsUnsigned()
+ contents = valobj.GetProcess().ReadMemory(pointer, length, lldb.SBError())
+ # lldb does not (currently) support returning unicode from python summary providers,
+ # so potentially convert this to ascii by escaping
+ string = contents.decode('utf8')
+ try:
+ return str(string)
+ except:
+ return string.encode('unicode_escape')
class WTFStringImplProvider:
def __init__(self, valobj, dict):
@@ -158,13 +175,15 @@ class WTFVectorProvider:
self.update()
def num_children(self):
- return self.size + 2
+ return self.size + 3
def get_child_index(self, name):
if name == "m_size":
return self.size
- elif name == "m_buffer":
+ elif name == "m_capacity":
return self.size + 1
+ elif name == "m_buffer":
+ return self.size + 2
else:
return int(name.lstrip('[').rstrip(']'))
@@ -172,7 +191,9 @@ class WTFVectorProvider:
if index == self.size:
return self.valobj.GetChildMemberWithName("m_size")
elif index == self.size + 1:
- return self.vector_buffer
+ return self.valobj.GetChildMemberWithName("m_capacity")
+ elif index == self.size + 2:
+ return self.buffer
elif index < self.size:
offset = index * self.data_size
child = self.buffer.CreateChildAtOffset('[' + str(index) + ']', offset, self.data_type)
@@ -181,12 +202,64 @@ class WTFVectorProvider:
return None
def update(self):
- self.vector_buffer = self.valobj.GetChildMemberWithName('m_buffer')
- self.buffer = self.vector_buffer.GetChildMemberWithName('m_buffer')
+ self.buffer = self.valobj.GetChildMemberWithName('m_buffer')
self.size = self.valobj.GetChildMemberWithName('m_size').GetValueAsUnsigned(0)
- self.capacity = self.vector_buffer.GetChildMemberWithName('m_capacity').GetValueAsUnsigned(0)
+ self.capacity = self.buffer.GetChildMemberWithName('m_capacity').GetValueAsUnsigned(0)
self.data_type = self.buffer.GetType().GetPointeeType()
self.data_size = self.data_type.GetByteSize()
def has_children(self):
return True
+
+
+class WTFHashTableProvider:
+ def __init__(self, valobj, internal_dict):
+ self.valobj = valobj
+ self.update()
+
+ def num_children(self):
+ return self.tableSize() + 5
+
+ def get_child_index(self, name):
+ if name == "m_table":
+ return self.tableSize()
+ elif name == "m_tableSize":
+ return self.tableSize() + 1
+ elif name == "m_tableSizeMask":
+ return self.tableSize() + 2
+ elif name == "m_keyCount":
+ return self.tableSize() + 3
+ elif name == "m_deletedCount":
+ return self.tableSize() + 4
+ else:
+ return int(name.lstrip('[').rstrip(']'))
+
+ def get_child_at_index(self, index):
+ if index == self.tableSize():
+ return self.valobj.GetChildMemberWithName('m_table')
+ elif index == self.tableSize() + 1:
+ return self.valobj.GetChildMemberWithName('m_tableSize')
+ elif index == self.tableSize() + 2:
+ return self.valobj.GetChildMemberWithName('m_tableSizeMask')
+ elif index == self.tableSize() + 3:
+ return self.valobj.GetChildMemberWithName('m_keyCount')
+ elif index == self.tableSize() + 4:
+ return self.valobj.GetChildMemberWithName('m_deletedCount')
+ elif index < self.tableSize():
+ table = self.valobj.GetChildMemberWithName('m_table')
+ return table.CreateChildAtOffset('[' + str(index) + ']', index * self.data_size, self.data_type)
+ else:
+ return None
+
+ def tableSize(self):
+ return self.valobj.GetChildMemberWithName('m_tableSize').GetValueAsUnsigned(0)
+
+ def keyCount(self):
+ return self.valobj.GetChildMemberWithName('m_keyCount').GetValueAsUnsigned(0)
+
+ def update(self):
+ self.data_type = self.valobj.GetType().GetTemplateArgumentType(0)
+ self.data_size = self.data_type.GetByteSize()
+
+ def has_children(self):
+ return True
diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf
index 9d88dff39..f295f4641 100644
--- a/Tools/qmake/mkspecs/features/configure.prf
+++ b/Tools/qmake/mkspecs/features/configure.prf
@@ -96,7 +96,7 @@ defineTest(finalizeConfigure) {
win32|!enable?(NETSCAPE_PLUGIN_API): WEBKIT_CONFIG -= build_test_npapi
- wince* {
+ win* {
WEBKIT_CONFIG -= build_drt
}
diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf
index 7516bcf38..6fae22fa3 100644
--- a/Tools/qmake/mkspecs/features/default_post.prf
+++ b/Tools/qmake/mkspecs/features/default_post.prf
@@ -11,7 +11,13 @@
CONFIG += config_step
# Enable dynamic instead of static libraries for development
-!production_build:!buildbot:!win*: CONFIG += force_static_libs_as_shared
+# Avoid it with debug_and_release, it can cause the application to load both the debug and release
+# dependent libraries when using frameworks on Mac.
+!production_build:!debug_and_release:!buildbot:!win*:!build?(webkit2): CONFIG += force_static_libs_as_shared
+
+# Don't create .prl files for intermediate libraries because their contents get used when linking against
+# them, breaking "-Wl,-whole-archive -lMyIntermediateLib --Wl,-no-whole-archive"
+staticlib: CONFIG -= create_prl
root_project_file: finalizeConfigure()
@@ -20,7 +26,11 @@ root_project_file: finalizeConfigure()
# Removing debug_and_release causes issues with lib suffixes when building debug on Windows.
# Work around it by only removing build_all, and still create the Makefiles for both configurations.
win32*: CONFIG -= build_all
- else: CONFIG -= debug_and_release
+ else: {
+ CONFIG -= debug_and_release
+ # Default to release
+ !debug:!release: CONFIG += release
+ }
} else:debug_and_release {
# Only build a single instance of each application
contains(TEMPLATE, app):!force_build_all {
@@ -43,7 +53,7 @@ INCLUDEPATH += \
CONFIG -= warn_on
-*-g++*: QMAKE_CXXFLAGS = \
+!compiling_thirdparty_code:*-g++*: QMAKE_CXXFLAGS = \
-Wall \
-Wextra \
-Wreturn-type \
@@ -117,6 +127,9 @@ contains(TEMPLATE, derived) {
} else {
# Make sure the generated sources are compiled as well
for(generator, GENERATORS) {
+ prependEach($${generator}.extra_sources, $${GENERATED_SOURCES_DESTDIR}/)
+ SOURCES += $$eval($${generator}.extra_sources)
+
isEqual($${generator}.add_output_to_sources, false): next()
output = $$eval($${generator}.output)
@@ -142,37 +155,6 @@ contains(TEMPLATE, derived) {
eval($$output_variable += $$output_file)
}
}
-
- prependEach($${generator}.extra_sources, $${GENERATED_SOURCES_DESTDIR}/)
- SOURCES += $$eval($${generator}.extra_sources)
- }
-}
-
-contains(TEMPLATE, lib) {
- # Triggers the right export macros for WebKit internals
- DEFINES += BUILDING_$${TARGET}
-
- # Triggers the right export macro for the QtWebKit API (see qwebkitglobal.h)
- !contains(QT, webkit)|equals(MODULE, webkitwidgets): DEFINES += BUILDING_WEBKIT
-
- # Prevent name clashes when building both debug and release. Qt5's module
- # system already takes care of this for the top level QtWebKit library.
- !qt_install_module:debug_and_release: TARGET = $$qtLibraryTarget($$TARGET)
-
- gnu_thin_archives {
- # Replace the hardcoded archiver command line
- # options to use GNU ar's thin archive format.
- AR_COMMAND = $$split(QMAKE_AR, " ")
- QMAKE_AR = $$member(AR_COMMAND, 0) cruT
- }
-
- isEmpty(DESTDIR): DESTDIR = $$targetSubDir()
-
- DEFINES += QT_ASCII_CAST_WARNINGS
-
- !plugin {
- contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
- unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
}
}
@@ -278,10 +260,32 @@ incremental.target = incremental
incremental.commands = $(MAKE) -f $(MAKEFILE) qmake_all && $(MAKE) -f $(MAKEFILE)
QMAKE_EXTRA_TARGETS += incremental
-# Don't set OBJECTS_DIR for subdirs, as that will unconditionally
-# create the directory, even if we're not using it.
-contains(TEMPLATE, subdirs) {
- unset(OBJECTS_DIR)
+contains(TEMPLATE, lib) {
+ # Triggers the right export macros for WebKit internals
+ DEFINES += BUILDING_$${TARGET}
+
+ # Triggers the right export macro for the QtWebKit API (see qwebkitglobal.h)
+ !contains(QT, webkit)|equals(MODULE, webkitwidgets): DEFINES += BUILDING_WEBKIT
+
+ # Prevent name clashes when building both debug and release. Qt5's module
+ # system already takes care of this for the top level QtWebKit library.
+ !qt_install_module:debug_and_release: TARGET = $$qtLibraryTarget($$TARGET)
+
+ gnu_thin_archives {
+ # Replace the hardcoded archiver command line
+ # options to use GNU ar's thin archive format.
+ AR_COMMAND = $$split(QMAKE_AR, " ")
+ QMAKE_AR = $$member(AR_COMMAND, 0) cruT
+ }
+
+ isEmpty(DESTDIR): DESTDIR = $$targetSubDir()
+
+ DEFINES += QT_ASCII_CAST_WARNINGS
+
+ !plugin {
+ contains(QT_CONFIG, reduce_exports):CONFIG += hide_symbols
+ unix:contains(QT_CONFIG, reduce_relocations):CONFIG += bsymbolic_functions
+ }
}
# Remove duplicated sources
@@ -309,6 +313,6 @@ for(target, $$list($$unique(DEFAULT_TARGETS))) {
# desination dir is absolute and contains a static path component
# that also contains either of those two words, so we make DESTDIR
# relative.
-DESTDIR = $$replace(DESTDIR, ^$${ROOT_BUILD_DIR}, $${BUILD_ROOT_RELATIVE_TO_OUT_PWD})
+DESTDIR = $$replace(DESTDIR, ^$$re_escape($${ROOT_BUILD_DIR}), $${BUILD_ROOT_RELATIVE_TO_OUT_PWD})
load(default_post) # Load Qt's defaults
diff --git a/Tools/qmake/mkspecs/features/default_pre.prf b/Tools/qmake/mkspecs/features/default_pre.prf
index 57513accc..432ce7998 100644
--- a/Tools/qmake/mkspecs/features/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/default_pre.prf
@@ -18,8 +18,8 @@ isEmpty(pro_file): CONFIG += recursive_include
# Resolve root directories for source and build
ROOT_WEBKIT_DIR = $$replace(PWD, /Tools/qmake/mkspecs/features$,)
-WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $${ROOT_WEBKIT_DIR},)
-ROOT_BUILD_DIR = $$replace(OUT_PWD, $${WEBKIT_SUBDIR}$,)
+WEBKIT_SUBDIR = $$replace(_PRO_FILE_PWD_, $$re_escape($${ROOT_WEBKIT_DIR}),)
+ROOT_BUILD_DIR = $$replace(OUT_PWD, $$re_escape($${WEBKIT_SUBDIR})$,)
# Now we're ready to load default_pre from Qt
load(default_pre)
@@ -28,7 +28,7 @@ equals(OUT_PWD, $${ROOT_BUILD_DIR}) {
!recursive_include:CONFIG += root_project_file
BUILD_ROOT_RELATIVE_TO_OUT_PWD = .
} else {
- subdir_parts = $$replace(OUT_PWD, ^$${ROOT_BUILD_DIR}/,)
+ subdir_parts = $$replace(OUT_PWD, ^$$re_escape($${ROOT_BUILD_DIR})/,)
subdir_parts = $$split(subdir_parts, /)
for(subdir, subdir_parts) {
BUILD_ROOT_RELATIVE_TO_OUT_PWD += ..
diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf
index 66d3b5b6a..3b23d779f 100644
--- a/Tools/qmake/mkspecs/features/features.prf
+++ b/Tools/qmake/mkspecs/features/features.prf
@@ -22,6 +22,7 @@ defineTest(detectFeatures) {
}
WEBKIT_CONFIG += use_tiled_backing_store
+ WEBKIT_CONFIG += use_cross_platform_context_menus
# ------------- Prepare for feature detection -------------
@@ -36,6 +37,8 @@ defineTest(detectFeatures) {
qtHaveModule(printsupport): WEBKIT_CONFIG += have_qtprintsupport
qtHaveModule(widgets): WEBKIT_CONFIG += have_qstyle
qtHaveModule(testlib): WEBKIT_CONFIG += have_qttestlib
+# qtHaveModule(location): WEBKIT_CONFIG += have_qtlocation
+ qtHaveModule(sensors): WEBKIT_CONFIG += have_qtsensors
config_libxml2: WEBKIT_CONFIG += use_libxml2
config_libxslt: WEBKIT_CONFIG += xslt
@@ -71,7 +74,7 @@ defineTest(detectFeatures) {
plugin_architecture_x11 \
plugin_process
- } else: mac|win32 {
+ } else: unix|win32-*:!embedded:!wince* {
WEBKIT_CONFIG += netscape_plugin_api
# WebKit2
WEBKIT_CONFIG += plugin_architecture_unsupported
@@ -94,11 +97,13 @@ defineTest(detectFeatures) {
# Enable CSS shaders when CSS filters and WebGL are enabled
enable?(css_filters):enable?(webgl): WEBKIT_CONFIG += css_shaders
- # Geolocation support if QtMobility exists
- qtHaveModule(location): WEBKIT_CONFIG += geolocation
+ # Geolocation support if QtLocation exists or if we're doing a developer build (Mock implementation exists
+ # and used for layout tests)
+ have?(qtlocation)|!production_build: WEBKIT_CONFIG += geolocation
- # Orientation support
- qtHaveModule(sensors): WEBKIT_CONFIG += orientation_events device_orientation
+ # Orientation support if QtSensors exists or if we're doing a developer build (Mock implementation exists
+ # and used for layout tests)
+ have?(qtsensors)|!production_build: WEBKIT_CONFIG += orientation_events device_orientation
# HTML5 Media Support for non-Mac builds
!mac {
@@ -115,6 +120,10 @@ defineTest(detectFeatures) {
WEBKIT_CONFIG += video use_qt_multimedia
}
+ !enable?(video) {
+ CONFIGURE_WARNINGS += "Missing GStreamer, QTKit or QtMultimedia, disabling media element support"
+ }
+
# Try to use an system wide SQlite installation
if(!contains(QT_CONFIG, no-pkg-config):packagesExist("sqlite3"))|mac {
WEBKIT_CONFIG += have_sqlite3
@@ -138,8 +147,6 @@ defineTest(detectFeatures) {
enable?(touch_events): WEBKIT_CONFIG += touch_slider
- # Minibrowser must be able to query for QtTestSupport
- build?(qttestsupport): WEBKIT_CONFIG += have_qttestsupport
# ---------------- Sanitize features -------------------
@@ -163,5 +170,11 @@ defineTest(santizeFeatures) {
# WK2's plugin process code requires NPAPI
!enable?(netscape_plugin_api): WEBKIT_CONFIG -= plugin_process
+ # Web Audio requires GStreamer.
+ !use?(gstreamer): WEBKIT_CONFIG -= web_audio
+
+ # Minibrowser must be able to query for QtTestSupport
+ build?(qttestsupport): WEBKIT_CONFIG += have_qttestsupport
+
export(WEBKIT_CONFIG)
}
diff --git a/Tools/qmake/mkspecs/features/features.pri b/Tools/qmake/mkspecs/features/features.pri
index 91a34cf79..10788504d 100644
--- a/Tools/qmake/mkspecs/features/features.pri
+++ b/Tools/qmake/mkspecs/features/features.pri
@@ -15,9 +15,10 @@
FEATURE_DEFAULTS = \
ENABLE_3D_RENDERING=1 \
ENABLE_ACCELERATED_2D_CANVAS=0 \
- ENABLE_ANIMATION_API=0 \
ENABLE_BATTERY_STATUS=0 \
ENABLE_BLOB=1 \
+ ENABLE_CANVAS_PATH=1 \
+ ENABLE_CANVAS_PROXY=0 \
ENABLE_CHANNEL_MESSAGING=1 \
ENABLE_CSP_NEXT=0 \
ENABLE_CSS_BOX_DECORATION_BREAK=1 \
@@ -31,11 +32,13 @@ FEATURE_DEFAULTS = \
ENABLE_CSS_IMAGE_SET=1 \
ENABLE_CSS_REGIONS=1 \
ENABLE_CSS_SHADERS=0 \
+ ENABLE_CSS_SHAPES=1 \
ENABLE_CSS_STICKY_POSITION=1 \
+ ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 \
ENABLE_CSS_VARIABLES=0 \
- ENABLE_CSS3_BACKGROUND=0 \
ENABLE_CSS3_CONDITIONAL_RULES=0 \
ENABLE_CSS3_TEXT=0 \
+ ENABLE_CSS3_TEXT_LINE_BREAK=0 \
ENABLE_DASHBOARD_SUPPORT=0 \
ENABLE_DATAGRID=0 \
ENABLE_DATALIST_ELEMENT=1 \
@@ -47,6 +50,7 @@ FEATURE_DEFAULTS = \
ENABLE_FAST_MOBILE_SCROLLING=1 \
ENABLE_FILE_SYSTEM=0 \
ENABLE_FILTERS=1 \
+ ENABLE_FONT_LOAD_EVENTS=0 \
ENABLE_FTPDIR=1 \
ENABLE_FULLSCREEN_API=1 \
ENABLE_GAMEPAD=0 \
@@ -59,7 +63,7 @@ FEATURE_DEFAULTS = \
ENABLE_INPUT_SPEECH=0 \
ENABLE_INPUT_TYPE_COLOR=1 \
ENABLE_INPUT_TYPE_DATE=0 \
- ENABLE_INPUT_TYPE_DATETIME=0 \
+ ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0 \
ENABLE_INPUT_TYPE_DATETIMELOCAL=0 \
ENABLE_INPUT_TYPE_MONTH=0 \
ENABLE_INPUT_TYPE_TIME=0 \
@@ -71,8 +75,8 @@ FEATURE_DEFAULTS = \
ENABLE_LEGACY_NOTIFICATIONS=1 \
ENABLE_LEGACY_VIEWPORT_ADAPTION=1 \
ENABLE_LEGACY_VENDOR_PREFIXES=1 \
+ ENABLE_LEGACY_WEB_AUDIO=1 \
ENABLE_LINK_PREFETCH=1 \
- ENABLE_LINK_PRERENDER=0 \
ENABLE_MATHML=0 \
ENABLE_MEDIA_SOURCE=0 \
ENABLE_MEDIA_STATISTICS=0 \
@@ -80,10 +84,11 @@ FEATURE_DEFAULTS = \
ENABLE_METER_ELEMENT=1 \
ENABLE_MHTML=1 \
ENABLE_MICRODATA=0 \
- ENABLE_MUTATION_OBSERVERS=1 \
+ ENABLE_MOUSE_CURSOR_SCALE=0 \
ENABLE_NAVIGATOR_CONTENT_UTILS=0 \
ENABLE_NETSCAPE_PLUGIN_API=0 \
ENABLE_NETWORK_INFO=0 \
+ ENABLE_NOSNIFF=0 \
ENABLE_NOTIFICATIONS=1 \
ENABLE_ORIENTATION_EVENTS=0 \
ENABLE_PAGE_VISIBILITY_API=1 \
@@ -91,24 +96,29 @@ FEATURE_DEFAULTS = \
ENABLE_PROXIMITY_EVENTS=0 \
ENABLE_QUOTA=0 \
ENABLE_RESOLUTION_MEDIA_QUERY=1 \
+ ENABLE_RESOURCE_TIMING=0 \
ENABLE_REQUEST_ANIMATION_FRAME=1 \
ENABLE_SCRIPTED_SPEECH=0 \
+ ENABLE_SECCOMP_FILTERS=0 \
ENABLE_SHADOW_DOM=0 \
ENABLE_SHARED_WORKERS=1 \
ENABLE_SMOOTH_SCROLLING=1 \
ENABLE_SQL_DATABASE=1 \
ENABLE_STYLE_SCOPED=0 \
+ ENABLE_SUBPIXEL_LAYOUT=1 \
ENABLE_SVG=1 \
- ENABLE_SVG_DOM_OBJC_BINDINGS=0 \
ENABLE_SVG_FONTS=1 \
+ ENABLE_TEMPLATE_ELEMENT=0 \
ENABLE_TEXT_AUTOSIZING=0 \
- ENABLE_TEXT_NOTIFICATIONS_ONLY=0 \
+ ENABLE_THREADED_HTML_PARSER=0 \
ENABLE_TOUCH_ADJUSTMENT=1 \
ENABLE_TOUCH_EVENTS=1 \
ENABLE_TOUCH_ICON_LOADING=0 \
+ ENABLE_USER_TIMING=0 \
ENABLE_VIBRATION=0 \
ENABLE_VIDEO=0 \
ENABLE_VIDEO_TRACK=0 \
+ ENABLE_VIEW_MODE_CSS_MEDIA=1 \
ENABLE_WEBGL=0 \
ENABLE_WEB_AUDIO=0 \
ENABLE_WEB_SOCKETS=1 \
diff --git a/Tools/qmake/mkspecs/features/functions.prf b/Tools/qmake/mkspecs/features/functions.prf
index 922ac3236..aedf0007b 100644
--- a/Tools/qmake/mkspecs/features/functions.prf
+++ b/Tools/qmake/mkspecs/features/functions.prf
@@ -57,7 +57,7 @@ defineReplace(computeSubdirVariables) {
}
# Make directory relative
- !isEmpty(subdirectory):subdirectory = $$replace(subdirectory, ^$${_PRO_FILE_PWD_}/,)
+ !isEmpty(subdirectory):subdirectory = $$replace(subdirectory, ^$$re_escape($${_PRO_FILE_PWD_})/,)
!isEmpty(subdirectory) {
subdir_command = cd $$toSystemPath($${subdirectory}$${QMAKE_DIR_SEP}) &&
@@ -133,8 +133,8 @@ defineTest(addStrictSubdirOrderBetween) {
}
# Make sure the order is right
- SUBDIRS -= $$firstSubdir $$secondSubdir
- SUBDIRS += $$firstSubdir $$secondSubdir
+ SUBDIRS -= $$secondSubdir
+ SUBDIRS += $$secondSubdir
NO_RECURSIVE_QMAKE_SUBDIRS += $$firstSubdir $$secondSubdir
CONFIG *= ordered
@@ -260,7 +260,7 @@ defineTest(linkAgainstLibrary) {
target = $$resolveFinalLibraryName($$target)
- path = $$replace(source_dir, $${ROOT_WEBKIT_DIR}, $${ROOT_BUILD_DIR})/$$targetSubDir()
+ path = $$replace(source_dir, $$re_escape($${ROOT_WEBKIT_DIR}), $${ROOT_BUILD_DIR})/$$targetSubDir()
force_static_libs_as_shared {
LIBS += -L$${ROOT_BUILD_DIR}/lib -l$$target
diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf
index 8aee30fda..8c36146b6 100644
--- a/Tools/qmake/mkspecs/features/unix/default_post.prf
+++ b/Tools/qmake/mkspecs/features/unix/default_post.prf
@@ -10,6 +10,10 @@
linux-g++*:isEqual(QT_ARCH,i386) {
QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse
QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
+
+ # Use the stabs format for 32 bit debug builds to make the object files a bit smaller.
+ QMAKE_CXXFLAGS_DEBUG -= -g
+ QMAKE_CXXFLAGS_DEBUG += -gstabs
}
linux-*g++* {
diff --git a/Tools/qmake/mkspecs/features/unix/default_pre.prf b/Tools/qmake/mkspecs/features/unix/default_pre.prf
index 60de13338..67cfff8f7 100644
--- a/Tools/qmake/mkspecs/features/unix/default_pre.prf
+++ b/Tools/qmake/mkspecs/features/unix/default_pre.prf
@@ -12,7 +12,12 @@ CONFIG += object_parallel_to_source
SBOX_CHECK = $$(_SBOX_DIR)
!isEmpty(SBOX_CHECK): CONFIG += scratchbox
+# If Qt is configured with embedded or QPA we set a convenience config
+# flag that can be used to test for either of these situations.
+contains(QT_CONFIG, qpa)|contains(QT_CONFIG, embedded): CONFIG += embedded
+
# Reduce linking memory pressure on 32-bit debug builds on Linux
linux-g++*:CONFIG(debug, debug|release):isEqual(QT_ARCH,i386): CONFIG += use_all_in_one_files
+*clang: CONFIG += c++11
load(default_pre)
diff --git a/Tools/qmake/mkspecs/features/webkit_modules.prf b/Tools/qmake/mkspecs/features/webkit_modules.prf
index 189387835..2a520d7f4 100644
--- a/Tools/qmake/mkspecs/features/webkit_modules.prf
+++ b/Tools/qmake/mkspecs/features/webkit_modules.prf
@@ -7,7 +7,7 @@
# Reorder libraries so that the link and include order is correct,
# and make sure the case matches the original case.
-libraries = WebKit1 WebKit2 WebCore ANGLE JavaScriptCore WTF
+libraries = WebKit1 WebKit2QML WebKit2 WebCore ANGLE JavaScriptCore WTF
for(library, libraries) {
contains(WEBKIT, $$lower($$library)) {
WEBKIT -= $$lower($$library)
diff --git a/Tools/qmake/mkspecs/modules/webkit2qml.prf b/Tools/qmake/mkspecs/modules/webkit2qml.prf
new file mode 100644
index 000000000..06566f4b9
--- /dev/null
+++ b/Tools/qmake/mkspecs/modules/webkit2qml.prf
@@ -0,0 +1,9 @@
+# -------------------------------------------------------------------
+# Module file for WebKit2, used by targets that depend on WebKit2
+#
+# See 'Tools/qmake/README' for an overview of the build system
+# -------------------------------------------------------------------
+
+WEBKIT.webkit2qml.root_source_dir = $${ROOT_WEBKIT_DIR}/Source/WebKit2
+
+#include($${WEBKIT.webkit2.root_source_dir}/WebKit2QML.pri)
diff --git a/Tools/record-memory-win/record-memory-win-common.vsprops b/Tools/record-memory-win/record-memory-win-common.vsprops
deleted file mode 100644
index 695466cc7..000000000
--- a/Tools/record-memory-win/record-memory-win-common.vsprops
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-win-common"
- >
- <Tool
- Name="VCLinkerTool"
- SubSystem="1"
- />
-</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-win.vcproj b/Tools/record-memory-win/record-memory-win.vcproj
deleted file mode 100644
index 236545441..000000000
--- a/Tools/record-memory-win/record-memory-win.vcproj
+++ /dev/null
@@ -1,414 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-win"
- ProjectGUID="{44B9C152-1870-4035-B94D-7B3285AA0C12}"
- RootNamespace="recordmemorywin"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\record-memory-winRelease.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Production|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\record-memory-winProduction.vsprops"
- CharacterSet="1"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\record-memory-winDebug.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_All|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\record-memory-winDebugAll.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\record-memory-winReleaseCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Debug_Cairo_CFLite|Win32"
- ConfigurationType="1"
- InheritedPropertySheets=".\record-memory-winDebugCairoCFLite.vsprops"
- CharacterSet="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\main.cpp"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- </Filter>
- <Filter
- Name="Resource Files"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/record-memory-win/record-memory-winDebug.vsprops b/Tools/record-memory-win/record-memory-winDebug.vsprops
deleted file mode 100644
index 3d572067f..000000000
--- a/Tools/record-memory-win/record-memory-winDebug.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-winDebug"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;.\record-memory-win-common.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-winDebugAll.vsprops b/Tools/record-memory-win/record-memory-winDebugAll.vsprops
deleted file mode 100644
index 7a9b876da..000000000
--- a/Tools/record-memory-win/record-memory-winDebugAll.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-winDebugAll"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_all.vsprops;.\record-memory-win-common.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops b/Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops
deleted file mode 100644
index 09f93ba0e..000000000
--- a/Tools/record-memory-win/record-memory-winDebugCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-winDebugCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\debug_wincairo.vsprops;.\record-memory-win-common.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-winProduction.vsprops b/Tools/record-memory-win/record-memory-winProduction.vsprops
deleted file mode 100644
index 441aee773..000000000
--- a/Tools/record-memory-win/record-memory-winProduction.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-winProduction"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\production.vsprops;.\record-memory-win-common.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-winRelease.vsprops b/Tools/record-memory-win/record-memory-winRelease.vsprops
deleted file mode 100644
index 144bea3f1..000000000
--- a/Tools/record-memory-win/record-memory-winRelease.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-winRelease"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;.\record-memory-win-common.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops b/Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops
deleted file mode 100644
index 20a2983bd..000000000
--- a/Tools/record-memory-win/record-memory-winReleaseCairoCFLite.vsprops
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
- ProjectType="Visual C++"
- Version="8.00"
- Name="record-memory-winReleaseCairoCFLite"
- InheritedPropertySheets="$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\common.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\releaseproduction.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\release.vsprops;$(WebKitVSPropsRedirectionDir)..\..\WebKitLibraries\win\tools\vsprops\WinCairo.vsprops;.\record-memory-win-common.vsprops"
- >
-</VisualStudioPropertySheet>
diff --git a/Tools/svn-config b/Tools/svn-config
new file mode 100644
index 000000000..2684c7cbf
--- /dev/null
+++ b/Tools/svn-config
@@ -0,0 +1,11 @@
+# This file contains the expected SVN config for developing WebKit.
+# You may either copy it to ~/.subversion/config or merge it with your existing SVN configuration.
+
+[miscellany]
+enable-auto-props = yes
+
+[auto-props]
+*.png = svn:mime-type=image/png
+*.sln = svn:eol-style=native
+*.vcproj = svn:eol-style=native
+*.vsprops = svn:eol-style=native \ No newline at end of file
diff --git a/Tools/waf/build/build_utils.py b/Tools/waf/build/build_utils.py
deleted file mode 100644
index 50a88c27a..000000000
--- a/Tools/waf/build/build_utils.py
+++ /dev/null
@@ -1,249 +0,0 @@
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# Helper functions for the WebKit build.
-
-import commands
-import glob
-import os
-import platform
-import re
-import shutil
-import socket
-import sys
-import urllib2
-import urllib
-import urlparse
-
-
-def get_output(command):
- """
- Windows-compatible function for getting output from a command.
- """
- if sys.platform.startswith('win'):
- f = os.popen(command)
- return f.read().strip()
- else:
- return commands.getoutput(command)
-
-
-def get_excludes(root, patterns):
- """
- Get a list of exclude patterns for root and all its subdirs.
- """
- excludes = []
-
- for afile in os.listdir(root):
- fullpath = os.path.join(root, afile)
- if os.path.isdir(fullpath):
- excludes.extend(get_excludes(fullpath, patterns))
-
- for pattern in patterns:
- adir = root + os.sep + pattern
- files = glob.glob(adir)
- for afile in files:
- excludes.append(os.path.basename(afile))
-
- return excludes
-
-def get_excludes_in_dirs(dirs, patterns):
- excludes = []
- for adir in dirs:
- excludes.extend(get_excludes(adir, patterns))
- return excludes
-
-def get_dirs_for_features(root, features, dirs):
- """
- Find which directories to include in the list of build dirs based upon the
- enabled port(s) and features.
- """
- outdirs = dirs
- for adir in dirs:
- for feature in features:
- relpath = os.path.join(adir, feature)
- featuredir = os.path.join(root, relpath)
- if os.path.exists(featuredir) and not relpath in outdirs:
- outdirs.append(relpath)
-
- return outdirs
-
-
-def download_if_newer(url, destdir):
- """
- Checks if the file on the server is newer than the one in the user's tree,
- and if so, downloads it.
-
- Returns the filename of the downloaded file if downloaded, or None if
- the existing file matches the one on the server.
- """
- obj = urlparse.urlparse(url)
- filename = os.path.basename(obj.path)
- destfile = os.path.join(destdir, filename)
-
- try:
- urlobj = urllib2.urlopen(url, timeout=20)
- except:
- if os.path.exists(destfile):
- return None # We've at least got a file, use it for now.
- else:
- raise
- size = long(urlobj.info().getheader('Content-Length'))
-
- def download_callback(downloaded, block_size, total_size):
- downloaded = block_size * downloaded
- if downloaded > total_size:
- downloaded = total_size
- sys.stdout.write('%s %d of %d bytes downloaded\r' % (filename, downloaded, total_size))
-
- try:
- urlobj = urllib.urlopen(url)
- size = long(urlobj.info().getheader('Content-Length'))
-
- # NB: We don't check modified time as Python doesn't yet handle timezone conversion
- # properly when converting strings to time objects.
- if not os.path.exists(destfile) or os.path.getsize(destfile) != size:
- urllib.urlretrieve(url, destfile, download_callback)
- print ''
- return destfile
- except Exception, e:
- # if there's a connection error, just ignore it
- print e
- pass
-
- return None
-
-
-def update_wx_deps(conf, wk_root, msvc_version='msvc2008'):
- """
- Download and update tools needed to build the wx port.
- """
- import Logs
- Logs.info('Ensuring wxWebKit dependencies are up-to-date.')
-
- wklibs_dir = os.path.join(wk_root, 'WebKitLibraries')
- waf = download_if_newer('http://wxwebkit.kosoftworks.com/downloads/deps/waf', os.path.join(wk_root, 'Tools', 'wx'))
- if waf:
- # TODO: Make the build restart itself after an update.
- Logs.warn('Build system updated, please restart build.')
- sys.exit(1)
-
- # since this module is still experimental
- wxpy_dir = os.path.join(wk_root, 'Source', 'WebKit', 'wx', 'bindings', 'python')
- swig_module = download_if_newer('http://wxwebkit.kosoftworks.com/downloads/deps/swig.py.txt', wxpy_dir)
- if swig_module:
- shutil.copy(os.path.join(wxpy_dir, 'swig.py.txt'), os.path.join(wxpy_dir, 'swig.py'))
-
- if sys.platform.startswith('win'):
- Logs.info('downloading deps package')
- archive = download_if_newer('http://wxwebkit.kosoftworks.com/downloads/deps/wxWebKitDeps-%s.zip' % msvc_version, wklibs_dir)
- if archive and os.path.exists(archive):
- os.system('unzip -o %s -d %s' % (archive, os.path.join(wklibs_dir, msvc_version)))
-
- elif sys.platform.startswith('darwin'):
- # export the right compiler for building the dependencies
- if platform.release().startswith('10'): # Snow Leopard
- os.environ['CC'] = conf.env['CC'][0]
- os.environ['CXX'] = conf.env['CXX'][0]
- os.system('%s/Tools/wx/install-unix-extras' % wk_root)
-
-
-def includeDirsForSources(sources):
- include_dirs = []
- for group in sources:
- for source in group:
- dirname = os.path.dirname(source)
- if not dirname in include_dirs:
- include_dirs.append(dirname)
-
- return include_dirs
-
-
-def flattenSources(sources):
- flat_sources = []
- for group in sources:
- flat_sources.extend(group)
-
- return flat_sources
-
-def git_branch_name():
- try:
- branches = commands.getoutput("git branch --no-color")
- match = re.search('^\* (.*)', branches, re.MULTILINE)
- if match:
- return "%s" % match.group(1)
- except:
- pass
-
- return ""
-
-def is_git_branch_build():
- branch = git_branch_name()
- is_branch_build = commands.getoutput("git config --bool branch.%s.webKitBranchBuild" % branch)
- if is_branch_build == "true":
- return True
- elif is_branch_build == "false":
- return False
-
- # not defined for this branch, use the default
- is_branch_build = commands.getoutput("git config --bool core.webKitBranchBuild")
- return is_branch_build == "true"
-
-def get_base_product_dir(wk_root):
- build_dir = os.path.join(wk_root, 'WebKitBuild')
- git_branch = git_branch_name()
- if git_branch != "" and is_git_branch_build():
- build_dir = os.path.join(build_dir, git_branch)
-
- return build_dir
-
-def get_config(wk_root):
- config_file = os.path.join(get_base_product_dir(wk_root), 'Configuration')
- config = 'Debug'
-
- if os.path.exists(config_file):
- config = open(config_file).read()
-
- return config
-
-
-def get_arch(wk_root):
- arch_file = os.path.join(get_base_product_dir(wk_root), 'Architecture')
- arch = 'x86_64'
-
- if os.path.exists(arch_file):
- arch = open(arch_file).read()
-
- return arch
-
-
-def svn_revision():
- if os.system("git-svn info") == 0:
- info = commands.getoutput("git-svn info ../..")
- else:
- info = commands.getoutput("svn info")
-
- for line in info.split("\n"):
- if line.startswith("Revision: "):
- return line.replace("Revision: ", "").strip()
-
- return ""
diff --git a/Tools/waf/build/settings.py b/Tools/waf/build/settings.py
deleted file mode 100644
index 95ea2e824..000000000
--- a/Tools/waf/build/settings.py
+++ /dev/null
@@ -1,514 +0,0 @@
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# Common elements of the waf build system shared by all projects.
-
-import commands
-import os
-import platform
-import re
-import sys
-
-import Logs
-import Options
-
-from build_utils import *
-from waf_extensions import *
-
-# to be moved to wx when it supports more configs
-from wxpresets import *
-
-wk_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..'))
-
-if sys.platform.startswith('win'):
- if not 'WXWIN' in os.environ:
- print "Please set WXWIN to the directory containing wxWidgets."
- sys.exit(1)
-
- wx_root = os.environ['WXWIN']
-else:
- wx_root = commands.getoutput('wx-config --prefix')
-
-wtf_dir = os.path.join(wk_root, 'Source', 'WTF')
-jscore_dir = os.path.join(wk_root, 'Source', 'JavaScriptCore')
-webcore_dir = os.path.join(wk_root, 'Source', 'WebCore')
-wklibs_dir = os.path.join(wk_root, 'WebKitLibraries')
-
-common_defines = []
-common_cxxflags = []
-common_includes = []
-common_libs = []
-common_libpaths = []
-common_frameworks = []
-
-ports = [
- 'BlackBerry',
- 'Chromium',
- 'Efl',
- 'Gtk',
- 'Mac',
- 'None',
- 'Qt',
- 'Safari',
- 'Win',
- 'WinCE',
- 'wx',
-]
-
-uses = [
- 'CF',
- 'CFNet',
- 'CURL',
- 'WXGC',
-]
-
-port_uses = {
- 'wx': ['CURL', 'WXGC'],
-}
-
-jscore_dirs = [
- 'API',
- 'assembler',
- 'bytecode',
- 'bytecompiler',
- 'debugger',
- 'disassembler',
- 'disassembler/udis86',
- 'DerivedSources',
- 'dfg',
- 'heap',
- 'interpreter',
- 'jit',
- 'llint',
- 'parser',
- 'profiler',
- 'runtime',
- 'tools',
- 'yarr',
- '../WTF/wtf',
- '../WTF/wtf/dtoa',
- '../WTF/wtf/text',
- '../WTF/wtf/unicode',
- '../WTF/wtf/unicode/icu',
-]
-
-webcore_dirs_common = [
- 'Source/WebCore/Modules/websockets',
- 'Source/WebCore/accessibility',
- 'Source/WebCore/bindings',
- 'Source/WebCore/bindings/cpp',
- 'Source/WebCore/bindings/generic',
- 'Source/WebCore/bindings/js',
- 'Source/WebCore/bridge',
- 'Source/WebCore/bridge/c',
- 'Source/WebCore/bridge/jsc',
- 'Source/WebCore/css',
- 'Source/WebCore/DerivedSources',
- 'Source/WebCore/dom',
- 'Source/WebCore/dom/default',
- 'Source/WebCore/editing',
- 'Source/WebCore/fileapi',
- 'Source/WebCore/history',
- 'Source/WebCore/html',
- 'Source/WebCore/html/canvas',
- 'Source/WebCore/html/parser',
- 'Source/WebCore/html/shadow',
- 'Source/WebCore/inspector',
- 'Source/WebCore/loader',
- 'Source/WebCore/loader/appcache',
- 'Source/WebCore/loader/archive',
- 'Source/WebCore/loader/cache',
- 'Source/WebCore/loader/icon',
- 'Source/WebCore/Modules/filesystem',
- 'Source/WebCore/Modules/geolocation',
- 'Source/WebCore/Modules/notifications',
- 'Source/WebCore/Modules/indexeddb',
- 'Source/WebCore/Modules/quota',
- 'Source/WebCore/Modules/webdatabase',
- 'Source/WebCore/page',
- 'Source/WebCore/page/animation',
- 'Source/WebCore/page/scrolling',
- 'Source/WebCore/platform',
- 'Source/WebCore/platform/animation',
- 'Source/WebCore/platform/graphics',
- 'Source/WebCore/platform/graphics/filters',
- 'Source/WebCore/platform/graphics/filters/arm',
- 'Source/WebCore/platform/graphics/transforms',
- 'Source/WebCore/platform/image-decoders',
- 'Source/WebCore/platform/image-decoders/bmp',
- 'Source/WebCore/platform/image-decoders/gif',
- 'Source/WebCore/platform/image-decoders/ico',
- 'Source/WebCore/platform/image-decoders/jpeg',
- 'Source/WebCore/platform/image-decoders/png',
- 'Source/WebCore/platform/image-decoders/webp',
- 'Source/WebCore/platform/mock',
- 'Source/WebCore/platform/network',
- 'Source/WebCore/platform/posix',
- 'Source/WebCore/platform/sql',
- 'Source/WebCore/platform/text',
- 'Source/WebCore/platform/text/transcoder',
- 'Source/WebCore/plugins',
- 'Source/WebCore/rendering',
- 'Source/WebCore/rendering/style',
- 'Source/WebCore/rendering/svg',
- 'Source/WebCore/storage',
- 'Source/WebCore/svg',
- 'Source/WebCore/svg/animation',
- 'Source/WebCore/svg/graphics',
- 'Source/WebCore/svg/graphics/filters',
- 'Source/WebCore/svg/properties',
- 'Source/WebCore/testing',
- 'Source/WebCore/testing/js',
- 'Source/WebCore/workers',
- 'Source/WebCore/xml',
- 'Source/WebCore/xml/parser',
-]
-
-config = get_config(wk_root)
-arch = get_arch(wk_root)
-config_dir = config
-
-output_dir = os.path.join(get_base_product_dir(wk_root), config_dir)
-
-building_on_win32 = sys.platform.startswith('win')
-
-default_port = 'Mac'
-if building_on_win32:
- deafult_port = "Win"
-
-build_port = default_port
-
-def get_port_excludes(thisport):
- """
- This function creates a list of file patterns to exclude
- based on what port you are using and what USES it has defined.
- """
- exclude_patterns = []
- global ports
- for port in ports:
- if not port == thisport:
- exclude = "*%s.cpp" % port
- if port == 'Chromium':
- exclude = "*Chromium*.cpp"
- exclude_patterns.append(exclude)
-
- global uses
- for use in uses:
- if thisport not in port_uses or not use in port_uses[thisport]:
- exclude_patterns.append("*%s.cpp" % use)
-
- return exclude_patterns
-
-def get_config():
- waf_configname = config.upper().strip()
- if building_on_win32:
- isReleaseCRT = (config == 'Release')
- if build_port == 'wx':
- if Options.options.wxpython:
- isReleaseCRT = True
-
- if isReleaseCRT:
- waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL'
- else:
- waf_configname = waf_configname + ' CRT_MULTITHREADED_DLL_DBG'
-
- return waf_configname
-
-create_hash_table = wk_root + "/Source/JavaScriptCore/create_hash_table"
-if building_on_win32:
- create_hash_table = get_output('cygpath --unix "%s"' % create_hash_table)
-os.environ['CREATE_HASH_TABLE'] = create_hash_table
-
-feature_defines = []
-
-msvc_version = 'msvc2008'
-
-msvclibs_dir = os.path.join(wklibs_dir, msvc_version, 'win')
-
-
-def get_path_to_wxconfig():
- if 'WX_CONFIG' in os.environ:
- return os.environ['WX_CONFIG']
- else:
- return 'wx-config'
-
-
-def common_set_options(opt):
- """
- Initialize common options provided to the user.
- """
- opt.tool_options('compiler_cxx')
- opt.tool_options('compiler_cc')
- opt.tool_options('python')
-
- opt.add_option('--port', action='store', default=default_port, help='Which WebKit port to build.')
- opt.add_option('--wxpython', action='store_true', default=False, help='Create the wxPython bindings.')
- opt.add_option('--wx-compiler-prefix', action='store', default='vc',
- help='Specify a different compiler prefix (do this if you used COMPILER_PREFIX when building wx itself)')
- opt.add_option('--macosx-version', action='store', default='', help="Version of OS X to build for.")
- opt.add_option('--msvc-version', action='store', default='', help="MSVC version to use to build. Use 8 for 2005, 9 for 2008")
- opt.add_option('--mac_universal_binary', action='store_true', default=False, help='Build Mac as universal (i386, x86_64, ppc) binary.')
- opt.add_option('--mac_archs', action='store', default='', help='Comma separated list of architectures (i386, x86_64, ppc) to build on Mac.')
- opt.add_option('--cairo', action='store_true', default=sys.platform.startswith('linux'), help='Use cairo for drawing (experimental for Win/Mac')
-
-def common_configure(conf):
- """
- Configuration used by all targets, called from the target's configure() step.
- """
-
- conf.env['MSVC_TARGETS'] = ['x86']
-
- build_port = Options.options.port
-
- feature_defines = ['ENABLE_DATABASE', 'ENABLE_SQL_DATABASE', 'ENABLE_XSLT', 'ENABLE_JAVASCRIPT_DEBUGGER',
- 'ENABLE_SVG', 'ENABLE_FILTERS', 'ENABLE_SVG_FONTS', 'ENABLE_INSPECTOR', 'ENABLE_WORKERS',
- 'BUILDING_%s' % build_port.upper()]
-
- conf.env["FEATURE_DEFINES"] = ' '.join(feature_defines)
-
- if Options.options.msvc_version and Options.options.msvc_version != '':
- conf.env['MSVC_VERSIONS'] = ['msvc %s.0' % Options.options.msvc_version]
- else:
- conf.env['MSVC_VERSIONS'] = ['msvc 9.0', 'msvc 8.0']
-
- if sys.platform.startswith('cygwin'):
- print "ERROR: You must use the Win32 Python from python.org, not Cygwin Python, when building on Windows."
- sys.exit(1)
-
- conf.check_tool('compiler_cxx')
- conf.check_tool('compiler_cc')
-
- if sys.platform.startswith('darwin'):
- conf.check_tool('osx')
-
- global msvc_version
- global msvclibs_dir
-
- libprefix = ''
-
- if Options.options.cairo and build_port == 'wx':
- if building_on_win32 and not "CAIRO_ROOT" in os.environ:
- Logs.error("To build with Cairo on Windows, you must set the CAIRO_ROOT environment variable.")
- sys.exit(1)
-
- if building_on_win32:
- libprefix = 'lib'
-
- found = conf.get_msvc_versions()
- found_versions = []
- for version in found:
- found_versions.append(version[0])
-
- if 'msvc 9.0' in conf.env['MSVC_VERSIONS'] and 'msvc 9.0' in found_versions:
- msvc_version = 'msvc2008'
- elif 'msvc 8.0' in conf.env['MSVC_VERSIONS'] and 'msvc 8.0' in found_versions:
- msvc_version = 'msvc2005'
-
- msvclibs_dir = os.path.join(wklibs_dir, msvc_version, 'win')
-
- # Disable several warnings which occur many times during the build.
- # Some of them are harmless (4099, 4344, 4396, 4800) and working around
- # them in WebKit code is probably just not worth it. We can simply do
- # nothing about the others (4503). A couple are possibly valid but
- # there are just too many of them in the code so fixing them is
- # impossible in practice and just results in tons of distracting output
- # (4244, 4291). Finally 4996 is actively harmful as it is given for
- # just about any use of standard C/C++ library facilities.
- conf.env.append_value('CXXFLAGS', [
- '/wd4099', # type name first seen using 'struct' now seen using 'class'
- '/wd4244', # conversion from 'xxx' to 'yyy', possible loss of data:
- '/wd4291', # no matching operator delete found (for placement new)
- '/wd4344', # behaviour change in template deduction
- '/wd4396', # inline can't be used in friend declaration
- '/wd4503', # decorated name length exceeded, name was truncated
- '/wd4800', # forcing value to bool 'true' or 'false'
- '/wd4996', # deprecated function
- ])
-
- # This one also occurs in C code, so disable it there as well.
- conf.env.append_value('CCFLAGS', ['/wd4996'])
-
- if build_port == "wx":
- update_wx_deps(conf, wk_root, msvc_version)
-
- conf.env.append_value('CXXDEFINES', ['BUILDING_WX__=1'])
-
- if building_on_win32:
- conf.env.append_value('LIBPATH', os.path.join(msvclibs_dir, 'lib'))
- # wx settings
- global config
- is_debug = (config == 'Debug')
- # generate debug symbols even in release mode, as it helps debugging.
- if not is_debug:
- conf.env.append_value('CXXFLAGS', '/Zi')
- conf.env.append_value('LINKFLAGS', '/debug')
- wxdefines, wxincludes, wxlibs, wxlibpaths = get_wxmsw_settings(wx_root, shared=True, unicode=True, debug=is_debug, wxPython=Options.options.wxpython)
- conf.env['CXXDEFINES_WX'] = wxdefines
- conf.env['CPPPATH_WX'] = wxincludes
- conf.env['LIB_WX'] = wxlibs
- conf.env['LIBPATH_WX'] = wxlibpaths
- if Options.options.cairo and 'CAIRO_ROOT' in os.environ:
- conf.env.append_value('CPPPATH_WX', [os.path.join(os.environ['CAIRO_ROOT'], 'include', 'cairo')])
- conf.env.append_value('LIBPATH_WX', [os.path.join(os.environ['CAIRO_ROOT'], 'lib')])
- conf.env.append_value('LIB_WX', ['cairo'])
- else:
- conf.check_cfg(path=get_path_to_wxconfig(), args='--cxxflags --libs', package='', uselib_store='WX', mandatory=True)
-
- if sys.platform.startswith('darwin'):
- conf.env['LIB_ICU'] = ['icucore']
- global port_uses
- port_uses[build_port].append('CF')
-
- conf.env.append_value('CPPPATH', wklibs_dir)
- conf.env.append_value('LIBPATH', wklibs_dir)
-
- min_version = None
-
- mac_target = 'MACOSX_DEPLOYMENT_TARGET'
- if Options.options.macosx_version != '':
- min_version = Options.options.macosx_version
-
- # WebKit only supports 10.4+, but ppc systems often set this to earlier systems
- if not min_version:
- min_version = commands.getoutput('sw_vers -productVersion')[:4]
- if min_version in ['10.1', '10.2', '10.3']:
- min_version = '10.4'
-
- sdk_version = min_version
- if min_version == "10.4":
- sdk_version += "u"
- conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceTiger'])
- elif min_version == "10.7":
- conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceLion'])
- else:
- # NOTE: There is a WebKitSystemInterfaceSnowLeopard, but when we use that
- # on 10.6, we get a strange missing symbol error, and this library seems to
- # work fine for wx's purposes.
- conf.env.append_value('LIB_WKINTERFACE', ['WebKitSystemInterfaceLeopard'])
- conf.env.append_value('LINKFLAGS', ['-framework', 'QuartzCore'])
-
- # match WebKit Mac's default here unless we're building on platforms that won't support 64-bit.
- archs = []
-
- if Options.options.mac_archs != '':
- arch_list = Options.options.mac_archs.replace("'", '').replace('"', '').split(",")
- for arch in arch_list:
- if arch.strip() != '':
- archs.append(arch.strip())
- elif Options.options.mac_universal_binary:
- archs = ['i386', 'x86_64', 'ppc']
- else:
- is_cocoa = "__WXOSX_COCOA__" in conf.env["CXXDEFINES_WX"]
- if min_version == "10.4" or not is_cocoa:
- archs = ["i386"]
- else:
- global arch
- archs = [arch]
-
- sdkroot = '/Developer/SDKs/MacOSX%s.sdk' % sdk_version
- if not os.path.exists(sdkroot):
- Logs.error("Cannot find the specified SDK needed to build: %r" % sdkroot)
- sys.exit(1)
- sdkflags = ['-isysroot', sdkroot]
- for arch in archs:
- sdkflags.extend(['-arch', arch])
-
- conf.env.append_value('CPPFLAGS', sdkflags)
- conf.env.append_value('LINKFLAGS', sdkflags)
-
- conf.env.append_value('LINKFLAGS', ['-framework', 'Security'])
-
- conf.env.append_value('CPPPATH_SQLITE3', [os.path.join(wklibs_dir, 'WebCoreSQLite3')])
- conf.env.append_value('LIB_SQLITE3', ['WebCoreSQLite3'])
-
- # NOTE: The order here is important, because python sets the MACOSX_DEPLOYMENT_TARGET to
- # 10.3 even on intel. So we must first set the SDK and arch flags, then load Python's config,
- # and finally override the value Python set for MACOSX_DEPLOYMENT_TARGET
- if Options.options.wxpython:
- conf.check_tool('python')
- conf.check_python_headers()
-
- if sys.platform.startswith('darwin'):
- os.environ[mac_target] = conf.env[mac_target] = min_version
-
- conf.env.append_value('CXXDEFINES', feature_defines)
- if config == 'Release':
- conf.env.append_value('CPPDEFINES', 'NDEBUG')
-
- if building_on_win32:
- conf.env.append_value('CPPPATH', [
- os.path.join(jscore_dir, 'os-win32'),
- os.path.join(msvclibs_dir, 'include'),
- os.path.join(msvclibs_dir, 'include', 'pthreads'),
- os.path.join(msvclibs_dir, 'lib'),
- ])
-
- conf.env.append_value('LIB', ['libpng', 'libjpeg', 'pthreadVC2'])
- # common win libs
- conf.env.append_value('LIB', [
- 'kernel32', 'user32', 'gdi32', 'comdlg32', 'winspool', 'winmm',
- 'shell32', 'shlwapi', 'comctl32', 'ole32', 'oleaut32', 'uuid', 'advapi32',
- 'wsock32', 'gdiplus', 'usp10', 'version'])
-
- conf.env['LIB_ICU'] = ['icudt', 'icule', 'iculx', 'icuuc', 'icuin', 'icuio', 'icutu']
-
- #curl
- conf.env['LIB_CURL'] = ['libcurl']
-
- #sqlite3
- conf.env['CPPPATH_SQLITE3'] = [os.path.join(msvclibs_dir, 'include', 'SQLite')]
- conf.env['LIB_SQLITE3'] = ['sqlite3']
-
- #libxml2
- conf.env['LIB_XML'] = ['libxml2']
-
- #libxslt
- conf.env['LIB_XSLT'] = ['libxslt']
- else:
- conf.env.append_value('CXXFLAGS', ['-fvisibility=hidden'])
- if build_port == 'wx':
- port_uses['wx'].append('PTHREADS')
- conf.env.append_value('LIB', ['jpeg', 'png', 'pthread'])
- conf.env.append_value('LIBPATH', os.path.join(wklibs_dir, 'unix', 'lib'))
- conf.env.append_value('CPPPATH', os.path.join(wklibs_dir, 'unix', 'include'))
- conf.env.append_value('CXXFLAGS', ['-fPIC', '-DPIC'])
- conf.env.append_value('CXXFLAGS', ['-g'])
- conf.check_cfg(msg='Checking for libxslt', path='xslt-config', args='--cflags --libs', package='', uselib_store='XSLT', mandatory=True)
- conf.check_cfg(path='xml2-config', args='--cflags --libs', package='', uselib_store='XML', mandatory=True)
- if sys.platform.startswith('darwin') and min_version and min_version == '10.4':
- conf.check_cfg(path=os.path.join(wklibs_dir, 'unix', 'bin', 'curl-config'), args='--cflags --libs', package='', uselib_store='CURL', mandatory=True)
- else:
- conf.check_cfg(path='curl-config', args='--cflags --libs', package='', uselib_store='CURL', mandatory=True)
-
- if not sys.platform.startswith('darwin'):
- # this is needed to keep ld from hitting the 4gb process limit under Linux/Unix.
- conf.env.append_value('LINKFLAGS', ['-Wl,--no-keep-memory'])
- conf.check_cfg(package='cairo', args='--cflags --libs', uselib_store='WX', mandatory=True)
- conf.check_cfg(package='pango', args='--cflags --libs', uselib_store='WX', mandatory=True)
- conf.check_cfg(package='gtk+-2.0', args='--cflags --libs', uselib_store='WX', mandatory=True)
- conf.check_cfg(package='sqlite3', args='--cflags --libs', uselib_store='SQLITE3', mandatory=True)
- conf.check_cfg(path='icu-config', args='--cflags --ldflags', package='', uselib_store='ICU', mandatory=True)
-
- if build_port in port_uses:
- for use in port_uses[build_port]:
- conf.env.append_value('CXXDEFINES', ['WTF_USE_%s' % use])
diff --git a/Tools/waf/build/waf_extensions.py b/Tools/waf/build/waf_extensions.py
deleted file mode 100644
index e8c35f975..000000000
--- a/Tools/waf/build/waf_extensions.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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 module is for code where we override waf's default behavior or extend waf
-
-import os
-import subprocess
-import sys
-
-import Utils
-
-
-# version of exec_command that handles Windows command lines longer than 32000 chars
-def exec_command(s, **kw):
- filename = ''
- if sys.platform.startswith('win') and len(' '.join(s)) > 32000:
- import tempfile
- (fd, filename) = tempfile.mkstemp()
- t = []
- for i in s:
- if i.find(" ") != -1:
- i = '"%s"' % i
- t.append(i)
-
- t1 = t[1:]
- # Fix for LNK1170 error
- filename_str = '@' + filename
- filename2_str = None
- if len(' '.join(s)) > 131070:
- t2 = t[len(t) / 2:]
- t1 = t[1:len(t) / 2]
- (fd2, filename2) = tempfile.mkstemp()
- os.write(fd2, ' '.join(t2))
- os.close(fd2)
- filename2_str = '@' + filename2
- os.write(fd, ' '.join(t1))
- os.close(fd)
-
- s = [s[0]]
- s.append(filename_str)
- if filename2_str:
- s.append(filename2_str)
-
- if 'log' in kw:
- kw['stdout'] = kw['stderr'] = kw['log']
- del(kw['log'])
- kw['shell'] = isinstance(s, str)
-
- def cleanup():
- try:
- if os.path.exists(filename):
- os.remove(filename)
- except:
- pass
-
- try:
- proc = subprocess.Popen(s, **kw)
- result = proc.wait()
- cleanup()
- return result
-
- except OSError:
- cleanup()
- raise
-
-Utils.exec_command = exec_command
-
-# Better performing h_file to keep hashing from consuming lots of time
-import stat
-
-
-def h_file(filename):
- st = os.stat(filename)
- if stat.S_ISDIR(st[stat.ST_MODE]):
- raise IOError('not a file')
- m = Utils.md5()
- m.update(str(st.st_mtime))
- m.update(str(st.st_size))
- m.update(filename)
- return m.digest()
-
-Utils.h_file = h_file
diff --git a/Tools/waf/build/wxpresets.py b/Tools/waf/build/wxpresets.py
deleted file mode 100644
index 0ced3c507..000000000
--- a/Tools/waf/build/wxpresets.py
+++ /dev/null
@@ -1,128 +0,0 @@
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# Library for functions to determine wx settings based on configuration
-
-import os
-import re
-import sys
-
-import Options
-
-
-def parse_build_cfg(filename):
- cfg_file = open(filename, 'r')
- cfg = {}
- for cfg_line in cfg_file.readlines():
- key = None
- value = None
- parts = cfg_line.split('=')
- if len(parts) >= 1:
- key = parts[0].strip()
-
- if len(parts) >= 2:
- value = parts[1].strip()
- if value.isdigit():
- value = int(value)
-
- if key:
- cfg[key] = value
-
- return cfg
-
-
-def get_wx_version(wx_root):
- versionText = open(os.path.join(wx_root, "include", "wx", "version.h"), "r").read()
-
- majorVersion = re.search("#define\swxMAJOR_VERSION\s+(\d+)", versionText).group(1)
- minorVersion = re.search("#define\swxMINOR_VERSION\s+(\d+)", versionText).group(1)
- releaseVersion = re.search("#define\swxRELEASE_NUMBER\s+(\d+)", versionText).group(1)
-
- release = [majorVersion, minorVersion]
- if int(minorVersion) % 2 == 1:
- release.append(releaseVersion)
- return release
-
-
-def get_wxmsw_settings(wx_root, shared=False, unicode=False, debug=False, wxPython=False):
- if not os.path.exists(wx_root):
- print "Directory %s does not exist." % wx_root
- sys.exit(1)
-
- defines = ['__WXMSW__']
- includes = [os.path.join(wx_root, 'include')]
- cxxflags = []
- libs = []
- libpaths = []
-
- libdir = os.path.join(wx_root, 'lib')
- ext = ''
- postfix = 'vc'
-
- version_str_nodot = ''.join(get_wx_version(wx_root)[0:2])
-
- if shared:
- defines.append('WXUSINGDLL')
- libdir = os.path.join(libdir, Options.options.wx_compiler_prefix + '_dll')
- else:
- libdir = os.path.join(libdir, Options.options.wx_compiler_prefix + '_lib')
-
- if unicode:
- defines.append('_UNICODE')
- ext += 'u'
-
- depext = ''
- if wxPython and not version_str_nodot.startswith('29'):
- ext += 'h'
- depext += 'h'
- elif debug:
- ext += 'd'
- depext += 'd'
-
- configdir = os.path.join(libdir, 'msw' + ext)
-
- monolithic = False
- cfg_file = os.path.join(configdir, 'build.cfg')
- if os.path.exists(cfg_file):
- cfg = parse_build_cfg(cfg_file)
- if "MONOLITHIC" in cfg:
- monolithic = cfg["MONOLITHIC"]
- libpaths.append(libdir)
- includes.append(configdir)
-
- def get_wxlib_name(name):
- if name == 'base':
- return 'wxbase%s%s' % (version_str_nodot, ext)
-
- return "wxmsw%s%s_%s" % (version_str_nodot, ext, name)
-
- libs.extend(['wxzlib' + depext, 'wxjpeg' + depext, 'wxpng' + depext, 'wxexpat' + depext])
- if monolithic:
- libs.extend(["wxmsw%s%s" % (version_str_nodot, ext)])
- else:
- libs.extend([get_wxlib_name('base'), get_wxlib_name('core')])
-
- if wxPython or debug:
- defines.append('__WXDEBUG__')
-
- return (defines, includes, libs, libpaths)
diff --git a/Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj b/Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj
new file mode 100644
index 000000000..a80acd2b0
--- /dev/null
+++ b/Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{67A61940-F80B-42A0-A29D-B6DB1C27BCEE}</ProjectGuid>
+ <Keyword>MakeFileProj</Keyword>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>Makefile</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <NMakePreprocessorDefinitions>WIN32;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeBuildCommandLine>AssembleLogs.cmd</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>AssembleLogs.cmd</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"</NMakeCleanCommandLine>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <NMakePreprocessorDefinitions>WIN32;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeBuildCommandLine>AssembleLogs.cmd</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>AssembleLogs.cmd</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"</NMakeCleanCommandLine>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeBuildCommandLine>AssembleLogs.cmd</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>AssembleLogs.cmd</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"</NMakeCleanCommandLine>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeBuildCommandLine>AssembleLogs.cmd</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>AssembleLogs.cmd</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"</NMakeCleanCommandLine>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeBuildCommandLine>AssembleLogs.cmd</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>AssembleLogs.cmd</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"</NMakeCleanCommandLine>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'">
+ <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+ <NMakeBuildCommandLine>AssembleLogs.cmd</NMakeBuildCommandLine>
+ <NMakeReBuildCommandLine>AssembleLogs.cmd</NMakeReBuildCommandLine>
+ <NMakeCleanCommandLine>if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"</NMakeCleanCommandLine>
+ </PropertyGroup>
+ <ItemDefinitionGroup>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <None Include="AssembleLogs.cmd" />
+ <None Include="readme.txt" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters b/Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters
new file mode 100644
index 000000000..042fd1651
--- /dev/null
+++ b/Tools/win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <None Include="readme.txt" />
+ <None Include="AssembleLogs.cmd" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/win/AssembleBuildLogs/AssembleLogs.cmd b/Tools/win/AssembleBuildLogs/AssembleLogs.cmd
new file mode 100755
index 000000000..6ae9e3a16
--- /dev/null
+++ b/Tools/win/AssembleBuildLogs/AssembleLogs.cmd
@@ -0,0 +1,174 @@
+if exist "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" del "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WTFGenerated... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WTFGenerated\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WTF... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WTF\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING JavaScriptCoreGenerated... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\JavaScriptCoreGenerated\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING LLIntDesiredOffsets... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\LLIntDesiredOffsets\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING LLIntOffsetsExtractor... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\LLIntOffsetsExtractor\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING LLIntAssembly... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\LLIntAssembly\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING JavaScriptCore... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\JavaScriptCore\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING jsc... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\jsc\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING testRegExp... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\testRegExp\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING testapi... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\testapi\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+if not exist "%CONFIGURATIONBUILDDIR%\obj32\WebKitQuartzCoreAdditions\BuildLog.htm" GOTO SkipInternalProjects
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKitSystemInterfaceGenerated... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKitSystemInterfaceGenerated\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKitSystemInterface... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKitSystemInterface\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKitQuartzCoreAdditionsGenerated... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKitQuartzCoreAdditionsGenerated\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKitQuartzCoreAdditions... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKitQuartzCoreAdditions\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING CoreUI... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\CoreUI\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING SafariTheme... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\SafariTheme\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+:SkipInternalProjects
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebCoreGenerated... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebCoreGenerated\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING QTMovieWin... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\QTMovieWin\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebCore... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebCore\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebCoreTestSupport... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebCoreTestSupport\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING Interfaces... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\Interfaces\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKitGUID... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKitGUID\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKitExportGenerator... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKitExportGenerator\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WebKit... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WebKit\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WinLauncherLib... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WinLauncherLib\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING WinLauncher... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\WinLauncher\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING TestNetscapePlugin... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\TestNetscapePlugin\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING ImageDiff... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\ImageDiff\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING ImageDiffLauncher... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\ImageDiffLauncher\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING DumpRenderTree... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\DumpRenderTree\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING DumpRenderTreeLauncher... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\DumpRenderTreeLauncher\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING record-memory... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\record-memory\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING gtest-md... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\gtest-md\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo COMPILING TestWebKitAPI... >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+echo _________________________________________________________ >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm"
+type "%CONFIGURATIONBUILDDIR%\obj32\TestWebKitAPI\BuildLog.htm" >> "%CONFIGURATIONBUILDDIR%\BuildOutput.htm" \ No newline at end of file
diff --git a/Tools/win/AssembleBuildLogs/README b/Tools/win/AssembleBuildLogs/README
new file mode 100644
index 000000000..6371d9832
--- /dev/null
+++ b/Tools/win/AssembleBuildLogs/README
@@ -0,0 +1,10 @@
+The purpose of this project is to concatenate all the BuildLog.htm
+output files from each project into a single output file.
+
+This is useful for compiling with VCExpress using command line build
+because VCExpress does not output any single unified build log for the
+whole solution. Thus, we need to rely on pieceing together build logs
+for each individual project.
+
+If any project is added to the solution it should be made sure that it
+is added to the AssembleLogs.cmd script. \ No newline at end of file
diff --git a/Tools/win/DLLLauncher/DLLLauncherMain.cpp b/Tools/win/DLLLauncher/DLLLauncherMain.cpp
index 961335dbe..68ebe9647 100644
--- a/Tools/win/DLLLauncher/DLLLauncherMain.cpp
+++ b/Tools/win/DLLLauncher/DLLLauncherMain.cpp
@@ -48,6 +48,9 @@ using namespace std;
#endif
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.6195' processorArchitecture='" PROCESSORARCHITECTURE "' publicKeyToken='1fc8b3b9a1e18e3b' language='*'\"")
+#endif
static void enableTerminationOnHeapCorruption()
{
diff --git a/Tools/record-memory-win/main.cpp b/Tools/win/record-memory/main.cpp
index 934f10102..b4961344e 100644
--- a/Tools/record-memory-win/main.cpp
+++ b/Tools/win/record-memory/main.cpp
@@ -1,213 +1,213 @@
-#include <windows.h>
-#include <assert.h>
-#include <psapi.h>
-#include <stdio.h>
-#include <tchar.h>
-#include <time.h>
-#include <tlhelp32.h>
-#include "Shlwapi.h"
-
-#pragma comment(lib, "psapi.lib")
-#pragma comment(lib, "shlwapi.lib")
-
-int gQueryInterval = 5; // seconds
-time_t gDuration = 0; // seconds
-LPTSTR gCommandLine;
-
-HRESULT ProcessArgs(int argc, TCHAR *argv[]);
-HRESULT PrintUsage();
-void UseImage(void (functionForQueryType(HANDLE)));
-void QueryContinuously(HANDLE hProcess);
-int EvalProcesses(HANDLE hProcess);
-time_t ElapsedTime(time_t startTime);
-
-int __cdecl _tmain (int argc, TCHAR *argv[])
-{
- HRESULT result = ProcessArgs(argc, argv);
- if (FAILED(result))
- return result;
-
- UseImage(QueryContinuously);
- return S_OK;
-}
-
-HRESULT ProcessArgs(int argc, TCHAR *argv[])
-{
- LPTSTR argument;
- for( int count = 1; count < argc; count++ ) {
- argument = argv[count] ;
- if (wcsstr(argument, _T("-h")) || wcsstr(argument, _T("--help")))
- return PrintUsage();
- else if (wcsstr(argument, _T("--exe"))) {
- gCommandLine = argv[++count];
- } else if (wcsstr(argument, _T("-i")) ||
- wcsstr(argument, _T("--interval"))) {
- gQueryInterval = _wtoi(argv[++count]);
- if (gQueryInterval < 1) {
- printf("ERROR: invalid interval\n");
- return E_INVALIDARG;
- }
- } else if (wcsstr(argument, _T("-d")) ||
- wcsstr(argument, _T("--duration"))) {
- gDuration = _wtoi(argv[++count]);
- if (gDuration < 1) {
- printf("ERROR: invalid duration\n");
- return E_INVALIDARG;
- }
- } else {
- _tprintf(_T("ERROR: unrecognized argument \"%s\"\n"), (LPCTSTR)argument);
- return PrintUsage();
- }
- }
- if (argc < 2 || !wcslen(gCommandLine) ) {
- printf("ERROR: executable path is required\n");
- return PrintUsage();
- }
- return S_OK;
-}
-
-HRESULT PrintUsage()
-{
- printf("record-memory-win --exe EXE_PATH\n");
- printf(" Launch an executable and print the memory usage (in Private Bytes)\n");
- printf(" of the process.\n\n");
- printf("Usage:\n");
- printf("-h [--help] : Print usage\n");
- printf("--exe arg : Launch specified image. Required\n");
- printf("-i [--interval] arg : Print memory usage every arg seconds. Default: 5 seconds\n");
- printf("-d [--duration] arg : Run for up to arg seconds. Default: no limit\n\n");
- printf("Examples:\n");
- printf(" record-memory-win --exe \"C:\\Program Files\\Safari\\Safari.exe /newprocess\"\n");
- printf(" record-memory-win --exe \"Safari.exe /newprocess\" -i 10 -d 7200\n");
- printf(" NOTE: Close all other browser intances to ensure launching in a new process\n");
- printf(" Or, pass the /newprocess (or equivalent) argument to the browser\n");
- return E_FAIL;
-}
-
-unsigned int getMemoryInfo(DWORD processID)
-{
- unsigned int memInfo = 0;
- HANDLE hProcess;
- PROCESS_MEMORY_COUNTERS_EX pmc;
-
- hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
- PROCESS_VM_READ,
- FALSE, processID );
- if (NULL == hProcess)
- return 0;
-
- if (GetProcessMemoryInfo( hProcess, (PPROCESS_MEMORY_COUNTERS)&pmc, sizeof(pmc))) {
- memInfo = (pmc.PrivateUsage);
- }
-
- CloseHandle( hProcess );
- return memInfo;
-}
-
-void printProcessInfo(DWORD processID)
-{
- TCHAR szProcessName[MAX_PATH] = TEXT("<unknown>");
-
- // Get a handle to the process.
- HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
- PROCESS_VM_READ,
- FALSE, processID );
-
- // Get the process name.
- if (NULL != hProcess) {
- HMODULE hMod; // An array that receives the list of module handles.
- DWORD cbNeeded; //The number of bytes required to store all module handles in the Module array
-
- if (EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded)) {
- GetModuleBaseName(hProcess, hMod, szProcessName,
- sizeof(szProcessName)/sizeof(TCHAR));
- }
- }
-
- // Print the process name and identifier of matching strings, ignoring case
- _tprintf(TEXT("%s (PID: %u)\n"), szProcessName, processID);
-
- // Release the handle to the process.
- CloseHandle( hProcess );
-}
-
-int evalProcesses(HANDLE hProcess)
-{
- if (NULL == hProcess)
- return 0;
-
- unsigned int totalMemUsage = 0;
- DWORD processID = GetProcessId(hProcess);
-
- HANDLE hProcessSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
-
- PROCESSENTRY32 processEntry = { 0 };
- processEntry.dwSize = sizeof(PROCESSENTRY32);
-
- // Retrieves information about the first process encountered in a system snapshot
- if(Process32First(hProcessSnapshot, &processEntry)) {
- do {
- // if th32processID = processID, we are the parent process!
- // if th32ParentProcessID = processID, we are a child process!
- if ((processEntry.th32ProcessID == processID) || (processEntry.th32ParentProcessID == processID)) {
- unsigned int procMemUsage = 0;
- // Record parent process memory
- procMemUsage = getMemoryInfo(processEntry.th32ProcessID);
- totalMemUsage += procMemUsage;
- }
- // Retrieves information about the next process recorded in a system snapshot.
- } while(Process32Next(hProcessSnapshot, &processEntry));
- }
-
- CloseHandle(hProcessSnapshot);
- return totalMemUsage;
-}
-
-
-void UseImage(void (functionForQueryType(HANDLE)))
-{
- STARTUPINFO si = {0};
- si.cb = sizeof(STARTUPINFO);
- PROCESS_INFORMATION pi = {0};
-
- // Start the child process.
- if(!CreateProcess( NULL, // No module name (use command line)
- gCommandLine, // Command line
- NULL, // Process handle not inheritable
- NULL, // Thread handle not inheritable
- FALSE, // Set handle inheritance to FALSE
- 0, // No creation flags
- NULL, // Use parent's environment block
- NULL, // Use parent's starting directory
- &si, // Pointer to STARTUPINFO structure
- &pi )) // Pointer to PROCESS_INFORMATION structure
- printf("CreateProcess failed (%d)\n", GetLastError());
- else {
- printf("Created process with id: %d\n", pi.dwProcessId);
- functionForQueryType(pi.hProcess);
- // Close process and thread handles.
- CloseHandle( pi.hProcess );
- CloseHandle( pi.hThread );
- }
-}
-
-void QueryContinuously(HANDLE hProcess)
-{
- Sleep(2000); // give the process some time to launch
- bool pastDuration = false;
- time_t startTime = time(NULL);
- unsigned int memUsage = evalProcesses(hProcess);
- while(memUsage && !pastDuration) {
- printf( "%u\n", memUsage );
- Sleep(gQueryInterval*1000);
- memUsage = evalProcesses(hProcess);
- pastDuration = gDuration > 0 ? ElapsedTime(startTime) > gDuration : false;
- }
-}
-
-// returns elapsed time in seconds
-time_t ElapsedTime(time_t startTime)
-{
- time_t currentTime = time(NULL);
- return currentTime - startTime;
-}
+#include <windows.h>
+#include <assert.h>
+#include <psapi.h>
+#include <stdio.h>
+#include <tchar.h>
+#include <time.h>
+#include <tlhelp32.h>
+#include "Shlwapi.h"
+
+#pragma comment(lib, "psapi.lib")
+#pragma comment(lib, "shlwapi.lib")
+
+int gQueryInterval = 5; // seconds
+time_t gDuration = 0; // seconds
+LPTSTR gCommandLine;
+
+HRESULT ProcessArgs(int argc, TCHAR *argv[]);
+HRESULT PrintUsage();
+void UseImage(void (functionForQueryType(HANDLE)));
+void QueryContinuously(HANDLE hProcess);
+int EvalProcesses(HANDLE hProcess);
+time_t ElapsedTime(time_t startTime);
+
+int __cdecl _tmain (int argc, TCHAR *argv[])
+{
+ HRESULT result = ProcessArgs(argc, argv);
+ if (FAILED(result))
+ return result;
+
+ UseImage(QueryContinuously);
+ return S_OK;
+}
+
+HRESULT ProcessArgs(int argc, TCHAR *argv[])
+{
+ LPTSTR argument;
+ for( int count = 1; count < argc; count++ ) {
+ argument = argv[count] ;
+ if (wcsstr(argument, _T("-h")) || wcsstr(argument, _T("--help")))
+ return PrintUsage();
+ else if (wcsstr(argument, _T("--exe"))) {
+ gCommandLine = argv[++count];
+ } else if (wcsstr(argument, _T("-i")) ||
+ wcsstr(argument, _T("--interval"))) {
+ gQueryInterval = _wtoi(argv[++count]);
+ if (gQueryInterval < 1) {
+ printf("ERROR: invalid interval\n");
+ return E_INVALIDARG;
+ }
+ } else if (wcsstr(argument, _T("-d")) ||
+ wcsstr(argument, _T("--duration"))) {
+ gDuration = _wtoi(argv[++count]);
+ if (gDuration < 1) {
+ printf("ERROR: invalid duration\n");
+ return E_INVALIDARG;
+ }
+ } else {
+ _tprintf(_T("ERROR: unrecognized argument \"%s\"\n"), (LPCTSTR)argument);
+ return PrintUsage();
+ }
+ }
+ if (argc < 2 || !wcslen(gCommandLine) ) {
+ printf("ERROR: executable path is required\n");
+ return PrintUsage();
+ }
+ return S_OK;
+}
+
+HRESULT PrintUsage()
+{
+ printf("record-memory-win --exe EXE_PATH\n");
+ printf(" Launch an executable and print the memory usage (in Private Bytes)\n");
+ printf(" of the process.\n\n");
+ printf("Usage:\n");
+ printf("-h [--help] : Print usage\n");
+ printf("--exe arg : Launch specified image. Required\n");
+ printf("-i [--interval] arg : Print memory usage every arg seconds. Default: 5 seconds\n");
+ printf("-d [--duration] arg : Run for up to arg seconds. Default: no limit\n\n");
+ printf("Examples:\n");
+ printf(" record-memory-win --exe \"C:\\Program Files\\Safari\\Safari.exe /newprocess\"\n");
+ printf(" record-memory-win --exe \"Safari.exe /newprocess\" -i 10 -d 7200\n");
+ printf(" NOTE: Close all other browser intances to ensure launching in a new process\n");
+ printf(" Or, pass the /newprocess (or equivalent) argument to the browser\n");
+ return E_FAIL;
+}
+
+unsigned int getMemoryInfo(DWORD processID)
+{
+ unsigned int memInfo = 0;
+ HANDLE hProcess;
+ PROCESS_MEMORY_COUNTERS_EX pmc;
+
+ hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
+ PROCESS_VM_READ,
+ FALSE, processID );
+ if (NULL == hProcess)
+ return 0;
+
+ if (GetProcessMemoryInfo( hProcess, (PPROCESS_MEMORY_COUNTERS)&pmc, sizeof(pmc))) {
+ memInfo = (pmc.PrivateUsage);
+ }
+
+ CloseHandle( hProcess );
+ return memInfo;
+}
+
+void printProcessInfo(DWORD processID)
+{
+ TCHAR szProcessName[MAX_PATH] = TEXT("<unknown>");
+
+ // Get a handle to the process.
+ HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
+ PROCESS_VM_READ,
+ FALSE, processID );
+
+ // Get the process name.
+ if (NULL != hProcess) {
+ HMODULE hMod; // An array that receives the list of module handles.
+ DWORD cbNeeded; //The number of bytes required to store all module handles in the Module array
+
+ if (EnumProcessModules(hProcess, &hMod, sizeof(hMod), &cbNeeded)) {
+ GetModuleBaseName(hProcess, hMod, szProcessName,
+ sizeof(szProcessName)/sizeof(TCHAR));
+ }
+ }
+
+ // Print the process name and identifier of matching strings, ignoring case
+ _tprintf(TEXT("%s (PID: %u)\n"), szProcessName, processID);
+
+ // Release the handle to the process.
+ CloseHandle( hProcess );
+}
+
+int evalProcesses(HANDLE hProcess)
+{
+ if (NULL == hProcess)
+ return 0;
+
+ unsigned int totalMemUsage = 0;
+ DWORD processID = GetProcessId(hProcess);
+
+ HANDLE hProcessSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+
+ PROCESSENTRY32 processEntry = { 0 };
+ processEntry.dwSize = sizeof(PROCESSENTRY32);
+
+ // Retrieves information about the first process encountered in a system snapshot
+ if(Process32First(hProcessSnapshot, &processEntry)) {
+ do {
+ // if th32processID = processID, we are the parent process!
+ // if th32ParentProcessID = processID, we are a child process!
+ if ((processEntry.th32ProcessID == processID) || (processEntry.th32ParentProcessID == processID)) {
+ unsigned int procMemUsage = 0;
+ // Record parent process memory
+ procMemUsage = getMemoryInfo(processEntry.th32ProcessID);
+ totalMemUsage += procMemUsage;
+ }
+ // Retrieves information about the next process recorded in a system snapshot.
+ } while(Process32Next(hProcessSnapshot, &processEntry));
+ }
+
+ CloseHandle(hProcessSnapshot);
+ return totalMemUsage;
+}
+
+
+void UseImage(void (functionForQueryType(HANDLE)))
+{
+ STARTUPINFO si = {0};
+ si.cb = sizeof(STARTUPINFO);
+ PROCESS_INFORMATION pi = {0};
+
+ // Start the child process.
+ if(!CreateProcess( NULL, // No module name (use command line)
+ gCommandLine, // Command line
+ NULL, // Process handle not inheritable
+ NULL, // Thread handle not inheritable
+ FALSE, // Set handle inheritance to FALSE
+ 0, // No creation flags
+ NULL, // Use parent's environment block
+ NULL, // Use parent's starting directory
+ &si, // Pointer to STARTUPINFO structure
+ &pi )) // Pointer to PROCESS_INFORMATION structure
+ printf("CreateProcess failed (%d)\n", GetLastError());
+ else {
+ printf("Created process with id: %d\n", pi.dwProcessId);
+ functionForQueryType(pi.hProcess);
+ // Close process and thread handles.
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ }
+}
+
+void QueryContinuously(HANDLE hProcess)
+{
+ Sleep(2000); // give the process some time to launch
+ bool pastDuration = false;
+ time_t startTime = time(NULL);
+ unsigned int memUsage = evalProcesses(hProcess);
+ while(memUsage && !pastDuration) {
+ printf( "%u\n", memUsage );
+ Sleep(gQueryInterval*1000);
+ memUsage = evalProcesses(hProcess);
+ pastDuration = gDuration > 0 ? ElapsedTime(startTime) > gDuration : false;
+ }
+}
+
+// returns elapsed time in seconds
+time_t ElapsedTime(time_t startTime)
+{
+ time_t currentTime = time(NULL);
+ return currentTime - startTime;
+}
diff --git a/Tools/win/record-memory/record-memory.vcxproj b/Tools/win/record-memory/record-memory.vcxproj
new file mode 100644
index 000000000..aa9e708f2
--- /dev/null
+++ b/Tools/win/record-memory/record-memory.vcxproj
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="DebugSuffix|Win32">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="DebugSuffix|x64">
+ <Configuration>DebugSuffix</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|Win32">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug_WinCairo|x64">
+ <Configuration>Debug_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|Win32">
+ <Configuration>Production</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Production|x64">
+ <Configuration>Production</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|Win32">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release_WinCairo|x64">
+ <Configuration>Release_WinCairo</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{F93EBE5A-20F3-44C1-B192-C4AA2BA95FD5}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>recordmemory</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryDebug.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryDebugWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryDebug.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debugsuffix.props" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryRelease.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryReleaseWinCairo.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryProduction.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="record-memoryProduction.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'" />
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Production|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ </ClCompile>
+ <Link />
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memory.vcxproj.filters b/Tools/win/record-memory/record-memory.vcxproj.filters
new file mode 100644
index 000000000..4327830c9
--- /dev/null
+++ b/Tools/win/record-memory/record-memory.vcxproj.filters
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="main.cpp" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memoryCommon.props b/Tools/win/record-memory/record-memoryCommon.props
new file mode 100644
index 000000000..72bfe7deb
--- /dev/null
+++ b/Tools/win/record-memory/record-memoryCommon.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets" />
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ </Link>
+ <ClCompile />
+ </ItemDefinitionGroup>
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memoryDebug.props b/Tools/win/record-memory/record-memoryDebug.props
new file mode 100644
index 000000000..84a2cb23b
--- /dev/null
+++ b/Tools/win/record-memory/record-memoryDebug.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="record-memoryCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memoryDebugWinCairo.props b/Tools/win/record-memory/record-memoryDebugWinCairo.props
new file mode 100644
index 000000000..d35f5d5fc
--- /dev/null
+++ b/Tools/win/record-memory/record-memoryDebugWinCairo.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefinesCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\debug.props" />
+ <Import Project="record-memoryCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memoryProduction.props b/Tools/win/record-memory/record-memoryProduction.props
new file mode 100644
index 000000000..cbb690cc9
--- /dev/null
+++ b/Tools/win/record-memory/record-memoryProduction.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\production.props" />
+ <Import Project="record-memoryCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memoryRelease.props b/Tools/win/record-memory/record-memoryRelease.props
new file mode 100644
index 000000000..8c95e4bb6
--- /dev/null
+++ b/Tools/win/record-memory/record-memoryRelease.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefines.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="record-memoryCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project> \ No newline at end of file
diff --git a/Tools/win/record-memory/record-memoryReleaseWinCairo.props b/Tools/win/record-memory/record-memoryReleaseWinCairo.props
new file mode 100644
index 000000000..24ace18c3
--- /dev/null
+++ b/Tools/win/record-memory/record-memoryReleaseWinCairo.props
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ImportGroup Label="PropertySheets">
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\FeatureDefinesCairo.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\common.props" />
+ <Import Project="$(WebKit_Libraries)\tools\vsprops\release.props" />
+ <Import Project="record-memoryCommon.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup />
+ <ItemDefinitionGroup />
+ <ItemGroup />
+</Project>
diff --git a/Tools/wx/browser/wscript b/Tools/wx/browser/wscript
deleted file mode 100644
index 7c5aeee95..000000000
--- a/Tools/wx/browser/wscript
+++ /dev/null
@@ -1,55 +0,0 @@
-#! /usr/bin/env python
-
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# wxBrowser sample app build script for the waf build system
-
-import sys
-
-from settings import *
-
-include_paths = [os.path.join(wk_root, 'Source', 'WebCore', 'bindings', 'wx'),
- os.path.join(wk_root, 'Source', 'WebKit', 'wx')]
-
-def set_options(opt):
- common_set_options(opt)
-
-def configure(conf):
- common_configure(conf)
-
-def build(bld):
- import Options
-
- obj = bld.new_task_gen(
- features = 'cxx cprogram',
- includes = ' '.join(include_paths),
- source = 'browser.cpp',
- target = 'wxBrowser',
- uselib = 'WX CURL ICU XSLT XML ' + get_config(),
- libpath = [output_dir],
- uselib_local = 'wxwebkit',
- install_path = output_dir)
-
- if sys.platform.startswith('darwin'):
- obj.mac_app = True
diff --git a/Tools/wx/install-unix-extras b/Tools/wx/install-unix-extras
deleted file mode 100755
index a27a46b9e..000000000
--- a/Tools/wx/install-unix-extras
+++ /dev/null
@@ -1,234 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) 2005, 2006 Apple Computer, 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.
-# 3. Neither the name of Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 download the extra libraries needed to build WebKit on UNIX-based OSes.
-# libxml/libxslt need to be added, but so far I've had them on all the (UNIX) machines
-# I've tested on, so I don't have a machine to test the code on.
-
-DL_CMD="curl -L"
-
-scriptDir="$(cd $(dirname $0);pwd)"
-WK_ROOT=$scriptDir/../..
-WK_ROOTDIR=$WK_ROOT
-
-DL_DIR=/tmp/webkit-deps
-# NOTE: If you change this, make sure the dir is on the path.
-DEPS_PREFIX=$WK_ROOT/WebKitLibraries/unix
-DLLEXT=so
-
-if [ "${OSTYPE:0:6}" == "darwin" ]; then
- DLLEXT=dylib
-fi
-
-mkdir -p $DL_DIR
-mkdir -p $DEPS_PREFIX
-
-mkdir -p $DEPS_PREFIX/bin
-mkdir -p $DEPS_PREFIX/lib
-mkdir -p $DEPS_PREFIX/include
-
-ICU_VERSION="3.4.1"
-ICU_TARBALL="icu-$ICU_VERSION.tgz"
-ICU_URL="ftp://ftp.software.ibm.com/software/globalization/icu/$ICU_VERSION/$ICU_TARBALL"
-
-# dependent app, not lib, what should we do for these?
-
-GPERF_VERSION="3.0.1"
-GPERF_TARBALL="gperf-$GPERF_VERSION.tar.gz"
-GPERF_URL="ftp://mirrors.kernel.org/gnu/gperf/$GPERF_TARBALL"
-
-PKG_CONFIG_VERSION="0.20"
-PKG_CONFIG_TARBALL="pkg-config-$PKG_CONFIG_VERSION.tar.gz"
-PKG_CONFIG_URL="http://pkgconfig.freedesktop.org/releases/$PKG_CONFIG_TARBALL"
-
-ICONV_VERSION="1.9.2"
-ICONV_TARBALL="libiconv-$ICONV_VERSION.tar.gz"
-ICONV_URL="http://ftp.gnu.org/pub/gnu/libiconv/$ICONV_TARBALL"
-
-LIBJPEG_VERSION="6b"
-LIBJPEG_TARBALL="jpegsrc.v$LIBJPEG_VERSION.tar.gz"
-LIBJPEG_URL="http://wxwebkit.wxcommunity.com/downloads/deps/$LIBJPEG_TARBALL"
-
-LIBPNG_VERSION="1.2.33"
-LIBPNG_TARBALL="libpng-$LIBPNG_VERSION.tar.gz"
-LIBPNG_URL="http://wxwebkit.wxcommunity.com/downloads/deps/$LIBPNG_TARBALL"
-
-LIBCURL_VERSION="7.19.6"
-LIBCURL_TARBALL="curl-$LIBCURL_VERSION.tar.gz"
-LIBCURL_URL="http://curl.haxx.se/download/$LIBCURL_TARBALL"
-
-export MAC_OS_X_DEPLOYMENT_TARGET=10.4
-
-ARCH_FLAGS="-arch i386 -arch x86_64"
-SDK="/Developer/SDKs/MacOSX10.4u.sdk"
-
-if [ ! -d $SDK ]; then
- SDK="/Developer/SDKs/MacOSX10.5.sdk"
-fi
-
-if [ ! -d $SDK ]; then
- SDK="/Developer/SDKs/MacOSX10.6.sdk"
-fi
-
-if [ "${OSTYPE:0:6}" == "darwin" ]; then
- if [ -x /usr/bin/gcc-4.0 ]; then
- export CC="gcc-4.0"
- export CXX="g++-4.0"
- fi
-fi
-
-cd $DL_DIR
-# build ICU
-if [ `which icu-config >/dev/null 2>&1` ]; then
- $DL_CMD -o $DL_DIR/$ICU_TARBALL $ICU_URL
-
- tar xzvf $DL_DIR/$ICU_TARBALL
- cd $DL_DIR/icu/source
-
- chmod +x configure install-sh
-
- if [ "${OSTYPE:0:6}" == "darwin" ]; then
- ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
- make CFLAGS="-O -g -isysroot $SDK $ARCH_FLAGS" \
- LDFLAGS=$ARCH_FLAGS
- make install
- else
- ./configure --prefix=$DEPS_PREFIX
-
- make
- #make check
- make install
- fi
- cd $DL_DIR
- rm -rf icu
-fi
-
-if [ ! -f $DEPS_PREFIX/lib/libjpeg.a ]; then
- $DL_CMD -o $DL_DIR/$LIBJPEG_TARBALL $LIBJPEG_URL
-
- tar xzvf $DL_DIR/$LIBJPEG_TARBALL
- cd $DL_DIR/jpeg-$LIBJPEG_VERSION
-
- # jpeg install command expects this to exist.
- mkdir -p $DEPS_PREFIX/man/man1
-
- if [ "${OSTYPE:0:6}" == "darwin" ]; then
- ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
- make CFLAGS="-O -g -isysroot $SDK $ARCH_FLAGS" \
- LDFLAGS="$ARCH_FLAGS"
- make install
- else
- ./configure --prefix=$DEPS_PREFIX
-
- make
- fi
-
- cp libjpeg.a $DEPS_PREFIX/lib
- cp *.h $DEPS_PREFIX/include
-
- cd $DL_DIR
- rm -rf $DL_DIR/jpeg-$LIBJPEG_VERSION
-fi
-
-if [ ! -f $DEPS_PREFIX/lib/libpng.a ]; then
- $DL_CMD -o $DL_DIR/$LIBPNG_TARBALL $LIBPNG_URL
-
- tar xzvf $DL_DIR/$LIBPNG_TARBALL
- cd $DL_DIR/libpng-$LIBPNG_VERSION
-
- if [ "${OSTYPE:0:6}" == "darwin" ]; then
- ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking --disable-shared
- make CFLAGS="-O -g -isysroot $SDK $ARCH_FLAGS" \
- LDFLAGS="$ARCH_FLAGS"
- make install
- else
- ./configure --prefix=$DEPS_PREFIX
-
- make
- make install
- fi
-
- cd $DL_DIR
- rm -rf $DL_DIR/libpng-$LIBPNG_VERSION
-fi
-
-if [ ! -f $DEPS_PREFIX/lib/libcurl.$DLLEXT ]; then
- $DL_CMD -o $DL_DIR/$LIBCURL_TARBALL $LIBCURL_URL
-
- tar xzvf $DL_DIR/$LIBCURL_TARBALL
- cd $DL_DIR/curl-$LIBCURL_VERSION
-
- if [ "${OSTYPE:0:6}" == "darwin" ]; then
- # CURL creates different build headers for 32 and 64 bit, so to get a universal build,
- # we must first create a 32 bit version of the header, then a 64 bit version, and
- # have the original header simply decide which to use.
- export CFLAGS="-O -g -isysroot $SDK -mmacosx-version-min=10.4 -arch i386 -arch ppc"
- ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
-
- mkdir -p $DEPS_PREFIX/include/curl
-
- cp include/curl/curlbuild.h include/curl/curlbuild32.h
-
- make distclean
-
- export CFLAGS="-O -g -isysroot $SDK -mmacosx-version-min=10.4 -arch x86_64 -arch ppc64"
- ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
-
- cp include/curl/curlbuild.h include/curl/curlbuild64.h
-
- make distclean
-
- export CFLAGS="-O -g -isysroot $SDK -mmacosx-version-min=10.4 $ARCH_FLAGS"
- ./configure --prefix=$DEPS_PREFIX --disable-dependency-tracking
-
- cat > include/curl/curlbuild.h <<EOF
-#ifdef __LP64__
-#include "curlbuild64.h"
-#else
-#include "curlbuild32.h"
-#endif
-EOF
-
- make CFLAGS="-O -g -isysroot $SDK $ARCH_FLAGS" \
- LDFLAGS="$ARCH_FLAGS"
- make install
-
- cp include/curl/curlbuild32.h $DEPS_PREFIX/include/curl/curlbuild32.h
- cp include/curl/curlbuild64.h $DEPS_PREFIX/include/curl/curlbuild64.h
- cp include/curl/curlbuild.h $DEPS_PREFIX/include/curl/curlbuild.h
-
- else
- ./configure --prefix=$DEPS_PREFIX
-
- make
- make install
- fi
-
- cd $DL_DIR
- rm -rf $DL_DIR/curl-$LIBCURL_VERSION
-fi
diff --git a/Tools/wx/packaging/build-debian-installer.py b/Tools/wx/packaging/build-debian-installer.py
deleted file mode 100644
index 5c6795de0..000000000
--- a/Tools/wx/packaging/build-debian-installer.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import shutil
-import sys
-
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "build")))
-
-import build_utils
-
-script_dir = os.path.abspath(os.path.dirname(__file__))
-wxwebkit_dir = os.path.abspath(os.path.join(script_dir, "..", "..", "..", "WebKitBuild", "Debug" + build_utils.git_branch_name()))
-wxwk_root = os.path.abspath(os.path.join(script_dir, "..", "..", ".."))
-
-try:
- os.chdir(wxwk_root)
- deb_dir = os.path.join(wxwk_root, 'wxwebkit')
- if os.path.exists(deb_dir):
- shutil.rmtree(deb_dir)
- os.makedirs(deb_dir)
- print "Archiving git tree..."
- os.system('git archive --format=tar HEAD | gzip > %s/webkitwx_0.1.orig.tar.gz' % deb_dir)
- src_root = os.path.join(deb_dir, 'webkitwx-0.1')
- print "Extracting tree..."
- os.makedirs(src_root)
- os.chdir(src_root)
- os.system('tar xzvf ../webkitwx_0.1.orig.tar.gz')
-
- shutil.copytree(os.path.join(script_dir, 'debian'), os.path.join(src_root, 'debian'))
-
- print "Building package..."
- os.system('fakeroot debian/rules clean')
- os.system('fakeroot debian/rules build')
- os.system('debuild -i -rfakeroot -us -uc')
-finally:
- shutil.rmtree(os.path.join(src_root, 'debian'))
diff --git a/Tools/wx/packaging/build-mac-installer.py b/Tools/wx/packaging/build-mac-installer.py
deleted file mode 100644
index 544326ae1..000000000
--- a/Tools/wx/packaging/build-mac-installer.py
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2009 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# Script for building Mac .pkg installer
-
-import commands
-import datetime
-import distutils.sysconfig
-import glob
-import optparse
-import os
-import shutil
-import string
-import sys
-import tempfile
-
-script_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.append(os.path.abspath(os.path.join(script_dir, "..", "..", "waf", "build")))
-
-from build_utils import *
-
-import wx
-
-wxwk_root = os.path.abspath(os.path.join(script_dir, "..", "..", ".."))
-wxwebkit_dir = os.path.abspath(os.path.join(wxwk_root, "WebKitBuild", get_config(wxwk_root)))
-
-wx_version = wx.__version__[:5]
-py_version = sys.version[:3]
-
-date = str(datetime.date.today())
-
-platform = "osx"
-
-pkgname = "wxWebKit-%s-wx%s-py%s-%s" % (platform, wx_version[:3], py_version, date)
-
-tempdir = "/tmp/%s" % (pkgname)
-
-if os.path.exists(tempdir):
- shutil.rmtree(tempdir)
- os.makedirs(tempdir)
-
-installroot = os.path.join(tempdir, "install-root")
-installapps = os.path.join(tempdir, "install-apps")
-
-sp_root = distutils.sysconfig.get_python_lib()
-wx_root = sp_root
-if sys.platform.startswith("darwin"):
- build_string = "%s" % wx.__version__
- if wx.VERSION[1] <= 8:
- build_string = "unicode-%s" % build_string
- wx_root = "/usr/local/lib/wxPython-%s" % build_string
- sp_root = "%s/lib/python%s/site-packages" % (wx_root, py_version)
-
-if "wxOSX-cocoa" in wx.PlatformInfo:
- sitepackages = "%s/wx-%s-osx_cocoa/wx" % (sp_root, wx_version[:5])
-else:
- sitepackages = "%s/wx-%s-mac-unicode/wx" % (sp_root, wx_version[:3])
-prefix = wx_root + "/lib"
-
-
-def mac_update_dependencies(dylib, prefix, should_copy=True):
- """
- Copies any non-system dependencies into the bundle, and
- updates the install name path to the new path in the bundle.
- """
- global wx_root
- system_prefixes = ["/usr/lib", "/System/Library", wx_root]
-
-
- output = commands.getoutput("otool -L %s" % dylib).strip()
- for line in output.split("\n"):
- copy = should_copy
- change = True
- filename = line.split("(")[0].strip()
- filedir, basename = os.path.split(filename)
- dest_filename = os.path.join(prefix, basename)
- if os.path.exists(filename):
- for sys_prefix in system_prefixes:
- if filename.startswith(sys_prefix):
- copy = False
- change = False
-
- if copy:
- copydir = os.path.dirname(dylib)
- copyname = os.path.join(copydir, basename)
- if not os.path.exists(copyname):
- shutil.copy(filename, copydir)
- result = os.system("install_name_tool -id %s %s" % (dest_filename, copyname))
- if result != 0:
- print "Changing ID failed. Stopping release."
- sys.exit(result)
- if change:
- print "changing %s to %s" % (filename, dest_filename)
- result = os.system("install_name_tool -change %s %s %s" % (filename, dest_filename, dylib))
- if result != 0:
- sys.exit(result)
-
-def exitIfError(cmd):
- print cmd
- retval = os.system(cmd)
- if retval != 0:
- if os.path.exists(tempdir):
- shutil.rmtree(tempdir)
- sys.exit(1)
-
-wxroot = installroot + prefix
-wxpythonroot = installroot + sitepackages
-dmg_dir = "dmg_files"
-
-try:
- if not os.path.exists(wxroot):
- os.makedirs(wxroot)
-
- if not os.path.exists(wxpythonroot):
- os.makedirs(wxpythonroot)
-
- for wildcard in ["*.py", "*.so"]:
- files = glob.glob(os.path.join(wxwebkit_dir, wildcard))
- for afile in files:
- shutil.copy(afile, wxpythonroot)
-
- for wildcard in ["*.dylib"]:
- files = glob.glob(os.path.join(wxwebkit_dir, wildcard))
- for afile in files:
- shutil.copy(afile, wxroot)
-
- if sys.platform.startswith("darwin"):
- dylib_path = os.path.join(wxroot, "libwxwebkit.dylib")
- os.system("install_name_tool -id %s %s" % (os.path.join(prefix, "libwxwebkit.dylib"), dylib_path))
- mac_update_dependencies(dylib_path, prefix)
- os.system("install_name_tool -id %s %s" % (os.path.join(wxpythonroot, "_webview.so"), prefix))
- mac_update_dependencies(os.path.join(wxpythonroot, "_webview.so"), prefix, should_copy=False)
-
- demodir = installroot + "/Applications/wxWebKit/Demos"
- if not os.path.exists(demodir):
- os.makedirs(demodir)
-
- shutil.copy(os.path.join(wxwk_root, "Source", "WebKit", "wx", "bindings", "python", "samples", "simple.py"), demodir)
-
- output_name = os.path.join(dmg_dir, pkgname + ".pkg")
-
- if os.path.exists(dmg_dir):
- shutil.rmtree(dmg_dir)
-
- os.makedirs(dmg_dir)
-
- pkg_args = ['--title ' + pkgname,
- '--out %s' % output_name,
- '--version ' + date.strip(),
- '--id org.wxwebkit.wxwebkit',
- '--domain system',
- '--root-volume-only',
- '--root ' + installroot,
- '--verbose'
- ]
-
- packagemaker = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"
- exitIfError(packagemaker + " %s" % (string.join(pkg_args, " ")))
-
- os.system('hdiutil create -srcfolder %s -volname "%s" -imagekey zlib-level=9 %s.dmg' % (dmg_dir, pkgname, pkgname))
-finally:
- if os.path.exists(tempdir):
- shutil.rmtree(tempdir)
-
- if os.path.exists(dmg_dir):
- shutil.rmtree(dmg_dir)
diff --git a/Tools/wx/packaging/build-win-installer.py b/Tools/wx/packaging/build-win-installer.py
deleted file mode 100644
index d79e489ff..000000000
--- a/Tools/wx/packaging/build-win-installer.py
+++ /dev/null
@@ -1,110 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright (C) 2008 Kevin Ollivier 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 COMPUTER, 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 COMPUTER, 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.
-#
-# Create a Windows installer package for wxPython wxWebKit binaries
-
-import sys, os, string
-import commands
-import datetime
-import glob
-from subprocess import *
-
-import wx
-
-script_dir = os.path.abspath(os.path.dirname(__file__))
-sys.path.append(os.path.abspath(os.path.join(script_dir, "..", "..", "waf", "build")))
-
-from build_utils import *
-
-wxwk_root = os.path.abspath(os.path.join(script_dir, "..", "..", ".."))
-wxwebkit_dir = os.path.abspath(os.path.join(wxwk_root, "WebKitBuild", get_config(wxwk_root) + git_branch_name()))
-
-# Find InnoSetup executable
-def getInnoSetupPath():
- name = "ISCC.exe"
- retval = ""
- dirs = os.environ["PATH"].split(":")
- # Add the default file path
- dirs.append("C:\\Program Files\\Inno Setup 5")
- dirs.append("C:\\Program Files (x86)\\Inno Setup 5")
-
- if os.environ.has_key("INNO5"):
- retval = os.environ["INNO5"]
-
- if retval == "":
- for dir in dirs:
- filepath = os.path.join(dir, name)
- if os.path.isfile(filepath):
- retval = filepath
-
- return retval
-
-if __name__ == "__main__":
- innoSetup = getInnoSetupPath()
- os.chdir(sys.path[0])
-
- date = str(datetime.date.today())
-
- if not os.path.exists(innoSetup):
- print "ERROR: Cannot find InnoSetup."
- #sys.exit(1)
-
- if not os.path.exists(wxwebkit_dir):
- print "ERROR: Build dir %s doesn't exist." % wxwebkit_dir
- sys.exit(1)
-
- fileList = """
-CopyMode: alwaysoverwrite; Source: *.pyd; DestDir: "{app}"
-CopyMode: alwaysoverwrite; Source: *.py; DestDir: "{app}"
-"""
-
- dlls = glob.glob(os.path.join(wxwebkit_dir, "*.dll"))
- for dll in dlls:
- if dll.find("wxbase") == -1 and dll.find("wxmsw") == -1:
- fileList += """CopyMode: alwaysoverwrite; Source: %s; DestDir: "{app}" \n""" % dll
-
- installerTemplate = open("wxWebKitInstaller.iss.in", "r").read()
-
- wx_version = '%d.%d' % (wx.MAJOR_VERSION, wx.MINOR_VERSION)
- if wx.MINOR_VERSION % 2 == 1:
- wx_version += ".%d" % wx.RELEASE_VERSION
-
- # in 2.9/3.0, there are only unicode builds, so unicode has been removed
- # from build names.
- if wx.MAJOR_VERSION > 2 or wx.MINOR_VERSION > 8:
- installerTemplate = installerTemplate.replace("msw-unicode", "msw")
-
- installerTemplate = installerTemplate.replace("<<VERSION>>", date)
- installerTemplate = installerTemplate.replace("<<WXVERSION>>", wx_version)
- installerTemplate = installerTemplate.replace("<<ROOTDIR>>", wxwebkit_dir )
- installerTemplate = installerTemplate.replace("<<PYTHONVER>>", sys.version[0:3] )
- installerTemplate = installerTemplate.replace("<<FILES>>", fileList )
-
- outputFile = open("wxWebKitInstaller.iss", "w")
- outputFile.write(installerTemplate)
- outputFile.close()
-
- success = os.system('"%s" wxWebKitInstaller.iss' % innoSetup)
- sys.exit(success)
diff --git a/Tools/wx/packaging/debian/changelog b/Tools/wx/packaging/debian/changelog
deleted file mode 100644
index 8b1378917..000000000
--- a/Tools/wx/packaging/debian/changelog
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/Tools/wx/packaging/debian/compat b/Tools/wx/packaging/debian/compat
deleted file mode 100644
index 7ed6ff82d..000000000
--- a/Tools/wx/packaging/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/Tools/wx/packaging/debian/control b/Tools/wx/packaging/debian/control
deleted file mode 100644
index 57d8407dd..000000000
--- a/Tools/wx/packaging/debian/control
+++ /dev/null
@@ -1,29 +0,0 @@
-Source: webkitwx
-Section: Python
-Priority: extra
-Maintainer: Kevin Ollivier <kevino@theolliviers.com>
-Build-Depends: debhelper (>= 5.0.38), python-central (>= 0.6), python-all-dev,
- libwxgtk2.8-dev (>= 2.8.9.2-1), python-wxgtk2.8, python-wxtools (>= 2.8.9.2-1),
- wx2.8-headers (>= 2.8.9.2-1), wx2.8-i18n (>= 2.8.9.2-1),
- flex, bison, gperf, automake, autoconf, libtool, dpatch,
- libxslt1-dev, libcurl4-openssl-dev,
- libicu-dev, libjpeg62-dev, libpng12-dev, libsqlite3-dev, libgtk2.0-dev
-Build-Conflicts: python-setuptools
-XS-Python-Version: all
-Standards-Version: 3.7.3
-
-Package: python-webkitwx
-Section: python
-Architecture: any
-Depends: ${python:Depends}, ${shlibs:Depends}
-Provides: ${python:Provides}, webkitwx
-XB-Python-Version: ${python:Versions}
-Description: Python binding of wxwebkit
- This is an experimental packaged release of webkit for wxpython
-
-Package: webkitwx-headers
-Architecture: all
-Description: Python binding of wxwebkit
- This is an experimental packaged release of webkit for wxpython
- These are the header files
-
diff --git a/Tools/wx/packaging/debian/copyright b/Tools/wx/packaging/debian/copyright
deleted file mode 100644
index c2244ec01..000000000
--- a/Tools/wx/packaging/debian/copyright
+++ /dev/null
@@ -1,18 +0,0 @@
-This package was debianized by Chris Willing c.willing@uq.edu.au on
-Thu, Sat, 11 Apr 2009 12:54:52 +1000
-
-Upstream Author: Kevin Ollivier kevino@theolliviers.com and others
-
-Copyright: 2009 Kevin Ollivier, Apple Inc., and others
-
-License:
- LGPL
-
-
-The Debian packaging is (C) 2009, Chris Willing <c.willing@uq.edu.au> and
-is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
-
-
-# Please also look if there are files or directories which have a
-# different copyright/license attached and list them here.
-
diff --git a/Tools/wx/packaging/debian/python-webkitwx.install b/Tools/wx/packaging/debian/python-webkitwx.install
deleted file mode 100644
index dff51ce51..000000000
--- a/Tools/wx/packaging/debian/python-webkitwx.install
+++ /dev/null
@@ -1 +0,0 @@
-WebKitBuild/Debug.master/libwxwebkit.so usr/lib/
diff --git a/Tools/wx/packaging/debian/rules b/Tools/wx/packaging/debian/rules
deleted file mode 100644
index aea6def3d..000000000
--- a/Tools/wx/packaging/debian/rules
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /usr/bin/make -f
-
-SHELL = /bin/bash
-
-PYVERS := $(shell /usr/bin/python -c 'import sys; print sys.version[:3]')
-VER := $(shell /usr/bin/python -c 'import sys; print sys.version[:3]')
-BIULD_DIR := WebKitBuild/Debug.master
-build: build-stamp
-build-stamp: $(PYVERS:%=build-python%)
- touch $@
-build-python%:
- touch $@
-
-clean:
- rm -rf *-stamp build-python* build
- rm -rf $(addprefix debian/,$(packages)) debian/files debian/substvars
- rm -rf _trial_temp test.log
- find . -name "*.pyc" |xargs -r rm
- dh_clean
-
-install: build-stamp install-prereq $(PYVERS:%=install-python%) install-libs install-nover
-
-install-prereq: build-stamp
- dh_testdir
- dh_testroot
- dh_clean -k
-
-install-python%: install-prereq
- dh_install -ppython-webkitwx \
- $(BUILD_DIR)/webview.py \
- $(BUILD_DIR)/Debug.master/_webview.so \
- usr/lib/python$*/site-packages/wx-2.8-gtk2-unicode/wx/
-
-install-nover: install-prereq
- dh_install -pwebkitwx-headers \
- $(BUILD_DIR)/JavaScriptCore \
- usr/include/wxwebkit-1.0/
-
-install-libs: install-prereq
- dh_install
-
-
-binary-indep:
- (cd Tools/Scripts && ./build-webkit --wx --makeargs="--wxpython")
- dh_testdir
- dh_testroot
- dh_installchangelogs -i
- dh_installdocs -i
- dh_strip -i
- dh_compress -i
- dh_fixperms -i
- dh_installdeb -i
- dh_gencontrol -i
- dh_md5sums -i
- dh_builddeb -i
-
-binary-arch:
- dh_testdir
- dh_testroot
- echo $(shell pwd)
- echo $(shell ls -l)
- dh_installchangelogs -a
- dh_installdocs -a WebKit/wx/bindings/python/samples/simple.py
- dh_strip -a
- dh_compress -a -Xsimple.py
- dh_fixperms -a
- dh_pycentral -a
- dh_installdeb -a
- dh_shlibdeps -a
- dh_gencontrol -a
- dh_md5sums -a
- dh_builddeb -a
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install install-nover install-prereq install-libs
diff --git a/Tools/wx/packaging/wxWebKitInstaller.iss.in b/Tools/wx/packaging/wxWebKitInstaller.iss.in
deleted file mode 100644
index 2312474b0..000000000
--- a/Tools/wx/packaging/wxWebKitInstaller.iss.in
+++ /dev/null
@@ -1,79 +0,0 @@
-; Installer script for wxWebKit for wxPython
-
-[Setup]
-AppName=wxWebKit
-AppId=wxWebKit
-AppVersion=<<VERSION>>
-AppVerName=wxWebKit <<VERSION>>
-AppCopyright=LGPL
-DefaultDirName={code:GetInstallDir|c:\DoNotInstallHere}
-AppPublisher=wxWebKit Project
-AppPublisherURL=http://wxwebkit.wxcommunity.com/pmwiki/
-AppSupportURL=http://wxwebkit.wxcommunity.com/pmwiki/
-AppUpdatesURL=http://wxwebkit.wxcommunity.com/pmwiki/
-UninstallDisplayName=wxWebKit <<VERSION>>
-UninstallFilesDir={app}\Uninstall
-
-Compression=bzip/9
-SourceDir=<<ROOTDIR>>
-OutputDir=win-installer
-OutputBaseFilename=wxWebKit-wx<<WXVERSION>>-Py<<PYTHONVER>>-<<VERSION>>
-DisableStartupPrompt=yes
-AllowNoIcons=yes
-DisableProgramGroupPage=yes
-DisableReadyPage=yes
-
-[Files]
-<<FILES>>
-
-[Messages]
-WelcomeLabel1=Welcome to the wxWebKit for wxPython Setup Wizard
-
-[Code]
-
-program Setup;
-var
- PythonDir : String;
- InstallDir : String;
-
-
-function InitializeSetup(): Boolean;
-begin
-
- (* -------------------------------------------------------------- *)
- (* Figure out what to use as a default installation dir *)
-
- if not RegQueryStringValue(HKEY_LOCAL_MACHINE,
- 'Software\Python\PythonCore\<<PYTHONVER>>\InstallPath',
- '', PythonDir) then begin
-
- if not RegQueryStringValue(HKEY_CURRENT_USER,
- 'Software\Python\PythonCore\<<PYTHONVER>>\InstallPath',
- '', PythonDir) then begin
-
- MsgBox('No installation of Python <<PYTHONVER>> found in registry.' + #13 +
- 'Be sure to enter a pathname that places wxPython on the PYTHONPATH',
- mbConfirmation, MB_OK);
- PythonDir := 'C:\Put a directory on PYTHONPATH here\';
- end;
- end;
- InstallDir := PythonDir + '\Lib\site-packages\wx-<<WXVERSION>>-msw-unicode\wx\';
- Result := True;
-end;
-
-
-
-function GetPythonDir(Default: String): String;
-begin
- Result := PythonDir;
-end;
-
-
-
-function GetInstallDir(Default: String): String;
-begin
- Result := InstallDir;
-end;
-
-begin
-end.